Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • laloma Friend
    #136962

    I have installed ja newsflash with JA Drimia module on my 1.5.8 site (joomfish 2.0). I have translated all the contentitems in the newsflash section. However if I switch languages, only the first item is translated, all other contentitems show only in the default language.

    Sherlock Friend
    #286048

    Dear laloma !

    JA News flash use ajax to load content after first content so it can’t get language variable from joomfish, it always works with default language , this is difficult problem to solve when use ajax and joomfish to load content. i still hav’en’t find a solution for it.

    migors Friend
    #293430

    i jave the same problem, jave you solved that?

    ljubo Friend
    #302007

    Is there finaly a solution yet?

    laloma Friend
    #302015

    Dear ljubo:

    No, there is no solution yet, nor attention from support to solve this issue. We pay for a one year subscription and since then, more than six month ago, we reported and are waiting for the solution.

    Recently, we ask at this forum and pm moderators and a lot of people at joomlart, not an reply.

    If this issue is not solved or attended in the next days, we really should consider a new subscription.

    Best regards,

    laloma Friend
    #303658

    As per email instruction to correct this issue from JoomlartSupport.

    <blockquote>I have fixed this problem for joomla version 1.5.x.

    – Please open ja-newsflashloader.php file in modulesmod_janewsflashja_newsflash folder. find following code section from line 58 to line 61:

    // SSL check – $http_host returns :
    JPluginHelper::importPlugin(‘system’, null, false);
    // trigger the onStart events
    $mainframe->triggerEvent( ‘onStart’ );

    – After that, replace them by following code section here:

    // trigger the onStart events
    JPluginHelper::importPlugin(‘system’);
    // trigger the onAfterInitialise events
    JDEBUG ? $_PROFILER->mark(‘afterInitialise’) : null;
    $mainframe->triggerEvent(‘onAfterInitialise’);</blockquote>

    ljubo Friend
    #303664

    Thank you for sharing this.

    However, it is not working for me.

    Is it working for you?
    If yes, could you share your working ja-newsflashloader.php file?
    You could post it here or on private…

    thanks a million!

    laloma Friend
    #303674

    Dear jlubo:

    Yes, is working on our website.

    Here is the http://www.yoursite.com/modules/mod_janewsflash/ja_newsflash/ja-newsflashloader.php

    ————————————————————

    <?php
    /**
    * @version $Id: index2.php 6022 2006-12-18 22:30:07Z friesengeist $
    * @package Joomla
    * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
    * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
    * Joomla! is free software. This version may have been modified pursuant
    * to the GNU General Public License, and as distributed it includes or
    * is derivative of works licensed under the GNU General Public License or
    * other free or open source software licenses.
    * See COPYRIGHT.php for copyright notices and details.
    */
    define (‘_JA_NEWSFLASH_CACHE_ENABLE’, 0);

    function setToCache ($order, $html) {
    if (!_JA_NEWSFLASH_CACHE_ENABLE) return ”;
    $filename = JPATH_CACHE.’/cache_’.md5(“ja-newsflashloader-$order”);
    $f = fopen($filename, ‘w’);
    if($f) {
    fwrite ($f, $html);
    fclose ($f);
    }
    return;
    }

    function getFromCache ($order) {
    if (!_JA_NEWSFLASH_CACHE_ENABLE) return ”;
    $filename = JPATH_CACHE.’/cache_’.md5(“ja-newsflashloader-$order”);
    if (is_file($filename))
    return file_get_contents ($filename);
    return ”;
    }

    if (!defined (‘_JEXEC’)) {
    header(‘Content-Type: text/html; charset=utf-8’);

    define( ‘_JEXEC’, 1 );
    $path = dirname(dirname(dirname(dirname(__FILE__))));
    define(‘JPATH_BASE’, $path );

    if (strpos(php_sapi_name(), ‘cgi’) !== false && !empty($_SERVER[‘REQUEST_URI’])) {
    //Apache CGI
    $_SERVER[‘PHP_SELF’] = rtrim(dirname(dirname(dirname($_SERVER[‘PHP_SELF’]))), ‘/\’);
    } else {
    //Others
    $_SERVER[‘SCRIPT_NAME’] = rtrim(dirname(dirname(dirname($_SERVER[‘SCRIPT_NAME’]))), ‘/\’);
    }

    define( ‘DS’, DIRECTORY_SEPARATOR );
    require_once ( JPATH_BASE .DS.’includes’.DS.’defines.php’ );
    require_once ( JPATH_BASE .DS.’includes’.DS.’framework.php’ );
    JDEBUG ? $_PROFILER->mark( ‘afterLoad’ ) : null;

    $mainframe =& JFactory::getApplication(‘site’);

    // set the language
    $mainframe->initialise();
    // SSL check – $http_host returns <live site url>:<port number if it is 443>

    // trigger the onStart events
    JPluginHelper::importPlugin(‘system’);
    // trigger the onAfterInitialise events
    JDEBUG ? $_PROFILER->mark(‘afterInitialise’) : null;
    $mainframe->triggerEvent(‘onAfterInitialise’);

    $numrows = isset($_REQUEST[‘total’])?intval($_REQUEST[‘total’]):0;
    $curnews = isset($_REQUEST[‘curnews’])?intval($_REQUEST[‘curnews’]):0;
    $flashnum = $curnews;
    $html = getFromCache($flashnum);
    if ($html) {
    echo $html;
    return;
    }

    $splitter = md5(“JA Flashnews”);
    // SSL check – $http_host returns <live site url>:<port number if it is 443>

    // retrieve some expected url (or form) arguments
    $modid = intval( JArrayHelper::getValue( $_REQUEST, ‘modid’ , 0) ) ;
    $news = intval( JArrayHelper::getValue( $_REQUEST, ‘news’ , 0) ) ;
    $total = intval( JArrayHelper::getValue( $_REQUEST, ‘total’, 0 ) );
    $option = strval( strtolower( JArrayHelper::getValue( $_REQUEST, ‘option’ ) ) );

    $database = &JFactory::getDBO( );
    $my = &JFactory::getUser();
    $gid = intval( $my->gid );

    $query = “SELECT params FROM #__modules WHERE id=$modid;”;
    $database->setQuery($query);
    $params = $database->loadResult();
    $params = new JParameter ($params);

    function textprocess($string) {
    return $string;
    }

    } else {
    global $mainframe;
    $database = &JFactory::getDBO( );
    $my = &JFactory::getUser();
    //$query = “SELECT params FROM #__modules WHERE module = ‘mod_janewsflash’;”;
    //$database->setQuery($query);
    //$params = $database->loadResult();
    //$params = new JParameter ($params);
    $splitter = “”;

    function textprocess($string) {
    return $string;
    }
    }

    if (!defined( ‘_JA_NEWSFLASH’ )) {
    /** ensure that functions are declared only once */
    define( ‘_JA_NEWSFLASH’, 1 );

    function ja_output_newsflash( &$row, &$params, &$access ) {
    global $mainframe;

    $row->text = $row->introtext;
    $row->groups = ”;
    $row->readmore = (trim( $row->fulltext ) != ”) && ($params->get( ‘readmore’ ));
    $row->metadesc = ”;
    $row->metakey = ”;
    $row->access = ”;
    $row->created = ”;
    $row->modified = ”;

    $params->set(‘image’, 1);

    /*
    JPluginHelper::importPlugin(‘content’, null, false);
    $results = $mainframe->triggerEvent( ‘onPrepareContent’, array( &$row, &$params, null ), true );
    */

    $html = “”;
    ja_linkInfo ($row, $params);

    $newTitle = “”;
    if ($params->get(‘link_titles’)) $newTitle .= “<a href=””.$row->link_on.”” title=””.$row->title.””>”.$row->title.”</a>”;
    else $newTitle .= “”.$row->title.””;

    //Get image
    $regex = “/<img.*/>/”;

    preg_match ($regex, $row->text, $matches);
    $row->text = preg_replace ($regex, ”, $row->text);

    $newReadmore = “<a href=””.$row->link_on.”” title=””.$row->link_text.””>”.$row->link_text.”</a>”;
    $html = str_replace(“##TITLE##”,$newTitle,$params->get(“templates”));
    $html = str_replace(“##CONTENT##”,$row->text,$html);
    $img = count($matches) ? $matches[0] : “”;
    $html = str_replace(“##IMAGE##”, $img, $html);
    $html = str_replace(“##READMORE##”,$newReadmore,$html);
    return $html;
    }

    function ja_linkInfo( &$row, &$params ) {
    require_once (JPATH_SITE . ‘/components/com_content/helpers/route.php’);

    $my = &JFactory::getUser();

    $row->link_on = ”;
    $row->link_text = ”;

    if ($params->get( ‘readmore’ ) || $params->get( ‘link_titles’ )) {
    if ( $params->get( ‘intro_only’ ) ) {
    // checks if the item is a public or registered/special item
    if ( $row->access <= $my->get(‘aid’, 0)) {

    $row->link_on = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid));
    if ( isset($row->readmore) && @$row->readmore) {
    // text for the readmore link
    $row->link_text = _READ_MORE;
    }
    } else {
    $row->link_on = JRoute::_( ‘index.php?option=com_user&task=register’ );

    if ( isset($row->readmore) && @$row->readmore ) {
    // text for the readmore link if accessible only if registered
    $row->link_text = _READ_MORE_REGISTER;
    }
    }
    }
    }
    }
    }

    // Disable edit ability icon
    $access = new stdClass();
    $access->canEdit = 0;
    $access->canEditOwn = 0;
    $access->canPublish = 1;

    $now = date( ‘Y-m-d H:i’ );
    $noauth = !$mainframe->getCfg( ‘shownoauth’ );
    $nullDate = $database->getNullDate();
    $aid = $my->get(‘aid’, 0);
    $catid = intval( $params->get( ‘catid’ ) );
    $delaytime = intval( $params->get( ‘delaytime’, 0 ) );
    $moduleclass_sfx = $params->get( ‘moduleclass_sfx’ );
    $link_titles = $params->get( ‘link_titles’ );

    $params->set( ‘intro_only’, 1 );
    $params->set( ‘hide_author’, 1 );
    $params->set( ‘hide_createdate’, 0 );
    $params->set( ‘hide_modifydate’, 1 );
    $params->set( ‘link_titles’, $link_titles );

    $query = ‘SELECT a.*,cc.description as catdesc, cc.title as cattitle,s.description as secdesc, s.title as sectitle,’ .
    ‘ CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(“:”, a.id, a.alias) ELSE a.id END as slug,’.
    ‘ CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(“:”,cc.id,cc.alias) ELSE cc.id END as catslug,’.
    ‘ CASE WHEN CHAR_LENGTH(s.alias) THEN CONCAT_WS(“:”, s.id, s.alias) ELSE s.id END as secslug’.
    ‘ FROM #__content AS a’ .
    ‘ INNER JOIN #__categories AS cc ON cc.id = a.catid’ .
    ‘ INNER JOIN #__sections AS s ON s.id = a.sectionid’;
    $query .= ‘ WHERE a.state = 1 ‘ .

    ( $noauth ? “n AND a.access <= ” . (int) $aid . ” AND cc.access <= ” . (int) $aid . ” AND s.access <= ” . (int) $aid : ” ).
    ‘ AND (a.publish_up = ‘.$database->Quote($nullDate).’ OR a.publish_up <= ‘.$database->Quote($now).’ ) ‘ .
    ‘ AND (a.publish_down = ‘.$database->Quote($nullDate).’ OR a.publish_down >= ‘.$database->Quote($now).’ )’ .

    ‘ AND a.catid =’ . (int) $catid.
    ‘ AND cc.section = s.id’ .
    ‘ AND cc.published = 1’ .
    ‘ AND s.published = 1’.
    ‘ ORDER BY a.ordering’;

    $database->setQuery( $query );
    $rows = $database->loadObjectList();

    $numrows = count( $rows );

    // check if any results returned
    if ( $numrows ) {
    if (!JArrayHelper::getValue($_GET,’loadajax’,0)) {
    $flashnum = 0;
    srand ((double) microtime() * 1000000);
    $flashnum = rand( 0, $numrows-1 );
    }
    $row = $rows[$flashnum];
    } else {
    echo “Please select a category for JA Newsflash!”;
    return;
    }

    $row->introtext = textprocess($row->introtext);
    $row->fulltext = textprocess($row->fulltext);
    $xheight = $params->get(‘xheight’);

    if (!JArrayHelper::getValue($_GET,’loadajax’,0)) {

    ?>
    <script type=”text/javascript”>
    if (!self.jaNewsflash) {
    jaNewsflash = new Object();
    }
    jaNewsflash.animation = ‘<?php echo $params->get(‘animation’); ?>’;
    jaNewsflash.livesite = ‘<?php echo JURI::base(); ?>’;
    jaNewsflash.delaytime = <?php echo $delaytime; ?>;
    jaNewsflash.splitter = “97c8730aa693f60439cf3cf4558ce5ea”;
    jaNewsflash.interval= <?php echo $params->get(‘animationtime’); ?>;
    jaNewsflash.currentItem = <?php echo $flashnum;?>;
    jaNewsflash.totalItem = <?php echo $numrows;?>;
    jaNewsflash.modid = <?php echo $module->id;?>;
    </script>
    <div style=”position:relative; width:100%;height:<?php echo $xheight; ?>px; overflow:hidden;”>
    <div id=”ja-scroll_1″ style=”position:absolute; top:0; left:0; width: 100%; display:block;”>
    <?php
    $html = ja_output_newsflash( $row, $params, $access );
    setToCache ($flashnum, $html.$splitter.$flashnum);
    echo $html;
    ?>
    </div>
    <div id=”ja-scroll_2″ style=”position: absolute; top:0; left:0; width: 100%; display:none;”>
    </div>
    </div>
    <?php
    }
    else{
    $html = ja_output_newsflash( $row, $params, $access );
    $html .= $splitter.$flashnum;

    setToCache ($flashnum, $html);
    echo $html;
    return;
    }
    ?>

    ————————————————————

    Best regards,

    ljubo Friend
    #303680

    Hmmm… still not working with me.
    After complete change of the file (deleting the old and putting in the one you forwarded), now on the website, after first news showed correctly, there goes the message saying:
    Please select a category for JA Newsflash!

    I am using 1.5.9 Joomla and 1.2 ja-mageia…

    laloma Friend
    #303685

    Dear ljubo:

    This is another issue, we already had and fix it. Search the forum, answer to <blockquote>Please select a category for JA Newsflash!</blockquote> is well documented.

    I do not remember which post is refering to this.

    Best regards,

    ljubo Friend
    #303703

    Hi laloma,

    thank you for your effort, but I don`t think there is solution yet for my problem…

    I got back to my original file (which was a way different than your version – mine was from 1.4 mageia template), changed those recommended few lines, but no changes… the same first article got translated but then starts to show articles in other language.

    here is mine php file:

    ….
    define (‘_JA_NEWSFLASH_CACHE_ENABLE’, 0);

    function setToCache ($order, $html) {
    if (!_JA_NEWSFLASH_CACHE_ENABLE) return ”;
    $filename = JPATH_CACHE.’/cache_’.md5(“ja-newsflashloader-$order”);
    $f = fopen($filename, ‘w’);
    if($f) {
    fwrite ($f, $html);
    fclose ($f);
    }
    return;
    }

    function getFromCache ($order) {
    if (!_JA_NEWSFLASH_CACHE_ENABLE) return ”;
    $filename = JPATH_CACHE.’/cache_’.md5(“ja-newsflashloader-$order”);
    if (is_file($filename))
    return file_get_contents ($filename);
    return ”;
    }

    if (!defined (‘_JEXEC’)) {
    define( ‘_JEXEC’, 1 );

    $path = dirname(__FILE__);
    $path = str_replace (‘\’, ‘/’, $path);
    if ($pos = strpos ($path, ‘/modules/’)) {
    $path = substr($path, 0, $pos);
    }
    if (strpos(php_sapi_name(), ‘cgi’) !== false && !empty($_SERVER[‘REQUEST_URI’])) {
    //Apache CGI
    $_SERVER[‘PHP_SELF’] = rtrim(dirname(dirname(dirname($_SERVER[‘PHP_SELF’]))), ‘/\’);
    } else {
    //Others
    $_SERVER[‘SCRIPT_NAME’] = rtrim(dirname(dirname(dirname($_SERVER[‘SCRIPT_NAME’]))), ‘/\’);
    }
    define(‘JPATH_BASE’, $path );

    define( ‘DS’, DIRECTORY_SEPARATOR );

    require_once ( JPATH_BASE .DS.’includes’.DS.’defines.php’ );
    require_once ( JPATH_BASE .DS.’includes’.DS.’framework.php’ );

    JDEBUG ? $_PROFILER->mark( ‘afterLoad’ ) : null;

    /**
    * CREATE THE APPLICATION
    *
    * NOTE :
    */
    $mainframe =& JFactory::getApplication(‘site’);

    /**
    * INITIALISE THE APPLICATION
    *
    * NOTE :
    */
    // set the language
    $mainframe->initialise();
    $numrows = isset($_REQUEST[‘total’])?intval($_REQUEST[‘total’]):0;
    $curnews = isset($_REQUEST[‘curnews’])?intval($_REQUEST[‘curnews’]):0;
    $flashnum = $curnews;
    $html = getFromCache($flashnum);
    if ($html) {
    echo $html;
    return;
    }

    $splitter = md5(“JA Flashnews”);
    // trigger the onStart events
    JPluginHelper::importPlugin(‘system’);
    // trigger the onAfterInitialise events
    JDEBUG ? $_PROFILER->mark(‘afterInitialise’) : null;
    $mainframe->triggerEvent(‘onAfterInitialise’);

    // retrieve some expected url (or form) arguments
    $news = intval( JArrayHelper::getValue( $_REQUEST, ‘news’ , 0) ) ;
    $total = intval( JArrayHelper::getValue( $_REQUEST, ‘total’, 0 ) );
    $option = strval( strtolower( JArrayHelper::getValue( $_REQUEST, ‘option’ ) ) );

    $charset = array(
    “CHARSET=ISO-8859-1” => “ISO8859-1”,
    “CHARSET=ISO8859-1” => “ISO8859-1”,
    “CHARSET=ISO-8859-15” => “ISO8859-15”,
    “CHARSET=ISO8859-15” => “ISO8859-15”,
    “CHARSET=UTF-8” => “UTF-8”,
    “CHARSET=CP866” => “ibm866”,
    “CHARSET=866” => “ibm866”,
    “CHARSET=IBM866” => “ibm866”,
    “CHARSET=CP1251” => “Windows-1251”,
    “CHARSET=WINDOWS-1251” => “Windows-1251”,
    “CHARSET=WIN-1251” => “Windows-1251”,
    “CHARSET=1251” => “Windows-1251”,
    “CHARSET=CP1252” => “Windows-1252”,
    “CHARSET=WINDOWS-1252” => “Windows-1252”,
    “CHARSET=1252” => “Windows-1252”,
    “CHARSET=KOI8-R” => “koi8-ru”,
    “CHARSET=KOI8-RU” => “koi8-ru”,
    “CHARSET=KOI8R” => “koi8-ru”,
    “CHARSET=BIG5” => “950”,
    “CHARSET=950” => “950”,
    “CHARSET=GB2312” => “936”,
    “CHARSET=936” => “936”,
    “CHARSET=BIG5-HKSCS” => “BIG5-HKSCS”,
    “CHARSET=SHIFT_JIS” => “SJIS”,
    “CHARSET=SJIS” => “SJIS”,
    “CHARSET=932” => “SJIS”,
    “CHARSET=EUC-JP” => “EUCJP”,
    “CHARSET=EUCJP” => “EUCJP”
    );

    $current_charset = “UTF-8”;
    $database = &JFactory::getDBO( );
    $my = &JFactory::getUser();
    $gid = intval( $my->gid );

    $query = “SELECT params FROM #__modules WHERE module = ‘mod_janewsflash’;”;
    $database->setQuery($query);
    $params = $database->loadResult();
    $params = new JParameter ($params);

    function textprocess($string) {
    return $string;
    }

    } else {
    global $mainframe;
    $database = &JFactory::getDBO( );
    $my = &JFactory::getUser();
    $query = “SELECT params FROM #__modules WHERE module = ‘mod_janewsflash’;”;
    $database->setQuery($query);
    $params = $database->loadResult();
    $params = new JParameter ($params);
    $splitter = “”;

    function textprocess($string) {
    return $string;
    }
    }

    if (!defined( ‘_JA_NEWSFLASH’ )) {
    /** ensure that functions are declared only once */
    define( ‘_JA_NEWSFLASH’, 1 );

    function ja_output_newsflash( &$row, &$params, &$access ) {
    global $mainframe;

    $row->text = $row->introtext;
    $row->groups = ”;
    $row->readmore = (trim( $row->fulltext ) != ”) && ($params->get( ‘readmore’ ));
    $row->metadesc = ”;
    $row->metakey = ”;
    $row->access = ”;
    $row->created = ”;
    $row->modified = ”;

    $params->set(‘image’, 1);

    JPluginHelper::importPlugin(‘content’, null, false);
    $results = $mainframe->triggerEvent( ‘onPrepareContent’, array( &$row, &$params, null ), true );

    $html = “”;
    ja_linkInfo ($row, $params);

    $newTitle = “”;
    if ($params->get(‘link_titles’)) $newTitle .= “<a href=””.$row->link_on.”” title=””.$row->title.””>”.$row->title.”</a>”;
    else $newTitle .= “”.$row->title.””;

    //Get image
    $regex = “/<img.*/>/”;

    preg_match ($regex, $row->text, $matches);
    $row->text = preg_replace ($regex, ”, $row->text);

    $newReadmore = “<a href=””.$row->link_on.”” title=””.$row->link_text.””>”.$row->link_text.”</a>”;
    $html = str_replace(“##TITLE##”,$newTitle,$params->get(“templates”));
    $html = str_replace(“##CONTENT##”,$row->text,$html);
    $img = count($matches) ? $matches[0] : “”;
    $html = str_replace(“##IMAGE##”, $img, $html);
    $html = str_replace(“##READMORE##”,$newReadmore,$html);
    return $html;
    }

    function ja_linkInfo( &$row, &$params ) {
    $my = &JFactory::getUser();
    require_once (JPATH_SITE . ‘/components/com_content/helpers/route.php’);
    $row->link_on = ”;
    $row->link_text = ”;
    $aid= $my->get(‘aid’, 0);
    if ($params->get( ‘readmore’ ) || $params->get( ‘link_titles’ )) {
    if ( $params->get( ‘intro_only’ ) ) {
    // checks if the item is a public or registered/special item
    if ( $row->access <= $aid ) {
    $row->link_on = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid));

    if ( isset($row->readmore) && @$row->readmore) {
    // text for the readmore link
    $row->link_text = _READ_MORE;
    }
    } else {
    $row->link_on = JRoute::_( ‘index.php?option=com_user&task=register’ );

    if ( isset($row->readmore) && @$row->readmore ) {
    // text for the readmore link if accessible only if registered
    $row->link_text = _READ_MORE_REGISTER;
    }
    }
    }
    }
    }
    }

    // Disable edit ability icon
    $access = new stdClass();
    $access->canEdit = 0;
    $access->canEditOwn = 0;
    $access->canPublish = 0;

    $now = date( ‘Y-m-d H:i’ );
    $noauth = !$mainframe->getCfg( ‘shownoauth’ );
    $nullDate = $database->getNullDate();
    $aid= $my->get(‘aid’, 0);
    $catid = intval( $params->get( ‘catid’ ) );
    $delaytime = intval( $params->get( ‘delaytime’, 0 ) );
    $moduleclass_sfx = $params->get( ‘moduleclass_sfx’ );
    $link_titles = $params->get( ‘link_titles’ );

    $params->set( ‘intro_only’, 1 );
    $params->set( ‘hide_author’, 1 );
    $params->set( ‘hide_createdate’, 0 );
    $params->set( ‘hide_modifydate’, 1 );
    $params->set( ‘link_titles’, $link_titles );

    // query to determine article count
    $query = ‘SELECT a.*,cc.description as catdesc, cc.title as cattitle,s.description as secdesc, s.title as sectitle,’ .
    ‘ CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(“:”, a.id, a.alias) ELSE a.id END as slug,’.
    ‘ CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(“:”,cc.id,cc.alias) ELSE cc.id END as catslug,’.
    ‘ CASE WHEN CHAR_LENGTH(s.alias) THEN CONCAT_WS(“:”, s.id, s.alias) ELSE s.id END as secslug’.
    ‘ FROM #__content AS a’ .
    ‘ INNER JOIN #__categories AS cc ON cc.id = a.catid’ .
    ‘ INNER JOIN #__sections AS s ON s.id = a.sectionid’;
    $query .= ‘ WHERE a.state = 1 ‘ .

    ( $noauth ? “n AND a.access <= ” . (int) $aid . ” AND cc.access <= ” . (int) $aid . ” AND s.access <= ” . (int) $aid : ” ).
    ‘ AND (a.publish_up = ‘.$database->Quote($nullDate).’ OR a.publish_up <= ‘.$database->Quote($now).’ ) ‘ .
    ‘ AND (a.publish_down = ‘.$database->Quote($nullDate).’ OR a.publish_down >= ‘.$database->Quote($now).’ )’ .

    ‘ AND a.catid =’ . (int) $catid.
    ‘ AND cc.section = s.id’ .
    ‘ AND cc.published = 1’ .
    ‘ AND s.published = 1’.
    ‘ ORDER BY a.ordering’;

    $database->setQuery( $query );
    $rows = $database->loadObjectList();

    $numrows = count( $rows );

    // check if any results returned
    if ( $numrows ) {
    if (!JArrayHelper::getValue($_GET,’loadajax’,0)) {
    $flashnum = 0;
    srand ((double) microtime() * 1000000);
    $flashnum = rand( 0, $numrows-1 );
    }
    $row = $rows[$flashnum];
    } else {
    echo “You haven’t selected any category or there’s no items on the selected category.”;
    return;
    }

    $row->introtext = textprocess($row->introtext);
    $row->fulltext = textprocess($row->fulltext);
    $xheight = $params->get(‘xheight’);

    if (!JArrayHelper::getValue($_GET,’loadajax’,0)) {

    ?>
    <script type=”text/javascript”>
    if (!self.jaNewsflash) {
    jaNewsflash = new Object();
    }
    jaNewsflash.animation = ‘<?php echo $params->get(‘animation’); ?>’;
    jaNewsflash.livesite = ‘<?php echo JURI::base(); ?>’;
    jaNewsflash.delaytime = <?php echo $delaytime; ?>;
    jaNewsflash.splitter = “97c8730aa693f60439cf3cf4558ce5ea”;
    jaNewsflash.interval= <?php echo $params->get(‘animationtime’); ?>;
    jaNewsflash.currentItem = <?php echo $flashnum;?>;
    jaNewsflash.totalItem = <?php echo $numrows;?>;
    </script>
    <div style=”position:relative; width:100%;height:<?php echo $xheight; ?>px; overflow:hidden;”>
    <div id=”ja-scroll_1″ style=”position:absolute; top:0; left:0; width: 100%; display:block;”>
    <?php
    $html = ja_output_newsflash( $row, $params, $access );
    setToCache ($flashnum, $html.$splitter.$flashnum);
    echo $html;
    ?>
    </div>
    <div id=”ja-scroll_2″ style=”position: absolute; top:0; left:0; width: 100%; display:none;”>
    </div>
    </div>
    <?php
    }
    else{
    $html = ja_output_newsflash( $row, $params, $access );
    $html .= $splitter.$flashnum;

    setToCache ($flashnum, $html);
    echo $html;
    return;
    }
    ?>

    laloma Friend
    #303708

    Dear jlubo:

    We will suggest you to open a support ticket as we did. The link is http://support.joomlart.com/index.php?_m=tickets&_a=submit, they reply came before 24 h.

    Best regards,

    Anonymous Moderator
    #307023

    <em>@laloma 127390 wrote:</em><blockquote>As per email instruction to correct this issue from JoomlartSupport.</blockquote>

    Hi, this code only supports for joomlart 1.5.9 or newer

    amejat Friend
    #311819

    This is a recurrent problem with NewsFlash and Joomla 1.5 that the JA team has been UNABLE to fix.

    Come on guies ! Fix it now !

    Saguaros Moderator
    #311905

    I have fixed this problem for joomla version 1.5.x.
    <blockquote>
    – Please open ja-newsflashloader.php file in modulesmod_janewsflashja_newsflash folder. find following code section from line 58 to line 61:

    // SSL check – $http_host returns :
    JPluginHelper::importPlugin(‘system’, null, false);
    // trigger the onStart events
    $mainframe->triggerEvent( ‘onStart’ );

    – After that, replace them by following code section here:

    // trigger the onStart events
    JPluginHelper::importPlugin(‘system’);
    // trigger the onAfterInitialise events
    JDEBUG ? $_PROFILER->mark(‘afterInitialise’) : null;
    $mainframe->triggerEvent(‘onAfterInitialise’); </blockquote>

    That is the best solution for Joomla 1.5.x and Joomfish, I try to check very carefully, it work perfect, if it do not run in your site, please give me your package, i will find and get the solution for you and everybody.

Viewing 15 posts - 1 through 15 (of 26 total)

This topic contains 26 replies, has 8 voices, and was last updated by  sunrise 15 years, 3 months ago.

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