Skip to content

Commit

Permalink
* BUG: module for the Latest Articles/Most Popular doenst take the pi…
Browse files Browse the repository at this point in the history
…ctures after the "readmore"hr <hr id="system-readmore" />.

       he is only using the img within the intro text.
* BUG was also in plugin, it is also solved there.

You can now use safely  "search in intro text but if not found try in full text" for thumbnails source

 Reason the fulltext was not part of the DB query, the helper was not then able to detect an image as a result.

 * FEATURE: add new layout "horizontal" for modules Latest Articles/Most Popular
  • Loading branch information
cedricwalter committed Apr 11, 2012
1 parent 81ca7ab commit c7af362
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 75 deletions.
5 changes: 2 additions & 3 deletions mod_articles_latest_thumb/helper.php
Expand Up @@ -37,7 +37,7 @@ public static function getList(&$params)
$model->setState('list.limit', (int)$params->get('count', 5));
$model->setState('list.select', 'a.fulltext, a.id, a.title, a.alias, a.title_alias, a.introtext, a.state, a.catid, a.created, a.created_by, a.created_by_alias,' .
' a.modified, a.modified_by, a.publish_up, a.publish_down, a.images, a.urls, a.attribs, a.metadata, a.metakey, a.metadesc, a.access,' .
' a.hits, a.featured,');
' a.hits, a.featured');
$model->setState('filter.published', 1);

// Access filter
Expand Down Expand Up @@ -120,7 +120,6 @@ public static function getList(&$params)
$lists[$i]->teaser = comCedThumbnailsHelper::getDescription($params, $item->introtext);
$lists[$i]->title = comCedThumbnailsHelper::getTitle($params, $item->title);
$i++;

}

return $lists;
Expand All @@ -132,6 +131,6 @@ public static function getList(&$params)
public function addStyleSheet($layout)
{
$document =& JFactory::getDocument();
$document->addStyleSheet("media/mod_articles_latest_thumb/".$layout.".css");
$document->addStyleSheet("media/mod_articles_latest_thumb/".substr($layout, 2).".css");
}
}
2 changes: 2 additions & 0 deletions mod_articles_latest_thumb/mod_articles_latest_thumb.php
Expand Up @@ -10,8 +10,10 @@
// no direct access
defined('_JEXEC') or die;
require_once dirname(__FILE__) . '/helper.php';

$layout = $params->get('layout', 'default');
modArticlesLatestHelper::addStyleSheet($layout);

$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));
$list = modArticlesLatestHelper::getList($params);
require JModuleHelper::getLayoutPath('mod_articles_latest_thumb', $layout);
17 changes: 4 additions & 13 deletions mod_articles_latest_thumb/mod_articles_latest_thumb.xml
Expand Up @@ -183,19 +183,10 @@
name="advanced">

<field
name="layout"
type="list"
default="default"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC">
<option
value="default">Default
</option>
<option
value="textBlocksOverImage">Text Blocks Over Image
</option>
</field>

name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC" />

<field
name="moduleclass_sfx"
Expand Down
58 changes: 0 additions & 58 deletions mod_articles_latest_thumb/tmpl/thumbnails.php

This file was deleted.

4 changes: 3 additions & 1 deletion mod_articles_popular_thumb/helper.php
Expand Up @@ -40,9 +40,11 @@ function getList(&$params)
// Set the filters based on the module params
$model->setState('list.start', 0);
$model->setState('list.limit', (int)$params->get('count', 5));

$model->setState('list.select', 'a.fulltext, a.id, a.title, a.alias, a.title_alias, a.introtext, a.state, a.catid, a.created, a.created_by, a.created_by_alias,' .
' a.modified, a.modified_by, a.publish_up, a.publish_down, a.images, a.urls, a.attribs, a.metadata, a.metakey, a.metadesc, a.access,' .
' a.hits, a.featured,');
' a.hits, a.featured');

$model->setState('filter.published', 1);

// Access filter
Expand Down

0 comments on commit c7af362

Please sign in to comment.