Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Reorganize Subscribed Forums by Numerical Order Instead Of Alphabetical Order Details »»
Reorganize Subscribed Forums by Numerical Order Instead Of Alphabetical Order
Version: , by larryd larryd is offline
Developer Last Online: Jun 2011 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-26-2002 Last Update: Never Installs: 0
 
No support by the author.

Ive been toying around tonight with creating a new page called favorites.php that will allow me to display just the forums that Ive maked as the ones I want to suscribe to with a little bit of other basic information. Basically I reworked the usercp page, the only problem Im running into is that the forums are showing up in alphabetical format and thats not what i want, I want them to show up in the order they are displayed on the index.php file.. What do I have to change to do this? Here is the code for it

Code:
// ############################### start subscribed forums ###############################
$forums=$DB_site->query("SELECT * FROM forum,subscribeforum WHERE subscribeforum.forumid=forum.forumid AND userid=$bbuserinfo[userid] ORDER BY title");
$totalforums=$DB_site->num_rows($forums);

$forumbits = '';
if ($totalforums>0) {
  while ($forum=$DB_site->fetch_array($forums)) {

    $forumperms=getpermissions($forum[forumid]);
    if (!$hideprivateforums) {
      $forumperms[canview]=1;
    }
    if ($forumperms[canview]) {
      $forumshown=1;

      // do light bulb
      if ($bbuserinfo[lastvisitdate]=="Never") {
        $forum[onoff]="on";
      } else {
        if (isset($bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
          $userlastvisit=$bbforumview[$forum['forumid']];
        } else {
          $userlastvisit=$bbuserinfo['lastvisit'];
        }
        if ($userlastvisit<$forum['lastpost']) {
          $forum[onoff]="on";
        } else {
          $forum[onoff]="off";
        }
      }

      if ((!$forumperms['canpostnew'] and $showlocks) or $forum['allowposting']==0) {
        $forum[onoff].="lock";
      }

      // prepare template vars
      if (!$showforumdescription) {
        $forum[description]="";
      }

      // dates
      if ($forum[lastpost]>0) {
        $forum[lastpostdate]=vbdate($dateformat,$forum[lastpost]);
        $forum[lastposttime]=vbdate($timeformat,$forum[lastpost]);
        eval("\$forum[lastpostinfo] = \"".gettemplate("forumhome_lastpostby")."\";");
      } else {
        $forum[lastpostinfo]="Never";
      }

      eval("\$forumbits .= \"".gettemplate("favorites_forumbit")."\";");

    } // if can view
  } // while forums

  eval("\$forumlist = \"".gettemplate("usercp_forums")."\";");

} else {
  eval("\$forumlist = \"".gettemplate("usercp_noforums")."\";");
}
if you want to see exactly what im talking about the page is located here

http://www.newcelica.org/forums/favorites.php?s=

Im still gonna change a few other things but the biggest thing I want to change is the display order of the forums from alphabetical to numercial.. thanks in advance guys..

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-26-2002, 10:51 AM
larryd larryd is offline
 
Join Date: Nov 2001
Location: Newark, DE
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

but it works if yers is setup like mine is.. which the #s just get higher as you go down the list starting at 100
Reply With Quote
  #13  
Old 05-26-2002, 11:50 AM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly

Because displayorders gets reset under each category.

See the screenshot if you don't understand.
Agreed, but doesn't it look at the parentid first?
Reply With Quote
  #14  
Old 05-26-2002, 11:55 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It does on index.php, but it doesn't work that way in usercp.php -- which is why I said it would be more complicated.
Reply With Quote
  #15  
Old 05-26-2002, 11:57 AM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly
It does on index.php, but it doesn't work that way in usercp.php -- which is why I said it would be more complicated.
I just noticed that after I posted....
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04127 seconds
  • Memory Usage 2,266KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete