Announcement

Collapse
No announcement yet.

Can we edit the archive template?

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

  • Can we edit the archive template?

    Hey,
    I would like to add my header to the archive templates for HostingRefuge.com
    Are we able to do this?

    Thanks
    John
    John Diver

  • #2
    I don't think he Archive uses templates. You would have to edit the code directly.
    vBulletin v3.8.0's Implementation of Google Adsense Should Be Avoided At All Costs - Do Your Own Adsense Implementation

    Comment


    • #3
      Thanks, I found that you add it to the global.php file but I am not sure how to add javascript/HTML to the PHP..
      Anyone able to help with this one?

      Tried doing ?> to close PHP then add the HTml where I wanted it, then <? again but it gave an error for headers already sent.

      John
      John Diver

      Comment


      • #4
        Are you trying to add Google Adds?


        I would go for the index.php page first and look for the first <body> tag and it directly after that before the php tag.

        It it's for Google adds shoot me a pm and I will send you specific instructions as it's considered a hack.

        Mike
        Last edited by indiamike; Wed 23rd Mar '05, 7:45am.

        Comment


        • #5
          Hey Mike,
          No I am adding javascript code which is used in my forum main header.
          Would the index.php page show the same code on all pages?
          For example if a user found a thread in the archive through google, would the code that was placed in the index page show on the thread?

          I thought it would have been the global as that is included on all pages.

          Thanks very much
          john
          John Diver

          Comment


          • #6
            Yes it will appear on all the pages.



            Look around line 119 (may vary depending on which version) in the index.php for the lines
            <body>
            <div class="pagebody">
            <?php

            Try to add it somewhere after the body tag and before the php tag.


            The global.php in the archives is just defining the functions of the archives and the index.php is responsible for the layout of it.
            Last edited by indiamike; Wed 23rd Mar '05, 7:44am.

            Comment


            • #7
              That's great, thank youvery much!

              Really helped

              John
              John Diver

              Comment


              • #8
                For a cleaner look you can try something like this

                PHP Code:
                <body>
                <div class="pagebody">
                <div class="post" align="center">
                <script type="text/javascript">
                all
                your 
                script
                goes
                here
                </script>
                </div>
                <?php
                Replacing
                PHP Code:
                <script type="text/javascript">
                all
                your 
                script
                goes
                here
                </script
                with your javascript.

                This will center it and add it nicely to the page.
                Last edited by indiamike; Wed 23rd Mar '05, 7:44am.

                Comment

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