vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to make multiples vB folders on the same forum like vb.org has (https://vborg.vbsupport.ru/showthread.php?t=143032)

Rukas 08-03-2007 05:42 AM

Quote:

Originally Posted by Dismounted (Post 1306826)
This is what I use, please don't distribute it though.

Search Menu - Hook: 'search_intro'
PHP Code:

$forumid INSERTFORUMID;
$forum =& $vbulletin->forumcache["$forumid"];

$optionvalue $forumid;
$optiontitle "$forum[depthmark] $forum[title_clean]";
if (
$vbulletin->options['fulltextsearch'] AND !($vbulletin->userinfo['forumpermissions']["$forumid"] & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
{
    
$optiontitle .= '*';
    
$show['cantsearchposts'] = true;
}
$optionclass 'fjdpth' iif($forum['depth'] > 44$forum['depth']);

if (
in_array($forumid$vbulletin->GPC['forumchoice']))
{
    
$optionselected 'selected="selected"';
    
$noforumselected '';
}
else
{
    
$optionselected '';
}

eval(
'$searchforumbits .= "' fetch_template('option') . '";'); 

Forum Jump - Hook: 'forumjump'
PHP Code:

$forumid INSERTFORUMID;
$forum $vbulletin->forumcache["$forumid"];

$optionvalue $forumid;
$optiontitle $prependchars $forum[title_clean]";

$optionclass 'fjdpth' iif($forum['depth'] > 44$forum['depth']);

if (
$curforumid == $optionvalue)
{
    
$optionselected 'selected="selected"';
    
$optionclass 'fjsel';
    
$defaultselected '';
}
else
{
    
$optionselected '';
}

eval(
'$jumpforumbits .= "' fetch_template('option') . '";'); 



What exactly is this supposed to do because it doesnt seem to do much of anything for me...

Dismounted 08-03-2007 10:31 AM

It allows forums with a display order of 0 (zero) to display on the forum jump and search select menu. Make sure you replace the INSERTFORUMID though.

thaki 10-01-2007 07:05 AM

Quote:

Originally Posted by Dismounted (Post 1306826)
This is what I use, please don't distribute it though.

Search Menu - Hook: 'search_intro'
PHP Code:

$forumid INSERTFORUMID;
$forum =& $vbulletin->forumcache["$forumid"];

$optionvalue $forumid;
$optiontitle "$forum[depthmark] $forum[title_clean]";
if (
$vbulletin->options['fulltextsearch'] AND !($vbulletin->userinfo['forumpermissions']["$forumid"] & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
{
    
$optiontitle .= '*';
    
$show['cantsearchposts'] = true;
}
$optionclass 'fjdpth' iif($forum['depth'] > 44$forum['depth']);

if (
in_array($forumid$vbulletin->GPC['forumchoice']))
{
    
$optionselected 'selected="selected"';
    
$noforumselected '';
}
else
{
    
$optionselected '';
}

eval(
'$searchforumbits .= "' fetch_template('option') . '";'); 

Forum Jump - Hook: 'forumjump'
PHP Code:

$forumid INSERTFORUMID;
$forum $vbulletin->forumcache["$forumid"];

$optionvalue $forumid;
$optiontitle $prependchars $forum[title_clean]";

$optionclass 'fjdpth' iif($forum['depth'] > 44$forum['depth']);

if (
$curforumid == $optionvalue)
{
    
$optionselected 'selected="selected"';
    
$optionclass 'fjsel';
    
$defaultselected '';
}
else
{
    
$optionselected '';
}

eval(
'$jumpforumbits .= "' fetch_template('option') . '";'); 


where should I put these code?

Dismounted 10-02-2007 05:36 AM

In plugins, I've wriiten the hook locations there already...

thaki 10-02-2007 05:56 AM

Ok

Quote:

Make sure you replace the INSERTFORUMID though.
How to do it?

Dismounted 10-02-2007 09:32 AM

You'll find it if you actually bothered to look at the code (the first line).

Kinneas 10-02-2007 01:38 PM

Quote:

Originally Posted by Dismounted (Post 1308843)
It allows forums with a display order of 0 (zero) to display on the forum jump and search select menu. Make sure you replace the INSERTFORUMID though.

Very useful indeed, thanks Dismounted!

Is it possible to do multiple forum Ids with those plugins though? Or do I need to do a plugin for each forum ID that has a display order of 0?

Dismounted 10-03-2007 06:00 AM

I only made it for one ID, as my own forum only has one "hidden" forum. But here is a version that accounts for more IDs.

Search Menu - Hook: 'search_intro'
PHP Code:

$forumids = array(xyz);

foreach (
$forumids AS $forumid)
{
$forum =& $vbulletin->forumcache["$forumid"];

$optionvalue $forumid;
$optiontitle "$forum[depthmark] $forum[title_clean]";
if (
$vbulletin->options['fulltextsearch'] AND !($vbulletin->userinfo['forumpermissions']["$forumid"] & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
{
    
$optiontitle .= '*';
    
$show['cantsearchposts'] = true;
}
$optionclass 'fjdpth' iif($forum['depth'] > 44$forum['depth']);

if (
in_array($forumid$vbulletin->GPC['forumchoice']))
{
    
$optionselected 'selected="selected"';
    
$noforumselected '';
}
else
{
    
$optionselected '';
}

eval(
'$searchforumbits .= "' fetch_template('option') . '";');


Forum Jump - Hook: 'forumjump'
PHP Code:

$forumids = array(xyz);

foreach (
$forumids AS $forumid)
{
$forum $vbulletin->forumcache["$forumid"];

$optionvalue $forumid;
$optiontitle $prependchars $forum[title_clean]";

$optionclass 'fjdpth' iif($forum['depth'] > 44$forum['depth']);

if (
$curforumid == $optionvalue)
{
    
$optionselected 'selected="selected"';
    
$optionclass 'fjsel';
    
$defaultselected '';
}
else
{
    
$optionselected '';
}

eval(
'$jumpforumbits .= "' fetch_template('option') . '";');



Kinneas 10-03-2007 06:55 AM

Thank you very much :) - I guessed it was something to do with an array. I tried to modify it myself but must have got the syntax wrong.

Paul M 10-04-2007 07:52 PM

I'm not sure what all this fancy code is for exactly, but just to clear up something that seems to get wrongly assumed a few times across threads - we do not set the forum display to '0' - we have a mod that hides certain forums on the homepage.

Dismounted 10-09-2007 09:54 AM

I figured as much. It seems more logical to do it that way, but I was "sucked in" to the display order 0 hype :D.

Princeton 10-09-2007 04:54 PM

setting the forum display to '0' will hide the forum on the archives page - not something we want to do

Spank 10-09-2007 05:41 PM

<a href="https://vborg.vbsupport.ru/showthread.php?threadid=159844" target="_blank">This mod</a> does a similar thing to how vbulletin.org is setup

aceofspades 10-09-2007 06:13 PM

I have a system on one of my beta boards that has javascript tabs at the top of the forum which dynamically updates for the new catagorys, so if you add a new catagory, a new tab will be automatically generated with the catagory name, and by clicking on that tab you only display the forums which are under that forum catagory, so you tab forums in and out of view depending on what the user has selected, and it is designed in such a way which does not affect SEO. If anyone is interested in this i may release it as a paid mod package, you can pm me for a demo and quote.

woodysfj40 12-07-2007 04:34 PM

a similar issue exists with Subscriptions to the forums in the sub-categories....I do have forumjump and searching working great (thanks Dismounted!)

silence25 01-07-2008 12:53 AM

1st, i would like to thank everyone for adding their information - its helped me make this possible on my forums. A little searching through each post paid off in a pretty big way.

I used a 3rd party modification for the tabs, and i used dismounted's hook code so i can search and use forum jump (thanks a ton for that code, was very generous of you!).

I have one last question:

How do you allow the forum statistics to be shown on all the 'hidden' areas of your forum? It shows on the default home area (the forums you don't have set to '0'). Is it possible, or something i'll just have to live with?

lovevn 01-07-2008 10:31 AM

There is one here
https://vborg.vbsupport.ru/showthrea...=166278&page=2

Rukas 02-11-2008 12:21 PM

Quote:

Originally Posted by Paul M (Post 1353040)
I'm not sure what all this fancy code is for exactly, but just to clear up something that seems to get wrongly assumed a few times across threads - we do not set the forum display to '0' - we have a mod that hides certain forums on the homepage.

Is it possible to purchase or otherwise get access to this mod? If possible and you want to do it in private please PM me.

Dismounted 02-12-2008 04:50 AM

I don't believe it's hard to do. I just haven't had the time to explore yet :p.

jGas 03-09-2008 10:40 AM

Quote:

Originally Posted by DiSpy (Post 1220020)
I tried this, it worked great... Here's what I did:

1) Goto admin panel
2) Click "Forums & Moderators" --> Forum Manager
3) Click "Add New Forum"
4) Put in title and description
5) Under "Display Order" type "0"
6) (Optionally) I made it a child under my parent category.
7) "Act as Forum" set to "no"
8) Save settings
9) Go back to "Forums & Moderators" --> Forum Manager
10) Find the new forum and add some child forums the normal way.
11) Don't forget to create a link to the new hidden forum somwhere so people can get to it. (I added it to my top menu).

HOPE THAT HELPED!

that's great!! thanks! :D i 've never thought about it! :up:

Switch02 03-03-2009 08:22 AM

Quote:

Originally Posted by Kirk Y (Post 1306354)
I'll throw you guys a bone here; this is how I've done it.

Add the following to your Main CSS - Additional CSS Definitions:
(Courtesy of vB.org) :p
Code:

td.tab a:link,td.tab a:visited,td.tab a:active,a.tab,
td.tab2 a:link,td.tab2 a:visited,td.tab2 a:active,a.tab2,a:link.tab2,a:active.tab2,a:visited.tab2{
background:transparent url(images/tab.gif) top right no-repeat;
font:11px tahoma,sans-serif;
color:yellow;
width:71px;
height:20px;
text-align:center;
padding:2px 0 0;
margin:0 1px;
text-decoration:none;
float:right;
position:relative;
top:0px
}
td.tab a:hover,img.tab a:hover,.tab a:hover,a:hover.tab,
td.tab2 a:link,td.tab2 a:visited,td.tab2 a:active,a.tab2,a:link.tab2,a:active.tab2,a:visited.tab2{
background:transparent url(images/tab2.gif) top right no-repeat;
}

Obviously, you'll need to change the information to suit your needs.

Then you'll need to create 2 images: 1 for what the tab regularly looks like and then another for what it will look like when it's hovered over.

I've placed my tabs under the navbar; so to do that you'd find in your "navbar" template:
Code:

<!-- / login form -->
           
        </td>
       
    </if>   
   
</tr>
</table>

And add underneath it:
Code:

    <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-bottom-width:0px;color:white;">
  <tr>
    <td class="nowrap" align="right" valign="bottom" style="padding:0 5px 0;color:white">

<a href="#" title="My Tab" id="mytab" class="tab">My Tab</a>
<script type="text/javascript">
        vbmenu_register("mytab",true);
    </script>

  </tr></table>

<div class="vbmenu_popup" id="mytab_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0" align="left">
        <tr align="left">
            <td class="thead"><a href="forumdisplay.php?f=12">My Tab</a> </td>
        </tr>
        <tr align="left">
            <td class="vbmenu_option" title="">
<a href="#">Link</a>
</td>
</tr>
        <tr align="left">
            <td class="vbmenu_option" title="">
<a href="#">Link 2</a>
</td></tr>
</table>
</div>

Again, edit to suit your needs.

http://img112.imageshack.us/img112/8497/tabsub5.gif

This is the same code used here at vb.org?

FReeSTER 07-18-2009 09:11 AM

Now upgrading to vb 3.8.0

I have a question for the gurus out there and coders.
How can I add a tab that when I click on it will display more then one category instead of one.

For sample, my board have many forums and I will like to use this method that i started it in this thread to separate the forum into different tabs.

At my board we talk about FTA, Computers, Music, Movies, and many more and I will like to have categories that goes with Computers for sample, to all open within the same tab.

I know this can be done with hard coding but how?

Anyone can share knowledge on this please.

--------------- Added [DATE]1247966602[/DATE] at [TIME]1247966602[/TIME] ---------------

Can I have that done in code? Can i make a code that will create a list of categories by the category # and make a link to open all categories mention in code at once all together?


Please all I need is an idea to get it done then I figure it myself.

thanks in advance

FReeSTER 07-20-2009 12:31 AM

Anyone? is there a Mod to do this? I will love to add tabs to my board but few of those tabs will open not only one category but 2 or maybe 3 categories.


All times are GMT. The time now is 04:32 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.01266 seconds
  • Memory Usage 1,854KB
  • 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
  • (3)bbcode_code_printable
  • (6)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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