Gossamer Forum
Home : Products : Gossamer Links : Discussions :

change order links per category

Quote Reply
change order links per category
within all the categories the links are ordered alphabetically. Can I change the order of the links per specific category? Meaning that for certain categories the order of the links will remain alphabetical, while in a different category the links will be arranged by date?
Quote Reply
Re: [nir] change order links per category In reply to
Hi. You can change the build_category_sort field in Setup > Build Options

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] change order links per category In reply to
Hi Andy
I need to change the order of the link in the categories so I will have 2 option of sorting.
1. Order the links in alphabetical
2. Order the links by date

From what I see the Build Options is for the entire categoryL
Quote Reply
Re: [Andy] change order links per category In reply to
Andy, unfortunately not.
He's asking different ordering for different categories.
This is currently not possible. Frown

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [nir] change order links per category In reply to
Well, if you need different ordering for different categories, then this would need a global or a plugin.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] change order links per category In reply to
In Reply To:
Well, if you need different ordering for different categories, then this would need a global or a plugin.

...or run it through page.cgi, with mod_rewrite... so you can do stuff like;

http://www.mydomain.com/dir/Category/SO_Hits/index.html .... which would translate to;

http://www.mydomain.com/cgi-bin/dir/page.cgi?g=Category;SortOrder=Hits

Something like this would probably do it;

Code:
RewriteRule ^dir/(.*)/SO_(.*)/? /cgi-bin/dir/page.cgi?g=$1/SortOrder=$2
RewriteRule ^dir/(.*)/SO_(.*)/(.*)\.html /cgi-bin/dir/page.cgi?g=$1/$2.html;SortOrder=$2

Then, you need to edit Page.pm, so that it checks for a sort order (SortOrder=....). This will require some hacking of Page.pm (unless you know how to write plugins =)).

I got this far with my instructions ... but I've run out of time to finish it off now :(

Hopefully that will get you on the right tracks Unsure

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] change order links per category In reply to
Andy,
Quote:
Then, you need to edit Page.pm, so that it checks for a sort order (SortOrder=....). This will require some hacking of Page.pm (unless you know how to write plugins =)).
I would definitely not recommend hacking, when a global or plugin can do the same job.
Also hacking is not a beginner's tool.
We all know, that hackings makes LSQL incompatible with upgrades, since all hackings have to applied again & again after each upgrade. Hackings are against of the thought of the Globals & Plugins, which was implemented to LSQL to avoid such chaotic situation like we had with Links 2.0 mods...

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] change order links per category In reply to
Quote:
Also hacking is not a beginner's tool.
We all know, that hackings makes LSQL incompatible with upgrades, since all hackings have to applied again & again after each upgrade. Hackings are against of the thought of the Globals & Plugins, which was implemented to LSQL to avoid such chaotic situation like we had with Links 2.0 mods...

Agreed ... but I don't agree about "hacking" not being a beginner's tool, as it is ;) When I first started out.. all I ever did was install existing plugins, or hack the core .pm files. Then, as you learn the Plugin system, you can do it through "hooks".

I was giving it as an example anyway... I don't intend to do it :p

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] change order links per category In reply to
Quote:
I don't agree about "hacking" not being a beginner's tool, as it is ;)
Many of us started with Links 2.0 where hacking was the only way to customize the code.
But under LinksSQL we should not encourage anybody, especially beginners to do any hacks in the core code. Hacking may cause unwanted, strange bugs, errors, and we will sweat blood to support such strange errors which are coming from beginner hacks...
Therefore I say: hacking is not a beginner's tool.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...