View Full Version : random link of the directory
ginger
09-17-2005, 02:24 AM
Hi,
I'd like to display on the main page one randomly chosen listing
of my directory.
What code do I have to insert into main.tpl?
Thanks alot!
Ginger
Romario
09-17-2005, 09:30 AM
Good topic. :)
Nobody
09-17-2005, 09:57 AM
Content visible to registered users only.
I agree, good one.
WebDesignPoint
09-17-2005, 12:38 PM
Try this and see if it works.
1. Create a new file called random_link.php with the following code:
Content visible to registered users only.
2. In main.tpl place the code below where you want the link to appear:
Content visible to registered users only.
3. Open index.php and find the line:
Content visible to registered users only.
Below that add the code:
Content visible to registered users only.
That should be it. Let me know if it works or not. If not include any errors you get.
ginger
09-25-2005, 05:49 AM
hi,
It works great! thanks so much!! :)
Content visible to registered users only.
Jim_Westergren
09-25-2005, 01:30 PM
Great it works.
Now how do I do to make it select one random featured link?
Thanks.
Nobody
09-25-2005, 02:05 PM
Is it possibly to tweak this mod somehow, like "random link of the day"? And maybe also show wich category the link origins?
Nobody
11-14-2005, 03:10 PM
Will this show one strip from the link.tpl?
Is it possible to have it like "Link of the day", as I mentioned?
Davilac
11-14-2005, 05:09 PM
Good WebDesignPoint, I already have it in the sidebar
I add that if somebody want to show more than 1 link only must edit in random_link.php the number after "LIMIT"
Peter_Rosado
11-23-2005, 01:23 PM
That's nice, thanks ;)
TimAllard
12-03-2006, 01:19 AM
v2.0
being used on http://www.mydentify.com
this is just showing the listing without a "link to go to it"
this is in my main.tpl:
i added $link.URL before it cause i thought it went there...but i dont think it does now..im confused.
Content visible to registered users only.
this is the php doc:
Content visible to registered users only.
thanks,
-Tim
cr0n1cal
01-29-2007, 09:50 AM
Hi
I'm not so familiar with smarty and I've some problems with random link integration on v 3.10. I've created the randomlink.php file and added instance on index.php. I modified the main.tpl with this piece of code
foreach ($random_link as $link)
{
echo $link.TITLE;
}
but nothing happend.
Are some problems with random link integration in 3.1 version?
My site is on my signature and the random link code was been added on main.tpl - Recommended Links.
Thanks
cr0n1cal
01-29-2007, 12:03 PM
Problem solved.
I searched on the forum and I found the answer. :)
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.