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)
-   -   Major Additions - MySmilies VB (https://vborg.vbsupport.ru/showthread.php?t=135336)

Kentaurus 01-01-2007 10:00 PM

MySmilies VB
 
Tested with vb 3.6.8

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 forum smilies.

For users:
  • Users can keep a library of smilies (they can upload them from their computer or web)
  • Users enter their replacement text, for example, :iamhappy: would be changed for his 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)

Installation instructions

See the included readme.txt

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.

Kentaurus 01-02-2007 08:21 PM

Extra resources:
For spanish users, the translation of this hack: (upload it in the Language Manager)
Spanish translation
Instructions for making it work with vbShout 2.0
https://vborg.vbsupport.ru/showpost....4&postcount=54

Changelog

1.03
Upgrade instructions: upgrade the xml product at the admincp
- Added support for MySmilies when previewing a post/thread (newpost/newthread)
- Bug fix: a javascript problem, not on a blank installation but when used along with other hacks (ej. vbPager). Made them coexist.
- Bug fix: When viewing a pm, your smilies were parsed, instead of the pm sender's smilies
- Bug fix: In some WYSIWYG scenarios, a class="inlineimg" appears because of a double parsing. This was fixed.
- Added a hint for adding compatibility for vbShout (check the Extra resources section)

1.02
Upgrade instructions: upgrade the xml product at the admincp
- Bug fix: in the usercp navigation panel the link was showing with no background
- Added an index.html to the mysmiliesvb directory for security

1.01
Upgrade instructions: reupload mysmiliesvb.php
- Bug fix: If a * was found in the replacement text, it was incorrectly parsed
- Added spanish translation in the zip

1.0
- First release

Known bugs:
None yet

StuntFactoryX 01-02-2007 08:36 PM

thank you. installed on 3.6.4

NuclioN 01-02-2007 08:55 PM

Great! :) Installed!

yoyoyoyo 01-02-2007 09:25 PM

sounds cool - I will check it out later.

BuzuL 01-02-2007 10:20 PM

Thanks Nice Modification...

Darmak 01-02-2007 10:22 PM

Muchas gracias hombre, muy bien hack =D

Saludos :p

imfeelingitdawg 01-02-2007 11:13 PM

Very cool! Installed and we'll see how it goes.

FleaBag 01-03-2007 12:04 AM

It's mad, you think you have everything your vB needs and you log on and see a sweet ass hack such as this! Thanking you. :)

Brew 01-03-2007 12:35 AM

This is a great concept but it gives me a couple questions.

Can you add permissions for a per-user basis?

When the user inputs a new keyword will all posts with that keyword use their smilie? or does the new smilie only show in the users posts? Is the new smilie parsed so it will not interfere with current keywords? (if not might I suggest AJAX to make this check on-the-fly?

Are there restrictions on type of images? Can you add an option to limit file types?

Are there instructions for adding the MySmilies dropdown for the Quick Reply box too?

edit...I would like to recommend adding a blank index.html to the zip for the mysmiliesvb directory for security :)

yonglvnv 01-03-2007 12:54 AM

Quote:

Originally Posted by FleaBag (Post 1149519)
It's mad, you think you have everything your vB needs and you log on and see a sweet ass hack such as this! Thanking you. :)

I second that.

Great mod. installed and voted MOTM!

Kentaurus 01-03-2007 01:18 AM

Quote:

Can you add permissions for a per-user basis?
No, but you can always create a usergroup and add that only user to it :)

Quote:

When the user inputs a new keyword will all posts with that keyword use their smilie? or does the new smilie only show in the users posts? Is the new smilie parsed so it will not interfere with current keywords? (if not might I suggest AJAX to make this check on-the-fly?
Depends on how you configure the hack. The default behavior is that if the user enters a new smilie, the smilie is only used in the new posts for that user.

You can configure the hack in such way that every time a user adds a new smilie then the cache is cleared (and, all his posts are updated the next time someone views them), but this is somehow server intensive and is disabled by default.

Please keep in mind that the smilie is only available for the user that uploaded it. Anyone else using that keyword will not get the smilie. When a user adds a smilie it is checked against his smilies (no duplicated keywords allowed) and against the forum smilies (cannot override forum smilies).

Quote:

Are there restrictions on type of images? Can you add an option to limit file types?
You can restrict size and dimensions. Any image type is allowed (gif, jpg, png)

Quote:

Are there instructions for adding the MySmilies dropdown for the Quick Reply box too?
I don't think that's default in vbulletin? Quick reply doesn't have a smilie dropdown. Since the hack extends the current smilies behavior I suppose if standard smilies were added to the quickreply custom smilies would appear, too.

Quote:

edit...I would like to recommend adding a blank index.html to the zip for the mysmiliesvb directory for security :)
Thanks, will do.

Brew 01-03-2007 01:33 AM

One little thing I've found:

In the usercp the background of the text in the left panel is black. The main user control panel page that is...

With a white skin it's hard to see.

Looks like it's missing some css code or something :)

Exitilus 01-03-2007 01:40 AM

Hmm..... I've just installed this and I'm trying to upload a smiley to test .. getting the error Imageinfo Failed:

Kentaurus 01-03-2007 01:48 AM

Quote:

Originally Posted by Exitilus (Post 1149584)
Hmm..... I've just installed this and I'm trying to upload a smiley to test .. getting the error Imageinfo Failed:

That seems to be an imagemagick error (vbulletin can use either gd or imagemagick), are you uploading an smilie inside the allowed dimensions (60X60 is the default), otherwise vbulletin will try to resize the image to fit.

This problem is not specific to this mod, but to imagemagick, I found the following thread that might help:
http://www.vbulletin.com/forum/showthread.php?t=177800

Exitilus 01-03-2007 02:02 AM

I found the issue. VBulletin didn't like the image so I just resaved it. Thanks for the suggestion as it allowed me to find out what was going on :)

Kentaurus 01-03-2007 02:13 AM

Quote:

Originally Posted by Brew (Post 1149581)
One little thing I've found:

In the usercp the background of the text in the left panel is black. The main user control panel page that is...

With a white skin it's hard to see.

Looks like it's missing some css code or something :)

Fixed and updated zip, thank you :) The background css class was not being created. A plugin was added.

Exitilus 01-03-2007 02:25 AM

BTW will it error out if someone else has already used the same replacement variable or image ?

Brew 01-03-2007 02:34 AM

Excellent work, Kentaurus!

Ver1.02 fixed the css problem.

Great mod man

Bounce 01-03-2007 02:41 AM

Installed and working great, superb hack Kentaurus

Nominated also and clicked install, many thanks , my users will love this :cool:

Kentaurus 01-03-2007 02:50 AM

Quote:

Originally Posted by Exitilus (Post 1149612)
BTW will it error out if someone else has already used the same replacement variable or image ?

No, because if, for example I use :santaclaus: with an image, an another user uses the same keyword or replacement text :santaclaus: with another image then...

when I write :santaclaus: in a post, it will be replaced with my image
when the other user writes :santaclaus: in his post, it will be replaced with his image
when any other user writes :santaclaus: in a post... it will be ignored because he doesn't have a smilie for that :) And the literal text, :santaclaus: will be displayed

A single user cannot have two images for the same replacement text, tough, and that do error out

Bounce 01-03-2007 03:11 AM

Quote:

Originally Posted by Kentaurus (Post 1149627)

when I write :santaclaus: in a post, it will be replaced with my image
when the other user writes :santaclaus: in his post, it will be replaced with his image
when any other user writes :santaclaus: in a post... it will be ignored because he doesn't have a smilie for that :) And the literal text, :santaclaus: will be displayed

A single user cannot have two images for the same replacement text, tough, and that do error out

absolutely top class if i may say so :cool:

Exitilus 01-03-2007 04:29 AM

NM :) I just noticed it renames the image so there cannot be any sort of conflict.

apdcanari 01-03-2007 06:11 AM

Works 3.5 ???

Tks,

C?dric :rolleyes:

VaaKo 01-03-2007 08:41 AM

Its not working, I've uploaded a smilie and tried using it in the shoutbox (vbshout) but it didn't work!

Lionel 01-03-2007 08:57 AM

it works but i get a javascript error in showthread, expecting string, identifier or number

bollie 01-03-2007 09:08 AM

If I want post, am possible I nothing more uses.

NuclioN 01-03-2007 10:44 AM

Works fine but the :smiley: codes are not working in the vbshoutbox. How to do that?

Calash 01-03-2007 11:25 AM

Very very cool, thank you for posting this.

I noticed that if you preview a post it does not show the MySmilies, but once you submit the thread it takes care of it. Not a big issue IMHO but it is a bit of a glitch.

Scormen 01-03-2007 12:42 PM

Works great! Thank you!

Bounce 01-03-2007 01:54 PM

Quote:

Originally Posted by hIBEES (Post 1149619)
Installed and working great

Famous last words lol......



They do not work in quotes
Quote:

quotes.. all you get is the code that the user has selected :IETHS:
Or previews in either thread or Private Message

See what I mean here , posts 5 & 6

projectego 01-03-2007 02:02 PM

This sounds awesome! Thank you very much!

Mr Pink 01-03-2007 02:04 PM

Really great idea. I click install. :)

Kentaurus 01-03-2007 02:26 PM

Quote:

Originally Posted by VaaKo (Post 1149730)
Its not working, I've uploaded a smilie and tried using it in the shoutbox (vbshout) but it didn't work!

That'd be because there is no support fot the shoutbox (vbshout), as that is a separate hack and not really part of the vbulletin base installation.

Depending on vbshout, it could be easy or difficult to add, I'd need to check it out. For this hack to work, I need to know what the user that published the post / pm, is, that is, the userid, since the smilies are private to him and are only parsed in his posts.... and since vbshout is not passing the information about who left the message.... that'd need to be added for the hack to work in vbshout too.

Kentaurus 01-03-2007 02:27 PM

Quote:

Originally Posted by apdcanari (Post 1149695)
Works 3.5 ???

Tks,

C?dric :rolleyes:

No idea. It was tested on 3.6.4. But feel free to try it on a test board and tell us ;) I'll check if I still have access to the 3.5 download on vbulletin

Kentaurus 01-03-2007 02:29 PM

Quote:

Originally Posted by Lionel (Post 1149737)
it works but i get a javascript error in showthread, expecting string, identifier or number

Do you have a page in which I could check the error? That error doesn't seem to come from this hack... since it doesn't use any javascript at all.... no javascript code is added or modified. A javascript error in showthread is unlikely since it only translates from text to an <img> tag

But I see that a javascript could happen in quickreply (if you have smilies enabled there) or in newthread in the special scenario that your smilie has a ' in it....

Kentaurus 01-03-2007 02:41 PM

Quote:

Originally Posted by hIBEES (Post 1149875)
Famous last words lol......



They do not work in quotes Or previews in either thread or Private Message

See what I mean here , posts 5 & 6

Um... should they work in quotes?

A quote is more generic, is not always a quote of a post from other user. A special parsing would be needed to consider the scenario.

Since the smilies are user-based, two users can have the same keyword for different smilies, or they could have a completely different set of smilies, meaning that when I parse the quote... I'd need to parse it not with the smilies from the user that published the post, but with the smilies of the user that was quoted. This, at the very least, duplicates the work that needs to be done.

The quotes, I'll leave it for a version 2 until I figure out an optimized way to do it.

The error with the preview not showing the smilies will be fixed.

Cyricx 01-03-2007 03:10 PM

This is unbelievable. I can't wait to test this out.

Nice looking mod!! :)

bollie 01-03-2007 03:34 PM

Can someone help me with these ?
I Post New Thread but Smilies and work no longer.

fsakbas 01-03-2007 03:45 PM

Thanks thats working good. In my forum many people said your smilies not good etc. and my problem resolve with this hack.

Sorry my English.


All times are GMT. The time now is 12:21 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.02265 seconds
  • Memory Usage 1,829KB
  • 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
  • (16)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