#2063 closed enhancement (worksforme)
new action hooks in forums-loop.php and groups/single/forum/topic.php
Reported by: | dwenaus | Owned by: | |
---|---|---|---|
Milestone: | 1.2.3 | Priority: | trivial |
Severity: | Version: | ||
Component: | Keywords: | ||
Cc: | wordpress@… |
Description
There is a handy action in bp-themes/bp-default/forums/forums-loop.php called bp_directory_forums_extra_cell
however it is missing a corresponding action in the head of the table below where all the th cells are. adding
<?php do_action( 'bp_directory_forums_extra_cell_head' ) ?>
after line 32 would be helpful.
Attachments (1)
Change History (7)
#1
@
15 years ago
- Cc wordpress@… added
- Keywords has-patch added
- Summary changed from new action hook in forums-loop.php to new action hooks in forums-loop.php and groups/single/forum/topic.php
patch attached to add action hook bp_directory_forums_extra_cell_head as in description above, and also to add action hooks for modifying the appearance of individual forum posts and topics, as per:
http://buddypress.org/forums/topic/additional-buttons-in-messages#post-39753 and http://buddypress.org/forums/topic/new-plugin-buddypress-rate-forum-posts/page/2#post-39751
#2
@
15 years ago
- Keywords has-patch removed
@andrew_s1 , I think this could be done differently to conform more to the BP coding standards. I would suggest a much simpler solution, that doesn't require passing the post id into the class - it's already in the id, which is enough:
change <li id="post-<?php bp_the_topic_post_id() ?>">
to <li id="post-<?php bp_the_topic_post_id() ?>" <?php do_action('bp_the_topic_post_class'); ?> >
simple.
adding an action in the admin links is not needed in the topic.php code. it would be best done in the bp_the_topic_post_admin_links function in bp-forums-templatetags.php. but for the plugin purposes, it is not needed at all.
#3
@
15 years ago
surely the "show hidden post" link should be visible to all, not just to admins?
That's true of the other use-case too for the proposed new action bp_single_forum_topic_links: adding a "report abusive post" link to each post, for all users.
http://buddypress.org/forums/topic/additional-buttons-in-messages#post-39753
#4
@
15 years ago
Ah, I understand a bit better: I think you've misunderstood my patch. The bp_single_forum_topic_links hook isn't added in the admin links, it's added after the admin links, and would be executed for all users
#5
@
15 years ago
- Resolution set to worksforme
- Status changed from new to closed
hey andrew, I think you've been confused by the css I used. The hook for adding the rating is not in the admin links at all. It is done after the content. but then I use css to positiion it near the admin links. It has nothing to do with them really, and the rating shows up for everyone who is logged in, not just admin. I appreciate the help and effort, but please try to be a bit more thorough next time :)
I'm going to mark this thread as closed and create it again for just the thing I wanted. If you'd like to discuss this further, email me directly at deryk@… as I'll get it faster.
add new action hooks for modifying appearance of posts and topics