Control "nofollow" URLs

Control "nofollow" URLs 2.2.3

No permission to download
I might have been a bit hasty when I said that... I've had a think about it since and it MIGHT be possible.

It's just been a while since I got my head stuck in the code for this add-on so I can't remember. It might be a while still, before I can. But suggestions are noted, thank you.
 
I activated the plugin and chose a couple user groups and this is the server error I am getting. Looks like when people scroll from like 2nd page to a 3rd page within a thread it goes to internal server error.

Note I upgraded recently to 1.2.2.

Error:

Code:
ErrorException: Fatal Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1208029289 bytes) - library/ControlNoFollow/Listener.php:37
Generated By: Unknown Account, 45 minutes ago
Stack Trace

#0 [internal function]: XenForo_Application::handleFatalError('rel="nofollow"', '', '<div style="tex...')
#1 {main}

Request State

array(3) {
  ["url"] => string(92) "http://www.truckmountforums.com/threads/which-was-created-first-portable-or-truckmount.1713/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Really weird.

The particular code that it's struggling with is the code that disables nofollow for signatures. Do you need to disable nofollow in signatures?
 
Really weird.

The particular code that it's struggling with is the code that disables nofollow for signatures. Do you need to disable nofollow in signatures?
Yes, I need to have do-follow links for premium members/admin/mods in signatures and the rest no-follow in their sigs.
 
Chris Deeming updated Control "nofollow" URLs with a new update entry:

No longer supports changing "nofollow" in signatures

Recently a performance issue was reported related to the removal of nofollow from signatures.

This hasn't been reported before, so it may be related to another add-on or it may be some other underlying issue not related to any add-on.

But, as a precaution, this version removes that feature. This means in terms of signatures the behaviour reverts to the default which is all signatures will be nofollow.

On balance, as the default in XenForo is for signatures to be hidden from guests, having...

Read the rest of this update entry...
 
Yes, I need to have do-follow links for premium members/admin/mods in signatures and the rest no-follow in their sigs.
I have no solution for this, unfortunately, other than to not change nofollow for signatures.
 
I have no solution for this, unfortunately, other than to not change nofollow for signatures.
Dang, so I tell hundreds of the paying members that this cannot be done and have to return their $? Doesnt make sense, this is a high priority for me and willing to pay you to fix this issue. Ive been using your mod and previous one for quite some time now :/
 
If you have been using my add-on for some time, why has this only been a problem now? What has changed? The code is pretty simple, there's not a lot that can go wrong.
 
If you have been using my add-on for some time, why has this only been a problem now? What has changed? The code is pretty simple, there's not a lot that can go wrong.
I upgraded from 1.1.5 to 1.2.2 - it worked fine before with no server errors
 
I'm getting tons of errors since the last update, what could this be.
See example here:
PHP:
ErrorException: Fatal Error: Call to a member function __toString() on a non-object - library/ControlNoFollow/Listener.php:37
Gegenereerd Door: Onbekend Account, 15 minuten geleden
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Aanvraagstatus
array(3) {
  ["url"] => string(76) "http://www.relatieforum.net/threads/beste-gratis-bank-is-deutsche-bank.1398/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
It's down to add-on developers to make their add-ons compatible with mine, not the other way around.

It's as simple as setting the isTrusted flag on the content passed through the BB Code wrapper if the content owner is a member of the allowed groups. Here's a code example that worked for XenForo Resource Manager 1.1.x compatibility. Pretty simple really. The devs do not even have to extend my code, they would just set the isTrusted flag in an appropriate place.

PHP:
<?php

class ControlNoFollow_ViewPublic_Resource_Description extends XFCP_ControlNoFollow_ViewPublic_Resource_Description
{
    public function renderHtml()
    {
        $options = XenForo_Application::get('options');
        $bypass = $options->bypassNoFollow;

        if ($bypass)
        {
            $isMember = XenForo_Model::create('XenForo_Model_User')->isMemberOfUserGroup($this->_params['resource'], $bypass);

            if ($isMember)
            {
                $this->_params['update']['isTrusted'] = true;
            }
        }

        return parent::renderHtml();
    }
}
 
It's down to add-on developers to make their add-ons compatible with mine, not the other way around.

It's as simple as setting the isTrusted flag on the content passed through the BB Code wrapper if the content owner is a member of the allowed groups. Here's a code example that worked for XenForo Resource Manager 1.1.x compatibility. Pretty simple really. The devs do not even have to extend my code, they would just set the isTrusted flag in an appropriate place.

PHP:
<?php

class ControlNoFollow_ViewPublic_Resource_Description extends XFCP_ControlNoFollow_ViewPublic_Resource_Description
{
    public function renderHtml()
    {
        $options = XenForo_Application::get('options');
        $bypass = $options->bypassNoFollow;

        if ($bypass)
        {
            $isMember = XenForo_Model::create('XenForo_Model_User')->isMemberOfUserGroup($this->_params['resource'], $bypass);

            if ($isMember)
            {
                $this->_params['update']['isTrusted'] = true;
            }
        }

        return parent::renderHtml();
    }
}
Isn't your answer a little misleading? You say that it is up to the add-on developers to do this, but then you give an example of an add-on that you extended? Surely this is the best way?
 
Misleading? No not at all.

I gave an example of an official XenForo add-on (Resource Manager) that I extended. XenForo is hardly likely to integrate functionality from a third party add-on so there isn't really an option in this case.
 
For exactly the same reason that XenForo won't add it to their add-ons?

Personally I think it would be slightly better to put it in your add-on since it is a more specific add-on doing a very specific task, though I can see that there are arguments for both sides.
 
Top Bottom