xF2 Add-on how to remove licence info / branding from addon

rigarus99

Well-known member
Registered
Joined
Sep 13, 2021
Messages
192
Points
53

Reputation:

hi i have the DragonByte Credits addon version 5.8.0b2 (buyd licence /didnt give them information about my url) and i dont wanna install it on my page because im afraid of be tracked down from the devs.

I read an thread where someone say that also xenforo can track there addons so maybe they can track too ? :/


i really really need that version installed. And i want to know how that works also for future addons in case i buy one.
But for now i just wanna know how it works for that specific addon.

notepad++ or visual basics / studio i think, but what exactly is needet to be edited ?
 

SNap!

Collaborate
Collaborate
Registered
Joined
Mar 17, 2022
Messages
560
Points
253

Reputation:

2 options avaible to remove

1.

src\addons\DBTech\Credits\Template\Callback\Copyright.php

PHP:
<?php

namespace DBTech\Credits\Template\Callback;

class Copyright
{
    /**
     * @return string
     */
    public static function getCopyrightText(): string
    {
        /** @var \XF\App $app */
        $app = \XF::app();
        
        $branding = $app->offsetExists('dbtech_branding') ? $app->dbtech_branding : [];
        
        if (!count($branding) OR !is_array($branding))
        {
            // We had nothing left, another DBTech mod would have done it
            return '';
        }
        
        $brandingVariables = [
            'utm_source'         => str_replace('www.', '', htmlspecialchars(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'CLI')),
            'utm_content'         => 'footer',
        ];
        
        // Create this long string
        $html = '<div>
            Parts of this site powered by <a class="u-concealed" rel="nofollow noopener" href="https://www.dragonbyte-tech.com/store/categories/xenforo.5/?utm_source=' . $brandingVariables['utm_source'] . '&utm_campaign=site&utm_medium=footer&utm_content=' . $brandingVariables['utm_content'] . '" target="_blank">XenForo add-ons from DragonByte&#8482;</a>
            &copy;2011-' . date('Y') . ' <a class="u-concealed" rel="nofollow noopener" href="https://www.dragonbyte-tech.com/?utm_source=' . $brandingVariables['utm_source'] . '&utm_campaign=site&utm_medium=footer&utm_content=' . $brandingVariables['utm_content'] . '" target="_blank">DragonByte Technologies Ltd.</a>
            (<a class="u-concealed" rel="nofollow noopener" href="https://www.dragonbyte-tech.com/store/details/?products=' . implode(',', $branding) . '&utm_source=' . $brandingVariables['utm_source'] . '&utm_campaign=product&utm_medium=footer&utm_content=' . $brandingVariables['utm_content'] . '" target="_blank">Details</a>)
        </div>';
        
        // Make sure we null this out
        $app->dbtech_branding = [];
        
        return $html;
    }
}

replace with

Code:
<?php

namespace DBTech\Credits\Template\Callback;

class Copyright
{
    /**
     * @return string
     */
    public static function getCopyrightText(): string
    {
        /** @var \XF\App $app */
        $app = \XF::app();
        
        $branding = $app->offsetExists('dbtech_branding') ? $app->dbtech_branding : [];
        
        if (!count($branding) OR !is_array($branding))
        {
            // We had nothing left, another DBTech mod would have done it
            return '';
        }
        
        $brandingVariables = [
            'utm_source'         => str_replace('www.', '', htmlspecialchars(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'CLI')),
            'utm_content'         => 'footer',
        ];
        
        // Create this long string
        $html = '';
        
        // Make sure we null this out
        $app->dbtech_branding = [];
        
        return $html;
    }
}

2.

src\addons\DBTech\Credits\_data\template_modifications.xml

PHP:
  <modification type="public" template="PAGE_CONTAINER" modification_key="dbtech_security_copyright_footer_display" description="Copyright Footer" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<xf:copyright />]]></find>
    <replace><![CDATA[$0
                <xf:callback class="DBTech\Credits\Template\Callback\Copyright" method="getCopyrightText"></xf:callback>]]></replace>
  </modification>

remove this line.

Rebuild addon
 

rigarus99

Well-known member
Registered
Joined
Sep 13, 2021
Messages
192
Points
53

Reputation:

2 options avaible to remove

1.

src\addons\DBTech\Credits\Template\Callback\Copyright.php

PHP:
<?php

namespace DBTech\Credits\Template\Callback;

class Copyright
{
    /**
     * @return string
     */
    public static function getCopyrightText(): string
    {
        /** @var \XF\App $app */
        $app = \XF::app();
        
        $branding = $app->offsetExists('dbtech_branding') ? $app->dbtech_branding : [];
        
        if (!count($branding) OR !is_array($branding))
        {
            // We had nothing left, another DBTech mod would have done it
            return '';
        }
        
        $brandingVariables = [
            'utm_source'         => str_replace('www.', '', htmlspecialchars(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'CLI')),
            'utm_content'         => 'footer',
        ];
        
        // Create this long string
        $html = '<div>
            Parts of this site powered by <a class="u-concealed" rel="nofollow noopener" href="https://www.dragonbyte-tech.com/store/categories/xenforo.5/?utm_source=' . $brandingVariables['utm_source'] . '&utm_campaign=site&utm_medium=footer&utm_content=' . $brandingVariables['utm_content'] . '" target="_blank">XenForo add-ons from DragonByte&#8482;</a>
            &copy;2011-' . date('Y') . ' <a class="u-concealed" rel="nofollow noopener" href="https://www.dragonbyte-tech.com/?utm_source=' . $brandingVariables['utm_source'] . '&utm_campaign=site&utm_medium=footer&utm_content=' . $brandingVariables['utm_content'] . '" target="_blank">DragonByte Technologies Ltd.</a>
            (<a class="u-concealed" rel="nofollow noopener" href="https://www.dragonbyte-tech.com/store/details/?products=' . implode(',', $branding) . '&utm_source=' . $brandingVariables['utm_source'] . '&utm_campaign=product&utm_medium=footer&utm_content=' . $brandingVariables['utm_content'] . '" target="_blank">Details</a>)
        </div>';
        
        // Make sure we null this out
        $app->dbtech_branding = [];
        
        return $html;
    }
}

replace with

Code:
<?php

namespace DBTech\Credits\Template\Callback;

class Copyright
{
    /**
     * @return string
     */
    public static function getCopyrightText(): string
    {
        /** @var \XF\App $app */
        $app = \XF::app();
        
        $branding = $app->offsetExists('dbtech_branding') ? $app->dbtech_branding : [];
        
        if (!count($branding) OR !is_array($branding))
        {
            // We had nothing left, another DBTech mod would have done it
            return '';
        }
        
        $brandingVariables = [
            'utm_source'         => str_replace('www.', '', htmlspecialchars(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'CLI')),
            'utm_content'         => 'footer',
        ];
        
        // Create this long string
        $html = '';
        
        // Make sure we null this out
        $app->dbtech_branding = [];
        
        return $html;
    }
}

2.

src\addons\DBTech\Credits\_data\template_modifications.xml

PHP:
  <modification type="public" template="PAGE_CONTAINER" modification_key="dbtech_security_copyright_footer_display" description="Copyright Footer" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<xf:copyright />]]></find>
    <replace><![CDATA[$0
                <xf:callback class="DBTech\Credits\Template\Callback\Copyright" method="getCopyrightText"></xf:callback>]]></replace>
  </modification>

remove this line.

Rebuild addon
SNap!Thanks for your help !
really appreciate that effort
 

rigarus99

Well-known member
Registered
Joined
Sep 13, 2021
Messages
192
Points
53

Reputation:

2 options avaible to remove

1.

src\addons\DBTech\Credits\Template\Callback\Copyright.php

PHP:
<?php

namespace DBTech\Credits\Template\Callback;

class Copyright
{
    /**
     * @return string
     */
    public static function getCopyrightText(): string
    {
        /** @var \XF\App $app */
        $app = \XF::app();
        
        $branding = $app->offsetExists('dbtech_branding') ? $app->dbtech_branding : [];
        
        if (!count($branding) OR !is_array($branding))
        {
            // We had nothing left, another DBTech mod would have done it
            return '';
        }
        
        $brandingVariables = [
            'utm_source'         => str_replace('www.', '', htmlspecialchars(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'CLI')),
            'utm_content'         => 'footer',
        ];
        
        // Create this long string
        $html = '<div>
            Parts of this site powered by <a class="u-concealed" rel="nofollow noopener" href="https://www.dragonbyte-tech.com/store/categories/xenforo.5/?utm_source=' . $brandingVariables['utm_source'] . '&utm_campaign=site&utm_medium=footer&utm_content=' . $brandingVariables['utm_content'] . '" target="_blank">XenForo add-ons from DragonByte&#8482;</a>
            &copy;2011-' . date('Y') . ' <a class="u-concealed" rel="nofollow noopener" href="https://www.dragonbyte-tech.com/?utm_source=' . $brandingVariables['utm_source'] . '&utm_campaign=site&utm_medium=footer&utm_content=' . $brandingVariables['utm_content'] . '" target="_blank">DragonByte Technologies Ltd.</a>
            (<a class="u-concealed" rel="nofollow noopener" href="https://www.dragonbyte-tech.com/store/details/?products=' . implode(',', $branding) . '&utm_source=' . $brandingVariables['utm_source'] . '&utm_campaign=product&utm_medium=footer&utm_content=' . $brandingVariables['utm_content'] . '" target="_blank">Details</a>)
        </div>';
        
        // Make sure we null this out
        $app->dbtech_branding = [];
        
        return $html;
    }
}

replace with

Code:
<?php

namespace DBTech\Credits\Template\Callback;

class Copyright
{
    /**
     * @return string
     */
    public static function getCopyrightText(): string
    {
        /** @var \XF\App $app */
        $app = \XF::app();
        
        $branding = $app->offsetExists('dbtech_branding') ? $app->dbtech_branding : [];
        
        if (!count($branding) OR !is_array($branding))
        {
            // We had nothing left, another DBTech mod would have done it
            return '';
        }
        
        $brandingVariables = [
            'utm_source'         => str_replace('www.', '', htmlspecialchars(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'CLI')),
            'utm_content'         => 'footer',
        ];
        
        // Create this long string
        $html = '';
        
        // Make sure we null this out
        $app->dbtech_branding = [];
        
        return $html;
    }
}

2.

src\addons\DBTech\Credits\_data\template_modifications.xml

PHP:
  <modification type="public" template="PAGE_CONTAINER" modification_key="dbtech_security_copyright_footer_display" description="Copyright Footer" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<xf:copyright />]]></find>
    <replace><![CDATA[$0
                <xf:callback class="DBTech\Credits\Template\Callback\Copyright" method="getCopyrightText"></xf:callback>]]></replace>
  </modification>

remove this line.

Rebuild addon
SNap!Okay i have finished your first method.
very very easy. thanks again for your help !
But i have one last question.

Can you explain me why i need to rebuild the addon ?
Does this have to be done so that the addon notices and accepts the changes in xenforo?
 

SNap!

Collaborate
Collaborate
Registered
Joined
Mar 17, 2022
Messages
560
Points
253

Reputation:

Okay i have finished your first method.
very very easy. thanks again for your help !
But i have one last question.

Can you explain me why i need to rebuild the addon ?
Does this have to be done so that the addon notices and accepts the changes in xenforo?
rigarus99must be rebuild on method 2 to overwrite template_modifications.xml on installed Template
 
Last edited:

thomsa

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Jun 22, 2019
Messages
1,160
Points
173

Reputation:

hi i have the DragonByte Credits addon version 5.8.0b2 (buyd licence /didnt give them information about my url) and i dont wanna install it on my page because im afraid of be tracked down from the devs.

I read an thread where someone say that also xenforo can track there addons so maybe they can track too ? :/


i really really need that version installed. And i want to know how that works also for future addons in case i buy one.
But for now i just wanna know how it works for that specific addon.

notepad++ or visual basics / studio i think, but what exactly is needet to be edited ?
rigarus99use this

2022-06-16_14-58-39.jpg
 
View previous replies…

rigarus99

Well-known member
Registered
Joined
Sep 13, 2021
Messages
192
Points
53

Reputation:

thomsaOkay so now i tryd your method and this is not working for me.
System or addon wont let me disable it :/ idk why

Dragonbyte-TEMPLATE.png

Console says BLOCKET BY CLIENT
What does that mean exactly and why do i have no chance to turn that off ? wtf ^^
 
View previous replies…

thomsa

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Jun 22, 2019
Messages
1,160
Points
173

Reputation:

Okay so now i tryd your method and this is not working for me.
System or addon wont let me disable it :/ idk why

Dragonbyte-TEMPLATE.png

Console says BLOCKET BY CLIENT
What does that mean exactly and why do i have no chance to turn that off ? wtf ^^
rigarus99u edit file ?
 

thomsa

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Jun 22, 2019
Messages
1,160
Points
173

Reputation:

no, not at first but after i noticed that i cant turn that off i edit the copyright file

src\addons\DBTech\Credits\Template\Callback\Copyright.php
rigarus99use original file and uninstal & reinstall it.
 
Top