Vertex
Vertex is a free responsive Joomla template, however the download will require a free membership. Vertex is built on Shape5 framework which offers 95 module positions, custom row and column width, and much more.
<param name="accesskey" type="text" size="1" default="" label="Accessibility Access Key"
description="Accessibility Access Key for the page which this Menu item points to" />
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<state>
<name>Component</name>
<description>Component Parameters</description>
<params>
<param name="page_title" type="text" size="30" default="" label="Page Title"
description="PARAMPAGETITLE" />
<param name="show_page_title" type="radio" default="1" label="Show Page Title"
description="SHOW/HIDE THE PAGES TITLE">
<option value="0">No</option>
<option value="1">Yes</option>
</param>
<param name="pageclass_sfx" type="text" size="20" default="" label="Page Class Suffix"
description="PARAMPAGECLASSSFX" />
<param name="@spacer" type="spacer" default="" label="" description="" />
<param name="menu_image" type="imagelist" directory="/images/stories" hide_default="1"
default="" label="Menu Image" description="PARAMMENUIMAGE" />
<param name="@spacer" type="spacer" default="" label="" description="" />
<param name="secure" type="radio" default="0" label="SSL Enabled" description="PARAMSECURE">
<option value="-1">Off</option>
<option value="0">Ignore</option>
<option value="1">On</option>
</param>
<param name="@spacer" type="spacer" default="" label="" description="" />
<param name="accesskey" type="text" size="1" default="" label="Accessibility Access Key"
description="Accessibility Access Key for the page which this Menu item points to" />
</params>
<advanced />
</state>
</metadata>
// ACCESS KEY HACK - Part 1
$accessKey = $iParams->get('accesskey');
$tmp->accessKey = $accessKey;
// ACCESS KEY HACK - Part 2
if ($tmp->accessKey)
$data = '<a href="'.$tmp->url.'" accesskey="'.$tmp->accessKey.'">'.$image.$tmp->name.'</a>';
else
$data = '<a href="'.$tmp->url.'" >'.$image.$tmp->name.'</a>';
function _getItemData($item)
{
$data = null;
// Menu Link is a special type that is a link to another item
if ($item->type == 'menulink')
{
$menu = &JSite::getMenu();
if ($tmp = clone($menu->getItem($item->query['Itemid']))) {
$tmp->name = '<span><![CDATA['.$item->name.']]></span>';
$tmp->mid = $item->id;
$tmp->parent = $item->parent;
} else {
return false;
}
} else {
$tmp = clone($item);
$tmp->name = '<span><![CDATA['.$item->name.']]></span>';
}
$iParams = new JParameter($tmp->params);
if ($iParams->get('menu_image') && $iParams->get('menu_image') != -1) {
$image = '<img src="'.JURI::base(true).'/images/stories/'.$iParams->get('menu_image').'" alt="" />';
} else {
$image = null;
}
// ACCESS KEY HACK - Part 1
$accessKey = $iParams->get('accesskey');
$tmp->accessKey = $accessKey;
switch ($tmp->type)
{
case 'separator' :
return '<span class="separator">'.$image.$tmp->name.'</span>';
break;
case 'url' :
if ((strpos($tmp->link, 'index.php?') !== false) && (strpos($tmp->link, 'Itemid=') === false)) {
$tmp->url = $tmp->link.'&Itemid='.$tmp->id;
} else {
$tmp->url = $tmp->link;
}
break;
default :
$router = JSite::getRouter();
$tmp->url = $router->getMode() == JROUTER_MODE_SEF ?
'index.php?Itemid='.$tmp->id : $tmp->link.'&Itemid='.$tmp->id;
break;
}
// Print a link if it exists
if ($tmp->url != null)
{
// Handle SSL links
$iSecure = $iParams->def('secure', 0);
if ($tmp->home == 1) {
$tmp->url = JURI::base();
} elseif (strcasecmp(substr($tmp->url, 0, 4), 'http') && (strpos($tmp->link, 'index.php?') !== false)) {
$tmp->url = JRoute::_($tmp->url, true, $iSecure);
} else {
$tmp->url = str_replace('&', '&', $tmp->url);
}
switch ($tmp->browserNav)
{
default:
case 0:
// _top
// ACCESS KEY HACK - Part 2 ###############################
if ($tmp->accessKey)
$data = '<a href="'.$tmp->url.'" accesskey="'.$tmp->accessKey.'">'.$image.$tmp->name.'</a>';
else
$data = '<a href="'.$tmp->url.'" >'.$image.$tmp->name.'</a>';
break;
case 1:
// _blank
$data = '<a href="'.$tmp->url.'" target="_blank">'.$image.$tmp->name.'</a>';
break;
case 2:
// window.open
$attribs = 'toolbar=no,location=no,status=no,menubar=no,
scrollbars=yes,resizable=yes,'.$this->_params->get('window_open');
// hrm...this is a bit dickey
$link = str_replace('index.php', 'index2.php', $tmp->url);
$data = '<a href="'.$link.'" onclick="window.open(this.href,\'targetWindow\',\''.$attribs.'\');
return false;">'.$image.$tmp->name.'</a>';
break;
}
} else {
$data = '<a>'.$image.$tmp->name.'</a>';
}
return $data;
}
<a href="<?php echo $this->item->readmore_link; ?>" class="readon<?php echo $this->item->params->get('pageclass_sfx'); ?>">
<?php if ($this->item->readmore_register) :
echo JText::_('Register to read more...');
elseif ($readmore = $this->item->params->get('readmore')) :
echo $readmore;
else :
echo JText::sprintf('Read more...');
endif; ?></a>
echo JText::sprintf('Read more...');
echo JText::sprintf('Read more', $this->item->title);
<p class="readmore"><a class="btn" href="<?php echo $link; ?>"> <span class="icon-chevron-right"></span>
<?php if (!$params->get('access-view')) :
echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
elseif ($readmore = $this->item->alternative_readmore) :
echo $readmore;
if ($params->get('show_readmore_title', 0) != 0) :
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
endif;
elseif ($params->get('show_readmore_title', 0) == 0) :
echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
else :
echo JText::_('COM_CONTENT_READ_MORE');
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
endif; ?>
</a></p>
echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE', $this->item->title);
$this->item->created. So we can use that date, compared to the current date, to see how old the article is. Then we can add a different CSS class for articles of different ages.<?php
/**
* Gets class based on today's date and article date
* @param $date
* @return string containing CSS class name
*/
class MyFrontpageHelper {
function MyFrontPageHelper() {
parent::_constructor();
}
function getCSSClassFromDate($date) {
$dateClass = ''; // default to blank
// subtract create date from current date. both dates in seconds
$elapsedDays = (time() - strtotime($date)) / 86400; // 86400=number of seconds per day
if ($elapsedDays <= 7) $dateClass = 'dateCurrent';
if (($elapsedDays > 7) && ($elapsedDays <= 14)) $dateClass = 'dateLastWeek';
if ($elapsedDays > 14) $dateClass = "dateOld";
return $dateClass;
}
}
?>
defined('_JEXEC') or die('Restricted access');
require_once('myfrontpagehelper.php');
require_once statement. We need to use this (as opposed to the include statement) because this code gets executed multiple times, once for each article. So therequire_once statement makes sure we only include this file the first time.<?php if ($canEdit || $this->item->params->get('show_title') || $this->item->params->get('show_pdf_icon') || $this->item->params->get('show_print_icon') || $this->item->params->get('show_email_icon')) : ?>
<table class="contentpaneopen <?php echo MyFrontpageHelper::getCSSClassFromDate($this->item->created); ?>">
<table class="contentpaneopen dateCurrent">
<tr>
<td class="contentheading" width="100%">
Joomla! Security Strike Team </td>
.contentpaneopen.dateCurrent {
background: #F0FFFF;
}
.contentpaneopen.dateLastWeek {
background: #FFF8DC;
}
.contentpaneopen.dateOld {
background: #DCDCDC;
}
<?php echo $this->item->event->beforeDisplayContent; ?>
<table class="contentpaneopen <?php echo MyFrontpageHelper::getCSSClassFromDate($this->item->created); ?>">