We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19164
    • 1,215 Posts
    I think that it is better to crop user avatar after reducing it size rather than break size ratio. In CreateUserImage() after
    $new_width = $imageAttributes[1];
    $new_height = $imageAttributes[2];
    


    just add
            $wm = $width / $new_width;
    		$hm = $height / $new_height;
    		if ($wm<$hm)
    		{
    			$height = $new_height * $wm;
    		}else{
    			$width = $new_width * $hm;
    		}
    
      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
      Quote from: Metaller at May 26, 2008, 10:54 AM

      I think that it is better to crop user avatar after reducing it size rather than break size ratio. In CreateUserImage() after
      $new_width = $imageAttributes[1];
      $new_height = $imageAttributes[2];
      


      just add
              $wm = $width / $new_width;
      		$hm = $height / $new_height;
      		if ($wm<$hm)
      		{
      			$height = $new_height * $wm;
      		}else{
      			$width = $new_width * $hm;
      		}
      


      I like that idea, so I’m going to implement it into the v1.3.1 release. smiley
        My Snippets
        -> PopUpChunk v1.0
        • 19164
        • 1,215 Posts
        About required fields. This function is working when user register, but i see there is no this function in change user profile. User can fill required fields on registration stage and then deleted them when editing profile.
          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]
          • 17846
          • 17 Posts
          Hi, I installed 1.3.0 yesterday and I did the snippet call [!WebLoginPE!] so the type ’simple’ was used. I couldn’t get the updating and deleting a profile to work. Now I’ve looked into it and had to change the following lines in the snippet in order to make it work:

          line #297 case ’saveprofilesimple’ : becomes case ’saveprofile’ :
          line #304 case ’deleteprofilesimple’: becomes case ’deleteprofile’ :
          line #309 case ’confirmdeleteprofilesimple’: becomes case ’confirmdeleteprofile’ :

          So basically the services called when the type is simple is without ’simple’ at the end of the value.

          I’m surprised I have to do this since it’s a default installation and nobody mentioned this before. Could there be anything I’m doing wrong?
            • 28033
            • 925 Posts
            Quote from: MackenzieB at Jun 10, 2008, 08:38 AM

            Hi, I installed 1.3.0 yesterday and I did the snippet call [!WebLoginPE!] so the type ’simple’ was used. I couldn’t get the updating and deleting a profile to work. Now I’ve looked into it and had to change the following lines in the snippet in order to make it work:

            line #297 case ’saveprofilesimple’ : becomes case ’saveprofile’ :
            line #304 case ’deleteprofilesimple’: becomes case ’deleteprofile’ :
            line #309 case ’confirmdeleteprofilesimple’: becomes case ’confirmdeleteprofile’ :

            So basically the services called when the type is simple is without ’simple’ at the end of the value.

            I’m surprised I have to do this since it’s a default installation and nobody mentioned this before. Could there be anything I’m doing wrong?


            pixelchutes had actually mentioned that earlier in this thread. It’s a spelling mistake Scotty made.

            You might want to try out the Beta 1.3.1 release, which includes the majority of the fixes posted in this thread.
              My Snippets
              -> PopUpChunk v1.0
              • 25885
              • 1 Posts

              In webloginpe.class.php (1.3.0) line 689, $message should be $notification, otherwise replacement of post-variables will be lost.


                                      $notification = str_replace('[+uem+]', $email,
              $notification);
                                      foreach ($_POST as $name => $value)
                                      {
                                              $toReplace = '[+post.'.$name.'+]';
                                              $message = str_replace($toReplace, $value,
              $notification);
                                              ^^^ should be $notification
                                      }
              
                                      $Notify = new PHPMailer();
              
                                      foreach ($emailArray as $address)
                                      {
                                              $Notify->From = $email;
                                              $Notify->FromName = $fullname;
                                              $Notify->Subject = $notifySubject;
                                              $Notify->Body = $notification;
                • 29673
                • 4 Posts
                I seem to be having trouble with SMF Connect since I installed WebLoginPE. It still works and syncs the date like it should, but it no longer does it automatically. I have to sync the users manually, which is a real pain in the ass.

                Any ideas why?
                  • 28033
                  • 925 Posts
                  Quote from: theconvo at Jul 07, 2008, 04:59 PM

                  I seem to be having trouble with SMF Connect since I installed WebLoginPE. It still works and syncs the date like it should, but it no longer does it automatically. I have to sync the users manually, which is a real pain in the ass.

                  Any ideas why?

                  There’s a fix somewhere on this forums for it (it’s a known issue in the v1.3.0 build).
                    My Snippets
                    -> PopUpChunk v1.0
                    • 2830
                    • 1 Posts
                    Not sure if the problems reported by Dimmy on WebLoginPE profile information not being saved ever got sorted, but I am having the same problem. I’ve installed clean versions of modx and then webloginpe and under default conditions the profile editing screen refuses to save. If I create a separate document with &type=`profile` it saves fine, so the problem seems to be when &type=`simple`?
                      • 23217
                      • 44 Posts
                      I think I found a bug in WebLoginPE.

                      When setting up profile information to save, if my form has none of the general fields (’fullname’,’email’,’phone’,’mobilephone’,’dob’,’gender’,’country’,’state’,’zip’,’fax’,’photo’,’comment’), but does have custom fields, I get an SQL error where WebLoginPE tries to update a blank set of fields to the web_user_attributes table.

                      The lines (in the source I have) where the update is done read:
                      // Prepare the query for General Elements
                      $generalElementsSQL = "UPDATE ".$web_user_attributes." SET ".implode(’, ’, $generalElementsUpdate)." WHERE `internalkey` = ’".$internalKey."’";

                      // Execute the database queries.
                      $saveMyProfile = $modx->db->query($generalElementsSQL);

                      If I comment out the generalElementsSQL line (probably not necessary) and the saveMyProfile line, I do not get the error.

                      The error text reads:
                      « MODx Parse Error »
                      MODx encountered the following error while attempting to parse the requested resource:
                      « Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’WHERE `internalkey` = ’2’’ at line 1 »
                      SQL: UPDATE `toghers`.`tg_web_user_attributes` SET WHERE `internalkey` = ’2’
                      [Copy SQL to ClipBoard]

                      Parser timing
                      MySQL: 0.0460 s (24 Requests)
                      PHP: 0.1760 s
                      Total: 0.2220 s

                      I am not sure if this is a real error, or a feature (i.e., whether you should be allowed to not be setting anything but custom fields).

                      P