Announcement

Collapse
No announcement yet.

SSI include type thing with virtual() call in the header

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

  • SSI include type thing with virtual() call in the header

    I want to put banner ads in my vbulletin pages, I use CentralAD for the rest of my site and I do a simple SSI call on my .shtml pages:
    for example:
    <!--#include virtual="/cgi-bin/ssirand.cgi?REGION=LaMusica_Main" -->


    I read the PHP docs and the closest thing to that SSI in PHP is the virtual() call.

    However when I try to do that call inside the header section of the sytle (in the cell of the table I need it to appear in) It just dislpays the call in clear text, doesnt get parsed. here is what I'm using:

    virtual("/opt/apache/cgi-bin/ssirand.cgi?REGION=LaMusica_Main");


    When I put that code in the TO BE PARSED section of the template it works, but it appears on the top left hand side of the site, definatelly not where I need it to be. Is there a way to be able to include this code in the header section of the style so it shows up on all my vbulletin pages where I need it to show?

  • #2
    You can try stuff like this?

    PHP Code:
    chdir('/home/vhost/yoursite/includedir');
    include(
    './yourfile.stuff');
    chdir('/home/vhost/yoursite/forum'); 

    Comment


    • #3
      Originally posted by xiphoid
      You can try stuff like this?

      PHP Code:
      chdir('/home/vhost/yoursite/includedir');
      include(
      './yourfile.stuff');
      chdir('/home/vhost/yoursite/forum'); 

      the problem is that its not parsing ANYTHING inside the header space... it simple displays the PHP CODE as PLAIN TEXT. it parses the virtual() code just fine in the the TO BE PARSED section and it actually works... however its no use to me in the to be parsed section, I need that code to work in the header section where it doesnt break the whole design

      Comment


      • #4
        Originally posted by DennisVx
        the problem is that its not parsing ANYTHING inside the header space... it simple displays the PHP CODE as PLAIN TEXT. it parses the virtual() code just fine in the the TO BE PARSED section and it actually works... however its no use to me in the to be parsed section, I need that code to work in the header section where it doesnt break the whole design
        You put it in the admin control panel > style > php include textarea?

        Comment


        • #5
          Originally posted by xiphoid
          You put it in the admin control panel > style > php include textarea?
          YES. and it works if I put it there as I said on my original message.

          However this is outside all the defined tables and outside the whole site layout. right now the banner appears at the very top left of the page and it loos very ugly indeed...

          do you know how I could at least center the include? <center> </center> tags return an error message... whats the php equivalent?

          The real solution I need is to the be able to turn PHP parsing on in the header/footer section... some posts here mention that as an option but i dont see it under any of the general settings in this version (2.2.9)

          Comment


          • #6
            Originally posted by DennisVx
            YES. and it works if I put it there as I said on my original message.

            However this is outside all the defined tables and outside the whole site layout. right now the banner appears at the very top left of the page and it loos very ugly indeed...

            do you know how I could at least center the include? <center> </center> tags return an error message... whats the php equivalent?

            The real solution I need is to the be able to turn PHP parsing on in the header/footer section... some posts here mention that as an option but i dont see it under any of the general settings in this version (2.2.9)
            <center> is a html tag and nothing php

            if you put it in the php code tags, then use
            print "<center>";
            your code
            print "</center>";

            Comment


            • #7
              Originally posted by xiphoid
              <center> is a html tag and nothing php

              if you put it in the php code tags, then use
              print "<center>";
              your code
              print "</center>";
              So is there any way to have the header parse PHP code or no?

              Comment


              • #8
                Originally posted by DennisVx
                So is there any way to have the header parse PHP code or no?
                I believe for that you need to use eval()....
                "63,000 bugs in the code, 63,000 bugs, you get 1 whacked with a service pack, now there's 63,005 bugs in the code."
                "Before you critisize someone, walk a mile in their shoes. That way, when you critisize them, you're a mile away and you have their shoes."
                Utopia Software - Current Software: Utopia News Pro (news management system)

                Comment


                • #9
                  Originally posted by CeleronXT
                  I believe for that you need to use eval()....
                  I'll give that a TRy. Thanks

                  Comment

                  Loading...
                  Working...
                  X