how to display article intro image in joomla module?

Article display by yourtheme/html/com_content/article/tmpl/default.php file.

you can use module mod_articles_latest so edit mod_articles_latest/tmpl/default.php file.

* @package Joomla.Site
* @subpackage mod_articles_latest
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt

defined('_JEXEC') or die;
<ul class="latestnews<?php echo $moduleclass_sfx; ?>">
<?php foreach ($list as $item) : ?>
<a href="<?php echo $item->link; ?>">
<?php echo $item->title; ?></a>
<img src="<?php echo json_decode($item->images)->image_intro; ?>"/> //new line
<?php endforeach; ?>

Drag and drop using jquery


Create .html file

<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
 // Example 1.1: A single sortable list
 $('#example-1-1 .sortable-list').sortable();
 // Example 1.2: Sortable and connectable lists
 $('#example-1-2 .sortable-list').sortable({
 connectWith: '#example-1-2 .sortable-list'
 // Example 1.3: Sortable and connectable lists with visual helper
 $('#example-1-3 .sortable-list').sortable({
 connectWith: '#example-1-3 .sortable-list',
 placeholder: 'placeholder',
 // Example 1.4: Sortable and connectable lists (within containment)
 $('#example-1-4 .sortable-list').sortable({
 connectWith: '#example-1-4 .sortable-list',
 containment: '#containment'
 Continue reading 

How to use login() function in joomla?

  • You can use Below code during develop module and component with login functionality, get your username and password dynamically and put in array function.
  • when you call registration successfully function just add this code for autologin  functionality.
  $credentials = array( 'username' => '$name', 'password' => '$password');
    $login_site =& JFactory::getApplication('site');
    $login_site->login($credentials, $options=array());

How to Retrieve Input data in joomla?

Use jinput Method

you can use this code

$jinput = JFactory::getApplication()->input;

Get the Value using jinput

$name = $jinput->get('varname', 'default_value', 'filter');

Get Multiple value

Retrieve multiple values you can use getarray() method:

$fooValues = $jinput->getArray(array('var1' => '', 'var2' => '', 'var3' => ''));

How to share custom data on social network site !!!

For Facebook share

<a id="ref_fb" href=";p[title]=<?php echo $ftitle;?>&amp;p[summary]=<?php echo $fdescription;?>&amp;p[url]=<?php echo urlencode($fshare_url);?>&amp;
p[images][0]=<?php echo $fimage_url;?>" onclick=", '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600'); return false;">&nbsp;</a>

For Twitter share

<a id="ref_tw" href="<?php echo $ttitle; ?>+<?php echo urlencode($tshare_url);?>" onclick=", '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600');return false;">&nbsp;</a>

For Linkedin share

<a id="ref_lkd" href="<?php echo urlencode($lshare_url);?>&title=<?php echo strip_tags($ltitle); ?>&source=<?php echo urlencode($siteurl);?>"onclick=", '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600');return false;">&nbsp;</a>

For Google+ share

<a id="ref_gp" href="<?php echo urlencode($gshare_url);?>"
onclick=", '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600');return false">&nbsp;</a>
Please define  values  of varibles for better result !!!  

How to use countModules function in joomla?

Returns the number of modules enabled in one or more module positions.

Counting modules in a given module position

The countModules method can be used within a template to determine the number of modules enabled in a given module position.

For example, the following code includes modules in the ‘user1’ position only if at least one module is enabled for that position.

<?php if ($this->countModules( 'user1' )) : ?>
    <jdoc:include type="modules" name="user1" style="rounded" />
<?php endif; ?>

Counting modules in multiple module positions

The countModules method can be used to determine the number of Modules in more than one Module position.

Example: The user1 and user2 Module positions are to be displayed in the region, but you want the region to not appear at all if no Modules are enabled in either position.

<?php if ($this->countModules( 'user1 or user2' )) : ?>
                <jdoc:include type="modules" name="user1" style="xhtml" />
                <jdoc:include type="modules" name="user2" style="xhtml" />
<?php endif; ?>

Example: The user1 and user2 Module positions are to be displayed side-by-side with a separator between them. However, if only one of the Module positions has any Modules enabled then the separator is not needed. Furthermore, if neither user1 or user2 has any Modules enabled then nothing is output.

<?php if ($this->countModules( 'user1 or user2' )) : ?>

                <?php if ($this->countModules( 'user1' )) : ?>
                        <jdoc:include type="modules" name="user1" style="xhtml" />
                <?php endif; ?>

                <?php if ($this->countModules( 'user1 and user2' )) : ?>
                <?php endif; ?>

                <?php if ($this->countModules( 'user2' )) : ?>
                        <jdoc:include type="modules" name="user2" style="xhtml" />
                <?php endif; ?>

<?php endif; ?>

Joomla Common Issues

How to resolve a database error

Resolve a data base error by checking your configuration.php files of your Joomla application and making sure that the following are correctly put.
var $dbtype = 'mysql';
var $host = 'localhost';
var $user = 'user_jo151';
var $password = 'YourPassword';
var $db = 'user_jo151';
var $ dbprefix = 'jos_';

You should make sure you are using the correct MySQL and user name and data base in your configuration.php file in order to check the correct mysql user name and database of your Joomla you can use MySQL database in your CPanel you should make sure that your MySQL user name is added to the data base.

  • 404 Error page not found

This error may be caused by the database itself in order to resolve this by restoring your database if the web site looks fine and the website continues to give you a 404 page not found error ( this error is caused by SEO functionality of Joomla) in order to resolve this open the configuration.php program and edit the var $ live _site=“; to match the actual URL of your website go to the administrative end of your Joomla and make sure that both the search engines friendly URLs and Apache mode re-write are set to yes

  • Error:”XMLS file missing in package”

This effetely occurs when entering a new template if this happens you should check if it’s for the 1.0 Joomla or the 1.5 Joomla if it was initially created for the 1.0 Joomla you can try enabling the Joomla legacy plug-in the other reason could be the archive you are trying to install contains the actual installation package (having an achieve within the archive) the solution is just as simple you should exact the archive and install the actual the real installation package.

  • 404-component not found error

You should check whether you default menu item is published the front page of a Joomla needs a default item to do this go to the admin area then to the menu select the item you want to be loaded when you are at your main page and click at the default button on your top right

  • MySQL server has gone away error

This commonly occurs when you try to install a big extension and you have the FTP layer of your Joomla application enabled to resolve this you can decide to go for the workaround and through your administrative area go to the global configuration then to settings then to the FTP settings while the change the value of enable ftp from YES to NO now you can try and re-install the extension again.