PDA

View Full Version : Forum Home Enhancements - [AJAX] Tab Menu For Forum Home


NsT
06-06-2008, 10:00 PM
Okay so this is my first contribution to Vbulletin fans. I'm not a coder but I know a little bit about PHP and Javascripts.

After installing the Tabbed Forum Home by bobster65 here (https://vborg.vbsupport.ru/showthread.php?t=175687) (well done, bobster65!) I decided to make a similar mode using Ajax because I want to reduce the initial load of the forum.

So basically this mod will apprear almost exactly the same as bobster65's mod but the way it works is totally different.

Since this is the beta version which I spent around 2 hours to code and test, please don't expect too much :D Because I don't know much about coding, I will not be able to make this mod become a product. Probably someone else better than me can do this.

Update:

25/06/08 - Version 1.3: Fix problem with category's description and category ID on tabs_forumbits template. Remember to update tabs_forumbits template and replace old tabs.php by new tabs.php.

09/06/2008 - Version 1.2: Fix problem with loading default tab initially when member access index.php. Now can load as many categories as you want. 01 new template is created. For whom is using older version, when upgrading to 1.2, please update all new template contents as below.

07/06/2008 - Version 1.1: I found problem with restricted forum so I updated the code to fix this problem. Please make sure you have latest version.

07/06/2008 - Version 1.0: I have revised the code on the tab menu to make it simple to config the tab. I added some codes to set the selected tab.

================================================== ====
LET'S START
================================================== ====

1/ Upload the tabs.js to folder clientscript (i.e: www.yourdomain.com/forum/clientscript/tabs.js)

2/ Upload the tabs.css and 2 gif images to folder clientscript/vbulletin_css/ (i.e: www.yourdomain.com/forum/clientscript/vbulletin_css/tabs.css)

3/ Upload tabs.php to your forum root (i.e: www.yourdomain.com/forum/tabs.php)

4/ Go to your Admin CP and create a new child style from your current style.

5/ On the new style your have just created, from the Template Options, choose "Add New Template" and name it tabs_forumhome.

Copy the below code and paste to the Template section and submit:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr align="center">
<td class="thead">&nbsp;</td>
<td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="175">$vbphrase[last_post]</td>
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
</thead>
$forumbits
<tbody>
<tr>
<td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong>
<a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a>
<if condition="$vboptions['forumleaders']">&nbsp; &nbsp;
<a href="showgroups.php$session[sessionurl_q]">$vbphrase[view_forum_leaders]</a></if>
</strong></div></td>
</tr>
</tbody>
</table>
$forumhome_markread_script

6/ Do step 5 again and name it tabs_forumbits copy and paste the following code into Template section:
<tbody>
<tr>
<td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><a style="float:right" href="#top" onclick="return toggle_collapse('forumbit_$tabs[id]')"><img id="collapseimg_forumbit_$tabs[id]" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=$tabs[id]">$tabs[title]</a></td><tr>
<td class="smallfont" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>">$tabs[description]</td>
</tr>
</tbody>

<tbody id="collapseobj_forumbit_$tabs[id]" style="">$tabs[forumbits]</tbody>

7/ Now you need to create a new template for login required forum. Do step 5 again and name it tabs_loginrequired and paste the below code into Template section:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="70%" align="center">
<tr>
<td class="tcat">$vbphrase[vbulletin_message]</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">

<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
<input type="hidden" name="do" value="login" />
<input type="hidden" name="url" value="$scriptpath" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
$postvars

<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />

<blockquote>
$vbphrase[not_logged_no_permission]<br /> <br />
1. $vbphrase[not_logged_in_fill_in_form]<br />
2. $vbphrase[may_not_have_sufficient_privileges]<br />
3. $vbphrase[administrator_may_disabled_account]<br />
</blockquote>

<fieldset class="fieldset">
<legend>$vbphrase[log_in]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" align="center">
<tr>
<td>$vbphrase[username]:<br /><input type="text" class="bginput" name="vb_login_username" size="50" accesskey="u" tabindex="1" /></td>
</tr>
<tr>
<td>$vbphrase[password]:<br /><input type="password" class="bginput" name="vb_login_password" size="50" tabindex="1" /></td>
</tr>
<tr>
<td>
<span style="float:$stylevar[right]"><a href="login.php?$session[sessionurl]do=lostpw">$vbphrase[forgotten_your_password]</a></span>
<label for="cb_cookieuser"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser" tabindex="1" />$vbphrase[remember_me]</label>
</td>
</tr>
<tr>
<td align="$stylevar[right]">
<input type="submit" class="button" value="$vbphrase[log_in]" accesskey="s" tabindex="1" />
<input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" tabindex="1" />
</td>
</tr>
</table>
</fieldset>

<if condition="$show['register_message']">
<div class="smallfont"><phrase 1="register.php?$session[sessionurl]do=signup">$vbphrase[admin_required_register]</phrase></div>
</if>
</form>

</div>
</div>
</td>
</tr>
</table>


8/ Ok, now you need to modify the FORUMHOME template as following:

Add this code between <head> and </head>

<script type="text/javascript" src="clientscript/tabs.js"></script>
<link rel="stylesheet" type="text/css" href="clientscript/vbulletin_css/tabs.css" />


Now replace all codes between <!-- main --> and <!-- /main --> by this code:

New code update 07/06/2008

<!-- Tab menu by NsT @ RCHobby365 -->
<!-- Default tab ID to load initially -->
<input type="hidden" value="1" id="defaulttab">
<table border="0" width="100%" align="center">
<tr><td>
<div id="tabsF">
<ul>
<li><a href="#1" id="a1"><span id="s1">Category 1</span></a></li>
<li><a href="#2" id="a2"><span id="s2">Category 2</span></a></li>
<li><a href="#3|4" id="a3|4"><span id="s3|4">Category 4</span></a></li>
</ul>
</div>
</td></tr>
<tr><td id="forumbits">

</td></tr></table>
<!-- End tab menu -->


On the <body> tag, add this code:

onLoad="startLoad();"

So the body tag should be like this:

<body onLoad="startLoad();">

Now the mod is almost done. It's time for you to config the tabs. The update on 07/06/2008 basically remove the onClick event to make the tab simpler.

Note: You MUST define a specific tab you want to load initially (this will load a specific tab when user access default url such as: forum/index.php). To do this, you need to enter the value (ID) of the hidden input:

<input type="hidden" value="1" id="defaulttab">

Now the value="1" so it will load category ID=1 if member go to your index.php page. If you want to load several categories, you need to add the category ID into a string seperate by |.

For example: value="1|3" and this will load category 1 and 3. You MUST also have a tab that loads category 1 and 3 or the mod wont work and you will receive an Javascript error.

Exampe: <li><a href="#1|3" id="a1|3"><span id="s1|3">Category 1</span></a></li>

<li><a href="#1" id="a1"><span id="s1">Category 1</span></a></li>

If you want a tab to list a single category with its sub-forums, on the href you just need to enter the category ID after the #:

For example: href="#1" will list Category ID=1 and its sub-forums.

If you want a tab to list multiple category with their sub-forums, you need to enter a string of categories ID.

For example: href="#3|4" will list Category ID=3 and ID=4 with their sub-forums.

You can list as many categories as you want, just add their ID into the string, seperate by "|" and this string must be after the #.

The ID of <a> and <span> tag is used to define the selected tab. The ID is given by the ID of a single category or multiple category with "|". ID of <a> tag starts with "a" and ID of <span> tag starts with "s".

To load all category like normal, you can use this tab:

<li><a href="#all" id="aall"><span id="sall">View All</span> </a></li>

And that's it :D

Hope you will like it and work together to make it better.

Credits:
- Vbulletin functions
- bobster65 for his idea about the tabbed forum.
- Css tab menu by www.exploding-boy.com/images/cssmenus/menus.html

NsT
06-07-2008, 12:00 AM
All comments, errors & bugs reports are greatly appreciated!

I forgot to write on the 1st post that: You still can use Bookmark, Back and Forward button on Firefox browser, but with IE, you can only use Bookmark. It seems IE doesn't store location after # into its history. I will need to work a bit more to fix this :D

Screenshot:

https://vborg.vbsupport.ru/external/2008/06/11.gif

Derek Chai
06-07-2008, 01:01 AM
This is VERY nice thanks.

installed!

NsT
06-07-2008, 01:04 AM
Thanks for your support, please let me know if you feel your forum loads faster?

Reeve of shinra
06-07-2008, 01:13 AM
This looks like a great mod and I think I'll install it. :)

NsT
06-07-2008, 05:15 AM
I just updated a revised version of the tab menu code to make it simpler to config the tabs and add some more code to set the selected tab as the screenshot below:

https://vborg.vbsupport.ru/external/2008/06/10.gif

Cheers

valdet
06-07-2008, 07:35 AM
Great hack. The code is also SE friendly which makes it even better

There are more free menus available at exploding boy's site

http://exploding-boy.com/images/cssmenus/menus.html
http://exploding-boy.com/images/cssmenus2/menus.html

Find you best match and apply this hack

RedTrinity
06-07-2008, 08:37 AM
Works well in FF, but I am getting the following error in IE7....

https://vborg.vbsupport.ru/external/2008/06/58.jpg

And the tabs don't work :(

DssCrazy
06-07-2008, 08:43 AM
Great mod

Thanks

NsT
06-07-2008, 09:07 AM
@ GamerGirl27: I checked your source code and everything seems right, I don't see why it doesn't work with default URL. I'll try to see what's happening.

Can you try to set to a different initial category? For example your category 17. Let see if it works?

RedTrinity
06-07-2008, 09:21 AM
@ GamerGirl27: I checked your source code and everything seems right, I don't see why it doesn't work with default URL. I'll try to see what's happening.

Can you try to set to a different initial category? For example your category 17. Let see if it works?

Hey NsT,

Ok initially I had it set for a few categories for default, now I have just reduced to the one. But its still doing the same thing, unfortunately :confused:

Thanks for your help though, and quick response :D Look forward to getting this working as its just what we need atm!!

Cheers,

Nikki :)

NsT
06-07-2008, 09:38 AM
Hi GamerGirl27,

Sorry that I didn't mention on the 1st post that the initial ID must be the same as one of your tabs ID. It means you can only load a specific tab initially.

I see that you reduce the ID string to 3, however, this is not correct because you don't have any <a> and <span> tag with ID=3.

Can you replace 3 by 17? It's the ID of "State Groups & Events" category. Let see how it works.

Stoebi
06-07-2008, 09:50 AM
Thanks for this nice hack, but ... the hack is not working, if Javascript is off.

If no Javascript is activated, it should fallback to the normal behaviour. There are so much AJAX hacks around here, but all not really usable, because the most of the programmer are not thinking about Non-Javascript user. :(

NsT
06-07-2008, 09:58 AM
Thanks for your comment. Probably in the next version I'll make it workable when Javascript is disable.

In fact, from my experience, 99% of my members use default browser settings and most of them don't know how to disable Javascript. So this mod is okay. I believe disable Javascript is only for people know pretty much about IT and for security reason, Javascript is disable :D

Stoebi
06-07-2008, 02:53 PM
Javascript is first disabled for most of the visited sites, because I hate all the popups on many sites. :( If i can trust a site/forum, I'll activate javascript for this site.

For example, see your demo link without Jajvascript. Without javascript, no forums viewable.:(



Kind Regards,

Stoebi

mokonzi
06-07-2008, 03:34 PM
I like the idea NsT!

I've installed and come across some problems.

As mentioned, if more than one category is selected for the default, it won't load. Maybe setting the system not to work off the IDs (perhaps giving them unique ones) with a seperate variable that allows you to set what categories are installed might help this problem.

I've also noticed that in IE7 when you load up a tab that has restricted access (this might apply to FF2, I'm not sure yet), for example the Admin Category areas, Moderators forums, etc, the category header loads, as if it's bypassing the check in vBulletin that allows a category to be shown or not. This isn't ideal because I'd like to be able to set a tab to show all the forums that are available, not just a select few. And at the same time not show there are restricted areas to my users, as most will never have a need to know they are there.

This also makes me wonder if it's possible to set a tab to hold the restricted access areas and have it not show up to users without the permissions to see the area.

Also, when you do set the first category to be restricted access in IE7 at least, it loads up the 'no permissions' page within the FORUMHOME template, as opposed to replacing it.

Hope this helps you in the development of a nice little mod.

NsT
06-07-2008, 06:30 PM
Hello Mokonzi,

Thanks for your support. I'll spend my time on fixing that problem asap. Since I'm not a coder so I'm not really sure I can do it :D That's why on the Mod Settings, I set this mod to be re-usable so that other coders can develop it if they wish.

About the default category, this won't load probably because you don't have a tab for that category. It means you can only load a specific tab as default when user hit index.php. If you just enter an ID of a category, then sure that it won't load :D

So for example, if you have 3 tabs: Tab 1, Tab 2, Tab 3.
Tab1: href="#1|2"
Tab2: href="#3"
Tab3: href="#4"

If Tab 1 is selected for default, then the startLoad() should take Tab 1 URL: startLoad('1|2') and so on for other tabs.

NsT
06-07-2008, 07:53 PM
I've just updated the code. Now there is a message for restricted forum in stead of showing the forum :D or showing the whole login page with header, navigation, footer, etc.

https://vborg.vbsupport.ru/external/2008/06/9.gif

@ Mokonzi: Can you try this and give me your feedback?:D

mokonzi
06-07-2008, 08:22 PM
I'll give it a try first thing in the morning.

Regarding the default tab, I have been setting that in the startload() section. If it has a single number in, then it loads that tab, but once it has more than one number ("1|2" for example), then it fails to load anything.

I'm thinking it doesn't like the | character.

Will post back on the new update in the morning.

Deepdog009
06-08-2008, 12:58 AM
If U need TAB SETS goto .....>>>>>>>>>> Custom SeTs (https://vborg.vbsupport.ru/showthread.php?t=152126) <<<<<<<<<< *** TAB CiTY ***

sdfaheem
06-08-2008, 03:50 AM
The demo link isn't working dude!

NsT
06-08-2008, 04:19 AM
well, someone DDOS my site and the server is down now :(

dieselpowered
06-08-2008, 05:52 AM
We are running the AJAX version of bobster65's tab mod...maybe instead of creating a new mod that does the same thing, you two can work together???

mokonzi
06-08-2008, 06:16 AM
NsT, I've tried the changes, and so far no difference from before. It's not loading the restricted access section at all, doing the same as last night (tested in IE7).

I noticed you've labeled the section between <!-- main --> and <!-- /main --> as updated. The coding is exactly the same as it was before. I can't see how it's pulling in the updated info if there's a log in clash.

xtremeoff-road has a good suggestion there as the two of you working together might be able to smooth out the bumps in the road, so to speak.

If this could be set as proper product then it would make the install process a lot easier.

I'm happy to help with the development testing as much as I can. :)

NsT
06-08-2008, 07:00 AM
@ xtremeoff-road: Oh bobster65's tab mod is not yet Ajax. It loads all tabs initially and show tab's contents when you click. Also this can not update new posts on all tabs.

The reason I build mine is because I don't want to load all tabs at the begining and I want it to be able to update new posts. Bobster65's PM me yesterday and he was not happy with my mod as he considered me stealing his original idea :| I renamed the mod so that it will be different with Bobster65's mod. Well, I don't want to argue, don't want to fight, probably I will ask Moderator to delete this mod!

Mokonzi, well, it's weird because as you can see from my sceenshot on the post above, restricted forum requires login.

Can you tell me what kind of yours restricted forum? I mean what permission require to access that forum? I will try to setup a forum like yours and test ;)

P.s: my server is not yet up, still down, it was attacked by DDoS just after I posted the mod here, what a coincidence :(

mokonzi
06-08-2008, 07:33 AM
xtremeoff-road might mean he's got an advanced beta version of the tabs, bobster has mentioned something in his thread about beta testing it.

I'll explain the areas I have restricted access.

Some categories are for forums that are under development. They are related to a project that isn't yet public, so they shouldn't be displayed as the forum is set to not be displayed on the index page.

Then we have an admin section, where the access is restricted to certain usergroups, moderators, admins, etc.

So in theory the other usergroups shouldn't even see the category heading.

Edit:

I realised that you changed the file download name, and so I'd uploaded the wrong file.

Now it restricts access for every forum in that section if the first forum is unauthorized.

Suggestions:


Have it so a tab doesn't show if it's setup as restricted (perhaps have a 'restrictions' variable)
Check the permissions or visibility of a category before it is displayed
Use a phrase manager variable for the names of the tabs

NsT
06-08-2008, 08:00 AM
Oh ok I see, I didn't read the whole thread of Bobster65's mod.

But from my forum, I have these results:

Category 1
--- Forum 1
--- Forum 2 (restricted forum, only Admin and Mode can see)
--- Forum 3

Category 2 (restricted category, guest can not view)
--- Forum 4
--- Forum 5
--- Forum 6

And it works fine on my mode. I and my moderators can see Forum 2 but member can not see it, they only see Forum 1 & 3 when clicking on the tab of Category 1.

Guests when clicking on tab of Category 2, a login page appears.

Anyway, as soon as my forum is up, I'll test and let you know the more results.

mokonzi
06-08-2008, 08:23 AM
Ok, I'll illustrate my forums structure, as it's similar but not identical to yours:


Tab 1
Category 1
Forum 1
Forum 2 <-- Only Admins and Mods can see
Forum 3
Category 2 <-- Only Admins and Mods can see
Forum 4
Forum 5

Tab 2 <-- Only Admins and Mods can see
Category 3
Forum 6
Forum 7

Tab 1 is a mix, some of which are category based restrictions. Atm the code shows the category header (wrongly cos vB wouldn't do as standard), but rightly doesn't show the forums.

Tab 2 is ideally Admin only, and it'd be nice to allow that only to be visible to admins.

I hope that makes some sort of sense. :)

dieselpowered
06-08-2008, 04:32 PM
Yes I have the BETA ajax version of his hack :)

NsT
06-08-2008, 05:22 PM
Really? How's it compare to this mod? Since I'm not a coder I think I can't work with Bobster65. I just know a little bit about PHP and Javascript :D Not good enough to release a product.

rapidphim
06-08-2008, 05:34 PM
I am not able to view the demo at the demo site.

NsT
06-08-2008, 05:49 PM
Sorry my site just got DDoS attacked so demo will be available tomorrow :(

rapidphim
06-08-2008, 05:57 PM
Sorry, just read few threads back. Didn't know you got DDos (only script kiddies do such thing). Anyway, I heard that BBob is working on an Ajax version for his Tab. It'd be nice if you two work together. I'd wait for the final product either from you, or him, or both.

It'd also so nice that if one of you can intergrate the new ajax mod to upgrade the current hack automatically. Otherwise, we might have to uninstall/revert the modified template, reinstall the style and install the ajax hack...

Lea Verou
06-08-2008, 08:25 PM
You need to check location.hash every half a second or so for it to work in IE. I have stumbled upon the same problem some while ago (not in a vbulletin project) and I can guarantee you that this is the only solution, sadly.

Btw why do you use your own tabs.js file and not vB_TabCtrl.js? vBulletin has a built-in tabs system at the moment, that nobody seems to be aware of or use, I don't know why :confused:

NsT
06-08-2008, 11:02 PM
09/06/2008: Released ver 1.2. Fix problem with default tab to load initially when member access index.php. This enable you to load multiple categories initially.

@GamerGirl27 & Mokonzi: Now you can load as many categories as you want :D

@ rapidphim: The demo is available to view now :D Well, for me to make this mod become a product to install/uninstall automatically is almost imposible :D because I didn't know much about PHP, especially Vbb installing codes.

This is the reason why I marked this mod as "Re-usable" so that someone else better than me can improve it if they wish to.

@ Michelle: Oh if you check my tabs.js file, you will see I set an interval to check the URL, but the problem is IE doesn't store link after # into its history so at this moment you can use Back/ Forward buttons. However, you still can use Bookmark and send link to your friends. I'll try to fix Back/ Forward button asap.

Believe me I'm newbie in coding so I don't even know that VBB has a vB_TabCtrl.js file :D but anyway, it will be easier for me to code my own file :D

NsT
06-09-2008, 07:07 AM
Oh sorry that I forgot to add the View All tab. This tab will load the whole forum like normal:

<li><a href="#all" id="aall"><span id="sall">Tất Cả</span> </a></li>

SpankMe
06-09-2008, 09:10 AM
Since installing this I have been getting a number of membrs complaining that they are getting logged out when using the tabs or clicking on mark forums read.

NsT
06-09-2008, 12:43 PM
Thanks for your feedback. I checked and you are right. However, I found that if you check the "Remember Me" box when logging in, it seems to work fine.

I'll try to fix this problem asap.

mokonzi
06-09-2008, 02:06 PM
Thanks for the updates so far NsT. I'll have a look at updating it on my test style later.

Magnumutz
06-10-2008, 06:42 AM
I'm getting this error:
Warning: Division by zero in [path]/tabs.php(258) : eval()'d code on line 132

NsT
06-10-2008, 08:21 AM
Sorry for your error, in fact, I never got this error when testing this mod. Can you tell me what VBB version you're using?

Magnumutz
06-10-2008, 11:05 AM
3.7.1 PL1 dude...
Here's the link: http://haste-network.net/forums.php?styleid=39

NsT
06-10-2008, 11:51 AM
I see, I didn't have chance to test this mod with 3.7.1 so I'm not really sure if VBB change the code on 3.7.1? Since I use function construct forum bit from 3.7.0.

It seems to load your default tab fine even with the error. Can you send me your index.php file?

soulface
06-10-2008, 08:10 PM
I'm getting this error:
[/b]

I think you've missed the templates redo. tabs_forumbits contents has been moved to a new templates called tabs_forumhome and some new contents has been replaced in tabs_forumbits.

I'm using vBulletin 3.7.1 Patch Level 1 and it's working fine...

Magnumutz
06-10-2008, 09:25 PM
I see, I didn't have chance to test this mod with 3.7.1 so I'm not really sure if VBB change the code on 3.7.1? Since I use function construct forum bit from 3.7.0.

It seems to load your default tab fine even with the error. Can you send me your index.php file?
It's actually forums.php and it hasn't been changed one bit.

I think you've missed the templates redo. tabs_forumbits contents has been moved to a new templates called tabs_forumhome and some new contents has been replaced in tabs_forumbits.

I'm using vBulletin 3.7.1 Patch Level 1 and it's working fine...

Nope... i've just redone them and it's still the same.

NsT
06-10-2008, 10:11 PM
The reason I asked for index.php is because I coded tabs.php base on index.php from 3.7.0. However Soulface just confirmed that this mod works okay with 3.7.1 so I believe the code is the same. I got a friend running 3.7.1 and it works fine too. Your problem seems weird.

Magnumutz
06-11-2008, 06:05 AM
Well, i opened up the tabs.php file and replaced 2 "index.php" with "forums.php" phrases from it and it's got the same error.
But if it's a must... i'm PM-ing you my forums.php file.

NsT
06-12-2008, 05:22 AM
@ Magnumutz: I have checked the file you sent me and it seems to be the same as 3.7.0 index.php file so I think it's not the reason causing the error on your forum.

Magnumutz
06-12-2008, 05:43 AM
Ok... so what might be the problem?

mokonzi
06-12-2008, 01:29 PM
Are you using a portal software at all? It might be it's losing it's route to the forum install.

NsT
06-12-2008, 02:00 PM
I think the problem might be the template, since the error is about eval() function which is used to fetch templates.

Can you setup other tabs to see if they work? It seems to work fine with the error. If the error is not affecting, we can put an "@" in front of eval() and it'll hide the error.

Since I and my friends don't have this problem (tested on 3.7.0, 3.7.1) so I'm not sure how to fix this.

Magnumutz
06-13-2008, 05:09 AM
Where do i put the "@" in front of?

NsT
06-13-2008, 07:06 AM
Uhm let's try this: Open tabs.php,

You will see function eval(), since we don't know which function causes the error so just put @ in front of all eval().

For example: @eval('bla bla bla');

Let's see how it works :D

Magnumutz
06-13-2008, 07:51 AM
Yup, it's hidden now... but there's a space between the tabs and the forums shown :(
Could that go away and the tabs "buttons" made bigger?

NsT
06-13-2008, 12:16 PM
Cool! But I didn't see the space between the tabs and the forums
https://vborg.vbsupport.ru/external/2008/06/7.gif

You can edit the CSS, edit li properties, set a line-height:18px (or higher).

You also need to modify the template tabs_forumhome because your forum is using not standard template, it uses splited category template.

Magnumutz
06-13-2008, 02:17 PM
Okay, thanks a lot for the nice support NsT... your gonna do good here on vB.org ;)

Later Edit: I set the li to 30px and it's perfect :)
Thanks again... now i gotta find what's causing the gap :p

NsT
06-13-2008, 03:29 PM
You're welcome Magnumutz :D I'll try to help out as much as I can :p

maidos
06-13-2008, 04:58 PM
the instructions is just too much. cant you provide product instead, I wont install until theres such feature

NsT
06-14-2008, 01:12 PM
I don't think the instruction is too much because you just need to create 3 new templates win a few minutes, and then upload some files and setup your tabs. Probably it will take you abou 5 minutes to do this mod.

But anyway, this script is not for one who wants plug & play :D

YuOr
06-14-2008, 06:13 PM
i hope i don't get banned for this question :)
but can i pay a little bit to someone to install it to my forum? pm me :)
thanks

vidan
06-15-2008, 03:26 AM
hello =) thanks for great mods, but you must fix the login(cookie) issue, not all ppl want to use remember me option(if they are in netcafe?) and user keep log out if not using remember me.

NsT
06-15-2008, 08:45 AM
@ YuOr: believe me, this mod is very easy, you don't need to spend any $$$ to install it but a few minutes ;)

@ vidan: yes, you're absolutely right. I'm working on it, hopefully i can fix it soon.

YuOr
06-15-2008, 01:41 PM
@ YuOr: believe me, this mod is very easy, you don't need to spend any $$$ to install it but a few minutes ;)

did you try to install it with two toddlers jumping on you? LOL
I think i'll give it a try when they fall asleep :)

CHIPIT
06-24-2008, 08:39 AM
Great mod, thanks!
However, I'm having a few issues.
1) I have forum descriptions enabled which should show in the tcat, however this is not the case and editing forumhome_forumbits to include the description variable does not work.

2) All the collapse buttons collapse the first one and the link in the tcat never points to a forumid. It would appear "$i" is not working.

NsT
06-25-2008, 01:39 PM
Thanks for reporting issues.

Both issues were fixed with version 1.3, it's available to download now.

Sharapova
07-07-2008, 03:39 PM
Ok huge problem. Please help.

I have no <main> Tags :(

This is the forum, look http://www.ozvirtualsports.com/forum/index.php choose the Adobedecker skin

This is my forumhome

</head>
<body>
$header
$navbar
<!-- guest welcome message -->
<if condition="$show['guest']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><phrase 1="$vboptions[bbtitle]">$vbphrase[welcome_to_the_x]</phrase></td>
</tr>
<tr>
<td class="alt1" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>">
<phrase 1="faq.php$session[sessionurl_q]" 2="register.php$session[sessionurl_q]">$vbphrase[first_visit_message]</phrase>
</td>
</tr>

</table>
<br />
</if>
<!-- / guest welcome message -->

$forumbits $forumhome_markread_script
<br />
$ad_location[ad_forumhome_afterforums]

<!-- what's going on box -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="2">$vbphrase[whats_going_on]</td>
</tr>
</thead>
<if condition="$show['loggedinusers']">
<!-- logged-in users -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
<a href="online.php$session[sessionurl_q]" rel="nofollow">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>)
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_activeusers" style="$vbcollapse[collapseobj_forumhome_activeusers]">
<tr>
<td class="alt2"><a href="online.php$session[sessionurl_q]" rel="nofollow"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="$vbphrase[view_whos_online]" border="0" /></a></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
<div>$activeusers</div>
</div>
</td>
</tr>
</tbody>
<!-- end logged-in users -->
</if>
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_stats')"><img id="collapseimg_forumhome_stats" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_stats].gif" alt="" border="0" /></a>
<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_stats" style="$vbcollapse[collapseobj_forumhome_stats]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/stats.gif" alt="<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>" border="0" /></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div>
$vbphrase[threads]: $totalthreads,
$vbphrase[posts]: $totalposts,
$vbphrase[members]: $numbermembers<if condition="$show['activemembers']">,
<span title="<phrase 1="$vboptions[activememberdays]">$vbphrase[within_the_last_x_days]</phrase>">$vbphrase[active_members]: $activemembers</span>
</if>
</div>
<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
</div>
</td>
</tr>
</tbody>
<if condition="$show['birthdays']">
<!-- today's birthdays -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onClick="return toggle_collapse('forumhome_birthdays')"><img id="collapseimg_forumhome_birthdays" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_birthdays].gif" alt="" border="0" /></a>
$vbphrase[todays_birthdays]
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_birthdays" style="$vbcollapse[collapseobj_forumhome_birthdays]">
<tr>
<td class="alt2"><a href="calendar.php?$session[sessionurl]do=getday&amp;day=$today&amp;sb=1"><img src="$stylevar[imgdir_misc]/birthday.gif" alt="$vbphrase[view_birthdays]" border="0" /></a></td>
<td class="alt1" width="100%"><div class="smallfont">$birthdays</div></td>
</tr>
</tbody>
<!-- end today's birthdays -->
</if>
<if condition="$show['upcomingevents']">
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
<if condition="$show['todaysevents']">$vbphrase[todays_events]<else /><phrase 1="$vboptions[showevents]">$vbphrase[upcoming_events_for_the_next_x_days]</phrase></if>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_events" style="$vbcollapse[collapseobj_forumhome_events]">
<tr>
<td class="alt2"><a href="calendar.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/calendar.gif" alt="$vbphrase[calendar]" border="0" /></a></td>
<td class="alt1" width="100%"><div class="smallfont">$upcomingevents</div></td>
</tr>
</tbody>
</if>
<tbody>
<tr>
<td class="alt1" align="center" colspan="2"><div style="font-size:10px"><strong>
<a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a>
<if condition="$vboptions['forumleaders']">&nbsp; &nbsp;
<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if>
&nbsp;
<if condition="!$show['guest']">
<!-- member logout -->
<a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')"><phrase 1="$bbuserinfo[username]">$vbphrase[log_out_x]</phrase></a>
<!-- end member logout -->
</if>
</strong></div></td>
</tr>
</tbody>
</table>
<div class="cat-btm_x"><div class="cat-btm_lft"></div><div class="cat-btm_rht"></div></div>

<!-- icons -->
<div style="padding:8px; 0; 8px; 0;"></div>
<table class="tborder_icons" align="center" border="0" cellpadding="6" cellspacing="0" width="100%">


<tbody>
<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_new.gif" alt="" border="0" /></td>
<td align="left" class="alt1">
<div class="smallfont">$vbphrase[forum_contains_new_posts]</div>


</td>
<td class="alt2" ><img src="$stylevar[imgdir_statusicon]/forum_old.gif" alt="" border="0" /></td>
<td align="left" class="alt1" ><div class="smallfont">$vbphrase[forum_contains_no_new_posts]</div></td>
<td class="alt2" ><img src="$stylevar[imgdir_statusicon]/forum_old_lock.gif" alt="" border="0" /></td>
<td align="left" class="alt1" ><div class="smallfont">$vbphrase[forum_is_closed_for_posting]</div></td>
</tr>


</tbody>

</table>
<!-- /icons-->

<!-- time and login code -->


<div style="padding:8px; 0; 8px; 0;"></div>


$footer
</body>
</html>

Where would I place step 8?

NsT
07-10-2008, 07:24 PM
Sorry for my late reply!

On your code, you can delete "$forumbits $forumhome_markread_script" and replace by the code I supplied above.

Good luck!

blanky
07-11-2008, 12:12 AM
Hi, I got it working great, but I have a problem, white lines between categories are showing up and I don't know why.. little help?

link: http://www.icheater.net/community/

Pic:

NsT
07-11-2008, 01:57 AM
It seems guest can not select this style on your forum, I can't test it.

Since I make the templates based on default Vbulletin template so if you use different templates, you will have to modify the tabs_forumhome and tabs_forumbits.

The white line I think it's because of the the following codes:

<td class="smallfont" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>">$tabs[description]</td>

Aren
07-15-2008, 06:24 AM
Hi there NsT.

First of all, thanks a whole lot for such a great mod. I've been testing it and seems really good, but I got some problems yesterday that you need to be aware of.

I created three tabs (let's call them A, B and C). Tab A includes categories 1, 2 and 3, Tab B includes 4, 5 and 6 and Tab C only contains category 7.

Category 1 and 7 are only visible to admins and mods.
Category 2, 3, 4 and 5 are visible to everybody (including guests).
Category 6 is visible to some usergroups (neither registered users nor guests)

When I use my own user (an admin) everything works fine, but when I test it using a registered user, the problems arise.

When clicking on Tab A, I get a login page saying that I'm not logged in (I am and I checked the "Remember me" checkbox) or that I don't have permissions to access that page.

The same happens when clicking on Tab C.

And when clicking on Tab B I can see categories 4 and 5, category 6 "title" row is shown but not the forums it contains. If I do not have permissions to access that category I would expect that it is not shown at all (that's the default behaviour of vB).

So, basically, it seems that you should check how are you handling user's permissions.

Thanks anyway and keep up the good work! :)

Edited to fix an stupid (and big) error

NsT
07-18-2008, 09:49 AM
Hi there Aren,

Thank you very much for your support. Unfortunately from now I won't have much time for coding since I must focus on my dessertation. Therefore this project is terminated.

At the first time I submited this mod, I set it to be "re-usable" so all of you can use the code, modify it and improve it. So please help each other out.

Many thanks!

maidos
07-20-2008, 03:09 PM
anyway to provide a full product file so it can edit the templates?

TheInsaneManiac
07-29-2008, 09:08 PM
Is there anyway to change the tabs to like bobs?

cSh
08-01-2008, 11:20 PM
subforum example
1-X
2-Y
3-Z
install mod
1-X 2-Y 3-Z
why?
and firefox work explorer not work?

f0rmat
08-16-2008, 10:55 PM
Demo here (http://domaintimes.net/forum/index.php)

iBaker
08-19-2008, 10:25 PM
Don't you think that this mod should go to the graveyard given the developer has said he isn't supporting it now and that the Bobster version https://vborg.vbsupport.ru/showthread.php?t=175687 is proven more reliable and is still supported?

AzaDiyaR
09-09-2008, 09:30 AM
wow thanks man this working perfectly ;)

www.azadiwelat.org/index.php

AzaDiyaR
09-09-2008, 01:40 PM
Can you Fix this to Random ID

<input type="hidden" value="1" id="defaulttab">

if you can so this can be cool :D

Ray2khax
10-05-2008, 12:05 PM
Hey can someone tell me why when I do this the template design goes away and everything turns white?

Ray2khax
10-05-2008, 12:15 PM
Nevermind I fixed it :)

Very nice job!

Ray2khax
10-05-2008, 12:35 PM
Hey I was wondering how do I get it so the main forum is like rules ect.. I want a main forum to always be up unless the user chooses another section also How can I make it so it stays up on the bar?

codershark
10-14-2008, 06:32 AM
dont workable with cyb-sub-forum manager :(