MyBB Hacks

Full Version: Subscription from index page - coding question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
little background:
my users are migrating from a yahoo group to a forum, so they're used to getting notifications of EVERYTHING Erf
So, my users want to get subscribed to all forums, and I'm trying to pull a subscription status and place it on the index page (with icons) so that my users can sub/unsub directly from the index instead of going into each forum directly.
I found a plugin to use, but the host I'm using does not allow plugins to be installed, so I'm trying a workaround. I found where to edit the template (forumbit_depth2_forum) to add an icon.

What I want to do is to pull the subscription status, and display an image and link based on that status.
The normal link from MyBB is

Code:
<a href="usercp2.php?action={$add_remove_subscription}subscription&amp;type=forum&amp;fid={$fid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a>

and I can see what that's doing, BUT if I just copy/paste that into the template, nothing displays. If I remove the add_remove_subscription_text section, i get a link, but it does nothing, as the add_remove_subscription does not bring the "add" or "remove" text. The {$fid} does not work either, so I replaced that with {$forum['fid']} and it worked.
Is there a similar replacement for the add_remove_subscription and text??

I believe that the variables simply aren't pulled in those templates.
Can't do much if you can't do (PHP) code modifications.

Though, if you don't need it to switch between subscribe/unsubscribe, you could use

HTML Code
<a href="usercp2.php?action=addsubscription&amp;type=forum&amp;fid={$forum['fid']}&amp;my_post_key={$mybb->post_code}">Subscribe!</a>

Reference URL's