Where to Place This Code

Go down

Where to Place This Code

Post by Rilee on December 18th 2010, 10:22 pm

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:

<script type="text/javascript">
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+" ");

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!


Posts : 70
Reputation : 0
Language : English

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum