Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions en-GB.mod_insertarticle.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CLASS="Module Class Suffix"
ARTICLE ID="Article"
COM_CONTENT_SELECT_AN_ARTICLE="Select content"
SHOW_ARTICLE="Show article title"
ARTICLE_TITLE_LINKABLE="Article title linkable"
HIDE_CONTAINER="Hide contained article in article view"
SHOW_README="Show readmore"
HEADING="Heading Label"
Expand Down
7 changes: 7 additions & 0 deletions fr-FR.mod_insertarticle.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; $Id: en-GB.mod_insertarticle 16465 2011-01-08 01:46:24Z cristian $
; insertarticle
; Copyright (C) 2005 - 2011 Open Source. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 - No BOM

READMORE="Lire la suite"
20 changes: 18 additions & 2 deletions mod_insertarticle.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
require_once(dirname(__FILE__).DS.'helper.php');

jimport( 'joomla.html.parameter' );
jimport( 'joomla.html.registry' );
jimport( 'joomla.version' );

// get a parameter from the module's configuration

Expand Down Expand Up @@ -50,12 +52,26 @@

if($txt_read_more==0) $readMoreTXT=$item->title;

JFactory::getApplication();
$app = JFactory::getApplication();
$parametar = $app->getParams();



$parametar = new JParameter($item->attribs);
//

$ver = new JVersion();
$vernum = $ver->getShortVersion();

$pos = strrpos($vernum, "3.");
if ($pos === false) { // note: three equal signs
// not found...
$parametar = new JParameter($item->attribs);
}else{

$parametar = new JRegistry($item->attribs);
}




$user =& JFactory::getUser( );
Expand Down
17 changes: 15 additions & 2 deletions mod_insertarticle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- Name of the Author -->
<author>Cristian Grañó</author>
<!-- Version Date of the Module -->
<creationDate>18-ene-2011</creationDate>
<creationDate>February 2013</creationDate>
<!-- Copyright information -->
<copyright>All rights reserved by www.percha.com</copyright>
<!-- License Information -->
Expand All @@ -15,7 +15,7 @@
<!-- Author's website -->
<authorUrl>www.percha.com</authorUrl>
<!-- Module version number -->
<version>1.6</version>
<version>1.8</version>
<!-- Description of what the module does -->
<description>Displays article as module
<![CDATA[
Expand All @@ -37,6 +37,7 @@
<languages>
<language tag="en-GB">en-GB.mod_insertarticle.ini</language>
<language tag="es-ES">es-ES.mod_insertarticle.ini</language>
<language tag="fr-FR">fr-FR.mod_insertarticle.ini</language>
</languages>

<!-- Optional parameters -->
Expand Down Expand Up @@ -65,6 +66,18 @@
value="0">JNO</option>
</field>

<field
name="title_article_linkable"
type="radio"
default="0"
required="true"
label="ARTICLE_TITLE_LINKABLE" >
<option
value="1">JYES</option>
<option
value="0">JNO</option>
</field>

<field
name="only_article_view"
type="radio"
Expand Down
34 changes: 34 additions & 0 deletions phing_build_example.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Rename this file to "build.xml" for use with PHING. Please do not commit your version
to GitHub since the property settings below will be specific to your dev environmcent !
-->
<project name="mod_insertarticle" basedir="." default="build_install_zip">

<property name="artifact.name" value="mod_insertarticle" />
<property name="joomla.root" value="C:\Development\WorkPHP\www\plusconscient25_dev" />
<property name="src" value="${joomla.root}\modules\${artifact.name}" />
<property name="install.zip.file.dest" value="C:\Development\WorkPHP\www\plusconscient15_int\attachments" override="true" />
<property name="version">v1.8_j2.5_3.0</property>

<fileset dir="${src}" id="allfiles">
<include name="${artifact.name}.php" />
<include name="${artifact.name}.xml" />
<include name="helper.php" />
<include name="index.html" />
<include name="fields/*" />
<include name="img/*" />
<include name="tmpl/*" />
<include name="en-GB.${artifact.name}.ini" />
<include name="es-ES.${artifact.name}.ini" />
<include name="fr-FR.${artifact.name}.ini" />
</fileset>

<!-- Copy Target -->
<target name="build_install_zip" description="build the install zip">
<delete file="${install.zip.file.dest}/${artifact.name}_${version}.zip" />
<zip destfile="${install.zip.file.dest}/${artifact.name}_${version}.zip">
<fileset refid="allfiles" />
</zip>
</target>
</project>
13 changes: 12 additions & 1 deletion tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@
<?php defined('_JEXEC') or die('Restricted access'); // no direct access ?>

<?php if(!empty($moduleclass_sfx)){?><div class="<?php echo $moduleclass_sfx; ?>"><?php } ?>
<?php if($showtitle_article == 1) { ?><h<?php echo $params->get('item_heading', 1);?>><?php echo $item->title ; ?></h<?php echo $params->get('item_heading', 1);?>><?php } ?>
<?php if($showtitle_article == 1) { ?>
<h<?php echo $params->get('item_heading', 1);?>>
<?php if ($params->get('title_article_linkable')) { ?>
<a href="<?php
$url = JRoute::_(ContentHelperRoute::getArticleRoute($item->id,$item->catid));
echo $url; ?>">
<?php echo $item->title; ?></a>
<?php } else { ?>
<?php echo $item->title; ?>
<?php } ?>
</h<?php echo $params->get('item_heading', 1);?>>
<?php } ?>
<?php echo JHTML::_('content.prepare', $item->introtext); ?>
<?php if ($read_more == 1){ ?>
<a class='readmore' href='<?php echo $url; ?>'>
Expand Down