Knowledge Base - How to Remove Powered By Kunena in the Footer

How to Remove Powered By Kunena in the Footer, v4, v5, v6.

Kunena 6.x.x

Now Open: Display.php

Located here: libraries/kunena/src/Controller/Application/

Goto Line: 345

Change this:

if ($this->config->get('credits', 1))

To this:

if ($this->config->get('credits', 0))

Or you can copy and paste the code below and put it in a file in the main root directory. Each time Kunena is updated you can run this file.

<?php

// File path
$file_path = $_SERVER['DOCUMENT_ROOT'] . '/libraries/kunena/src/Controller/Application/Display.php';

// Read the content of the file
$file_content = file_get_contents($file_path);

// Replace the target string
$new_content = str_replace(
    "get('credits', 1)",
    "get('credits', 0)",
    $file_content
);

// Write the modified content back to the file
file_put_contents($file_path, $new_content);

echo "Replacement completed successfully.";
?>

======================================

Kunena 5.x.x


Now Open: display.php

Located here: /libraries/kunena/controller/application/

Goto Line: 384

Change this:

if ($this->config->get('credits', 1))

To this:

if ($this->config->get('credits', 0))

OR You Can Do This:

Delete this:

if ($this->config->get('credits', 1))
{
$this->output->appendAfter($this->poweredBy());

======================================

Kunena 4.x.x

Open: view.php

Located here: /libraries/kunena/

Goto Line: 729

You will see this:

final public function poweredBy()
{
if ($this->inLayout)
{
throw new LogicException(sprintf('HMVC template should not call %s::%s()', __CLASS__, __FUNCTION__));
}

$credits = '<div style="text-align:center">';
$credits .= JHtml::_('kunenaforum.link', 'index.php?option=com_kunena&view=credits', JText::_('COM_KUNENA_POWEREDBY'), '', '', 'follow', array('style'=>'display: inline; visibility: visible; text-decoration: none;'));
$credits .= ' <a href="https://www.kunena.org" rel="follow" target="_blank" style="display: inline; visibility: visible; text-decoration: none;">'.JText::_('COM_KUNENA').'</a>';

if ($this->ktemplate->params->get('templatebyText'))
{
$credits .= ' :: <a href ="'. $this->ktemplate->params->get('templatebyLink').'" rel="follow" target="_blank" style="text-decoration: none;">' . $this->ktemplate->params->get('templatebyText') .' '. $this->ktemplate->params->get('templatebyName') .'</a>';
}

$credits .= '</div>';

echo $credits;
}

 

Delete the LINES below in YELLOW:

final public function poweredBy()
{
if ($this->inLayout)
{
throw new LogicException(sprintf('HMVC template should not call %s::%s()', __CLASS__, __FUNCTION__));
}

$credits = '<div style="text-align:center">';
$credits .= JHtml::_('kunenaforum.link', 'index.php?option=com_kunena&view=credits', JText::_('COM_KUNENA_POWEREDBY'), '', '', 'follow', array('style'=>'display: inline; visibility: visible; text-decoration: none;'));
$credits .= ' <a href="https://www.kunena.org" rel="follow" target="_blank" style="display: inline; visibility: visible; text-decoration: none;">'.JText::_('COM_KUNENA').'</a>';

if ($this->ktemplate->params->get('templatebyText'))
{
$credits .= ' :: <a href ="'. $this->ktemplate->params->get('templatebyLink').'" rel="follow" target="_blank" style="text-decoration: none;">' . $this->ktemplate->params->get('templatebyText') .' '. $this->ktemplate->params->get('templatebyName') .'</a>';
}

$credits .= '</div>';

echo $credits;
}

 

=====================================

We Are Not Done Just Yet!

=====================================

 

Now Open: display.php

Located here: /libraries/kunena/controller/application/

Goto Line: 274

You will see this:

final public function poweredBy()
{
$templateText = (string) $this->template->params->get('templatebyText');
$templateName = (string) $this->template->params->get('templatebyName');
$templateLink = (string) $this->template->params->get('templatebyLink');
$credits = '<div style="text-align:center">';
$credits .= JHtml::_('kunenaforum.link', 'index.php?option=com_kunena&view=credits',
JText::_('COM_KUNENA_POWEREDBY'), '', '', 'follow',
array('style'=>'display: inline; visibility: visible; text-decoration: none;'));
$credits .= ' <a href="https://www.kunena.org" rel="follow"
target="_blank" style="display: inline; visibility: visible; text-decoration: none;">'
. JText::_('COM_KUNENA').'</a>';
if (trim($templateText)) {
$credits .= ' :: <a href ="'. $templateLink. '" rel="follow" target="_blank" style="text-decoration: none;">'
. $templateText .' '. $templateName .'</a>';
}
$credits .= '</div>';

return $credits;
}

 

Delete the LINES below in YELLOW:

final public function poweredBy()
{
$templateText = (string) $this->template->params->get('templatebyText');
$templateName = (string) $this->template->params->get('templatebyName');
$templateLink = (string) $this->template->params->get('templatebyLink');
$credits = '<div style="text-align:center">';
$credits .= JHtml::_('kunenaforum.link', 'index.php?option=com_kunena&view=credits',
JText::_('COM_KUNENA_POWEREDBY'), '', '', 'follow',
array('style'=>'display: inline; visibility: visible; text-decoration: none;'));
$credits .= ' <a href="https://www.kunena.org" rel="follow"
target="_blank" style="display: inline; visibility: visible; text-decoration: none;">'
. JText::_('COM_KUNENA').'</a>';
if (trim($templateText)) {
$credits .= ' :: <a href ="'. $templateLink. '" rel="follow" target="_blank" style="text-decoration: none;">'
. $templateText .' '. $templateName .'</a>';
}
$credits .= '</div>';

return $credits;
}

 

Now SAVE the file!

That's All!

 

Details

Created : 2017-08-04 18:50:23, Last Modified : 2024-02-19 19:25:26