Support Forum

How I redirect people to a sales page?

DJ David Jeters
David Jeters
Member

I currently trying to setup a paid forum, similar to this forum.

Although I can’t figure out how to get the “become a member” button(which is next to the login button on this site, but not mine) to show up for unregistered users.

Also I am not sure how to setup the redirect to a sales page for the teaser content.

 

5 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

You can not distinguish between registered and non-registered users only between those logged in and those not logged in. The easiest way to test if a user is logged in is to use the WP function:

is_user_logged_in()

which will return a true or a false.

What is meant by ‘teaser content’?

DJ David Jeters
David Jeters
Member

So you are saying that the “become a button” is not part of the simplepress and has to be coded in using the is_user_logged_in() WP Function?

Teaser content – is any content that you only see a portion of for free, and if you want to see the full content you have to pay. So on your website I am referring to how your support forum works. So if I am not logged in I can see your forum and the threads in each of the forums, but if I want to read a thread, I have to pay for a membership. Hopefully I explained that in a way that makes sense.

So what are my options on doing a redirect from within the simplepress plugin to a sales page/membership page?

 

 

YS Yellow Swordfish
Yellow Swordfish
Member

The ‘Become a member’ button you see on our site falls under the banner of customisation – yes. It is not hard to achieve however. This is how we coded it into the template (spHead.php – replacing the standard registration function):

if (!sp_get_auth('reply_topics')) {
   echo "<a class='spButton spRight vtip' title='Become an SP Support Member' href='".SFSITEURL."membership/'>";
   echo "<img class='spIcon' src='".SPTHEMEICONSURL."sp_Registration.png' alt=''/>Become Member</a>";
}

This checks to see if the user can reply to topics as opposed to being logged in. It also – obviously – loads our own url. Easily adaptable.

As to your other question then go to the forum admin > components > custom messages. Right hand side – Sneak Peek. I think that is what you will need.

DJ David Jeters
David Jeters
Member

Thanks, that helped, although now I have a few questions.

So, if I update the spHead.php, will have update it again when you update simplepress?

Where should I place to the code in the spHead.php file to get the same effect as in your forum? I placed your code at the bottom of spHead.php and it makes button appear below the log-in button. If I place the code at the top of the spHead.php it makes the “become a member” button appear above the log-in button.

Where can turn on the Sneek Peek for a forum? I know its probably very obvious, but I can’t seem to find it.

YS Yellow Swordfish
Yellow Swordfish
Member

As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/)

As I said – replace the current function that displays the registration button. Or – if you want to keep that button, place this code beside it.

Setitng things so users can view forums but not posts – for example – are all permissions that you assign to user groups via the forums. See our Getting Started section on the codex for examples and details.