Customizing SMF > Theme Site Themes

2.0 Sunset

<< < (16/18) > >>

JohnS:
I have looked at the coding but it is beyond me, though there is a tick function set to 1 second intervals in that page, so that is probably causing it, but why I do not know.
I have PM's you a password as you will only be able to see it if logged in.
Thanks

chadon:
I was able to reproduce the problem on your forum and on mine as well and managed to get a fix by removing the tick fonction but I have no explanation on why it is happening and what this function is needed for.  ???

The tick function is in the Profile.template.php file from the default theme so if you want to use my fix, you have to place a Profile.template.php attached here in the sunset theme folder. I can't say if it's a safe mod or if there won't be any side effects but it did get rid of the bug and if you plan to do it, it's at your own risk, I am sorry for not being able to be of a better help. :(

chadon:
By the way, here is the code I removed from the Profile.template.php file, maybe someone will be able to say what it is for.


--- Code: ---<script type="text/javascript"><!-- // --><![CDATA[
                                    function tick()
                                    {
                                        if (typeof(document.forms.creator) != "undefined")
                                        {
                                            calcCharLeft();
                                            setTimeout("tick()", 1000);
                                        }
                                        else
                                            setTimeout("tick()", 800);
                                    }

                                    function calcCharLeft()
                                    {
                                        var maxLength = ', $context['signature_limits']['max_length'], ';
                                        var oldSignature = "", currentSignature = document.forms.creator.signature.value;

                                        if (!document.getElementById("signatureLeft"))
                                            return;

                                        if (oldSignature != currentSignature)
                                        {
                                            oldSignature = currentSignature;

                                            if (currentSignature.replace(/\r/, "").length > maxLength)
                                                document.forms.creator.signature.value = currentSignature.replace(/\r/, "").substring(0, maxLength);
                                            currentSignature = document.forms.creator.signature.value.replace(/\r/, "");
                                        }

                                        setInnerHTML(document.getElementById("signatureLeft"), maxLength - currentSignature.length);
                                    }

                                    addLoadEvent(tick);
                                // ]]></script>
   
--- End code ---

JohnS:
Hi Chadon
Many thanks for this. As far as I can see the tick function updates the character count in the signature. Removing it should not give a problem but I am trying to seek some further information on this. Strange that it only affects your profile and not the default one, there must be some interaction somehow.
Thanks for all your prompt help
Best wishes
John

impreza:
nice done, thank you

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version