vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Major Additions - MySmilies VB (v3.7.0) (https://vborg.vbsupport.ru/showthread.php?t=179137)

Mosh 05-13-2008 10:00 PM

MySmilies VB (v3.7.0)
 
Hack Support

This hack is now discontinued - this means that while it will remain available for download and use, there will be no further updates, nor will support be provided as the thread is no longer monitored.

Please click Mark as Installed if you are using this hack.

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.


vBulletin Version Compatibility

This hack can only be used with vBulletin v3.7.x.


NOTE 1:
This is a port of Kentaurus's MySmilies VB for v3.6.x (version 1.03) to work with vBulletin v3.7.0.

Kentaurus has indicated that he would be helping me provide support - see this post in his thread for confirmation. He has been added as a CoAuthor for this hack. Permission for me to port his hack is granted at the bottom of the 1st post in his thread.

NOTE 2:
Because I did not write the original hack (this version of the hack was originally only ever meant to be an interim version before Kentaurus released his version), hacks that I have written myself will always take priority over this one, and as a consequence, this hack only tended to get worked on whenever I felt the urge to look at it. I do not feel the urge anymore so have discontinued the hack.

People are free to install or un-install this whenever they want.

If anyone wants to continue the development of this hack, then they are more than welcome to take over, as I have marked this as re-usable code, I don't mind either way.


So Whats New?
  • Now has CSRF (cross-site request forgery) Protection (introduced in vBulletin v3.6.10 and v3.7.0 RC 4)
  • 9 new plugins (cached all uncached templates, WOL sorted)
  • Now fully phrased
  • Auto-template injection (no template edits should now be needed)
  • Smilie Links now only appear if the member has permission to use MySmiles
  • Prettied up a couple of the templates
  • Template edits, if needed, now use only a single variable in each case
  • Signature custom smilie support added
  • Fixed attachments showing when posted inline within the same post (this only affects a very small amount of installations to start with, which is why it took so long to replicate, and I can not replicate this with every installation)


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 (does not include the new social network fuctionality that was added with v3.7.0 yet, it is on my to-do list)
  • 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 ms_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.


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, and when I feel the urge to work on this hack. And as I have now completely lost the urge, it means that the rest of the requests will never be added.
  1. [s]Signature custom smilie support[/s] - DONE
  2. [s]Fully phrase the hack[/s] - DONE
  3. [s]Usergroup Permissions - disabled by default[/s] - DONE
  4. [s]Profile Comments custom smilie support[/s] - Will never be done
  5. [s]Album Comments custom smilie support[/s] - Will never be done
  6. [s]Social Group Comments custom smilie support[/s] - Will never be done
  7. [s]Admin Control Panel utility to view/delete one, some or all custom smilies[/s] - Will never be done
  8. [s]vB Blog custom smilie support[/s] - Will never be done


Version History

v3.7.005 - Wednesday 1st October 2008
-- Final Release
-- Fixed: Workaround for people having issues with uploading smilies from a url
-- Added: AdminCP Option to allow for which upload option shows for the end user
-- Added: Phrase for navbits - this hack is now fully phrased
-- Changed: mysmiliesvb.php file
-- Changed: MYSMILIES_MAIN template
-- Changed: Usergroup permissions - Can use custom smilies? now set to No by default

v3.7.004 - Thursday 7th August 2008
-- Fixed: Attachments were showing when the attachment was shown inline in the same post
-- Added: AdminCP Option to turn this fix On or Off

v3.7.003 - Wednesday 16th July 2008
-- Fixed: Cached templates
-- Changed: mysmilies_delete template
-- Added: Signature custom smilie support
---- thread/post creation
---- thread/post preview
---- postbit (including postbit_legacy)
---- edit signature
---- signature preview
---- user profile

v3.7.002 - Thursday 29th May 2008
-- Fixed: SQL Error problems some people upgrading from the v3.6.x version of this hack were having

v3.7.001 - Wednesday 14th May 2008
-- Initial v3.7.0 release


Thanks

My thanks go out to Kentaurus (who originally created this fantastic hack I have updated), and also to Paul M who gave me 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 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.

RvG2 05-14-2008 02:09 AM

Many Thanks! :)

meraia 05-14-2008 03:24 AM

Thanks ;)

lolo? 05-14-2008 05:07 AM

Thanks i try this ;)

Mosh 05-14-2008 06:27 AM

Quote:

Originally Posted by RvG2 (Post 1518976)
Many Thanks! :)

Quote:

Originally Posted by meraia (Post 1519016)
Thanks ;)

If you are using this, then please click Mark as Installed, as I noticed that you have both downloaded this hack.

Betablocker 05-14-2008 06:32 AM

Thanks for this update.

I have this problem when i import the xml file.


Database error in vBulletin 3.7.0:

Invalid SQL:

CREATE TABLE `DTP_mysmiliesvb` (
`mysmiliesvbid` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`dateline` int(10) unsigned NOT NULL default '0',
`filename` varchar(100) NOT NULL default '',
`filesize` int(10) unsigned NOT NULL default '0',
`width` smallint(5) unsigned NOT NULL default '0',
`height` smallint(5) unsigned NOT NULL default '0',
`smilietext` varchar(20) NOT NULL,
`smilietext_parsed` varchar(60) NOT NULL,
PRIMARY KEY (`mysmiliesvbid`)
);

MySQL Error : Table 'DTP_mysmiliesvb' already exists
Error Number : 1050

MySQL Version : 5.0.27

Now i did have the other version installed still....

I did try it after a uninstall also and got the same problem.


I have been up all night so.....good chance it is my fault :)

Any help would be great.

Cheers Beta.

Mosh 05-14-2008 07:18 AM

Quote:

Originally Posted by Betablocker (Post 1519092)
Thanks for this update.

I have this problem when i import the xml file.


Database error in vBulletin 3.7.0:

Invalid SQL:

CREATE TABLE `DTP_mysmiliesvb` (
`mysmiliesvbid` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`dateline` int(10) unsigned NOT NULL default '0',
`filename` varchar(100) NOT NULL default '',
`filesize` int(10) unsigned NOT NULL default '0',
`width` smallint(5) unsigned NOT NULL default '0',
`height` smallint(5) unsigned NOT NULL default '0',
`smilietext` varchar(20) NOT NULL,
`smilietext_parsed` varchar(60) NOT NULL,
PRIMARY KEY (`mysmiliesvbid`)
);

MySQL Error : Table 'DTP_mysmiliesvb' already exists
Error Number : 1050

MySQL Version : 5.0.27

Now i did have the other version installed still....

I did try it after a uninstall also and got the same problem.


I have been up all night so.....good chance it is my fault :)

Any help would be great.

Cheers Beta.

In your AdminCP:

Click Maintenance -> Execute SQL Query

In the Manual Query box, type the following:
[sql]DROP TABLE DTP_mysmiliesvb;[/sql]

Then click Continue.

That should drop the table. You can then install my hack :)

You may need to run the following manual queries (run each query individually) if you are still having problems:

[sql]ALTER TABLE DTP_usergroup DROP mysmiliesvb_maxwidth;[/sql]
[sql]ALTER TABLE DTP_usergroup DROP mysmiliesvb_maxheight;[/sql]
[sql]ALTER TABLE DTP_usergroup DROP mysmiliesvb_maxsize;[/sql]
[sql]ALTER TABLE DTP_usergroup DROP mysmiliesvb_totalsmilies;[/sql]
[sql]ALTER TABLE DTP_usergroup DROP mysmiliesvb_totalsize;[/sql]

If anyone else is having problems then they can try the above queries.

NOTE: You will need to replace DTP_ with your Table Prefix if they have one, if you do not use them, then delete the DTP_ bits altogether before running each query.

TheProphet 05-14-2008 07:44 AM

Thx for the port...

KURTZ 05-14-2008 08:45 AM

just tagged ... keep the good job Mosh ;)

lolo? 05-14-2008 04:03 PM

i have one question
it's possible to make compatible with mgc shoutbox ?

Kentaurus 05-14-2008 04:58 PM

oh nice :) I'll leave it to you then, Mosh :) No need for me rereleasing it

hilfe-forum 05-14-2008 05:52 PM

:up:

Install & MOTM Nomination

Betablocker 05-14-2008 07:10 PM

Ok Mosh thanks for getting back so quick

Done that and now i get this when i try to install

Database error in vBulletin 3.7.0:

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

MySQL Error : Duplicate column name 'mysmiliesvb_permissions'
Error Number : 1060

I have also got GTSmiliebox - Move Smilies Below Editor
And Smilies in Quickreply

Maybe they dont like each other or maybe they are out of date also and i need to remove them all and restart my add ons.

Cheers

Big Boss 05-14-2008 10:17 PM

Thanks a lot for this! I'll be checking this out like real soon.

Mosh 05-15-2008 12:24 AM

Quote:

Originally Posted by Kentaurus (Post 1519538)
oh nice :) I'll leave it to you then, Mosh :) No need for me rereleasing it

Hey Rigel,

I was just releasing an interim release while you got yours ready, but if you are not going to bother with your release, I will then take over where you left off :)

But you may get the odd PM here and there asking about parts of your code, when I get stuck :)

And if you want to help with support, then I would more than welcome it :)

Cheers,

Mosh :)

Mosh 05-15-2008 12:26 AM

Quote:

Originally Posted by Betablocker (Post 1519709)
Ok Mosh thanks for getting back so quick

Done that and now i get this when i try to install

Database error in vBulletin 3.7.0:

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

MySQL Error : Duplicate column name 'mysmiliesvb_permissions'
Error Number : 1060

I have also got GTSmiliebox - Move Smilies Below Editor
And Smilies in Quickreply

Maybe they dont like each other or maybe they are out of date also and i need to remove them all and restart my add ons.

Cheers

Uninstall the product, do all the queries, then re-install the product, that should fix it up.

Let me know if it does not work if you do it in that order.

toucan42 05-15-2008 01:49 AM

Any chance of getting the "My smilies" to not show unless clicking the more link?

gator777 05-15-2008 03:13 AM

Nice plug-in, but is there anyway you can make it so the user cannot hot-link to an external URL? I would like all images come from my site "only", and not from other websites. :D

Thanks.

Mosh 05-15-2008 07:33 AM

Quote:

Originally Posted by toucan42 (Post 1520056)
Any chance of getting the "My smilies" to not show unless clicking the more link?

I will look into it and let you know.

Mosh 05-15-2008 07:35 AM

Quote:

Originally Posted by gator777 (Post 1520089)
Nice plug-in, but is there anyway you can make it so the user cannot hot-link to an external URL? I would like all images come from my site "only", and not from other websites. :D

Thanks.

Even if you enter a url, it will take the image from that site, and store the image locally in your ./mysmilies directory. So your members are not actually hotlinking to any sites at all :)

lolo? 05-15-2008 07:57 AM

Quote:

Originally Posted by lolo? (Post 1519492)
i have one question
it's possible to make compatible with mgc shoutbox ?

no?

Mosh 05-15-2008 08:12 AM

Quote:

Originally Posted by lolo? (Post 1520237)
no?

I do not have MGC Chatbox installed and am not really interested in installing it, so probably not. Sorry.

Suicide BULLET 05-15-2008 12:37 PM

is it possible to make it compatible with members profile, albums and groups ?

toucan42 05-15-2008 12:40 PM

Quote:

Originally Posted by Mosh (Post 1520223)
I will look into it and let you know.

Excellent - thanks Mosh.

I have many users who are fond of smilies and I personally only offer about 20 or so - I don't like the super animated ones some of my member do, but when they add them it kinds messes up the display because My Smilies show above the defaults. Thanks for a great mod - this really let me give my members something they have been asking for without muddying up the default smilies I offer.

Mosh 05-15-2008 12:54 PM

Quote:

Originally Posted by Suicide BULLET (Post 1520430)
is it possible to make it compatible with member profiles, albums and groups ?

Can you please elaborate?

Also, if you are using this hack, please click Mark as Installed.

balance12 05-15-2008 01:34 PM

i installed, but it dhot shows the options to upload the smile in control panel #My Smiles" , nothing relationates with the hack. I done the template modifications.. but nothing..

balance12 05-15-2008 01:53 PM

Fixed.... it was a permission problem..-.

Suicide BULLET 05-15-2008 02:41 PM

Quote:

Originally Posted by Mosh (Post 1520443)
Can you please elaborate?

Also, if you are using this hack, please click Mark as Installed.

After adding a customized smilies I tried to use them in a post, it works perfect. Then I tried using them in members profile (visitors message), albums comments and groups but I got the smilie replacement, hope you understand :)

Marked as install :)

John Stone 05-15-2008 09:06 PM

This is a seriously cool hack. My members are going to love this.

Installed/MOTM.

post above mine makes a good point, would love to see that fixed. :)

John Stone 05-15-2008 09:36 PM

Oh, the smiles don't show (just the replacement text) when someone is quoted. Is there any way to fix this?

John Stone 05-15-2008 10:42 PM

I had to uninstall...

This hack is promising, but very buggy right now. In addition to the above issues, whenever an attachment is made to a post and then added "inline", upon refresh the image is shown twice (inline and attached). When I disabled the hack, the problem went away.

I really want to use this, but it needs some work. :)

Mosh 05-15-2008 10:42 PM

Quote:

Originally Posted by Suicide BULLET (Post 1520572)
After adding a customized smilies I tried to use them in a post, it's work perfect. Then I tried using them in members profile (visitors message), albums comments and groups but I got the smilie replacement, hope you understand :)

Marked as install :)

I think I understand :)

Will look into it :)

Mosh 05-15-2008 11:23 PM

Quote:

Originally Posted by John Stone (Post 1521079)
Oh, the smiles don't show (just the replacement text) when someone is quoted. Is there any way to fix this?

That is supposed to be the way it works, the replacement will only show in posts by the person who "owns" the custom smilie, quoting it would defeat the objective of the smilie belonging to the original poster. Also, it prevents conflicts if two users have the same replacement text, ie :mysmile:, which one would be used? It would take quite a bit more coding to get around that.

Quote:

Originally Posted by John Stone (Post 1521134)
I had to uninstall...

This hack is promising, but very buggy right now. In addition to the above issues, whenever an attachment is made to a post and then added "inline", upon refresh the image is shown twice (inline and attached). When I disabled the hack, the problem went away.

I really want to use this, but it needs some work. :)

That is a bug that reported in the original hack, I have just had to read through about 160 odd posts of the original hack to find out that it was never fixed.

I would also like to point out that it is not "very buggy", as this is the only bug that has come to light so far, that has not yet been fixed in the original hack.

The other stuff is just requests to make it work with certain features.

You have to remember that I did not originally create this hack, I just ported it, so there are bound to be things that do not work the way they should in the first release, as I am constantly learning about the code that Kentaurus created.

So, I will look into it asap, and it will be fixed in the next update :)

gator777 05-15-2008 11:23 PM

Quote:

Originally Posted by Mosh (Post 1520224)
Even if you enter a url, it will take the image from that site, and store the image locally in your ./mysmilies directory. So your members are not actually hotlinking to any sites at all :)

Very nice! Thanks, Mosh :D

John Stone 05-15-2008 11:41 PM

Quote:

Originally Posted by Mosh (Post 1521151)
That is supposed to be the way it works, the replacement will only show in posts by the person who "owns" the custom smilie, quoting it would defeat the objective of the smilie belonging to the original poster. Also, it prevents conflicts if two users have the same replacement text, ie :mysmile:, which one would be used? It would take quite a bit more coding to get around that.

It would be nice, but I fully understand. :)



Quote:

Originally Posted by Mosh (Post 1521151)
That is a bug that reported in the original hack, I have just had to read through about 160 odd posts of the original hack to find out that it was never fixed.

I would also like to point out that it is not "very buggy", as this is the only bug that has come to light so far, that has not yet been fixed in the original hack.

The other stuff is just requests to make it work with certain features.

You have to remember that I did not originally create this hack, I just ported it, so there are bound to be things that do not work the way they should in the first release, as I am constantly learning about the code that Kentaurus created.

So, I will look into it asap, and it will be fixed in the next update :)

Fair enough, I apologize if my wording seemed harsh. I didn't mean it that way. :)

I'm sure you'll get things sorted--thanks! :up:

Mosh 05-16-2008 01:10 AM

Quote:

Originally Posted by John Stone (Post 1521134)
<snippit>whenever an attachment is made to a post and then added "inline", upon refresh the image is shown twice (inline and attached). When I disabled the hack, the problem went away.</snippit>

I have tried to duplicate this problem you are having in Firefox, IE and Opera and can not replicate the issue (see attachments for tests) you are having.

Can you create a new style from the the master style (this should give you the default vBulletin style) and see if the same problem occurs?

John Stone 05-16-2008 10:32 AM

Quote:

Originally Posted by Mosh (Post 1521204)
Can you create a new style from the the master style (this should give you the default vBulletin style) and see if the same problem occurs?

Hi Mosh,

Thanks for looking into it so quickly.

Yes, I created a fresh unmodified style and it still happens. What I do is upload an attachment, then insert the attachment "inline" by clicking the attachment icon and then the name of the attached image to insert it "inline" in my post. At that point it looks fine, but after a refresh it shows "inline" and then again at the end of the post as an attachment. It's happening to all users in all browsers. Please see attached screenshot.

Zweeper 05-17-2008 07:08 AM

i have a problem, i can not use the "add smiliey by url" function.
there just comes the error "wrong url", by every url i tried.
what did i wrong?

Betablocker 05-18-2008 02:52 PM

Quote:

Originally Posted by Mosh (Post 1520011)
Uninstall the product, do all the queries, then re-install the product, that should fix it up.

Let me know if it does not work if you do it in that order.

Sorry to be the only one with problems :(

I did it again the right order.....nothing to uninstall i must have done it already.

So i got this error for each step but with different table names..

An error occurred while attempting to execute your query. The following information was returned.
error number: 1091
error desc: Can't DROP 'mysmiliesvb_totalsize'; check that column/key exists


When i try to install now i get this error


Database error in vBulletin 3.7.0:

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

MySQL Error : Duplicate column name 'mysmiliesvb_permissions'
Error Number : 1060
Request Date : Sunday, May 18th 2008 @ 04:31:18 PM
Error Date : Sunday, May 18th 2008 @ 04:31:18 PM
Script : http://www.webaddy/vb/admincp/plugin...=productimport
Referrer :
IP Address : ip
Username : Betablocker
Classname : vB_Database
MySQL Version : 5.0.27

But if i go into phpmyadmin i can see DTP_mysmiles blah blah
and if i click on it i get 9 tables ......

i dont play in there very often but just went to look again.........last time i ticked them all and dropped them......me noob :D


So sorry to be a pain.

shinydarkstone 05-18-2008 08:51 PM

no problem
i found the error and fixedit


All times are GMT. The time now is 03:14 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.01492 seconds
  • Memory Usage 1,894KB
  • 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
  • (21)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