![]() |
![]() |
![]() |
|
|||||||
| Modifications Simple to complex modifications, made by users or by our team, applied to logic or presentation, all kinds of modifications are discussed and requested here. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: Mar 2006
Posts: 650
![]() |
Hi,
I have previously added thumbnails to my listings on the category pages. I use the Ocean template and ver2.0.01 I did it by adding Code:
{if $config.thumbshot}
<td>
<div class="preview">
<a href="{$link.url}" target="_blank"><img width="111" height="87" src="http://msnsearch.srv.girafa.com/srv/i?s=MSNSEARCH&r={$link.url}" alt="" /></a>
</div>
</td>
{/if}
However this does not add to the counted clicks, in the same way that clicking on the title does. Can anyone give me details on how to make the new image count clicks in the same way as the tirle does (ie visitors can only add to clicks once (per day?)) regards Mark |
|
|
|
|
|
#2 |
|
Join Date: Mar 2006
Posts: 650
![]() |
Well studying the threads
http://www.esyndicat.com/forum/about6665.html http://www.esyndicat.com/forum/showthread.php?t=6291 gave me this as an answer: for line 5 in the mod as in the attachment above Code:
<a href="{$link.url}" id="l{$link.id}" target="_blank"><img width="111" height="87" src="http://msnsearch.srv.girafa.com/srv/i?s=MSNSEARCH&r={$link.url}" alt="" /></a>
![]() Of course I don't understand why it works .. but who cares? -- if you get your thumbnails from not-MSN you will need to change that bit. --- |
|
|
|
|
|
#3 | |
|
Join Date: Jul 2006
Location: St. Petersburg
Posts: 2,567
![]() |
Hi Mark,
Thanks for very useful modification. Quote:
Code:
id="l{$link.id}"
i.e Code:
<h1><a href="{$link.url}" id="l{$link.id}" {if $config.new_window}target="_blank"{/if}>{$link.title}</a></h1>
Code:
<a href="{$link.url}" id="l{$link.id}" target="_blank"><img width="111" height="87" src="http://msnsearch.srv.girafa.com/srv/i?s=MSNSEARCH&r={$link.url}" alt="" /></a>
Code responsible for " interception id " you can find in "footer.tpl" file Code:
<script type="text/javascript">
var root = '{$config.base}{$config.dir}';
var a = document.getElementsByTagName("a");
{literal}
for(i=0; i<a.length; i++)
if(a[i].id != '')
{
a[i].onclick = count_link;
}
function count_link()
{
i = new Image();
h = Math.random();
i.src= root + 'click-count.php?id='+this.id+'&h='+h;
return true;
}
{/literal}
</script>
|
|
|
|
|
|
|
#4 |
|
Join Date: Mar 2006
Location: Ottawa, Canada
Posts: 366
![]() |
Dave... does id="l{$link.id}" need to be contained within the template file or will a php include file that outputs html also work? I'm still trying to get the link counting working for thumbs using the thumbutilty file for Alexa paid thumb service which is called from a separate file.
__________________
Theres no place like 127.0.0.1 |
|
|
|
|
|
#5 |
|
Join Date: Jul 2006
Location: St. Petersburg
Posts: 2,567
![]() |
Hello Bryan,
I understand your problem. In my opinion here only one way: to pass data through PHP file. ***Open templates/yourTemplate/view-link.tpl and find code*** Code:
{if $config.alexa_thumbs}
<td width="<strong>{$lang.$key}:</strong>">{get_thumbnail_link aUrl=$link.url aSize=Large}</td>
{/if}
Code:
{if $config.alexa_thumbs}
<td width="<strong>{$lang.$key}:</strong>">{get_thumbnail_link aUrl=$link.url aSize=Large idLink=$link.id}</td>
{/if}
***Save file*** ***Open thumbnailutility_php4.php and find function*** PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Last edited by Dave Baker; 12-03-2006 at 10:07 PM. |
|
|
|
|
|
#6 |
|
Join Date: Mar 2006
Location: Ottawa, Canada
Posts: 366
![]() |
Will do Dave... it's good to know I was on the right track logically with only $aParams['idLink'] being the part I was messing up on for proper coding. I will update the Alexa thread once I have this working.
__________________
Theres no place like 127.0.0.1 |
|
|
|
|
|
#7 | |
|
Join Date: Mar 2006
Location: Ottawa, Canada
Posts: 366
![]() |
Quote:
PHP Code:
Missing argument 3 for get_html_snippet()
__________________
Theres no place like 127.0.0.1 |
|
|
|
|
|
|
#8 |
|
Join Date: Jul 2006
Location: St. Petersburg
Posts: 2,567
![]() |
I'm sorry Bryan, it's my fault.
I have corrected the previous post |
|
|
|
|
|
#9 |
|
Join Date: Mar 2006
Location: Ottawa, Canada
Posts: 366
![]() |
Still the same thing Dave... missing argument 3 in the get_html_snippet function.
Here's where my file is at in case it now differs from what you may have; PHP Code:
__________________
Theres no place like 127.0.0.1 |
|
|
|
|
|
#10 |
|
Join Date: Jul 2006
Location: St. Petersburg
Posts: 2,567
![]() |
Bryan in this code:
PHP Code:
PHP Code:
p.s If the problem will not be solved I can attach the file |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|