Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 8,076 through 8,100 (of 32,508 total)
  • Author
    Search Results
  • #165579
    gptxffa
    Participant

    Hello,

    Obviously everyone knows what the default Forum index page looks like
    default forum index

    However I would rather be able to have the most recent topics displayed above the index like this page setup using the short codes:
    desired forum indexdesired forum index

    I cant figure out how to actually change the appearance of the forums index. I have the page in the picture above up and running, however when someone clicks on the breadcrum “forum” link, it takes them back to the default forum index, not the page i created with the recent topics listed above.

    Thanks for the help 😀 Preston

    #165585
    Robkk
    Moderator

    Try some troubleshooting. I am thinking a possible plugin issue with the menu items. The forums only being visible to Admin is the tricky one I can’t really pinpoint.

    Troubleshooting

    #165580
    Robkk
    Moderator

    I have been changing a bit of translations in the code – that’s why you might find a mistake here. What I don’t understand is, that when I upload all the original files, it still does the same mistake.

    Can’t you tell me if there’s some specific files that I should re-upload as original, in case I’ve changed something in them?

    What files did you edit, if you did edit any files?? I hope you did not edit the bbPress plugin files in the plugin directory of your site??

    I’ve never used child themes before, so I’m not sure how to do this.

    This will help you learn about creating a child theme.

    https://codex.wordpress.org/Child_Themes

    After creating the child theme just copy the bbPress templates to your child theme in a folder called bbpress.

    Or second option: Could you rewrite the htaccess hack so it might work? 🙂

    You really shouldn’t need an htaccess hack at all, that is why I said don’t use it yet.

    #165577
    benklocek
    Participant

    I’ve updated the filter code to make it work for BBPress 2.5.7+

    https://gist.github.com/benklocek/433713bceb83eec6984f

    The Keymaster title changed from “Key Master” to “Keymaster” at some point, and the filter only accepts 2 variables now.

    I would be hesitant to use @robkk’s code, as it is replacing a core function, instead of simply filtering.

    #165570
    Robkk
    Moderator

    I have been changing a bit of translations in the code – that’s why you might find a mistake here.

    You haven’t been editing core files right?? There are other ways you can translate bbPress, unless you are just editing the templates that you can copy into your child theme?

    There might be another thing you could do if you haven’t already, place all the bbPress templates in a child theme of theme in a folder called bbpress.

    Theme Compatibility

    Also remove the htaccess hack since it seems not to work. I don’t want it causing issues.

    #165566
    Robkk
    Moderator

    @mei-ling

    Did you copy and edit the bbPress templates in your child theme heavily?? Removing the hook @kachan64 pointed out, can make the code not work.

    Also does the picture save correctly in the WordPress backend?? If you could link to a forum that should has a topic with a featured image, I can check to see if there is a CSS problem.

    #165562

    In reply to: bbPress Shortcode

    Acs-Yt
    Participant

    OMG, it’s Full Width! This code resolved the problem:

    .bbpress .col-md-8 {
        width: 100% !important;
     }
    
     .bbpress .col-md-4 {
        width: 0 !important;
        display: none !important;
     }

    Thank you for helping me!

    #165561
    strategeek
    Participant

    FINAL CODE HERE.
    FOR CHECK BOXES.
    (Difference from the upper one: fixed issue with tags with more than 1 word)

    
    function displayTagElements($selectedTags, /* $userRole, */ $task){
       $html= array();
    $tags = get_categories(array('hide_empty' => 0, 'taxonomy' => 'topic-tag'));
    $selectedTagsArray = explode(',', $selectedTags);
    if($userRole != 'bbp_participant' || $task != 'edit') {
        $html[] = "";
        foreach($tags as $tag) {
            $selected = '';
            if (in_array($tag->name, $selectedTagsArray)) {
                $selected = 'checked';
            }
            $html[] = "<input type='checkbox' name='bbp_topic_tags[]'".$selected." value='". $tag->name ."'>". $tag->name ."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
        }
    } else {
        $html[] = $selectedTags;
    }
    
    return implode('', $html);
    #165559
    kachan64
    Participant
    	    if ( has_post_thumbnail($post->ID) )
    	    	echo get_the_post_thumbnail($post->ID,'thumbnail',array('class' => 'alignleft forum-icon'));
    	 }

    This is the styling for the featured image.

    bbp_theme_before_topic_title
    This part of the code determents where should featured image goes. You will need to check your code.

    #165558
    Mei Ling
    Participant

    Hi Robkk,

    I have tested your code. Well I can select in the admin panel “edit topic” or “new topic” “featured image”, I select the picture…when I turn back to the topic, no picture. It doesn’t remain selected.
    I use the latest WordPress: 4.30.

    Could you help me?

    I thank you in advance

    Mei Ling

    #165557
    kachan64
    Participant

    Thanks, the code from github is running outside of a forum loop and works on a localhost test site. They used the code in loop-forum.php

    				<?php if (($has_replies = (strstr(bbp_get_forum_freshness_link(), '<a')))): ?>
    					
    					<?php bbp_topic_title(array( 'post_id' => bbp_get_forum_id() ) ); ?>,&nbsp;<?php _ex('by ', 'bbPress Freshness Author', 'bunyad'); ?>
    					<?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 45 ) ); ?></span>
    					
    				<?php endif; ?>

    This is my code running inside a loop in loop-single-forum.php and didn’t work, will just output my forum title for some strange reason if I post to that forum’s sub-forum.

    #165555
    project_subdomain
    Participant

    @robkk I’m not sure why it’s not working proplerly (showing all divs in all forums). Could you give me a hint how the code has to look like, when I’d like to have
    forum id 1 echo div 1
    forum id 2 echo div 2
    forum id 3 echo div 3

    unforrtunately I’m not familiar with ternary operators which may be a option.

    #165554
    AntonHoelstad
    Participant

    I have been changing a bit of translations in the code – that’s why you might find a mistake here. What I don’t understand is, that when I upload all the original files, it still does the same mistake.

    Is there one or a few of the files that determine this part with the URL? Because then I could show you those, and we could see if something was wrong here?

    #165553
    AntonHoelstad
    Participant

    Good suggestions I must say! But unfortunately none of these worked either. Let me go trough them one by one:

    1. I set the permalink structure back to default. The only change here is, that when you search now, and land on the URL string “search?action=bbp-search-request&bbp_search=adwords” – you now see the frontpage for some weird reason?
    2. I have no trailing slash in the settings part of the forum
    3. I did try the htaccess hack – but this did no change? I still see the frontpage now when I try to search.

    Something weird is going on. Would it help you if I send you the code for some of the files for my plugin?

    #165550

    In reply to: bbPress Shortcode

    Robkk
    Moderator

    It should be this

    @media and (min-width: 992px) {
     .bbpress .col-md-8 {
        width: 100% !important;
     }
    
     .bbpress .col-md-4 {
        width: 0 !important;
        display: none !important;
     }
    }

    You can also try it without the media queries.

    .bbpress .col-md-8 {
        width: 100% !important;
     }
    
     .bbpress .col-md-4 {
        width: 0 !important;
        display: none !important;
     }
    #165549
    Robkk
    Moderator

    No file attachments are imported.

    phpBB

    If the image was part of the original post with using the BBCode [img] then that IS imported as part of the post, if the image was an attachment to the post then it is not imported.

    There are scripts that handles importing images from other forum software to GD bbPress Attachments that you can take a look at though. This might be custom development and you may need to hire a developer to create an importer for file attachments from phpBB though.

    #165548
    Robkk
    Moderator

    could also just be bbp_is_forum( ID )

    #165545
    Robkk
    Moderator

    Okay I have also seen posts saying file permissions and possibly a user created issue messing with comments <!-- comment--> in php files.

    You didn’t edit the files in the bbPress right??

    Before editing the file permissions you may need to do some more troubleshooting as listed here.

    Troubleshooting

    You have the right file permissions set right??

    https://codex.wordpress.org/Changing_File_Permissions

    #165539

    In reply to: bbPress Shortcode

    Acs-Yt
    Participant

    I added them into the “Simple Custom CSS” plugin, downloaded from wordpress.org.

    At the end, it looked like:

    @media and (min-width: 992px) {
     .bbpress .col-md-8 {
        width: 100% !important;
     }
    }
    

    and

    @media and (min-width: 992px) {
     .bbpress .col-md-8 {
        width: 100% !important;
     }
    }

    It is still not Full-Width 🙁

    gurselgunacar
    Participant

    Hello, i am trying to find a code or plugin to restrict url links in topics for non loged in users. For example :
    to download click here : http://www.blabla.com > non loged in users will see please register or log in to see links.

    #165535
    project_subdomain
    Participant
    <?php if ( bbp_is_single_forum('ID') ) :?>
    <div>…</div>
    <php endif;?>

    does not work (no div at all at forum with this ID).

    #165532
    Robkk
    Moderator

    Not sure yet but maybe using a conditional bbp_is_single_forum('ID') with ID being the id of the forum.

    #165530

    In reply to: bbPress Shortcode

    Robkk
    Moderator

    Where did you put the CSS?? Did you add !important to the end like this??

    width: 100% !important;

    #165527
    Robkk
    Moderator

    Okay I found a few fixes for this possible bug, I will need to contact the devs later to see if they had seen something similar before. One is an htaccess rewrite rule and the other is really something simple.

    Okay you can try the trailing slash fix mentioned here first to see if it helps, but you are not really experiencing a 404 error because the search term you are searching is stripped for some reason.

    bbPress 2.4 // ERROR // Search stopped working…

    As a test try setting your permalinks to default and try searching again to see if it will keep your search term and search for it. The query search?action=bbp-search-request&bbp_search=adwords is usually seen in the default permalink structure instead of /search.

    Also make sure you do not have a trailing slash in any of the slugs in Settings>Forums.

    The htaccess rewrite method is adding this to your htaccess file on your site that is uaually in the WordPress directory to solve the issue, but do not try this just yet, I don’t want you messing with your htaccess file

     # BEGIN bbpress search hack
    <IfModule mod_rewrite.c>
    	RewriteEngine On
    	RewriteCond %{QUERY_STRING} ^action=(.*)&bbp_search=(.*)$
    	RewriteRule ^/soeg/(.*)$ http://antonhoelstad.dk/soeg/%2/? [L]
    </IfModule>
    # END bbpress search hack
    #165520
    Robkk
    Moderator

    When I tested it, it doesn’t have the extra added query ?action=bbp-search-request&bbp_search=” like your site does.

    I also tested it with/without the forum root slug and it worked fine for me.

Viewing 25 results - 8,076 through 8,100 (of 32,508 total)
Skip to toolbar