eSyndiCat User Forums esyndicat directory software esyndicat support

Go Back   eSyndiCat User Forums > eSyndiCat Directory Software [FREE] > User interface > Existing Templates

Existing Templates Want to adjust logo or center some piece of text in your directory? Get advice on how to do it in this forum dedicated to pre-installed templates.

Reply
 
Thread Tools Display Modes
Old 08-12-2006   #1
Michele
 
Join Date: Jun 2006
Posts: 274
Michele is on a distinguished road
Default MOD Display Adsense between links

Hi All,

I've seen on some other directories where they have the list of links in a category and then about mid-way down they have a Google Ad mixed in.

Has anyone here done that and are they willing to share how they did it?

mi
__________________
2 Great eSyndiCat Directories
Crafty Tips Arts & Crafts Directory & Pet Site Guides Pet Directory
Michele is offline   Reply With Quote
Old 08-13-2006   #2
WTM
Loyal User
 
WTM's Avatar
 
Join Date: Feb 2006
Location: Mockba - New York
Posts: 1,342
WTM is on a distinguished road
Send a message via Yahoo to WTM Send a message via Skype™ to WTM
Default

Are you saying Adsense was between listings???
...or between categories and listings?

I don't think first option is possible.
WTM is offline   Reply With Quote
Old 08-13-2006   #3
Michele
 
Join Date: Jun 2006
Posts: 274
Michele is on a distinguished road
Default

It was between the listings. It looked somewhat like another entry. Seems like it would be really effective.

I've seen others who have them between the featured listings and the regular ones, that would be good too.

I'll have to pay attention the next time I see it and include the URL here.
__________________
2 Great eSyndiCat Directories
Crafty Tips Arts & Crafts Directory & Pet Site Guides Pet Directory
Michele is offline   Reply With Quote
Old 08-13-2006   #4
Greg
Super Moderator
 
Greg's Avatar
 
Join Date: Oct 2005
Location: (California)
Posts: 5,299
Greg is a jewel in the roughGreg is a jewel in the roughGreg is a jewel in the roughGreg is a jewel in the rough
Default

Hi Michele

Was this on a site using eSyndiCat?
__________________
Please don't ask me about script questions or sales issues through "Private Messages". Thanks!
Greg is offline   Reply With Quote
Old 08-13-2006   #5
Michele
 
Join Date: Jun 2006
Posts: 274
Michele is on a distinguished road
Default

Don't know what it was using.

Was thinking putting after featured would probably just require putting it in the if statement.

But the mid-results was way cooler.
__________________
2 Great eSyndiCat Directories
Crafty Tips Arts & Crafts Directory & Pet Site Guides Pet Directory
Michele is offline   Reply With Quote
Old 08-14-2006   #6
Chrisjara
 
Join Date: Feb 2006
Location: San Francisco, CA
Posts: 23
Chrisjara has disabled reputation
Default

I looked at the code which displays links and it looks like it is using a foreach loop. You would somehow have to stop the loop, print the adsense code, then continue.

I don't know enough about Smarty or PHP to finish this - if only.
Chrisjara is offline   Reply With Quote
Old 08-14-2006   #7
Sai_dallas
 
Sai_dallas's Avatar
 
Join Date: Mar 2006
Location: USA
Posts: 1,138
Sai_dallas is an unknown quantity at this point
Default Try this

Before the start of the loop, start a counter variable.
And every time one link is displayed increment the counter.

for every say 5 links you add adsense code and reset the counter to 0
(I am not familiar with php or smarty - but this is very easy to do)


counter_variable = 0

for each
if counter_variable = 5 then
Adsense code
counter_variable =0 // Reset the counter
end if

Code to display links
counter_variable = counter_variable +1
next
__________________
Dot Rig
Ayhu
eDoctor
Sai_dallas is offline   Reply With Quote
Old 08-14-2006   #8
Michele
 
Join Date: Jun 2006
Posts: 274
Michele is on a distinguished road
Default

With PhP and Smarty, do you have to declare variables anywhere first?

I've programmed with a bunch of languages, but neither of these.
__________________
2 Great eSyndiCat Directories
Crafty Tips Arts & Crafts Directory & Pet Site Guides Pet Directory
Michele is offline   Reply With Quote
Old 08-15-2006   #9
Vincent Wright
eSyndiCat Support Team
 
Join Date: Sep 2005
Posts: 1,421
Vincent Wright is an unknown quantity at this point
Default

Well,

open index.tpl and find this piece of code:

Code:
{foreach from=$links item=link}
    {include file="link-display.tpl"}
{/foreach}
This loop displays links.

Now you have to change it to something like this:

Code:
{foreach from=$links item=link name="links"}
    {include file="link-display.tpl"}
    
    {if $smarty.foreach.links.iteration eq 5}
    <tr><td>
    PUT CODE HERE THAT DISPLAYS GOOGLE ADS
    </td></tr>
    {/if}
    
{/foreach}
This snippet will insert whatever you put into <td></td> tags right below 5th link in your listings.
Vincent Wright is offline   Reply With Quote
Old 08-15-2006   #10
Greg
Super Moderator
 
Greg's Avatar
 
Join Date: Oct 2005
Location: (California)
Posts: 5,299
Greg is a jewel in the roughGreg is a jewel in the roughGreg is a jewel in the roughGreg is a jewel in the rough
Default

Nice Vincent
__________________
Please don't ask me about script questions or sales issues through "Private Messages". Thanks!
Greg is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump


All times are GMT. The time now is 11:57 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Testimonials | Articles | Support | Documentation | Privacy Policy | License | Affiliates | Contact Us | SEO Resources