We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28033
    • 925 Posts
    Gah...

    I’ll do a quick search for these double values. Notepad++ has been acting up on the latest versions, but I didn’t know it was doing that. x_x

    I’ll get an updated version up in a few minutes. smiley

    EDIT: And now it should be updated. smiley

    BTW, for those that have better PHP knowledge, there’s a few bug fixes that I didn’t know how to implement, so if you guys could help me out on that, I’d be grateful. It should be documented as to which bugs are still outstanding.
      My Snippets
      -> PopUpChunk v1.0
      • 31471
      • 206 Posts
      In function ViewAllUsers, line 1306:
      $value = strftime('%m-%d-%Y', $value);

      and function PlaceHolders, line 1840:
      $value==0?'':$modx->setPlaceholder('user.'.$key, strftime('%m-%d-%Y', $value));


      Shouldn’t the ’%m-%d-%Y’ have been changed to $this->DateFormat in order to format the date the way users set it to?
      Of course in this case it’s better set the &dateFormat to something rather than to let the snippet use the default value of ’%A %B %d, %Y at %I:%M %p’ since a birth date with Hours:Minutes:Seconds look stupid...
        • 28033
        • 925 Posts
        IIRC, I swore I remember seeing Scotty talk about why that was like that in the v1.3.x releases. Maybe due to how he coded that part of the script.

        Although that might be a good idea to look into that as a small fix for a v1.3.2 release (since v1.3.1 is purely bugfix-only, unless something new is essential to include).

        BTW, I’m going to run this on my website. Hopefully things will go well. tongue
          My Snippets
          -> PopUpChunk v1.0
          • 28033
          • 925 Posts
          « MODx Parse Error »MODx encountered the following error while attempting to parse the requested resource:
          « PHP Parse Error »

          PHP error debug
            Error: move_uploaded_file(/hsphere/local/home/symphoni/symphonicheaven.com/wilhelm.png): failed to open stream: Permission denied
            Error type/ Nr.: Warning - 2
            File: /hsphere/local/home/symphoni/symphonicheaven.com/assets/snippets/webloginpe/webloginpe.class.php
            Line: 2525
            Line 2525 source: if (!move_uploaded_file($_FILES[’photo’][’tmp_name’], $userImage))

          Parser timing
            MySQL: 0.0246 s (27 Requests)
            PHP: 0.4049 s
            Total: 0.4295 s

          I got that error when trying to upload a avatar. For some reason, it’s messing up the path. Was this a bug I missed, or a goof I made?

          EDIT: I also noticed a quirk on some servers (namely mine). When including the lang file, it seems include_once doesn’t work, and I had to rename it to include. Is there an issue there?
            My Snippets
            -> PopUpChunk v1.0
            • 31471
            • 206 Posts
            Quote from: vhollo at May 22, 2008, 12:26 PM

            In function ViewAllUsers, line 1306:
            $value = strftime('%m-%d-%Y', $value);

            and function PlaceHolders, line 1840:
            $value==0?'':$modx->setPlaceholder('user.'.$key, strftime('%m-%d-%Y', $value));


            Shouldn’t the ’%m-%d-%Y’ have been changed to $this->DateFormat in order to format the date the way users set it to?
            Of course in this case it’s better set the &dateFormat to something rather than to let the snippet use the default value of ’%A %B %d, %Y at %I:%M %p’ since a birth date with Hours:Minutes:Seconds look stupid...
            Quote from: Soshite at May 22, 2008, 12:41 PM

            IIRC, I swore I remember seeing Scotty talk about why that was like that in the v1.3.x releases. Maybe due to how he coded that part of the script.

            Although that might be a good idea to look into that as a small fix for a v1.3.2 release (since v1.3.1 is purely bugfix-only, unless something new is essential to include).

            BTW, I’m going to run this on my website. Hopefully things will go well. tongue
            You might be right: in cases the displayed date is being posted again that’s right to show it in the original ’%m-%d-%Y’ format as it’s going to be parsed by the snippet and will be saved. In cases the date will only be showed, ’$this->DateFormat’ will be OK.
            So one would check each appearance in the class.
            One I found must leave is line 1353:
            $modx->setPlaceholder(’view.dob’, strftime(’%m-%d-%Y’, $viewUser[’dob’]));
            because this one is showing on the edit form of manager mode.
              • 7455
              • 2,204 Posts
              Nice work, Wil was looking foorward for this
              We will test and report back
                follow me on twitter: @dimmy01
                • 19164
                • 1,215 Posts
                Bug found: path to user photo is deleted when saving profile.

                In webloginpe.class.php near
                if ($field!='photo' || ($_FILES['photo']['name'] !== '' && !empty($_FILES['photo']['name']))) // for update db with value and blank value (except if the field is 'photo')


                need to add {} bracers
                if ($field!='photo' || ($_FILES['photo']['name'] !== '' && !empty($_FILES['photo']['name']))) // for update db with value and blank value (except if the field is 'photo')
                {
                	// CREDIT: Mike Reid (aka Pixelchutes) for the string escape code.
                	$charset='"'.$modx->config['modx_charset'].'"';
                	$generalElementsUpdate[] = " `".$field."` = '".$modx->db->escape(stripslashes(htmlentities(trim($_POST[$field]), ENT_QUOTES, $modx->config['modx_charset'])))."'";
                }
                  DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

                  Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

                  [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
                  • 28033
                  • 925 Posts
                  I bet that was what was causing the issues I encountered before. wink

                  BTW, does something with more PHP knowledge know why the "default" user fields get deleted, even if they aren’t included.

                  I have special WLPE calls in the "consoles" pages of my website, which adds a game to the user’s collection/wishlist (obviously, extended WLPE fields). I had to pass the "default" fields (username, etc.) via type="hidden" fields to get it to not overwrite the data...
                    My Snippets
                    -> PopUpChunk v1.0
                    • 28033
                    • 925 Posts
                    BETA 3 has been released. This fixes the user avatar issue, and applies a new method to cropping user avatars, instead of changing their dimensions.
                      My Snippets
                      -> PopUpChunk v1.0
                      • 25551 ☆ A M B ☆
                      • 1,231 Posts
                      For some reason on my edit details page and logged in screen, the default avatar image is showing up as a missing image.... but works if you upload an image on registration. Also after signing up and try to save any updates via the profile update I get this error.

                      « MODx Parse Error »
                      MODx encountered the following error while attempting to parse the requested resource: 
                      « PHP Parse Error » 
                        
                      PHP error debug 
                        Error:  htmlentities() [function.htmlentities]: charset `"UTF-8"' not supported, assuming iso-8859-1   
                        Error type/ Nr.:  Warning - 2   
                        File:  /home/sites/public_html/assets/snippets/webloginpe/webloginpe.class.php   
                        Line:  947   
                        Line 947 source:  $extendedFieldValues[$field] = $modx->db->escape(stripslashes(htmlentities(trim($_POST[$field]), ENT_QUOTES,$charset)));    
                        
                      Parser timing 
                        MySQL:  0.0131 s (21 Requests) 
                        PHP:  0.1550 s   
                        Total:  0.1680 s 
                      


                      I have downloaded the latest versions on loginPE

                      Thanks
                        Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                        AugmentBLU - MODX Partner

                        BLUcart - MODX Revolution E-Commerce & Shopping Cart