Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
MySmilies vB (v3.8.0) Details »»
MySmilies vB (v3.8.0)
Version: 3.8.005, by Eric Eric is offline
Developer Last Online: Jun 2023 Show Printable Version Email this Page

Category: Major Additions - Version: 3.8.x Rating:
Released: 08-03-2009 Last Update: 06-22-2011 Installs: 109
DB Changes Uses Plugins Auto-Templates
Re-useable Code Additional Files  
No support by the author.

Please click Mark as Installed if you are using this hack, and Nominate For MOTM or Support Developer if you enjoy this hack and would like to support it's development.
.

Please read the entire thread before posting your problem, chances are it's been fixed.

Those who have "Mark As Installed" will receive priority support



NOTE: I have marked this hack as Re-usable Code - This means that code from this hack may be used in other hacks, which can ONLY be released on official vB sites that use Jelsoft's verification system to verify your vBulletin license status, and as long as Kentaurus, Mosh, and I (SecondV) are credited in your hack.

This is a port of Mosh's MySmilies VB for v3.7.x to work with vBulletin v3.8.0.
Mosh's was a port of Kentaurus's MySmilies VB for v3.6.x (version 1.03) to work with vBulletin v3.7.0.



vBulletin Version Compatibility & Permission Info

This hack was tested on vB 3.8.x - but it should work on vB 3.7.0 and later.

Permission for me to port his hack is granted here:
Quote:
Info for hackers:
You may modify, improve, upgrade, redistribute this hack, include it
in another hack or yours or translate it provided you do it free of
charge and you distribute it in www.vbulletin.org at least, there is no
need to pm me asking for permission
Some portions of the code are (c) Jelsoft Enterprises Ltd.
And here:
Quote:
NOTE: I have marked this hack as Re-usable Code - This means that code from this hack may be used in other hacks, which can ONLY be released on official vB sites that use Jelsoft's verification system to verify your vBulletin license status, and as long as Kentaurus and I are credited in your hack.


What Does This Hack Do?

This hack puts the control of the smilies on the users. It lets any user (that you give permission to) upload or modify the smilies that he can use.

These are not the smilies that vb uses, these are user-customized smilies. The smilies that you already have in place are preserved and are still used. But users may upload their own smilies for their use, and they are kept separate from the standard forum smilies.

For users:
  • Users can keep a library of their own smilies (they can upload them from their computer or web)
  • Users enter their replacement text, for example, :iamhappy: would be changed to their own user happy smilie
  • The custom smilies are parsed in any post, signature, or pm
  • If they have enabled the WYSIWYG editor, smilies are shown there

For administrators:
  • Usergroup control of who may upload custom smilies
  • Usergroup control of the size (width, height, size in bytes) of the smilie
  • Smilie quota, both for max number of smilies and max number of bytes or hard disk space
  • The administrator can choose where to save the smilies (the directory, default: mysmiliesvb)
  • Auto-template Injection - if the appropriate template hooks are available, you will not need to make any template edits at all, if edits needed you only need to paste a single variable where you need it



Installation Instructions

See the included Installation Instructions.txt file in the sv_mysmiliesvb.zip zip file.

ADDITIONAL NOTE:
A limitation exists with the fix that rectifies the problem of attachments showing when also posting them inline within the same post; when applied, all attachments will need to be displayed inline, if they have not been, then the ones that have not been posted inline will be hidden along with the ones that have been posted inline. Read Post #106 for more information on this. -- I'm working on this




Uninstall Instructions
  1. Delete mysmiliesvb.php from your forum's root directory.
  2. Delete the mysmiliesvb directory from your forum's root directory.
  3. Delete class_dm_mysmiliesvb.php from your forum's /includes directory.
  4. Delete bitfield_mysmiliesvb.xml from your forum's /includes/xml directory.
  5. Delete delete.gif from your forum's /images/misc directory (if more than one style remember to delete it from all misc directories).
  6. Optional Step: This step is only if the auto template injection does not work, and you did the optional template edits.

    In the USERCP_SHELL template, find and delete:
    PHP Code:
    $mysmilie_usercp 
    In the navbar template, find and delete:
    PHP Code:
    $mysmilie_navbar 
  7. Uninstall the product in vB using the AdminCP Product Manager.



To Do List

Features are being done in the order that they appear on the list.
  1. Admin Control Panel utility to view/delete one, some or all custom smilies
  2. Add custom user smilies to the misc.php?do=showsmilies page and to the "More Smilies" popup.



Version History
v3.8.005 - June 23rd, 2011
-- Fixed: "Warning: Invalid argument supplied for foreach()" errors.
-- Changed: how the smilie datastore cache is generated/accessed.
-- Added: Option to pull all user smilies for the editor or just the current user id's smilies.

v3.8.004 - January 15th, 2010
-- Changed: query() calls were being used instead of query_read()
-- Changed: Smilies are now built and added to datastore cache
-- Changed: Since smilies are stored in the datastore, smilies are no longer queried/parsed by userid.
-- Fixed: Custom smilies not parsed when quoted by other users.
-- Added: /includes/functions_mysmiliesvb.php - build_mysmilies_datastore() function.

v3.8.003 - August 5th, 2009
-- Fixed: Ok, should finally be fixed on upgrade - no more parse errors.
-- Fixed: Those upgrading from Mosh's version should be fine now.

v3.8.002 - August 4th, 2009
-- Fixed: errors when upgrading from previous versions of MySMilies should be fixed.

v3.8.001 - August 4th, 2009
-- Initial v3.8.0 release - mod taken over by Eric Sizemore (SecondV)
-- Fixed: standard_error calls were not using eval() as they should be
-- Fixed: Some queries were not using TABLE_PREFIX
-- Fixed: Even though phrases were in place, some parts of the mod used hardcoded langauge strings.
-- Fixed: Some errors in templates, missing ending tags, etc.
-- Fixed: Upload - the upload source didn't appear to be detected properly.
-- Changed: "maxversion" in the product XML increased.
-- Changed: "hard delete" option no longer on by default.
-- Changed: The "mysmiliesvb" table was altered to have KEY's on the "userid" and "dateline" columns. Hopefully this will increase performance/smilie lookups.



Thanks

My thanks go out to Kentaurus (who originally created this fantastic hack), Mosh who updated the hack to v3.7, and Paul M who gave permission to use some of his install code.



Show Your Appreciation

Although not required, if you have enjoyed the benefits of this hack, and would like to show your appreciation for my efforts, then please feel free to click on the Support Developer link and donate any amount you feel is appropriate. This would go a long way in encouraging me to continue to develop this project, as I'm currently unemployed.

----

Because of the limitations on screenshots in place by vBulletin.org (can only upload 10) - you can view the screenshots here:

... coming again soon ...

Download Now

File Type: zip sv_mysmiliesvb.zip (16.6 KB, 507 views)
File Type: zip sv_mysmiliesvb_3.8.004.zip (17.7 KB, 298 views)
File Type: zip sv_mysmiliesvb_3.8.005.zip (18.6 KB, 168 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #132  
Old 01-16-2010, 03:24 AM
nascartr nascartr is offline
 
Join Date: Jun 2008
Posts: 317
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I now see everyone's smilies as well. That's not too bad I guess...
Reply With Quote
  #133  
Old 01-16-2010, 09:41 AM
Eric's Avatar
Eric Eric is offline
 
Join Date: May 2006
Location: Kentucky
Posts: 792
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Megatr0n View Post
See attachment.

It sort of stretches our editor and I don't like it doing that.

Anyway arounnd this?
Quote:
Originally Posted by nascartr View Post
Yeah, I now see everyone's smilies as well. That's not too bad I guess...
In the next version, I will add an admin option to where you can choose if all user smilies are added to the editor, or just the current userid's smilies.

If you'd like to try that, could you test this for me?

In the editor_toolbar_start hook, titled "Setup The Smilies For The HTML Box", try replacing:

PHP Code:
    foreach ($vbulletin->sv_mysmiliesvb AS $smilie)
    {
        
//while ($i++ < $vbulletin->options['smtotal'])
        //{
            
$mysmilieurl $vbulletin->options['mysmiliesvb_option_smiliesurl'] . "/mysmilie_{$smilie['mysmiliesvbid']}.gif";
            
$smiliehtml "<img src=\"$mysmilieurl\" id=\"{$editorid}_smilie_9999{$smilie['mysmiliesvbid']}\" alt=\"{$smilie['smilietext']}\" title=\"{$smilie['smilietext']}\" border=\"0\" />";

            eval(
'$bits[] = "' fetch_template('editor_smilie') . '";');

            if (
sizeof($bits) == $vbulletin->options['smcolumns'])
            {
                
$smiliecells implode(''$bits);
                eval(
'$smiliebits .= "' fetch_template('editor_smiliebox_row') . '";');
                
$bits = array();
            }
        
//}
    

With:

PHP Code:
    foreach ($vbulletin->sv_mysmiliesvb AS $smilie)
    {
        if (
$smilie['userid'] != $vbulletin->userinfo['userid'])
        {
            continue;
        }

        
//while ($i++ < $vbulletin->options['smtotal'])
        //{
            
$mysmilieurl $vbulletin->options['mysmiliesvb_option_smiliesurl'] . "/mysmilie_{$smilie['mysmiliesvbid']}.gif";
            
$smiliehtml "<img src=\"$mysmilieurl\" id=\"{$editorid}_smilie_9999{$smilie['mysmiliesvbid']}\" alt=\"{$smilie['smilietext']}\" title=\"{$smilie['smilietext']}\" border=\"0\" />";

            eval(
'$bits[] = "' fetch_template('editor_smilie') . '";');

            if (
sizeof($bits) == $vbulletin->options['smcolumns'])
            {
                
$smiliecells implode(''$bits);
                eval(
'$smiliebits .= "' fetch_template('editor_smiliebox_row') . '";');
                
$bits = array();
            }
        
//}
    

Reply With Quote
  #134  
Old 01-16-2010, 09:44 AM
Eric's Avatar
Eric Eric is offline
 
Join Date: May 2006
Location: Kentucky
Posts: 792
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by choccyclaire View Post
Yes, I have that version. Is there a solution for me?
So you are using version 3.8.001 atm, or an older one? Ok, try this product xml file that I have attached and see if that works for you.
Attached Files
File Type: xml choccyclaire-sv_mysmiliesvb.xml (38.1 KB, 13 views)
Reply With Quote
  #135  
Old 01-16-2010, 12:26 PM
choccyclaire choccyclaire is offline
 
Join Date: Jan 2008
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ Thanks, that product worked perfectly.

Your previous post with regards to getting rid of the custom smilies in the editor. It does get rid of them but causes an error line at the top:

Parse error: syntax error, unexpected $end in /home/xxx/public_html/includes/functions_editor.php(521) : eval()'d code on line 79
Reply With Quote
  #136  
Old 01-16-2010, 01:16 PM
Eric's Avatar
Eric Eric is offline
 
Join Date: May 2006
Location: Kentucky
Posts: 792
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by choccyclaire View Post
^ Thanks, that product worked perfectly.

Your previous post with regards to getting rid of the custom smilies in the editor. It does get rid of them but causes an error line at the top:

Parse error: syntax error, unexpected $end in /home/xxx/public_html/includes/functions_editor.php(521) : eval()'d code on line 79
Could you post what your full plugin code looks like? There shouldn't be any errors..
Reply With Quote
  #137  
Old 01-16-2010, 01:27 PM
choccyclaire choccyclaire is offline
 
Join Date: Jan 2008
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, somehow I had an extra } in the code. Works now!

For the next version, do you think you could make it so that the users custom smilies are placed in a new fieldset labelled my custom smilies? Not sure if this is achievable but would be great to keep them semi separate.
Reply With Quote
  #138  
Old 01-16-2010, 02:16 PM
Megatr0n Megatr0n is offline
 
Join Date: Jul 2007
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SecondV View Post
In the next version, I will add an admin option to where you can choose if all user smilies are added to the editor, or just the current userid's smilies.

If you'd like to try that, could you test this for me?

In the editor_toolbar_start hook, titled "Setup The Smilies For The HTML Box", try replacing:

PHP Code:
    foreach ($vbulletin->sv_mysmiliesvb AS $smilie)
    {
        
//while ($i++ < $vbulletin->options['smtotal'])
        //{
            
$mysmilieurl $vbulletin->options['mysmiliesvb_option_smiliesurl'] . "/mysmilie_{$smilie['mysmiliesvbid']}.gif";
            
$smiliehtml "<img src=\"$mysmilieurl\" id=\"{$editorid}_smilie_9999{$smilie['mysmiliesvbid']}\" alt=\"{$smilie['smilietext']}\" title=\"{$smilie['smilietext']}\" border=\"0\" />";

            eval(
'$bits[] = "' fetch_template('editor_smilie') . '";');

            if (
sizeof($bits) == $vbulletin->options['smcolumns'])
            {
                
$smiliecells implode(''$bits);
                eval(
'$smiliebits .= "' fetch_template('editor_smiliebox_row') . '";');
                
$bits = array();
            }
        
//}
    

With:

PHP Code:
    foreach ($vbulletin->sv_mysmiliesvb AS $smilie)
    {
        if (
$smilie['userid'] != $vbulletin->userinfo['userid'])
        {
            continue;
        }

        
//while ($i++ < $vbulletin->options['smtotal'])
        //{
            
$mysmilieurl $vbulletin->options['mysmiliesvb_option_smiliesurl'] . "/mysmilie_{$smilie['mysmiliesvbid']}.gif";
            
$smiliehtml "<img src=\"$mysmilieurl\" id=\"{$editorid}_smilie_9999{$smilie['mysmiliesvbid']}\" alt=\"{$smilie['smilietext']}\" title=\"{$smilie['smilietext']}\" border=\"0\" />";

            eval(
'$bits[] = "' fetch_template('editor_smilie') . '";');

            if (
sizeof($bits) == $vbulletin->options['smcolumns'])
            {
                
$smiliecells implode(''$bits);
                eval(
'$smiliebits .= "' fetch_template('editor_smiliebox_row') . '";');
                
$bits = array();
            }
        
//}
    


It works.
Reply With Quote
  #139  
Old 01-16-2010, 04:21 PM
nascartr nascartr is offline
 
Join Date: Jun 2008
Posts: 317
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SecondV View Post
In the next version, I will add an admin option to where you can choose if all user smilies are added to the editor, or just the current userid's smilies.

If you'd like to try that, could you test this for me?

In the editor_toolbar_start hook, titled "Setup The Smilies For The HTML Box", try replacing:

PHP Code:
    foreach ($vbulletin->sv_mysmiliesvb AS $smilie)
    {
        
//while ($i++ < $vbulletin->options['smtotal'])
        //{
            
$mysmilieurl $vbulletin->options['mysmiliesvb_option_smiliesurl'] . "/mysmilie_{$smilie['mysmiliesvbid']}.gif";
            
$smiliehtml "<img src=\"$mysmilieurl\" id=\"{$editorid}_smilie_9999{$smilie['mysmiliesvbid']}\" alt=\"{$smilie['smilietext']}\" title=\"{$smilie['smilietext']}\" border=\"0\" />";

            eval(
'$bits[] = "' fetch_template('editor_smilie') . '";');

            if (
sizeof($bits) == $vbulletin->options['smcolumns'])
            {
                
$smiliecells implode(''$bits);
                eval(
'$smiliebits .= "' fetch_template('editor_smiliebox_row') . '";');
                
$bits = array();
            }
        
//}
    

With:

PHP Code:
    foreach ($vbulletin->sv_mysmiliesvb AS $smilie)
    {
        if (
$smilie['userid'] != $vbulletin->userinfo['userid'])
        {
            continue;
        }

        
//while ($i++ < $vbulletin->options['smtotal'])
        //{
            
$mysmilieurl $vbulletin->options['mysmiliesvb_option_smiliesurl'] . "/mysmilie_{$smilie['mysmiliesvbid']}.gif";
            
$smiliehtml "<img src=\"$mysmilieurl\" id=\"{$editorid}_smilie_9999{$smilie['mysmiliesvbid']}\" alt=\"{$smilie['smilietext']}\" title=\"{$smilie['smilietext']}\" border=\"0\" />";

            eval(
'$bits[] = "' fetch_template('editor_smilie') . '";');

            if (
sizeof($bits) == $vbulletin->options['smcolumns'])
            {
                
$smiliecells implode(''$bits);
                eval(
'$smiliebits .= "' fetch_template('editor_smiliebox_row') . '";');
                
$bits = array();
            }
        
//}
    


My members actually like the availability of using each others smilies so an option would be great just in case we ever want to hide them again.

Guess this way it's like a group effort in adding smilies to the selection.
Reply With Quote
  #140  
Old 01-17-2010, 12:45 AM
choccyclaire choccyclaire is offline
 
Join Date: Jan 2008
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The update unfortunately conflicts with the Yet Another Awards System.

When you go to the YAAS pages in the admincp or modcp, you have errors at the top of the pages:

Code:
Warning: Invalid argument supplied for foreach() in [path]/includes/class_bbcode.php(451) : eval()'d code on line 12
Reply With Quote
  #141  
Old 01-17-2010, 02:49 AM
Eric's Avatar
Eric Eric is offline
 
Join Date: May 2006
Location: Kentucky
Posts: 792
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by choccyclaire View Post
The update unfortunately conflicts with the Yet Another Awards System.

When you go to the YAAS pages in the admincp or modcp, you have errors at the top of the pages:

Code:
Warning: Invalid argument supplied for foreach() in [path]/includes/class_bbcode.php(451) : eval()'d code on line 12
hmm, in the 'bbcode_parse_complete' hook titled "Substitute The Replacement Text For The Image" try replacing:

PHP Code:
if ($this->registry->options['mysmiliesvb_option_masterswitch'] AND $GLOBALS['mysmiliesvb_userid']) 
with:
PHP Code:
if ($this->registry->options['mysmiliesvb_option_masterswitch'] AND $GLOBALS['mysmiliesvb_userid'] AND !empty($this->registry->sv_mysmiliesvb)) 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:45 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05068 seconds
  • Memory Usage 2,443KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (10)bbcode_php
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete