Welcome to Geeklog, Anonymous Saturday, January 04 2025 @ 04:27 am EST
Geeklog Forums
Have Directory show Alphabetized List
Status: offline
jlanda
Forum User
Junior
Registered: 04/11/07
Posts: 19
Hi all,
Is there any way to make the directory.php page show an alphabetized list of stories as well as the sorting by date and year? I tried fiddling but came up with absolutely nothing.
If not, is there a hack or plugin that alphabetizes stories?
Is there any way to make the directory.php page show an alphabetized list of stories as well as the sorting by date and year? I tried fiddling but came up with absolutely nothing.
If not, is there a hack or plugin that alphabetizes stories?
7
7
Quote
Status: offline
Ook
Forum User
Chatty
Registered: 07/26/06
Posts: 39
I took this hack,
http://sourceforge.net/project/showfiles.php?group_id=68255&package_id=67932
and I changed line 58 from
to
That gave me an alphabetical list in my public directory of articles with A on top.
There is also
http://www.geeklog.net/filemgmt/index.php?id=128
I named it siteindex.php and put it in my public_html directory.
There are date, topic and title columns. With some more php, one could probably make the sorting selectable with column headings acting as clickable selectors.
"A conclusion is the place where you got tired of thinking."--Steven Wright
http://sourceforge.net/project/showfiles.php?group_id=68255&package_id=67932
and I changed line 58 from
Text Formatted Code
$order = " ORDER BY sid DESC LIMIT $offset, $perpage";to
Text Formatted Code
$order = " ORDER BY sid ASC LIMIT $offset, $perpage";That gave me an alphabetical list in my public directory of articles with A on top.
There is also
http://www.geeklog.net/filemgmt/index.php?id=128
I named it siteindex.php and put it in my public_html directory.
There are date, topic and title columns. With some more php, one could probably make the sorting selectable with column headings acting as clickable selectors.
"A conclusion is the place where you got tired of thinking."--Steven Wright
8
8
Quote
Status: offline
jlanda
Forum User
Junior
Registered: 04/11/07
Posts: 19
In case anyone else needs to figure out how I got this going, here's the script changes (I did take out topic ID because I didn't like how it was showing up, but I'm sure you can figure out how to put that back in if you really want it.) This basically sorts the stories in alphabetical order, showing the story title first, then the date, then hits. This corresponds to the Siteindex addin, and I changed the storyindex.php file.
$order = " ORDER BY title ASC LIMIT $offset, $perpage";
$recs = DB_query($sql . $order);
$nrows = DB_numRows($recs);
$display .= '<table width="100%"><tr><td><b>Title</b></td><td><b>Date</b></td><td><b>Views</b></td></tr>';
for ($x = 0; $x < $nrows; $x++) {
$A = DB_fetchArray($recs);
$display .= '<tr><td>';
$display .= '<a href="' . $_CONF['site_url'] . '/article.php?story=' . $A['sid'] . '">'
. stripslashes($A['title']) . '</a>';
$display .= '</td>' . '<td>' . $A['date'] . '</td>';
$display .= '<td>' . $A['hits'] . '</td></tr>';
Text Formatted Code
$order = " ORDER BY title ASC LIMIT $offset, $perpage";
$recs = DB_query($sql . $order);
$nrows = DB_numRows($recs);
$display .= '<table width="100%"><tr><td><b>Title</b></td><td><b>Date</b></td><td><b>Views</b></td></tr>';
for ($x = 0; $x < $nrows; $x++) {
$A = DB_fetchArray($recs);
$display .= '<tr><td>';
$display .= '<a href="' . $_CONF['site_url'] . '/article.php?story=' . $A['sid'] . '">'
. stripslashes($A['title']) . '</a>';
$display .= '</td>' . '<td>' . $A['date'] . '</td>';
$display .= '<td>' . $A['hits'] . '</td></tr>';
8
8
Quote
All times are EST. The time is now 04:27 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