The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Where to start, beginning a custom css (no html tables) hack.
I've just started using VB (after trying out phpbb and ipb) mainly because it allows me so much more control over the templates. What I dislike about VB (and all forums for that matter) is the over use of html tables & poorly placed html code. Namely, I don't want the search engine spiders to see 600 lines of junk html code + navigation + .... before they get to the beef of a post. For that reason I've been using the VB style manager to rewrite the html with new css designed content to replace the tables.
As I've been getting aquainted with the vb system, I've started also wondering how much "reinventing of the wheel" I'm doing here. For that reason I thought I'd look into what is already available. Some of the things I'm interested in doing are: 1) Setting up individual components of VB so that I can include them in other parts of my website (outside of the /forum/ base directory). Ideally what I'd like to be able to do is either use a php (include"") statement or a function call to insert that code. For instance, say on a given page on my site I wanted to include the navbar's user CP code. I want to do a insert_user_cp() and have it display something like: <div class="userCP"> .....VB generated info about user..... </div> Does this type of functionality exist yet? Problems I've encountered 1. GENERIC_SHELL does not seem to affect pages. Namely, when I insert some custom code into it, it doesn't display on individual pages. For instance, I have to repeat the same absolute div to include a floating logo on each of forum_display, forum_home, etc. templates. 2. Inability to include php code. For instance, at the bottom of the forum_display template, I'd like to add the line <? include"/home/....../logo.php" ?>, however this doesn't work. Do I need to manipulate the VB files themselves to make this happen, or is there something I'm missing to create PHP includes. Thanks, Chris |
#2
|
|||
|
|||
the generic shell, i believe is just that.. a basic template of the forumhome, i think.. it isn't used.. it is there as a replacement if you need a basic, unmodified template to redo a hack or replace the entire template.. to use includes, look at the phpinclude_start template.. look at the example within that template.. you will then see how to use the vB includes system..
the css system is pretty solid within vB.. and I think you will have decent luck when you start the heavy modifying you are looking at doing.. to get to the css info, go to stlye manager, then check out All Style Options to see replacement info in header, footer, phpinclude_start, phpinclude_end, and headinclude.. below that, you will see all of the available css options.. btw, nice first post.. |
#3
|
||||
|
||||
vBulletin 3 is fully XHTML complient or as close as possible, and its fairly well written code IMO. The generic Shell is a generic shell, if you want to effect mosdt o the forums you should be editing the header and footer templates. However, this is NOT the place for discussion of templates, that is what vBulletintemplates is for, and No you cannot execute phpcode in the templates you need to either hack this into a signle file or multiple files OR use the phpinclude_start / end templates.
|
#4
|
|||
|
|||
Quote:
I've already started digging quite deeply into the VB style manager and it's robust. At this point I'm just modifying the forum to look the way I want, I'll worry about exporting it to other sections of my sites later (yes I've got multiple VB license :P). Some of the other stuff I'm definitely going to do (please let me know if this has been done already) is as follows:
PS. Sorry if this was posted in the wrong forum. If it would be better elsewhere, could a moderator please move it. |
#5
|
||||
|
||||
Quote:
Spiders can already spider the forums fine with how vBulletin displays things so mod_rewirte is not really nessary. but it can be done. |
#6
|
|||
|
|||
>> Are you using vB2 or vB3? <<
vB3 & that's good to know about the spiders and sessions. Which >>Spiders can already spider the forums fine with how vBulletin displays things so mod_rewirte is not really nessary. but it can be done.<< hehe, yah I'm a stickler for this stuff, I'd prefer to rewrite it to a static url instead of a dynamic one. Which function would I be modifying in order to rewrite the urls, do you know off hand? I haven't looked but I"m assuming somewhere within the session.php file. I've got some neat ideas planned for integrating this forum and so far I'm very pleased with it. |
#7
|
||||
|
||||
I think someone has already released a mod for it, and i know very little about codeing so asking me is like asking a tree
|
#8
|
|||
|
|||
Quote:
|
#9
|
||||
|
||||
Quote:
|
#10
|
|||
|
|||
>>It is not CSS-compliant<<
So far it's going pretty well modifying only within the style manager. Basically I'm chopping out all the html table code and replacing it with custom css code & using that phpinclude_start + the footer to reinclude the absolute elements. What I expect is going to be somewhat more difficult to include the code chunks outside the VB forum directory. As an aside, what is VB policy on using the same forum on multiple sites. I know that you cannot do multiple installs but also that parking is ok. What about a situation where you sites hosted on the same server make mysql calls to pull parts of the same forum. For instance, say the main forum is about "Trees who don't code". :P Could I query and include and maniupluate only a section of that main forum on say noncoding-walnut-trees.com? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|