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

    In my current build, I have the following at the beginning of Hotaru.php to instantiate a bunch of custom functions that I keep in libs/GlobalFunctions.php:
    Code:
          $this->db->setHotaru($this);  // pass $h object to EzSQL for error reporting
      $this->mdb->setHotaru($this);  // pass $h object to meekroDb for error reporting
    
           $this->globalfunctions = new GlobalFunctions(); // instantiate GlobalFunctions object
    At the end of Hotaru.php, I would then define the various functions, like:
    Code:
      public function setSpecificCookie($cookie_name, $cookie_duration, $duration_quantity = 1, $cookie_value = true)
       {
         $globalfunctions = new GlobalFunctions();
         return $globalfunctions->setSpecificCookie($this, $cookie_name, $cookie_duration, $duration_quantity, $cookie_value);
       }
    I replaced the first definition with:
    Code:
    $this->globalfunctions = GlobalFunctions::instance();
    ...and I replaced the second with:
    Code:
      public function checkOtherCookie($cookie_name)
       {
         $globalfunctions = GlobalFunctions::instance();
         return $globalfunctions->checkOtherCookie($this, $cookie_name);
       }
    ...and I added to the top of libs/GlobalFunctions.php:
    Code:
    namespace Libs;
    There's obviously more to it than that because I'm getting an error on the $globalfunctions = GlobalFunctions::instance(); line within the function:
    I'm sure it's something silly I'm missing. Any ideas?
     
  2. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    Once you add an extra class to the folder you have to run composer again to generate the list

    I can explainore about composer when I am at my PC but right now just on iPhone.

    Also, re models: the original model folder was when I was using eloquent which is used with the framework Lara el. That would not work with php5.3 so I dropped back to plain models and was going to use the mdb database framework class. This was not as fast as straight SQL so I eventually went with just that but kept the new model structure.

    I will rename the folders to be

    /models/eloquent
    /models/sql

    And not use mdb at all

    The current files in mdb folder are the only ones you need.

    The eloquent ones make for easier programming and better code going forward but for now we can't use them for php5.3. I am reluctant to delete them totally as we will pick them up in future.

    The db models need to be built up more with basic CRUD operations.
     
    valMETNG likes this.
  3. valMETNG

    valMETNG Administrator Staff Member Admin

    Thanks. And I see it's not as easy as adding 'Libs\\GlobalFunctions' => $baseDir . '/libs/GlobalFunctions.php', to the vendor/composer/autoload_classmap.php file because, when I do that, I get the error:
    Serves me right for modifying core instead of doing this as plugins :)
     
  4. valMETNG

    valMETNG Administrator Staff Member Admin

    Ah! Actually, just one more step needed I see. I added "extends Prefab" to my class so, for those who might need this, now the beginning of my libs/GlobalFunctions.php file looks like:
    Code:
    namespace Libs;
    
    class GlobalFunctions extends Prefab
    {
     
  5. valMETNG

    valMETNG Administrator Staff Member Admin

    In plugins/save_posts/templates/save_post_widget.php, there's a PHP Fatal error: Class 'UserAuth' on:
    Code:
    $h->vars['user'] = new UserAuth();
     
  6. valMETNG

    valMETNG Administrator Staff Member Admin

    Upon upgrading all of my plugins, I received error messages that looked similar to this:
    upload_2014-12-20_13-16-45.png
     
  7. valMETNG

    valMETNG Administrator Staff Member Admin

    Line 368-369 of activity/activity.php appear to be missing the closing </a>:
    Code:
    <?php echo $title; ?><a href="<?php echo $h->url(array('page'=>'rss_activity')); ?>" title="<?php echo $anchor_title; ?>">
    <i class="fa fa-rss"></i>
     
    shibuya246 likes this.
  8. valMETNG

    valMETNG Administrator Staff Member Admin

    On lines 1331 and 1354 of Hotaru.php, I don't think the type and self-closing tab are necessary:
    Code:
    echo "<script type='text/javascript' src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js' type='text/css' /></script>";
     
    shibuya246 likes this.
  9. valMETNG

    valMETNG Administrator Staff Member Admin

    Probably not an issue, and I'm not seeing it in other browsers, but the console in IE is showing:
    for this line from header.php:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
  10. valMETNG

    valMETNG Administrator Staff Member Admin

    I can't figure out what's causing it, but when I turn on or off plugins in IE or Firefox, the pointer seems to get sticky, automatically grab the plugin, and then move it wherever you move the cursor. Even pressing Esc doesn't release it. I have to do a page refresh to drop it. It does not happen in Chrome or Opera. It looks like javascript is getting confused between or combining moving a plugin and turning it on/off.
     
  11. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    Can you check you have forum password username entered in admin dashboard settings
     
    valMETNG likes this.
  12. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    That may be plugin that wasn't updated. I'll check
     
  13. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    Yes, extends prefab lets us use a singleton pattern rather than multiple objects
     
  14. valMETNG

    valMETNG Administrator Staff Member Admin

    Ha! Didn't even know that was there. Some admin I am :)

    You might actually consider putting a different error message when that occurs, something like you need your forum username and password entered in settings to auto-update.
     
  15. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    Totally agree
    That section for updating is still new and was experimental although I started work on it for hotaru about 4 years ago :)

    Up until now it was sort of a hidden feature on purpose

    I have now made a password checker for this also in 1.7.1 and will fix up those error messages also

    I am making a way to link your site with a hotaru membership area so if you have multiple sites you can keep track of their stats etc in one place also
     
    robin007 and valMETNG like this.
  16. valMETNG

    valMETNG Administrator Staff Member Admin

    What was odd, though, was that all the version numbers showed as updated in the admin panel, even though nothing was downloaded. It might be that there is code being executed to update the version numbers even though the plugin doesn't get downloaded.
     
  17. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    Yes, the version numbers can be accessed anonymously but the download requires you to be logged in. That's how the forum works. Those 100 queries you noted before were probably the version numbers being updated which I will fix shortly to be a shorter query as one hit
     
  18. valMETNG

    valMETNG Administrator Staff Member Admin

    On line 240 of user_signin/user_signin.php, it's unclear where $denied is defined so it doesn't appear this is ever reached:
    Code:
      if ($denied) {
      $h->messages[$h->lang["user_signin_access_denied"]] = 'red';
      //$h->showMessages();
      $h->template('user_signin_login');
      }
     
    shibuya246 likes this.
  19. valMETNG

    valMETNG Administrator Staff Member Admin

    I might have not been clear (or I might be misremembering), but I could have sworn it actually changed the version numbers in the database as if the plugins were updated successfully, even though the files didn't get downloaded. In other words, it should only update to the new version numbers if the updated plugin is downloaded and installed successfully.
     
  20. valMETNG

    valMETNG Administrator Staff Member Admin

    When you remove the username and password for the forum from admin settings and click save, the username and password remain.
     

Share This Page