vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Forum Home Enhancements - [AJAX] Tabbed Forum Home (https://vborg.vbsupport.ru/showthread.php?t=175687)

OsideRida06 05-11-2008 07:22 AM

So here is my progress thus far.

I now have all of my tabs up and all the categories in each tab. I am still having a few problems though.

The first tab where it is set up different (done just as explained for the first tab) shows what the real skin is suppose to look like. The other tabs do not. Here are some screen shots to show you what I mean. Pay attention to the difference right below the tabs. I need to get the other tabs (in pic 2) to look like the first tab (in pic 1). I know once I change the first tab to only having one category like the others, that it to will look like the other tabs. How do I fix this?

https://vborg.vbsupport.ru/

https://vborg.vbsupport.ru/

Also I tried to make my Moderators 101 tab only viewable to Moderators, Super Moderators, and Admins. This also did not work. It gave me an error message and asked if I wanted to continue. So I clicked on continue. I then went to test it, and the index_tab page just gave an error message. So I removed the <if> commands until I can figure out why it is not working. Any suggestions? I am 99% sure I had them in the correct places.

Defkalion 05-11-2008 08:05 AM

Quote:

Originally Posted by bobster65 (Post 1515350)
Yer welcome :)

Yes, you can create extra tabs with info in them other than just Forum categories. All you need to do is put the info in what I call a content div area just like you did with the other tabs ..

Here is an example of putting the Whats going on box into a tab .. Note the RED IDs .. those are what link the tab to the div content ..

First you need to create an li tag for your new extra tab (I added a 4th tab in this example called Whats Going On and its ID=tcontent4

Code:

<!-- Tabbed Forum Home Tabs Layout -->
        <ul id="forumtabs" class="shadetabs">
        <li><a href="#" rel="tcontent1" class="selected">Tab 1</a></li>
        <li><a href="#" rel="tcontent2">Tab 2</a></li>
        <li><a href="#" rel="tcontent3">Tab 3</a></li>
        <li><a href="#" rel="tcontent4">Whats Going On</a></li>
              </ul>
<!-- /Tabbed Forum Home Tabs Layout -->


Then you need to create the Content Container and make sure that it has the same ID as the li tag you just added ..

Code:

<!-- Tabbed Forum Home – START whats going on box Tab Content Layout -->

<div id="tcontent4" class="tabcontent">

<!-- what's going on box -->
CONTENT REMOVED FOR SAMPLE
<!-- end what's going on box -->

</div>

<!-- /Tabbed Forum Home – END Tab 4 Content Layout -->



NOTE: Make sure that when you add extra tabs that they go BEFORE the below block of code.. You can always move this chunk of code lower in the template, just make sure that any content area Divs that you add go before it .. (Hope that made sense)

Code:

<!-- Tabbed Forums switch tab script -->
        <script type="text/javascript">
        var myforumtabs=new ddtabcontent("forumtabs")
        myforumtabs.setpersist(true)
        myforumtabs.setselectedClassTarget("link")
        myforumtabs.init()
        </script>
<!-- /end Tabbed Forums switch tab script -->

Thats all there is to it...

Bob your help is much appreciated. This worked excellent, you can check it here : http://www.travelstories.gr/index_forums.

Is there any way to "force" this last fourth tab to the right, since it contains stats? And also to have a diferrent font size/color for its text? I want to give more attention to the content tabs and "degrade" the stats tab :)

EDIT: also another question: what is the way of placing the Tabs ALSO in the bottom, besides the top of the forums?

bobster65 05-11-2008 11:13 AM

Quote:

Originally Posted by rapidphim (Post 1515665)
Is it possible for:
1/ On each tab, show the number of new threads created/replied? For example: Tab 1 (2 New)
2/ A quick ajax display all the new created/replied threads when click on number of new created/replied threads?
3/ Everytime user clicks Home, is there away to bring them back to first tab, instead of staying at the current tab that they selected?

1. Yes, that is possible, you could get that information from the specific $forumbit array for each tab.

2. This version is not AJAX. The next version will have various AJAX settings that can be used.

3. Yes, set instance.setpersist(false). This tells the script whether to persist the tabs' state for the duration of the browser session. If enabled (true), the last clicked on tab is remembered and recalled upon the visitor's return. If disabled (false), it will load the "selected" tab upon each page load.

example ..

Code:

<!-- Tabbed Forums switch tab script -->
<script type="text/javascript">
var myforumtabs=new ddtabcontent("forumtabs")
myforumtabs.setpersist(false)
myforumtabs.setselectedClassTarget("link")
myforumtabs.init()
</script>
<!-- /end Tabbed Forums switch tab script -->


bobster65 05-11-2008 11:37 AM

Quote:

Originally Posted by Defkalion (Post 1515709)
Bob your help is much appreciated. This worked excellent, you can check it here : http://www.travelstories.gr/index_forums.

Is there any way to "force" this last fourth tab to the right, since it contains stats? And also to have a diferrent font size/color for its text? I want to give more attention to the content tabs and "degrade" the stats tab :)

EDIT: also another question: what is the way of placing the Tabs ALSO in the bottom, besides the top of the forums?

The "LOOK" of the tabs is all driven by CSS, so you can do just about anything you want to. The tabs are simply list based links, and the tab contents are regular DIV contents on the page. Customization couldn't be easier. You are not "stuck" using the shadetabs CSS. The CSS File actually contains 2 other examples that you can configure (and modify) as well. Plus you can always use other CSS that can be found @ dynamic drive

If you note the content areas, they all currently use the class="tabcontent" ... for your extra tab, you could use another class for that individual Div and then define that in the CSS file

Tabs at the bottom and top? Haven't tried it, but simple copy the "tab" portion and place it after the last content area and before the switch tabs script .. in theory, that should work. one of the CSS style is use has tabs at the bottom, so I know it works, just never tried it with both top and bottom ..

sweede 05-11-2008 11:54 AM

I'm enjoying this hack info on my site http://dramaloot.com/forums/index.php , but instead of giving different tabs for different forum categories, I've created a plugin that allows me to use either a template or since i use VbaCMPS , a BBCode Page.

The tabs are also created by a vbulletin config option and you can also dynamicly adjust their order.

Since i added a considerable amount of content to the forum home , i have added an Ajax plugin that automaticly refreshes the forum content every 5 minutes or so. Instead of downloading a 140kb file every time you want to refresh the page to check for new posts, you only download a 20kb or so of data !

bobster65 05-11-2008 11:58 AM

Quote:

Originally Posted by OsideRida06 (Post 1515686)
So here is my progress thus far.

I now have all of my tabs up and all the categories in each tab. I am still having a few problems though.

The first tab where it is set up different (done just as explained for the first tab) shows what the real skin is suppose to look like. The other tabs do not. Here are some screen shots to show you what I mean. Pay attention to the difference right below the tabs. I need to get the other tabs (in pic 2) to look like the first tab (in pic 1). I know once I change the first tab to only having one category like the others, that it to will look like the other tabs. How do I fix this?

https://vborg.vbsupport.ru/

https://vborg.vbsupport.ru/

Also I tried to make my Moderators 101 tab only viewable to Moderators, Super Moderators, and Admins. This also did not work. It gave me an error message and asked if I wanted to continue. So I clicked on continue. I then went to test it, and the index_tab page just gave an error message. So I removed the <if> commands until I can figure out why it is not working. Any suggestions? I am 99% sure I had them in the correct places.

The problem some people are having is that they are trying to use the examples that are based off of the default vbulletin style when they are using custom styles that are slightly different layouts than default vbulletin.. this is why I included remarks in the code like this....

Code:

<!-- CUSTOM tbody CODE BASED ON YOUR STYLE -->
You just need to "tweak" it a little bit to get the correct layouts working based on your style. Version 2.0 is going to fix this problem as this step will be automated ;)

as far as the error message, you must have grabbed what I had posted prior to me editing it.. I had a dang extra comma (,) after the last group id ... the example is fixed now and I know it works as Its running on multiple sites right now (just without the extra comma lol )

bobster65 05-11-2008 12:09 PM

Quote:

Originally Posted by sweede (Post 1515848)
I'm enjoying this hack info on my site http://dramaloot.com/forums/index.php , but instead of giving different tabs for different forum categories, I've created a plugin that allows me to use either a template or since i use VbaCMPS , a BBCode Page.

The tabs are also created by a vbulletin config option and you can also dynamicly adjust their order.

Since i added a considerable amount of content to the forum home , i have added an Ajax plugin that automaticly refreshes the forum content every 5 minutes or so. Instead of downloading a 140kb file every time you want to refresh the page to check for new posts, you only download a 20kb or so of data !

Cool Beans :) Looks good! Looks like a combo of my CMPS MOD and this one..

Version 2 (already being built) will be a product with ACP controls, dynamic tab generation, additional content addition, usergroup permissions, AJAX (with multiple settings that can be turned on and off and set for specific "times") and more..

Version 3 (on the white board) will consist of USER controlled Tabs so that THEY can decide what order they want the tabs and what categories/forums fall under each tab..

MarsNIIT 05-11-2008 02:53 PM

Quote:

Category1
-Forum1
--Subforum1
---Subforum1a
---Subforum1b

Category2 (hide)
-Forum2
--Subforum2
---Subforum2a
---Subforum2b
When i use subforum2, the tab not display: Last Post, Threads and Posts

But no problem when i use these forum in Forum1 (not hide)

not hide mean: Forum is Active selecte no
(Will not appear if set to no, but remains accessible if the forum's URL is known)

rapidphim 05-11-2008 03:47 PM

Quote:

Originally Posted by bobster65 (Post 1515820)
1. Yes, that is possible, you could get that information from the specific $forumbit array for each tab.

2. This version is not AJAX. The next version will have various AJAX settings that can be used.

3. Yes, set instance.setpersist(false). This tells the script whether to persist the tabs' state for the duration of the browser session. If enabled (true), the last clicked on tab is remembered and recalled upon the visitor's return. If disabled (false), it will load the "selected" tab upon each page load.

example ..

Code:

<!-- Tabbed Forums switch tab script -->
<script type="text/javascript">
var myforumtabs=new ddtabcontent("forumtabs")
myforumtabs.setpersist(false)
myforumtabs.setselectedClassTarget("link")
myforumtabs.init()
</script>
<!-- /end Tabbed Forums switch tab script -->


Thanks Bob for this... and how I am going to complete #1? And lots of queries will be using for this?

veenuisthebest 05-11-2008 04:21 PM

Quote:

Originally Posted by veenuisthebest (Post 1515597)
ohhh.... the problem remains in IE... what to do now ???

The row gets totally messed up in IE, however.. working only in Firefox !!


pleasee ... bob.. help out this one !!


All times are GMT. The time now is 01:56 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.02269 seconds
  • Memory Usage 1,794KB
  • 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_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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