PDA

View Full Version : Affiliate Link with the right Website Preview Picture


mlowrey
05-19-2006, 07:18 AM
Hello everybody,

My FIRST problem is about using affiliate links. But i don't want my customers to see that iam using affilate links .....

Can this be done by using a extra url field or something ????

Then the SECOND problem: THE PREVIEW WEBSITE IMAGE will be the one of the affilate website and not the destination URL !

Can someone explain me how to fix this 2 problems ?

THX JK.

WTM
05-19-2006, 10:22 AM
I have asked same question before and Simon promised me to help with this mod in very near future. As soon as it's done I will post it in Modifications forum.
Keep your eyes open for Display-URL mod

Nick Collins
05-19-2006, 11:13 AM
Welcome to our forum, mlowrey!
1) Here is a solution to hide urls from your customers:
***open templates/TemplateName/link-display.tpl***
***find the following code***
<div class="title">{if $link.crossed}@{/if} {if $config.esc_codes}{text_to_html aText=$link.title aParagraph=true}{else}{$link.title}{/if} ({$link.url})
***replace with***
<div class="title">{if $link.crossed}@{/if} {if $config.esc_codes}{text_to_html aText=$link.title aParagraph=true}{else}{$link.title}{/if} ({$link.url})

***find and delete the following code***
<div class="url">{$link.url}</div>
***save***

[2]We are taking thumbnails from "Alexa" site, so I can not help you in that case. You simply can disable them from admin panel.

mlowrey
05-19-2006, 05:58 PM
thx for the quick reply.

but whta i don't understand is that, if we would make a extra field, why wouldn't it be possible then to let alexa read that url for its image ?

And why issen't it possible to make a extra url field for the visible link ?

This option would be absolutley fxxxxxxx great !

thx jk.

Bryan Ex
05-19-2006, 09:19 PM
Check out my #1 request in this thread from almost two months ago...

http://www.esyndicat.com/forum/viewtopic.php?t=1345

Simon has agreed to help me with it in another thread but I suspect it will be a while yet given how behind he is these days.

mlowrey
05-20-2006, 08:20 PM
strange that he is not taking the time for it. This would increase his value of his software allot ! Also the option to put a surten amount of sponsors on the top of each category should be in the package......

WTM
05-20-2006, 10:43 PM
Hey Nick!

Your solution is not exactly what we are trying to accomplish.

This is what we want step-by-step:

1. Create new field for link submission from admin panel named "Display_URL"
(This part is easy and can be done without your help)

2. When directory owner enters information for new link from admin panel he will have 2 fields to enter URL's
- first is actual url (for example http://somesite.com?affiliateID)
- second is Display_url (http://somesite.com)

3. In link-display.tpl:
a)
- if there is "Display_URL" for this link - show Display_url in the link field
- if there is no "Display_Url" stored - show actual link
b)
- same action for "onMouseOver" script.

4. In view-link.tpl
- same exact action as in link-display.tpl.

I believe that even if you enter affiliate url Alexa will still display thumbnail image for the main site but to address mlowrey's concern may be code for Alexa image should be also pointed to "Display_URL"

If I missed anything guys, please correct me...

Please Nick, help us! :(

Bryan Ex
05-21-2006, 12:53 AM
Right on target WTM... the one thing I'll perhaps clarify for Nick or Simon is that the "display URL" field should not be accessable (or even viewable) by someone submitting a link - other than admin.

mlowrey
05-21-2006, 10:01 AM
YES this is it !

I think that the affiliate link only is neccesary for the admin.

I hope that the owner of this script can make this MOD ASAP ! JIHA

WTM
05-24-2006, 07:45 AM
Nick or Simon Please help!

1. What I am trying to do is to show "display_url" if it is present and actual url if there is no "display_url"
This is the code I came up with:
{if $link.display_url ne ''}{$link.display_url}{else}{$link.url}{/if}
This code is showing "display_url" fine but if there is no "display_url" stored for the link - url field stays empty.

What am I doing wrong?

2. For MouseOver I am using code:
<a href="{$link.url}" class="title" id="l{$link.id}" {if $config.new_window}target="_blank"{/if} onMouseOver="window.status='{if $link.display_url ne ''}{$link.display_url}{else}{$link.url}{/if}'; return true" onMouseOut="window.status=''; return true">

First of all it is working only in IE and nothing is showing up in Firefox
Again same story - if "display_url" is not present all I get is "http://"
If it is present - status bar in IE is showing "display_url"

Could you please point me in the right direction.
What am I doing wrong??? :unsure:

See example here (http://i-affiliates.net/affiliate_programs/)

Nick Collins
05-24-2006, 09:52 AM
Hi WTM, here is a correct code for number one:
{if $link.display_url neq 'http://'} {$link.display_url} {else} {$link.url}{/if}

and here is for number two:
{if $config.esc_codes}{text_to_html aText=$link.title aParagraph=true}{else}{$link.title}{/if} ({$link.url})


This code will work in case you created "Text" custom field with name "display_url" and default value = "http://"

WTM
05-24-2006, 06:41 PM
Hey guys
I posted mod in the Pro section Version Mods

Nick Collins
05-25-2006, 03:23 AM
...and I made it Sticky ;)

mlowrey
05-27-2006, 07:53 PM
JOEHOE ! Can someone please explain my where i have to insert this mod ?

WTM
05-27-2006, 08:17 PM
JOEHOE ! Can someone please explain my where i have to insert this mod ?
Just follow my step-by-step instructions here:

http://www.esyndicat.com/forum/showthread.php?t=5557

You will need to create new field in admin panel and than update 3 files:
- language/your_language.php
- templates/your_template/link-display.tpl
- templates/your_template/view-link.tpl

mlowrey
05-27-2006, 08:53 PM
I GET THIS:

mlowrey, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

WTM
05-27-2006, 09:03 PM
Did you pay for Pro version of the script?
The mod is for Pro version and posted in pro users forum.
It will not work with free version

mlowrey
05-27-2006, 09:06 PM
i have the pro version and payed for it !

i have a login for the download area to download the pro version.

i have bought it about 2 weeks ago.

WTM
05-27-2006, 09:12 PM
When you open forum main page do you see section (it should be second section from the top)

eSyndicat Pro Customers
- Pro Admin Panel
- User Front-End
- Version Mods

If you don't see it - you need to e-mail Simon or Nick for them to grant you access to Pro area

WTM
05-27-2006, 09:20 PM
I sent you copy of the code in the PM

mlowrey
05-27-2006, 10:11 PM
thank you really reaylly much i have sended a message to support but no respons yet.

mlowrey
05-27-2006, 10:30 PM
i am missing one thing in this mod, and that is that the alexa image is still the image from the affilate link.....

Is this correct ? i would like to have the image to be the one of the real website and not the one from the affiliate link.....

WTM
05-27-2006, 10:48 PM
In the code for Alexa image find section:<img width="111" height="87" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&amp;size=small&amp;u rl={$link.url}" alt="" />

and replace it with code:<img width="111" height="87" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&amp;size=small&amp;u rl={if $link.display_url neq 'http://'}{$link.display_url}{else}{$link.url}{/if}" alt="" />This will display image for the main site.

Basically you just replacing code:{$link.url}
with code:{if $link.display_url neq 'http://'}{$link.display_url}{else}{$link.url}{/if}

Hope this is what you are looking for...;)

mlowrey
05-27-2006, 11:11 PM
mm almost, take a look at:
http://www.hiervindjealles.nl/search.php?what=kids

then you see the picture of europe(is picture from affiliate program), but when you click on Link Details, then there is the correct image of the target website....i want the correct image on both places......

any idears......

WTM
05-27-2006, 11:39 PM
You need to apply changes that I described in the post above to both files:
- view-link.tpl and
- link-display.tpl

Looks like you updated only view-link.tpl file...

mlowrey
05-28-2006, 10:47 AM
Thank you ! It is working perfect now.

Nick Collins
05-30-2006, 07:53 AM
Hi WTW! You are becoming eSyndiCat professor... ;)
Thank you for your help!

dousma
06-08-2006, 10:55 PM
In the code for Alexa image find section:

<img width="111" height="87" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&amp;size=small&amp;u rl={$link.url}" alt="" />


and replace it with code:
<img width="111" height="87" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&amp;size=small&amp;u rl={if $link.display_url neq 'http://'}{$link.display_url}{else}{$link.url}{/if}" alt="" />


OK this is working fine except I like to use Alexa image an an extra link as well, could you please tell how to change this code?

WTM
06-09-2006, 12:43 AM
1.To use Alexa image on "links" page as a link to "view details" page and display image of main site instead of affiliate site:

In links-display.tpl file find code:
<td valign="top" style="padding-right: 10px;"><img width="111" height="87" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&amp;size=small&amp;u rl={$link.url}" alt="" /></td>
Replace it with code:<td valign="top" style="padding-right: 10px;">{if $config.mod_rewrite}
<a href="{$config.base}{$config.dir}{$link.path}/{convert_str string=$link.title}-l{$link.id}.html"><img width="111" height="87" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&amp;size=small&amp;u rl={if $link.display_url neq 'http://'}{$link.display_url}{else}{$link.url}{/if}" alt="" /></a>
{else}
<a href="{$config.base}{$config.dir}view-link.php?id={$link.id}"><img width="111" height="87" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&amp;size=small&amp;u rl={if $link.display_url neq 'http://'}{$link.display_url}{else}{$link.url}{/if}" alt="" /></a>
{/if}</td>
2. To use Alexa image on "link details" page as a link to affiliate page or regular page if it is not an affiliate link and display image of main site instead of affiliate site:
In view-link.tpl file find code:{if $config.alexa_thumbs}
<img width="111" height="87" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&size=small&url={$link.url}" />
{/if}
and replace with code:{if $config.alexa_thumbs}
<a href="{$link.url}" class="title" id="l{$link.id}" {if $config.new_window}target="_blank"{/if} onMouseOver="window.status='{if $link.display_url neq 'http://'}{$link.display_url}{else}{$link.url}{/if}'; return true" onMouseOut="window.status=''; return true"><img width="111" height="87" border="0" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&size=small&url={if $link.display_url neq 'http://'}{$link.display_url}{else}{$link.url}{/if}" title="Visit {$link.title}" /></a>
{/if}

If I missed something please let me know...

dousma
06-09-2006, 09:26 AM
Thanks WTM but this is not what I had in mind. I only like the alexa image clickable so if you click on the alexa image it opens the link and not the link of alexa.

WTM
06-09-2006, 06:24 PM
Thanks WTM but this is not what I had in mind. I only like the alexa image clickable so if you click on the alexa image it opens the link and not the link of alexa.

Part 2. is oppening up the link...

dousma
06-09-2006, 10:22 PM
Thanks WTM, part 2. is working accept in part 1. I want the alexa image to open the affiliate link and not the link detail page!

WTM
06-10-2006, 12:11 AM
In link-display.tpl replace code:<td valign="top" style="padding-right: 10px;"><img width="111" height="87" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&amp;size=small&amp;u rl={$link.url}" alt="" /></td>
with code:<td valign="top" style="padding-right: 10px;"><a href="{$link.url}" id="l{$link.id}" {if $config.new_window}target="_blank"{/if} onMouseOver="window.status='{if $link.display_url neq 'http://'}{$link.display_url}{else}{$link.url}{/if}'; return true" onMouseOut="window.status=''; return true"><img width="111" height="87" border="0" src="http://pthumbnails.alexa.com/image_server.cgi?id=www.esyndicat.com&size=small&url={if $link.display_url neq 'http://'}{$link.display_url}{else}{$link.url}{/if}" title="Visit {$link.title}" /></a>

dousma
06-10-2006, 07:46 PM
Thanks WTM did is what I meant!