Thread: Ads on a page

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28
  1. #11
    Join Date
    Jan 2011
    Posts
    367
    Plugin Contributions
    0

    Default Re: Ads on a page

    a category

  2. #12
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Ads on a page

    Then you would probably want to add the snippet to /includes/templates/your_template/templates/tpl_index_categories.php near the bottom:
    Code:
    <?php
      $show_display_category->MoveNext();
    } // !EOF
    ?>
    <?php
            if ($current_category_id == 34)  {//replace 34 with your category id
                echo '<div class="advert">' . ADVERT_1 . '</div>'; 
            } 
    ?> 
    </div>

  3. #13
    Join Date
    Jan 2011
    Posts
    367
    Plugin Contributions
    0

    Default Re: Ads on a page

    thanks, i'll give it a try first thing tomorrow

  4. #14
    Join Date
    Jan 2011
    Posts
    367
    Plugin Contributions
    0

    Default Re: Ads on a page

    perhaps I did something wrong but when i edited the first file and added the second file my site disapeared completely. I put it back and the site came back. ???

  5. #15
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Ads on a page

    Yes, obviously you made some PHP error. We can't tell what it was without seeing exactly what you did, though. Can you copy & paste the area for a few lines around the edited file section?

  6. #16
    Join Date
    Jan 2011
    Posts
    367
    Plugin Contributions
    0

    Default Re: Ads on a page

    under /includes/languages/english/extra_definitions I added a file
    advert_defines.php and this is the copy

    <?php
    define('ADVERT_1','<table width="100%" border="1" bgcolor="#99d1d1" style="color: #000000">
    <tr>
    <td align="center"></td>
    </tr></table>
    <tr><td>
    DVR Recorders<br />Are you looking for the best and most reliable <a
    href="http://direct.tesco.com/q/N.2001329/Nr.99.aspx"
    target="_blank"><b>DVD recorders</a></b>? Here at Airtight Security Plus, you will find a wide array of selection for you. You get the freedom to choose from these great items. All the items featured in this page are made with the highest quality thus ensuring customer satisfaction. Make sure to read the complete details and specifications of the items so that you'll be able to choose the best one.

    Digital Video Recorders are the new age video recording system. With internet ready recorders, motion sensing recording, and lengthy recording times, you can view the output live anywhere in the world with the internet
    ');
    ?>

    and under includes/templates/template_default/templates (I also tried this under includes/templates/my_own_template/templates and includes/templates/bask_black/templates) I added the following

    <?php
    /**
    * display the New Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
    <?php } ?>
    <?php
    if ($current_category_id == 13) {//replace 34 with your category id
    echo '<div class="advert">' . ADVERT_1 . '</div>';
    } ?>
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_UPCOMING') { ?>
    <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
    <?php
    $show_display_category->MoveNext();
    } // !EOF
    ?>
    </div>

    using current_category_id == 13

    the file existed under template_default but I had to copy and paste the file to the other 2 locations when I tried it there cause it was not already under those (my_own_template and bask_black)

  7. #17
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Ads on a page

    I don't see any stray single quotes in your define (which would cause an error), but I do notice bad HTML: You open a table, then close it, then open <tr> and <td>, then give your content, and don't even close the table row or cell let alone the nonexistent table. That needs to be fixed, though it doesn't seem likely that it could wipe out your whole page.

    Have you tried putting just the define file in place? If that causes a problem, the source is narrowed down.


    Any file you edit should be copied from /template_default/ into the same /your_template/ folder structure, then edited. Never change the /template_default/ version.

  8. #18
    Join Date
    Jan 2011
    Posts
    367
    Plugin Contributions
    0

    Default Re: Ads on a page

    alright I did find a mistake I made... I added the file to

    includes/templates/my_own_template/templates

    and was supposed to add it to

    includes/templates/my_own_template

    I have fixed that and the page does not disappear now but I see no change or text, I will see if I can work on the html

  9. #19
    Join Date
    Jan 2011
    Posts
    367
    Plugin Contributions
    0

    Default Re: Ads on a page

    site keeps disappearing when I do any of this

  10. #20
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Ads on a page

    What file did you add to /includes/templates/my_own_template/ ?
    There are no files you would be working with that would go there; they would go in /my_own_template/templates/ or /my_own_template/common/ or another subfolder, assuming they belong under /includes/templates/ at all and not under /includes/modules/ or /includes/languages/, etc.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v139f Full page of banner ads
    By Jeff G in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Mar 2012, 06:50 AM
  2. adding google ads to my store page
    By haroldh in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 29 Dec 2010, 07:43 PM
  3. Ads? anyway to add html ads to pages?
    By loulou99 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Aug 2007, 10:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg