<?php
$id= JRequest::getVar(‘id’);
$objTitle = $article->load($id);
echo $objTitle->get(‘title’);
?>
Tag Archives: Joomla
How to get article id
<?php echo JRequest::getVar(‘id’); ?>
How To Reset Admin Password – Joomla
1) Login to phpmyadmin and select db and the table (jos_users) that
store users details ie table with name end with “_users”2) Make sure that the username exists in the table( let the user name be ‘admin’)
store users details ie table with name end with “_users”2) Make sure that the username exists in the table( let the user name be ‘admin’)
3) Execute the below given query UPDATE jos_users
SET password=MD5(‘new password’) WHERE username = “admin”;
get admin email address in a component – joomla
$dVar=new JConfig();
$toAddres = $dVar->mailfrom;
Disable next and previous article – joomla 1.6
You can disable the text “Next” and “Prev” by disabling the plugin “Content – Page Navigation”
include a module inside a content item – Joomla 1.6
The code “{loadposition POSITION-NAME}” will help you to add a module in the content .
Follow the below given steps to include a module inside the content
1) Create a module from admin side and assign it to a position. let it be “position1”
Extensions->Module Manager ->New
2) Add a new article and include the code “{loadposition position1 }” so as to load the module assigned to that position “position1”
Content->Article Manager->Add New Article
how to add a new position – joomla 1.6
You can add a new position in joomla template by editing the “templateDetails.xml” .
Example : <position>debug</position>
This code to be added within the “<positions>’ tags.
Article name from article id in a module page – Joomla
<?php
$dVar=new JConfig();
mysql_connect($dVar->host,$dVar->user,$dVar->password);
mysql_select_db($dVar->db);
$articleResult = mysql_fetch_assoc(mysql_query(“SELECT * FROM “.$dVar->dbprefix.”content WHERE id='”.$_REQUEST[‘id’].”‘ “)) or die(mysql_error());
echo $articleName = $articleResult[‘title’]
?>
$dVar=new JConfig();
mysql_connect($dVar->host,$dVar->user,$dVar->password);
mysql_select_db($dVar->db);
$articleResult = mysql_fetch_assoc(mysql_query(“SELECT * FROM “.$dVar->dbprefix.”content WHERE id='”.$_REQUEST[‘id’].”‘ “)) or die(mysql_error());
echo $articleName = $articleResult[‘title’]
?>
How to check frontpage page or not – Joomla
<?php if(JRequest::getVar(‘view’) == “frontpage” ) { ?>
Home page
Home page
<?php } else { ?>
Inner Page
<?php }; ?>
How to check home page or not – Joomla
<?php
if(JRequest::getVar(‘view’) == ‘featured’ ) :
if(JRequest::getVar(‘view’) == ‘featured’ ) :
echo ‘ Home page’;
else :
echo ‘Inner page’;
endif;
?>