newbie vBulletin question

Discussion in 'Co-op Advertising Network' started by Spyware Remover, Feb 28, 2005.

  1. Spyware Remover

    Spyware Remover Peon

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #21
    I cut-n-pasted your code.

    AJ
     
    Spyware Remover, Feb 28, 2005 IP
  2. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #22
    What is the URL to the page displaying the code?
     
    ResaleBroker, Feb 28, 2005 IP
  3. Spyware Remover

    Spyware Remover Peon

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
  4. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #24
    Your Page:
    <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo implode (', ', ); ?>

    My Code:
    <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo implode (', ', $ad_network); ?>
     
    ResaleBroker, Feb 28, 2005 IP
  5. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #25
    Here is how I've set up my files. This makes for easy updates.

    Off the root directory create a folder titled, "include".

    In that folder create a text file titled, "dpads". Then rename the file extension from ".txt" to ".inc"

    The contents of the .inc file should be:

    <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../'); include ('ad_network.php'); echo implode (', ', $ad_network); ?>
    Code (markup):
    Of course, upload the .inc file to your server.

    Then follow this path in vBulletin: admin control panel > styles and templates > style manager > all style options > phpinclude_start

    Add this line of code to phpinclude_start:

    require("../include/dpads.inc");
    Code (markup):
    Eample of phpinclude_start contents:

     
    // Example of how to include a seperate file: 
    ob_start();
    require("../include/dpads.inc");
    $footer = ob_get_contents();
    ob_end_clean();
    $headerstime = time();
    
    Code (markup):
     
    ResaleBroker, Feb 28, 2005 IP
  6. Spyware Remover

    Spyware Remover Peon

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #26
    Yes, but look at my source code, I have your code included exactly as you displayed it, yet it is not displaying the ads.

    AJ
     
    Spyware Remover, Feb 28, 2005 IP
  7. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #27
    I don't know what is causing the problem. Sorry. You might try using the "include" method from post #25. Good luck.
     
    ResaleBroker, Feb 28, 2005 IP
  8. Spyware Remover

    Spyware Remover Peon

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #28
    Thanks for trying. The include method did not work either.

    AJ
     
    Spyware Remover, Mar 1, 2005 IP
  9. calande

    calande Well-Known Member

    Messages:
    299
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #29
    <sight /> I read this thread and spent the whole morning trying to put the ads on a vbulletin forum. You forgot to tell him that there need to be a reference to the ads in the "footer" field: append something like
    <div id="partners">$footer</div>
    Code (markup):
    in the "Footer" section of the form. Then append
    ob_start();
    require("seo.inc.php");
    $footer = ob_get_contents();
    ob_end_clean();
    $headerstime = time();
    Code (markup):
    in the phpinclude_start. but change the "seo.inc.php" according to the name and path of your own include file.
     
    calande, Apr 7, 2005 IP