• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

ragtek Advanced Link Permissions and Linkchecker

R

ragtek

Guest
#1
1. thx to borbole who "allowed" me to implement & release my own version of this
2. thx to king kovifor and his bb code tutorial which gave me the idea for this

This add-on allows you disallow links in posts & signatures on a usergroup or forum basis. (this will work only for NEW posts and new signature changes, if somebody have already a link in his signature, it will stay until somebody deletes it;)
forum perm.PNG
sig perm.PNG
Also you're able to activate a option, which checks, if the linked pages exist.
If they don't exist, the link will be shown as a plain text instead of an link. www.ragtek.org/xenforo
(It's disabled by default, because this COULD be a heavy operation
On my netbook it takes several seconds to check 20 links, on the webserver it's very fast...)

option.PNG

Planned Features for the gold version:
Link Limit (you'll be able to set how many links you want to allow in the posts & signature)

Attention, this is ATM not a gold version!
I've tested it only on several test boards.

After the installation, check & set all the new permissions
 

Attachments

Sadik B

Well-known member
#2
This is brilliant... off to test on my test board. I unfortunately can't put this live until the post count based usergroup promotion feature comes in, as I want to allow people to post links after 10 posts...
 

dieketzer

Well-known member
#3
This is brilliant... off to test on my test board. I unfortunately can't put this live until the post count based usergroup promotion feature comes in, as I want to allow people to post links after 10 posts...
why not create a new trophy that is awarded when somebody posts ten posts, then use the trophy promotion addon to promote people to the new usergroup when they receive that trophy?
thats how i have been doing this sort of thing, and how i will be using this addon. the trophy promotion addon is rock solid and, in conjunction with this addon here, will do exactly what youre needing.
 

Sadik B

Well-known member
#6
Nice work ragtek, will this also work on Profile Messages & Private Conversations?
I am getting a lot of Profile SPAM, where people are creating accounts and posting links on other people's profiles. Looking forward to the next version.
 
R

ragtek

Guest
#10
Check in conversations is working and will be probably released today. (i need to finish my automatic tests for this)

ok it's too slow on my netbook, release will be delayed
 

dieketzer

Well-known member
#13
i just realised that this breaks user registrations.
after submitting the registration people are redirected to a failed register/register with an error 'you are not allowed to post links'.
 
R

ragtek

Guest
#14
i just realised that this breaks user registrations.
after submitting the registration people are redirected to a failed register/register with an error 'you are not allowed to post links'.
Hm, i can't confirm this:(

New users have a empty signature on registration, so this is really strange.
Do you have any add-on which sets a default signature or something similar?
 
R

ragtek

Guest
#19
got it:)

i bet you have installed NUNS and it creates an welcome post / welcome thread?;)

that's the problem
the user which is creating the welcome post/welcome thread have links in signature but my add-on is checking the permissions of the current user....:)

oh man, very bad mistake...
took me some time to reproduce it:D

if anybody needs a fix ASAP:

replace the complete content of ragtek\lc\dw\discussionmessage_post with
PHP:
class Ragtek_LC_DW_DiscussionMessage_Post extends
    XFCP_Ragtek_LC_DW_DiscussionMessage_Post
{
    protected function _checkMessageValidity()
    {
        parent::_checkMessageValidity();
        if (!self::OPTION_IS_AUTOMATED) {
            $message = $this->get('message');

            $thread = $this->getModelFromCache('XenForo_Model_Thread')->getThreadById($this->get('thread_id'));

            if (!$thread) {
                $nodeId = $this->getDiscussionDataWriter()->get('node_id');

            }
            else {
                $nodeId = $thread['node_id'];
            }

            $this->getModelFromCache('Ragtek_LC_Model')->checkPost($message, $nodeId, $error);

            if ($error != '') {
                $this->error($error, 'message');
            }
        }
    }
}
 
R

ragtek

Guest
#20
ok, there are several other problems with NUNS and this add-on

i recommend to stop using the link checker until (if:p ) i release a new version...