vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Major Additions - MySmilies vB (v3.8.0) (https://vborg.vbsupport.ru/showthread.php?t=220193)

Eric 08-03-2009 10:00 PM

MySmilies vB (v3.8.0)
 
1 Attachment(s)
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 ...

Eric 08-04-2009 08:48 PM

reserved...

Hostboard 08-04-2009 09:01 PM

First install...w00t...

Been running the older version and seem to be ok. Will be upgrading tonight to this one since it officialy is released for 3.8 Are there directions on how to upgrade?

Thank you

Eric 08-04-2009 09:16 PM

Really, just follow the normal install instructions - but when you import the product XML - just set it to Allow Overwrite.

am-fs 08-04-2009 09:48 PM

Will this verison work with MGC Chatbox Evo?
https://vborg.vbsupport.ru/showthread.php?t=168992

Error on Upgrade

Database error in vBulletin 3.8.1:

Invalid SQL:
ALTER TABLE usergroup ADD mysmiliesvb_permissions INT DEFAULT 1 NOT NULL;

MySQL Error : Duplicate column name 'mysmiliesvb_permissions'
Error Number : 1060
Request Date : Tuesday, August 4th 2009 @ 05:51:18 PM
Error Date : Tuesday, August 4th 2009 @ 05:51:18 PM
Script : http://localhost/forum/admincp/plugi...=productimport
Referrer : http://localhost/forum/admincp/plugin.php?do=productadd
IP Address : 127.0.0.1
Username : am-fs
Classname : vB_Database
MySQL Version : 5.1.30-community

goxy63 08-04-2009 10:35 PM

This is great
Thanks a lot

Hope it will work with my other mods

Small question, smiley shortcuts created by user will be good only for him of course, and as usual all generic smileys will keep their shortcuts?
User will be refused to use reserved generic shortcuts?

Cheers

Eric 08-04-2009 10:39 PM

Looking into this error - as far as MGC Chatbox, honestly I'm not sure if it will or not.

Quote:

Originally Posted by am-fs (Post 1861468)
Will this verison work with MGC Chatbox Evo?
https://vborg.vbsupport.ru/showthread.php?t=168992

Error on Upgrade

Database error in vBulletin 3.8.1:

Invalid SQL:
ALTER TABLE usergroup ADD mysmiliesvb_permissions INT DEFAULT 1 NOT NULL;

MySQL Error : Duplicate column name 'mysmiliesvb_permissions'
Error Number : 1060
Request Date : Tuesday, August 4th 2009 @ 05:51:18 PM
Error Date : Tuesday, August 4th 2009 @ 05:51:18 PM
Script : http://localhost/forum/admincp/plugi...=productimport
Referrer : http://localhost/forum/admincp/plugin.php?do=productadd
IP Address : 127.0.0.1
Username : am-fs
Classname : vB_Database
MySQL Version : 5.1.30-community

yes, yes
Quote:

Originally Posted by goxy63 (Post 1861496)
This is great
Thanks a lot

Hope it will work with my other mods

Small question, smiley shortcuts created by user will be good only for him of course, and as usual all generic smileys will keep their shortcuts?
User will be refused to use reserved generic shortcuts?

Cheers


Eric 08-04-2009 11:11 PM

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

alfaowner 08-04-2009 11:50 PM

Will this show custom smilies on blogs and other addons? The old version didnt.

trotskid 08-05-2009 07:05 AM

Thansk for the update!

It's necessary to full uninstall the old version or just import the product?

Eric 08-05-2009 08:18 AM

Quote:

Originally Posted by alfaowner (Post 1861520)
Will this show custom smilies on blogs and other addons? The old version didnt.

It should show the smilies for anything that uses the bbcode parser and the editor (either standard or wysiwyg) - I do not have the Blog product, so I can't confirm that for you.

Quote:

Originally Posted by trotskid (Post 1861673)
Thansk for the update!

It's necessary to full uninstall the old version or just import the product?

Re-upload the files, and re-import the product with "Allow Overwrite" set to yes, and that should take care of it. There are no major changes as far as the database table for MySmilies - everything should be fine. :)

But, if you're a 'safety freak' like I am, hehe, make a backup of your current MySmilies database table, and files before doing so.

Oblivion Knight 08-05-2009 09:22 AM

I get a parse error on both the install and uninstall of this product..

Parse error: syntax error, unexpected '{' in /xxx/xxx/xxx/forums/admincp/plugin.php(1575) : eval()'d code on line 11

Eric 08-05-2009 09:38 AM

Quote:

Originally Posted by Oblivion Knight (Post 1861730)
I get a parse error on both the install and uninstall of this product..

Parse error: syntax error, unexpected '{' in /xxx/xxx/xxx/forums/admincp/plugin.php(1575) : eval()'d code on line 11

Ahh, can't believe I missed that -- download the new zip file, re-import the product file with Allow Overwrite = yes - and you shouldn't get this errors.

trotskid 08-05-2009 09:39 AM

Quote:

Originally Posted by SecondV (Post 1861702)
Re-upload the files, and re-import the product with "Allow Overwrite" set to yes, and that should take care of it. There are no major changes as far as the database table for MySmilies - everything should be fine. :)

Thanks, but when I configure the usergroups appears a MySQL error:


MySQL Error : Unknown column 'mysmiliesvb_permissions' in 'field list'
Error Number : 1054


Also when re-import the product appears two MySmiles on the Installed products list because the previous version (3.7.005) has another filename (ms_mysmiliesvb.xml).

v3.8.3

Eric 08-05-2009 09:44 AM

Quote:

Originally Posted by trotskid (Post 1861739)
Thanks, but when I configure the usergrups appears a MySQL error:


MySQL Error : Unknown column 'mysmiliesvb_permissions' in 'field list'
Error Number : 1054


Also when re-import the product appears two MySmiles on the Installed products list because the previous version (3.7.005) has another filename (ms_mysmiliesvb.xml).

v3.8.3

Hmm. Try disabling (don't uninstall it!) the one with 'ms_mysmiliesvb' - then re-import mine with allow overwrite.

trotskid 08-05-2009 09:48 AM

Quote:

Originally Posted by SecondV (Post 1861742)
Hmm. Try disabling (don't uninstall it!) the one with 'ms_mysmiliesvb' - then re-import mine with allow overwrite.

Ops, to late :D

Eric 08-05-2009 10:01 AM

Quote:

Originally Posted by trotskid (Post 1861744)
Ops, to late :D

Did you uninstall Mosh's version? That's what I meant. Although I believe I've come up with a way to do an upgrade from Mosh's to mine, cleanly. Working on it now...

Eric 08-05-2009 10:10 AM

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.

trotskid 08-05-2009 10:10 AM

Well, now I uninstalled Mosh's version to reinstall it again, but I'll wait to your upgrade.

Many thanks :up:

trotskid 08-05-2009 10:22 AM

When I install the product now appears this error:

MySQL Error : Table 'db274165488.vbmysmiliesvb' doesn't exist
Error Number : 1146

edit: this is not an upgrade from Mosh's version.

Eric 08-05-2009 10:24 AM

Quote:

Originally Posted by trotskid (Post 1861759)
When I install the product now appears this error:

MySQL Error : Table 'db274165488.vbmysmiliesvb' doesn't exist
Error Number : 1146

edit: this is not an upgrade from Mosh's version, it?s directly from your version.

Ugh, I hate my IDE - it removed code it shouldn't have, one sec...

Eric 08-05-2009 10:29 AM

Ok, one more try :\ Should be all ironed out now.

trotskid 08-05-2009 10:39 AM

Now works perfect! ;)

I've realised a backup of the mysmiliesvb folder but doesn't appear the smilies in "My Smilies". What can I do?

Eric 08-05-2009 10:43 AM

Quote:

Originally Posted by trotskid (Post 1861766)
Now works perfect! ;)

I've realised a backup of the mysmiliesvb folder but doesn't appear the smilies in "My Smilies". What can I do?

No backup of the database? That's why I originally said not to uninstall the ms_ version of the product, only to disable it, because when you choose "Uninstall", it deletes the mysmiliesvb table.

trotskid 08-05-2009 10:46 AM

Ok no problem. This addon is recent in my forum and few users have upload smilies.. :)

Greetings

PS: Great addon. Installed and nominated :)

Oblivion Knight 08-05-2009 11:27 AM

Thanks for the quick fix.. :)

The product seemed to install ok even with the error, but to be on the safe side I uninstalled and reported it. Now reinstalled, and seems to be flawless - great idea, even better integration.

One small thing, any chance of getting custom smilies listed on the popup? :D

Eric 08-05-2009 11:30 AM

Quote:

Originally Posted by trotskid (Post 1861770)
Ok no problem. This addon is recent in my forum and few users have upload smilies.. :)

Greetings

PS: Great addon. Installed and nominated :)

Thanks :)

Quote:

Originally Posted by Oblivion Knight (Post 1861791)
Thanks for the quick fix.. :)

The product seemed to install ok even with the error, but to be on the safe side I uninstalled and reported it. Now reinstalled, and seems to be flawless - great idea, even better integration.

One small thing, any chance of getting custom smilies listed on the popup? :D

Glad to see it's working for you.

As far as popup - you mean in the editor? or the "More Smilies" link ?

Oblivion Knight 08-05-2009 11:32 AM

Quote:

Originally Posted by SecondV (Post 1861792)
As far as popup - you mean in the editor? or the "More Smilies" link ?

"More Smilies" link. I disabled the plugin that added it to the smilies box display on the editors, since it looks disjointed if you're using a smilie set with the same size, to then go and add custom smilies that are bigger.

It looks fine on the dropdown though, and would like to emulate this on the popup.. :)

Eric 08-05-2009 11:37 AM

Quote:

Originally Posted by Oblivion Knight (Post 1861793)
"More Smilies" link. I disabled the plugin that added it to the smilies box display on the editors, since it looks disjointed if you're using a smilie set with the same size, to then go and add custom smilies that are bigger.

It looks fine on the dropdown though, and would like to emulate this on the popup.. :)

Ah, I see - I'll add this to my todo list, would be a nice feature. :)

Oblivion Knight 08-05-2009 12:06 PM

Seems I was somewhat premature in saying that it was working flawlessly.

If there's any attachments in a thread, I'm getting this error for each one of them:
Parse error: syntax error, unexpected ',' in /xxx/xxx/xxx/forums/includes/class_postbit.php(432) : eval()'d code on line 3

Makes no difference whether or not I used the admincp "fix" option.

Eric 08-05-2009 12:59 PM

Zip updated.

Oblivion, or others who downloaded this before August 5th, 9:57 AM EST:

Edit the postbit_attachment plugin, replace it with:

PHP Code:

if ($this->registry->options['mysmiliesvb_option_masterswitch'] AND $this->registry->options['mysmiliesvb_option_fix_attach_inline'])
{
    if (
strpos(strtolower($post['pagetext']), '[attach]'0) !== false)
    {
        
$show['attachments'] = false;
    }



Sayid 08-05-2009 01:19 PM

Installed + Nominated

I was waiting for the update .

thanks man :D

Oblivion Knight 08-05-2009 01:26 PM

Quote:

Originally Posted by SecondV (Post 1861846)
Zip updated.

You sir, are a star! Top class support.

Looking forward to the popup integration, but take your time.. ;)

Eric 08-05-2009 01:27 PM

No problem :) Been a rough road, with all the problems that needed ironing out. But it should be fine now.

Thanks for the nomination.

Quote:

Originally Posted by Sayid (Post 1861864)
Installed + Nominated

I was waiting for the update .

thanks man :D


Eric 08-05-2009 01:33 PM

Quote:

Originally Posted by Oblivion Knight (Post 1861873)
You sir, are a star! Top class support.

Looking forward to the popup integration, but take your time.. ;)

hehe, thanks :)

I plan on updating this soon - but may give it a couple days. It's been a rough morning with all the fixes :P lol.

goxy63 08-05-2009 02:13 PM

Installed yesterday, didnt have time to check it out good...updated and works just fine

OMG AWESOME MOD

Nominated, rated

Thank you
:respect:

mike2902 08-05-2009 05:31 PM

I uploaded the files and went to my AdminCP to import the product and my admin CP formatting has been totally changed. What happened? The only file overwritten was the delete.gif How do I get my AdminCP back?






http://www.amirhashemi.com/images/y0...5yhce04yxg.jpg

Eric 08-05-2009 05:51 PM

This can't be from this hack - nothing AdminCP wise was touched, except for a couple vB Options. And if the v3.7 version worked for you without that happening, so should my v3.8 version.

Quote:

Originally Posted by mike2902 (Post 1862039)
I uploaded the files and went to my AdminCP to import the product and my admin CP formatting has been totally changed. What happened? The only file overwritten was the delete.gif How do I get my AdminCP back?


mike2902 08-05-2009 05:56 PM

Quote:

Originally Posted by SecondV (Post 1862047)
This can't be from this hack - nothing AdminCP wise was touched, except for a couple vB Options. And if the v3.7 version worked for you without that happening, so should my v3.8 version.


Well I dont know. Admincp was fine. I uploaded the files and now its not fine.

Eric 08-05-2009 06:01 PM

Quote:

Originally Posted by mike2902 (Post 1862049)
Well I dont know. Admincp was fine. I uploaded the files and now its not fine.

what site? because I guarantee that didn't happen because of this hack.


All times are GMT. The time now is 06:18 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.01497 seconds
  • Memory Usage 1,874KB
  • 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
  • (3)bbcode_php_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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