bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

New plugin: Auto Add Favorites

(12 posts)
  • Started 10 months ago by finalwebsites
  • Latest reply from mazdakam
  • This topic is not a support question
  1. Just published my second bbpress plugin:
    http://www.finalwebsites.com/bbpress/auto-add-member-favorites.php

    Use this plugin for your bbpress forum to let members add their favorites while writing a post for an existing thread or while creating a new topic.

    any suggestion / comment is welcome...

    Posted 10 months ago #
  2. edwinfoo
    Member

    Gee, that is brilliant. Thank you.

    Just one little problem. When I'm logged in as admin, and activate the plugin in an account other than mine, it's checked and looks like it's ready to go. However, when I log back in as the member, it's not checked and of course not activated.

    Log back in as admin, and it's checked and looks like it's ready to go.

    Actually, when logged in as admin it looks like for all existing accounts the plugin is checked active as default. From the member accounts, it's not.

    As admin, I'd like to go through and activate this for my members but it is not possible. Only the member can activate this plugin.

    What's required to enable admin to activate this plugin in member profiles?

    Posted 10 months ago #
  3. edwinfoo
    Member

    So what is happening is only the account holder can activate this feature in their profile.

    Would it be possible to make it so that Key Master and Administrator can activate this feature in members profiles?

    Posted 10 months ago #
  4. Seems like a pretty cool plug in. Thanks!

    Posted 10 months ago #
  5. Hi, Thanks for your comments.

    yes you're right the plugin is made to update the current user (only)

    I will check if this would be possible to do for other users to (keymaster only) ... on the other site I'm asking me if this is really needed or do you update the setting for xxx users?

    Posted 10 months ago #
  6. edwinfoo
    Member

    Olaf, what's happening is if the keymaster has it activated in their profile, it will appear prechecked in a members profile but not actually activated. If the plugin is inactive in the keymasters profile, then it is unchecked in the members profile irrespective if the member has activated it or not.

    The behavior from an administrators point of view is quite strange.

    I believe the best solution is for the option to be active when an account is created rather than manually activated.

    Also, if I post on an existing thread, I get an email telling me that I have posted. That could be considered unnecessary.

    Posted 10 months ago #
  7. Hi Edwin,

    you're right I need to fix that with the profile ID.

    the information mail you about your own post is done by the "Post Notification" plugin (there is no check against the current user).

    Posted 10 months ago #
  8. Hi I changed this function:

    function auto_add_favorit_profile() {
    	global $user_id;
    
    	if (bb_is_user_logged_in()) {
    		$checked = "";
    		$user = bb_get_user($user_id);
    		if (!empty($user->auto_add_favorit)) {
    			$checked = ' checked="checked"';
    		}
    		echo '
    			<fieldset>
    				<legend>Add my threads automatically to my favorites</legend>
    				<p>Check this option to add all your threads or threads where you have posted something to your favorite list.</p>
    				<table width="100%">
    					<tr>
    						<th width="21%" scope="row">Activate:</th>
    						<td width="79%">
    							<input name="edit_auto_add_favorit" id="edit_auto_add_favorit" type="checkbox" value="1"'.$checked.' />
    						</td>
    					</tr>
    				</table>
    			</fieldset>';
    	}
    }

    please replace this function or download the updated version via the link above and tell me if it works (it works for me)

    Posted 10 months ago #
  9. edwinfoo
    Member

    The update works perfectly.

    One other feature about this plugin that needs to be highlighted is right below the post creation box, appears the prechecked option of auto favoriting the topic. This gives the member the option to opt-out of favoriting the topic.

    This is another fantastic feature of this plugin.

    What would be better is if could be automatically activated when a new account is created. Currently, the only way to activate it is manually.

    Is this possible?

    Posted 10 months ago #
  10. the last needs some more code during the registration process...

    I think this feature is needed to makes this plugin complete :D

    Posted 10 months ago #
  11. OK this feature is added, check my forum for further information (link behind my name to the left)

    Posted 10 months ago #
  12. Nice :) i am now use it
    works great

    Posted 10 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.