Announcement

Collapse
No announcement yet.

duplicating styles & templates??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • duplicating styles & templates??

    In order to have a different header html for each of our boards do we need to create a new template set? or a new style set?

    If either of those is the answer, how do you duplicate one style/template for the other boards and then just change the headers? (so that you dont have to manually set the colors etc.. for each board)


    Thx!!

  • #2
    You actually have to create both -- create the template set and point the style at that template set and the origianl replacement set.

    How much of your header are you trying to change? If it's only a little bit, I can show you a method that uses alternate replacement sets instead of template sets, which is probably a little easier to manage.

    Comment


    • #3
      hi thx for your reply. need to change some banner codes for each board and change the logo for the board.

      Comment


      • #4
        The logo is actually controlled by a replacement variable ( { titleimage} ).

        Let me know if this helps:

        The way I'm going to attempt to you show you how to use it uses custom replacement variables. Say this is your header:

        <table>
        <tr>
        <td>logo</td>
        <td>ad banner stuff</td>
        </tr>
        </table>

        The whole header is going to stay the same, except for "ad banner stuff".

        In your CP, scroll down to "replacement variables" and click "modify". Expand the "Default" set -- this will be what is used by non-forum related pages (index.php). Click "add custom replacement" next to the set's name. In "code to find", enter "{adbanner}" , and in "code to insert", enter "ad banner stuff". (Remember, this is what you want for non-forum specific pages!)

        Now, in the "replacement variables" section in the left frame, click "add replacement set" and call it whatever you want. Since you'll be using this for the forum 1 ad, I'll refer to it as "forum 1". Add the {adbanner} replacement for this forum as per the instructions above.

        Back in the left frame, go to Styles -> Add. I'll be calling this "Forum 1" again. As the replacement set, say "forum 1"; template set, "default". Submit that page. Now you'll want to click on "[fonts/colors/etc]" and set all the colors to what you want this forum to be (I assume the same colors as the rest of your board). Don't touch any of the top 4 areas (labeled templates!).

        Now, go to forums & moderators -> modify and click "edit" by "Forum 1". As the "custom style set for this forum", set it to "forum 1". You will probably also want to set the "Override users custom styles" to yes, but it's not particularly important.

        Now, you want to repeat the above (create replacement set, add custom replacement, create corresponding style, change colors, assign style to forum) for all the forums that you want to have a non-"Default" ad.

        There is now one last step, but it's the most important. Go to templates -> edit and expand the "default" set. Find "header" in the list, and click "edit". In the HTML code, you should still have "ad banner stuff". All you have to do is simply replace that with {adbanner}.

        Tada! You should know have all your forums with a different ad.

        Comment


        • #5
          i tried it, in theory it should work but it doesnt for me, here's what im doing


          1. added a new replacement set for each board that needs a custom banner code
          - for each replacement set I added a 'custom replacement' e.g. {mycode}



          2. went into the default style modify page and added the {mycode} tag in the 'header'



          3. added a new style set for each of the custom boards
          - used the corresponding replacement set name for the replacement field
          - set the template field to 'default', which is what i'd like to use as far as the layout goes, since it should be consistent throughout all boards


          4. modified each of the forums (that must feature custom banner code) and set their style to their corresponding style set name.


          ---------------------
          Here's the problem, the replacement feature works, so each of those forums are showing different banners code...

          The problem is that the 'custom' forums seem to be using vbulletin's generic templates, and not the 'default' templates which I had tweaked.



          >> Recap

          1. Main forum page which uses the 'default' style works ok
          2. Forums which feature custom styles, the custom banner code works ok, however the page layout is the generic purple vbulletin layout.


          Let me know if I missed a step somewhere, much appreciated!!

          Comment


          • #6
            If you can do a bit of php, then one way to do it is use a switch() statement in php include.

            I currently use this for a lot of stuff. There are various Variables you can use for the switch but two of the most useful ones are $getforum[styleid], and $forumid.

            You can do stuff along these lines:

            $Banner = implode("", file("/mybannerad/$forumid.php"));

            You can use $getforum[styleid], and $forumid together to make pretty complex switch statement where one overides the other, or even include $bbuserinfo variables so you could target ads to that specific users charactoristics.

            PS. Using this method I've got around 50 unique looking forums buy just using 6 replacement sets and the default template.
            Last edited by chilliboy; Fri 13 Jul '01, 3:50am.

            Comment


            • #7
              You missed this part:

              (In styles) Now you'll want to click on "[fonts/colors/etc]" and set all the colors to what you want this forum to be (I assume the same colors as the rest of your board).

              Comment


              • #8
                That worked, thx!

                Comment

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