Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
Custom forum CSS per Forum, using the Forum Admin Details »»
Custom forum CSS per Forum, using the Forum Admin
Version: 1.00, by Adult SEO Adult SEO is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.6.3 Rating:
Released: 11-10-2006 Last Update: 11-10-2006 Installs: 23
DB Changes Uses Plugins Template Edits
 
No support by the author.

Hi!

I am developping a new forum on http://www.papegaaienforum.com/ (meaning: parrotforum.com in dutch) and I needed to be able to change the header for each specific parrot via CSS and might also need to change other CSS for each specific forum so I wrote this small mod wich is optimized (fast, using variables already made available by vbulletin so no extra queries) and enables to configure CSS via the vBulletin admin as if it's available by default.

It contains 1 phrase ("CSS") and requires 1 template mod to insert the new styles just below the <body> tag via the "header" template. It might be better to place the styles just above the </head> tag on each seperate forum and threadview template but this requires more work so I provide instructions for the most easy and simple way.
  1. Upload css_install.php to your forum root (e.g. / or /forum/)
  2. Run the script, it will return an confirmation message that the instalation is completed. It will add one field to the forum table ("css"/TEXT).
  3. Import the included product (product-custom_forum_css.xml)
  4. Edit the "header" template and put the folowing code on very top of the template:
    1. <style type="text/css">
      $forum_css_code
      </style>
Now you will be able to aply CSS code per forum via the Forum Adminpanel, there is a new CSS textarea input on the bottom of the edit and add forum forms.

Btw, if you use subforums without CSS specified on a parrent that does have CSS specified it will use the CSS of the parrent (unlimited, so also if you have 100 levels of subforums).

I am developping more mods btw, PM or contact me for more information.

Have Fun!
Jan Jaap

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 11-11-2006, 11:34 PM
Qwest Qwest is offline
 
Join Date: Jun 2004
Location: United States
Posts: 223
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Isn't this a default feature in VB?

You can set vb to display different skins per forum already...
Reply With Quote
  #13  
Old 11-12-2006, 12:01 AM
abramelin abramelin is offline
 
Join Date: Mar 2006
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Qwest
Isn't this a default feature in VB?

You can set vb to display different skins per forum already...
no . the thing you say is changing the entire skin of a forum. this mod making changes in specified forums (forumdisplay)
Reply With Quote
  #14  
Old 11-12-2006, 08:05 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
Reply With Quote
  #15  
Old 11-12-2006, 08:14 AM
rainyleaves rainyleaves is offline
 
Join Date: Mar 2004
Posts: 227
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi.
Run css_install.php.
I got this error.

Quote:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /includes/functions.php(1219) : eval()'d code on line 5
MySQL database updated, added field "css" to the forum table.
Please...help.
Reply With Quote
  #16  
Old 11-12-2006, 09:14 AM
Adult SEO's Avatar
Adult SEO Adult SEO is offline
 
Join Date: May 2006
Location: The Netherlands
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi!

The error you received is from a difrent mod wich is probably trigered by "global_start" as the install script uses the global.php file to obtain a MySQL connection.

It might be that this error occurs on all pages of your forum but that it isn't visible.

As the result also stated "MySQL database updated, added field "css" to the forum table. " it means the CSS mod MySQL updated has been succesfull since you would otherwise receive a message stating it didn't work.

What you could do to test wich product is causing the error is commenting the folowing line in the install script:

PHP Code:
$result mysql_query(".......") or die(mysql_error(); 
To become:
PHP Code:
#$result = mysql_query(".......") or die(mysql_error();
exit; 
Then the script will not try to update the database anymore and you will receive the error only.

You then simply enable/disable each product to see wich product is causing the error.

Best Regards,
Jan Jaap
Reply With Quote
  #17  
Old 11-12-2006, 05:05 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Looks quite interesting. Would you be able to post a few screenshots of what the Forum Adminpanel looks like with this modification? Also, in your top post you don't have checked what gets changed with this mod.

Quote:
Now you will be able to aply CSS code per forum via the Forum Adminpanel, there is a new CSS textarea input on the bottom of the edit and add forum forms.
Reply With Quote
  #18  
Old 11-12-2006, 08:55 PM
Adult SEO's Avatar
Adult SEO Adult SEO is offline
 
Join Date: May 2006
Location: The Netherlands
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi!

I've added screen captures and set the configuration options.

Best Regards,
Jan Jaap
Reply With Quote
  #19  
Old 11-12-2006, 09:45 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems to be working pretty darn well so far.
Reply With Quote
  #20  
Old 11-12-2006, 09:47 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where's the damn install button?

Edit: Never mind. Could have sworn there use to be an install button plus a text link. Must be losing it.
Reply With Quote
  #21  
Old 11-13-2006, 12:46 AM
Adult SEO's Avatar
Adult SEO Adult SEO is offline
 
Join Date: May 2006
Location: The Netherlands
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=1312 75" target="_blank">https://vborg.vbsupport.ru/vborg...hreadid=131275</a>
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:27 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.04439 seconds
  • Memory Usage 2,304KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete