vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Smilie Category Hack (https://vborg.vbsupport.ru/showthread.php?t=65394)

paul41598 07-09-2005 06:49 PM

is there anyway to have like a category called "staff smilies", that only admins/mods can access? Any hopes?!!

Pseudomizer 07-09-2005 10:35 PM

Quote:

Originally Posted by paul41598
is there anyway to have like a category called "staff smilies", that only admins/mods can access? Any hopes?!!

Sure. Just implement for admins something like:

PHP Code:


if ( $bbuserinfo[usergrouid] == "6" )
{
       echo 
"<option bla bla>My Category</option>">


But be aware that other people will be able to use the same smilies as soon as they copy the code from the originals postings. So for me this does not make sense at all. But the solution is above.

Cheers,

paul41598 07-09-2005 11:31 PM

Quote:

Originally Posted by Pseudomizer
Sure. Just implement for admins something like:

PHP Code:


if ( $bbuserinfo[usergrouid] == "6" )
{
       echo 
"<option bla bla>My Category</option>">


But be aware that other people will be able to use the same smilies as soon as they copy the code from the originals postings. So for me this does not make sense at all. But the solution is above.

Cheers,

where do I put that? In a template or in misc.php? Where exactly? Sorry for stupidity.

Love the hack m8, thanks again! :)

Pseudomizer 07-10-2005 03:57 AM

Quote:

Originally Posted by paul41598
where do I put that? In a template or in misc.php? Where exactly? Sorry for stupidity.

Love the hack m8, thanks again! :)

Look for this code in the install.html file:

PHP Code:

foreach ($new_categories AS $input)
    {
        
$add_select .= "<option value=\"".$input."\">$input";
    } 

It should look like this:

PHP Code:

foreach ($new_categories AS $input)
    {
                           if ( 
$input == "yourcategoryname" 
                          {
                                if ( 
$bbuserinfo[usergrouid] == "6" )
                                { 
                                
$add_select .= "<option value=\"".$input."\">$input";
                                }
                                else
                                {
                                 
// do nothing
                                
}
                           }
                           else
                           {
        
$add_select .= "<option value=\"".$input."\">$input";
                           }
    } 

And if you want to add more categories then replace this line:

PHP Code:

                           if ( $input == "yourcategoryname" 

with this:

PHP Code:

                           if ( $input == "yourcategoryname" || $input == "secondcategory" 

Cheers,

paul41598 07-10-2005 06:00 AM

worked perfect, thanks alot man! :D

paul41598 07-11-2005 01:14 PM

small problem/bug:

if you goto the FAQ section of the forums, you can see all the smilies. How can I block access there to the staff smilies?

paul41598 07-11-2005 01:35 PM

I got this far, and it doesnt show the staff smilies now, but it be cool, if they would at least show for admins/mods, instead of not at all.

PHP Code:

    while ($smilie $DB_site->fetch_array($smilies))
    {

                      if ( 
$smilie['category'] == "TCW Staff Smilies" )
                          {
                                if ( 
$bbuserinfo[usergroupid] != "6" || $bbuserinfo[usergroupid] != "7")
                                {
                                
//eval('$smiliebits .= "' . fetch_template('help_smilies_category') . '";');
                                
}
                else {
            
            }
                           }

        else {

        if (
$smilie['category'] != $lastcat)
        {
            eval(
'$smiliebits .= "' fetch_template('help_smilies_category') . '";');
        }
        
exec_switch_bg();
        eval(
'$smiliebits .= "' fetch_template('help_smilies_smilie') . '";');
        
$lastcat $smilie['category'];
    }

            } 

N/M Figured It Out !!!

98EXL 07-28-2005 06:25 PM

this is cool, I always wanted to separate the 'naughty' smilies :D

Starkiller 08-03-2005 07:13 PM

First hack I ever installed.

I modified misc.php and FTPed it back up to my server and went in to ACP and modified the template. And I have two smilie categories defined.

But nothing seems to have changed.

http://eldiaonline.net/boards/misc.php?do=showsmilies

Still show all the smilies at once.

Any help would be greatly appreciated. Thanks.

Pseudomizer 08-03-2005 07:27 PM

Quote:

Originally Posted by Starkiller
First hack I ever installed.

I modified misc.php and FTPed it back up to my server and went in to ACP and modified the template. And I have two smilie categories defined.

But nothing seems to have changed.

http://eldiaonline.net/boards/misc.php?do=showsmilies

Still show all the smilies at once.

Any help would be greatly appreciated. Thanks.

Please check if you have this in your template:

$new_smilies


Cheers,


All times are GMT. The time now is 08:29 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.01196 seconds
  • Memory Usage 1,771KB
  • 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
  • (7)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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