Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
jlajax
Ardent RavenCMS Supporter



Joined: Oct 12, 2006
Posts: 244
Location: Jacksonville, Florida

PostPosted: Tue Nov 24, 2009 6:34 am Reply with quote

I know this has been addressed but I'll be hanged if I can find it.

My categories in Content Plus RN 2.4 will not alphabetize in the user display section. In admin they are alphabetized however nothing I have attempted brings the user's categories display up alphabetically. What am I doing wrong or not doing?

RavensScripts
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Tue Nov 24, 2009 6:49 am Reply with quote

I assume you have looked at the SQL statement that pulls the category list to see if it has something like sort ASC
 
View user's profile Send private message Send e-mail
jlajax







PostPosted: Tue Nov 24, 2009 7:38 am Reply with quote

If you mean in Modules > Content > index.php I have looked for the ordering info and what I found was


Quote:

define('IN_CPM', true);
require_once('modules/'.$module_name.'/var/cpfunc.php');

if (isset($_GET['pa'])) {$pa = $_GET['pa'];} else {$pa = '';}
if (isset($_GET['cid'])) {$cid = $_GET['cid'];} else {$cid = '';}
if (isset($_GET['pid'])) {$pid = $_GET['pid'];} else {$pid = '';}
if (isset($_GET['tag'])) {$tag = $_GET['tag'];} else {$tag = '';}
if (isset($_GET['tags'])) {$tags = $_GET['tags'];} else {$tags = '';}
if (isset($_GET['order'])) {$order = $_GET['order'];} else {$order = '3';} // Edited by me


and

Quote:

function list_pages_categories($cid, $ofsbgn, $ofsppg, $order) {
global $prefix, $db, $sitename, $slogan, $admin, $multilingual, $module_name, $admin_file, $datetime, $bgcolor1, $bgcolor4, $page;
include('header.php');
cpheader();
OpenTable();
$cid = intval($cid);
featured_content($cid);
echo '<center>'._CP_LISTOFCONTENT.'<br />'.PHP_EOL;
echo '<b>'.$sitename.'</b></center><br /><br />'.PHP_EOL;
for($i=0; $i<=6; $i++) { $selected[$i]='3'; } // Changed to 3 by me
if(!empty($order)) {
if($order=='1') {$orderby='date DESC'; $selected[1]='selected="selected"';}
if($order=='2') {$orderby='date ASC'; $selected[2]='selected="selected"';}
if($order=='3') {$orderby='title ASC'; $selected[3]='selected="selected"';}
if($order=='4') {$orderby='title DESC'; $selected[4]='selected="selected"';}
if($order=='5') {$orderby='counter DESC'; $selected[5]='selected="selected"';}
if($order=='6') {$orderby='counter ASC'; $selected[6]='selected="selected"';}
} else { $orderby='title ASC'; }


Here is where I got 3 from I don't see any place else to make a selection unless I am missing it which is entirely possible.

RavensScripts
 
Guardian2003







PostPosted: Tue Nov 24, 2009 7:47 am Reply with quote

At the top of the function I would echo out $order to make sure it is getting passed into the function. It would also be worth turing on DB logging in rnconfig to make sure the SQL is what you expect.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©