![]() |
Fantastic Mod.
How could I make this available to just my premium members? |
Quote:
|
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
|
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? |
Quote:
|
Quote:
|
Quote:
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. :confused: 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:rolleyes: ) but i dont know what i,m missing Greetz |
Kentaurus ... do you have any kind of standard guidelines for coders who want to support MySmilies in other mods?
-- hugh |
Quote:
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. |
Quote:
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. |
All times are GMT. The time now is 07:07 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|