The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Ajax - Trying to count thread views on outgoing links.
Hi,
I will preface by saying I am a total noob and I really know nothing. I am trying to use one of my forums as a link dump/directory. I am trying to count the thread views on an outbound link (ie clicking the link increases thread views by 1). I found a snippet of code on another forum and I am trying to get it to fill my needs: Code:
<script type="text/javascript"> function trackClick( id ){ var url = "http://www.amateurpornster.com/showthread.php?t=" + id; xmlRequestObj = window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP") xmlRequestObj.open("GET", url, true); xmlRequestObj.send(null); return false; } </script> Code:
<a href=<if condition="in_array($forumid, array(3))">"$thread[preview]" onClick="trackClick( '$thread[threadid]' );" target="_blank"<else />"showthread.php?$session[sessionurl]t=$thread[threadid]"</if> id="thread_title_$thread[realthreadid]"<if condition="$show['gotonewpost']"> style="font-weight:bold"</if>>$thread[threadtitle]</a> Any help would be appreciated, or just tell me it wont work and I will look for another solution! Cheers, Ian |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|