PDA

View Full Version : [HowTo] Sort by custom field


Boby
03-15-2009, 10:45 PM
Mod Title: [HowTo] Sort by custom field
Last Updated: 15/03/2009
Supported by Mod Developer: No
Where to Download: just read
Support Via This Thread or Download Site: No support
Compatible With: phpLD 3+ maybe 2 also


I have received some requests to post a howto about sorting links by a custom field.
This is just a simple guide, I did it on phpLD 3.4 but it should work on most versions.

Note:

I haven't done and won't do any intensive testing.
Before you start, make sure the custom field is already available in your TPL_LINK database table, else you won't get any link displayed



index.php look for:
Content visible to registered users only.Add a custom field as highlighted in the following example:
Content visible to registered users only.You will now access the links sorted by your custom field as follows:
Content visible to registered users only.To show the sorting options when browsing links, edit your /templates/{YOUR-TPL}/main.tpl (could be also another file depending on your template) and look for something similar to:
Content visible to registered users only.Add another options with:
Content visible to registered users only.Boby