Skip to:
Content
Pages
Categories
Search
Top
Bottom

[New Plugin] BuddyPress Group Forums – Move Topic


  • 3sixty
    Participant

    @3sixty

    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!

Viewing 23 replies - 1 through 23 (of 23 total)

  • 3sixty
    Participant

    @3sixty

    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”


    3sixty
    Participant

    @3sixty

    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.


    3sixty
    Participant

    @3sixty

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


    Gene53
    Participant

    @gene53

    Cool, I’ll give it a try…


    Gene53
    Participant

    @gene53

    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.


    3sixty
    Participant

    @3sixty

    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.


    3sixty
    Participant

    @3sixty

    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?


    Gene53
    Participant

    @gene53

    @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?


    Gene53
    Participant

    @gene53

    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.


    3sixty
    Participant

    @3sixty

    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.


    3sixty
    Participant

    @3sixty

    Try this:

    Version 0.0.4 – 2010 04 18

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


    Gene53
    Participant

    @gene53

    @3sixty

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

    Gene


    3sixty
    Participant

    @3sixty

    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?


    Gene53
    Participant

    @gene53

    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?


    3sixty
    Participant

    @3sixty


    rossagrant
    Participant

    @rossagrant

    Hey 3sixty, just been testing this plugin out and it seems to work well. It has thrown up a couple of questions for me about the way in which BP works. I’m a total novice so bear with me.

    I noticed that the drop down list contained a couple of group names that I thought I had edited in the past. I had created 2 groups in the past with an extra word in the title that I did not want. I had edited these successfully but your plugin had picked up their original name in the DD list.

    I looked at the URL and low and behold, even though the name displayed in the group was the edited one, the URL was actually showing the old, original name.

    The same thing is true for the forums too. After i deleted the offending groups and re created them with the new names (your plugin showed these new names) I recreated the forum names too. The forum names are now given a URL with a -1 after the name now, indicating the original forum name must still be on the database.

    After you move a forum topic to another forum also the topic is actually still available in it’s original group through a direct URL.

    Is there anywhere to go into the database to clean these things up?

    Also one thing that would be great with your plugin would be to order the drop down in Alphabetical order rather than order of creation. Any way we can do that?

    Great work though. It was something that was lacking from BP as standard so thanks. My site hasn’t launched yet but if I end up needing to use it, I’ll Paypal you some funds over to say thanks!

    Ross :)


    rossagrant
    Participant

    @rossagrant

    Update on the being able to acceess a topic through it’s orginal group after it was moved.

    It actually seems as though you can view ANY topic in ANY group by typing in the topic name into the URL so that is just the way BP is and shouldn’t be a problem.

    My quesry still stands though about old forum topics staying in the DB. They seem to stick around. If you create a forum topic. delete it and create it again the url is given a number e.g. 1, 2 etc to signify how many copies of that forum topic there have been created.

    I have over 2000 groups on my site. If I delete topics I could do with them gone permanently as to not leave behind clutter.

    Is that an issue for my database or not in terms of performance etc?

    Thanlks again,

    Ross :)


    3sixty
    Participant

    @3sixty

    “I noticed that the drop down list contained a couple of group names that I thought I had edited in the past. I had created 2 groups in the past with an extra word in the title that I did not want. I had edited these successfully but your plugin had picked up their original name in the DD list.”

    This is unfortunately related to a BuddyPress bug – when you update group names, BuddyPress does not update all the necessary database entries. I need to look at this, but hoping BuddyPress bug fixes will make this a moot point.


    kriskl
    Participant

    @kriskl

    Hi!
    plugins is great Thanks!

    is there anyway to turn on and off email notification??

    we want to move 40 old topics form one forum to another and.. well, i am sure members who posted them.. are no longer bothered :)

    thanks


    rossagrant
    Participant

    @rossagrant

    Is there anyway to order forums in alphabetical order in the drop down? I have over 2000 groups so the list is LONG! Thanks :)


    jordashtalon
    Member

    @jordashtalon

    @3sixty

    Awesome plugin! I was wondering, is there any update on the Merge and Split options? I’ll probably could use options like that.

    Anyway thanks for the plugin so far!


    3sixty
    Participant

    @3sixty

    sorry for the delays on this, but I don’t have the plugin live on my installation at the moment pending other problems I had on my installation. such is the nature of single author plugins. Unfortunately, I can’t give a date for any changes or improvements to the existing plugin.


    hubrik
    Member

    @hubrik

    I’m interested in the split/merge function to and would be interested in helping you out on it. Any news?

Viewing 23 replies - 1 through 23 (of 23 total)
  • The topic ‘[New Plugin] BuddyPress Group Forums – Move Topic’ is closed to new replies.
Skip to toolbar