1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Roadmap Version 1.8

Discussion in 'RoadMap' started by shibuya246, Dec 11, 2014.

  1. valMETNG

    valMETNG Administrator Staff Member Admin

    Same question for categories/categories.php.
     
    shibuya246 likes this.
  2. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    yes, it is missing a semicolon here. i have added for v1.7.1
    thanks for finding this
     
  3. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    I am trying to tidy the code up to follow the PSR standards. It will take time to get it all right and it wont affect how the code runs, but for an open source project and getting people to contribute it is better to use the standards.

    for the PSR-2 standards:

    http://www.php-fig.org/psr/psr-2/

    2.2 Files
    All PHP files MUST use the Unix LF (linefeed) line ending.

    All PHP files MUST end with a single blank line.

    The closing ?> tag MUST be omitted from files containing only PHP.
     
    valMETNG likes this.
  4. valMETNG

    valMETNG Administrator Staff Member Admin

    Very interesting. I didn't realize these were solely for standard's purposes.
     
    shibuya246 likes this.
  5. valMETNG

    valMETNG Administrator Staff Member Admin

    It appears that, when adding a comment and not checking the "Subscribe to comments" checkbox, users are still getting an email sent when comments are added/replied to.
     
  6. valMETNG

    valMETNG Administrator Staff Member Admin

    When you send a message via email, you might want to clean up the HTML tags (e.g., <br/>, <p>):
     
  7. valMETNG

    valMETNG Administrator Staff Member Admin

    Probably wouldn't cause an issue but, in messaging/messaging.php, I think you may want to include a few extra breaks in lines 73 and 76, as well as a default to return false.
     
  8. valMETNG

    valMETNG Administrator Staff Member Admin

    Not critical, but it looks like 90 and 92 of stop_spam/stop_spam_settings.php include some old bootstrap code.
     
  9. valMETNG

    valMETNG Administrator Staff Member Admin

    Upon creating a new user from admin panel User Tools (admin_index.php?plugin=user_manager&page=plugin_settings&subpage=add_user), I received the following error:

    Fatal error: Class 'UserSignin' not found in /public_html/[site]/sandbox/base/content/plugins/user_manager/user_manager_settings.php on line 708
     
  10. valMETNG

    valMETNG Administrator Staff Member Admin

    It doesn't appear that, upon installation, the admin is getting the appropriate privileges assigned. It looks like it's assigning the default privileges of a member vs. the admin. In admin_index.php?plugin=user_manager&page=plugin_settings&subpage=default_perms&role=admin, it properly shows everything set to yes. However, when I look at the admin user (i.e., the first user created upon installation), it shows:
    upload_2014-12-17_16-18-19.png
     
  11. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    thanks. i set a default in there now. i think that should just be a break on the default rather than return false;
    when you say line breaks do you mean just in the code?
     
  12. valMETNG

    valMETNG Administrator Staff Member Admin

    Sorry I wasn't clear. I meant the php word break; - inbox and messaging both have them, but compose and show message do not.
     
  13. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    thanks. maybe my editor is not showing it properly as i have the same looking line breaks. i will check my editor settings again
     
  14. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    thanks for this. hadnt tested it from here and can see 2 problems. will fix it up now
     
  15. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    thanks. have updated this and will release with v1.7.1
     
  16. valMETNG

    valMETNG Administrator Staff Member Admin

    This is what the switch statement looks like to me:
    Code:
      switch ($h->pageName)
      {
      case 'inbox':
      $messaging = true;
      $h->pageTitle = $h->lang['messaging_inbox'] . "[delimiter]" . $user;
      break;
      case 'outbox':
      $messaging = true;
      $h->pageTitle = $h->lang['messaging_outbox'] . "[delimiter]" . $user;
      break;
      case 'compose':
      $messaging = true;
      $h->pageTitle = $h->lang['messaging_compose'] . "[delimiter]" . $user;
      case 'show_message':
      $messaging = true;
      $h->pageTitle = $h->lang['messaging_view_message'] . "[delimiter]" . $user;
      }
     
  17. valMETNG

    valMETNG Administrator Staff Member Admin

    I assume I returned false in my build because, if it's not one of those pageNames, you shouldn't need to do any more processing in that function. If you just use break, you're going to execute the remaining statements in the function even though none should be applicable. Thus, I assume it will be slightly faster; although I doubt it would be noticeable to the user.
     
  18. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    thanks, i was missing a break on the last 2 case statements

    PHP:
    case 'outbox':
                    
    $messaging true;
                    
    $h->pageTitle $h->lang['messaging_outbox'] . "[delimiter]" $user;
                    break;
                case 
    'compose':
                    
    $messaging true;
                    
    $h->pageTitle $h->lang['messaging_compose'] . "[delimiter]" $user;
                    break;  <-- 
    was missing
                
    case 'show_message':
                    
    $messaging true;
                    
    $h->pageTitle $h->lang['messaging_view_message'] . "[delimiter]" $user;
                    break;  <-- 
    was missing
                
    default:
                    return 
    false;   <-- added now
            
    }
    which was why the return false; has caused problems fro me on compose and show_message.
    realised it now after you pointed it out and fixed

    thanks
    this will be in v1.7.1 for sure
     
    valMETNG likes this.
  19. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    just understood the message now. thanks :)
     
    valMETNG likes this.
  20. valMETNG

    valMETNG Administrator Staff Member Admin

    Something I just noticed. When I logged into the bare-bones/base 1.7 build this morning (i.e., just going to the login page), these were the stats:
    I think the environment has 1 user and 1 post, yet the page load time was 5.522s and 100 queries were executed. Now the page load time could be taking long because of other things going on with the server, but the 100 queries suggested this was part of the reason for the high load time. So I refreshed the page:
    Sure enough, that's what we'd want to see. This leads me to wonder: for times when users aren't hitting the site, cache is getting cleared and subsequent users get long load times. Might it make sense to institute a cron every x minutes that checks the timestamp of the cache and, if it's old (because a user hasn't hit the site recently), automatically refresh it? By doing this, users who visit the site after a long period without users wouldn't be penalized. Of course, you can't do anything with the local browser cache until the user hits the site, but maybe something can be done on the server side?

    Just something to think about for future versions.
     

Share This Page