The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
Yes, its finally here.
No longer will you need to create duplicate templates just to set a few custom colors on the forum level. I don't have a use myself, but it was heavily requested, so I figured what the heck! Yes Nathan, this will work great with the InfoGrames boards There are nicers ways of going about this than what I did, but this required the least table modification and code changing, so it should be fine. This was lightly tested on my test board, and all seemed to work well, but no guarentees. I suggest you backup global.php (main directory, not admin) before making any changes. Here's how it works: You go to the style page (styles.php) and it brings up a list of all forums. To the right of those forums are numbers, and they all are equal to 0. Those numbers represent the number of custom style settings represented in that specific board. So if you only change the <body> tag, that number will display 1. If you customize it completely, the number will be higher. Also, since some forums might only require small changes, those fields which you don't specify will use the installation default (what you set in the existing styles section). Yea, the interface is pretty ugly and the code isn't much better...but its fast, and it works. Everything else will be improved upon with time, as long as this thread is as popular as Ed's are! Directions: execute the following mysql command: Code:
ALTER TABLE replacement ADD forumid SMALLINT (5) DEFAULT '0' not null; Code:
<? require ("global.php"); if (mysql_query("ALTER TABLE replacement ADD forumid SMALLINT (5) DEFAULT '0' not null")) { print "Success!"; } else { print "Failed!"; } ?> look for: Code:
// load vars $vars=$DB_site->query("SELECT * FROM replacement ORDER BY replacementid DESC"); Code:
// ###################### Start standarderror ####################### Code:
// ###################### Start dovars ####################### function dovars($vartext,$fid=0) { // parses replacement vars global $DB_site; global $forumid; global $vars; // load vars $cusvars=$DB_site->query("SELECT * FROM replacement where forumid = $forumid ORDER BY replacementid DESC"); $newtext=$vartext; $DB_site->data_seek(0,$cusvars); $forumspec = ""; while ($cusvar=$DB_site->fetch_array($cusvars)) { $newtext=str_replace($cusvar[findword],$cusvar[replaceword],$newtext); $forumspec .= "and findword != '$cusvar[findword]' "; } $vars=$DB_site->query("SELECT * FROM replacement where forumid = 0 $forumspec ORDER BY replacementid DESC"); $DB_site->data_seek(0,$vars); while ($var=$DB_site->fetch_array($vars)) { $newtext=str_replace($var[findword],$var[replaceword],$newtext); } return $newtext; } create styles.php: (in /forum/admin, not /forum) update: it appears, since I'm using replacement variables in the code, that this vBulletin installtion is actually replacing the code on the fly. to get the code for styles.php, please go to the following url: http://unreal2.net/styles.phps start forum/admin/styles.php from your web browser Easy enough? Of course... No demo, since I don't have a use for it, but if Nathan (hint hint) or someone else could put it into use to demonstrate, that'd be great! [Edited by Stallion on 07-15-2000 at 02:48 AM] Show Your Support
|
Comments |
#2
|
|||
|
|||
yay ! interesting... i would have use for this but ain't game enough to try it out as i am php illiterate....
anyone trying it, can show a working demo? |
#3
|
|||
|
|||
It appears that it allows you to set different colors and fonts. What about the bbtitle.jpg? People will want different graphics for each forum.
|
#4
|
|||
|
|||
You can set different bbtitle images and new topic/post reply links through the actual forum options.
I'm not 100% sure, but thats where I remembered seeing it. |
#5
|
|||
|
|||
how would this hack, effect future upgrades ? would it have to be hacked again ?
|
#6
|
|||
|
|||
If global.php is updated with that version, then yes, it will have to be hacked.
However, its just a small text replacement, so I don't see it being too much of a problem. Just for the record, I am working on some scripts to "auto-hack" this into your board, as well as providing a global.php (already hacked, but only accessible with your vB username/password). So basically, you login: http://www.unreal2.net/vb, fill in your details, and you can download the hack itself. This way, we're not violating copyright issues but still making it easy to install a hack. |
#7
|
|||
|
|||
Thanks for this, it's just what I needed.
I've got it installed and running on a test BBS, but for some reason I can't get the <BODY> settings to stick. This allows me to change everything but the BGCOLOR and TEXT params, leaving the vB defaults instead. Also, in the styles.phps code (from $style = "<body>" thru $style = "</smallfont>") some carats were being used instead of curly braces preventing the display of those elements in the form. I "corrected" those to match the other $style entries, but don't know if that might have made things worse... I could also just not be using the proper syntax. Any help would be appreciated. |
#8
|
|||
|
|||
That vB hack thingy is cool... how did u do it?
|
#9
|
|||
|
|||
illout: thanks for testing, I'll take a look.
JohnM: the same way I did it for UBB, http://www.unreal2.net/ubb Pretty cool, eh? |
#10
|
|||
|
|||
That UBB link doesn't work
And I'm pretty sure I know how to do it actually. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|