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)

vBulletin THEN DAYLIGHT 01-07-2007 10:05 PM

Fantastic Mod.

How could I make this available to just my premium members?

Kentaurus 01-07-2007 10:18 PM

Quote:

Originally Posted by vBulletin THEN DAYLIGHT (Post 1152891)
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.

basilrath 01-08-2007 07:26 AM

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

Cees 01-08-2007 09:01 AM

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?

Kentaurus 01-08-2007 04:28 PM

Quote:

Originally Posted by Cees (Post 1153430)
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

Martin-TMGRS 01-09-2007 12:45 PM

Quote:

Originally Posted by Kentaurus (Post 1152824)
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

Cees 01-09-2007 02:01 PM

Quote:

Originally Posted by Kentaurus (Post 1153751)
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. :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

cheesegrits 01-09-2007 11:14 PM

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

-- hugh

Kentaurus 01-10-2007 05:00 AM

Quote:

Originally Posted by cheesegrits (Post 1155028)
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.

Kentaurus 01-10-2007 05:03 AM

Quote:

Originally Posted by Cees (Post 1154593)
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. :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


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
  • Page Generation 0.02233 seconds
  • Memory Usage 1,751KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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