vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   End-User Options - Favorite Smilies (https://vborg.vbsupport.ru/showthread.php?t=123116)

leannet 05-22-2008 01:43 AM

Where do I find this?

Open file includes/functions_editor.php

Fungsten 05-22-2008 01:52 AM

Quote:

Originally Posted by leannet (Post 1527497)
Where do I find this?

Open file includes/functions_editor.php

When I did edit that the smilies stopped working all together.

leannet 05-22-2008 04:23 AM

I found the includes/function_editor but couldnt get it to load to my site, but it seems to be working fine without it so I think I will leave it how it is, thanks for your reply.

FENIX 05-22-2008 06:58 AM

On 3.7.0 this code is no longer included in functions_editor.php

Code:

else
                                                {
                                                        $vBeditJs['smilie_options_array']["$smilie[category]"][] = "\t\t'more' : '" . addslashes_js($vbphrase['show_all_smilies']) . "'\n";
                                                        break;
                                                }
                                        }

I added the required phrase a little further down however this caused my topics to open as blank pages. Could someone post the correct placement for it, incase its just me :)

Thanks

leannet 05-22-2008 08:48 AM

I had previously added smilies in quick reply and now its not working, does anyone know how I can fix this?

Pamela 05-22-2008 11:36 PM

When I make the recommended edits in includes/functions_editor.php on 3.7.0, the smilies box goes completely missing!

Can anyone get this to work in 3.7.0?

Darwinist, can you please update this for us? It's an awesome mod so a ton of us would appreciate it. Thanks! :D

gpc10347 05-27-2008 05:45 PM

Whew.. just updated to 3.7.1 - had to remod functions_editor but: The smilies are working well! Installed... Officially Installed!

Nice mod!

Pamela 05-29-2008 07:41 PM

Quote:

Originally Posted by gpc10347 (Post 1533169)
Whew.. just updated to 3.7.1 - had to remod functions_editor but: The smilies are working well! Installed... Officially Installed!

Nice mod!

Can you (or anyone) please share with us how you did that? :confused:

Thank you!

gpc10347 05-29-2008 11:50 PM

Quote:

Originally Posted by Pamela (Post 1535509)
Can you (or anyone) please share with us how you did that? :confused:

Thank you!

I am a true newbie at this so... forgive me..

includes/functions_editor.php

Immediately following this:
PHP Code:

if ($toolbartype AND ($vbulletin->options['smtotal'] > OR $vbulletin->options['wysiwyg_smtotal'] > 0))
        { 

I have this:
PHP Code:

        // query smilies
    ############### FAVORITE SMILIES #################
            
global $permissions;
            if ((
$vbulletin->userinfo['favsmilies']) AND ($vbulletin->options['favsmiliesactive']) AND ($permissions['favsmiliepermissions'] & $vbulletin->bf_ugp_favsmiliepermissions['canusefavsmilies'])) {
                
$show['favsmilies'] = true;
                
$favsmilies str_replace(" "", "$vbulletin->userinfo['favsmilies']);
                
$smilies $vbulletin->db->query_read_slave("
                    SELECT smilieid, smilietext, smiliepath, smilie.title,
                        imagecategory.title AS category
                    FROM " 
TABLE_PREFIX "smilie AS smilie
                    LEFT JOIN " 
TABLE_PREFIX "imagecategory AS imagecategory USING(imagecategoryid)
                    WHERE smilieid IN (
$favsmilies)
                    ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
                "
);
                
$favsmtotal $vbulletin->db->num_rows($smilies);
                
$smilietotal $vbulletin->db->query_first("SELECT COUNT(*) as total FROM " TABLE_PREFIX "smilie");
                
$totalsmilies $smilietotal['total'];
            }
            else {
                
$smilies $vbulletin->db->query_read_slave("
                    SELECT smilieid, 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, imagecategory.title, smilie.displayorder
                "
);
                
$totalsmilies $vbulletin->db->num_rows($smilies);
            }
############### /FAVORITE SMILIES ################ 


I replaced the original coding as mentioned immediately following this:

PHP Code:

while ($smilie $vbulletin->db->fetch_array($smilies))
                    { 

Here's the code above and below with the code pasted in where it works:

PHP Code:

while ($smilie $vbulletin->db->fetch_array($smilies))
                    {
############### FAVORITE SMILIES #################
                        
if ($show['favsmilies']) {$smilie['category']=$vbphrase['favorite_smilies'];}
############### /FAVORITE SMILIES #################                    
                        
if (empty($prevcategory)) 

And finally, my line 614 is this:
PHP Code:

$prevcategory $smilie['category'];
                    } 

Following that, I have this:

PHP Code:

############### FAVORITE SMILIES #################
                    
if ($show['favsmilies']) {
$vBeditJs['smilie_options_array']["$smilie[category]"][] = "\t\t'more' : '" addslashes_js($vbphrase['show_all_smilies']) . "'\n";
                    }
############### /FAVORITE SMILIES ################ 

And it works very nicely...


I've attached my version in case it might help - Good Luck!!

thepub 05-30-2008 12:39 AM

thank you!


All times are GMT. The time now is 01:02 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.01690 seconds
  • Memory Usage 1,774KB
  • 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
  • (6)bbcode_php_printable
  • (3)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