No links for newbies
Forum rules
In order the get any support, you will have to do following:
1. Use a describing title!
2. Describe your problem and what happened when the problem occured
3. Tell us what version of phpBB3 you are currently using.
Else your topic may be ignored or locked!
In order the get any support, you will have to do following:
1. Use a describing title!
2. Describe your problem and what happened when the problem occured
3. Tell us what version of phpBB3 you are currently using.
Else your topic may be ignored or locked!
No links for newbies
Would love to se the No links for newbies mod again
Re: No links for newbies
Who was the author of this script?
Re: No links for newbies
Hi,
it's the last version i have, but i don't know if there is one or more after this....
it's the last version i have, but i don't know if there is one or more after this....
Code: Select all
#
#------[ SQL ]------------------------------------------------
#
# Replace phpbb_ with your database's prefix.
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('link_days', '5');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('link_posts', '5');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_link_days', '5');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_link_posts', '5');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sig_link_days', '10');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sig_link_posts', '10');
#
#------[ OPEN ]-----------------------------------------------
#
posting.php
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
/**
* @ignore
*/
#
#------[ REPLACE WITH ]---------------------------------------
#
# Tip: Replace the preceding line(s) to find with the following lines.
#
/**
* @ignore
* --------------------------
* Installed Modifications :
* --------------------------
* -- mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ----------
*/
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
// Parse subject
if (!$preview && !$refresh && utf8_clean_string($post_data['post_subject']) === '' && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id)))
{
$error[] = $user->lang['EMPTY_SUBJECT'];
}
#
#------[ AFTER, ADD ]-----------------------------------------
#
# Tip: Add these lines on a new blank line after the preceding line(s) to find.
#
//-- add mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
if ( $user->data['user_posts'] < $config['link_posts'] || intval((time() - $user->data['user_regdate'])/86400) < $config['link_days'])
{
if( preg_match("/(\burl\b|http|\bwww\.|\.(com|fr|us|net|biz|info|org|ru|su)\b)/i",request_var('message', '', true)) )
{
$error[] = sprintf($user->lang['NO_LINKS'], $config['link_days'], $config['link_posts']);
}
}
//-- end add : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
#
#------[ OPEN ]-----------------------------------------------
#
includes/acp/acp_board.php
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
/**
* @ignore
*/
#
#------[ REPLACE WITH ]---------------------------------------
#
# Tip: Replace the preceding line(s) to find with the following lines.
#
/**
* @ignore
* --------------------------
* Installed Modifications :
* --------------------------
* -- mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ----------
*/
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
#
#------[ AFTER, ADD ]-----------------------------------------
#
# Tip: Add these lines on a new blank line after the preceding line(s) to find.
#
//-- add mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
'pm_link_days' => array('lang' => 'PM_LINK_DAYS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
'pm_link_posts' => array('lang' => 'PM_LINK_POSTS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
//-- end add : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
'allow_post_links' => array('lang' => 'ALLOW_POST_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
#
#------[ AFTER, ADD ]-----------------------------------------
#
# Tip: Add these lines on a new blank line after the preceding line(s) to find.
#
//-- add mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
'link_days' => array('lang' => 'LINK_DAYS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
'link_posts' => array('lang' => 'LINK_POSTS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
//-- end add : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
'allow_sig_links' => array('lang' => 'ALLOW_SIG_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
#
#------[ AFTER, ADD ]-----------------------------------------
#
# Tip: Add these lines on a new blank line after the preceding line(s) to find.
#
//-- add mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
'sig_link_days' => array('lang' => 'SIG_LINK_DAYS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
'sig_link_posts' => array('lang' => 'SIG_LINK_POSTS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
//-- end add : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
#
#------[ OPEN ]-----------------------------------------------
#
includes/ucp/ucp_pm_compose.php
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
/**
* @ignore
*/
#
#------[ REPLACE WITH ]---------------------------------------
#
# Tip: Replace the preceding line(s) to find with the following lines.
#
/**
* @ignore
* --------------------------
* Installed Modifications :
* --------------------------
* -- mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ----------
*/
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
if (utf8_clean_string($message) === '')
{
$error[] = $user->lang['TOO_FEW_CHARS'];
}
#
#------[ AFTER, ADD ]-----------------------------------------
#
# Tip: Add these lines on a new blank line after the preceding line(s) to find.
#
//-- add mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
if ( $user->data['user_posts'] < $config['pm_link_posts'] || intval((time() - $user->data['user_regdate'])/86400) < $config['pm_link_days'])
{
if( preg_match("/(\burl\b|http|\bwww\.|\.(com|fr|us|net|biz|info|org|ru|su)\b)/i",request_var('message', '', true)) )
{
$error[] = sprintf($user->lang['NO_PM_LINKS'], $config['pm_link_days'], $config['pm_link_posts']);
}
}
//-- end add : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
if (!sizeof($address_list))
{
$error[] = $user->lang['NO_RECIPIENT'];
}
#
#------[ AFTER, ADD ]-----------------------------------------
#
# Tip: Add these lines on a new blank line after the preceding line(s) to find.
#
//-- add mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
if ( $user->data['user_posts'] < $config['pm_link_posts'] || intval((time() - $user->data['user_regdate'])/86400) < $config['pm_link_days'])
{
if( preg_match("/(\burl\b|http|\bwww\.|\.(com|fr|us|net|biz|info|org|ru|su)\b)/i",request_var('message', '', true)) )
{
$error[] = sprintf($user->lang['NO_PM_LINKS'], $config['pm_link_days'], $config['pm_link_posts']);
}
}
//-- end add : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
#
#------[ OPEN ]-----------------------------------------------
#
includes/ucp/ucp_profile.php
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
/**
* @ignore
*/
#
#------[ REPLACE WITH ]---------------------------------------
#
# Tip: Replace the preceding line(s) to find with the following lines.
#
/**
* @ignore
* --------------------------
* Installed Modifications :
* --------------------------
* -- mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ----------
*/
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
add_form_key('ucp_sig');
if ($submit || $preview)
{
#
#------[ AFTER, ADD ]-----------------------------------------
#
# Tip: Add these lines on a new blank line after the preceding line(s) to find.
#
//-- add mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
$message = '';
if ( $user->data['user_posts'] < $config['sig_link_posts'] || intval((time() - $user->data['user_regdate'])/86400) < $config['sig_link_days'])
{
if( preg_match("/(\burl\b|http|\bwww\.|\.(com|fr|us|net|biz|info|org|ru|su)\b)/i", $signature) )
{
meta_refresh(5, $this->u_action);
$message = $message . '<br /><br />' . sprintf($user->lang['NO_SIG_LINKS'], $config['sig_link_days'], $config['sig_link_posts']) . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
trigger_error($message);
}
}
//-- end add : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
#
#------[ OPEN ]-----------------------------------------------
#
language/en/common.php
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
/**
* DO NOT CHANGE
*/
#
#------[ BEFORE, ADD ]----------------------------------------
#
# Tip: Add these lines on a new blank line before the preceding line(s) to find.
#
/**
* @ignore
* --------------------------
* Installed Modifications :
* --------------------------
* -- mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ----------
*/
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
?>
#
#------[ BEFORE, ADD ]----------------------------------------
#
# Tip: Add these lines on a new blank line before the preceding line(s) to find.
#
//
//-- add mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
$lang = array_merge($lang, array(
'NO_LINKS' => 'You must be a member for <strong>%1$s</strong> days and have <strong>%2$s</strong> posts before you can post urls.',
'NO_PM_LINKS' => 'You must be a member for <strong>%1$s</strong> days and have <strong>%2$s</strong> posts before you can post urls in Private Messages.',
'NO_SIG_LINKS' => 'You must be a member for <strong>%1$s</strong> days and have <strong>%2$s</strong> posts before you can use urls in your signature.',
));
//-- end add : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
//
#
#------[ OPEN ]-----------------------------------------------
#
language/en/acp/board.php
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
/**
* DO NOT CHANGE
*/
#
#------[ BEFORE, ADD ]----------------------------------------
#
# Tip: Add these lines on a new blank line before the preceding line(s) to find.
#
/**
* @ignore
* --------------------------
* Installed Modifications :
* --------------------------
* -- mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ----------
*/
#
#------[ FIND ]-----------------------------------------------
#
# Tip: This may be a partial find and not the whole line.
#
?>
#
#------[ BEFORE, ADD ]----------------------------------------
#
# Tip: Add these lines on a new blank line before the preceding line(s) to find.
#
//
//-- add mod : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
$lang = array_merge($lang, array(
'LINK_DAYS' => 'The number of days of membership before links may be posted.',
'LINK_DAYS_EXPLAIN' => 'Here you can change the number of days of membership before links may be posted',
'LINK_POSTS' => 'The number of posts a user must post before links may be posted.',
'LINK_POSTS_EXPLAIN' => 'Here you can change the number of posts a user must post before links may be posted.',
'PM_LINK_DAYS' => 'The number of days of membership before links may be posted in PM\'s.',
'PM_LINK_DAYS_EXPLAIN' => 'Here you can change the number of days of membership before links may be posted in PM\'s',
'PM_LINK_POSTS' => 'The number of posts a user must post before links may be posted in PM\'s.',
'PM_LINK_POSTS_EXPLAIN' => 'Here you can change the number of posts a user must post before links may be posted in PM\'s.',
'SIG_LINK_DAYS' => 'The number of days of membership before links may be used in signatures.',
'SIG_LINK_DAYS_EXPLAIN' => 'Here you can change the number of days of membership before links may be used in signatures.',
'SIG_LINK_POSTS' => 'The number of posts a user must post before links may be used in signatures.',
'SIG_LINK_POSTS_EXPLAIN' => 'Here you can change the number of posts a user must post before links may be used in signatures.',
));
//-- end add : min days/min posts for links v.1.0.1 [Simon - Ricky_Racer] ------
//
#
#------[ DIY INSTRUCTIONS ]-----------------------------------
#
# Tip : These are manual instructions that cannot be performed automatically.
# You should follow these instructions carefully.
#
At the Administration Control Panel "Purge" the cache.
#
#------[ SAVE/CLOSE ALL FILES/UPLOAD/ENJOY !!! ]--------------------------------
#
# EoM
#
# You have finished the installation for this MOD.
# Upload all changed files to your website.
# If the installation went bad, simply restore your backed up files.
#
# EoF
# ..:: -= END =- ::..
- Stoker
- Site Admin
- Posts: 3536
- Joined: 12 May 2008, 23:26
- BBCodes: 239
- Favourite BBCode: Anipro
- Favourite MOD: PrettyPhoto
- Location: Denmark
- Contact:
Re: No links for newbies
Simon, feel free to post it in the modifications forum.
And we would like to see you some more around here
And we would like to see you some more around here
Board rules! No PM support
Re: No links for newbies
Thank you