Forum Replies Created
-
In reply to: Looking for a plugin to edit/change author
so if you delete them, you will get the option to assign their posts to another.
Many sites create a dummy user and call that user things like ‘ex member’ and assign content to that one user.
if you don’t want to delete users, then I don’t know of a plugin that will bulk assign.
It would not be that hard to write though
In reply to: Forum Restrictionsand enable topic permissions
In reply to: Login widget not working!you are using the widget from the bbpresstweaks plugin, I cannot say why this is not working.
Try the one from bbpress.
In reply to: Show a list of forum moderatorsthanks for sharing the solution 🙂
In reply to: Reset of Forum Posts Countthat section does not look like bbpress showing it.
I would need to see it on the real site to guess what it is showing
In reply to: change styling if freshness less than 24 hoursyes, strtotime(‘now’) will pick up gmt, so needs adjusting, you night want to look at
$now = date_create( date_i18n( 'Y-m-d H:i:s' ) );In reply to: change styling if freshness less than 24 hoursok try this for topics in a forum
add_filter ('bbp_get_topic_freshness_link' , 'rew_check_freshness2', 10 , 5 ) ; function rew_check_freshness2 ($anchor, $topic_id, $time_since, $link_url, $title) { $last_active = get_post_meta( $topic_id, '_bbp_last_active_time', true ); $diff = strtotime('now') - strtotime($last_active) ; if ($diff<86400) { $anchor = '<span class="fresh">'.$anchor.'</span>' ; } return $anchor ; }In reply to: change styling if freshness less than 24 hoursJust realised, frenchlemans wanted it against the forum list – but you show nothing there, so you want it against the topic list in each forum – yes ?
In reply to: change styling if freshness less than 24 hoursok, that’s where it should be, and it should work.
where are you putting the code ?
In reply to: Create a link image for last post in forumGreat – thanks for posting back – looks smart and glad you are fixed !!
In reply to: change styling if freshness less than 24 hoursahh – think I have misunderstood now I re-read, given the post you attached to, I thought your question was regarding the freshness columm, but now I don’t know.
my code adds a class in the freshness column
<li class="bbp-forum-freshness"> <span class="fresh"><a href="http://gos.rewweb.co.uk/forums/topic/eferwer/" title="EFERWER">8 hours, 14 minutes ago</a></span>so can you explain exactly what you want to turn green?
In reply to: change styling if freshness less than 24 hourstry this
add_filter ('bbp_get_forum_freshness_link' , 'rew_check_freshness', 10 , 6 ) ; function rew_check_freshness ($anchor, $forum_id, $time_since, $link_url, $title, $active_id) { $last_active = get_post_meta( $forum_id, '_bbp_last_active_time', true ); $diff = strtotime('now') - strtotime($last_active) ; if ($diff<86400) { $anchor = '<span class="fresh">'.$anchor.'</span>' ; } return $anchor ; }This adds an extra span class called ‘fresh’ if the last active is less than 24 hours.
you can then style this in css eg
.fresh { background-color : green ; }In reply to: Add introductory paragraph to home page of bbPressGreat – glad you are fixed !!
In reply to: Add introductory paragraph to home page of bbPressthe easiest was is to create a page with the same permalink as your forum slug, so in your case ‘forums’
so create a page called ‘forums’
in the content put the html you want and follow with the shortcode
[bbp-forum-index]if you are using blocks, wordpress has a shortcode block type ‘sh’ in type and it will appear.and publish – check that it appears as
http://mysite.com/forumsand that should work
In reply to: Add “forum” to subject email notificationsin which case you would hook to
$subject = apply_filters( 'bbp_subscription_mail_title', '[' . $blog_name . '] ' . $topic_title, $reply_id, $topic_id );in bbpress 2.6.6\includes\common\functions.php line 1124 and 1291
In reply to: Create a link image for last post in forumno problem – glad you are fixed !
In reply to: Create a link image for last post in forumok,
the default display order is freshness, followed by author – you have it the other way around.
try changing the line above
add_action( 'bbp_theme_after_topic_author', 'rew_freshness_display_image');to
add_action( 'bbp_theme_after_forum_freshness_link', 'rew_freshness_display_image');In reply to: change styling if freshness less than 24 hoursyou don’t need stylepack, it’s just that the answer is different if you do !
I’ll come back with code when I get a moment 🙂
In reply to: Create a link image for last post in forumso can you detail the settings in freshness tab please
In reply to: Create a link image for last post in forumare you using style pack? and freshness tab ?
In reply to: Can’t set “editing” to 0yes it’s a know bug on the list to fix.
in the meantime set it to 5256000 and that gives them 10 years to edit, which should be enough 🙂
In reply to: Create a link image for last post in forumPut this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
add_action( 'bbp_theme_after_topic_author', 'rew_freshness_display_image'); function rew_freshness_display_image ($forum_id = 0) { // Verify forum and get last active meta $forum_id = bbp_get_forum_id( $forum_id ); $active_id = bbp_get_forum_last_active_id( $forum_id ); $link_url = $title = ''; if ( empty( $active_id ) ) $active_id = bbp_get_forum_last_reply_id( $forum_id ); if ( empty( $active_id ) ) $active_id = bbp_get_forum_last_topic_id( $forum_id ); if ( bbp_is_topic( $active_id ) ) { //then reset forum_id to the forum of the active topic in case it is a sub forum $forum_id = bbp_get_topic_forum_id($active_id); $link_url = bbp_get_forum_last_topic_permalink( $forum_id ); $title = bbp_get_forum_last_topic_title( $forum_id ); } elseif ( bbp_is_reply( $active_id ) ) { //then reset forum_id to the forum of the active topic in case it is a sub forum $forum_id = bbp_get_reply_forum_id($active_id); $link_url = bbp_get_forum_last_reply_url( $forum_id ); $title = bbp_get_forum_last_reply_title( $forum_id ); } $anchor = '<a class="rew_freshness_display_image" href="' . esc_url( $link_url ) . '" title="' . esc_attr( $title ) . '"><img src="http://mysite.com/wp-content/uploads/2013/06/Brauhaus-2.jpg">' . '</a>'; echo '<p>'.$anchor.'</p>' ; }and change the
<img src="http://mysite.com/wp-content/uploads/2013/06/Brauhaus-2.jpg" />to the image you want – make sure it is sized right !!In reply to: Add “forum” to subject email notificationsthe easiest way is to use
once activated go to
dashboard>settings>bbp style pack>Subscription Emails
and you can amend headings there
In reply to: delete accountyes, that should be fine – just do it when the site is least active !
In reply to: Create a link image for last post in forumSo all the same image – yes ?