Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 7,751 through 7,775 (of 13,539 total)

  • Robin W
    Moderator

    @robin-w

    great – glad you are fixed


    Robin W
    Moderator

    @robin-w

    initially I’d ask learndash, and this is a paid plugin that I don’t have access to


    Robin W
    Moderator

    @robin-w

    the error is a permissions one.

    Does this occur on both the front end and the back end (dashboard>topcis>create new topic)
    Is it just one user, all users?

    In reply to: Recent replies list

    Robin W
    Moderator

    @robin-w

    not sure why, but adding show seems to fix

    <?php echo do_shortcode(‘[bbpress_recent_replies_by_topic show =5]’) ?>


    Robin W
    Moderator

    @robin-w

    I’ve been thinking this over, and can’t see a simple way to achieve this.

    To get something working would involve adding extra fields to a topics meta data, and then filtering the display to catch.

    With the forum visible in effect the code for a forum or set of forums would need to (by default) make a topic private using an additional field, and then all the display parameters would need to hide it unless made public. That means closing every back door in search, profiles, displays, freshness all widgets and other areas so that no-one sees it unless set to public, which is one hell of a lot of work, and a large re-write of many bbpress functions.

    I could modify my private groups plugin which makes forums (but not content) visible, so that certain topics are shown, but again it is a heap of code. Beyond free help I’m afraid, but if you want to look at that route contact me via my website http://www.rewweb.co.uk

    In reply to: Recent replies list

    Robin W
    Moderator

    @robin-w

    whereabouts in loop-forums.php did you put it ?


    Robin W
    Moderator

    @robin-w

    can you post the whole of your code – so I can copy/paste into my file and check what it does on mine


    Robin W
    Moderator

    @robin-w

    bbpress with a default theme (eg twentseventeen) will do the following

    • search for say ‘hello’
    • bbpress will produce all single topics and single replies that match this (which could be many)
    • for a reply you will see the reply with the words In reply to :the topic name as a link
    • click the topic name and you are taken to the topic

    If this is not what you are getting, then come back


    Robin W
    Moderator

    @robin-w

    did you change the filter – I was calling the wrong one should be

    add_filter( 'bbp_get_topic_freshness_link', 'rew_freshness_no_date_link' , 100, 5)


    Robin W
    Moderator

    @robin-w

    In reply to: access control

    Robin W
    Moderator

    @robin-w

    no problem, come back if I can help further 🙂


    Robin W
    Moderator

    @robin-w

    ok, so the forum is visible as existing, but non-logged-in can only see designated threads, other threads are not visible until they log in.

    Trying to think how easy that would be to achieve

    I’ll come back…


    Robin W
    Moderator

    @robin-w

    sort of but not quite 🙂

    if you don’t allow anonymous posting, then all threads are ‘locked’ to non-logged in users.

    Can you explain further with an example – just me not understanding I expect


    Robin W
    Moderator

    @robin-w

    thanks fro your post – I’m author of private groups.

    When you say ‘lock certain threads to non-logged in users’ – are you allowing anonymous posting?


    Robin W
    Moderator

    @robin-w

    ok, should have tested before sending, but coded it late last night and I have been out all day !

    Now had a chance to try it, and correct code is

    add_filter( 'bbp_get_topic_freshness_link', 'rew_freshness_no_date_link' , 100, 5) ; 
    	
    function rew_freshness_no_date_link($anchor, $topic_id, $time_since, $link_url, $title) {
    	if (!empty ($topic_id)) {
    	?>
    	<a href="<?php echo $link_url; ?>"><?php echo $title ;?></a> (<?php echo $time_since ; ?>)
    	<?php
    	}
    	else echo 'No topics' ;
    }
    In reply to: access control

    Robin W
    Moderator

    @robin-w

    ok, thanks that helps.

    ONE

    you have set the forum to private in dashboard>forums>all Forums>do-i-quality>edit and visibility options on the right hand side in the forum attributes set to private.

    A private forum is one that is not public, so its existence is also not public. It therefore returns a 404 error to someone not logged in, as bbpress doesn’t know the difference between a user who is not logged in and any member of the public. Once logged in they see the forums. Most users click the remember me button and save passwords in their browser. When not logged in they will not see the existence of the forums. If you want the forums to be visible, then the private groups plugin above will do that.

    TWO

    This is simply a forum with dashboard>forums>all Forums>bylaws>edit and visibility options on the right hand side in the forum attributes set to public.

    THREE

    I’ll look through the wording again to see if I can make it better – I did write it some time ago, and probably due for a review but the settings are in there viz

    Forum visibility:

    Public – Anyone can see these forums
    Private – Only logged in registered users with a forum role can see these forums
    Hidden: Only Moderators/keymasters can see these forums

    Visibility is set for each forum, go into Dashboard>forums> and when you add/edit a forum, you will see visibility options on the right hand side in the forum attributes.

    By default forums are available to be publically viewed. If you set anonymous posting to be on (see 4. Above) then anyone can also post.


    Robin W
    Moderator

    @robin-w

    SORRY – just read you post again, and now I think I understand

    on one site you want the code as above

    on another site you just want a single post, but with title and date, but no link on the date – yes ?

    if so then untested but this should be it

    add_filter( 'bbp_get_forum_freshness_link', 'rew_freshness_no_date_link' , 100, 6) ; 
    	
    function rew_freshness_no_date_link($anchor, $forum_id, $time_since, $link_url, $title, $active_id ) {
    	if (!empty ($active_id)) {
    	?>
    	<a href="<?php bbp_topic_permalink($active_id); ?>"><?php bbp_topic_title(active_id) ?></a> (<?php bbp_topic_last_active_time(active_id); ?>)
    	<?php
    	}
    	else echo 'No topics' ;
    }

    Robin W
    Moderator

    @robin-w

    you’ve lost me now 🙂

    The key line that does the reference is

    <a href="<?php bbp_topic_permalink($topic); ?>"><?php bbp_topic_title($topic) ?> (<?php bbp_topic_last_active_time($topic); ?>)</a>

    This translates as

    <a href="[topic link]">[topic title] ([date])</a>

    which makes both the topic title and the date a single clickable link and the code shows 3 of these.

    I’m not really sure what you are trying to achieve – I had thought you wanted 3 clickable links on both title and date, which is what the above does.

    If you don’t want the date clickable, then do

    <a href="<?php bbp_topic_permalink($topic); ?>"><?php bbp_topic_title($topic) ?></a> (<?php bbp_topic_last_active_time($topic); ?>)

    In reply to: access control

    Robin W
    Moderator

    @robin-w

    I wrote that guide.

    it says

    Private – Only logged in registered users with a forum role can see these forums

    so if you set it to private, then those forums don’t display, so no-one will see that they exist.

    so I’m not quite sure how someone not logged in will see it to click it and get the 404?

    In reply to: access control

    Robin W
    Moderator

    @robin-w

    if you want the forum’s existence to be public – ie showing in the forum list, but not accessible then use my private groups plugin, with forum visibility set.

    Private groups

    private groups is a powerful plugin, allowing lots of granularity, but for your initial requirements :

    once installed and activated, go to

    dashboard>settings>bbp private groups

    in group name settings – set up a group 1 to be called anything but say ‘registered’
    In forum visibility – activate this, and set up where you want to redirect users to
    in assign groups to roles – select ‘Add group on first or no-group login’ and set participants to be assigned group 1
    then for each forum that you want users to see exists but not access, go into
    dashboard>forums>all forums>edit the forum and
    a) set the forum to public – the plugin will stop users seeing content
    b) you will see that you can assign it to a group – so set it to group 1

    If this is all forums, you will set each to this. If you have public forms where you want anyone to be able to see the forums, then don’t set a group

    dashboard


    Robin W
    Moderator

    @robin-w

    can you explain that a bit further?

    on my site it shows 3 posts, but if there are no posts, it says ‘no topics’.


    Robin W
    Moderator

    @robin-w

    picture not showing so can’t help


    Robin W
    Moderator

    @robin-w

    The topic ID is a changeable box, so lets you change the id number. Lots of code would be needed to get it to work for titles, but this code will show the topic name in the box at the bottom

    add_action( 'bbp_reply_metabox', 'rew_topic_title' );
    
    function rew_topic_title ($post_id ) {
    	$reply_topic_id = bbp_get_reply_topic_id( $post_id );
    	?>
    	<p>
    			<strong class="label"><?php esc_html_e( 'Topic Title:', 'bbpress' ); ?></strong>
    			<label class="screen-reader-text" for="bbp_author_id"><?php esc_html_e( 'Topic Title:', 'bbpress' ); ?></label>
    			<?php bbp_topic_title ($reply_topic_id) ; ?>
    		</p>
    	<?php
    }

    Put this in your child theme function file

    Functions files and child themes – explained !

    In reply to: 404 user profile

    Robin W
    Moderator

    @robin-w

    great – glad you are fixed


    Robin W
    Moderator

    @robin-w

    Log out and log in again

    I’d also look strongly at updating your wordpress and bbpress versions to the latest, as they both have security updates

Viewing 25 replies - 7,751 through 7,775 (of 13,539 total)