Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,301 through 9,325 (of 32,511 total)
  • Author
    Search Results
  • #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 !

    #159234

    In reply to: bbpress ranking

    Robin W
    Moderator

    You cuurentl show the bbpress user roles under the avatar on each topic/reply

    you can either change the display name or add new roles to achieve this

    see

    https://codex.bbpress.org/bbpress-user-roles-and-capabilities/

    Custom Capabilities

    #159228
    Nicolas Korobochkin
    Participant

    I’ve posted the long article about this question on my blog with source codes, examples and screenshots (on Russian language): https://korobochkin.wordpress.com/2015/02/10/rukovodstvo-po-sozdaniju-stranicy-registracii-v-multisajte/

    #159224
    mattvr
    Participant

    @robin-w I did deactivate the plugins and found out it was Yoast’s breadcrumbs causing this.


    @Robkk
    apologies but where would I put this code? Sorry, I’m a bit new to coding. Found it!

    Thanks for all your help.

    #159217
    Pewit
    Participant

    If I add an image with a caption using the tinyMCE editor it generates the code below which is displayed properly in the WP editor and if I preview the post from outside the forum.

    [caption id="attachment_683" align="alignnone" width="300"]<a href="/wp-content/uploads/2014/08/IMG_0089.jpg"><img class="size-medium wp-image-683" src="/wp-content/uploads/2014/08/IMG_0089-300x225.jpg" alt="An image description" width="300" height="225" /></a>My image caption[/caption]

    However, once the post is added to the forum, I get the image but the caption codes are ignored.

    [caption id="attachment_683" align="alignnone" width="300"]
    <my image here>
    My image caption[/caption]
    

    I have tried switching Themes to Twenty Fiifteen and Twenty Thirteen but the problem persists.

    My site here
    WP Version 4.1.1
    BB Press Version 2.5.4

    #159215
    Robkk
    Moderator

    common issue with yoast breadcrumbs.

    /**
     * Filter to call default bbPress breadcrumbs
     */
    add_filter( 'bbp_get_breadcrumb', 'myfix_bbp_get_breadcrumb', 1, 3 );
    function myfix_bbp_get_breadcrumb($trail, $crumbs, $r){
            // This will remove wordpress-seo filter to disable bbPress breadcrums by default
            remove_all_filters("bbp_get_breadcrumb",10);
            return $trail;
    }

    use this to enable bbPress breadcrumbs

    #159213
    Robin W
    Moderator

    yes you’ll need to enable debugging and have a play to see where the error is

    see

    https://codex.wordpress.org/Debugging_in_WordPress

    #159207

    In reply to: widget side

    Robin W
    Moderator
    #159204
    mattvr
    Participant

    Hi @robin-w

    Thanks for responding, but it’s not really a name change. Kindly see this link
    the breadcrumbs for that is Home | Topics | News & Announcements | Welcome to Nurseslabs and our forums! how come it points to Topics rather than the forum’s homepage?

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