Chuckie (@ajtruckle)

Forum Replies Created

Viewing 25 replies - 251 through 275 (of 399 total)
  • @ajtruckle

    Participant

    It seems to be this html that builds a load of divs:

            function build_html() {
                
                $this->sort_users();
                $data = $this->stats_builder();
                $HTMLOutput = "";
                
                foreach( $data as $key => $html ) {
                   $HTMLOutput .= "<div class='bbpas-" . $key . "' id='bbpas-" . $key . "'>" . $html . "</div>";
                }
                
                return $HTMLOutput;
            }
    

    That is called by this:

    function widget( $arg, $instance ) {
            
            echo $arg['before_widget'] . 
                 $arg['before_title'] . 
                 $instance['heading'] . 
                 $arg['after_title'] . 
                 $this->_parent->online->build_html() . 
                 $arg['after_widget'];
        }     

    So the is_logged_in test would have to be applied to build_html and if $key is a certain value do the logged in test.

    Elsewhere i found this:

                // Section: Users active in last x hours
                if(in_array( 'last_x_hours', $stat ) ) {                
                    $HTMLOutput["inactive"] = $this->section_userstats( $this->stats, "inactive" );                
                }
    

    So I guess the $key of interest is inactive. Funny index to use for that …

    @ajtruckle

    Participant

    I have done php. Actually wrote a website a few years ago that worked with a my-sql database. I also did a backend which was a Microsoft Visual C++ standalone executable that had access to the database for managing content. The site is not live any more.

    My struggles are with debugging. It is not like Visual C++ when I can run through it step by step.

    And there is the basic mechanics of how the whole thing works. No manuals with details information about bbPress mechanics.

    So I already have a good knowledge but I am leading myself blind with it and I don’t like that …!

    @ajtruckle

    Participant

    OK. Thanks. Because we need a good plugin like this (if not core functionality anyway). But it should expose usernames if we don’t want it to when no one is logged in.

    I will leave it active as it is better than nothing and I don’t have an alternative that I know of that is without charge.

    @ajtruckle

    Participant

    True. 🙂

    @ajtruckle

    Participant

    Infact … to provide more info …

    If I say log in as “Test123” normal user and hover over his profile URL, it is all lowercase “test123” but clicking the link will not work. If I change the link by pasting it into a browser and adjusting it to “Test123” then the link works and I can now view my profile.

    So there is an issue with normal users who have title case in their user name and not being allowed to view their profiles because the slugs in the links are all lowercase. Admin can view these profiles but not the users.

    Only users who has all lowercase usernames can view their profiles.

    In reply to: Plugin for emoticons

    @ajtruckle

    Participant

    I just use the emoticons plugin with my TinyMCE toolbar. These show as emoticons when you hit submit.

    @ajtruckle

    Participant

    Only problem with the other forum is it doesn’t look like it is supported any more.

    @ajtruckle

    Participant

    See:

    Freshness doesn’t seem to update as quickly any more?

    Towards the end there is a plugin that has temporarily been created to workaround the freshness issue.

    @ajtruckle

    Participant

    @ajtruckle

    Participant

    Sounds exciting @johnjamesjacoby!

    @ajtruckle

    Participant

    I ended up using “Theme My Login” plugin which is fantastic and resolved all my issues with every aspect of login features.

    @ajtruckle

    Participant

    Well, I am using your bbp style pack. Is it possible that some kind of vent hook had a priority change with the numbers in the source code which is not reflected in the style pack? Ie. Is it possible that in some instances hooks might not get executed? I recall the one instance where the number had been changed. This is only a hunch.

    Andrew

    @ajtruckle

    Participant

    I have an update for you @robin-w

    I thought I had set up “WP Super cache” to ignore the support_forums URLs but I don’t know if that was working. I have deactivated by caching plugin and done a test and it seemed to work.

    I am going to leave caching off and see how it goes (with your plugin active and my caching deactivated).

    @ajtruckle

    Participant

    BUT

    If I activate your plugin then it works. Those sub forum topics replies are updating the parents forums correctly.

    So the only differences are:

    1. The forum that I was testing with on my site was closed.
    2. Thus the topic I was adding a reply to was closed.
    3. For all the others (my private forums) they are inside Categories.

    Hope this helps.

    @ajtruckle

    Participant

    I tried @robin-w your requested setup (with the new plugin deactivated).

    It was as we expect. Creating the new topic shows the freshness correctly. Adding one or two replies only shows the freshness correct in the forum that the topic belongs to. The parent forum of the sub forum has not been updated with the replies freshness.

    @ajtruckle

    Participant

    Just had a thought. In the ancestor list how does it know when it is a category item instead of a forum?

    @ajtruckle

    Participant

    I would have to try that on a staging area as I will have to create some forums. It will have to be tomorrow morning now unless someone else gets to it.

    @ajtruckle

    Participant

    So is there any way that I can provide for you the results for:

    $ancestors = array_values( array_unique( array_merge( array( $topic_id, $forum_id ), (array) get_post_ancestors( $topic_id ) ) ) );

    Or

    foreach ( $ancestors as $ancestor )

    ?

    @ajtruckle

    Participant

    This could be why? In your code:

    			// Reply meta relating to most recent reply
    			if ( bbp_is_reply( $ancestor ) ) {
    				// @todo - hierarchical replies
    

    I had just made a most recent reply. So it is doing nothing. I dunno. You know the code better.

    @ajtruckle

    Participant

    I am thinking that the most practical way to get a resolution is to debug a live website that is having issues. At least to find out what is going on.

    If debug seemed fine then is is a issue similar to C++ where debug initialises variables but release does not?

    I am happy to help in any way I can. I have to go out this evening so my time is now limited. But it seems to me we need to have a debug output of the “walking up the ancestors” to see where it is breaking down for me. Then this is probably the same for others I expect.

    @ajtruckle

    Participant

    I am afraid it doesn’t work.

    I specifically added a reply to the public forum in my public category.

    At the top of the screen it said I had updated it 1 second ago. I then clicked the “Frequently Asked Questions” breadcrumb. That was correct and listed 13 second ago.

    Then I clicked the General Information category breadcrumb and it is wrong. For FAQ it is listing 4 weeks 1 day ago. Similar if I click the root breadcrumb. 4 weeks 1 day ago is the last topic freshness that is in the FAQ board. If i look at that board now I 4 posts. The penultimate is the one I added a reply to which says 3 minutes ago. Then there is the final topic with the freshness that is reported on the category index.

    It simply is not cascading freshness at all (for replies) to parent categories and up.

    What I don’t understand is that we can run the repair tool and it works so why can the logic be used there in a localised for to fix this?

    Shall I deactivate your plugin?

    Andrew
    PS. the post in question was closed but it allowed me to add a reply, and as I say on the actual forum page the freshness is correct.

    @ajtruckle

    Participant

    No. Not using threaded / nested replies.

    @ajtruckle

    Participant

    But that is only one category. The other three categories are private with private forums.

    Andy

    @ajtruckle

    Participant

    @robin-w Do we have any idea on when this may be resolved?

    Thank you.

    Andrew

    @ajtruckle

    Participant

    Go to Settings | Discussions and increase the limit for allowed links. Or switch off moderation altogether by adding this to your child theme functions.php or add a snippet:

    // ==============================================================
    // Switch off bbPress Forum moderation
    add_filter( 'bbp_bypass_check_for_moderation', '__return_true' );
    // ==============================================================
Viewing 25 replies - 251 through 275 (of 399 total)