![]() |
![]() |
![]() |
|
|||||||
| Version Mods, Bugfixes & Patches Has just finished programming a cool mod for eSyndiCat Directory Software? Share it with the community here. |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
#1 |
|
Join Date: Oct 2005
Posts: 349
![]() |
eSyn Pro 1.2
I would love to have a Random Links Sidebox This would be different from the Featured box or Partners box The idea is that I'd set some number - like 5 - to display up to 5 randomly selected links from my list. It would change with each page view, and it would be a cool way to bring attention to the listings. Anyone know how to do this? Many thanks :-) |
|
|
|
|
#2 |
|
Join Date: Jul 2006
Location: St. Petersburg
Posts: 2,567
![]() |
Hello scareg,
***Open Header.php and find line of code*** PHP Code:
PHP Code:
***Open Header.tlp and find following:*** Code:
{if $news && $config.news}
<div class="box">
<div class="box-caption2-right">
<div class="box-caption2-left">
<div class="box-caption2">{$lang.news}</div>
</div>
For GreenLeaves template Code:
<div class="box">
<div class="box-caption2-right">
<div class="box-caption2-left">
<div class="box-caption2">Yours caption</div>
</div>
</div>
<div class="box-content">
<div class="links">
{foreach from=$random_links item=link_random}
<div class="random-link"><a href="{$link_random.url}" class="title" id="l{$link_random.id}" {if $config.new_window}target="_blank"{/if}>{$link_random.title}</a></div>
{/foreach}
</div>
</div>
</div>
Code:
<div class="box" style="margin-right: 0;">
<div class="box-caption">{$lang.Random_Links_Sidebox}</div>
<div class="box-content">
<div class="links">
{foreach from=$random_links item=link_random}
<div class="random-link"><a href="{$link_random.url}" class="title" id="l{$link_random.id}" {if $config.new_window}target="_blank"{/if}>{$link_random.title}</a></div>
{/foreach}
</div>
</div>
</div>
*** Open language file and add *** Code:
'Random_Links_Sidebox' => 'Random Links Sidebox', Last edited by Dave Baker; 08-25-2006 at 10:45 AM. |
|
|
|
|
#3 |
|
Dave, this works great
Thanks!
__________________
Rainbow Bridge |
|
|
|
|
|
#4 |
|
Join Date: Jul 2006
Location: St. Petersburg
Posts: 2,567
![]() |
Always at your services.
|
|
|
|
|
#5 |
|
Join Date: Oct 2005
Posts: 349
![]() |
Thanks, Dave - This is great!
![]() |
|
|
|
|
#6 |
|
Join Date: Feb 2006
Posts: 80
![]() |
The random links are grabbing a lot of the banned sites. Where should I look to tweak the sql?
|
|
|
|
|
#7 |
|
Join Date: Sep 2005
Posts: 1,421
![]() |
This is in classes/Dir.php, function getRandomLinks()
PHP Code:
To fetch only active links you have to replace it with this one: PHP Code:
|
|
|
|
|
#8 |
|
Join Date: Nov 2005
Location: Switzerland
Posts: 306
![]() |
Cool feature!
Do you have a hint for me what to do when I want to integrate it into my fire&ice template? Greetings, Lars |
|
|
|
|
#9 | |
|
Super Moderator
Join Date: Oct 2005
Location: Phoenix,Arizona (Valley of the Sun)
Posts: 5,358
![]() ![]() ![]() ![]() |
Quote:
Code:
<div class="box">
<div class="box-caption">{$lang.Random_Links_Sidebox}</div>
<div class="box-content">
<div class="links">
{foreach from=$random_links item=link}
<div class="random-link"><a href="{$link.url}" class="title" id="l{$link.id}" {if
$config.new_window}target="_blank"{/if}>{$link.title}</a></div>
{/foreach}
</div>
</div>
</div>
__________________
Please don't ask me about script questions or sales issues through "Private Messages". Thanks! |
|
|
|
|
|
#10 | |
|
Join Date: Nov 2005
Location: Switzerland
Posts: 306
![]() |
Quote:
The only thing I would like to change now is font style, so it looks like the text in my featured links box: http... smaller, left-aligned, a bit space between the lines. Any ideas? Last edited by lsb; 05-12-2007 at 11:11 PM. |
|
|
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|