This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// change default date format | |
// http://docs.joomla.org/How_do_you_change_the_date_format%3F | |
// http://nl3.php.net/manual/en/function.date.php | |
echo JHtml::_('date',$yourDateVariable, JText::_('j F, Y')); | |
// will output 22 Month, 2013 | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Initialiase variables. | |
$db = JFactory::getDbo(); | |
foreach ($item->getValue('art_tags') as $key => $tag) { | |
if ($key >= 0) { | |
// Use following line in a model. | |
$query.$key = $db->getQuery(true); | |
// Prepare query. | |
$query.$key->select('u.id,u.parent_id,u.path,u.title'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
LABEL > set style (warning, success, info, errro, add) | |
EXPAND with float, inline, outline_, grad, in_ or out_ etc.. | |
--> | |
<span class="inline in_tighter outline_round label_warning">Label</span> | |
<span class="inline in_tighter outline_round label_success">Label</span> | |
<span class="inline in_tighter outline_round label_info">Label</span> | |
<span class="inline in_tighter outline_round label_error">Label</span> | |
<span class="inline in_tighter outline_round label_add">Label</span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/////////////////////////////////////////////////////////////////////////////////// | |
// ADD TEXT TO BE TRIMMED, SET TRIM LENGTH IN CHARACTERS, BREAK WORD, STRIP HTML // | |
// http://api.joomla.org/cms-3/classes/JHtmlString.html // | |
/////////////////////////////////////////////////////////////////////////////////// | |
echo JHTML::_('string.truncate', $text, $length, true, false ); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE table1 INNER JOIN table2 ON table1.field_name = table2.field_name SET table1.field_name = table2.field_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// RESET KEY VALUES TO START FORM 0 AND REMOVE EMPTY/NULL ENTRIES | |
$array =array_values(array_filter($array)); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (!empty($attribs->select_banner_image)) { | |
$style = 'html { | |
background-image: url('.$attribs->select_banner_image.') !important; | |
background-size: contain; | |
background-repeat: no-repeat; | |
background-position: center top; | |
}'; | |
$doc->addStyleDeclaration( $style ); | |
} ?> |
OlderNewer