No announcement yet.

How do I jam Vbulletin into an existing PHP driven style?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I jam Vbulletin into an existing PHP driven style?

    I've been bashing my head against the wall for a week now with Vbulletin's overcomplex style tools. All I want to do is jam vbulletin into my existing websites php driven templates.

    I have a site that is constructed like so:
    index.php calls:
    -> header.php
    -> sidebar.php
    -> #contents (from a mysql database)
    -> rightbar.php
    -> footer.php
    and viloa, dynamic content website.

    In simple terms, I just want to create a vbulletin template that plugs into my existing php style, but replaces the #contents with a #vbulletin.

    Sorry for the oversimplification, but this shouldn't be this hard. I feel like I'm looking in the wrong area or something.

    Any help will be greatly appreciated.

  • #2


    • #3
      Bump again.

      Does anybody have a simple answer to this question? Or is this impossible?

      Somebody point me at a FAQ that isn't filled with links to people trying to sell me a skin for vbulletin.

      Or a simple user guide to the style system that isn't filled with crap?



      • #4

        Well first you will need to get your PHP into vBulletin. This would be done through Hooks as vBulletin already has its own header, footer and other templates.

        So look at how to include external files in the online documentation. You can see this here:

        Next you need to add the side columns, as vBulletin doesn't have this right now. There is a tutorial on how to do this here:

        Finally, the Header and Footer templates in vBulletin have required information in them for them to work.

        In the header replace:
        HTML Code:
        <!-- logo -->
        <a name="top"></a>
        <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
        	<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
        	<td align="$stylevar[right]">
        <!-- /logo -->
        With the variable you assigned your header.php output to.

        In the footer do not remove anything above:
        <!-- /content area table -->

        Also you need to keep:
        HTML Code:
        <div align="center">
        	<div class="smallfont" align="center">
        	<!-- Do not remove this copyright notice -->
        	<!-- Do not remove this copyright notice -->
        	<div class="smallfont" align="center">
        	<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
        	<!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
        <if condition="$show['dst_correction']">
        <!-- auto DST correction code -->
        <form action="profile.php?do=dst" method="post" name="dstform">
        	<input type="hidden" name="s" value="$session[sessionhash]" />
        	<input type="hidden" name="do" value="dst" />
        <script type="text/javascript">
        	var tzOffset = $bbuserinfo[timezoneoffset] + $bbuserinfo[dstonoff];
        	var utcOffset = new Date().getTimezoneOffset() / 60;
        	if (Math.abs(tzOffset + utcOffset) == 1)
        	{	// Dst offset is 1 so its changed
        <!-- / auto DST correction code -->
        <script type="text/javascript">
        	// Main vBulletin Javascript Initialization
        The Style Reference documentation is here:
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API


        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.