Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=551)
I had been trying to figure out a way to make it so that members of my forum would not have access to certain parts until they posted (mainly because they would make the initial posts to get access upon registration, but then would never post again) So I came up with this. This is actually a recode of the post count warning mod.
After install you will need to add the code below per the instructions to make this work right>
This will add the ability to enable/disable the post count restriction not just through admin, but allow you to also restrict ANY page you want if you add this code to the template file. To do this add this code to the main source file for the section of the forum you want to restrict right after the brace ( { ) after the initial function call in the source directory file (example would be smf shop initial function call in the shop.php is function shop () { ) the code below goes right after that:
global $sourcedir;
// If it is sunday allow everyone on.
require_once($sourcedir.'/RestrictAccess.php');
if ($context['user']['is_logged']){
echo RestrictAccess(2);
}
The additional beauty of this code is it shows a warning box on every page your members go to remind them they need to make their posts, I have made the number of post perday changeable in admin as well as the ability to change the day of the week that you can have as your free-for-all day!
Where do I find it in the admin panel after installation?
Quote from: lockelymarkets on April 10, 2007, 08:55:58 PM
Where do I find it in the admin panel after installation?
It is under features and options
Sorry for my english.
Can you introduce the karma condition ?
Example:
if you have the karma <5, you don't have the permission and the restrict access.
That wasn't the point of this mod...sorry.
ok, it's just an question.
This is exactly what I've been looking for.. I installed it and applied.. but it makes my forum all off ..everything is stretched out.. have to scroll way down to see the main part... ... I'm not using the default theme.. using Leviathan theme.. what can i do to fix this?? thanks in advance
line, i'm not using it but it must be because the message is bigger than your template, the easiest way for me to explain here is go into the edit file "i don't have the mod here so i don't know what it would be" and find where it has the width and height for the message, you should be able to make it shorter, meaning it will be in your template better.
Another thing you could do is move it to another part of your theme editing the template.php file.
Quote from: TechnoDragon on April 04, 2007, 02:46:02 PM
I had been trying to figure out a way to make it so that members of my forum would not have access to certain parts until they posted (mainly because they would make the initial posts to get access upon registration, but then would never post again)
What's the matter with postgroup permissions? They do the job just fine...
Is it possible to look almost whole weak without notice and only one day with notice – Just to remember people not to forget to post?
Spel
The "main source file" thats the index file correct?
Please help me!
I dont know how to put in the code...
I am new and I dont know where to put it...
This is the code I am supposed to put in right.
//Otherwise annoy them to post daily!
// If post count is less required let them know!!
$memberResult = loadMemberData($ID_MEMBER, false, 'profile');
list ($memID) = $memberResult;
$date = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']) - ($modSettings['time_offset'] * 3600);
$query = db_query("
SELECT COUNT(ID_MSG) AS 'msgCount'
FROM {$db_prefix}messages
WHERE ID_MEMBER = '$memID' AND posterTime >= '$midnight'", __FILE__, __LINE__);
$result = mysql_fetch_assoc($query);
$posts_per_day = $result['msgCount'];
$restrictaccess = $modSettings['DayOfTheWeek'];
$dotw = date("w");
// If it is sunday allow everyone on.
if($dotw != $restrictaccess)
{
// If post count is less that 3 per day deny!!
if(($context['user']['is_logged']) && ($posts_per_day < $modSettings['MinReqPostCountRestrict']) && ($modSettings['restrictaccess'] == '1'))
{
echo '
<table align="center" style="width: 100%; padding: 20px; text-align: left; vertical-align: middle; margin: 2ex 1ex 2ex 1ex; border: 2px dashed ', $modSettings['PostCountWarningBorderColor'],'; background-color: ', $modSettings['PostCountWarningBackgroundColor'],';">
<tr>
<td width="64">
<img style="vertical-align: middle;" src="'.$settings['images_url'].'/pcWarn.gif" alt="Attention!" />
</td>
<td style="color: ', $modSettings['PostCountWarningTextColor'],';">
<strong>', $modSettings['PostCountRestrictMessageTitle'], '</strong><br />', $modSettings['PostCountRestrictMessage'], '
</td>
</tr>
</table>
';
} // End restrict low posts
} //end free-for-all
Nobody can help?
This site is huge!
And nobody cant help me?
Some one please reply!
Hey,
I've put the code in 'downloads.php'
The message shows up saying I don't have a post yet for that day, but stil I see the rest of the page and I am able to download.
What's going wrong?
edit: can I link this to some parts of the profile? ex If a member doesn't fillin it's location, that the warning shows?
Thanks
Guy
would this work for 1.1.3?
i have try it this is what i got
Parse error: syntax error, unexpected ',' in .../index.template.php on line 207
it works in 1.1.3
The parse error is because you mistyped something.
Sorry i would like to know where to put the code in the first post. I have installed the mod and i can see the options in Admin Panel, but i cant see how i can restrict a board within the forum
Thanx in advance
Hi there,
I think I have the same issue with this mod. It's installed but I can't find out how to restrict access to simply one board. I don't want a post count on all the boards, only on one, I thought the info with the mod said that this was possible?
Thanks for any help that comes from this post.
PandoraBizkit. :)
Well........I have to say that I'm really surprised there has been no replies to this. I'm sure we are not the only people having issues with it and surely it's better to iron out the kinks?
The main thing I have always reccommended SMF to people for is the support that is always readily available. Sadly, not so on this thread.
Still nothing, is that simply because nobody knows the answer then? :o
someone make this work with 1.1.4 ?
would be great if this mod would allow for a specific board (s), and also chosen membergroups, say just the "newbies"
anyone know what happened to the author?, seems he could fix this (ad it) rather quickly :)
will this ever work for smf 1.1.4
:(
work for smf 1.1.4?
I have got this while installing this mod:
Install Actions
Installations actions for "Restrict Access Until Post":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
It seems that it is not compatible with my version of smf which is 1.1.5, am i right?
Quote from: F4r4Zm0In on May 20, 2008, 10:28:30 AM
It seems that it is not compatible with my version of smf which is 1.1.5, am i right?
Yep!
I am also using 1.1.5 and I would love to have this on my forum! Ideally, I would like to restrict access to a "SPOILERS" section as it seems that a certain number of members from all groups just visit that section and never post! I would like to encourage more activity and this mod would help me to get at least one post before showing the latest "Spoiler"
:-\
QuoteIt seems that it is not compatible with my version of smf which is 1.1.5, am i right?
I am also looking for this...
Is there a 1.1.5 version ????
greetz ooze
Quote from: ooze_orb on June 20, 2008, 09:55:32 AM
QuoteIt seems that it is not compatible with my version of smf which is 1.1.5, am i right?
I am also looking for this...
Is there a 1.1.5 version ????
greetz ooze
1.1.7 now even... would be nice to use this one, but i dont feel like trying it on a big 450k posts live board....anyone did and succeed?
Any updates? I'm using 1.1.8 and would find this mod very handy for my forum.
Quote from: LizN on February 09, 2009, 11:25:52 PM
Any updates? I'm using 1.1.8 and would find this mod very handy for my forum.
Me too! Does anyone know of a similar mod?
Modified version to work with all SMF versions up to and including 1.1.8
Enjoy!
WARNING: Even if you don't get an error message during install, you probably have to follow the exact instructions for 1.1.2 on MOD page specially if you have too many other MODs, such as Google Bot and etc, and other themes. I had to spend less than 5 min to get it to work no trouble with over 56 MODs here. Go ahead with installation but double check all the files to make sure they are all updated.
NOTE: When it comes to other themes, you may also need to redesign the warning message for the user to fit nicely on your forum.
this installation is for 1.1.8+...... work's for me....
Anyone care to help me work this out so I can have this apply to private messages?
Any updates?? I am using 1.1.11 & need something like this. so obviously outdated.
I do appreciate all the help that mod authors give.
But outdated and unsupported mods are really a headache.
And yes I need this for 1.1.11 :)
Quote from: strale_91 on August 04, 2009, 11:01:46 PM
this installation is for 1.1.8+...... work's for me....
Thanx so much for the update.
How exactly would I apply this to the chat. I don't see anything as explained in the REAMD Me text.
when update dont forget Portugues
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation>
<search position="end"><![CDATA[]]></search>
<add><![CDATA[
//Begin Page Restriction Text by candidosa2
$txt['PostCountRestrictMessageTitle'] = 'Acesso restrito - Título';
$txt['PostCountRestrictMessage'] = 'Acesso restrito - Mensagem';
$txt['MinReqPostCountRestrict'] = 'Mínimo exigido para contagem no poste (0 = disabled)';
$txt['restrictaccess'] = 'Activar acesso restrito';
$txt['DayOfTheWeek'] = 'Qual e o dia de semana que esta livre?';
$txt['dow0'] = 'Domingo';
$txt['dow1'] = 'Segunda-feira';
$txt['dow2'] = 'Terça-feira';
$txt['dow3'] = 'Quarta-feira';
$txt['dow4'] = 'Quinta-feira';
$txt['dow5'] = 'Sexta-feira';
$txt['dow6'] = 'Sábado';
$txt['PostCountWarningBorderColor'] = 'Aviso na contagem de poste - Cor em limite';
$txt['PostCountWarningBackgroundColor'] = 'Aviso na contagem de poste - Cor do fundo';
$txt['PostCountWarningTextColor'] = 'Aviso na contagem de poste - Cor do texto';
//End Page Restriction Text support smfpt
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end"><![CDATA[]]></search>
<add><![CDATA[
//Begin Page Restriction Text by candidosa2
$txt['PostCountRestrictMessageTitle'] = 'Acesso restrito - Título';
$txt['PostCountRestrictMessage'] = 'Acesso restrito - Mensagem';
$txt['MinReqPostCountRestrict'] = 'Mínimo exigido para contagem no poste (0 = disabled)';
$txt['restrictaccess'] = 'Activar acesso restrito';
$txt['DayOfTheWeek'] = 'Qual e o dia de semana que esta livre?';
$txt['dow0'] = 'Domingo';
$txt['dow1'] = 'Segunda-feira';
$txt['dow2'] = 'Terça-feira';
$txt['dow3'] = 'Quarta-feira';
$txt['dow4'] = 'Quinta-feira';
$txt['dow5'] = 'Sexta-feira';
$txt['dow6'] = 'Sábado';
$txt['PostCountWarningBorderColor'] = 'Aviso na contagem de poste - Cor em limite';
$txt['PostCountWarningBackgroundColor'] = 'Aviso na contagem de poste - Cor do fundo';
$txt['PostCountWarningTextColor'] = 'Aviso na contagem de poste - Cor do texto';
//End Page Restriction Text support smfpt
]]></add>
</operation>
</file>
Sorry to bring up a super old thread. Found this mod and I like it. But any possibility of having it updated for Version 2?
Bumping.
I'm really needing this mod in 2.0
Can anyone help?
I want to have my members keep active.
Hello all i know this mod is real old but iv been searching and cant find any thing like it is there another mod like this or can it easy be updated.