Search Results for 'code'
-
AuthorSearch Results
-
March 8, 2015 at 10:04 pm #159377
In reply to: Sidebar won't go away
Robkk
Moderatori see it on the right..i think.
is it a userpro widget or does it do this automatically??
if its just a userpro widget , and you want to remove the sidebar from all bbPress forum areas create a bbpress.php from page.php or single.php and remove all the content you dont need especially the get_sidebar php code.
heres some help on creating a bbpress.php
if userpro does it automatically contact the plugin author.
if you need any help creating a bbpress.php file and removing the unnecessary code you wouldnt need , reply back and possibly paste your page.php file first.
March 8, 2015 at 9:41 pm #159376In reply to: less distance – left margin between threaded replies
Robkk
Moderatordont edit the core files or you will lose them the next time you update bbPress.
please follow this guide instead
https://codex.bbpress.org/theme-compatibility/
and please create a child theme as the guide says to , because it will make customizing bbPress alot easier. you can edit all the bbPress templates that you have copied to your child theme safely if you go to appearance>editor and choose your child theme and find the bbPress templates/css, you can also use FTP and a advanced text editor like notepad++ to edit files on your cpu.
here is more information on child themes
the left margin CSS for bbPress threaded replies is
#bbpress-forums ul.bbp-threaded-replies { margin-left: 50px; }to make it smaller for a small device use something like this.
put it anywhere you can put custom CSS
or if you copied the CSS file into a folder called bbpress into your child theme , you can add it below
/*-------------------------------------------------------------- Media Queries --------------------------------------------------------------*/ /* =Standard Mobile Landscape -------------------------------------------------------------- */ @media only screen and (max-width: 480px) {@media only screen and (max-width: 480px) { #bbpress-forums ul.bbp-threaded-replies { margin-left: 20px; } }you can remove the reply author image too if you want
@media only screen and (max-width: 480px) { #bbpress-forums div.bbp-reply-author a.bbp-author-avatar, #bbpress-forums div.bbp-topic-author a.bbp-author-avatar { display: none; } }March 8, 2015 at 9:11 pm #159374In reply to: Replies Not Visible
Robkk
Moderatorit might be a theme issue, if you havent created a bbpress.php file please do so it usually fixes most common theme issues.
you can also link to your site and see if i can find any conflicting CSS that might be causing the issue.
March 8, 2015 at 7:33 pm #159373In reply to: php actions; Authors and Topics
eVersatile
ParticipantSo I was able to find a solution to my second issue by using
<?php elseif ( bbp_is_topic_closed() ) : ?>to detect if the topic is closed or not.
I am still having problems with the first one. Trying to only show content to the author of the topic. I have tried<?php elseif ( get_topic_author() ) : ?>and<?php elseif ( current_user_can() ) : ?>nothing has worked for me yet. Any ideas?March 8, 2015 at 7:20 pm #159372Topic: Trying to make my plugin compatible
in forum PluginsIgor Yavych
ParticipantHello. Since few people asked for it (I think there was even thread here few months ago), I’m trying to make my plugin (https://wordpress.org/plugins/simple-rating/) compatible with bbPress. As far as I understand, bbPress got own filters for content and that’s exactly where I got stuck. I can’t find list of filters. I found
bbp_get_reply_contentandbbp_get_topic_contentbut they exhibit kind of weird behavior.bbp_get_topic_contentdoes exactly nothing, andbbp_get_reply_contentfilters content of first post, which is actually topic and I’m pretty sure should be filtered bybbp_get_topic_content.
Screenshot
So questions are:
– Is there a list of filters?
– If no, what are filters I should use to filter content of topic, reply and forum?
– What is this problem I described above?
bbPress version is latest stable available.March 8, 2015 at 2:54 pm #159353In reply to: Image code question
alfonma
ParticipantI think the code is in the wp-includes/js/quicktags.js file on line 621 , and in the quicktags.min.js on line 152 of the formated version.
if ( src ) { alt = prompt(quicktagsL10n.enterImageDescription, ''); this.tagStart = '<img src="' + src + '" alt="' + alt + '" />'; qt.TagButton.prototype.callback.call(this, e, c, ed); }best regards
March 8, 2015 at 10:56 am #159342In reply to: Activate the community bbpp
Robin W
Moderatorok, this could be lots of things, and part of what you mention is buddypress not bbpress.
so start with
and if you aren’t seeing forums/topics and replies in the back end then
It could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
March 8, 2015 at 10:52 am #159341In reply to: Forum Page ID's
Robin W
ModeratorThere is no need to copy the bbpress.css file.
you just need to put it in your child theme’s style.css, BUT add the ‘!important ‘ which stops bbpress overwriting it.
.forum bbpress single single-forum postid-20 #fixed-background { background: url('http://www.heartwoodgaming.com/wp-content/uploads/2015/02/ffxiv-background.jpg') !important; }You may find you don’t need all the string above ie ‘.forum bbpress single single-forum postid-20 #fixed-background ‘ but have a play if the full doesn’t work, or come back with a url/link and I’ll try to help
March 8, 2015 at 9:15 am #159339In reply to: less distance – left margin between threaded replies
peter-hamilton
ParticipantHui
I dont use threaded comments so can not check the exact code, but should be easy with css.
Check out @media queries for your stylesheet, then you could add styles to remove comment/reply avatars and change the margins.
Perhaps another member has better details for you.
March 7, 2015 at 11:05 pm #159331In reply to: Image code question
Mizagorn
ParticipantI am looking at why the ‘img’ shortcode is making URLs have encoding in them so that the browser will not load an image.
Anyway, the shortcode code is in
bbcodes.phpin lines 487-502. That might get you started, but I don’t think that has the part where it actually generates the “src” and “alt” tags.What I usually do is use “Inspect Element” in FF or Chrome, find the class or ID for the element, then use grepWin to search for that within the WP code files. That would work only if you have FTP’d the files to your local rig, though.
March 7, 2015 at 10:39 am #159323In reply to: Forum Page ID's
Alice Kaye
ParticipantYeah, it’s just very difficult to get it to work the way I want sometimes.
Anyhoo, I put it in my themes custom css box. Though now in hindsight that seems foolish. I suppose what I really need to do is make a copy of the bbpress stylesheet and then update that with this code and upload it to the bbpress folder inside of my child theme/bbpress.
Am I on the right track? Sorry for any typos. Writing this on my cellphone.
March 7, 2015 at 9:56 am #159322In reply to: bbpress.pot is missing line
Robin W
Moderatorthe following works
//This function changes the text wherever it is quoted function change_translate_text( $translated_text ) { if ( $translated_text == '<strong>ERROR</strong>: Your topic needs a title.' ) { $translated_text = '<strong>CHYBA</strong>: Vaše téma musí mít název.'; } return $translated_text; } add_filter( 'gettext', 'change_translate_text', 20 );but equally well, the line is in the pot on line 3727 as
Line 3727: msgid "<strong>ERROR</strong>: Your topic needs a title."so you could just use then normal translate !
March 7, 2015 at 3:51 am #159319In reply to: Forum Page ID's
Robin W
ModeratorI’ll admit CSS is not always my friend
Whilst really useful I hate this as well.
Where are you putting that code?
March 6, 2015 at 7:07 pm #159314In reply to: Forum Page ID's
Alice Kaye
ParticipantHi @robin-w,
I just realized that you responded to this. I’m not sure how I missed this!
I just tried to give this a go (man sometimes this stuff isn’t easy to find) and it’s so far not doing what I want. I’ll admit CSS is not always my friend.
The code I’m using is below:
.forum bbpress single single-forum postid-20 #fixed-background { background: url('http://www.heartwoodgaming.com/wp-content/uploads/2015/02/ffxiv-background.jpg'); }I was hoping that would be how I needed to set it up, but I’m starting to think, not…
Could you take a look at that and let me know where I might have gone wrong? Let me know if you need access to my site to see my bbPress, I have a test account set up for situations such as this! 😛
Thanks in advance!
March 6, 2015 at 3:54 pm #159308Topic: A Login/Logout link in another menu
in forum TroubleshootingJoseph
ParticipantI needed to add a Login/Logout link in one of my navigation menus.
Using this from the bbpress docs got my link to work, but how would I add this link into another menu? For example, the link went into the menu below my logo in the header, but I would like to use it in my very top menu (above the logo).
March 6, 2015 at 11:52 am #159291In reply to: Forum does not show properly
Robin W
Moderatorits a theme issue,
Try the alternate methods here
March 5, 2015 at 12:38 pm #159269In reply to: wrong sidebar on topics page
Robin W
ModeratorMarch 5, 2015 at 5:56 am #159262In reply to: widget side
Robin W
ModeratorThe link you gave
Sidebar on left for Forums, then right for Forum and Topic – Why?
had this as his solution
Just swap the floating elements from left to right, where content becomes right and sidebar becomes left. Remember to end with the !important to override any other CSS. Code is thus:
.bbpress.single-forum #main #content {float:right!important;} .bbpress.single-forum #main #sidebar {float:left!important;} .bbpress.single-topic #main #content {float:right!important;} .bbpress.single-topic #main #sidebar {float:left!important;}You need to put the code in your style.css
March 5, 2015 at 5:32 am #159260In reply to: widget side
Robin W
ModeratorI meant adding his code to the style.css ?
March 4, 2015 at 3:20 pm #159241In reply to: bbpress.pot is missing line
mvasicm
ParticipantAm I right that I should put this code into functions.php file in my theme right?
Im still getting english version.
March 4, 2015 at 3:03 pm #159240In reply to: bbpress.pot is missing line
Robin W
ModeratorI just looked and it’s actually in the code as
<strong>ERROR</strong>: Your topic needs a title.and the translate works on exact !
which might explain why it didn’t work in the pot
you can try it as one phrase, and if that doesn’t work, then make it two
ie
//This function changes the text wherever it is quoted
function change_translate_text( $translated_text ) {
if ( $translated_text == ‘ERROR:’ ) {
$translated_text = ‘CHYBA:’;
}
if ( $translated_text == ‘Your topic needs a title.’ ) {
$translated_text = ‘Vaše téma musí mít název.’;
}return $translated_text;
}
add_filter( ‘gettext’, ‘change_translate_text’, 20 );The same is probably true of the POT file, so you try all that there first !
March 4, 2015 at 2:57 pm #159239In reply to: bbpress.pot is missing line
mvasicm
ParticipantI changed syntax and the code is ok, but nothing happen on the page.
//This function changes the text wherever it is quoted
function change_translate_text( $translated_text ) {
if ( $translated_text == “ERROR: Your topic needs a title.” ) {
$translated_text = “CHYBA: Vaše téma musí mít název.”;
}
return $translated_text;
}
add_filter( ‘gettext’, ‘change_translate_text’, 20 );?>
March 4, 2015 at 2:54 pm #159238In reply to: bbpress.pot is missing line
mvasicm
ParticipantHello Robin,
thanks for quick response.
I tried to add manually into .po file, but it doesnt work I dont know why…
#~ msgid “ERROR: Your topic needs a title.”
#~ msgstr “CHYBA: Vaše téma musí mít název.”Then I tried your way, function file, but there seems to be error in your code. It says:
Parse error: syntax error, unexpected ‘:’ in /data/web/virtuals/82697/virtual/www/domains/investplanet.cz/wp-content/themes/sahifa/functions.php on line 139
March 4, 2015 at 2:09 pm #159236In reply to: bbpress.pot is missing line
Robin W
ModeratorI hope the theme authors read this.
In the meantime either add it manually and keep a note
or add this to your functions file
//This function changes the text wherever it is quoted function change_translate_text( $translated_text ) { if ( $translated_text == 'old text' ) { $translated_text = 'new text'; } return $translated_text; } add_filter( 'gettext', 'change_translate_text', 20 );just put the old and new words to change ‘old test’ and ‘new text’
March 4, 2015 at 2:04 pm #159235In reply to: bbpress ranking
Robin W
Moderatoryou’d add this code in the theme function`’s files
-
AuthorSearch Results
