Search Results for 'code'
-
AuthorSearch Results
-
February 25, 2014 at 6:12 am #142901
In reply to: Removing "Started by:"
Robin W
ModeratorOk, you need to do the following
If you have a child theme, then do this in there
If you don’t have a child theme, then seriously consider creating one, it’s very quick and easy, and will ensure that changes you make don’t get lost on theme or bbpress upgrades. Just google wordpress child theme videos and you’ll get lots of help.
In your theme create a bbpress directory
wp-content/themes/yourthemename/bbpressthen copy
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-topic.php to this directory so that you have
wp-content/themes/yourthemename/bbpress/loop-single-topic.phpEdit this file to delete line 60 which says
<span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>and save.
bbPress will now use the file in your theme’s bbpress folder instead of the default, and you won’t lose your change on bbpress upgrades – but will it it is in your main theme, so if you don’t create a child theme, keep a note of what you changed, as if your theme updates, then you may/will lose the bbpress folder and file.
February 25, 2014 at 5:02 am #142899In reply to: Edit Replies to post and get a blank page
Robin W
Moderatorok, then as before I’d suggest you go to yoothemes for support.
It may be as simple as changing the page template that bbpress is using
https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/ section 8
February 25, 2014 at 4:58 am #142898In reply to: Links and avatars moves to right side
Robin W
ModeratorIt actually is not displaying any of your replies correctly, they are not aligned as the topic is.
I think the culprit is two lines of code in your style sheet
From style line 1659From style line 1658
.reply {
float: right;
}.reply a {
float: right;
font-size: 13px;
line-height: 22px;
}Altering reply to float left and reply a to float none seems to fix it.
But it could be that these are being used elsewhere, so just have a look around you site afterwards to check that this hasn’t altered something else.
February 25, 2014 at 4:27 am #142896In reply to: Set depth of indent for threaded replies…
Robin W
ModeratorJohn, really pleased that you tracked it down, and yes I’ll add it to the styling crib when I get a moment ! Often I spend hours searching for the wrong thing, the solutions here are often easy and obvious but only after you have worked them out !
The code
#bbpress-forums ul.bbp-threaded-replies{margin-left:25px;}is exactly the same as
#bbpress-forums ul.bbp-threaded-replies { margin-left: 25px; }The computer simply ignores gaps, and coders only write it that latter way to make it easier to read.
You ought to start using a child theme if you haven’t already got one. (just google child theme video, and you’ll get lots of help). it’s very quick and simple and does not affect you main theme, just allows you to add without losing on updates. Then you would create a directory in that called
css viz wp-content/themes/yourchildthemename/css and copy your amended bbpress.css file into that. bbPress will then use that, and you won’t lose changes.Great that you’re fixed !
February 24, 2014 at 11:47 pm #142892In reply to: Set depth of indent for threaded replies…
crzyhrse
ParticipantGot it..!
I’t’s like going on an easter egg hunt and actually finding a real egg… π
I measured the offset with a little pixel yardstick that plugs into Chrome, got 50px and searched the bbpress directory for that, and found this in the bbpress.css you pointed me to above:
#bbpress-forums ul.bbp-threaded-replies { margin-left: 50px; }changed that to:
#bbpress-forums ul.bbp-threaded-replies { margin-left: 25px; }Put it into the theme’s child with the other bbpress css changes I have there, and it worked… Perfectly… Hoping it might be helpful for others, or in your crib, Robin..?
Curiously, in searching also found:
in both of these-
bbpress-rtl.css
bbpress-rtl.min.css
this
#bbpress-forums ul.bbp-threaded-replies{margin-right:50px}and in this-
bbpress.min.css
this
#bbpress-forums ul.bbp-threaded-replies{margin-left:50px}All of which looks like no css I’ve seen, in each file one very, very, very long continuous line of code … Am wondering if there is effect from the above for other sorts of screens or browsers, or something..? If I changed these to 25px I’d likely do it directly in the files in the bbpress directory, and keep a record for bbpress updates…
Leaving it alone for now, but in case someone looks in here and has any thoughts..?
John.
February 24, 2014 at 10:57 pm #142891In reply to: Set depth of indent for threaded replies…
crzyhrse
ParticipantThanks Robin and hi again… π
That doesn’t find anything that seems to pertain, plenty of padding in the normal sense for various aspects of replies… And pertaining to replies is what I’m looking for because that is where the nesting (offsetting? indenting?) or threading occurs, per the Reply threading setting in the forum settings section of the Admin settings section…
I’ve searched through directories everywhere that made sense, php and css, for terms like nest, thread, indent, offset… found nothing… It would need to be some sort of code that recognized whether it was a first, second or third reply, etc, and also somehow say how much to indent… It would also seem to need to some way be affected by the setting for it, as mentioned above…
I was kinda hoping to maybe attract John James Jacoby’s attention on this, noticing how much he seems to know in the various support areas I’ve looked over time..?
This would seem to be something that would be helpful to others as well..? The default indent distance I believe is much more than is needed to show nesting, and the less it indents the less the following indents will be crowded to the right, don’t know but maybe even get cut off…?
Thanks… It is nice when someone replies, doesn’t always happen… π
John.
February 24, 2014 at 8:38 pm #142888Topic: Getting the comments to post to top of page
in forum Installationrmilne
ParticipantI’m going bananas trying to get bbpress to put comments on the forum with the newest first instead of last and making everyone scroll to the bottom of the page. The only thing I can find is an article more than 3 years ago that has files that don’t look like what i see. Help! this surely can’t be the first time someone has brought this up. Or maybe there is some blatantly obvious setting i’m missing.
This is the article I speak of that says just change some code from ASC to DECS but i don’t see that anywhere in the current file structure.
February 24, 2014 at 6:08 pm #142881In reply to: How to users LOGOUT?
Robin W
ModeratorFebruary 24, 2014 at 5:26 pm #142878In reply to: no title in content-single-reply.php
Robin W
Moderatorcouldn’t where ‘dashcamtest.de’ was in your example.
The code is in loop-single-reply, which should show the title using line 22
February 24, 2014 at 5:03 pm #142873In reply to: Edit topic reply, changes post order
Kris35
ParticipantThanks for the code dzpoa. Has anyone else tried it? I haven’t had any problems since but thats because (I think) I’ve taken out my members ability to correct their posts. I daren’t go in and edit any myself but luckily I haven’t had to yet.
February 24, 2014 at 3:07 pm #142868In reply to: Changing bbPress templates
Robin W
ModeratorTry
The actions are used in the templates held in
wp-content/plugins/bbpress/templates/default/bbpress/
February 24, 2014 at 3:03 pm #142867In reply to: How to users LOGOUT?
Robin W
ModeratorThere’s some code in the documentation to add a Login/Logout to the menu
see
item 11.
I am documenting a ‘modal’ (popup) login to add in a few days.
February 24, 2014 at 2:19 pm #142863In reply to: How do you put the "My Profile" link on the menu?
aravindbachu
Participantand robin, it is taking rather long time to open the edit page after clicking the edit button. Is that a problem from my webhost or the code?
February 24, 2014 at 11:49 am #142860In reply to: Add a Class to my Body Tag using the Forum Title
Lynqoid
ParticipantThis is what you will need to use to actually add a class to the body class. You could look at getting the post by the get_queried_object(); function in WordPress and then getting the title of that object. After that you could then use the sanitize_title_with_dashes($forum_title); to get a safe class name.
Please note I haven’t fully tested the code below and i’m not sure the $forum_object->post_title; will work but it get’s you moving in the right direction π
<?php $forum_object = get_queried_object(); $forum_title = $forum_object->post_title; $forum_class = sanitize_title_with_dashes($forum_title); ?> <body <?php body_class($forum_class); ?>>Good luck!
February 24, 2014 at 9:43 am #142856Topic: Add a Class to my Body Tag using the Forum Title
in forum InstallationRackmire
ParticipantHi,
I’m trying to build a theme for my BBpress site and I would like to add a class to my body tag that changes depending on where the user is within the forum but only for within a forum area.
For instance… On my BBpress installation, if I have these forums:
- Green
- Red
- Blue
- Yellow
If the user view topics within the ‘Green’ forum/sub-forum it add the classname ‘green’ to the body tag i.e “<body class=”green”>” I would like it to use the Forum’s title that is set. Can somebody help?
Preferably the code to be in functions.php or header.php / bbpress theme files. I don’t want to hack the bbpress core files.
I want to do this so I can change the way it looks i.e background colour etc.
And the Homepage stays the same: <body> (with no classname unelss set within the header.php of the theme file.
Thanks
February 24, 2014 at 7:43 am #142853In reply to: How to users LOGOUT?
Lynqoid
ParticipantYou can use the wp_logout_url.
https://codex.wordpress.org/Function_Reference/wp_logout_url<a href="<?php echo wp_logout_url(); ?>">Logout</a>Good luck!
February 23, 2014 at 11:59 am #142838Topic: How to users LOGOUT?
in forum TroubleshootingFLIXALMedia
ParticipantHi there
Im just getting to grips with bbpress and Buddypress but I cannot see anywhere my users are able to logout? Is there a shortcode I can put in a separate page?
Very confused
Thank you
LucyFebruary 23, 2014 at 10:47 am #142835In reply to: Show User Profile Information
Nic
Participantsure. just add the following code to your theme’s functions.php:
function add_extra_contactmethod( $contactmethods ) { // Add new ones $contactmethods['twitter'] = 'Twitter'; $contactmethods['facebook'] = 'Facebook'; $contactmethods['googleplus'] = 'Google Plus'; $contactmethods['youtube'] = 'Youtube Kanal'; // remove unwanted unset($contactmethods['aim']); unset($contactmethods['jabber']); unset($contactmethods['yim']); return $contactmethods; } add_filter('user_contactmethods', 'add_extra_contactmethod');this removes “aim, jabber and yim” but adds twitter, facebook, yt and googleplus
February 23, 2014 at 5:10 am #142828In reply to: different ways to get reply content?
Robin W
ModeratorThink you probably need to crack open the plugin, and see where GD bbPress Attachments is adding a filter, and exactly what code it is using. You might then be able to mod this in your loop to re-strip it out.
February 23, 2014 at 4:28 am #142826In reply to: bbpress sidebar at bottom of page
Robin W
ModeratorNo problem. Just a quick thought, as I might be able to solve it a different way.
Are you using a page called forums and the shortcode [bbp-forum-index]
or did it just come sup in your menu when you installed it?
It’s Ok, neither is wrong, I just need to know which !
ie which in section 3 of the attached did you do
February 23, 2014 at 1:02 am #142825In reply to: Set depth of indent for threaded replies…
crzyhrse
ParticipantIt occurs to me to add that I’m nearly illiterate when it comes to code so including the code I’m looking for and what I would want to change would be helpful… Thanks…
February 22, 2014 at 11:10 pm #142817Topic: bbPress/Woocommerce/Slider Revolution conflict
in forum Pluginse11eca
ParticipantHello!
I’m having an issue with bbPress 2.5.3, Slider Revolution 4.0.5, and Woocommerce 2.1.2. I contacted Slider Revolution, and they said they couldn’t figure out the issue and that I should contact my theme creator since their plugin came bundled with my theme, but the theme creator says it isn’t a theme issue, so I’m reaching out to bbPress since the Woocommerce help desk is down for the weekend in hopes I can at least get a leg up – even though it’s a pretty weird triple-plugin conflict.
1. When all plugins are activated, layer styles in Revolution Sliderβs slide editor show a tiny white font in all the previews, but only generate default dark text.
2. When all plugins are activated, I cannot add a slider to a page where bbPress forums are active – it just doesn’t appear, even when I have disabled the theme’s default header, or tried to insert it via shortcodes or php. (Any other page and the slider loads fine)
3. When I deactivate bbPress and its associated plugins, the slider loads correctly because there is no forum on the page.
4. When bbPress and Woocommerce are both deactivated, everything works as it is supposed to in the editor as well.
Existing sliders on the website still load correctly – it’s just an issue of making new ones with a forum on the same page, and getting the editor to work. bbPress prevents a slider created in the Slider Revolution plugin from being published on a page with a forum, and Woocommerce messes up the editor.
Any help or ideas are appreciated. I’ve tried the troubleshooting options in the plugins and nothing seems to fix the issue. Thanks!
February 22, 2014 at 5:17 pm #142813Topic: different ways to get reply content?
in forum ThemesJosh
ParticipantWhat is the best way to get the content of a reply? Right now I’m using
bbp_get_reply_content()and it was working fine until I added the GD bbPress Attachments plugin. Somehow that plugin is adding text to the end of the reply content, which doesn’t show up in the forums itself but does show up in a custom forum loop I have on my homepage. E.g replies look like this: “Lorem ipsum etc. Attachments: [delete | detach] [delete | detach] [delete | detach].” FYI, I’m using wp_trim_words to only get the first 30 or so words of the reply, so this garbage text from the plugin only appears on very short replies.Is there a different way to get the reply text? Anybody else have this issue with the attachment plugin?
Thanks.
February 22, 2014 at 3:57 am #142800In reply to: overwrite functions with theme's functions.php
Robin W
Moderator@netweb Stephen, Thanks for this, and having now looked at the trac ticket and bbp_parse_args function I see how this works.
Wherever you see bbp_parse_args, there’s a filter for the function to do this.
bbp_parse_args has the format
function bbp_parse_args( $args, $defaults = array(), $filter_key = '' )The resultant filter name is made up of bbp_before_’ . $filter_key . ‘_parse_args’
(there is an bbp_after one as well!)
The filter key is the third argument in the bbp_parse_args
$r = bbp_parse_args( $args, array( 'before' => '<ul class="bbp-forums-list">', 'after' => '</ul>', 'link_before' => '', 'link_after' => '', 'count_before' => '<span>', 'count_after' => '</span>', 'count_sep' => '</span><span>', 'separator' => '', 'forum_id' => '', 'show_topic_count' => true, 'show_reply_count' => true, ), 'list_forums' );so ‘list_fourms’ in the last line is the third argument.
This should help you for the other two functions, as filters will then be obvious !
February 22, 2014 at 12:14 am #142798In reply to: overwrite functions with theme's functions.php
Stephen Edgar
Keymaster@nicmare To remove the separator:
add_filter('bbp_before_list_forums_parse_args', 'nicmare_bbpress_list_forums' ); function nicmare_bbpress_list_forums() { $args['separator'] = ''; return $args; }A good explanation for
bbp_get_topic_admin_linksandbbp_get_reply_admin_linksis here: -
AuthorSearch Results