Disallow links before x posts

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
User avatar
tumba25
Former Team Member
Posts: 4430
Joined: Wed Jun 06, 2007 6:42 am
Location: Kokkola, Finland.
Name: Jari Kanerva
Contact:

Re: Disallow links before x posts

Post by tumba25 »

The goal was just to make those links not clickable. It might be a idea for a switch in ACP to do that.
Need a mod/extension created/installed, other custom-coded solution or a server admin? https://tumba25.net
msi_333
Registered User
Posts: 46
Joined: Tue Apr 03, 2007 9:29 pm
Contact:

Re: Disallow links before x posts

Post by msi_333 »

First of all thanks alot for this mod , we really need it .
i have installed this mod on phpbb3 .0.3 . and i have the following problems , .
users can still use [ur] when it include text , and they still can use , http... without thier url bbcodes , but it appears as text which is fine , but how to stop this and tell users u can post a link when you reach X posts .

thanks

please help me .
kimforster
Registered User
Posts: 78
Joined: Wed Aug 26, 2009 8:52 am

Re: Disallow links before x posts

Post by kimforster »

I am having problems with this MOD. It has installed successfully & I can edit the number of posts before members can post links in the post settings.

The problem is that it isn't working. My new members are still able to post links & when I go to the MOD & click on 'available changes' & try to submit the changes to any of my templates I get this:
Error:Duplicate entry 'links_after_num_posts' for key 1
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('links_after_num_posts', '0', '0')
I'm not sure what I've missed here???
I'm not so brilliant so please go easy on me :) I WILL ask stupid questions if I don't know the answer & will not apologise for this. I ask for an obvious reason :)
User avatar
tumba25
Former Team Member
Posts: 4430
Joined: Wed Jun 06, 2007 6:42 am
Location: Kokkola, Finland.
Name: Jari Kanerva
Contact:

Re: Disallow links before x posts

Post by tumba25 »

kimforster wrote:when I go to the MOD & click on 'available changes'
? You mean in ACP and AutoMOD? You are trying to reinstall the MOD. That won't work. Seems that you have missed some php edits.
msi_333 wrote:it appears as text
Links are supposed to appear as text. They are not meant to disappear, just to not be clickable.
Need a mod/extension created/installed, other custom-coded solution or a server admin? https://tumba25.net
kimforster
Registered User
Posts: 78
Joined: Wed Aug 26, 2009 8:52 am

Re: Disallow links before x posts

Post by kimforster »

tumba25 wrote:
kimforster wrote:when I go to the MOD & click on 'available changes'
? You mean in ACP and AutoMOD? You are trying to reinstall the MOD. That won't work. Seems that you have missed some php edits.
msi_333 wrote:it appears as text
Links are supposed to appear as text. They are not meant to disappear, just to not be clickable.
No I'm not trying to re install the mod, according to the install it was done successfully but it won't work. So I should uninstall & reinstall then?
I'm not so brilliant so please go easy on me :) I WILL ask stupid questions if I don't know the answer & will not apologise for this. I ask for an obvious reason :)
User avatar
tumba25
Former Team Member
Posts: 4430
Joined: Wed Jun 06, 2007 6:42 am
Location: Kokkola, Finland.
Name: Jari Kanerva
Contact:

Re: Disallow links before x posts

Post by tumba25 »

kimforster wrote:when I go to the MOD & click on 'available changes'
Where do you do that? This MOD do not have a 'available changes' link.
Need a mod/extension created/installed, other custom-coded solution or a server admin? https://tumba25.net
kimforster
Registered User
Posts: 78
Joined: Wed Aug 26, 2009 8:52 am

Re: Disallow links before x posts

Post by kimforster »

In the ACP, AUTOMOD, click on 'details' of disallow links before x post.

At the bottom of that page is 'Available Changes',
'Apply these changes' (choice of prosilver or subsilver2) 'To this Template' (list of templates I have installed).
I'm not so brilliant so please go easy on me :) I WILL ask stupid questions if I don't know the answer & will not apologise for this. I ask for an obvious reason :)
User avatar
tumba25
Former Team Member
Posts: 4430
Joined: Wed Jun 06, 2007 6:42 am
Location: Kokkola, Finland.
Name: Jari Kanerva
Contact:

Re: Disallow links before x posts

Post by tumba25 »

The AutoMOD tab is for installing or removing the MOD. It seems like you are trying to reinstall the MOD. The error you get

Code: Select all

Error:Duplicate entry 'links_after_num_posts' for key 1
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('links_after_num_posts', '0', '0')
tells us that you are trying to insert a config_name that already exists in your config table.

This might be a AutoMOD error, but it's not a error within this MOD. This MOD have no template changes.
Need a mod/extension created/installed, other custom-coded solution or a server admin? https://tumba25.net
kimforster
Registered User
Posts: 78
Joined: Wed Aug 26, 2009 8:52 am

Re: Disallow links before x posts

Post by kimforster »

Thanks for that

How could I find out? 99% of other mods are installing & working fine in the automod. When I installed the automod everything went very smoothly.
I'm not so brilliant so please go easy on me :) I WILL ask stupid questions if I don't know the answer & will not apologise for this. I ask for an obvious reason :)
msi_333
Registered User
Posts: 46
Joined: Tue Apr 03, 2007 9:29 pm
Contact:

Re: Disallow links before x posts

Post by msi_333 »

Is there anyway to show an message when user still have # posts less than the configuared for example :
"You can't posts a link , your posts should exceeds X posts " .

And he then should remove the link in his topic , , not just appear as a text . . .
nampa
Registered User
Posts: 19
Joined: Sun Nov 10, 2002 10:07 pm

Re: Disallow links before x posts

Post by nampa »

I second the suggestion of PinoyEngine.
I think it would be great to add a time feature.
So, that we can select X number of posts and Y number of days.

The reason is that a human spammer can post x number of posts in an hour.
And then can start posting spam.
Now, if we make them wait 1 month. This gives the moderators enough time to find out the offending posts, and ban the user.
nasadows
Registered User
Posts: 119
Joined: Wed Mar 25, 2009 3:49 am

Re: Disallow links before x posts

Post by nasadows »

When a user submit a url tag, the post page just refreshes. Is that normal?

T thought this mod gives an error message or automatically removes the link from the list or something. Simply refreshing the page with no error messages may be confusing to users
todo1
Registered User
Posts: 2
Joined: Sat Nov 07, 2009 5:29 pm

Re: Disallow links before x posts

Post by todo1 »

Hello, I'm trying to install this MOD, because there is a lot of spam in my new forum, but when i upload the manually edited file message_parser.php the result is blank page when i press "New topic" or "Topic reply" buttons in my forum. I'm using PHPBB3 3.0.5. What encoding i must use for the .php files that has been modified?
This is the code of the edited lines in the four files that I changed following the manual:

message_parser.php:

Code: Select all

* Parse Message
	*/
	function parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post')
		global $forum_id, $auth;
		$allow_url_bbcode = ($user->data['user_posts'] >= $config['links_after_num_posts'] || $auth->acl_get('m_', $forum_id)) ? $allow_url_bbcode : false;
	{
		global $config, $db, $user;

		$mode = ($mode != 'post') ? 'sig' : 'post';

Code: Select all

// Parse URL's
		if ($allow_magic_url && ($user->data['user_posts'] >= $config['links_after_num_posts'] || $auth->acl_get('m_', $forum_id)))
		{
			$this->magic_url(generate_board_url());

			if ($config['max_' . $mode . '_urls'])
			{
				$num_urls += preg_match_all('#\<!-- ([lmwe]) --\>.*?\<!-- \1 --\>#', $this->message, $matches);
posting.php:

Code: Select all

// HTML, BBCode, Smilies, Images and Flash status
$bbcode_status	= ($config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id)) ? true : false;
$smilies_status	= ($bbcode_status && $config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id)) ? true : false;
$img_status		= ($bbcode_status && $auth->acl_get('f_img', $forum_id)) ? true : false;
$url_status		= ($config['allow_post_links'] && ($user->data['user_posts'] >= $config['links_after_num_posts'] || $auth->acl_get('m_', $forum_id))) ? true : false;
$flash_status	= ($bbcode_status && $auth->acl_get('f_flash', $forum_id) && $config['allow_post_flash']) ? true : false;
$quote_status	= ($auth->acl_get('f_reply', $forum_id)) ? true : false;
includes/acp/acp_board.php:

Code: Select all

			case 'post':
				$display_vars = array(
					'title'	=> 'ACP_POST_SETTINGS',
					'vars'	=> array(
						'legend1'				=> 'GENERAL_OPTIONS',
						'allow_topic_notify'	=> array('lang' => 'ALLOW_TOPIC_NOTIFY',	'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => false),
						'allow_forum_notify'	=> array('lang' => 'ALLOW_FORUM_NOTIFY',	'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => false),
						'allow_bbcode'			=> array('lang' => 'ALLOW_BBCODE',			'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => false),
						'allow_post_flash'		=> array('lang' => 'ALLOW_POST_FLASH',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),
						'allow_smilies'			=> array('lang' => 'ALLOW_SMILIES',			'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => false),
						'allow_post_links'		=> array('lang' => 'ALLOW_POST_LINKS',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),
						'links_after_num_posts'	=> array('lang' => 'LINKS_AFTER_NUM_POSTS', 'validate' => 'int:0',	'type' => 'text:4:4', 'explain' => true),
						'allow_nocensors'		=> array('lang' => 'ALLOW_NO_CENSORS',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),
						'allow_bookmarks'		=> array('lang' => 'ALLOW_BOOKMARKS',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),
						'enable_post_confirm'	=> array('lang' => 'VISUAL_CONFIRM_POST',	'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),

						'legend2'				=> 'POSTING',
						'enable_queue_trigger'	=> array('lang' => 'ENABLE_QUEUE_TRIGGER',	'validate' => 'bool',		'type' => 'radio:yes_no', 'explain' => true),
						'queue_trigger_posts'	=> array('lang' => 'QUEUE_TRIGGER_POSTS',	'validate' => 'int:0:250',	'type' => 'text:4:4', 'explain' => true),
						'bump_type'				=> false,
						'edit_time'				=> array('lang' => 'EDIT_TIME',				'validate' => 'int:0',		'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
						'display_last_edited'	=> array('lang' => 'DISPLAY_LAST_EDITED',	'validate' => 'bool',		'type' => 'radio:yes_no', 'explain' => true),
						'flood_interval'		=> array('lang' => 'FLOOD_INTERVAL',		'validate' => 'int:0',		'type' => 'text:3:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
						'bump_interval'			=> array('lang' => 'BUMP_INTERVAL',			'validate' => 'int:0',		'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
						'topics_per_page'		=> array('lang' => 'TOPICS_PER_PAGE',		'validate' => 'int:1',		'type' => 'text:3:4', 'explain' => false),
						'posts_per_page'		=> array('lang' => 'POSTS_PER_PAGE',		'validate' => 'int:1',		'type' => 'text:3:4', 'explain' => false),
						'hot_threshold'			=> array('lang' => 'HOT_THRESHOLD',			'validate' => 'int:0',		'type' => 'text:3:4', 'explain' => true),
						'max_poll_options'		=> array('lang' => 'MAX_POLL_OPTIONS',		'validate' => 'int:2:127',	'type' => 'text:4:4', 'explain' => false),
						'max_post_chars'		=> array('lang' => 'CHAR_LIMIT',			'validate' => 'int:0',		'type' => 'text:4:6', 'explain' => true),
						'max_post_smilies'		=> array('lang' => 'SMILIES_LIMIT',			'validate' => 'int:0',		'type' => 'text:4:4', 'explain' => true),
						'max_post_urls'			=> array('lang' => 'MAX_POST_URLS',			'validate' => 'int:0',		'type' => 'text:5:4', 'explain' => true),
						'max_post_font_size'	=> array('lang' => 'MAX_POST_FONT_SIZE',	'validate' => 'int:0',		'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
						'max_quote_depth'		=> array('lang' => 'QUOTE_DEPTH_LIMIT',		'validate' => 'int:0',		'type' => 'text:4:4', 'explain' => true),
						'max_post_img_width'	=> array('lang' => 'MAX_POST_IMG_WIDTH',	'validate' => 'int:0',		'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
						'max_post_img_height'	=> array('lang' => 'MAX_POST_IMG_HEIGHT',	'validate' => 'int:0',		'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
					)
				);
			break;
language/en/acp/board.php

Code: Select all

	'SMILIES_LIMIT'					=> 'Maximum smilies per post',
	'SMILIES_LIMIT_EXPLAIN'			=> 'Maximum number of smilies in a post. Set to 0 for unlimited smilies.',
	'TOPICS_PER_PAGE'				=> 'Topics per page',
	'LINKS_AFTER_NUM_POSTS' => 'Min post count before posting links',
	'LINKS_AFTER_NUM_POSTS_EXPLAIN' => 'Users will need this number of posts before they are able to use the [URL] BBCode tag and automatic/magic URLs.',
));
Sorry for this long post, but I really need a MOD like this to fight against the spammers.
Thanks in advance!
P.S. My forum is in bulgarian language, but the spammers use the english interface.
Excuse my english please!
User avatar
tumba25
Former Team Member
Posts: 4430
Joined: Wed Jun 06, 2007 6:42 am
Location: Kokkola, Finland.
Name: Jari Kanerva
Contact:

Re: Disallow links before x posts

Post by tumba25 »

Hi. All files should be saved as UTF-8 without BOM.

Your first example should be

Code: Select all

* Parse Message
   */
   function parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post')
   {
      global $forum_id, $auth;
      $allow_url_bbcode = ($user->data['user_posts'] >= $config['links_after_num_posts'] || $auth->acl_get('m_', $forum_id)) ? $allow_url_bbcode : false;
      global $config, $db, $user;

      $mode = ($mode != 'post') ? 'sig' : 'post';
Note that I moved the { sign.
Need a mod/extension created/installed, other custom-coded solution or a server admin? https://tumba25.net
todo1
Registered User
Posts: 2
Joined: Sat Nov 07, 2009 5:29 pm

Re: Disallow links before x posts

Post by todo1 »

Thank you for the quick response. It's working now!
Locked

Return to “[3.0.x] MOD Database Releases”