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
  #172  
Old 10-08-2003, 07:47 PM
futureal futureal is offline
 
Join Date: Feb 2002
Location: Del Mar, CA, USA
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just re-did this hack as I upgraded to 2.3.2 and it is working fine.

Attached is my version of it, which really only has a couple minor changes. If anybody wants to try it, go for it, and let me know if it works for you.
Reply With Quote
  #173  
Old 10-09-2003, 11:01 AM
Rabbitoh Warren's Avatar
Rabbitoh Warren Rabbitoh Warren is offline
 
Join Date: Sep 2003
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Futureal, thanks for providing the attachment. It appears my install went fine this time but when I try to update the order of the smilies it doesn't seem to work. Any ideas?
Reply With Quote
  #174  
Old 10-09-2003, 08:21 PM
futureal futureal is offline
 
Join Date: Feb 2002
Location: Del Mar, CA, USA
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does it give you any sort of an error message or anything?

I just double-checked on mine and it works, using those same instructions. Try replacing your admin/smilie.php with a 100% fresh copy and make those same changes. Pay close attention to which lines are getting modified; there are a number of similar lines in there for the different actions.
Reply With Quote
  #175  
Old 10-10-2003, 10:32 AM
Rabbitoh Warren's Avatar
Rabbitoh Warren Rabbitoh Warren is offline
 
Join Date: Sep 2003
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by futureal
Does it give you any sort of an error message or anything?
Nah, after re-numbering all the smilies I click on the 'update' button but it doesn't appear to have any effect. It just refreshes the page and returns the same smilie order as when I started. In other words no changes are saved. But thanks for your help anyway futureal. With 100+ smilies now I'd like to keep them organised so I'll do what you suggest and try it again and see how it goes. Any chance you could send me your copy of the smilies.php as a fallback?
Reply With Quote
  #176  
Old 10-10-2003, 03:13 PM
futureal futureal is offline
 
Join Date: Feb 2002
Location: Del Mar, CA, USA
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Technically we're not allowed to send out vB source files, modified or otherwise. The only modifications I've made to it, though, are those I detailed in the text file. So once those are made, your file should be identical to mine.

It sounds like a step is being missed somewhere, so that when you click the update button, no query is being performed. Just a guess, though.
Reply With Quote
  #177  
Old 10-15-2003, 03:29 AM
dieselicious dieselicious is offline
 
Join Date: Sep 2003
Location: Washington, DC
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Futureal, thanks for posting the update to get this working in 2.32. I had installed the previous version and was able to update the order by manually changing the orderid in the database, but had not been able to get the interface to work in the Admin panel. I hadn't had a chance to look at it myself, and since I don't really need to reorganize the smilies very often, didn't feel very inclined to put much more effort into it since I'd already ordered them to my liking in my database. Then I just happened to buzz by here and saw that you'd redone it, so I tried again. Thank you so much!
Reply With Quote
  #178  
Old 01-14-2004, 08:25 AM
carryapple carryapple is offline
 
Join Date: Jan 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Guys,

I just installed the hack, but I'm getting a Parse error and can't seem to figure out what's wrong here.

Parse error: parse error in /home/mo001vma/www/home/admin/smilie.php on line 417

----

// ###################### Start do order #####################
if ($HTTP_POST_VARS['action']=="doorder") {

++while (list($key,$val)=each($order)) { // - this is line 417

++++$DB_site->query("UPDATE smilie SET showid='$val' WHERE smilieid='$key'");

++}

Thanks!
Reply With Quote
  #179  
Old 01-28-2004, 02:33 AM
lmongello lmongello is offline
 
Join Date: Jan 2004
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed the hack and noithing happened, although it said it was successful. I checked my smilies CP and it looks the same.

What did I do wrong?

Thanks!!!

-L
Reply With Quote
  #180  
Old 02-15-2004, 02:12 PM
atrkyhntr atrkyhntr is offline
 
Join Date: Jul 2003
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All worked well till I added more smiles thus a click for more link appears and when clicked an error page not found pops up... Its marked php but I run php3 where can I change the java script to read php3 instead of php?
THANKS in advance
Reply With Quote
  #181  
Old 03-13-2004, 06:47 PM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi everyone....

Is this smiley display hack working for version 2.3.4??

Are there other similar hacks out there that definitely will work with 2.3.4?

Thanks for the feedback,

Khashyar
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:53 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.05429 seconds
  • Memory Usage 2,332KB
  • 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
  • (1)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
  • (2)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_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