Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 09:50 am EST
Geeklog Forums
Simple Blogroll block
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I wrote a simple Blogroll block that you can use to display your favorite links in a block on your site. It displays all the links from one category, either sorted or in random order, and either with direct links or going via Geeklog's portal.php (so that links are counted).
Nothing spectacular, but somebody may find it useful ...
bye, Dirk
Nothing spectacular, but somebody may find it useful ...
bye, Dirk
15
13
Quote
Status: offline
ppmnt
Forum User
Chatty
Registered: 06/09/04
Posts: 53
Thanks Dirk, that's a nice little idea. I'm using it on my gallery help page.
However, when I had $random set to true I got different results every time I reloaded the browser. Since there are only 3 links in that category for now (I just created it yesterday) I was able to really notice the difference. Sometimes it returned 2 links, sometimes 1, sometimes all 3, sometimes it had empty bullets (when it was using COM_makeList, no bullets there now, but you get the point).
Any clue what that's all about?
However, when I had $random set to true I got different results every time I reloaded the browser. Since there are only 3 links in that category for now (I just created it yesterday) I was able to really notice the difference. Sometimes it returned 2 links, sometimes 1, sometimes all 3, sometimes it had empty bullets (when it was using COM_makeList, no bullets there now, but you get the point).
Any clue what that's all about?
30
14
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by ppmnt: Sometimes it returned 2 links, sometimes 1, sometimes all 3, sometimes it had empty bullets (when it was using COM_makeList, no bullets there now, but you get the point).
Yeah, that's a bug. I've just uploaded a fixed version (use the link above).
bye, Dirk
17
12
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Hmm, something must be caching those files, both in upload and in download ...
I've now replaced the file on the server (again) - it's 1226 bytes. But when I download it, I still get the old file (1171 bytes). Try clearing your caches.
bye, Dirk
I've now replaced the file on the server (again) - it's 1226 bytes. But when I download it, I still get the old file (1171 bytes). Try clearing your caches.
bye, Dirk
12
14
Quote
Status: offline
ppmnt
Forum User
Chatty
Registered: 06/09/04
Posts: 53
Can't be my browser cache, originally I downloaded it with wget directly to my web server, and when I use my browser (which I hadn't used before) I still get the old file... I would blame a proxy cache but i'm not going through one. And a browser would also notice the time stamp change and refresh the cache.
Weird stuff.
Weird stuff.
14
17
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
A lovely block Dirk, but how can I limit the number of links to, let's say, 10?
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
12
12
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by beewee: how can I limit the number of links to, let's say, 10?
The idea was that it would list all links from a certain link category, so you would restrict it by simply adding not more than 10 links to that category.
bye, Dirk
30
18
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
My idea was: show 10 random links from a certain category
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
18
9
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by beewee: My idea was: show 10 random links from a certain category
I was afraid you were going to say that
You would need a counter in that do {...} while loop near the end of the block. Make it break out of the loop once you've assigned 10 links to $newlist[].
bye, Dirk
12
11
Quote
All times are EST. The time is now 09:50 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content