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


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


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? 11 Years, 7 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? 11 Years, 7 Months ago Karma: 760
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? 11 Years, 7 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