vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Did the column sorting function change in 3.5? (https://vborg.vbsupport.ru/showthread.php?t=98114)

Oreamnos 10-11-2005 06:54 AM

Did the column sorting function change in 3.5?
 
My column sorting arrows used to appear with 307 but now after i click the default sorted column arrow, no more arrows appear, therefore now i can only sort DESC but not ASC.

here is my code:
PHP Code:

// ########################################################
// handle sorting
// ########################################################
$vbulletin->input->clean_array_gpc('r', array(
 
'sortfield'   => TYPE_STR,
 
'sortorder' => TYPE_STR,
 
'sort'  => TYPE_STR,
));


// look at sorting options:
if ($vbulletin->GPC['sortorder'] != 'asc')
{
    
$sqlsortorder 'DESC';
    
$order = array('desc' => HTML_SELECTED);
}
else
{
    
$sqlsortorder '';
    
$order = array('asc' => HTML_SELECTED);
}


switch (
$vbulletin->GPC['sortfield'])
{
    case 
'bar_name':
        
$sqlsortfield 'bar_name';
        break;
    case 
'bar_update_time':
        
$sqlsortfield 'bar_update_time';
        break;
    case 
'bar_viewcount':
        
$sqlsortfield 'bar_viewcount';
        break;
    default:
        
$sqlsortfield 'bar_update_time';
        
$sortfield 'bar_update_time';
}
$sort = array($sortfield => HTML_SELECTED);
$oppositesort iif($sortorder == 'asc''desc''asc');

$sorturl "/cities.php?p=" $vbulletin->GPC['p'];
eval(
'$sortarrow[' $sortfield '] = "' fetch_template('forumdisplay_sortarrow') . '";'); 

Template:
Code:

              <td align="left" class="thead">
                    <span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=bar_name">Bar Name</a> $sortarrow[bar_name]</span>/Description
                </td>
                <td align="center" class="thead">
                    <span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=bar_update_time">Updated</a> $sortarrow[bar_update_time]</span>
                </td>
                <td align="left" class="thead">
                    <span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=bar_viewcount">$vbphrase[views]</a> $sortarrow[bar_viewcount]</span>
                </td>

do i need to change something for 3.5?

thanks
eric

Oreamnos 10-12-2005 08:48 AM

:bump: :)


All times are GMT. The time now is 04:44 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01125 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete