vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Different logo per forum? (https://vborg.vbsupport.ru/showthread.php?t=158818)

Doctor Who 09-26-2007 02:05 PM

Different logo per forum?
 
Is there any way in the latest version fo VB for me to add (on a per forum basis) different logos for each forum, whilst having a default that shows if no other image is specified?

lasto 09-26-2007 02:41 PM

good idea that

WhaLberg 09-26-2007 02:48 PM

Yes, by a plugin you can have different logos for different forums.

lasto 09-26-2007 03:25 PM

u making one whalberg ?

WhaLberg 09-26-2007 03:30 PM

For that you requested it and it's not hard to do, i will. I can release it tonight after I finish a paid work.

lasto 09-26-2007 03:57 PM

cheers m8

Doctor Who 09-26-2007 04:21 PM

Quote:

Originally Posted by WhaLberg (Post 1347620)
For that you requested it and it's not hard to do, i will. I can release it tonight after I finish a paid work.

Thank you!! :D

dirtycrow 09-26-2007 04:45 PM

Nice.

Doctor Who 09-27-2007 06:11 PM

Quote:

Originally Posted by WhaLberg (Post 1347620)
For that you requested it and it's not hard to do, i will. I can release it tonight after I finish a paid work.

I don't mean to rush you, but did you have a chance to look at this last night?

lasto 09-28-2007 06:57 PM

any news on this as it does sound like a good idea so hope someone takes up the challenge

WhaLberg 09-28-2007 07:12 PM

Be patient guys, there will be one more release with that. I am working on. :)

Kirk Y 09-28-2007 09:45 PM

If you want a no frills version...

Create a new plugin using hook location "global_start" with the following:
Code:

if (in_array($GLOBALS['forumid'], array(2,5)))
{
$stylevar['titleimage'] = "/images/forum_".$GLOBALS['forumid'].".jpg";
}

Then simply change the numbers in the array to the Forum IDs you'd like to have custom logos displayed; and move the custom logos to your "/images" directory, renaming each to the following: forum_X.jpg - where X is that logo's Forum ID.

Any Forum ID you don't specify in the array will use the default logo.

lasto 09-29-2007 09:40 AM

works perfect :) cheers kirby

now all we need is this as a plugin where we can select in each forum in admincp what logo to use,just to make it easier :)

Kirk Y 09-29-2007 02:53 PM

Well if you feel like experimenting with vBulletin and PHP: https://vborg.vbsupport.ru/showthread.php?t=93445 :)

lasto 09-29-2007 04:49 PM

2 complicated for me which is why i hire coders :)

cheers Kirk Y anyway - still a good read

--------------- Added at 08:16 ---------------

this works perfect but is there a way for the main logo on forum index to be random.
Say i make 5 and put them on the ftp it then picks a random header to show ???

Dont want it random for the different sections - only forumhome

lasto 10-01-2007 01:56 PM

if anyone readin this the code above works perfect for different sections

But i also wanted a seperate one for random images on forumhome so i done a search on here and found the code - now here is the problem - if i have random pics on forumhome it wipes off the pics for the forums which i specify does anyone know why ?

tiekie 10-01-2007 02:17 PM

Is there a working demo?

Please pm details

lasto 10-01-2007 02:29 PM

How u mean working demo

all i done was used the code on the page before for different headers inside forums which worked fine.

So i then added this code from this hack to do random images on forumhome

https://vborg.vbsupport.ru/showthrea...t=random+logos

but doing this just wipes the images i had set up for different sections

Kirk Y 10-01-2007 08:36 PM

Try wrapping the random logo code with:
Code:

<if condition="THIS_SCRIPT == 'index'">
Random Logo Code Here
<else />
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
</if>

That way it'll only execute if the user is viewing the board's index, and leave my previous code to execute if they aren't.

lasto 10-02-2007 03:46 PM

Quote:

Originally Posted by Kirk Y (Post 1351004)
Try wrapping the random logo code with:
Code:

<if condition="THIS_SCRIPT == 'index'">
Random Logo Code Here
<else />
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
</if>

That way it'll only execute if the user is viewing the board's index, and leave my previous code to execute if they aren't.

works perfect thank you once again Kirk Y

mhackl 10-03-2007 11:03 PM

I'd like to have a completely different style for specific forums.

Kirk Y 10-03-2007 11:13 PM

Create a new plugin at hook location "style_fetch" with the following:
Code:

switch ($GLOBALS['forumid']){
    case X:
        $styleid = A;
        $vbulletin->options['styleid'] = A;
        break;
    case Y:
        $styleid = B;
        $vbulletin->options['styleid'] = B;
        break;   
    case Z:
        $styleid = C;
        $vbulletin->options['styleid'] = C;
        break;
}

Replace X, Y, and Z with the Forum IDs of the forums you'd like to have specific styles; and replace A, B, and C with the Style ID of the Style you'd like assigned to each respective Forum ID.


All times are GMT. The time now is 01:17 AM.

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.02273 seconds
  • Memory Usage 1,752KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete