Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

[Release] Buy Forum Access 1.0
#21

okay, what i mean is maybe it would be better if this plugin will work for registered users only. What happened is guest on my forum forced to register themselves just to access/view the post/threads but they dont activating their account. Im having a lot of Awaiting Moderations Group members. If i set my registrations to Instant Activation, the are using a fake email(disposable email) to register.
Reply
#22

(04-03-2011, 12:56 PM)childwarrior Wrote: okay, what i mean is maybe it would be better if this plugin will work for registered users only. What happened is guest on my forum forced to register themselves just to access/view the post/threads but they dont activating their account. Im having a lot of Awaiting Moderations Group members. If i set my registrations to Instant Activation, the are using a fake email(disposable email) to register.

The problem is, if I make it that guests can view the blocked forum, what's the point in blocking that forum?

As for the awaiting activation group, if you set the group income rate to 0 or even disallow them from making threads or posts, you will not have any problems.
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#23

Okay, im using the plugin called hide links from guest(i dont know who made that plugin). Every link posted on the thread will be hidden from guest instead in will be displaying " You are not allowed to view the links. Register to view the links blah blah, also i set the guest to not allowed for downloading. In that case it the guests likes the post, she or he will register to view the links or to download attachments. Am i right?

Now, if this plugin will be allowed for registered members only, it is still be useful. Why? Theres a lot of members that is leecher only. They always visit the forum but not an avid member but to downloads downloads and downloads and downloads only. They dont even have an effort of saying or post even a little "thank you". Now for this Buying Forum Access, leechers will be limited, if they want to download a certain post, they cant access that if they dont have a points, so if they were eager to download to that certain post/forum, they will force themselves to make a post to the forum that dont require a points to access.
TongueBig Grin
Reply
#24

Well but then I'd need to force other users who use this plugin toalso use the plugin you use (hide links one) so I cannot add what you want.
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#25

Oh no don't, okay im just suggesting sir Pirata im not begging you to do what im asking, and im not saying that this plugin is not useful in fact i love it and other plugins that you created is amazing. Well then thanks for the time replying to my message.
Reply
#26

Amazing mod.
Reply
#27

Can you make it so you have excluded groups, if someone can quickly give me a code to add to make this, it would be much appreciated.
Reply
#28

Hello Pirata, looks like there's mistake in this part of code:
PHP Code:
function newpoints_buyaccess_access_thread()
{
    global 
$mybb$db$lang$fid$tid;
    
    
$affected_fids explode(','$mybb->settings['newpoints_buyaccess_forums']);
    if (!
in_array($fid$affected_fids))
        return;
        
    
// If we're a guest, we can't browse this forum because we can't pay for it
    
if (!$mybb->user['uid'])
        
error_no_permission();
    
    
newpoints_lang_load('newpoints_buyaccess');
    
    if (
$mybb->settings['newpoints_buyaccess_time'] > 0)
    {
        
$time_check 'AND `date` > ('.TIME_NOW.' - '.$mybb->settings['newpoints_buyaccess_time'].')';
    }
    else 
        
$time_check '';
    
    
// check if we've bought access to this forum
    
$query $db->simple_select('newpoints_buyaccess''*''`uid`=\''.$mybb->user['uid'].'\' AND `fid`=\''.$fid.'\' '.$time_check);
    
$access $db->fetch_array($query);
    if (!
$access)
    {
        
// we need to pay
        
        
if ($mybb->request_method == "post" && $mybb->input['do_pay'] == '1')
        {
            
// insert data into database
            
$insert_array = array(
                
'fid' => intval($fid),
                
'uid' => intval($mybb->user['uid']),
                
'date' => TIME_NOW
            
);
            
$db->insert_query('newpoints_buyaccess'$insert_array);
            
            
// get money from user
            
newpoints_addpoints($mybb->user['uid'], -floatval($mybb->settings['newpoints_buyaccess_fee']));
            
            
// log
            
newpoints_log('buyaccess'$lang->sprintf($lang->newpoints_buyaccess_log$fid$mybb->settings['newpoints_buyaccess_fee']));
        }
        else {
            
// Show page telling the user to pay
            
            // do we have enough points?
            
if (floatval($mybb->user['newpoints']) < floatval($mybb->settings['newpoints_buyaccess_fee']))
            {
                
error($lang->sprintf($lang->newpoints_buyaccess_no_pointsnewpoints_format_points(floatval($mybb->settings['newpoints_buyaccess_fee']))));
            }
            else {
                if (!
$time_check)
                    
$time_check $lang->newpoints_buyaccess_unlimited;
                else
                {
                    
$secondsaccess $mybb->settings['newpoints_buyaccess_time'];
                    
$hoursaccess floor($secondsaccess 3600);
                    
$minsaccess floor(($secondsaccess 60) % 60);
                    
$secsaccess floor($secondsaccess 60);
                    
                    
$time_check $hoursaccess."h ".$minsaccess."m ".$secsaccess."s";
                }
            
                
$page $lang->sprintf($lang->newpoints_buyaccess_noticenewpoints_format_points(floatval($mybb->settings['newpoints_buyaccess_fee'])), $time_check)."<br /><form action=\"showthread.php?tid=".$tid."\" method=\"post\">";
            
                
$page .= "<input type=\"hidden\" name=\"do_pay\" value=\"1\">\n";

                foreach (
$mybb->input as $name => $value)
                {

                    
$page .= "<input type=\"hidden\" name=\"".htmlspecialchars($name)."\" value=\"".htmlspecialchars($value)."\">\n";
                }
            
                
$page .= "<input type=\"submit\" value=\"".$lang->newpoints_buyaccess_confirm."\">\n";
                
                
$page .= "</form>";
            
                
error($page$lang->newpoints_buyaccess_verify_payment);
            }
        }
    }


When I set time other then 3600 seconds (like zero) for thread and forum then it works for forum but doesn't work for thread.

[Image: 6k9YBdqhzkehufTghedCQ.jpg]

Thread always accessable no matter what time I set except default value - 3600
Reply
#29

Hmm not sure what you're trying to do. You're supposed to enter the forum ID's as mentioned in the description of the setting, not the thread ID's.
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply
#30

I take it there's no way to have two options for members? One purchase with NewPoints for a temporary pass, and another considerably more expensive option for a lifetime pass.
Reply




Users browsing this thread: 1 Guest(s)