Announcement

Collapse
No announcement yet.

Modifying the template with a PHP include?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Modifying the template with a PHP include?

    Hi,
    I am trying to set up a forum on my site that looks just like this: http://www.lifamilies.com/chat/. Basically I need the forum on the left, and down the right sidebar a series of about six ads. These ads will be coming from a database and rotate, so preferable that sidebar would just be a php include to another file on my site that did the work of pulling those.

    So basically my question is - how easy/is it possible to modify the template to add a column that is a php include? I don't want to buy the software to test this only to find that it won't work!

  • #2
    vBulletin has an integrated plugin system that allows you to add specialized coding anywhere you like throughout the forum, so what you are asking is very simple to accomplish.

    Here is an example of the power of vB's plugin system. The screenshot is my forum's home page. All done with a little CSS, and specialized code contained within plugins. No vBulletin file had to be edited. The white text on the map is the forum categories. Don't mind the bluriness, the screenshot got resized when uploaded to here.
    Attached Files
    Last edited by DoE; Mon 11 Jan '10, 10:39am.

    Comment


    • #3
      Not really helpful, but I just had to say: Wow!! DoE, that is the coolest thing I ever saw. It's amazing, to the say the least. Now I'm left wondering what "little css" did this...teehee

      Comment


      • #4
        Originally posted by DoE View Post
        vBulletin has an integrated plugin system that allows you to add specialized coding anywhere you like throughout the forum, so what you are asking is very simple to accomplish.

        Here is an example of the power of vB's plugin system. The screenshot is my forum's home page. All done with a little CSS, and specialized code contained within plugins. No vBulletin file had to be edited. The white text on the map is the forum categories. Don't mind the bluriness, the screenshot got resized when uploaded to here.


        now thats a custom skinning god

        Comment


        • #5
          Thank you so much! It's very helpful to know that what I want to do is possible. But just so I'm clear - is this a fairly easy thing to do, once I find some online documention? Or does it require a lot of trial and error? (I need to come up with some sort of timeline for my client and need to know if this might take me one day or 2 weeks). Thanks again for your help!

          Comment


          • #6
            I'm not sure of your level of skill, so I can not comment on the time it may take you. With testing and tweaking, should be approx. an hour.

            As an example, here is what I would do (assuming you want two columns on all vB pages, and do not mind the values I just made them up):

            First the CSS:

            #right_column {
            float: right;
            width: 200px;
            background: #FFFFFF;
            min-height: 400px; // if you want a min height
            padding-right: 26px;
            padding-left: 20px;
            margin: 0px;
            }

            #left_column {
            width: 716px;
            background: #FFFFFF;
            padding-left: 0px;
            padding-top: 12px;
            margin: 0px;
            }

            <div id="left_column"> for forum content, and <div_id="right_column"> for the sidebar.

            The right side will be opened and closed somewhere under the nav block, and the left side somewhere under the nav block and close it in the footer. Then using a plugin, probably hooked in global_start, place your php code and output the result in the right column, eg:<div id="right_column">$myfunkyoutput</div>

            The above works for me. I am creating a main web page that uses two columns. One of the columns I output posts from my forum to it. I find it easier to add content by using a forum that only I can see, and then having my web page connect to it and grab the info out to be displayed.

            Hope the above helps you decide to go vB
            Last edited by DoE; Tue 12 Jan '10, 8:15am.

            Comment


            • #7
              Thank you thank you! You HAVE convinced me to go VB - it is purchased and set up. Last question... sorry to be such a bother!

              Where exactly would I make the edits you've outlined above? I've added the css in the vbulletin.css file, but what about adding the divs into the page code?

              Last question, I promise

              Comment


              • #8
                No bother,

                I'm using the beta release of 4.0 as I do not have 4.0 gold installed as of yet, so the following may not work for you, depending on what has changed.

                Open navbar template.

                Find: {vb:raw ad_location.global_below_navbar}

                Directly above add: <div id="left_column">

                Hit save.

                Open the footer template and find: {vb:raw ad_location.global_above_footer}

                Directly below, add:
                </div>
                <div id="right_column">
                $mylistofwonderfullyfantasticlookingmoneygeneratingaddsorsoihopemaybewowlongvariable
                </div>

                Hit save

                The above placement, will leave the navbar the width of your defined page, and the footer (with the archive and top links) the complete width as well. Everything in between will be the width defined in the CSS for left and right columns

                I can not guarentee this for your version of vB as I do not have it installed, but I just tested it on beta 4 and it worked as defined: 2 columns side-by-side, one of which contains the forums lisint, and the other a 200px wide white space just waiting to be filled with that really long awful varible,

                Comment


                • #9
                  Please do not provide support in the presales forum.

                  Comment

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