Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #162  
Old 07-17-2003, 03:19 AM
DeeperImage DeeperImage is offline
 
Join Date: Nov 2001
Location: Kennesaw, GA
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 12:11 AM JonUrban said this in Post #160
Sure! Bear in mind that I am a TOTAL ROOKIE at this, I have a slight amount of experience with Microsoft SQL, but I have never used any web based stuff at all.

I applied the hack using the second option and got the success message.

Then, I used phpMyAdmin (which is software provided by my web hosting company), selected 'database', then the 'forum' database. I was then presented with a list of tables in the database. I selected the "smilie" table, browsed it, and edited the following 2 fields until they were in the order I needed. "Smilieid" and "showid".

I renumbered the ones that I wanted to move (i.e. 12,13,14,15) to numbers out of my range, them renumbered the ones I wanted to make 12,13,14,15, and finally renumbered the temporary numbered ones back to the former numbers of the ones I moved.

This may be a round about, convaluted way to do this, but it worked!!

:-jon
I totally suck at this too so i will give this a shot..Because it aint working for me otherwise
Reply With Quote
  #163  
Old 07-17-2003, 08:01 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 02:43 AM JonUrban said this in Post #158
It worked. I just did not realize that I had to go into MySQL and modify the tables. I thought there might be a way to do it in the vBulliten Control Panel.

Anyway, I did it through MySQL, moved the ID numbers around, and all is well. Thanks to all for the help and the hack!

:-jon
In other words, the hack didn't work for you.. You had to go in to the database manually and play around with the order there.. The hack should automatically change the order via the Smilie CP.
Reply With Quote
  #164  
Old 07-17-2003, 03:42 PM
DeeperImage DeeperImage is offline
 
Join Date: Nov 2001
Location: Kennesaw, GA
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 05:01 AM Oblivion Knight said this in Post #162
In other words, the hack didn't work for you.. You had to go in to the database manually and play around with the order there.. The hack should automatically change the order via the Smilie CP.

I guesss it didnt work for me either. I installed it just like the directions said, i got no errors at all and everything went smooth. But when i try to change the order it does not work .
Reply With Quote
  #165  
Old 07-17-2003, 06:43 PM
Host Directory Host Directory is offline
 
Join Date: Feb 2003
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well i never had any problems installing this hack in 2.2.9.. when i upgraded to 2.3.0 ( after reinstalling the prequisit hacks and then reinstalling the smilie hack ) everything stayed in place.
My order of smilies was fine so i did not need to change them, although i have not yet tryed adding any more smilies.

Its a nice hack but its long winded to add all the smilies manually... still love it.
Reply With Quote
  #166  
Old 07-29-2003, 09:45 PM
mcyates mcyates is offline
 
Join Date: Jan 2003
Location: Middlesbrough, Cleveland
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im on vb 2.3.0.

How exactly does this thing work. For example just say i have 20 smilies on my page (the newthread page) and number 3 smilie gets used more than any other smilie, will #3 smilie automatically move to the no. 1 position?
Reply With Quote
  #167  
Old 07-29-2003, 09:47 PM
Illuvatar's Avatar
Illuvatar Illuvatar is offline
 
Join Date: Apr 2002
Location: So. Cal
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Errrrm...no....

All this does is allow you to place the smilies in the order that you want them to show up either in the little smilie window or in the popup 'get more' window.
Reply With Quote
  #168  
Old 08-03-2003, 11:33 AM
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
Location: Ventura, California
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've got a question. What would make a chunk of the function.php file to simply disappear?

I have 2.3.0, and I modified the necessary files, ran the queries, uploaded the files, and couldn't get into the site. I had the exact same problem as the gentleman 2nd from the top on page 10. Unfortunately, no one ever answered him, so I decided to try for myself. I reinstalled my functions backup, uploaded and ran the installer, and option one worked. I then had numbers under the smilies in the control panel, but they wouldn't take.

So I went into the function file and added the part about ordering the smilies by the showid in the two places required, saved it, and got an error message telling me something about line 909.

I deleted the function file, and copied the backup over again, and it was like before; numbers under the smilies, but they wouldn't stick. I then modified the function file again, and got the error message. I did this routine one more time with the same results.

Finally, I selected Show File instead of edit, and I noticed that the code from line 909 through 942, or part of line 942, was missing.

I tried another fresh copy of the function file, and i was able to access my site with no error messages. I clicked on Edit for the function file, and then Save, without touching a single thing. Back came the error messages, and sure enough, lines 909 through half of 942 were missing.

How is this happening, and how can I modify the file without it happening?

Any help would be appreciated.

Take care,
~Chris
Reply With Quote
  #169  
Old 08-23-2003, 10:07 PM
Hellraider's Avatar
Hellraider Hellraider is offline
 
Join Date: Jul 2003
Location: @ home
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@FireFly: Can you please post a single .txt or .zip of this hack that can be run on vB 2.3.x (espacially for 2.3.2 that I'm running ) cause it seems that this hack (first .zip and .txt) will not run on vB >= 2.3.x
Reply With Quote
  #170  
Old 09-20-2003, 06:15 PM
Hellraider's Avatar
Hellraider Hellraider is offline
 
Join Date: Jul 2003
Location: @ home
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've done this other way round
Reply With Quote
  #171  
Old 10-03-2003, 11:45 AM
Rabbitoh Warren's Avatar
Rabbitoh Warren Rabbitoh Warren is offline
 
Join Date: Sep 2003
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone got this hack to work on vB 2.3.2? I keep getting parse errors on line 268 of the smilie.php file.

Line 268:
while(list($key,$val)=each($order)) {
Reply With Quote
Reply

Thread Tools

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 03:28 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.04657 seconds
  • Memory Usage 2,339KB
  • Queries Executed 27 (?)
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
  • (3)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
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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_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