Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • supermez11 Friend
    #880163

    Hi,
    I am trying to insert PHP CODE into a box in my landing page but when I insert de code my index page shows me in white.

    I use the same code in a "article" and the article shows me ok.

    What must I do to insert php code?

    Adicional information:
    Template: uber – [Medicare] Home
    Module: JoomlArt Advanced Custom Module (Features Intro : style-11)
    BOX: Feature Description
    CODE: the code that I want to show is

    <?php 
    $query = $db->getQuery(true); 
    $query->select($db->quoteName(array('FARMACIA', 'DIRECCION'>);
    $query->from($db->quoteName('guardias'>;
    // $query->where($db->quoteName('FECHA') . ' LIKE "'.  date('Y-m-d') . '"' );
    $query->where($db->quoteName('FECHA')." = ".$db->quote(date('Y-m-d'>);
    $db->setQuery($query);
    $row = $db->loadRowList();
    echo $row['0']['0'];
    echo $row['0']['1'];
    ?>
    Ninja Lead Moderator
    #880443

    Hi,

    Try to add that code above to templates/uber/acm/features-intro/tmpl/style-11.php file

    Regards

    supermez11 Friend
    #880520

    Hi Ninja Lead,
    This file (templates/uber/acm/features-intro/tmpl/style-11.php) show the code, but I try to add my PHP-CODE in one of the boxes (columms).

    You can show it in the URL: goo.gl/eJPtAY
    I try to add in the box where now you can read "FARMACIA DE GUARDIA Hoy es Miercoles 10 de Febrero del 2016"

    Can you help me?
    Thanks.

    Ninja Lead Moderator
    #881352

    Have you solved the problem on your site? I see that code is showing on your site.


    1. Screen-Shot-2016-02-11-at-20.12.05
    supermez11 Friend
    #881586

    Hi,
    I would like insert the PHP-CODE in the box. I attach an image (BOX_SCREAN.png) where I am trying the pgp-code.

    Now, I insert the code in a new module, but I need insert in the box.

    Can you help me?

    Thanks


    1. BOX_SCREAN
    Ninja Lead Moderator
    #883141

    Below solution should help you to add the code above into latest block

    templates/uber/acm/features-intro/tmpl/style-11.php file

    <?php if ($i==$count-1) {
        $query = $db->getQuery(true); 
        $query->select($db->quoteName(array('FARMACIA', 'DIRECCION'>);
        $query->from($db->quoteName('guardias'>;
        // $query->where($db->quoteName('FECHA') . ' LIKE "'.  date('Y-m-d') . '"' );
        $query->where($db->quoteName('FECHA')." = ".$db->quote(date('Y-m-d'>);
        $db->setQuery($query);
        $row = $db->loadRowList();
        echo $row['0']['0'];
        echo $row['0']['1'];
    }
    ?>

    1. Screen-Shot-2016-02-15-at-12.46.06
Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 5 replies, has 2 voices, and was last updated by  Ninja Lead 8 years, 2 months ago.

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