Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-20-2001 Last Update: Never Installs: 15
 
No support by the author.

Description:
This hack will allow you to set the display order of message icons.
Similar to my other hack, ordering of smilies.

Demo:


Installation:
1. Run the following queries either in phpMyAdmin or thru Telnet: (one query at a time)
Code:
ALTER TABLE icon ADD showid SMALLINT not null
ALTER TABLE icon ADD INDEX (showid)
UPDATE icon SET showid=iconid
2. In functions.php (in your admin folder) replace
PHP Code:
$icons=$DB_site->query("SELECT iconid,iconpath,title FROM icon ORDER BY iconid"); 
with
PHP Code:
$icons=$DB_site->query("SELECT iconid,iconpath,title FROM icon ORDER BY showid"); 
3. In icon.php (in your admin folder) replace
PHP Code:
$icons=$DB_site->query("SELECT iconid,title,iconpath FROM icon ORDER BY title LIMIT ".($limitlower-1).",$perpage"); 
with
PHP Code:
$icons=$DB_site->query("SELECT iconid,title,iconpath FROM icon ORDER BY showid LIMIT ".($limitlower-1).",$perpage"); 
Below
PHP Code:
makelinkcode("remove","icon.php?s=$session[sessionhash]&action=remove&iconid=$icon[iconid]&perpage=$perpage&statrpage=$startpage"); 
add
PHP Code:
echo "<br>Order: <input type=text name=\"order[$icon[iconid]]\" size=5 value=\"$icon[showid]\">"
Replace
PHP Code:
echo "</table></td></tr></table></form>"
with
PHP Code:
doformfooter("Update order"); 
Replace
PHP Code:
doformheader("icon","modify"); 
with
PHP Code:
doformheader("icon","doorder"); 
Above
PHP Code:
// ###################### Start Modify ####################### 
add
PHP Code:
// ###################### Start do order #####################
if ($HTTP_POST_VARS['action']=="doorder") {

  while (list(
$key,$val)=each($order)) {

    
$DB_site->query("UPDATE icon SET showid='$val' WHERE iconid='$key'");

  }

  echo 
"<p>Order updated!</p>";
  
$action="modify";


Requested by:
theflow

That's it. Feedback, requests and anything else is more than welcome.
Good luck!

Show Your Support

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

Comments
  #12  
Old 01-25-2002, 10:06 PM
Lucky Lucky is offline
 
Join Date: Dec 2001
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this work in 2.2.1 just like your smilie hack?
Reply With Quote
  #13  
Old 12-04-2002, 02:50 PM
Icheb's Avatar
Icheb Icheb is offline
 
Join Date: Oct 2002
Location: Germany
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
$icons=$DB_site->query("SELECT iconid,title,iconpath FROM icon ORDER BY showid LIMIT ".($limitlower-1).",$perpage"); 
Only one minor addition to the code above: You also have to query the showid from the icon table, otherwise the ids will not be displayed in the Admin CP and you have to enter all of them every time you want to change the order.
Reply With Quote
  #14  
Old 12-11-2002, 01:10 PM
Xer Xer is offline
 
Join Date: May 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry.. it is not working on 2.2.9.
when i click "update order" no any change ..and remove all my order.

*.i am running the smile one.. it is fully Working.
Reply With Quote
  #15  
Old 12-11-2002, 01:52 PM
Icheb's Avatar
Icheb Icheb is offline
 
Join Date: Oct 2002
Location: Germany
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As I said, change the following code in your icon.php

PHP Code:
$icons=$DB_site->query("SELECT iconid,title,iconpath FROM icon ORDER BY showid LIMIT ".($limitlower-1).",$perpage"); 
to this:

PHP Code:
$icons=$DB_site->query("SELECT iconid,title,iconpath,showid FROM icon ORDER BY showid LIMIT ".($limitlower-1).",$perpage"); 
It has to query the showid from the table, otherwise it can't use it.

Icheb
Reply With Quote
  #16  
Old 12-11-2002, 02:42 PM
Xer Xer is offline
 
Join Date: May 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thx Icheb!!! it is working now!!!
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 05:53 PM.


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.04511 seconds
  • Memory Usage 2,280KB
  • Queries Executed 20 (?)
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
  • (15)bbcode_php
  • (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
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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_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