[ABD] Restrict functions 1.0.2

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
mladen88
Registered User
Posts: 158
Joined: Wed May 30, 2007 9:06 pm

Re: [RC]Restrict functions 1.0.0 (set how much posts users need)

Post by mladen88 » Fri Dec 26, 2008 4:53 am

will authord gona fix this or not?

mladen88
Registered User
Posts: 158
Joined: Wed May 30, 2007 9:06 pm

Re: [RC]Restrict functions 1.0.0 (set how much posts users need)

Post by mladen88 » Tue Dec 30, 2008 1:03 pm

I have looking and looking in fuckin code of mod and found the fix.

Author says in install instructons:

After:

Code: Select all

    // Submit new topic
    if ($post_mode == 'post')
Add:

Code: Select all

    // Start Restrict functions mod	
    if ( !( ($auth->acl_get('a_') && ($config['include_admins'] == 0)) || ($auth->acl_get('m_') && ($config['include_mods'] == 0))))
    {
      $sql = 'SELECT topics_allowed_after
        FROM ' . FORUMS_TABLE . "
        WHERE forum_id = $forum_id";
		  $result = $db->sql_query_limit($sql, 1);
		  $row = $db->sql_fetchrow($result);
		  $db->sql_freeresult($result);
		
		  $template->assign_vars(array(
        'S_RESTRICTED_TOPIC'        => $row['topics_allowed_after'] > $user->data['user_posts'],
        'L_RESTRICTED_TOPIC'        => sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']))
	     );

      if ($config['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPICS'], $config['topics_allowed_after']));
      }

      else if ($row['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']));
      }
    }
    // End Restrict functions mod

But the right install instruction is:

After:

Code: Select all

// Submit new topic
    if ($post_mode == 'post')
{
Add:

Code: Select all

    // Start Restrict functions mod	
    if ( !( ($auth->acl_get('a_') && ($config['include_admins'] == 0)) || ($auth->acl_get('m_') && ($config['include_mods'] == 0))))
    {
      $sql = 'SELECT topics_allowed_after
        FROM ' . FORUMS_TABLE . "
        WHERE forum_id = $forum_id";
		  $result = $db->sql_query_limit($sql, 1);
		  $row = $db->sql_fetchrow($result);
		  $db->sql_freeresult($result);
		
		  $template->assign_vars(array(
        'S_RESTRICTED_TOPIC'        => $row['topics_allowed_after'] > $user->data['user_posts'],
        'L_RESTRICTED_TOPIC'        => sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']))
	     );

      if ($config['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPICS'], $config['topics_allowed_after']));
      }

      else if ($row['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']));
      }
    }
    // End Restrict functions mod

So the code must look like:

Code: Select all

	// Submit new topic
	if ($post_mode == 'post')
	{
    // Start Restrict functions mod	
    if ( !( ($auth->acl_get('a_') && ($config['include_admins'] == 0)) || ($auth->acl_get('m_') && ($config['include_mods'] == 0))))
    {
      $sql = 'SELECT topics_allowed_after
        FROM ' . FORUMS_TABLE . "
        WHERE forum_id = $forum_id";
		  $result = $db->sql_query_limit($sql, 1);
		  $row = $db->sql_fetchrow($result);
		  $db->sql_freeresult($result);
		
		  $template->assign_vars(array(
        'S_RESTRICTED_TOPIC'        => $row['topics_allowed_after'] > $user->data['user_posts'],
        'L_RESTRICTED_TOPIC'        => sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']))
	     );

      if ($config['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPICS'], $config['topics_allowed_after']));
      }

      else if ($row['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']));
      }
    }
    // End Restrict functions mod

jmjm003
Registered User
Posts: 275
Joined: Sat Dec 22, 2007 7:05 pm

Re: [RC]Restrict functions 1.0.0 (set how much posts users need)

Post by jmjm003 » Wed Dec 31, 2008 9:24 pm

mladen88 wrote:I have looking and looking in *beep* code of mod and found the fix.

Author says in install instructons:

After:

Code: Select all

    // Submit new topic
    if ($post_mode == 'post')
Add:

Code: Select all

    // Start Restrict functions mod	
    if ( !( ($auth->acl_get('a_') && ($config['include_admins'] == 0)) || ($auth->acl_get('m_') && ($config['include_mods'] == 0))))
    {
      $sql = 'SELECT topics_allowed_after
        FROM ' . FORUMS_TABLE . "
        WHERE forum_id = $forum_id";
		  $result = $db->sql_query_limit($sql, 1);
		  $row = $db->sql_fetchrow($result);
		  $db->sql_freeresult($result);
		
		  $template->assign_vars(array(
        'S_RESTRICTED_TOPIC'        => $row['topics_allowed_after'] > $user->data['user_posts'],
        'L_RESTRICTED_TOPIC'        => sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']))
	     );

      if ($config['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPICS'], $config['topics_allowed_after']));
      }

      else if ($row['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']));
      }
    }
    // End Restrict functions mod

But the right install instruction is:

After:

Code: Select all

// Submit new topic
    if ($post_mode == 'post')
{
Add:

Code: Select all

    // Start Restrict functions mod	
    if ( !( ($auth->acl_get('a_') && ($config['include_admins'] == 0)) || ($auth->acl_get('m_') && ($config['include_mods'] == 0))))
    {
      $sql = 'SELECT topics_allowed_after
        FROM ' . FORUMS_TABLE . "
        WHERE forum_id = $forum_id";
		  $result = $db->sql_query_limit($sql, 1);
		  $row = $db->sql_fetchrow($result);
		  $db->sql_freeresult($result);
		
		  $template->assign_vars(array(
        'S_RESTRICTED_TOPIC'        => $row['topics_allowed_after'] > $user->data['user_posts'],
        'L_RESTRICTED_TOPIC'        => sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']))
	     );

      if ($config['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPICS'], $config['topics_allowed_after']));
      }

      else if ($row['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']));
      }
    }
    // End Restrict functions mod

So the code must look like:

Code: Select all

	// Submit new topic
	if ($post_mode == 'post')
	{
    // Start Restrict functions mod	
    if ( !( ($auth->acl_get('a_') && ($config['include_admins'] == 0)) || ($auth->acl_get('m_') && ($config['include_mods'] == 0))))
    {
      $sql = 'SELECT topics_allowed_after
        FROM ' . FORUMS_TABLE . "
        WHERE forum_id = $forum_id";
		  $result = $db->sql_query_limit($sql, 1);
		  $row = $db->sql_fetchrow($result);
		  $db->sql_freeresult($result);
		
		  $template->assign_vars(array(
        'S_RESTRICTED_TOPIC'        => $row['topics_allowed_after'] > $user->data['user_posts'],
        'L_RESTRICTED_TOPIC'        => sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']))
	     );

      if ($config['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPICS'], $config['topics_allowed_after']));
      }

      else if ($row['topics_allowed_after'] > $user->data['user_posts'])
      {
        trigger_error(sprintf($user->lang['RESTRICTED_TOPIC'], $row['topics_allowed_after']));
      }
    }
    // End Restrict functions mod
Thank you for the fix.

hamlat
Registered User
Posts: 18
Joined: Fri Dec 26, 2008 12:18 pm

Can't access my ACP

Post by hamlat » Thu Jan 01, 2009 6:45 pm

Happy new year everyone !!!

Well i do have a problem with my forum, i don't know if this Mod is the cause or because i wanted to test AutoMod to install this new mod on my board, anyway since i've run this Mod i can't acceess my ACP anymore, it display this message everytime i try to access my ACP
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 2555: Undefined index: lc_acp_disable
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3003: Undefined index: lc_interval
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3004: Undefined index: lc_disable
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3042: Undefined index: lc_founder_disable
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3047: Undefined index: lc_admin_disable
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 2119: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3348)
And when i logout and relogin to the forum and even though i succeed to login here is the message i get on the top of the Forum header
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3824: Undefined index: user_new_download
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4057: Undefined index: pm_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4058: Undefined index: pm_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4059: Undefined index: smilies_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4060: Undefined index: smilies_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4061: Undefined index: icons_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4062: Undefined index: icons_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4063: Undefined index: attachments_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4064: Undefined index: attachments_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4065: Undefined index: topics_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4066: Undefined index: topics_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4067: Undefined index: polls_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4068: Undefined index: polls_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4069: Undefined index: changing_styles_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4070: Undefined index: changing_styles_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4071: Undefined index: avatars_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4072: Undefined index: avatars_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4073: Undefined index: signatures_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4074: Undefined index: signatures_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4075: Undefined index: websites_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4076: Undefined index: websites_allowed_after
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4096: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3348)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4098: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3348)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4099: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3348)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4100: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3348)
I thought that it would be easy to reverse what i did, as i did a backup of all files before i edited them, but still i can't access my board even after removing all the changes i did for this Mod.

Could anyone help me and tell me what i've to do to fix that problem, or show me how to uninstall this Mod.

By the way, i'm the owner and founder of the forum, as well as of the server, so if there are change to be made, i should be able to make them.

Thanks in advance

hamlat

jmjm003
Registered User
Posts: 275
Joined: Sat Dec 22, 2007 7:05 pm

Re: [RC]Restrict functions 1.0.0 (set how much posts users need)

Post by jmjm003 » Thu Jan 01, 2009 9:37 pm

You replaced all of the files that were edited and you still get the error? Did you purge the cache?
The last set of errors you posted look to be associated with this mod.

I've installed it on a test board using auto-mod and did not have any problems...

hamlat
Registered User
Posts: 18
Joined: Fri Dec 26, 2008 12:18 pm

Re: [RC]Restrict functions 1.0.0 (set how much posts users need)

Post by hamlat » Thu Jan 01, 2009 9:50 pm

jmjm003 wrote:You replaced all of the files that were edited and you still get the error?
Yeah i did, i always keep a copy of the files before i make any change to the Database, but even with the backup i made, i still haven't figured out why i still get all those error message.
Did you purge the cache?
Well to purge the cash, i think i need to do it on the ACP, something i can't access anymore, since i do have all these error messages.
The last set of errors you posted look to be associated with this mod.
Yeah i know, and i still can't understand why they are poping up a i replced all the changed files to the original ones, isn't that weird, ... i really think i 've missed something and i need help to tell me what i did wrong.
I've installed it on a test board using auto-mod and did not have any problems...
Just my luck, .... and i thought i would start a fresh year, ... it doesn't sound good at all lol

hamlat

jmjm003
Registered User
Posts: 275
Joined: Sat Dec 22, 2007 7:05 pm

Re: [RC]Restrict functions 1.0.0 (set how much posts users need)

Post by jmjm003 » Thu Jan 01, 2009 10:17 pm

FTP to your forum folder and delete everything in the cache folder except .htaccess and index.htm . That will clear the cache for you.

hamlat
Registered User
Posts: 18
Joined: Fri Dec 26, 2008 12:18 pm

Re: [RC]Restrict functions 1.0.0 (set how much posts users need)

Post by hamlat » Thu Jan 01, 2009 10:41 pm

jmjm003 wrote:FTP to your forum folder and delete everything in the cache folder except .htaccess and index.htm . That will clear the cache for you.
Did it, but still it didn't change anything, i still get those error messages :(

Thanks anyway dude :)

User avatar
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: [RC]Restrict functions 1.0.0 (set how much posts users need)

Post by ameeck » Thu Jan 01, 2009 11:14 pm

The MOD has DIY instructions, you need to run a install file which is included with the MOD.

hamlat
Registered User
Posts: 18
Joined: Fri Dec 26, 2008 12:18 pm

Re: [RC]Restrict functions 1.0.0 (set how much posts users need)

Post by hamlat » Thu Jan 01, 2009 11:47 pm

ameeck wrote:The MOD has DIY instructions, you need to run a install file which is included with the MOD.
Yeah i did that (like you told me in the other topic i opened), but i get an error message that says that i already have installed it, so right now i wanna find a way to uninstall it, maybe it's gonna solve the problem... if you have any other good idea, well i'm all yours :)

Edited on 01/03/2009 I've been able to solve the provlem by overwritting the files with those from phpbb 3.0.4, .. i've lost some data related to other Mods, but i'm trying now fix them too, the most important thing, is that i can access my ACP, without having any error message, and that's pretty much what i wanted ;)

Thanks anyway for your help guys.

azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

Re: [RC]Restrict functions 1.0.0 (set how much posts users need)

Post by azzurri » Sat Jan 03, 2009 10:32 pm

I don't like the install instructions for this mod that is why I decided not to install it. The instructions seem to be out of date since many lines do not match and it wants me to replace lines which I think will only screw up my forum. Also the instructions are a bit unspecific ie it say's add after (this may only be a partial line blah blah) and I'm not really sure exactly where to put it. I have been installing mods since the beginning of phpbb2 and I have learned to be careful with this. Instructions need to be updated to match the new phpbb3 coding and also it needs to be more specific.

Mudjosh
Registered User
Posts: 234
Joined: Sat Jun 14, 2008 11:04 pm

Re: [BETA] Restrict functions 1.0.0

Post by Mudjosh » Wed Jan 14, 2009 1:55 am

How can this work with this mod:

Almsamim WYSIWYG editor v0.0.8 for phpBB3 : http://www.phpbb.com/community/viewtopi ... &t=1215335

There seems to be no way to get it to work.. :cry:

simvader
Registered User
Posts: 144
Joined: Thu Sep 06, 2007 5:54 pm
Location: Netherlands
Contact:

Re: [BETA] Restrict functions 1.0.0

Post by simvader » Tue Jan 20, 2009 9:34 am

Great mod, I have one idea though,

Can you set a option for mass mailing?

Thanks

Mudjosh
Registered User
Posts: 234
Joined: Sat Jun 14, 2008 11:04 pm

Re: [BETA] Restrict functions 1.0.0

Post by Mudjosh » Thu Jan 22, 2009 2:14 am

Is anyone else having an issue with this:

Code: Select all

Out of range value adjusted for column 'topics_allowed_after' at row 1 [1264]
SQL

UPDATE Forumforums SET parent_id = 8, forum_type = 1, forum_status = 0, forum_parents = '', forum_name = 'Guest Issues:', forum_link = '', forum_desc = 'If you are having issues logging in or registering or have no clue why you was banned and want to know, please ask here!', forum_desc_uid = '', forum_desc_options = 7, forum_desc_bitfield = '', forum_rules = '', forum_rules_uid = '', forum_rules_options = 7, forum_rules_bitfield = '', forum_rules_link = '', forum_image = '', forum_style = 0, display_subforum_list = 1, display_on_index = 0, forum_topics_per_page = 0, enable_indexing = 1, enable_icons = 0, enable_prune = 0, prune_days = 7, prune_viewed = 7, prune_freq = 1, topics_allowed_after = 900, reading_allowed_after = 0, posting_allowed_after = 0, forum_flags = 32 WHERE forum_id = 62

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal_mysql->sql_error()

FILE: includes/acp/acp_forums.php
LINE: 1252
CALL: dbal_mysql->sql_query()

FILE: includes/acp/acp_forums.php
LINE: 182
CALL: acp_forums->update_forum_data()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_forums->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
EDIT..

Ok, I figured out that I was just setting the limit to high on the above variable^^^

But now, I am testing the limit on smilies.. Applying the variable works well.. Then I try to post a smilie and I return this error:

Code: Select all

SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [1064]

SQL

INSERT INTO Forumtopics

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal_mysql->sql_error()

FILE: includes/functions_posting.php
LINE: 1876
CALL: dbal_mysql->sql_query()

FILE: posting.php
LINE: 1001
CALL: submit_post()
EDIT again.. helps when you read previous posts.. Thanks for the fix..

But still, anyone got an answer for the first error?

User avatar
Acorn
Registered User
Posts: 397
Joined: Tue Sep 26, 2006 8:11 am
Location: UK
Contact:

Re: [RC]Restrict functions 1.0.0 (set how much posts users need)

Post by Acorn » Wed Feb 11, 2009 4:58 pm

mladen88 wrote:I have looking and looking in *beep* code of mod and found the fix.
Thank you so much. :D It seems to be working perfectly for me now (on 3.0.3).
Getting braver all the time. :D

Locked

Return to “[3.0.x] Abandoned MODs”