Subscription from index page - coding question
shortcutkid Offline
Junior Member
**
Posts: 1
Joined: Nov 2013
Post: #1
Subscription from index page - coding question
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??

11-14-2013 01:19 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Subscription from index page - coding question
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>


My Blog
(This post was last modified: 11-14-2013 09:12 AM by ZiNgA BuRgA.)
11-14-2013 09:11 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: