Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 05/09/2017 BIG Autumn SALE

    Use AUTUMN17 coupon code to buy our WordPress or Joomla! extensions with 25% discount. Hurry up! The offer is valid till 11 September.

  • 14/04/2017 Happy Easter

    Wish a Happy Easter and give 30% discount for all our WordPress and Joomla! extensions. Use EASTER17 coupon code. The offer is valid till 17 April.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

How We Can Add Meta Robots? It is easy?
(1 viewing) (1) Guest
ARI Quiz Lite
Go to bottomPage: 1
TOPIC: How We Can Add Meta Robots? It is easy?
*
#40982
How We Can Add Meta Robots? It is easy? 4 Years, 5 Months ago Karma: 0
Is there a way to add the Meta Robots inside the extension?

I just check the Noindex plus follow inside the Menu Item I create from this component but it is not working.

Is there a way to fix this?

Code:

<meta name="robots" content="noindex, follow" />
The administrator has disabled public write access.
 
#40984
Re:How We Can Add Meta Robots? It is easy? 4 Years, 5 Months ago Karma: 666
Hello,

Open <joomla_directory>\administrator\components\com_ariquizlite\kernel\Web\class.UserQuizPageBase.php file and add the following code to "_init" method:

Code:


$app = JFactory::getApplication();
$params = $app->getParams();
if ($params)
{
$robots = $params->get('robots');
if ($robots)
{
$doc = JFactory::getDocument();
$doc->setMetadata('robots', $robots);
}
}



Regards,
ARI Soft
The administrator has disabled public write access.
 
#40988
Re:How We Can Add Meta Robots? It is easy? 4 Years, 5 Months ago Karma: 0
Thanks it does works.

Great support, I soon will send you some traffic from my Joomla Database users, so they can check your extensions.

To apply the changes I just did this.

I change this around line 43 or so:


Code:

function _init()
{
global $Itemid;
$this->_resultController = new AriQuizResultController();
$this->_quizController = new AriQuizController();
$this->addVar('Itemid', $Itemid);
parent::_init();
}



To this

Code:


function _init()
{
global $Itemid;
$this->_resultController = new AriQuizResultController();
$this->_quizController = new AriQuizController();
$this->addVar('Itemid', $Itemid);
parent::_init();
$app = JFactory::getApplication();
$params = $app->getParams();
if ($params)
{
$robots = $params->get('robots');
if ($robots)
{
$doc = JFactory::getDocument();
$doc->setMetadata('robots', $robots);
}

The administrator has disabled public write access.
 
Go to topPage: 1