Where to Place This Code
Page 1 of 1
Where to Place This Code
Hi There. I have been reading on this topic - Display USERNAME in Topic View - https://help.forumotion.com/script-code-problems-f43/display-username-in-topic-view-t80561.htm?highlight=bold+latest+topic+titles
I use PunBB and this code needs to be put in viewtopic_details:
Is there any other place that I can put it in my templates since I do not have viewtopic_details template for it to function properly?
Thanks and Happy Holidays!
I use PunBB and this code needs to be put in viewtopic_details:
<script type="text/javascript">
//<![CDATA[
var viewers=document.getElementsByTagName("whoiam");
var viewersT=document.getElementsByTagName("wheniam");
var viewer=viewers[0].childNodes[0];
var viewerT=viewersT[0].childNodes[0];
var vName=viewer.nodeValue;
var vTime=viewerT.nodeValue;
var spanElements=document.getElementsByTagName("span");
for (i=0;i<spanElements.length;i++)
{
if (spanElements[i].className.match("viewerdetails"))
{
var viewerText=document.createTextNode(" "+vName+" "+vTime+" ");
spanElements[i].appendChild(viewerText);
}
}
//]]></script>
Is there any other place that I can put it in my templates since I do not have viewtopic_details template for it to function properly?
Thanks and Happy Holidays!
Rilee- Forumember
- Posts : 70
Reputation : 0
Language : English
Similar topics
» Location to place hit counter code in "overall footer" code template?
» Way to place this code :overall_footer_end
» Where to place this code
» Where to place code for a web tracker?
» can i place adsense code on portal??????
» Way to place this code :overall_footer_end
» Where to place this code
» Where to place code for a web tracker?
» can i place adsense code on portal??????
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum