Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2004, 05:16 PM
christopher_c christopher_c is offline
 
Join Date: Apr 2004
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 04-24-2004, 06:13 PM
13th_Disciple 13th_Disciple is offline
 
Join Date: Jan 2003
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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..
Reply With Quote
  #3  
Old 04-24-2004, 06:27 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 04-24-2004, 06:34 PM
christopher_c christopher_c is offline
 
Join Date: Apr 2004
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Got it Thanks 13th.

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:
  1. Remove any session information for known search engine robots. Which function would I need to look into in order to do this?
  2. Rewrite the forum urls from dynamic to static & add a custom mysql call to create a more person friendly URL. i.e. /forum/green/turnips-4.htm . I'll then use mod_rewrite to rewrite the url back to the appropriate thread (i.e. /forum/showthread.php?t=4)

PS. Sorry if this was posted in the wrong forum. If it would be better elsewhere, could a moderator please move it.
Reply With Quote
  #5  
Old 04-24-2004, 06:46 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by christopher_c
Got it Thanks 13th.

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:
  1. Remove any session information for known search engine robots. Which function would I need to look into in order to do this?
  2. Rewrite the forum urls from dynamic to static & add a custom mysql call to create a more person friendly URL. i.e. /forum/green/turnips-4.htm . I'll then use mod_rewrite to rewrite the url back to the appropriate thread (i.e. /forum/showthread.php?t=4)

PS. Sorry if this was posted in the wrong forum. If it would be better elsewhere, could a moderator please move it.
Are you using vB2 or vB3? For vB3 Sessions wont appear to anyone unles they are nessary and DONT appear to spiders at all.

Spiders can already spider the forums fine with how vBulletin displays things so mod_rewirte is not really nessary. but it can be done.
Reply With Quote
  #6  
Old 04-24-2004, 06:53 PM
christopher_c christopher_c is offline
 
Join Date: Apr 2004
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

>> 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.
Reply With Quote
  #7  
Old 04-24-2004, 06:54 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 04-24-2004, 06:55 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery
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.
It is not CSS-compliant, however, as I found out. Unfortunately the fix is very simple but I am doubtful if it would be made official: underscores are not allowed in CSS class names.
Reply With Quote
  #9  
Old 04-24-2004, 06:57 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by filburt1
It is not CSS-compliant, however, as I found out. Unfortunately the fix is very simple but I am doubtful if it would be made official: underscores are not allowed in CSS class names.
I said XHTML not CSS which last time i checked they are two differnt standards
Reply With Quote
  #10  
Old 04-24-2004, 07:26 PM
christopher_c christopher_c is offline
 
Join Date: Apr 2004
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

>>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?
Reply With Quote
Reply


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 05:11 PM.


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.04237 seconds
  • Memory Usage 2,264KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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