-
AuthorPosts
-
limeweb Friend
limeweb
- Join date:
- October 2006
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 5
- Thanked:
- 3 times in 1 posts
August 13, 2009 at 10:10 pm #143444Dear JA Developer Team
The contentslider on the JA MONA demo front page does not work.
Would much appreciate it if you could fix it please.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
August 14, 2009 at 3:00 am #314187Hello limeweb!
The JA Content Silder is working perfect with the mona .
May be it’s your configuration:
1. You make sure: category must has articles, and has total greater than total articles display.
2. You must to set “Auto run slide” param is “Yes”Good luck
limeweb Friendlimeweb
- Join date:
- October 2006
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 5
- Thanked:
- 3 times in 1 posts
August 14, 2009 at 9:52 am #314221<em>@tienhc 140608 wrote:</em><blockquote>Hello limeweb!
The JA Content Silder is working perfect with the mona .
Good luck</blockquote>
Its not working in the demo because (as you say) the article section in the demo sql only contains 3 items ;). Strange don’t you think that JA would choose not to show the full capabilities of this extension in their demo :confused:
There is still a problem however with the slider in IE8 – the images when clicked do not link properly. I think Scotty is right and there is a bug (needs clearfix to handle image float).
I’m not too hot on css so if you help solve that one that would be great.
limeweb Friendlimeweb
- Join date:
- October 2006
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 5
- Thanked:
- 3 times in 1 posts
August 14, 2009 at 11:00 am #314237<em>@tienhc 140608 wrote:</em><blockquote>
The JA Content Silder is working perfect with the mona .
</blockquote>I’m afraid thats not quite true.
1. Image links in content slider in IE8 do not work;
2. Setting ‘button driven’ to ‘show’ causes the buttons to appear at the top of the page, and not alongside the slider as they should do.
3. To test the slider try creating a new article by copy and pasting the content of an existing demo / featured article – using no editor. Strangely the image caption in the copied article appears in the html code but does not render in a browser. This is really weird and makes it impossible to add to the 3 images shown in the demo.Any suggestions as to how to fix these issues please?
limeweb Friendlimeweb
- Join date:
- October 2006
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 5
- Thanked:
- 3 times in 1 posts
August 22, 2009 at 8:28 pm #315080hi tienhc, or anyone else…..
Any suggestions for a fix to the JA Mona contentslider problem please?
caclemor Friendcaclemor
- Join date:
- July 2008
- Posts:
- 83
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 35
- Thanked:
- 2 times in 1 posts
September 10, 2009 at 11:08 pm #317039I just tried using this also and view it in FireFox and IE 7. In FireFox it works and the images link from the home page to the article. In IE7 the images do not link at all to anywhere.
The site is http://74.53.143.183/~ops/index.php
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
September 11, 2009 at 8:09 am #317061Hi
We fixed this issue and update to the latest version.
To solve it, please open modulesmod_ja_contentslidehelper.php file, at about line 143, find following code:
if ($height) {
if (is_numeric ($height)) $height = $height;
$regex = '/(heights*=s*"?)([^s,^"]*)/';
if (preg_match ($regex, $image))
$image = preg_replace ($regex, '${1}'.$height, $image);
else {
$image = substr ($image, 0, -2) . " height="$height" />";
}
}
and change to:
if ($height) {
if (is_numeric ($height)) $height = $height;
$regex = '/(heights*=s*"?)([^s,^"]*)/';
if (preg_match ($regex, $image))
$image = preg_replace ($regex, '${1}'.$height, $image);
else {
$image = substr ($image, 0, -2) . " height="$height" />";
}
}
//clear class caption
$image = str_replace('class="caption"', '', $image);
limeweb Friendlimeweb
- Join date:
- October 2006
- Posts:
- 86
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 5
- Thanked:
- 3 times in 1 posts
September 11, 2009 at 12:16 pm #317088hi JA Developer
Update on content slider – issues still needing to be solved:
1. The images now ‘link’ in IE8, BUT the content slider no longer slides – it simply does not work :confused:
2. There is a different bug in the css which I reported earlier in this thread – When in admin params, setting ‘button driven’ to ‘show’ causes the buttons to appear at the top of the page, and not alongside the slider as they should do.3. I’ve reported and found a fix for another bug in the template.css file see <em>@limeweb 140575 wrote:</em><blockquote>I’ve found the bug. In the template.css the width of table contentpaneopen is missing. Line 485 of the template.css also shows the table layout incorrectly as fixed.
To fix the tables in JA Mona change lines 479 – 486 in the template.css to:
table.contentpaneopen td, table.contentpane td {
width: auto;
}table.contentpaneopen, table.contentpane, table.blog {
width: 100%;
}
</blockquote>That fix has not however been incorporated into the updated quickstart download and still exists as a bug in the template.
4. Just a question – why, when a download package has been updated with bug fixes by JA Developers, is the version not changed from 1.0 to 1.1. Surely if you changed the versioing and put a sticky note as to what has been fixed it would help everyone?
caclemor Friendcaclemor
- Join date:
- July 2008
- Posts:
- 83
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 35
- Thanked:
- 2 times in 1 posts
September 14, 2009 at 10:34 pm #317380I tried this and ended up with syntax errors.
Parse error: syntax error, unexpected ‘}’ in /home/ops/public_html/modules/mod_ja_contentslide/helper.php on line 161. Have now done it twice and this is the error I get. Ended up reloading the original helper.php file.
Any other ideas would be appreciated.
Here’s the entire code:
<?php
/**
* modJaContentslideHelper class.
*
* @package Joomla.
* @subpackage Modules.
* @author (@see http://joomlart.com).
*/class modJaContentslideHelper {
/**
* get Total contents by category.
*
* @params object.
*/
function getTotalContents( $catid=0 ){
global $mainframe;$my = &JFactory::getUser();
$db = &JFactory::getDBO();$aid = $my->get( ‘aid’, 0 );
$query = ” SELECT COUNT(a.id)”
. “n FROM #__content AS a”
. “n WHERE a.state = 1”
. “n AND ( a.publish_up = ” . $db->Quote( $db->getNullDate() ) . ” OR a.publish_up <= ” . $db->Quote( date(‘Y-m-d H:i’) ) . ” )”
. “n AND ( a.publish_down = ” . $db->Quote( $db->getNullDate() ) . ” OR a.publish_down >= ” . $db->Quote( date(‘Y-m-d H:i’) ) . ” )”
. ( ( !$mainframe->getCfg( ‘shownoauth’ ) ) ? “n AND a.access <= ” . (int) $aid : ” )
;
if( $catid ) {
$query .= ‘ AND a.catid IN (‘.$catid.’) ‘;
}
// echo $query.'<br>’;
$db->setQuery( $query );return $db->loadResult();
}function articleLink( $contn ){
global $mainframe;$string = ”;
$Itemid = $mainframe->getItemid( $contn->id );
// Blank itemid checker for SEF
if ($Itemid == NULL) {
$Itemid = ”;
} else {
$Itemid = ‘&Itemid=’. $Itemid;
}
//$link = JRoute::_( ContentHelperRoute::getArticleRoute ( $contn->slug,
// $contn->catslug,
// $contn->sectionid ) );$link = ContentHelperRoute::getArticleRoute ( $contn->slug,
$contn->catslug,
$contn->sectionid );return $link;
}
/**
* get content listing.
*/
function getList( $catid, $start=0, $numberE=1, $useajax = 1){global $mainframe;
$db = &JFactory::getDBO();
$my = &JFactory::getUser();
$aid = $my->get( ‘aid’, 0 );
$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’
. “n FROM #__content AS a”.
‘ INNER JOIN #__categories AS cc ON cc.id = a.catid’ .
‘ INNER JOIN #__sections AS s ON s.id = a.sectionid’
. “n WHERE a.state = 1”
. “n AND ( a.publish_up = ” . $db->Quote( $db->getNullDate() ) . ” OR a.publish_up <= ” . $db->Quote( date(‘Y-m-d H:i’) ) . ” )”
. “n AND ( a.publish_down = ” . $db->Quote( $db->getNullDate() ) . ” OR a.publish_down >= ” . $db->Quote( date(‘Y-m-d H:i’) ) . ” )”
. ( ( !$mainframe->getCfg( ‘shownoauth’ ) ) ? “n AND a.access <= ” . (int) $aid : ” )
;
if( $catid ) {
$query .= ‘ AND a.catid IN (‘.$catid.’) ‘;
}
if( $useajax ) {
$query .= ‘ LIMIT ‘.$start.’,’.$numberE;// echo $query;
}
//echo $query;
$db->setQuery($query);return $db->loadObjectlist();
}
/**
*
*
*/
function loadContents($catid, $start=0, $numberE=1, $useajax = 1){
$content = modJaContentslideHelper::getList( $catid, $start, $numberE, $useajax );
return isset( $content[0] ) ? $content[0]: null;
}
/**
*
*
*/
function replaceImage( &$row, $maxchars, $showimage, $width = 0, $height = 0 ) {
// expression to search for
$regex = ‘/{mosimages*.*?}/i’;$image = $showimage ? modJaContentslideHelper::processImage ( $row, $width, $height ):””;
if ($image) {
$row->introtext = trim($row->introtext);
$row->introtext = preg_replace( $regex, ”, $row->introtext );
} else {
$regex = “/<img.*/>/”;
preg_match ($regex, $row->introtext, $matches);
$row->introtext = trim($row->introtext);
$row->introtext = preg_replace ($regex, ”, $row->introtext);$image = $showimage && count($matches)?$matches[0]:””;
if ($image) {
if ($width) {
if (is_numeric ($width)) $width = $width;
$regex = ‘/(widths*=s*”?)([^s,^”]*)/’;
if (preg_match ($regex, $image))
$image = preg_replace ($regex, ‘${1}’.$width, $image);
else {
$image = substr ($image, 0, -2) . ” width=”$width” />”;
}
}
if ($height) {
if (is_numeric ($height)) $height = $height;
$regex = ‘/(heights*=s*”?)([^s,^”]*)/’;
if (preg_match ($regex, $image))
$image = preg_replace ($regex, ‘${1}’.$height, $image);
else {
$image = substr ($image, 0, -2) . ” height=”$height” />”;
}
}
//clear class caption
$image = str_replace(‘class=”caption”‘, ”, $image);
}
}
}
}$row->introtext1 = strip_tags($row->introtext);
if ($maxchars && strlen ($row->introtext) > $maxchars) {
$row->introtext1 = substr ($row->introtext1, 0, $maxchars) . “…”;
}
// clean up globals
return $image;
}
/**
*
*/
function processImage ( &$row, $width, $height ) {
/* for 1.5 – don’t need to use image parameter */
return 0;
/* End 1.5 */
}
/**
* load javascript files: processing override js, load js compress or not.
*/
function javascript( $params ){$document =& JFactory::getDocument();
// if load mootools lib.
if( $params->get(‘mootools’) ) {
$document->addScript( JURI::base().’modules/mod_ja_contentslide/js/mootools.v1.1.pak.js’ );
}
if( $params->get(‘usezip’) ) {
$document->addScript( JURI::base().’modules/mod_ja_contentslide/assets/js/ja_contentslide.pak.js’);
} else {
$document->addScript( JURI::base().’modules/mod_ja_contentslide/assets/js/ja_contentslide.js’ );
}
}
/**
* load css files: processing override css
*/
function css( $params ){global $mainframe;
$document =& JFactory::getDocument();
$cssFile = ‘ja_contentslide.css’;
if( file_exists(JPATH_SITE.DS.’templates’.DS.$mainframe->getTemplate().DS.’css’.DS.$cssFile) ) {
$document->addStyleSheet( JURI::base().’templates/’.$mainframe->getTemplate().’/css/’.$cssFile );
} else {
$document->addStyleSheet( JURI::base().’modules/mod_ja_contentslide/assets/css/’.$cssFile );
}
}
/**
* check overrider layout.
*/
function getLayoutPath($module, $layout = ‘default’) {global $mainframe;
// Build the template and base path for the layout
$tPath = JPATH_BASE.DS.’templates’.DS.$mainframe->getTemplate().DS.’html’.DS.$module.DS.$layout.’.php’;
$bPath = JPATH_BASE.DS.’modules’.DS.$module.DS.’tmpl’.DS.$layout.’.php’;// If the template has a layout override use it
if (file_exists($tPath)) {
return $tPath;
} else {
return $bPath;
}
}
}
?>caclemor Friendcaclemor
- Join date:
- July 2008
- Posts:
- 83
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 35
- Thanked:
- 2 times in 1 posts
September 14, 2009 at 10:35 pm #317381Here is the code that is throwing the error
[PHP]<?php
/**
* modJaContentslideHelper class.
*
* @package Joomla.
* @subpackage Modules.
* @author (@see http://joomlart.com).
*/class modJaContentslideHelper {
/**
* get Total contents by category.
*
* @params object.
*/
function getTotalContents( $catid=0 ){
global $mainframe;$my = &JFactory::getUser();
$db = &JFactory::getDBO();$aid = $my->get( ‘aid’, 0 );
$query = ” SELECT COUNT(a.id)”
. “n FROM #__content AS a”
. “n WHERE a.state = 1”
. “n AND ( a.publish_up = ” . $db->Quote( $db->getNullDate() ) . ” OR a.publish_up <= ” . $db->Quote( date(‘Y-m-d H:i’) ) . ” )”
. “n AND ( a.publish_down = ” . $db->Quote( $db->getNullDate() ) . ” OR a.publish_down >= ” . $db->Quote( date(‘Y-m-d H:i’) ) . ” )”
. ( ( !$mainframe->getCfg( ‘shownoauth’ ) ) ? “n AND a.access <= ” . (int) $aid : ” )
;
if( $catid ) {
$query .= ‘ AND a.catid IN (‘.$catid.’) ‘;
}
// echo $query.'<br>’;
$db->setQuery( $query );return $db->loadResult();
}function articleLink( $contn ){
global $mainframe;$string = ”;
$Itemid = $mainframe->getItemid( $contn->id );
// Blank itemid checker for SEF
if ($Itemid == NULL) {
$Itemid = ”;
} else {
$Itemid = ‘&Itemid=’. $Itemid;
}
//$link = JRoute::_( ContentHelperRoute::getArticleRoute ( $contn->slug,
// $contn->catslug,
// $contn->sectionid ) );$link = ContentHelperRoute::getArticleRoute ( $contn->slug,
$contn->catslug,
$contn->sectionid );return $link;
}
/**
* get content listing.
*/
function getList( $catid, $start=0, $numberE=1, $useajax = 1){global $mainframe;
$db = &JFactory::getDBO();
$my = &JFactory::getUser();
$aid = $my->get( ‘aid’, 0 );
$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’
. “n FROM #__content AS a”.
‘ INNER JOIN #__categories AS cc ON cc.id = a.catid’ .
‘ INNER JOIN #__sections AS s ON s.id = a.sectionid’
. “n WHERE a.state = 1”
. “n AND ( a.publish_up = ” . $db->Quote( $db->getNullDate() ) . ” OR a.publish_up <= ” . $db->Quote( date(‘Y-m-d H:i’) ) . ” )”
. “n AND ( a.publish_down = ” . $db->Quote( $db->getNullDate() ) . ” OR a.publish_down >= ” . $db->Quote( date(‘Y-m-d H:i’) ) . ” )”
. ( ( !$mainframe->getCfg( ‘shownoauth’ ) ) ? “n AND a.access <= ” . (int) $aid : ” )
;
if( $catid ) {
$query .= ‘ AND a.catid IN (‘.$catid.’) ‘;
}
if( $useajax ) {
$query .= ‘ LIMIT ‘.$start.’,’.$numberE;// echo $query;
}
//echo $query;
$db->setQuery($query);return $db->loadObjectlist();
}
/**
*
*
*/
function loadContents($catid, $start=0, $numberE=1, $useajax = 1){
$content = modJaContentslideHelper::getList( $catid, $start, $numberE, $useajax );
return isset( $content[0] ) ? $content[0]: null;
}
/**
*
*
*/
function replaceImage( &$row, $maxchars, $showimage, $width = 0, $height = 0 ) {
// expression to search for
$regex = ‘/{mosimages*.*?}/i’;$image = $showimage ? modJaContentslideHelper::processImage ( $row, $width, $height ):””;
if ($image) {
$row->introtext = trim($row->introtext);
$row->introtext = preg_replace( $regex, ”, $row->introtext );
} else {
$regex = “/<img.*/>/”;
preg_match ($regex, $row->introtext, $matches);
$row->introtext = trim($row->introtext);
$row->introtext = preg_replace ($regex, ”, $row->introtext);$image = $showimage && count($matches)?$matches[0]:””;
if ($image) {
if ($width) {
if (is_numeric ($width)) $width = $width;
$regex = ‘/(widths*=s*”?)([^s,^”]*)/’;
if (preg_match ($regex, $image))
$image = preg_replace ($regex, ‘${1}’.$width, $image);
else {
$image = substr ($image, 0, -2) . ” width=”$width” />”;
}
}
if ($height) {
if (is_numeric ($height)) $height = $height;
$regex = ‘/(heights*=s*”?)([^s,^”]*)/’;
if (preg_match ($regex, $image))
$image = preg_replace ($regex, ‘${1}’.$height, $image);
else {
$image = substr ($image, 0, -2) . ” height=”$height” />”;
}
}
//clear class caption
$image = str_replace(‘class=”caption”‘, ”, $image);
}
}
}
}$row->introtext1 = strip_tags($row->introtext);
if ($maxchars && strlen ($row->introtext) > $maxchars) {
$row->introtext1 = substr ($row->introtext1, 0, $maxchars) . “…”;
}
// clean up globals
return $image;
}
/**
*
*/
function processImage ( &$row, $width, $height ) {
/* for 1.5 – don’t need to use image parameter */
return 0;
/* End 1.5 */
}
/**
* load javascript files: processing override js, load js compress or not.
*/
function javascript( $params ){$document =& JFactory::getDocument();
// if load mootools lib.
if( $params->get(‘mootools’) ) {
$document->addScript( JURI::base().’modules/mod_ja_contentslide/js/mootools.v1.1.pak.js’ );
}
if( $params->get(‘usezip’) ) {
$document->addScript( JURI::base().’modules/mod_ja_contentslide/assets/js/ja_contentslide.pak.js’);
} else {
$document->addScript( JURI::base().’modules/mod_ja_contentslide/assets/js/ja_contentslide.js’ );
}
}
/**
* load css files: processing override css
*/
function css( $params ){global $mainframe;
$document =& JFactory::getDocument();
$cssFile = ‘ja_contentslide.css’;
if( file_exists(JPATH_SITE.DS.’templates’.DS.$mainframe->getTemplate().DS.’css’.DS.$cssFile) ) {
$document->addStyleSheet( JURI::base().’templates/’.$mainframe->getTemplate().’/css/’.$cssFile );
} else {
$document->addStyleSheet( JURI::base().’modules/mod_ja_contentslide/assets/css/’.$cssFile );
}
}
/**
* check overrider layout.
*/
function getLayoutPath($module, $layout = ‘default’) {global $mainframe;
// Build the template and base path for the layout
$tPath = JPATH_BASE.DS.’templates’.DS.$mainframe->getTemplate().DS.’html’.DS.$module.DS.$layout.’.php’;
$bPath = JPATH_BASE.DS.’modules’.DS.$module.DS.’tmpl’.DS.$layout.’.php’;// If the template has a layout override use it
if (file_exists($tPath)) {
return $tPath;
} else {
return $bPath;
}
}
}
?>[/PHP] -
AuthorPosts
This topic contains 10 replies, has 4 voices, and was last updated by caclemor 15 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum