Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums How To Sorting news
1 2
Chris
Posted on 17 Jun 2010, 20:30:44

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Not without writing custom code to show the comments manually.
#2518
Rayc
Posted on 23 Jun 2010, 23:25:07

Access: Member
Total Posts: 74
Joined: 2010-06-13

Is it possible to have links to optionally sort by rating or views, like you can with categories?

I've implemented the category links as described here.
So I also tried to do the same thing with the $orderby variable by creating links like so:

Code:
<p>Sort by
<a href="../html/n-13_news.php?orderby=rating">rating</a>
or
<a href="../html/n-13_news.php?orderby=views">views</a></p>

And then embedded the script like so:

Code:
<?php
$orderby[]=$_GET['orderby'];
$cat[]=$_GET['cat'];
include '../../n13news/index.php';
?>

Should this work? Or am I :blink: ?

Thanks,

-RayC

(P.S. This is not a request for a code change -- just want to see what this baby can do. :smile: )
#2540
Chris
Posted on 25 Jun 2010, 16:59:34

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

This could work, if you wanted to let users change the sort order and select a category your links would need to be altered slightly like so

Code:
<p>Sort by
<a href="../html/n-13_news.php?orderby=rating&cat=cat1">rating</a>
or
<a href="../html/n-13_news.php?orderby=views&cat=cat2">views</a></p>
#2549
Rayc
Posted on 25 Jun 2010, 21:01:06

Access: Member
Total Posts: 74
Joined: 2010-06-13

Sweet! I'll give that a try.

Now back to work on 3.7! :razz:

(I've got some :flowers: and a couple of these for you when it's done. :wink: )

-RayC
#2551
1 2
Network-13.com © 2013