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-19-2001 Last Update: Never Installs: 75
 
No support by the author.

Description:
This hack will allow you to set the display order of clickable smilies (if you use them).
It's good if you have a lot of smilies, and want the more commonly used to be shown in the box.

Demo:


Installation:
1. Run the following queries either in phpMyAdmin or thru Telnet: (one query at a time)
Code:
ALTER TABLE smilie ADD showid SMALLINT not null
ALTER TABLE smilie ADD INDEX (showid)
UPDATE smilie SET showid=smilieid
2. In functions.php (in your admin folder) replace
PHP Code:
$smilies $DB_site->query("SELECT title, smilietext, smiliepath FROM smilie"); 
with
PHP Code:
$smilies $DB_site->query("SELECT title, smilietext, smiliepath FROM smilie ORDER BY showid"); 
And also replace
PHP Code:
$smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie"); 
with
PHP Code:
$smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie ORDER BY showid"); 
3. In smilie.php (in your admin folder) replace
PHP Code:
$smilies=$DB_site->query("SELECT smilietext,smilieid,title,smiliepath FROM smilie ORDER BY title LIMIT ".($limitlower-1).",$perpage"); 
with
PHP Code:
$smilies=$DB_site->query("SELECT smilietext,smilieid,title,smiliepath,showid FROM smilie ORDER BY showid LIMIT ".($limitlower-1).",$perpage"); 
Below
PHP Code:
echo makelinkcode("remove","smilie.php?s=$session[sessionhash]&action=remove&smilieid=$smilie[smilieid]&perpage=$perpage&statrpage=$startpage"); 
add
PHP Code:
echo "<br>Order: <input type=text name=\"order[$smilie[smilieid]]\" size=5 value=\"$smilie[showid]\">"
Replace
PHP Code:
echo "</table></td></tr></table></form>"
with
PHP Code:
doformfooter("Update order"); 
Replace
PHP Code:
doformheader("smilie","modify"); 
with
PHP Code:
doformheader("smilie","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 smilie SET showid='$val' WHERE smilieid='$key'");

  }

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


Requested by:
JJR512

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
  #102  
Old 05-31-2002, 12:34 PM
Kat Kat is offline
 
Join Date: Nov 2001
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anybody had luck with this for version 2.2.6?

I'm getting this error:

You have an error in your SQL syntax near 'nullALTER TABLE smilie ADD INDEX (showid)' at line 1

Thanks for any help!
Reply With Quote
  #103  
Old 05-31-2002, 02:15 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to run each query separately, or separate them with ;.
Reply With Quote
  #104  
Old 05-31-2002, 03:08 PM
Kat Kat is offline
 
Join Date: Nov 2001
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Firefly! I did run them separately, but I think I must have had a timeout and just not noticed it... because it happened again... but third time was the charm and its working now!

I've installed your wonderful hack so many times, I think I got lazy and didnt pay close enough attention.
Reply With Quote
  #105  
Old 06-21-2002, 10:18 PM
Jeremy W. Jeremy W. is offline
 
Join Date: May 2002
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I attempted to install this, and it worked fine until I tried to update the order in the admin cp... I hit Update Order and it doesn't save the results (or display them perhaps).
Reply With Quote
  #106  
Old 06-21-2002, 10:22 PM
Jeremy W. Jeremy W. is offline
 
Join Date: May 2002
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, it does update the order, it simply does not show the order on the admin smilie page.
Reply With Quote
  #107  
Old 07-16-2002, 05:20 AM
Schorsch's Avatar
Schorsch Schorsch is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks, works great, easy install
Reply With Quote
  #108  
Old 07-22-2002, 08:26 PM
MarkyBuzz's Avatar
MarkyBuzz MarkyBuzz is offline
 
Join Date: Apr 2002
Location: Manchester UK
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanna add my thanks FireFly yoos the man

Worked like a charm on 2.2.6!

THANK YOOOOO!
Reply With Quote
  #109  
Old 08-30-2002, 05:49 PM
Barret Barret is offline
 
Join Date: Nov 2001
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great on 2.2.6 but..........
if you have quick reply, it will not work with the quick reply box even though you see the smilies.
Any way to fix that?
Reply With Quote
  #110  
Old 08-30-2002, 06:35 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Barret
Works great on 2.2.6 but..........
if you have quick reply, it will not work with the quick reply box even though you see the smilies.
Any way to fix that?

What do you mean it won't work with the QRB? I have 2.2.6, smilies in the QRB, and they show up ordered as they should.

Reply With Quote
  #111  
Old 08-30-2002, 06:49 PM
Barret Barret is offline
 
Join Date: Nov 2001
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
What do you mean it won't work with the QRB? I have 2.2.6, smilies in the QRB, and they show up ordered as they should.
They show up fine but when you click them in QRB they wont work..or havent yet
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 10:20 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.05174 seconds
  • Memory Usage 2,333KB
  • Queries Executed 25 (?)
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
  • (14)bbcode_php
  • (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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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