MyBB Community Forums

Full Version: [Tutorial] VBNavBar for MyBB 1.6.x
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Changes to VBNavBar for MyBB 1.6.4
  • Template changes
  • New versions of functions.php and class_templates.php

Template changes
MyBB 1.6.4 introduced a change to the Template System to improve security and this affects one of the template changes required for VBNavBar.

The changes have been made to the main post (for new users) but for existing users of VBNavBar wishing to upgrade to MyBB 1.6.4, you will need to make a change to the following template:

Header Templates / header_welcomeblock_member_admin

From
<td class="tcat" align="center"><img src="{$theme['imgdir']}/vbnb_admincp.png" alt="" title="" class="vbottom" /> <a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php"><strong>{$lang->welcome_admin}</strong></a></td>
to
<td class="tcat" align="center"><img src="{$theme['imgdir']}/vbnb_admincp.png" alt="" title="" class="vbottom" /> <a href="{$mybb->settings['bburl']}/{$admin_dir}/index.php"><strong>{$lang->welcome_admin}</strong></a></td>

New versions of functions.php and class_templates.php
The existing functions.php and class_templates.php have been replaced with new downloads to maintain compatibility with MyBB 1.6.4.
(2011-07-30, 07:09 PM)primster7 Wrote: [ -> ]Hello,

Thanks for the tutorial.

I tried it on a forum running 1.6.3. I then upgraded to 1.6.4 and the menu has the 0's again like in my prior post. I re-uploaded the class_templates.php file again from the first post and it's still messed up. I think that there might have been a change in 1.6.4 where this will not look correctly for some templates.

I installed it on another template (that is like the original) and it works fine.

Do you know what else I can try to get rid of the 0's in the header area?

@primster7: I have just updated the downloads in the first post with the latest functions.php and class_templates.php files for MyBB 1.6.4. Would you mind trying these to see if they will get rid of the zeros? There is also a small change to one of the template edits detailed here.

Quote:@primster7: I have just updated the downloads in the first post with the latest functions.php and class_templates.php files for MyBB 1.6.4. Would you mind trying these to see if they will get rid of the zeros? There is also a small change to one of the template edits detailed here.

Thanks a lot this solved the problem.

Glad it worked Primster - thanks for letting me know!
"Authorization code mismatch. Are you accessing this function correctly? Please go back and try again."

all working fine. but i got this error massage when i going to delete reputation and delete threads
something wrong i cant find what my fault is

help me please
@Bhashana:

Thanks for your reply. Could you let me know which links you're using to delete reputation and threads please?

Am not sure which theme you're using at present as well, but you could try using the 'Find Updated Templates' function as detailed here in case a few of your templates needs to be updated.

I have also found a bug with thanks to your bug report on "Authorization Code Mismatch" (details below) so there will be a code change required for existing users. It only pertains to to the 'Mark All Forums as Read' link though I'm afraid.
--------------------------------------------------------------------------------
Bug fix template edit with thanks to Bhashana to the following template:

Header Templates / header_welcomeblock_member

From
<a href="misc.php?action=markread{$post_code_string}" title="{$lang->vbnavbar_mark_read}">{$lang->vbnavbar_mark_read}</a>

to

<a href="misc.php?action=markread&my_post_key={$mybb->post_code}" title="{$lang->vbnavbar_mark_read}">{$lang->vbnavbar_mark_read}</a>

which amends the "Mark All Forums Read" link in the dropdown menu and corrects the "Authorization code mismatch" error.
BlackEvo4-nature this is my team name.
im using this link for delete rep "http://www.file-keeper.com/forum/reputation.php?action=delete&uid=3&rid=6"

and another problem when i going to use Inline Thread Moderation(delete,move,etc..) i got this error massage

"Sorry, but you did not select any threads to perform inline moderation on, or your previous moderation session has expired (Automatically after 1 hour of inactivity). Please select some threads and try again."

Link : http://www.file-keeper.com/forum/moderation.php
@Bhashana: Thanks for the info as it's helpful.

Unfortunately I haven't been able to duplicate the issue using the default theme, so I think it's very likely that the BlackEvo4-nature theme needs to be updated (using the Find Updated Templates)

One thing I did notice was that the headerinclude section seems to have quite a number of &nbsp; so it might also be worth copying/pasting the headerinclude section first again in to e.g. Notepad and then pasting the 'Notepad' version into the myBB template field?
Quote:&nbsp;&nbsp;&nbsp;&nbsp;var cookieDomain = "{$mybb->settings['cookiedomain']}";

&nbsp;&nbsp;&nbsp;&nbsp;var cookiePath = "{$mybb->settings['cookiepath']}";

&nbsp;&nbsp;&nbsp;&nbsp;var cookiePrefix = "{$mybb->settings['cookieprefix']}";

&nbsp;&nbsp;&nbsp;&nbsp;var deleteevent_confirm = "{$lang->deleteevent_confirm}";

&nbsp;&nbsp;&nbsp;&nbsp;var removeattach_confirm = "{$lang->removeattach_confirm}";

&nbsp;&nbsp;&nbsp;&nbsp;var loading_text = '{$lang->ajax_loading}';

&nbsp;&nbsp;&nbsp;&nbsp;var saving_changes = '{$lang->saving_changes}';

&nbsp;&nbsp;&nbsp;&nbsp;var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";

&nbsp;&nbsp;&nbsp;&nbsp;var my_post_key = "{$mybb->post_code}";

&nbsp;&nbsp;&nbsp;&nbsp;Var imagepath = "{$theme['imgdir']}";

my headerinclude was like this then i removed all &nbsp; now all working fine. thank a lot dude great tut and great helper +rep Heart Heart
Glad it's all working now, Bhashana and thanks for the +rep Smile
awesome
Pages: 1 2 3 4 5 6 7 8 9 10 11 12