Search Results for 'code'
-
AuthorSearch Results
-
February 11, 2014 at 1:34 am #142327
In reply to: WP_Query post type topic help
hitkid
ParticipantHey Stephen!
Thanks so much for the help! ๐ I should’ve mentioned that I tried those already and they didn’t appear. It works with other bbpress functions, but just not the author avatar as you shared with the codex. I updated the version of bbpress. buddypress and wordpress that I am using to try and see if that worked and still nothing. The avatar shows just fine in the mychildtheme/bbpress/loop-single-topic. It shows up with the topic index shortcode. Any ideas as to what the problem is? I’m pretty confused as to what’s going on!
Thanks again @netweb !
February 10, 2014 at 11:43 pm #142324Majijiboo
ParticipantWhich bbpress file should I add the below filter to to get that feature? Thanks.
function short_freshness_time( $output) { $output = preg_replace( '/, .*[^ago]/', ' ', $output ); return $output; } add_filter( 'bbp_get_time_since', 'short_freshness_time' ); add_filter('bp_core_time_since', 'short_freshness_time');February 10, 2014 at 3:05 pm #142317In reply to: How do you put the "My Profile" link on the menu?
Robin W
Moderatorthe best solution so far courtesy of Ronthai
In Dashboard>plugins>add new
Search for WP exec PHP, install and activateCreate a new page called โprofileโ or whatever name you want
In content of this page, add this code
<meta http-equiv="refresh" content="0;URL=http://mysite.com/forums/users/<?php global $current_user; get_currentuserinfo(); echo $current_user->user_login . ""; ?>/edit/">Where mysite.com is your site name
If using custom menus, add the page to the menu.
And it works !
February 10, 2014 at 3:03 pm #142316In reply to: Menu link to Profile
Robin W
ModeratorRonthai – have just tried it for profile, and it works well
Summary of what I did
In Dashboard>plugins>add new
Search for WP exec PHP, install and activateCreate a new page called โprofileโ or whatever name you want
In content of this page, add this code
<meta http-equiv="refresh" content="0;URL=http://mysite.com/forums/users/<?php global $current_user; get_currentuserinfo(); echo $current_user->user_login . ""; ?>/edit/">Where mysite.com is your site name
If using custom menus, add the page to the menu.
And it works !
February 10, 2014 at 12:13 pm #142309In reply to: How do you put the "My Profile" link on the menu?
Robin W
ModeratorI’m sorry that you feel that something for which you paid nothing isn’t for you.
But I don’t think that abusing the people on here who are trying to help you by saying it sucks is really the way forward.
I hope you are able to find some free software that works precisely as you want.
Whilst most people use sidebars and widgets to perform these functions, I shall continue to see if there is an easy way to get this into a menu and add it to the codex if I work it out.
Best wishes
Robin
February 10, 2014 at 11:45 am #142308Topic: Wrong search results for topics in Private forums
in forum TroubleshootingIlya
ParticipantFor participant user search results doesn’t not show topics from private forums.
If I add to default capabilities in
bbp_get_caps_for_role()at /wp-content/plugins/bbpress/includes/core/capabilities.php line 191 the follow line'read_hidden_forums' => true,then it works, but forum has visibility “Private” not “Hidden”.How can I override
bbp_get_caps_for_role()without modifying core files?February 10, 2014 at 10:58 am #142306In reply to: Changing "Forum" on Main Page
Darth
ParticipantSorry for the delayed response Robin.
Yes, I am talking about the “Forum” in the left of your pic.
I made the following change, as suggested:
<li class=”bbp-forum-info”><?php _e( ‘The Darth Side Forums’, ‘bbpress’ ); ?>
But, it didn’t take effect. The change is shown as listed above in the actual code, but When I go to “inspect element” on the page it still shows:
<li class=”bbp-forum-info”>Forum
February 10, 2014 at 9:52 am #142303Ilya
ParticipantI have the similar issue.
How I can add:// Forum caps 'read_hidden_forums' => true,Any idea?
February 10, 2014 at 4:58 am #142294In reply to: remove rel=nofollow from bbpress posts
Gautam Gupta
ParticipantThe next line after
<?phpFebruary 10, 2014 at 1:00 am #142288In reply to: WP_Query post type topic help
Stephen Edgar
KeymasterCheckout the docs here ๐ https://codex.bbpress.org/bbp_topic_author_link/
February 10, 2014 at 12:21 am #142287In reply to: Edit topic reply, changes post order
Stephen Edgar
Keymaster@kris35 wrote… There are 68 replies to replies and 68 of them are locked this way
This shouldn’t be an issue unless
edit_lockhas incorrect timestamps.@kris35 wrote… I had to go into the backend and edit the โReply Toโ box to zero.
We have just done some testing trying to reproduce “Incorrect Reply To’s” but couldn’t.
Setting them to
0will force the replies to be ‘Not Threaded’ and sorted by date (default)@shanebp wrote… …any edit to a reply pushes it to the bottom and destroys the threading. Any threaded replies become โflatโ.
I can’t reproduce this, any edit I make to a ‘threaded reply’ in the frontend or backend keeps the correct ‘replyto’ value and works as expected.
February 9, 2014 at 8:27 pm #142283jalbaiges
ParticipantHello again.
I have been fighting for a while with the issue and I finally got a solution. I will write it down just in case it could be useful for somebody. Let me say I believe it might exist a smarter solution than mine, so, if you find it, live a comment here, thanks.
Two steps (bbPress 2.5.3):
1) In qtranslate/qtranslate_hooks.php, add the following filters:
add_filter( 'paginate_links', 'qtrans_convertURL' ); add_filter( 'bbp_get_topic_permalink', 'qtrans_convertURL' ); add_filter( 'bbp_get_reply_permalink', 'qtrans_convertURL' ); add_filter( 'bbp_get_forum_permalink', 'qtrans_convertURL' ); add_filter( 'bbp_get_favorites_permalink', 'qtrans_convertURL' ); add_filter( 'bbp_get_subscriptions_permalink', 'qtrans_convertURL' ); add_filter( 'bbp_get_user_profile_url', 'qtrans_convertURL' ); add_filter( 'bbp_get_user_edit_profile_url', 'qtrans_convertURL' ); add_filter( 'bbp_get_user_replies_created_url', 'qtrans_convertURL' ); add_filter( 'bbp_get_user_topics_created_url', 'qtrans_convertURL' );First four are for the standard navigation inside the forums. Last six are for the user profile menu.
2) In bbpress/includes/common/template.php, modify a couple of lines in
bbp_get_breadcrumb()function:In line 2250, replace:
$crumbs[] = '<a href="' . trailingslashit( home_url() ) . '" class="bbp-breadcrumb-home">' . $r['home_text'] . '</a>';with
$crumbs[] = '<a href="' . trailingslashit( qtrans_convertURL(home_url()) ) . '" class="bbp-breadcrumb-home">' . $r['home_text'] . '</a>';And in line 2267, replace:
$crumbs[] = '<a href="' . esc_url( $root_url ) . '" class="bbp-breadcrumb-root">' . $r['root_text'] . '</a>';with
$crumbs[] = '<a href="' . esc_url( qtrans_convertURL($root_url) ) . '" class="bbp-breadcrumb-root">' . $r['root_text'] . '</a>';That’s all! Hope it serves.
February 9, 2014 at 2:39 pm #142279In reply to: How do you put the "My Profile" link on the menu?
Robin W
Moderatoryour last question is easy, .org have customised, just as you are trying to do by adding it as a menu item – we all like it to look slightly differently to others.
I have tried from my little knowledge to get it to work but can’t. The best I can get is
// Filter wp_nav_menu() to add profile link add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' ); function my_nav_menu_profile_link($menu) { if (!is_user_logged_in()) return $menu; else $user = get_userdata( $user_id ); $name = esc_attr( $user_name ); $user_link = '<li><a href="http://www.mysite.com/forums/users/' . $user . '/edit">Amend profile</a></li>'; $menu = $menu . $user_link; return $menu; }But this just returns
http://www.mysite.com/forums/users//edit
Sorry, I have given up.
Can someone else get this working? – it is now annoying me !
February 9, 2014 at 11:48 am #142276In reply to: Menu link to Profile
aravindbachu
Participant@ronthai … your method seems good. can you please me more precise? where do we have to add that code and what should we change for other links?
February 9, 2014 at 6:28 am #142275In reply to: Edit topic reply, changes post order
Kris35
ParticipantMine has been fixed and this is what it was: I had to go into the backend and edit the “Reply To” box to zero. In the right hand column you have Forum, Topic, Reply To. I changed Reply To to zero.
My coder then went into my database and found 34 posts from over 15600 replies that were locked.
This is what he said:
There are 68 replies to replies and 68 of them are locked this way
For now I can’t tell exactly why this happening, but it surely does not happen too often.So generally users can reply to a post or to another reply, but sometimes a reply hangs to itself.
Not sure if this helps anyone?
February 9, 2014 at 4:51 am #142274In reply to: How do you put the "My Profile" link on the menu?
Robin W
ModeratorI am still playing with this, and it doesn’t currently work, but it’s something like adding the following to your functions file
// Filter wp_nav_menu() to add profile link add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' ); function my_nav_menu_profile_link($menu) { if (!is_user_logged_in()) return $menu; else $profilelink = '<li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); edit" >Amend Profile</a></li>'; $menu = $menu . $profilelink; return $menu; }Syntax needs sorting
I’m out most of today, but if you or someone else cracks this, then paste the solution here, and it’ll save me repeating the work.
Solution is based on
https://buddypress.org/support/topic/adding-dynamic-profile-link-to-main-menu-item/
which does the business for buddypress.
February 8, 2014 at 8:58 pm #142270In reply to: Edit topic reply, changes post order
Stephen Edgar
Keymaster@kris35 wroite...I changed them from being forums of a parent forum into being forums with no parent. I made them stand alone forums and those are the ones Im having trouble with.I just tried this.
From:
- Parent Forum -- Child ForumTo:
- Parent Forum - Child ForumEverything still works for me as expected. (i.e. It did not force the bug in this thread) ๐
February 8, 2014 at 7:53 pm #142264In reply to: Very simple question — changing font size
crzyhrse
ParticipantBecause I have no idea how Robin might get it otherwise, I’ll put this here as well, though the subject may call for a new thread? (although in a sense the subject here has also been about communication…)
In case you want to put this in the crib..?
Went looking for a way to change the submit button in bbpress, bigger, colors… Finally was able to assemble searched out bits and pieces from a couple places and with some experimenting accomplished my goal with this, put into the theme’s child style.css:
#bbpress-forums .submit { background-color: #a0668d; color: #FFFFFF; float: center; vertical-align: middle; border-radius: 10px; height: 35px; width: 80px; font-size: 18px; }I laud your efforts Robin, there really are not that I’ve ever found any organized simple ways or directions to make simple changes to simple and common things for us simple and common folks, neither for bbpress or wordpress… And a lot of what is there is old… The two links you’ve offered above are the best I’ve seen so far, and are apparently still works in progress…
No complaints here at all, just a recognition of the difficulties that are present in volunteer community efforts, especially one as widespread as all this is… WordPress is amazing, sort of like the whole world reaching to itself for shared community, open source community, so to speak…
February 8, 2014 at 6:45 pm #142260Topic: WP_Query post type topic help
in forum Themeshitkid
ParticipantHello all,
I am trying to add bbpress functions such as bbp_get_topic author and so on.
<?php $args = array( 'post_type' => 'topic', 'posts_per_page' => 10 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); the_title(); bbp_get_topic_author_link ( array( 'size' => '60' ) ); endwhile; ?>I can get the_title(); and the_content(); but am having problems with getting this in:
bbp_get_topic_author_link ( array( 'size' => '60' ) );and more so. Is there anything I’m doing wrong?
Thank you for any help I might get ๐
February 8, 2014 at 6:32 pm #142259In reply to: Very simple question — changing font size
crzyhrse
ParticipantWell, After a lot of doodling around I’ve accomplished my goal, increased all the forum’s various text font sizes… Here is the gist of it…
I took a copy of the bbpress.css and put it into TextWrangler. Searched for all instances of font-size, made that all be listed at the top in a split window as a guide, then went through and searched and replaced for each different font-size, adding 2px to the px sizes and 0.2em to the em sizes.
Then on a copy of that, with all font-size instances again listed at the top to guide me, I went through and eliminated everything BETWEEN the sections that had a font size in them. I ran all that was left through a code checker- http://jigsaw.w3.org/css-validator/validator -which said it was good.
I then tried what Jared suggested at the beginning of this thread and that I’ve seen suggested elsewhere (often by Jared), I created a folder in the theme’s child folder called bbpress, and copied that modified and reduced bbpress.css file into that folder…
No go, that did not work… So, I then copied and pasted that very same code directly into my child theme’s style.css, and yea, it was working, changed it all… Went back and got rid of thee above mentioned folder, and it still worked..
It may be that there are things that didn’t need to change to accomplish my goal, but it works, nothing is too big and all of it is now easy to see without squinting… ๐ I could imagine doing a similar process for other sorts of changes, if a change seems to be called for…
Here is the modified code… I believe I could have also eliminate everything but the font sizes and the parts that do the targeting (properties?), but I think this makes it easier to place where things are at in the full file, and I might want to change some other font attributes at some point…
Hoping this might be helpful… I’ve sured learned some things today…
/** * bbPress specific CSS * * @package bbPress * @subpackage Theme */ #bbpress-forums { background: transparent; clear: both; margin-bottom: 20px; overflow: hidden; font-size: 15px; } #bbpress-forums ul.bbp-lead-topic, #bbpress-forums ul.bbp-topics, #bbpress-forums ul.bbp-forums, #bbpress-forums ul.bbp-replies, #bbpress-forums ul.bbp-search-results { font-size: 15px; overflow: hidden; border: 1px solid #eee; margin-bottom: 20px; clear: both; } #bbpress-forums .bbp-forums-list li { display: inline; font-size: 13px; } #bbpress-forums div.bbp-forum-title h3, #bbpress-forums div.bbp-topic-title h3, #bbpress-forums div.bbp-reply-title h3 { background: none; border: none; font-size: 18px; line-height: 1em; margin: 8px 0; padding: 0; text-transform: none; } #bbpress-forums div.bbp-forum-author .bbp-author-role, #bbpress-forums div.bbp-topic-author .bbp-author-role, #bbpress-forums div.bbp-reply-author .bbp-author-role { font-size: 13px; font-style: italic; } span.bbp-author-ip { font-family: 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-size: 13px; font-weight: bold; color: #aaa; } div.bbp-breadcrumb, div.bbp-topic-tags { font-size: 15px; } span.bbp-admin-links a { color: #bbb; font-weight: normal; font-size: 12px; text-transform: uppercase; text-decoration: none; } .bbp-row-actions #favorite-toggle a { text-decoration: none; padding: 0 3px 1px; color: #7c7; border: 1px solid #aca; background-color: #dfd; font-weight: bold; font-size: 15px; } .bbp-row-actions #subscription-toggle a { text-decoration: none; padding: 0 3px 1px; color: #7c7; border: 1px solid #aca; background-color: #dfd; font-weight: bold; font-size: 15px; } #bbpress-forums .bbp-forum-info .bbp-forum-content, #bbpress-forums p.bbp-topic-meta { font-size: 13px; margin: 5px 0 5px; padding: 0; word-wrap: break-word; } .bbp-topic-pagination a { font-size: 12px; line-height: 11px; padding: 1px 3px; border: 1px solid #ddd; text-decoration: none; } body.page .bbp-reply-form code, body.page .bbp-topic-form code, body.single-topic .bbp-reply-form code, body.single-forum .bbp-topic-form code, body.topic-edit .bbp-topic-form code, body.reply-edit .bbp-reply-form code { font-size: 12px; background-color: #f0fff8; border: 1px solid #CEEFE1; display: block; padding: 8px; margin-top: 5px; width: 369px; } #bbpress-forums div.bbp-the-content-wrapper textarea.bbp-the-content { width: 100%; margin: 0; font-size: 15px; } #bbpress-forums div.bbp-the-content-wrapper input { font-size: 15px; padding: 5px; margin: 0 2px 0 0; line-height: 1em; } #bbpress-forums #bbp-your-profile fieldset span.description { margin: 5px 0 0 20%; font-size: 15px; font-style: italic; float: left; clear: left; width: 60%; padding: 5px 8px; border: #cee1ef 1px solid; background-color: #f0f8ff; } div.bbp-template-notice p { margin: 0.5em 0 6px 0 !important; padding: 2px; font-size: 15px; line-height: 140%; } .bbp-topics-front ul.super-sticky, .bbp-topics ul.super-sticky, .bbp-topics ul.sticky, .bbp-forum-content ul.sticky { background-color: #ffffe0 !important; font-size: 1.2em; } #bbpress-forums .bbp-topic-content ul.bbp-topic-revision-log, #bbpress-forums .bbp-reply-content ul.bbp-topic-revision-log, #bbpress-forums .bbp-reply-content ul.bbp-reply-revision-log { border-top: 1px dotted #ddd; width: 100%; margin: 0; padding: 8px 0 0 0; font-size: 13px; color: #aaa; } .bbp-logged-in h4 { font-weight: bold; font-size: 1.6em; clear: none; margin-bottom: 10px; } #bbpress-forums h1 { clear: none; font-size: 2.1em; line-height: 1em; padding-bottom: 10px; } #bbpress-forums #bbp-user-wrapper h2.entry-title { font-size: 1.6em; margin: 0; padding-bottom: 10px; padding-top: 0; clear: none; } #bbpress-forums div.row-actions { font-size: 13px; visibility: hidden; } div.bbp-search-form input, div.bbp-search-form button { font-size: 13px; padding: 2px; } #bbpress-forums .bbp-forums-list li { display: block; font-size: 13px; } #bbpress-forums div.bbp-reply-author .bbp-author-role { font-size: 15px; font-style: normal; } #bbpress-forums .bbp-body div.bbp-reply-content { clear: both; margin: 10px; padding: 0; } #bbpress-forums li.bbp-header, #bbpress-forums li.bbp-footer { font-size: 12px; }February 8, 2014 at 4:12 pm #142255In reply to: Very simple question — changing font size
crzyhrse
ParticipantLatest discovery- when I search the complete directory/folder of bbpres, for- bbp-topic-content or bbp-reply-content, absolutely nothing is found… Which I believe suggests that there is nothing to cascade into the above code…?
February 8, 2014 at 3:01 pm #142248In reply to: Can't find the profile page in the WP backend
Robin W
ModeratorThink that’s pretty well how it was intended, and agree that some bits could be clearer.
If a user clicks their avatar they will be taken to their profile and can amend it.
I have downloaded the enhanced text widget
https://wordpress.org/plugins/enhanced-text-widget/
and then I have a text entry of
<p><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>edit" >Amend Profile/Change password</a></p>in my widget sidebar to make it obvious for users.
February 8, 2014 at 2:57 pm #142247In reply to: Very simple question — changing font size
Robin W
ModeratorJohn,
Thanks for this – I have been playing with WordPress for less than a year now, so still consider myself to be a newbie at this, but one who is keen to share stuff I have learnt, and one who has spent many hours googling for solutions.
I try to write for those with little knowledge, so if you think the wording can be better on any post/documentation entry, please come back. What is clear to an author is often not clear to everyone else, so please add to improving the codex and posts where people like me are not clear, and as you learn more, please visit the support forum and see if you can help one or two others with their problems.
All the support people on here are volunteers, no-one is paid and we give back time as we got the code and support for free when we needed it. Join us in helping others !
February 8, 2014 at 2:36 pm #142244In reply to: Very simple question — changing font size
crzyhrse
ParticipantI’m back to the same quest, changing the forum’s font size(s), and in searching around rediscovered here… I’m pretty good about checking the “notify me of followup” boxes but didn’t get an email in this case, so this is a good bit later… I’m hoping your “followup” boxes are still checked and maybe you will see this… I’ll bookmark this thread and check back in…
And thank you, this IS community and I deeply appreciate all the effort everyone makes to help each other, and also for both of you reminding me of that… Because it is looking like it could be helpful to Robin to know a little what it is like (for some folks anyway) looking for answers like this, I’ll make an offering here, beyond just looking for my own solutions…
It could be that I am a bit typical of someone coming into this believing they can do it even though they haven’t done it before, and who is generally doing very well and truly enjoying the process, and all the new stuff I am learning… I have a very nice, unique website going now, with a lot in it. The forum is the only part left for me to tweak around with, refine it’s look and feel, so to speak, or in other words the stuff css does, as opposed to php for instance…
To answer Lyng and also in response to Robin, I am comfortable changing css via the theme child, as well as php changes with snippets via the snippets plugin, and have altered parts of some wp files, theme files & plugin files via the cPanel when snippets or child css wasn’t going to do it, in which case making local documented backups…
And, I am totally illiterate in terms of writing code and nearly illiterate reading, some bits of css being a slight exception. And my brain cells way too old for me to ever become fluent. Especially in that there are several different languages used for websites… I understand “cascading” though, and am getting some glimmers of the relationship between some of the languages, like it seems that css is telling php what to do once php gets some structure in there… I have a construction background so I tend to look at things that way, bits and pieces of this and that fitting together to make a whole…
So how I have gone about it is to search and obtain code from all you amazing literate folks, as well as by learning a bit to identify in the case of css what can be altered in existing code to change size, color, padding, location, etc., and add that to the child theme or elsewhere so the cascading effect takes place…
I can’t ever imaging at my age learning much about php, i.e., to actually change existing php code, but I can and have looked for and found some bits from people who seem to know what they are doing and who are referring to to something close enough to my own situation to try it, either as a snippet or some changes via cPanel, text, things like that..
People often offer code but don’t then say how to use it, place it, where it goes, as if all of us out here, if we are looking for code know that part… If that information could be more prevalent with the offered code it could be hugely helpful for this person and probably a lot of other folks… I’m reminded sometimes of being in a country whose language I don’t speak, and how sometimes local folks can kind of get impatient with that. And I also see in searching around how some folks seem to want simple solutions without any effort on their own part… And as you reminded me, this is community, so there you go… All sorts of us… ๐ I’ve actually enjoyed some great personal growth these last few months with all of this…
I am hoping all this can be helpful… I’m now going to go off and explore where Robin has pointed, and maybe come back here with a report, likely not to be even nearly as long-winded as this… ๐
Again, truly regret that I did not see your responses sooner, and hoping you get this…
John, aka crzyhrse
February 8, 2014 at 4:41 am #142225In reply to: Changing "Forum" on Main Page
Robin W
ModeratorCertainly works in the template both in childtheme and if you do it in the original location – just tested the latter.
It could be that either I’ve not explained well enough or or we’re talking about a different “Forum” position.
The change you make should be from :
<li class="bbp-forum-info"><?php _e( 'Forum', 'bbpress' ); ?></li>to
<li class="bbp-forum-info"><?php _e( 'Elephant', 'bbpress' ); ?></li>if you want it to say Elephant.
If that is not the issue, can you confirm that it is the “forum” in the top left of this example that you’re talking about
https://buddypress.org/wp-content/uploads/53/2013/11/forum-5.jpg
-
AuthorSearch Results