Search Results for 'code'
-
AuthorSearch Results
-
June 3, 2014 at 4:15 pm #147366
In reply to: Moderators Disappearing
John James Jacoby
KeymasterI see two possible ways this *might* fail:
* Multisite & calls to
switch_to_blog
*bbp_get_user_role()is returning multiple bbPress roles (either because some third party role editor plugin was used to manipulate things, or there’s some crusty old role data somewhere in there.)June 3, 2014 at 4:12 pm #147365In reply to: Moderators Disappearing
John James Jacoby
Keymaster@josiahw That’s pretty odd. If you want to debug, check inside the
bbp_set_current_user_default_rolefunction, hooked tobbp_setup_current_user. There are several redundant checks to ensure what you’re seeing doesn’t happen, so I’m curious where it might be failing and how.June 3, 2014 at 3:42 pm #147363In reply to: MODIFY: Topic/Reply Author’s Profile Link
ryan360
ParticipantMy hack job solution was to just modify the plugin itself. Line 356 in template.php contains the permalink structure which you can modify to suit your needs.
// Pretty permalinks if ( $wp_rewrite->using_permalinks() ) { $url = $wp_rewrite->root . bbp_get_user_slug() . '/%' . bbp_get_user_rewrite_id() . '%';June 3, 2014 at 2:34 pm #147361yoosuke
ParticipantThanks for two of you!
That was familiar and interesting topic for me as a web designer!Well…
Thanks to you, Mr Robin W,
I could display ‘Website:’ part in User’s profile page!Now, Along with it, 2 new wishes came up to my mind.
Would you please grant my wishes again?(I really appreciate from Japan! that you always help me, Mr Robin W! )
1. When the ‘Website’ field is blank, I want it be invisible.
Now, When it’s blank, it’s displayed like
Website:_____.2. Is it possible to add ‘Where you live:’ part before the ‘Website:’ part?
Showing the living place is helpful for deepening relations between users, I think…
I wish I could add just<input>tag, neither<textarea> tag nor<select>tag.many thanks.
June 3, 2014 at 1:43 pm #147359ryan360
ParticipantI was able to accomplish this by writing a custom query. I was unable to find a solution ANYWHERE else on this forum despite numerous people asking the same question so I’m hoping this will help everyone out until the bbpress team fixes the bbp_get_template_part functions.
<?php $args = array( 'post_type' => 'reply', 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC', 'author' => $curauth->ID, ); $bbpressquery = new WP_Query($args); while ($bbpressquery->have_posts()) : $bbpressquery->the_post(); ?> <?php the_content(); ?> <?php endwhile; ?>Obviously you can modify the code above to show topics created, I was just trying to return all the forum posts created by a user.
June 3, 2014 at 7:20 am #147346In reply to: Show pagination in single topic
Stephen Edgar
KeymasterI should have said the ‘bbPress templates’ in your Twenty Eleven theme
<link rel="stylesheet" id="bbp-child-bbpress-css" href="http://www.assorpas.it/wp-content/themes/twentyeleven/css/bbpress.css?ver=2.3.2" type="text/css" media="screen">June 3, 2014 at 6:55 am #147342In reply to: Show pagination in single topic
aborruso
ParticipantOk, then I do not see the reply button, because I have an old version.
Where do you see in the code that I use a child theme?
Thank you
June 3, 2014 at 5:27 am #147338In reply to: Show pagination in single topic
Stephen Edgar
KeymasterNo, we use the same version, I think we may have our terminology crossed.
If you want the topic displayed at the top of every page like we do here so that you can still see the original topic when you are page 3 for example you want to use
bbp_show_lead_topicSee the following article and add that code to your themes
functions.phpfile.
(I think this is what you are after 🙂 )June 3, 2014 at 3:09 am #147327In reply to: Links not showing in Forum
Robin W
Moderatoryes the links are set as white in the display
try adding this to your style.css
#bbpress-forums .reply a { color : blue !important ; } #bbpress-forums .reply a:hover { color : green !important ; }I haven’t tested, but should work, come back if you need more help !
June 3, 2014 at 3:07 am #147326Stephen Edgar
KeymasterMine didn’t have “Website: ” now it does 😉 yours should also be ‘Website : ‘ (i.e. Capital W) 😉
It won’t be a link in a new window (i.e.
target="_blank"), a big pet peeve of my mine, see this for more background on when to and not to use it.June 3, 2014 at 2:56 am #147324In reply to: Hide role in the forum
Robin W
ModeratorTry this – it should work
Function hide_author_url () { $retval='' ; return $retval ; } add_filter( 'bbp_get_topic_author_url', 'hide_author_url' ); add_filter( 'bbp_get_reply_author_url', 'hide_author_url' );June 3, 2014 at 2:34 am #147321Robin W
ModeratorOk, this is what you wanted
function user_profile_bbp_website_information() //this function adds the website to the profile display menu { $label1 = $rpi_options['item1_label'] ; echo "<p>" ; printf ( __( 'website : ', 'bbpress' )); $url=bbp_get_displayed_user_field( 'user_url' ) ; $url='<a href="'.$url.'">'.$url.'</a>'; echo $url; echo"</p>" ; } add_action ('bbp_template_after_user_profile', 'user_profile_bbp_website_information') ;June 2, 2014 at 8:55 pm #147313In reply to: Using shortcode has created 2 forums
Stephen Edgar
KeymasterbbPress doesn’t actually create any WordPress pages.
You should be able to create a page titled ‘forums’ add the shortcode and bbPress will use that page.
If you can only create a page with the slug
forums-2then there is another page using theforumsslug or is in the trash.June 2, 2014 at 8:40 pm #147310In reply to: Forum images went crazy
Stephen Edgar
KeymasterThis is most likely an avatar plugin:
eg
<img src="http://www.passingrass.com/wp-content/uploads/avatars/460/5ed932eb9e1a5b11af2d1b9e7029b68e-bpthumb.jpg" class="avatar user-460-avatar avatar-20 photo" width="20" height="20" alt="Profile picture of PassinGrass">And or your themes CSS at Line #1044
http://www.passingrass.com/wp-content/themes/sweetdate/custom_buddypress/_inc/css/default.css?ver=20140430table.forum td img.avatar { float: none; margin: 0 5px -8px 0; }A quick change of that to the following fixes it:
table.forum td img.avatar { float: none; margin: 0 5px -8px 0; width: 20px; }You’ll want to find out if it is the plugin or theme and find a more permanent way to keep those changes such as creating a child theme.
June 2, 2014 at 5:52 pm #147304In reply to: Importing from Vanilla
Stephen Edgar
Keymaster@nippi9 I edited your post above just to remove a large code block for readability.
It looks like the issue above is that some of the user passwords include a quote
"string and that is causing the SQL error which is entirely valid.UPDATE wp_users SET user_pass = "62138e180a81452f40bf419b5a66c359"l$" WHERE ID = "96451" UPDATE wp_users SET user_pass = "27e42027c6eb6008426fbe96b5fdca08;"/" WHERE ID = "96468" UPDATE wp_users SET user_pass = "8cc902ac070d040e1a3231803d09a9411K"" WHERE ID = "96471" UPDATE wp_users SET user_pass = "da19b051d168e44b5833c703e1feb37dE"@" WHERE ID = "96502" UPDATE wp_users SET user_pass = "32f81a53cc20309e9c4d3553d3ba64cb1FA#N~A{J<"@TD:]]5o#vEXQ2v46ct" WHERE ID = "96511" UPDATE wp_users SET user_pass = "d1ea441db666ef80506a70bfcc890e10Ut"" WHERE ID = "96530" UPDATE wp_users SET user_pass = "97eefae85da1e2ea818556577c1dbb42"!m" WHERE ID = "96540" UPDATE wp_users SET user_pass = "edbb4ce3d20b74ca8ab9e141c46f25nW"" WHERE ID = "96572"I’ll take a look and see if there is something we can do to fix this.
That said, it appears only to be a password issue, if you continue you should get all the users imported and users who are affected by the password issue above would need to reset their password rather than using their existing password.
June 2, 2014 at 4:54 pm #147302Robin W
ModeratorThe following should do it – put this in your functions file
function bbp_website_information () //This function adds the website to the avatar display of topics/replies { echo '<li>' ; $user_id = bbp_get_reply_author_id( $reply_id ); global $wpdb; $url = get_userdata($user_id) ; $url=$url->user_url ; $url='<a href="'.$url.'">'.$url.'</a>'; echo $url ; echo '</li>' ; } add_action ('bbp_theme_after_reply_author_details', 'bbp_website_information') ;June 2, 2014 at 4:37 pm #147301In reply to: Hide role in the forum
yu
ParticipantThanks for this. Works just great. Just right now I found out that the author’s name in the forum is linked to his profile. How do I delete the link? Unfortunately my programming knowledge is not good enough to find it out by myself using the codex.
June 2, 2014 at 2:03 pm #147298yoosuke
ParticipantI’m here again!
It’s great I have a place to come back!Now, I’m looking for advice on How to show “Website” part at User Profile page.
By default, 4 sections are displayed on User Profile page.1.user-description, 2.forum-role, 3.topic-count, 4.reply-count
In edit page, There is a section for entering users “Website”.
in spite of entering the section, it would not be display at User’s Profile page.
How can I display it at the User’s Profile page.I found that I need to add some PHPcodes into “user-profile.php”.
But as you know, I have no idea What codes I have to put in.would you please advice me…
WordPress: ver3.9.1
bbPress: ver2.5.3June 2, 2014 at 1:14 pm #147296In reply to: Results of the 2014 bbPress Survey
@mercime
Moderator@eherman24 thank you for your input.
@cronhound thanks for your feedback.
@gautamgupta Thank you 🙂 Congratulations on being accepted again to the Google Summer of Code and choosing to contribute to bbPress development again! Cheers!June 2, 2014 at 5:45 am #147284In reply to: How do you style a specific forum's reply?
demonboy
ParticipantStrange. Why does this code…
.bbp-parent-forum-2881 .bbp-reply-content {font-family:Verdana, Geneva, sans-serif; font-size:0.7em;line-height:1.2em;}…only style recent replies? It doesn’t seem to affect replies 2 months old. It’s the very last line in my child’s style sheet. Is there something else I haven’t read in the manual?
June 1, 2014 at 7:40 pm #147266In reply to: Importing from Vanilla
Stephen Edgar
Keymaster@nippi9 It looks like you are using
GDNas the tabke prefix, tryGDN_June 1, 2014 at 7:19 pm #147262In reply to: How do you style a specific forum's reply?
Stephen Edgar
KeymasterIf you take a look at the HTML source of a topic in that forum you should see
bbp-parent-forum-2881(based on your forum id mentioned).eg.
.bbp-parent-forum-2881 { background-color: red; }June 1, 2014 at 6:57 pm #147259In reply to: Auto post in database with the data provided
Stephen Edgar
KeymasterbbPress uses custom post types, create a forum, then a topic and reply in that forum.
Go take a look at the
forum,topic&replycustom post types inwp_posts, then take a look at the metadata for each post inwp_postmetaJune 1, 2014 at 2:13 pm #147250Jerry
ParticipantOkay, working like you said. This issue was, which I didn’t catch completely in one of your above posts, is that it only shows in my reply section, not in the original topic section at all. Like you mention, we can probably figure that one out. I do know javascript/ajax a little, so I’ll play around in that area to see what is what. I like your idea of making this a bbpress plugin; much needed in my opinion.
Update! I’m editing this post. I just used the following, replacing some wording in your filter:
add_filter('bbp_get_topic_content', 'spr_filter');It is showing in my topics and not my replies! Bravo. That is because of your previous help with the if statements and $countr variable. I will share that full code with you via email if you like. Now to the javascript. That could take me a few hours, or a few days. Sigh…
June 1, 2014 at 1:42 pm #147244Robin W
ModeratorI’ve put the code that is working for me on my site
Download it, unzip and then ftp it to overwrite the plugins rating.php – I’d take a copy of that first !
It would be good to get this working, and if when we get it going I’ll wrap a version as an official plugin if the original author doesn’t want to add the functionality to his plugin !
I’ll continue to play, as it’s annoying me now !
-
AuthorSearch Results