Teaser link "Upgrade to Pro site" does not show up when option for free forums is set to 0

Hey guys,
I have trouble with the Forum plugin in combination with Pro Sites.
When I set the option Maximum number of forums for the free user level in Network Admin > Options > Forums to 0 (zero), free user blogs still get a link Click here to add a new forum. When I click the link only an empty page opens inside the dashboard.
But I think it should show a teaser link to the checkout page likeTo use the Forum, please upgrade to Pro ».
Same happens if I set the option to 1 free forum. I can create one free forum and if I want to add a second forum the link Click here to add a new forum appears again, but it goes nowhere.

Also, there is an option inside forums.php
define('FORUM_DEMO_FOR_NON_SUPPORTER', false);
should I change it to true in order to get a teaser ad for non pro users?
Thanks
Robert

  • Kimberly
    • Champion of Loops

    Robert,

    Of all the ProSites combinations I've tried I believe this one is the one I've missed somehow :slight_smile:

    While I am off trying to get a test site setup can I ask you to please change the above mentioned variable to true then test?

    Any other info on your setup, as well as the URL in the bar when you reach the blank screen.

    Thanks!

    Kimberly

  • robaggio
    • Design Lord, Child of Thor

    Hi Kimberly,
    I changed the variable to true
    define('FORUM_DEMO_FOR_NON_SUPPORTER', true);

    This is the outcome:
    When I click on the menu point Forums the notice "Pro only..." is shown for only one second and right after the page is being redirected to URL "domain.com/wp-admin/supporter.php" and the page turns blank again with the admin bar disappearing.
    I checked the code and found the redirection to supporter.php on line 286:

    function forums_non_supporter_output() {
    	?>
    	<h3><?php _e('Pro Only...', 'incsub_wiki'); ?></h3>
    	<script type="text/javascript">
    	window.location = '<?php echo get_admin_url(); ?>supporter.php';
    	</script>
    	<?php
    }

    I guess there is a function missing to check if user has pro level. If the user has no pro level the teaser link "Upgrade to Pro site" should be shown.
    if (function_exists('is_pro_site')

    I hope this is of any help for you.

    Robert

  • robaggio
    • Design Lord, Child of Thor

    I checked the new version.
    It works now partially.
    1. Option - setting the variable to true

    define('FORUM_DEMO_FOR_NON_SUPPORTER', true);

    result:
    The user gets automatically forwarded to the checkout page --> works
    What I would recommend is to show the teaser link to the upgrade page to have the user decide to click on the link and being then forwarded to the checkout page. This way you are consistent with all the other plugins working together with Pro Sites (Wiki, Sitewide Privacy Options, XML-RPC feature, etc.)

    Changing this code:

    function forums_non_supporter_output() {
    	global $blog_id, $psts;
    	?>
    	<h3><?php _e('Pro Only...', 'wpmudev_forums'); ?></h3>
    	<script type="text/javascript">
    	window.location = '<?php echo $psts->checkout_url($blog_id); ?>';
    	</script>

    to

    function forums_non_supporter_output() {
    	global $blog_id, $psts;
            $feature_message = str_replace( 'LEVEL', $psts->get_level_setting($level, 'name', $psts->get_setting('rebrand')),
                                           "To use the forums, please upgrade to LEVEL »" );
            echo '<div id="message" class="error"><p><a href="' . $psts->checkout_url($blog_id) . '">' . $feature_message . '</a></p></div>';
    	?>

    2. Option - setting the variable to false

    define('FORUM_DEMO_FOR_NON_SUPPORTER', false);

    I set the option Maximum Number of Forums for the free user level in Network Admin > Options > Forums to one. When a non pro user already created one forum the user still gets a link to create more forums. By clicking the link the page turns blank and nothing happens.
    I think this is a bit confusing for users. You might wanna place a notice when the preset numbers of forums are reached and also place a link to the checkout page to upgrade the user level.

    Would be great if you can add those changes in the next version.
    Thanks
    Robert

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.