Welcome to Geeklog, Anonymous Friday, November 22 2024 @ 09:21 pm EST
Geeklog Forums
is there anyway to sort stories alpahbetically within their topic?
Timmy
Anonymous
hey everyone,
is there anyway to sort stories alpahbetically within their topic?
thanks
-Tim
is there anyway to sort stories alpahbetically within their topic?
thanks
-Tim
15
11
Quote
Status: offline
Turias
Forum User
Full Member
Registered: 10/20/03
Posts: 807
Not sure if this is what you want, but to sort all of your stories by name on the frontpage as well as in the topics, in your index.php file change
to
If you want it to behave differently for frontpage and topics, it should be a simple
check, making the final code:
$sql .= "ORDER BY featured DESC, title ASC";
}
else {
$sql .= "ORDER BY featured DESC, date DESC";
}
Text Formatted Code
$sql .= "ORDER BY featured DESC, date DESC";to
Text Formatted Code
$sql .= "ORDER BY featured DESC, title ASC";If you want it to behave differently for frontpage and topics, it should be a simple
Text Formatted Code
if (!empty($topic)) {check, making the final code:
Text Formatted Code
if (!empty($topic)) {$sql .= "ORDER BY featured DESC, title ASC";
}
else {
$sql .= "ORDER BY featured DESC, date DESC";
}
10
11
Quote
timmy
Anonymous
I want the latter...
so I replace
"if (!empty($topic)) {"
with
"if (!empty($topic)) {
$sql .= "ORDER BY featured DESC, title ASC";
}
else {
$sql .= "ORDER BY featured DESC, date DESC";
}"
yeah?
thanks for your help!
so I replace
"if (!empty($topic)) {"
with
"if (!empty($topic)) {
$sql .= "ORDER BY featured DESC, title ASC";
}
else {
$sql .= "ORDER BY featured DESC, date DESC";
}"
yeah?
thanks for your help!
9
9
Quote
Timmy
Anonymous
ah ha, the reason I asked is because it didn't quite look right, thanks so much!
xx
xx
10
9
Quote
All times are EST. The time is now 09:21 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