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

Reply
 
Thread Tools
MySmilies VB Details »»
MySmilies VB
Version: 1.00, by Kentaurus Kentaurus is offline
Developer Last Online: Jul 2014 Show Printable Version Email this Page

Category: Major Additions - Version: 3.6.8 Rating:
Released: 01-01-2007 Last Update: 01-04-2007 Installs: 141
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

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.

Show Your Support

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

Comments
  #82  
Old 01-07-2007, 10:05 PM
vBulletin THEN DAYLIGHT vBulletin THEN DAYLIGHT is offline
 
Join Date: Oct 2005
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fantastic Mod.

How could I make this available to just my premium members?
Reply With Quote
  #83  
Old 01-07-2007, 10:18 PM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vBulletin THEN DAYLIGHT View Post
Fantastic Mod.

How could I make this available to just my premium members?
I suppose your premium members are in a single usergroup, only give permissions to that usergroup.
Reply With Quote
  #84  
Old 01-08-2007, 07:26 AM
basilrath's Avatar
basilrath basilrath is offline
 
Join Date: Apr 2006
Posts: 741
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

do it as a promoted group , then premium who are in it are ok those who aspire to or pay towards are therefore eligble when you have stipulated within that promotion goup
Reply With Quote
  #85  
Old 01-08-2007, 09:01 AM
Cees Cees is offline
 
Join Date: Dec 2006
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi
I followed the read me , and did everything but it doesnt work... I cant see my smilies in the usercp
What im doing wrong?
Reply With Quote
  #86  
Old 01-08-2007, 04:28 PM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Cees View Post
Hi
I followed the read me , and did everything but it doesnt work... I cant see my smilies in the usercp
What im doing wrong?
You are probably missing a template modification. You can always access mysmiles at: http://YOUR_FORUM/mysmiliesvb.php
Reply With Quote
  #87  
Old 01-09-2007, 12:45 PM
Martin-TMGRS Martin-TMGRS is offline
 
Join Date: May 2005
Location: Coventry
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kentaurus View Post
Do you get any error message? Does the page only reload without deleting the smilie?
No I dont get any error message. Yes the page just reloads with the same icon there
Reply With Quote
  #88  
Old 01-09-2007, 02:01 PM
Cees Cees is offline
 
Join Date: Dec 2006
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kentaurus View Post
You are probably missing a template modification. You can always access mysmiles at: http://YOUR_FORUM/mysmiliesvb.php
Ok uninstall them, install them again i used the read me file, followed the steps, and changed the following rules:
Step 5. Template modifications
===================================
In the template USERCP_SHELL
Find
-------------------
<tr>
<td class="thead">$vbphrase[miscellaneous]</td></tr>
Replace it with
-------------------
<tr>
<td class="thead">$vbphrase[mysmiliesvb_mysmilies]</td>
</tr>
<tr>
<td class="$navclass[mysmiliesvb]" nowrap="nowrap"><a class="smallfont" href="mysmiliesvb.php?$session[sessionurl]">$vbphrase[mysmiliesvb_mysmilies]</a></td>
</tr>
<tr>
<td class="thead">$vbphrase[miscellaneous]</td>
</tr>

IN the template navbar
Find
-------------------
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
Replace it with
-------------------
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
<tr><td class="vbmenu_option"><a href="mysmiliesvb.php?$session[sessionurl]">$vbphrase[mysmiliesvb_mysmilies]</a></td></tr>

DONE!!!

Thats all. I thougt, but it isnt working. If I use the direct url it works, but i dont see them in any usercp


Maybe im missing something ( i use vb since a short time ) but i dont know what i,m missing

Greetz
Reply With Quote
  #89  
Old 01-09-2007, 11:14 PM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kentaurus ... do you have any kind of standard guidelines for coders who want to support MySmilies in other mods?

-- hugh
Reply With Quote
  #90  
Old 01-10-2007, 05:00 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cheesegrits View Post
Kentaurus ... do you have any kind of standard guidelines for coders who want to support MySmilies in other mods?

-- hugh
The code for parsing the smilies is inside bbcode_parse, the routine that vbulletin uses for parsing bbcodes, smilies, and parsing any kind of post content. Most hacks use a call to bbcode_parse, via using a BBcode parser class that is already available or creating a new one.

Because of that, the MySmilies functionality is already there. It's just that it's not being called because the hack needs to know that the userid is, the user that owns the smilies, that is. Since I didn't want to modify the function call to the bbcode_parse functions I used a global variable instead of adding parameters to the function. This is by far not the best design approach, but it is the most flexible since it requires no code modifications.

For any other hack, before your call to bbcode_parse, issue a:

$GLOBALS['mysmiliesvb_userid'] = USERID;

Where userid is the id of the user that owns the smilies. That would vary depending on the context, $vbulletin->userinfo['userid'] holds the user that is currently logged in, but most of the times that's not good, since the custom smilies are user-based then each hack needs to figure out, depending on the context, what user to store in the global variable.

After the bbcode_parse call, I usually do an unset($GLOBALS['mysmiliesvb_userid']). This is not required, it's only polite, to clean up the global variable (since nobody else should be using it after the parsing).

Feel free to PM me if you want me to look at any hack and check if MySmilies could be enabled. Most of the times, if the hack keeps a userid around, it's really easy, and just one line of code.
Reply With Quote
  #91  
Old 01-10-2007, 05:03 AM
Kentaurus's Avatar
Kentaurus Kentaurus is offline
 
Join Date: Dec 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Cees View Post
Ok uninstall them, install them again i used the read me file, followed the steps, and changed the following rules:
Step 5. Template modifications
===================================
In the template USERCP_SHELL
Find
-------------------
<tr>
<td class="thead">$vbphrase[miscellaneous]</td></tr>
Replace it with
-------------------
<tr>
<td class="thead">$vbphrase[mysmiliesvb_mysmilies]</td>
</tr>
<tr>
<td class="$navclass[mysmiliesvb]" nowrap="nowrap"><a class="smallfont" href="mysmiliesvb.php?$session[sessionurl]">$vbphrase[mysmiliesvb_mysmilies]</a></td>
</tr>
<tr>
<td class="thead">$vbphrase[miscellaneous]</td>
</tr>

IN the template navbar
Find
-------------------
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
Replace it with
-------------------
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
<tr><td class="vbmenu_option"><a href="mysmiliesvb.php?$session[sessionurl]">$vbphrase[mysmiliesvb_mysmilies]</a></td></tr>

DONE!!!

Thats all. I thougt, but it isnt working. If I use the direct url it works, but i dont see them in any usercp


Maybe im missing something ( i use vb since a short time ) but i dont know what i,m missing

Greetz

And is that the current sytle that is being used for the forums? The replacements, if done right, add the links to MySmilies You can also try adding a link at the header, or the forumhome... or anywhere for testing.
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 12:09 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.12456 seconds
  • Memory Usage 2,324KB
  • Queries Executed 25 (?)
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
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete