This file contains 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
$(document).ready(function(){ | |
$("input[type=text]:first").focus(); | |
}); |
This file contains 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
// Copy /modules/mod_menu/tmpl/default.php to /templates/MYTEMPLATE/html/mod_menu/default.php | |
// Around line 34, find: | |
if ($item->deeper) { | |
$class .= 'deeper '; | |
} | |
// Replace this with: | |
$currentitemcount ++; |
This file contains 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 | |
defined('_JEXEC') or die; | |
/* The following line loads the MooTools JavaScript Library */ | |
JHTML::_('behavior.mootools'); | |
/* The following line gets the application object for things like displaying the site name */ | |
$app = JFactory::getApplication(); | |
/* Get the document object */ |
This file contains 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 | |
//This will detect the Home Page of Joomla and perfom whatever code you tell it to | |
$menu = & JSite::getMenu(); | |
if ($menu->getActive() == $menu->getDefault()) { | |
//This code will be executed on the home page | |
} else { | |
//This code will be executed on every page except the home page |
This file contains 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
# index.php :: load the global joomla header | |
# between <head> and </head> | |
<jdoc:include type="head" /> | |
# index.php :: output of the system messages | |
# between <body> and </body> | |
<jdoc:include type="message" /> | |
# index.php :: article and component output | |
# between <body> and </body> |
This file contains 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 | |
// no direct access | |
defined('_JEXEC') or die; | |
// Variables | |
$doc = JFactory::getDocument(); | |
$user = JFactory::getUser(); | |
$template = 'templates/' . $this->template; | |
// get html head data |
This file contains 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 | |
/** | |
* @version $Id: router.php 1618 2012-09-21 11:23:08Z lefteris.kavadas $ | |
* @package K2 | |
* @author JoomlaWorks http://www.joomlaworks.net | |
* @copyright Copyright (c) 2006 - 2012 JoomlaWorks Ltd. All rights reserved. | |
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html | |
*/ | |
// no direct access |
This file contains 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
//Removing Mootools | |
$head = $doc->getHeadData(); | |
//Unset Mootools for unregistered users | |
if($user->guest){ | |
$head=$this->getHeadData(); | |
reset($head['scripts']); | |
unset($head['scripts'][$this->baseurl . '/media/system/js/core.js']); | |
unset($head['scripts'][$this->baseurl . '/media/system/js/mootools.js']); | |
unset($head['scripts'][$this->baseurl . '/plugins/system/mtupgrade/mootools.js']); | |
unset($head['scripts'][$this->baseurl . '/media/system/js/mootools-core.js']); |
This file contains 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
// joomla 2.5 | |
$app = JFactory::getApplication(); | |
$link = 'http://www.domain.com/'; | |
$msg = 'You have been redirected to domain.com'; | |
$app->redirect($link, $msg, $msgType='message'); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> | |
<title>localhost</title> | |
</head> | |
<body> | |
<h1>It Works!</h1> | |
<ul> | |
<?php |
OlderNewer