The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.

Create a free forum like this one.

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 -

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