PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 10-03-2004, 10:02 AM   #1
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
Need to modify custom template for click stats

I noticed in the default phpdig template the following code just below the </style> tag:
Code:
<phpdig:js_for_clicks/>
All of my header stuff for my template is in a php object, which I think would treat that as a literal rather than parsing it, so I started looking around for where js_for_clicks is defined (which is in search_function.php) and added the following code to my template header just below my CSS file definition:

Code:
<script language="JavaScript">
<!--
function clickit(cn,clink) {
  if(document.images) {
     (new Image()).src="clickstats.php?num="+cn+"&url="+clink+"&val=".urlencode($js_string)
  }
  return true;
}
//-->
</script>
However, the click stats still aren't getting logged. What am I missing? I don't understand a lot of javascript, so I don't know if the above code is incorrect or if it's something else that is the problem.

Thanks in advance.
vinyl-junkie is offline   Reply With Quote
Old 10-04-2004, 10:08 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
The $js_string variable doesn't seem like it gets passed a value. Look at the HTML and search for clickit in the search result page links and also search search_function.php for clickit to see what is being passed.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 10-04-2004, 07:34 PM   #3
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
OK, I think I see what's happening. I have a set of parameters that is getting passed into my Template class, but $js_string isn't one of those values. Boy, that's going to be a royal pain to add! Well, I've done that before. I guess I can do it again. *sigh*
vinyl-junkie is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Template That Utilizes Clickstats vinyl-junkie Mod Submissions 0 11-28-2004 08:17 PM
How do I modify the template tags output? IAMHHawaii How-to Forum 1 09-21-2004 07:51 PM
Custom template not working ibrown How-to Forum 10 08-17-2004 03:12 PM
Custom Template Tag garyp75 How-to Forum 1 08-09-2004 02:43 PM
No Stats clearwater Troubleshooting 1 10-20-2003 07:46 PM


All times are GMT -8. The time now is 02:29 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.