Announcement

Collapse
No announcement yet.

put an "include" call in template file ?

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

  • #16
    Ok, I did that and it works. Well, not quite, it shows the code of the script. this: Page is how it is supposed to look, but if you check the bottom of www.graphic-forums.com, you can see how it is messed up. Anyways, what do you think the problem is now?
    Ken Prescott - 21Studios freelancing design
    Graphic-Forums - The Forums for the Graphic User

    Comment


    • #17
      Grandmaster,

      Please enter your vB license info into your user profile. See my sig for details. Thanks.
      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
      Change CKEditor Colors to Match Style (for 4.1.4 and above)

      Steve Machol Photography


      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


      Comment


      • #18
        I entered the required info.
        Ken Prescott - 21Studios freelancing design
        Graphic-Forums - The Forums for the Graphic User

        Comment


        • #19
          Thanks!
          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
          Change CKEditor Colors to Match Style (for 4.1.4 and above)

          Steve Machol Photography


          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


          Comment


          • #20
            Are you going to be able to help me with this problem now?
            Ken Prescott - 21Studios freelancing design
            Graphic-Forums - The Forums for the Graphic User

            Comment


            • #21
              That's very strange. Try using the relative path ("bannertest.php").
              Chen Avinadav
              Better to remain silent and be thought a fool than to speak out and remove all doubt.

              גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

              Comment


              • #22
                Tried that, and it doesnt show anything, its like the code wasnt added.. so I took the file banners_eng.inc and renamed it to .php and tried having it call the new file banners_eng.php and it had errors.. So I am stuck.. I can post the code to the script if that might help, theres not much to it..
                Ken Prescott - 21Studios freelancing design
                Graphic-Forums - The Forums for the Graphic User

                Comment


                • #23
                  Please post the source of that file.
                  I think you're trying to echo or print directly from it...
                  Chen Avinadav
                  Better to remain silent and be thought a fool than to speak out and remove all doubt.

                  גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

                  Comment


                  • #24
                    Code:
                    <?
                    
                    srand((double)microtime()*1000000); 
                    $banners="banners.dat";
                    $banners=file($banners);
                    $select=rand(0, count($banners)-1);
                    $banner=explode("|", $banners[$select]);
                    echo "<a href=\"$banner[1]\" target=_new><img src=\"$banner[0]\" border=0 width=88 height=31></a>";
                    
                    ?>
                    The banners.dat is just a txt file that has the banner information in it. Here is an example of banner.dat is made up:
                    Code:
                    /linkimages/bannerimage.gif|http://www.asiteorfriend.net
                    Ken Prescott - 21Studios freelancing design
                    Graphic-Forums - The Forums for the Graphic User

                    Comment


                    • #25
                      Use this as your file:
                      PHP Code:
                      <?php

                      srand
                      ((double)microtime()*1000000); 
                      $banners="banners.dat";
                      $banners=file($banners);
                      $select=rand(0count($banners)-1);
                      $banner=explode("|"$banners[$select]);

                      ?>
                      and now in your footer template add this code where you want the button:
                      Code:
                      <a href="$banner[1]" target="_new"><img src="$banner[0]" border="0" width="88" height="31"></a>
                      That has to work!

                      By the way I added some " hope you don't mind.
                      Last edited by Chen; Wed 12 Sep '01, 9:54am.
                      Chen Avinadav
                      Better to remain silent and be thought a fool than to speak out and remove all doubt.

                      גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

                      Comment


                      • #26
                        Comes up as a broken image. Check the bottom of the page. www.graphic-forums.com
                        Ken Prescott - 21Studios freelancing design
                        Graphic-Forums - The Forums for the Graphic User

                        Comment


                        • #27
                          PHP Code:
                          <?php

                          srand
                          ((double)microtime()*1000000); 
                          $banners="banners.dat";
                          $banners=file($banners);
                          $select=rand(0count($banners)-1);
                          $banner=explode("|"$banners[$select]);

                          $fullbutton "<a href=\"$banner[1]\" target=\"_new\"><img src=\"$banner[0]\" border=\"0\" width=\"88\" height=\"31\"></a>"

                          ?>
                          Now use $fullbutton in your footer template.

                          P.S.
                          Your forum looks awesome! Did you design it?
                          Chen Avinadav
                          Better to remain silent and be thought a fool than to speak out and remove all doubt.

                          גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

                          Comment


                          • #28
                            I used the $fullbutton and it doesn't show anything. I even changed the $fullbutton in the phpinclude file, and still no go.

                            There must be something, could I use SSI and include the file like that inside of a php file?

                            No, I didn't design it, my partner did, Justin Stayton. I was thinking about running for board of the month. You want to nominate me, because I belive i read the owner of the board cannot nominate is own, or if he does nomiate it, a second user has to second the nomination.
                            Ken Prescott - 21Studios freelancing design
                            Graphic-Forums - The Forums for the Graphic User

                            Comment


                            • #29
                              "Comes up as a broken image"

                              Did you check the source code of the generated HTML? Post here what it generated.

                              Comment


                              • #30
                                <a href="" target="_new"><img src="" border="0" width="88" height="31"></a>

                                No urls or imgs sources

                                Its from Firefly's post, in which at the bottom he states that it has to work.. Thats the only way i can identify it,.
                                Last edited by Grandmaster; Wed 12 Sep '01, 1:04pm.
                                Ken Prescott - 21Studios freelancing design
                                Graphic-Forums - The Forums for the Graphic User

                                Comment

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