Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Support: Creating & Extending

Existing and new plugins/components and themes.

[New Plugin] BuddyPress Group Forums – Move Topic (24 posts)

Started 2 years, 1 month ago by: 3sixty

  • Profile picture of 3sixty 3sixty said 2 years, 1 month ago:

    Version 0.0.2 – 2010 04 17

    Download: http://bpanswers.com/buddypress-forums-move-topic.zip

    Provides a drop-down on the Forum Topic page (upper right-hand corner) that allows Group Admins and Mods to move entire topic threads to other public, private, or hidden forums. Topic author gets email alert that helpfully provides link to the relocated topic.

    “Learns” your forum structure and automatically repopulates the drop-down menu when new forums are added. Saves forum structure as “my-topics.php” in the plugin’s directory. If you delete a forum, there is a drop-down option to manually update the forum list. Not sure if there is a hook related to deleting forums, but if you let me know, I’ll add it.

    Yes, it updates the topic/post counts in the database, too. Seems not to mess with RSS. Works for me with Private and Hidden forums.

    NOTE: Currently OK for mods/admins to move topic to a forum where they are NOT a mod/admin; may provide “permissions restriction” feature if there is demand. Other future considerations include ‘split topic’ and ‘merge topic’ functions.

    Wish List/Future Plans

    Topic Merge
    Topic Split
    Automatically update the drop-down menu when forums are deleted (tell me the hook and I’ll add it)
    Finer permissions as an option (i.e. forum moderator cannot move topic to a forum where he/she is not a mod)
    Recode URLs to support https:// installations
    Update activity stream item (though for some reason, the old URL still works, so activity stream is not technically “broken”…)
    Create new activity stream item that so-and-so moved the post (but I want to wait until BuddyPress has better control over what gets displayed in activity streams

    Previous discussion of the code is here.

    Please post any feedback or bugs in this thread, send me a private message through this forum, or email me. Also, not to be commercially crass, but this plugin took a lot of sweat and effort to get right, and more is to come. If you find it useful or to support future development, please consider tipping your bartender. Thanks!

  • Profile picture of 3sixty 3sixty said 2 years, 1 month ago:

    Wish List/Future Plans (continued)

    “Stick it anywhere” function – so you can customize it to your theme. I couldn’t figure out how to say “if the user has already stuck this code in their theme, don’t load the default drop-down.” If anyone has done something like that before, let me know the best way to code that.
    take out “hard coding” of database tables, such as “wp_bb_forums”

  • Profile picture of 3sixty 3sixty said 2 years, 1 month ago:

    OK, some weird behavior right out of the gate. When you delete a BuddyPress Group, the Forum doesn’t get deleted. Not sure I want to file this as a bug on trac… as it seems like a good fallback for admins who accidentally hit the prominently placed “Delete Group” drop-down.

    In any case, if you delete a Group called “Widgets”, it will leave a zombie Forum item called “Widgets” in the drop down that you can’t get rid of through manually rebuilding the drop-down file.

    So it seems like the only way around this is to compare wp_bb_forums to wp_bp_groups and only add an option item where there is a corresponding id/forum_id.

  • Profile picture of 3sixty 3sixty said 2 years, 1 month ago:

    ^^^ This is now fixed and the download link is updated to version 0.0.3.

  • Profile picture of Gene53 Gene53 said 2 years, 1 month ago:

    Cool, I’ll give it a try…

  • Profile picture of Gene53 Gene53 said 2 years, 1 month ago:

    Oops, got the following error when I visited a forum:

    Warning: fopen(/home/domains/mysite.com/www_root/bp/wp-content/plugins/buddypress-forums-move-topic/my-forums.php) [function.fopen]: failed to open stream: Permission denied in /home/domains/mysite.com/www_root/bp/wp-content/plugins/buddypress-forums-move-topic/buddypress-forums-move-topic.php on line 109
    can’t open file

    Also:

    Currently OK for mods/admins to move topic to a forum where they are NOT a mod/admin; may provide “permissions restriction” feature if there is demand

    It would be great for the site admin to move topics in whatever forum he chooses, whether he’s the group admin/moderator or not.

  • Profile picture of 3sixty 3sixty said 2 years, 1 month ago:

    hmm,… the script is supposed to generate a “my-forums.php” file. I may need to include a prepackaged “my-forums.php” with the right permissions set.

    Can you look in the plugin directory and tell me if there is a my-forums.php file there, and if so, what are its permissions? Can you try setting it to 666 and see if it works? If it does not exist, could you manually create a file with that name in the plugin directory and set its permissions to 666?

    If this is all greek, I can put up an updated version. Just let me know if the file is there or not, if you can.

  • Profile picture of 3sixty 3sixty said 2 years, 1 month ago:

    It would be great for the site admin to move topics in whatever forum he chooses, whether he’s the group admin/moderator or not.

    I think it should be set up to work this way, actually – is it not working for your site admin user?

  • Profile picture of Gene53 Gene53 said 2 years, 1 month ago:

    @3sixty

    my-forums.php wasn’t generated so I created one, set it to 666, the error went away but I don’t have a drop-down box.

    Also, I had a look at my-forums.php file and it’s empty.

    Update: I changed the file’s permissions to 777 (out of curiosity), deactivated and reactivated the plugin but to no avail, nothing in the file.

    I just had a thought, I’m also using BuddyPress Forums Extras, do you think there might be some incompatibility?

  • Profile picture of Gene53 Gene53 said 2 years, 1 month ago:

    I deactivated BuddyPress Forums Extras and still no change.

    Mind you, the “fopen(/home/domains/mysite.com/www_root/bp/wp-content/plugins/…………..” error now appears in the freshness column in the Group Forums Directory.

  • Profile picture of 3sixty 3sixty said 2 years, 1 month ago:

    Ah, I know why. The code only generates the drop down if my-forums.php does not exist. I’ll have to figure out another way to trigger the drop-down generation.

  • Profile picture of 3sixty 3sixty said 2 years, 1 month ago:

    Try this:

    Version 0.0.4 – 2010 04 18
    Download: http://bpanswers.com/buddypress-forums-move-topic.zip

  • Profile picture of Gene53 Gene53 said 2 years, 1 month ago:

    @3sixty

    I tested the new version thoroughly and everything seems to work as it should, Kudos!

    Gene

  • Profile picture of 3sixty 3sixty said 2 years, 1 month ago:

    Alright, first alpha bugs quashed!

    I submitted this to the WP plugin repo about 24-36 hours ago – any idea how long it takes to get approved?

  • Profile picture of Gene53 Gene53 said 2 years, 1 month ago:

    Currently OK for mods/admins to move topic to a forum where they are NOT a mod/admin

    If I understand correctly, if a group mod moderates more than one group and wants to move a topic from one of his group forums to another he moderates, he can’t?

    If so, isn’t that restrictive?