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 | |
// http://docs.joomla.org/JDocument/setMetaData | |
$doc =& JFactory::getDocument(); | |
$doc->setMetaData( 'tag-name', 'tag-content', true ); | |
/* | |
*<meta name="tag-name" content="tag-content" /> | |
*/ | |
?> |
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 | |
// useful for multi-column layouts | |
$modulecount = count(JModuleHelper::getModules($attribs['name'])); | |
echo $modulecount; | |
?> |
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
online tools: | |
http://web-sniffer.net/ | |
http://www.stepforth.com/resources/server-header-checker-tool/#.T93mC7UtgZl | |
http://www.rexswain.com/httpview.html | |
http://webtools.live2support.com/header.php | |
articles: | |
http://www.seomoz.org/ugc/responsive-web-design-the-ultimate-guide-for-online-marketers | |
HTACCESS >> add following line |
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 // USE TO CALL VIMEO IMAGES | |
$imgid = '30725341'; | |
$hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$imgid.php")); | |
echo '<img src="'.$hash[0]['user_portrait_huge'].'"/>'; | |
/* | |
* thumbnail_large | |
* thumbnail_medium | |
* thumbnail_small | |
* user_portrait_huge | |
* user_portrait_large |
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 | |
/* | |
* Output for image upload field (original + thumbs x 5) | |
* | |
*/ | |
?> | |
<img src="<?php echo $cck->getValue('fieldname');?>" title="" alt="" /> | |
<img src="<?php echo $cck->getThumb1('fieldname');?>" title="" alt="" /> |
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 | |
// redirect to same page | |
$uri = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; | |
$uri = base64_encode($uri); | |
// replace $return with $uri | |
<input type="hidden" name="return" value="<?php echo $uri; ?>" /> | |
?> |
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 a class to define odd and even output from an array */ | |
echo ($key%2) ? " even" : " odd"; | |
?> |
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 | |
/* define the first or last element in an array */ | |
if($key == "0") echo ' first'; | |
if(count($myVar)==$key+1) echo ' last'; | |
?> |
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(count(JModuleHelper::getModules('module_position_here'))) :?> | |
<!-- only show if modules assigned --> | |
<?php | |
// define module position | |
jimport( 'joomla.application.module.helper' ); | |
$modules = &JModuleHelper::getModules( 'module_position_here' ); | |
foreach ($modules as $module) { //loop through the array and render their output | |
$_options = array( 'style' => 'raw' ); | |
echo JModuleHelper::renderModule( $module,$_options ); | |
} |
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 | |
// define module by type / name | |
jimport( 'joomla.application.module.helper' ); | |
$module = JModuleHelper::getModule( 'menu', 'Main' ); | |
$_options = array( 'style' => 'module' ); | |
echo JModuleHelper::renderModule( $module,$_options ); | |
?> | |
OR USE NO-NUMBER PLUGIN - e.g. {module xxx|module} |
OlderNewer