PDA

View Full Version : Forum Home Enhancements - Nexia's Forum Categories Seperator


05-11-2009, 10:00 PM
Seperate Main forums (categories) with style. Replace the default vB to fit a better width.

You can see the result on this site, on the forumhome page, and in each categories where you see sub-forums.

First, it seperate the categories on home page.

Second, it replace the DEFAULT thead of the forumbit listing on FORUMHOME and FORUMDISPLAY templates so you can choose the width of the "lastpostby" block.

This is one of the most requested feature for the admins who use the default vBulletin templates for forum listing.

in AdminCP >> vBulletin Options >> Forum Listings Display Options, you now have this part:

99081

no template or file edit, as usual...


Original Source: http://vbenhancer.com/free-visual-elements/forum-categories-seperator/3232/

mikey1991
05-12-2009, 10:25 PM
Thanks, Installed

ftanightwizard
05-13-2009, 12:22 PM
Installed...
Works great.
Thank You

madotds
05-13-2009, 01:03 PM
Hi Thanks for this product its just what I wanted :)

But can someone help with something please? Is there a way to have this mod not effect a particular style? Most of my styles are based on default and this mod works fine but another style is a little more modified and gets all messed up with this.

Regards
Mark

nexialys
05-13-2009, 01:09 PM
i can help you a little... (why ask "someone" when i'm here.. lol)

there is 3 plugins in this product that need to be edited by you if you want them to work on a single style...

plugins: forumbit_display, forumhome_complete, forumdisplay_complete

you have to change them like this:

if($stylevar['styleid'] == 'X')
{
###### THE CONTENT OF THE PLUGINS ######
}
replace the X with the "styleid" you want the product to work for.

madotds
05-13-2009, 01:29 PM
Lightning fast support :) Cheers mate I will go now and have a go at that.

regards
Mark

Stifmeister2
05-13-2009, 01:56 PM
Is it possible to add this only for certain styles, and not every style??

nexialys
05-13-2009, 02:00 PM
sure, change for this this:


$arrayofstyles = array(X, Y, Z);
if(in_array($stylevar['styleid'], $arrayofstyles))

change the X, Y, Z for the styleids you need...

madotds
05-13-2009, 04:01 PM
sure, change for this this:


$arrayofstyles = array(X, Y, Z);
if(in_array($stylevar['styleid'], $arrayofstyles))

change the X, Y, Z for the styleids you need...

Hi sorry but do I just need to add this code to the top of each of the plugins? I have added

$arrayofstyles = array(1, 2, 3, 4,);
if(in_array($stylevar['styleid'], $arrayofstyles))

to the top of each plugin but it still has an effect on Style ID 6

Regards
Mark

nexialys
05-13-2009, 04:07 PM
you have to make like the first request, like $arrayofstyles = array(1, 2, 3, 4);
if(in_array($stylevar['styleid'], $arrayofstyles))
{
# THE CODE OF THE PLUGIN
}

madotds
05-13-2009, 05:23 PM
Hi nexialys
Sorry for seeming like such a noob on this one but I am stuggling to get this to work! I either get it to work on all styles or none at all. below is the code I have in each of the plugins. Am I dong something stupid here? I thought i was slowly getting my head round php coding but I may have to rethink that!

forumhome_complete
$arrayofstyles = array(1, 2, 3, 4);
if(in_array($stylevar['styleid'], $arrayofstyles))
{
$needle[] = addslashes('<td class="thead">&nbsp;</td>');
$needle[] = addslashes('<td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>');
$needle[] = addslashes('<td class="thead">$vbphrase[last_post]</td>');
$needle[] = addslashes('<td class="thead">$vbphrase[threads]</td>');
$needle[] = addslashes('<td class="thead">$vbphrase[posts]</td>');
$heystack[] = '';
$heystack[] = addslashes('<td class="thead" colspan="2" align="$stylevar[left]">$vbphrase[forum]</td>');
$heystack[] = addslashes('<td class="thead" width="' . $vbulletin->options['nex_seperate_forumbits_lastpostby'] . '">$vbphrase[last_post]</td>');
$heystack[] = addslashes('<td class="thead" width="50">$vbphrase[threads]</td>');
$heystack[] = addslashes('<td class="thead" width="50">$vbphrase[posts]</td>');
$vbulletin->templatecache['FORUMHOME'] = str_replace($needle, $heystack, $vbulletin->templatecache['FORUMHOME']);
}

forumdisplay_complete
$arrayofstyles = array(1, 2, 3, 4);
if(in_array($stylevar['styleid'], $arrayofstyles))
{
$needle[] = addslashes('<td class="thead">&nbsp;</td>');
$needle[] = addslashes('<td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>');
$needle[] = addslashes('<td class="thead">$vbphrase[last_post]</td>');
$needle[] = addslashes('<td class="thead">$vbphrase[threads]</td>');
$needle[] = addslashes('<td class="thead">$vbphrase[posts]</td>');
$heystack[] = '';
$heystack[] = addslashes('<td class="thead" colspan="2" align="$stylevar[left]">$vbphrase[forum]</td>');
$heystack[] = addslashes('<td class="thead" width="' . $vbulletin->options['nex_seperate_forumbits_lastpostby'] . '">$vbphrase[last_post]</td>');
$heystack[] = addslashes('<td class="thead" width="50">$vbphrase[threads]</td>');
$heystack[] = addslashes('<td class="thead" width="50">$vbphrase[posts]</td>');
$vbulletin->templatecache['FORUMDISPLAY'] = str_replace($needle, $heystack, $vbulletin->templatecache['FORUMDISPLAY']);
}

forumbit_display
$arrayofstyles = array(1, 2, 3, 4);
if(in_array($stylevar['styleid'], $arrayofstyles))
{
if (!isset($sepcounter)) $sepcounter = 0;
if (($tempext == '_nopost') AND ($sepcounter >= 1))
{
eval('$forumbits .= "' . fetch_template("forumhome_forumbit_seperate") . '";');
}
$sepcounter++;
}

Again sorry to be a pain in the arse :(
Regards
Mark

nexialys
05-13-2009, 06:22 PM
looks good to me, if you want the hack to work in style #1, #2, #3 and #4... ;)

madotds
05-13-2009, 06:41 PM
looks good to me, if you want the hack to work in style #1, #2, #3 and #4... ;)

Thats not good then :( if the code looks right but it is still not working for me. I will have to come back to this one later

Cheers for the help

funkmeister
05-13-2009, 07:57 PM
Great mod, thanks. But have had to uninstall as I was finding depending on which browser was in use, the width applied would display differently for each separated forum! IE6/7, Safari (mac/win), Chrome, Firefox...

Will keep an eye on it, should it be more cross-browser friendly in the future.

Thanks.

goxy63
05-14-2009, 07:01 AM
WTF

Pile of great mods and developer nexialys suspended ???

Bullshit if you ask me !!!

Is there any thread why people got suspended and what suspension means, will he be able to support his hacks/mods !?

http://vbenhancer.com/admins-den/oh-my-oh-my/4848/

Leo Brazil
05-14-2009, 05:32 PM
I just hope the issue with Nexialys was sorted out soon. I've been testing this mod for awhile and it was the only categories separator that works great on my board without messing up with some parts.

But I'll need some help with it.

I have many sub forums, I mean like a 4th degree sub forum.

I would like to know if is there a way to select of disable a few forums to not be affected by this mod, I mean without separation ?

Thanks

PS: Despite of tons of mods been published on 11th this month, your case is the exception of the expression "Quantity doesn't mean quality". Great and useful selection of mods you have and thank you for sharing with us.