Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • ecohosting Friend
    #147156

    Hello,

    I’m wondering how one would go about adding banner ads between the sections in the JA Frontpage News II module. I would like to add a snippet of banner code between the sections. I have looked at the template files (ie: headline_fp.php) to see where I can add this but I haven’t been able to find the right spot.

    Can anyone help? Thanks.

    Saguaros Moderator
    #327769

    You create new a banner module or a custom module on the content-bot position. you have a banner between sections in JA Frontpage News II

    Good luck

    ecohosting Friend
    #327804

    That’s it? Sweet…I’ll go try it out and post back….

    ecohosting Friend
    #327813

    hi tienhc,

    I did what you suggested and it works, mostly. I can certainly and easily add a banner above and below the ja_news2 module but I want to add banners in between the sections within the JA News2 module. For example:

    (section header) Business News

    Banner

    (section header) Art & Culture

    Banner

    (section header) Sports

    Banner

    etc…

    Saguaros Moderator
    #327829

    Dear Guy!

    Here is the solution to resolve the issue:

    1) please open the file modulesmod_janews2tmplblog.php and find codes at line 91 => 94:

    </div>
    <?php
    endforeach;
    ?>

    and replace them by:

    [PHP]
    <?php
    $data = JModuleHelper::getModules( ‘ja-banner-‘.$sid );
    if( $data ) :
    ?>
    <div class=”ja-banner-inserting clearfix”>
    <?php
    foreach( $data as $mod ) :
    echo JModuleHelper::renderModule( $mod );
    endforeach;
    ?>
    </div>
    <?php endif; ?>
    </div>
    <?php
    endforeach;
    ?>
    [/PHP]

    – With my codes are using for load modules and insert them bellow each section block.
    The postion has the syntax: The position’s name = ‘ja-banner-‘ + section ID;
    – When you added my codes successfull, you access your administrator, and put modules into these positions.

    Good luck

    ecohosting Friend
    #327935

    Hi Tienhc,

    That worked great! Thanks.

    But! there is always a but, it works fine in IE and FF but in Chrome it is partially hiding the banner ad I placed in between the sections. The function that opens the section is not accounting for the full height of the banner it seems. Please see the attached image.

    Any ideas?


    1. banner_cut-off
    Saguaros Moderator
    #328126

    Please give me the link to your site 🙂

    sergiv Friend
    #328350

    solution does not work in Internet Explorer 8
    The image it goes to the right and can not see it almost
    What to do?


    1. ser
    jservices Friend
    #329081

    Sergiv:

    I just tested my install and notice the exact problem you have but only with IE7. In IE8 and IE6 the banner appears below the section articles. In FF I do not see this problem.

    tienhc:

    Any news? I’ve tried several things to fix the banner cut-off display issue but I cannot get it to work properly. I am running out of options here. I am sure it has to do with the way the javascript calculates the size of the vertical display. It is not correctly taking into account the full banner height.

    Does anyone have any other ideas?

    Saguaros Moderator
    #329363

    may be the problem will fixed as following way:
    find codes:
    [PHP]
    <?php
    for ($z = 0; $z < $cols; $z ++) :
    $cls = $cols==1?’full’:($z==0?’left’:($z==$cols-1?’right’:’center’));
    $k = $z;
    $pos = $z==0?’col-first’:($z == $cols-1?’col-last’:”);
    $col++;
    ?>
    <div class=”article_column <?php echo “column$col $pos”;?>”>
    <?php for ($y = 0; $y < ($cats / $cols) && $k<$cats; $y ++) :
    $cat = $section->categories[$k];
    $path = JModuleHelper::getLayoutPath($module->module, ‘blog_item’);
    if (file_exists($path)) {
    require($path);
    }
    $k += $cols;
    endfor; ?>
    </div>
    <?php endfor; ?>
    [/PHP]

    replace:
    [PHP]
    <div class=”ja-top-categories clearfix”>
    <?php
    for ($z = 0; $z < $cols; $z ++) :
    $cls = $cols==1?’full’:($z==0?’left’:($z==$cols-1?’right’:’center’));
    $k = $z;
    $pos = $z==0?’col-first’:($z == $cols-1?’col-last’:”);
    $col++;
    ?>
    <div class=”article_column <?php echo “column$col $pos”;?>”>
    <?php for ($y = 0; $y < ($cats / $cols) && $k<$cats; $y ++) :
    $cat = $section->categories[$k];
    $path = JModuleHelper::getLayoutPath($module->module, ‘blog_item’);
    if (file_exists($path)) {
    require($path);
    }
    $k += $cols;
    endfor; ?>
    </div>
    <?php endfor; ?>
    </div>
    [/PHP]

    jservices Friend
    #330022

    Hi tienhc,

    I just tested this out and I have the same results.

    stuarta60 Friend
    #361284

    Hi

    Can someone please link me to a download for JA Frontpage News II?

Viewing 12 posts - 1 through 12 (of 12 total)

This topic contains 12 replies, has 5 voices, and was last updated by  stuarta60 14 years ago.

We moved to new unified forum. Please post all new support queries in our New Forum