View Full Version : Forum Display Enhancements - Custom forum CSS per Forum, using the Forum Admin
Adult SEO
11-10-2006, 10:00 PM
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.
Upload css_install.php to your forum root (e.g. / or /forum/)
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).
Import the included product (product-custom_forum_css.xml)
Edit the "header" template and put the folowing code on very top of the template:
<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 (adultseo@gmail.com) for more information.
Have Fun!
Jan Jaap
Ajavas
11-11-2006, 04:55 PM
Thanks for this hack....First to install! :) ;)
Adult SEO
11-11-2006, 05:09 PM
Hi!
Sorry to tell you this, but there is a cache bug.
When you navigate from the homepage into a forum with difrent CSS it isn't loaded at first, but if you navigate further into a subforum or back to the mainpage, the CSS is suddenly loaded!
I am working on a solution for it and let you know!
If anyone has any idear as of why this happens, please let me know!
Best Regards,
Jan Jaap
abramelin
11-11-2006, 05:11 PM
any demo?
Adult SEO
11-11-2006, 05:30 PM
Fixed!
I used the "session-cache" information and needed to combine the information with a difrent variable.
Now it works perfectly! You can see an example here: http://www.papegaaienforum.com/forumdisplay.php?f=2 and then simply navigate to the root, it will load a difrent header image with parrots top right (200k+).
Have Fun!
Jan Jaap
abramelin
11-11-2006, 05:50 PM
adult seo this is a realy nice mod. i was searching for a mod like this. Let me clear, with this mod i can change the header images per forum am i right?
Adult SEO
11-11-2006, 06:28 PM
Yes, you can make changes to any design on the forum, like colors, font types, width of the forum, background colors and images etc.
letsjoy
11-11-2006, 06:45 PM
very nice...I am waiting for mod like that
Ntfu2
11-11-2006, 07:24 PM
I cant wait for this one
I am developping more mods btw, for example the reciprocal link system wich you can see on the example forum. It will display a toplist of pages that send traffic to your forum. Inactive links that don't send traffic for 7 days will be deleted, and there is a simple admin to ban pages. And, referrer affiliate spammers get detected by parsing the spamming page and verifying if the page contains a redirect or redirection header (301). Actualy, also links comming from secure pages like webmail pages will be banned.
And this one is a awesome hack. I'll be upgrading to 3.6.3 tonight, and this will be installed at the same time
Adult SEO
11-11-2006, 08:00 PM
Hi!
Yes, I will release it for free but I will probably demand a returnlink (small icon linking to http://www.publiceren.net/) as this mod costs a bit more time to do it verry well than the CSS mod.
I will post it in a few days.
Best Regards,
Jan Jaap
Qwest
11-11-2006, 11:34 PM
Isn't this a default feature in VB?
You can set vb to display different skins per forum already...
abramelin
11-12-2006, 12:01 AM
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)
Snake
11-12-2006, 08:05 AM
Thanks!
rainyleaves
11-12-2006, 08:14 AM
Hi.
Run css_install.php.
I got this error.
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.:)
Adult SEO
11-12-2006, 09:14 AM
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:
$result = mysql_query(".......") or die(mysql_error();
To become:
#$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
Smoothie
11-12-2006, 05:05 PM
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.
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.
Adult SEO
11-12-2006, 08:55 PM
Hi!
I've added screen captures and set the configuration options.
Best Regards,
Jan Jaap
Smoothie
11-12-2006, 09:45 PM
Seems to be working pretty darn well so far.
Smoothie
11-12-2006, 09:47 PM
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.
Adult SEO
11-13-2006, 12:46 AM
<a href="https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=131275" target="_blank">https://vborg.vbsupport.ru/vborg...hreadid=131275</a>
Smoothie
11-13-2006, 01:12 AM
Possible to have more flexibility with this? Like maybe the header and footer templates?
abramelin
11-13-2006, 02:33 AM
smoothie stop flooding!
Adult SEO
11-13-2006, 03:14 AM
Possible to have more flexibility with this? Like maybe the header and footer templates?
Hi!
This mod will enable you to change everything that is styleable via CSS. Since almost everything on the forum is styled via CSS you can change the look of for example the footer or header easily.
Best Regards,
Jan Jaap
A question - does this offer anything that the default 'Choose style for viewing this forum' option in Forum Manager does not?
Adult SEO
11-13-2006, 03:46 AM
A question - does this offer anything that the default 'Choose style for viewing this forum' option in Forum Manager does not?
Hi!
It will just save a lot of time and alow to easily change the CSS of a forum without the need to create templates, styles etc. and managing them all together.
This will work based on 1 design, wich will make it easyer to update all forums and making minor changes to the CSS to for example just change the header image.
It's just more simple and faster and saves a lot of work if you just want to change the header image or backgroundcolor for example. It's not meant for advanced style changes, just for minor CSS changes.
Best Regards,
Jan Jaap
I thought that was the general idea but confused myself when I tried to work out how to change the header/header image and footer using CSS only, without making major changes to the vB core files. How do you manage to change the logo using css?
Adult SEO
11-13-2006, 04:51 AM
Well, you could remove the header image and put for example a div with the class "header_image".
You will then be able to format it as folowing:
.header_image {
width:300px;
height:200px;
background:#ffffff url('/images/header1.png') 0px 0px no-repeat;
}
So it costs just a simple header edit you need to do anyway + CSS.
Best Regards,
Jan Jaap
Smoothie
11-13-2006, 08:51 AM
smoothie stop flooding!In case you haven't noticed wise guy there is some sort of problem with forum because of the upgrade. So, get a life.
abramelin
11-13-2006, 02:17 PM
hmmm, after your example adult seo, there is a question stuck in my mind. you gave a css code that only control the header part. i want to change my forums only header too but i dont understand one part: am i have to use only the header part of css code or the entire css code with the modified header part ?
Adult SEO
11-14-2006, 04:54 AM
With this MOD you just need to use the CSS code you want to change or aply as new. As this CSS code will be served to the browser after the original CSS code, it will override the original CSS code, it does not replace the original CSS code.
edenx
11-14-2006, 10:31 AM
Does it include uninstall function?
Adult SEO
11-14-2006, 11:06 AM
Hi!
There is no uninstall function, but I don't think this would be demanded as the plugin is really simple and you can always disable it by turning the product off or uninstalling the product.
If you uninstall the product then the database remains modified with the field "css" in the forum table. You could delete this field manualy.
The code to do it is:
ALTER TABLE `PREFIXforum` DROP `css`
Best Regards,
Jan Jaap
Metal-R-US
11-14-2006, 11:20 AM
Nice one, I can really use this for my hosted forums. Time to fire up Photoshop and create some custom headers. Thanks!
Smoothie
11-15-2006, 01:46 AM
It works. Just add the desired amount of CSS you wish to change per forum.
Metal-R-US
11-16-2006, 09:08 AM
I uninstalled as the header template edit caused a W3C validation error on my site...
Adult SEO
11-16-2006, 07:50 PM
Hi!
I've offered a solution for this in the description. It would be best to add the CSS code in the actual head of the page as this is also actualy required according to standards aldough it works fine if you place style code anywhere else on the site.
So, to make it easy to install you can just put the styles just below the <body> tag via the header template but if you would like to make it W3C valid you should edit all main templates manualy and add the style tag between the <head> tags of each page.
Best Regards,
Jan Jaap
Adult SEO
11-17-2006, 06:19 AM
I just spoke to Crist from Any Media, the number 1 media mod for vBulletin 3.5.x and we agreed that I will continue with Any Media and make it availabe for vBulletin 3.6.x.
The new version of Any Media will be called Any Media 3.6.x and will be official linked to from Any Media 3.5.x.
I don't know yet if it will remain the same and if all features of the old version will remain and what new featured will be added but I will try to make it as perfect, stable, optimum and fast as possible.
The mod will be free but will require a icon/link on the video display wich can be removed by paying a small fee.
Best Regards,
Jan Jaap
Metal-R-US
11-17-2006, 08:46 AM
Hi!
I've offered a solution for this in the description. It would be best to add the CSS code in the actual head of the page as this is also actualy required according to standards aldough it works fine if you place style code anywhere else on the site.
So, to make it easy to install you can just put the styles just below the <body> tag via the header template but if you would like to make it W3C valid you should edit all main templates manualy and add the style tag between the <head> tags of each page.
Best Regards,
Jan JaapThanks, I'll try it on my test forum first.
Hi Adult SEO,
is ist possible to tweak your add-on so that I can control CSS menu (Will use it for different sections of my forum). What I want is that I want match certain menu item with certain forum tree so that menu will stay "active" in all tree.
CSS menu I want to use for it is here:
http://unraveled.com/projects/css_tabs/
www.vbhackers.com use the menu the way I want it too.
I mean menu: Home, Vbulletin hacks, Vbulletin templates etc.
Thanks .-)
abramelin
11-24-2006, 02:14 PM
can you make the same module for user profiles? i mean custom forum css per user profile.
Adult SEO
11-24-2006, 02:27 PM
Yes, if you pay me $50 I will do it.
Adult SEO
11-24-2006, 02:29 PM
Hi Adult SEO,
is ist possible to tweak your add-on so that I can control CSS menu (Will use it for different sections of my forum). What I want is that I want match certain menu item with certain forum tree so that menu will stay "active" in all tree.
CSS menu I want to use for it is here:
http://unraveled.com/projects/css_tabs/
www.vbhackers.com (http://www.vbhackers.com) use the menu the way I want it too.
I mean menu: Home, Vbulletin hacks, Vbulletin templates etc.
Thanks .-)
Hi!
Yes, this is possible.
Best Regards,
Jan Jaap
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.