Paid Subscriptions Help

Started by Hoodie, August 24, 2009, 06:50:29 PM

Previous topic - Next topic

Hoodie

Using 2.0RC1.2

Trying to add a link to my secondary menu..  Does not use the array() like the main menu..  I want to add a link to show to users that are not a paid subscriber..  I have 2 different subscription levels so it would need to include more then one membergroup in the inclusion/exclusion..

So if user is a member of groups 6 or 7, the link will not appear, otherwise, there will be a link that says Subscribe linking to the Paid Subscriptions part of the profile..  I don't need any styling or anything..  Just need the link..

Thanks..

Hoodie

Anyone have any help with this?  I'm sure it has something to do with $context and something but not sure exactly what..

Hoodie

I'm suprised nobody can give me any help with this..  Minus the paid subscriptions thing, is there any way to exclude a link from showing towards certain membergroups?

Arantor

Actually, it's not a simple request at all, if you want to find all users not in at least one group.

So, first up, what rules would you have in place to display members? Is it all members who are not in either of groups 6 or 7?

Hoodie

Right.  If the member is not in group 6 or 7, the following will be displayed:

<a href="$scripturl?action=profile;area=subscriptions"><b>Upgrade</b></a>

For members of group 6 and 7, nothing will show.

REDSEW

This is what I do...
I get this code:

   // Otherwise they're a guest - this time ask them to either register or login - lazy bums...
echo'| <b><a href="http://www.clanx2o.org">Home</a></b> | <b><a href="?action=help">Help</a></b> | <b><a href="?action=forum">Forums</a></b> |';
if ($context['user']['is_admin'])
echo ' <b><a href="?action=admin">Admin</a></b> |';
echo' <b><a href="?action=rules">Rules</a></b> | <b><a href="?action=search">Search</a></b> | <b><a href="?action=chat">Chat</a></b> | <b><a href="?action=staff">Staff</a></b> | <b><a href="?action=gallery">Gallery</a></b> | <b><a href="?topic=174.0">Teamspeak</a></b> | <b><a href="?action=arcade">Arcade</a></b> | <b><a href="?action=multiplayer">Multiplayer</a></b> | <b><a href="?action=chess">Chess</a></b> | ';

echo'<br />
| <b><a href="?action=calendar">Calendar</a></b> | <b><a href="?action=forum#11">World Editor</a></b> | <b><a href="?action=forum#2">Game Forums</a></b> | <b><a href="?action=tutorials">Tutorials</a></b> | <b><a href="?board=63.0">Strategies</a></b> | <b><a href="?board=73.0">Downloads</a></b> |';
if ($context['user']['is_logged'])
echo'<b> <a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>' , Logout , '</span></a></li></b> |';
if ($context['user']['is_guest'])
echo '<b><a href="?action=register">Register</a></b> |';      

   echo '

And paste it into the theme that I use... The code needs a bit editing becuase I got this from my friend long ago, and I tested it in smf 2.0, works like a charm :D.
NOTE: You should use this where the old menu was or so...

Arantor

Interesting code, apart from the fact that it won't actually do anything of what the user requested.

Unfortunately editing this one is no small job and will slow the forum down :(

Hoodie

Yeah..  I know how to make the secondary menu..  I already have it started..  I just need something that displays only to certain membergroups..  Thank you for trying to help though..

I took a look at the subscriptions-paypal.php under Sources and it doesn't really provide anything..  Profile.template.php doesn't have anything either..  Anyone know where the information is for the display of Paid Subscriptions in the Profile info?

Arantor

Not having set it up, I'm not sure.

However anything that loads into the profile will be exposed from Load.php's loadMemberData and loadMemberContext functions. subscriptions-paypal.php mostly handles the actual transfer itself.

I didn't say I couldn't do it - just that it isn't easy to do and cannot be done without throwing a minimum of another expensive, or two slightly less expensive database queries on every single page load.

Advertisement: