![]() |
![]() |
![]() |
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Join Date: Jun 2006
Posts: 274
![]() |
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 |
|
Loyal User
|
Are you saying Adsense was between listings???
...or between categories and listings? I don't think first option is possible.
__________________
Custom eSyndicat Templates | World Web Directory | Keyword Directory Webmaster Blog |
|
|
|
|
|
#3 |
|
Join Date: Jun 2006
Posts: 274
![]() |
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.
__________________
|
|
|
|
|
|
#4 |
|
Super Moderator
Join Date: Oct 2005
Location: (California)
Posts: 5,299
![]() ![]() ![]() ![]() |
Hi Michele
![]() Was this on a site using eSyndiCat?
__________________
Please don't ask me about script questions or sales issues through "Private Messages". Thanks! |
|
|
|
|
|
#5 |
|
Join Date: Jun 2006
Posts: 274
![]() |
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.
__________________
|
|
|
|
|
|
#6 |
|
Join Date: Feb 2006
Location: San Francisco, CA
Posts: 23
![]() |
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. |
|
|
|
|
|
#7 |
|
Join Date: Mar 2006
Location: USA
Posts: 1,138
![]() |
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 |
|
|
|
|
|
#8 |
|
Join Date: Jun 2006
Posts: 274
![]() |
With PhP and Smarty, do you have to declare variables anywhere first?
I've programmed with a bunch of languages, but neither of these.
__________________
|
|
|
|
|
|
#9 |
|
eSyndiCat Support Team
Join Date: Sep 2005
Posts: 1,421
![]() |
Well,
open index.tpl and find this piece of code: Code:
{foreach from=$links item=link}
{include file="link-display.tpl"}
{/foreach}
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}
|
|
|
|
|
|
#10 |
|
Super Moderator
Join Date: Oct 2005
Location: (California)
Posts: 5,299
![]() ![]() ![]() ![]() |
Nice Vincent
![]()
__________________
Please don't ask me about script questions or sales issues through "Private Messages". Thanks! |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|