vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Message (Posting) Icons for admins and mods only (https://vborg.vbsupport.ru/showthread.php?t=39252)

amykhar 05-30-2002 09:01 PM

Message (Posting) Icons for admins and mods only
 
I have a small flame icon that I would like to use to indicate that a thread has gotten a bit heated. I don't want normal members to be able to use it, just admins or mods.

Therefore, I need a hack that will allow me to set up one or more message icons for staff use only.

Amy

amykhar 05-31-2002 01:53 PM

Never mind, I got it. Easy stuff.

1. I added a new field to the icon table called modonly. If it is a restricted icon, I set that to 1.

2. I copied the chooseicons function in functions.php and used it to create a new function called chooseicons2

3. I changed the query in the chooseicons2 function so that it does not show icons marked modonly.

4. I changed the call to the chooseicons function in newthread, newreply, and editpost to call chooseicons2 instead of the original. I did it this way because nobody is allowed to intentionally create a post they know is a flame.

5. The postings.php call (the one that handles the thread edit) remains the same. Therefore, ALL icons show up there, even the modonly ones. Because only mods and admins can edit the thread on my board, this effectively restricts that icon to my mods and admins.

Amy

Xenon 05-31-2002 07:06 PM

good idea mate, think i'll do so too :)


All times are GMT. The time now is 07:03 PM.

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.01099 seconds
  • Memory Usage 1,706KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete