Insert Instagram

Insert Instagram

Grab any post from an Instagramp page and quickly insert in an article or text module or any extension which output a text area. section cols2 ...

Notice: Undefined variable: slideshow in /home/cmsenerg/public_html/modules/mod_cmse_articles_latest/tmpl/_slideshow.php on line 223

Notice: Undefined variable: slideshow in /home/cmsenerg/public_html/modules/mod_cmse_articles_latest/tmpl/_slideshow.php on line 223
Add photo gallery to posts

Add photo gallery to posts

The CMSE Fields tool includes a robust image gallery function that will maximize and optimize your Joomla articles or any extension which output a ...

Notice: Undefined variable: slideshow in /home/cmsenerg/public_html/modules/mod_cmse_articles_latest/tmpl/_slideshow.php on line 223

Notice: Undefined variable: slideshow in /home/cmsenerg/public_html/modules/mod_cmse_articles_latest/tmpl/_slideshow.php on line 223
Insert external page like a social media share

Insert external page like a social media share

This function will grab the image, title and first X characters from a remote source and display similarly as Facebook or Twitter when a URL is ...

Notice: Undefined variable: slideshow in /home/cmsenerg/public_html/modules/mod_cmse_articles_latest/tmpl/_slideshow.php on line 223

Notice: Undefined variable: slideshow in /home/cmsenerg/public_html/modules/mod_cmse_articles_latest/tmpl/_slideshow.php on line 223

Notice: Undefined variable: slideshow in /home/cmsenerg/public_html/modules/mod_cmse_articles_latest/tmpl/_slideshow.php on line 223

Notice: Undefined variable: slideshow in /home/cmsenerg/public_html/modules/mod_cmse_articles_latest/tmpl/_slideshow.php on line 223
Insert a single video from any source

Insert a single video from any source

Easily insert videos from any source which supports video share via embed. This can be used in Joomla content component, Custom module and any ...

Notice: Undefined variable: slideshow in /home/cmsenerg/public_html/modules/mod_cmse_articles_latest/tmpl/_slideshow.php on line 223

Notice: Undefined variable: slideshow in /home/cmsenerg/public_html/modules/mod_cmse_articles_latest/tmpl/_slideshow.php on line 223

Add Article Author Details To The Category List And Article Page

Add Article Author Details To The Category List And Article Page

Joomla has the greatest template override system among all the top CMS, but you won't know it if you don't use it. Adding an author's profile data to articles they wrote, is done simply.

1. Create A Layout Override

  • Go to Extensions > Templates
  • Click the name of your default template (highlighted star), under the column titled Template.
  • Click the tab labeled Overrides
  • Under the column titled Layouts, click Joomla then click content

The page will refresh and show the confirmation of the override creation. Now edit the file

  • Click the tab labeled Editor
  • Click through directories html > layouts > joomla > content > info_block
  • Click the file named author.php to open the code editor on the right

2. Edit The Override File Named author.php

html/layouts/joomla/content/info_block/author.php

Add the following code to the top within the <?php tag. This gets the ID the currently viewed article then creates an output variable of the user profile aboutme through the JUserHelper class.

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

defined('JPATH_BASE') or die;

// get author ID
$authorId = $displayData['item']->created_by;

// get user profile field data
$authordetail = JUserHelper::getProfile($authorId)->profile['aboutme'];
$authorwebsite = JUserHelper::getProfile($authorId)->profile['website'];

//print_r($displayData['item']);
?>
<dd class="createdby" itemprop="author" itemscope itemtype="https://schema.org/Person">
   <?php $author = ($displayData['item']->created_by_alias ?: $displayData['item']->author); ?>
   <?php $author = '<span itemprop="name">' . $author . '</span>'; ?>
   <?php if (!empty($displayData['item']->contact_link ) && $displayData['params']->get('link_author') == true) : ?>
      <?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', $displayData['item']->contact_link, $author, array('itemprop' => 'url'))); ?>
   <?php else : ?>
      <?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
   <?php endif; ?>
   
   <?php // the output
   if( !empty($authordetail) ) { ?>
   <div class="aboutme">
   <h4>About The Author</h4>
      <?php echo $authordetail; ?>
      <?php if( !empty($authorwebsite) ) { ?>
         <p><a href="/<?php echo $authorwebsite; ?>" rel="nofollow" target="_blank">Author's Website</a></p>
      <?php } ?>
   </div>
   <?php } ?>
</dd>

Now the article aboutme text will display where the article info is assigned. Of course you must enable Show Author either in the content global configuration, or in the menu item options.

The output

author details added

Copyright © 2020 CMSEnergizer.com. All Rights Reserved.
This website is powered by the Joomla!©™ 3 Website Framework | File download and article manager component by CMSE Custom Fields | Website hosting and development by WebsiteDons

CMSEnergizer.com is owned and operated by Emuzement Net Inc, Tampa, Florida USA