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
  #142  
Old 03-14-2003, 08:06 PM
Host Directory Host Directory is offline
 
Join Date: Feb 2003
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The reason i am concerned about this hack is because it is a prequisit to another hack called the smilie panel - https://vborg.vbsupport.ru/showthrea...236#post361236

I really like the smilie panel hack and it was hard to set up so i dont want to loose it when i install.

Can anyone confirm this hack working in 2.30?
Reply With Quote
  #143  
Old 03-22-2003, 10:27 AM
Stud_Muffin Stud_Muffin is offline
 
Join Date: Sep 2002
Location: UK
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed it in vb 2.3.0 and I can update the order in 'Smilies' 'Modify' and the display does reflect this in the admin CP.
The the 'Smilies' window shows the correct order but the 'get more smiles' window do not reflect this order.
Reply With Quote
  #144  
Old 04-11-2003, 07:11 PM
Mikado247 Mikado247 is offline
 
Join Date: Apr 2003
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is an error in the code.

It's the reason of Parse error. look this :

Change :

PHP Code:
 while (list($key,$val)=$order)) { 
For :

PHP Code:
 while (list($key,$val)=$order) { 
and it's work !

(tested on vbulletin v2.3.0)
Reply With Quote
  #145  
Old 04-11-2003, 09:12 PM
Mikado247 Mikado247 is offline
 
Join Date: Apr 2003
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, the code who work is :

PHP Code:
while (list($key$val) = each($order))
{
  
$DB_site->query("UPDATE smilie SET showid='$val' WHERE smilieid='$key'");

It's work on vbulletin 2.3.0
Reply With Quote
  #146  
Old 04-11-2003, 09:14 PM
Mikado247 Mikado247 is offline
 
Join Date: Apr 2003
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are a litle bug ...

Code:
while (list($key, $val) = each($order))
Reply With Quote
  #147  
Old 04-15-2003, 05:12 PM
AdultInsider AdultInsider is offline
 
Join Date: Apr 2003
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What mikado is saying is that the following might need to be done to make it work in 2.3. This is what I did:

Change

PHP Code:
while (list($key,$val)= $order
to
while (list($key,$val)= each($order))
Reply With Quote
  #148  
Old 05-17-2003, 12:26 AM
jibious's Avatar
jibious jibious is offline
 
Join Date: Nov 2002
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

question. my smilies are listed in order, starting at 176 (through 357). just wondering if there is a query anyone knows that i could run to just change their order, starting at 1? so basically just re-order them 1-179 rather than 176-357 (keeping the same order they are in now though...

otto
Reply With Quote
  #149  
Old 05-17-2003, 07:27 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FireFly, could you make it just in one .txt file for easier download?
And I wanted to ask you - how does the table building array function in HiveMail 1.2 differs from vBulletin 2.30 - can they be integrated in one way or are they just too different?
Reply With Quote
  #150  
Old 05-23-2003, 03:10 PM
Anjie Anjie is offline
 
Join Date: Jan 2003
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed on 2.3.0 and works wonderfully! Thank you Firefly!!
Reply With Quote
  #151  
Old 05-26-2003, 09:11 AM
gthell gthell is offline
 
Join Date: Apr 2003
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im running 2.30 and this is what i get. I checked 4+ times too.

PHP Code:
Parse errorparse errorunexpected '{' in /home/valider/public_html/forum/admin/smilie.php on line 269 
the code in smilie.php:
PHP Code:
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";

i tried everything that was posted b4 me and still get that error....please help
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 09:48 PM.


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.04866 seconds
  • Memory Usage 2,348KB
  • 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
  • (2)bbcode_code
  • (20)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
  • (4)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