Search Results for 'code'
-
Search Results
-
Hello from Japan!
bbpress is great!Well, I’m in trouble.
so I would appreciate if you help me.1.
By default, an anchor tag is given to texts of “freshness“. like…<a>2hours, 1minute ago</a>To remove the anchor tag from freshness texts, which files should I modify ?
Could you please tell me a path to get to the file?2.
By default, a comma is used in display of “freshness”. like..2hours,(←here!) 1minute agoI want to also remove the comma.
In this case, a file to be modified will be the same as the file described above?Thanks for reading,
and I’m looking forward to your reply…WordPress: ver3.9.1
bbPress: ver2.5.3Topic: Parent directory possible?
I’m working on a site that uses both BuddyPress and bbPress. All the BP functionality is in a community parent directory and I’d like to run bbPress out of the same, e.g.
http://mydomain.com/community/forums
I was able to create this page and use the bbPress shortcode to display the forum index at this location, but this doesn’t change any of the rest of the directory structure of my forums, e.g., when I click on a forum, I’m redirected to
http://mydomain.com/forums/forum/myforumname
The community parent directory is lost. Is there a way for me to keep all bbPress URLs under the community directory?
I put this in “pimp your press”, but now I think it belongs in the troubleshooting forum. Not certain.
I have created custom fields for my bbpress topics, and I have learned how to auto-populate those fields when a user clicks a button. I have also learned how to auto-populate the Topic Title. I am using javascript to auto-populate the topic title. Here is how I assign the data:
$("input[name='bbp_topic_title']").val(data.title);I am showing this as an example to show what I need. My question is; am I able to auto-populate the content of a new topic, much like I am doing with the title for a new topic?
To auto-populate the content of a new topic, I assume I need to have the correct term, which I think would be ‘bbp_topic_content’? So it would look like this?
$("input[name='bbp_topic_content']").val(data.description);Here are three functions I am using for custom fields:
add_action ( 'bbp_theme_before_topic_form_content', 'bbp_extra_fields'); function bbp_extra_fields() { $value = get_post_meta( bbp_get_topic_id(), 'bookCover', true); echo '<label for="bookCover">Book Cover URL</label><br>'; echo "<p><input type='text' name='bookCover' value='".$value."'></p>"; } add_action ( 'bbp_new_topic', 'bbp_save_extra_fields', 10, 1 ); add_action ( 'bbp_edit_topic', 'bbp_save_extra_fields', 10, 1 ); function bbp_save_extra_fields($topic_id=0) { if (isset($_POST) && $_POST['bookCover']!='') update_post_meta( $topic_id, 'bookCover', $_POST['bookCover'] ); } add_action('bbp_template_before_replies_loop', 'bbp_show_extra_fields'); //add_action('bbp_template_before_main_content', 'bbp_show_extra_fields'); function bbp_show_extra_fields() { $topic_id = bbp_get_topic_id(); $valuec = get_post_meta( $topic_id, 'bookCover', true); }I am thinking that I need some sort of “add_action” to get this accomplished? Do I need to create a new function? I’ve been looking in templates.php to try and get a hint to figure this out. Any help would be GREATLY appreciated. Thanks.
I have created custom fields for my bbpress topics, and I have learned how to auto-populate those fields when a user clicks a button. I have also learned how to auto-populate the Topic Title. I am using javascript to auto-populate the topic title. Here is how I assign the data:
$("input[name='bbp_topic_title']").val(data.title);
I am showing this as an example to show what I need. My question is; am I able to auto-populate the content of a new topic, much like I am doing with the title for a new topic?To auto-populate the content of a new topic, I assume I need to have the correct term, which I think would be ‘bbp_topic_content’? So it would look like this?
$("input[name='bbp_topic_content']").val(data.description);
Here are three functions I am using for custom fields:add_action ( 'bbp_theme_before_topic_form_content', 'bbp_extra_fields'); function bbp_extra_fields() { $value = get_post_meta( bbp_get_topic_id(), 'bookCover', true); echo '<label for="bookCover">Book Cover URL</label><br>'; echo "<p><input type='text' name='bookCover' value='".$value."'></p>"; } add_action ( 'bbp_new_topic', 'bbp_save_extra_fields', 10, 1 ); add_action ( 'bbp_edit_topic', 'bbp_save_extra_fields', 10, 1 ); function bbp_save_extra_fields($topic_id=0) { if (isset($_POST) && $_POST['bookCover']!='') update_post_meta( $topic_id, 'bookCover', $_POST['bookCover'] ); } add_action('bbp_template_before_replies_loop', 'bbp_show_extra_fields'); //add_action('bbp_template_before_main_content', 'bbp_show_extra_fields'); function bbp_show_extra_fields() { $topic_id = bbp_get_topic_id(); $valuec = get_post_meta( $topic_id, 'bookCover', true); }I am thinking that I need some sort of “add_action” to get this accomplished? Do I need to create a new function? Any help would be GREATLY appreciated. Thanks.
I’m sure this has been asked before but I can’t find a solution yet. I’d like to style one particular forum differently to the others, in particular all the replies in every topic. Do I use the post id or the forum name? My forum is called ‘assignments’ and the forum post id is 2881, but of course all topics within that forum have a different post id. Can’t work it out. I’ve tried variations on this:
#bbpress-forums #post-2881 .bbp-reply-content {font-family:Verdana, Geneva, sans-serif; font-size:0.8em;}Any pointers?
Hi,
i have the challenge to show the latest topics for the role members in the topic index view. I’m new to bbpress so i’ve to learn a lot.I’m using buddypress with sidewide and group forums. Each group has one forum.
When I’m using a site and shortcode [bbp-topic-index] only all topics from the sidewide forums are shown. What I’ve learned is that this is a default behavior – i hope i’m not wrong 🙂Now I want to show all latest topics / posts for all members belonging to their group / group forum – optimal on the latest topic page. The users are members (bbpress) and abonnents (WordPress).
How do i accomplish that ?