Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 11:31 pm EST
Geeklog Forums
Alphabetically Sorting Articles
Ryan B.
Anonymous
Is there a way to alphabetically sort articles?
15
11
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Only if you change the code. And sort by what?
In index.php, there is a line that reads
If you change that to, say,
then it would sort the stories by their title (with the featured story still on top).
bye, Dirk
In index.php, there is a line that reads
Text Formatted Code
$sql .= "ORDER BY featured DESC, date DESC";Text Formatted Code
$sql .= "ORDER BY featured DESC, title ASC";bye, Dirk
9
9
Quote
Ryan B.
Anonymous
Is there a way to only do it on certain pages?
14
10
Quote
Status: offline
Euan
Forum User
Full Member
Registered: 04/22/02
Posts: 292
If you coded in Dirk's comment above, with some check for, say, topic, then hacked the topic editor to allow an extra field for sort order for that topic by date, alphabetically, etc. you could have different sorting for each topic. Would require a bit of knowledge of PHP and an extra field on one core table though.
Cheers,
Euan.
-- Heather Engineering
-- No job too small
Cheers,
Euan.
-- Heather Engineering
-- No job too small
10
12
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Text Formatted Code
// Topics can be assigned a sort number so that you can control what order they// appear in the 'Topics' block on the homepage. If you prefer you can also
// have this sort alphabetically by changing the value to 'alpha' (default is
// by 'sortnum'
$_CONF['sortmethod'] = 'sortnum'; // or 'alpha'
10
8
Quote
All times are EST. The time is now 11:31 pm.
- 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