vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Change the display order of message icons (https://vborg.vbsupport.ru/showthread.php?t=25996)

Admin 08-20-2001 10:00 PM

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

Demo:
http://forum.t-cove.com/order2.gif

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! :D

Hoffi 08-21-2001 08:29 AM

I think you were too fast with cut'n paste. :cool:

in step three you say to change smilie.php and the variables and tables are also smilie.

Admin 08-21-2001 08:41 AM

Thanks man. :)

YourHostSucks 09-29-2001 12:30 AM

Nice feature, Now i just have to find one for what smilies show up on the front page.. :)

Thanks!

Alien 09-30-2001 02:07 PM

Excellent job!

:D

Balbanes 09-30-2001 02:37 PM

Nice hack Firefly!!

By any chance are you the same firefly from FFshrine BB?? If so then im Bal the FFT mod there. hehe

Admin 09-30-2001 02:40 PM

Glad you guys like this. :)

Balbanes:
Nope, sorry. :D

YourHostSucks 09-30-2001 02:56 PM

Its nice, but we need one to do this with smilies also... :D

Or atleast control the 15-20 that show up on the front page.

But this one works perfect, nice Job.. :)

Admin 09-30-2001 03:02 PM

This hack was actually requested by someone that saw my first hack, this one:
http://www.vbulletin.com/forum/showt...threadid=25888

YourHostSucks 09-30-2001 03:19 PM

Great! Thanks ;)

You seem to half alot of nice hacks, keep it up!

:D


All times are GMT. The time now is 08:40 AM.

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.01201 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (12)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete