Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 09:30 am EDT

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
 Quote

Status: offline

ronack

Forum User
Full Member
Registered: 05/27/03
Posts: 612
Thank you Dirk, Now if we can syndicate this I will be a happy camper. Smile
 Quote

Status: offline

ppmnt

Forum User
Chatty
Registered: 06/09/04
Posts: 53
Smile 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?
 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
 Quote

Status: offline

ppmnt

Forum User
Chatty
Registered: 06/09/04
Posts: 53
Hi Dirk,

I used the same link and diffed the files, they are the same. Are you sure you uploaded the new version?

~Eva
 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
 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.
 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
 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
 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
 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 Wink

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
 Quote

All times are EDT. The time is now 09:30 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