Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,301 through 9,325 (of 32,519 total)
  • Author
    Search Results
  • #159377

    In reply to: Sidebar won't go away

    Robkk
    Moderator

    i 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

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    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.

    #159376
    Robkk
    Moderator

    @dealtek

    dont 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

    Functions files and child themes – explained !

    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;
    	}
    }
    
    #159374

    In reply to: Replies Not Visible

    Robkk
    Moderator

    it might be a theme issue, if you havent created a bbpress.php file please do so it usually fixes most common theme issues.

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    you can also link to your site and see if i can find any conflicting CSS that might be causing the issue.

    #159373
    eVersatile
    Participant

    So 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?

    #159372
    Igor Yavych
    Participant

    Hello. 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_content and bbp_get_topic_content but they exhibit kind of weird behavior. bbp_get_topic_content does exactly nothing, and bbp_get_reply_content filters content of first post, which is actually topic and I’m pretty sure should be filtered by bbp_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.

    #159353

    In reply to: Image code question

    alfonma
    Participant

    I 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

    #159342
    Robin W
    Moderator

    ok, this could be lots of things, and part of what you mention is buddypress not bbpress.

    so start with

    Step by step guide to setting up a bbPress forum – Part 1

    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.

    #159341

    In reply to: Forum Page ID's

    Robin W
    Moderator

    There 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

    #159339
    peter-hamilton
    Participant

    Hui

    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.

    #159331

    In reply to: Image code question

    Mizagorn
    Participant

    I 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.php in 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.

    #159323

    In reply to: Forum Page ID's

    Alice Kaye
    Participant

    Yeah, 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.

    #159322
    Robin W
    Moderator

    the 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 !

    #159319

    In reply to: Forum Page ID's

    Robin W
    Moderator

    I’ll admit CSS is not always my friend

    Whilst really useful I hate this as well.

    Where are you putting that code?

    #159314

    In reply to: Forum Page ID's

    Alice Kaye
    Participant

    Hi @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!

    #159308
    #159291
    Robin W
    Moderator

    its a theme issue,

    Try the alternate methods here

    Step by step guide to setting up a bbPress forum – Part 1

    #159269
    Robin W
    Moderator
    #159262

    In reply to: widget side

    Robin W
    Moderator

    The 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

    Functions files and child themes – explained !

    #159260

    In reply to: widget side

    Robin W
    Moderator

    I meant adding his code to the style.css ?

    #159241
    mvasicm
    Participant

    Am I right that I should put this code into functions.php file in my theme right?

    Im still getting english version.

    error message

    #159240
    Robin W
    Moderator

    I 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 !

    #159239
    mvasicm
    Participant

    I 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 );

    ?>

    #159238
    mvasicm
    Participant

    Hello 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

    #159236
    Robin W
    Moderator

    I 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’

    Functions files and child themes – explained !

    #159235

    In reply to: bbpress ranking

    Robin W
    Moderator

    you’d add this code in the theme function`’s files

    Functions files and child themes – explained !

Viewing 25 results - 9,301 through 9,325 (of 32,519 total)
Skip to toolbar