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)

Starkiller 08-15-2005 06:39 AM

Quote:

Originally Posted by Pseudomizer
Hello Starkiller,

I do not know what you did but it should work on your site. It works on every other site. I have no idea what you did wrong especially because the install instructions are very short and you can not do much errors during the install/modifications.

Cheers,

It's not my installation it's your code. You categorized the getsmilies function used by the editor but not showsmilies one used for the posting rules. I fixed it last night by commenting out the old showsmilies and pasting in your code only renaming it. Works fine now. Sorry I hadn't gotten around to posting back on this thread to tell you I'd fixed it.

Pseudomizer 08-15-2005 06:46 AM

Quote:

Originally Posted by Starkiller
It's not my installation it's your code. You categorized the getsmilies function used by the editor but not showsmilies one used for the posting rules. I fixed it last night by commenting out the old showsmilies and pasting in your code only renaming it. Works fine now. Sorry I hadn't gotten around to posting back on this thread to tell you I'd fixed it.

Could you please post your changes then into this thread so I can integrate this later into my VBulletin 3.5?

Thanks in advance.

Cheers,

GoTTi 08-22-2005 01:28 AM

is there a way we can have random smilies being shown? for some reason im only showing 1 category.

GoTTi 08-22-2005 01:29 AM

im using this with 308 btw. works perfect. i would like random smilies though, like i mentioned aboved....

Starkiller 08-23-2005 01:48 AM

Quote:

Originally Posted by Pseudomizer
Could you please post your changes then into this thread so I can integrate this later into my VBulletin 3.5?

Thanks in advance.

Cheers,

Change:
PHP Code:

// ############################### start show smilies ###############################
if ($_REQUEST['do'] == 'showsmilies')
{

    
$smiliebits '';

    
$smilies $DB_site->query("
        SELECT smilietext,smiliepath,smilie.title,imagecategory.title AS category
        FROM " 
TABLE_PREFIX "smilie AS smilie
        LEFT JOIN " 
TABLE_PREFIX "imagecategory AS imagecategory USING(imagecategoryid)
        ORDER BY imagecategory.displayorder, smilie.displayorder
    "
);

    while (
$smilie $DB_site->fetch_array($smilies))
    {
        if (
$smilie['category'] != $lastcat)
        {
            eval(
'$smiliebits .= "' fetch_template('help_smilies_category') . '";');
        }
        
exec_switch_bg();
        eval(
'$smiliebits .= "' fetch_template('help_smilies_smilie') . '";');
        
$lastcat $smilie['category'];
    }

    
$navbits construct_navbits(array(
        
"faq.php?$session[sessionurl]=> $vbphrase['faq'],
        
'' => $vbphrase['smilie_list']
    ));

    eval(
'$navbar = "' fetch_template('navbar') . '";');

    eval(
'print_output("' fetch_template('help_smilies') . '");');


to:
PHP Code:

// ############################### start show smilies ###############################
if ($_REQUEST['do'] == 'showsmilies')
{
    
globalize($_REQUEST, array('wysiwyg' => INT'getsmilies' => STR_NOHTML));

    
$show['wysiwyg'] = $wysiwyg;

    
$smilies $DB_site->query("
        SELECT smilietext AS text, smiliepath AS path, smilie.title, smilieid,
        imagecategory.title AS category
        FROM " 
TABLE_PREFIX "smilie AS smilie
        LEFT JOIN " 
TABLE_PREFIX "imagecategory AS imagecategory USING(imagecategoryid)
        ORDER BY imagecategory.displayorder, smilie.displayorder
    "
);

    
$smcache = array();
    while (
$smilie $DB_site->fetch_array($smilies))
    {
        
$smcache["$smilie[category]"][] = $smilie;
        
//echo $smilie[category];
    
}

    
$i "0";
    foreach (
$smcache AS $category => $smilies)
    {
         
$new_categories[$i] = $category;
         
$i++;
    }

    if (!
$_REQUEST['select_category'])
    {
        
$select_category $new_categories[0];
    }
    else
    {
        
$select_category $_REQUEST['select_category'];
    }

    
$new_smilies .= "<form name=\"smilieform\" action=\"misc.php\">";
    
$new_smilies .= "<input type=\"hidden\" name=\"do\" value=\"getsmilies\">";
    
$new_smilies .= "<input type=\"hidden\" name=\"wysiwyg\" value=\"$wysiwyg\">";
    
$new_smilies .= "<select name=\"select_category\" size=\"1\"><option value=\"\">Click to select";

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

    
$new_smilies .=  $add_select;

    
$new_smilies .=  "</select><input type=\"submit\" value=\"Go!\"\"></form></center>";

    
$new_smilies .=  "<BR><Font face=\"arial,helvetica\">".$select_category."<BR><BR></Font>";

    
$popup_smiliesbits '';
    
$bits = array();
    
exec_switch_bg();
    foreach (
$smcache AS $category => $smilies)
    {
      if ( 
$category == $select_category )
      {
        if (
sizeof($bits) == 1)
        {
            eval(
'$smiliecells = "' fetch_template('smiliepopup_straggler') . '";');
            eval(
'$smiliebits .= "' fetch_template('smiliepopup_row') . '";');
        }
        
// eval('$smiliebits .= "' . fetch_template('smiliepopup_category') . '";');
        
$bits = array();
        foreach (
$smilies AS $smilie)
        {
            
$smilie['js'] = addslashes($smilie['text']);
            eval(
'$bits[] = "' fetch_template('smiliepopup_smilie') . '";');
            if (
sizeof($bits) == 2)
            {
                
exec_switch_bg();
                
$smiliecells implode(''$bits);
                eval(
'$smiliebits .= "' fetch_template('smiliepopup_row') . '";');
                
$bits = array();
            }
        }
       }
       else
       {
           
//do nothing
       
}
    }
    if (
sizeof($bits) == 1)
    {
        eval(
'$smiliecells = "' fetch_template('smiliepopup_straggler') . '";');
        eval(
'$smiliebits .= "' fetch_template('smiliepopup_row') . '";');
    }

    unset(
$shutdownqueries['pmpopup']);
    eval(
'print_output("' fetch_template('smiliepopup') . '");');

}

/*if ($_REQUEST['do'] == 'showsmilies')
{

    $smiliebits = '';

    $smilies = $DB_site->query("
        SELECT smilietext,smiliepath,smilie.title,imagecategory.title AS category
        FROM " . TABLE_PREFIX . "smilie AS smilie
        LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
        ORDER BY imagecategory.displayorder, smilie.displayorder
    ");

    while ($smilie = $DB_site->fetch_array($smilies))
    {
        if ($smilie['category'] != $lastcat)
        {
            eval('$smiliebits .= "' . fetch_template('help_smilies_category') . '";');
        }
        exec_switch_bg();
        eval('$smiliebits .= "' . fetch_template('help_smilies_smilie') . '";');
        $lastcat = $smilie['category'];
    }

    $navbits = construct_navbits(array(
        "faq.php?$session[sessionurl]" => $vbphrase['faq'],
        '' => $vbphrase['smilie_list']
    ));

    eval('$navbar = "' . fetch_template('navbar') . '";');

    eval('print_output("' . fetch_template('help_smilies') . '");');
}*/ 


amykhar 08-23-2005 01:55 AM

Offer removed.

sinaluna 09-12-2005 04:29 AM

amykhar: I'm unable to find this hack on your forum. Your link to mods takes me to an error page. ???

Quillz 09-12-2005 05:12 PM

Nice hack. I may use it in the future.

Bubble #5 10-03-2005 10:27 PM

Quote:

Originally Posted by amykhar
I have a 3.5 - style one done and posted on my website if anybody needs to get it. it's freely available for those who need it.

Actually it's not. When you click on any of the links you get an error message saying it's "not a public forum". Even when you click on the link to contact you this same error message pops up :(

That's the only reason why we came here looking for a hack like this. Otherwise we would have used yours.

Sinaluna I feel your pain :)

Pseudomizer 10-03-2005 11:28 PM

Hello,

just to make it clear here, that I will release an update for the 3.5 version but due to my current relocation to US (within my company) I will not be able to work on this until November.

So you should expect an update end of November or December 2005!

Cheers,


All times are GMT. The time now is 06:25 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.01348 seconds
  • Memory Usage 1,800KB
  • 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
  • (2)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