We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28033
    • 925 Posts
    Might also be good to include the fixed IE JS file in that, Scotty (the fix that made it so it only executes when it’s needed).
      My Snippets
      -> PopUpChunk v1.0
      • 23491 ☆ A M B ☆
      • 1,056 Posts
      Quote from: Soshite at Nov 13, 2007, 12:25 PM

      Might also be good to include the fixed IE JS file in that, Scotty (the fix that made it so it only executes when it’s needed).

      Will this include my fix for properly invoking the onclick events when a user submits the form using the <Enter> key? (IE only)
        Mike Reid - www.pixelchutes.com
        MODx Ambassador / Contributor
        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
        ________________________________
        Where every pixel matters.
        • 32699 ☆ A M B ☆
        • 427 Posts
        let me know if you guys are set on the js. I will add it in and rezip...
          Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

          Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
          • 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: 	imagepng(): Unable to open '/hsphere/local/home/symphoni/symphonicheaven.com/assets/snippets/webloginpe/userimages/wilhelm.png' for writing	 
            Error type/ Nr.: 	Warning - 2	 
            File: 	/hsphere/local/home/symphoni/symphonicheaven.com/assets/snippets/webloginpe/webloginpe.class.php	 
            Line: 	2588	 
            Line 2588 source: 	imagepng($image_p, $userImageFilePath, 0); 	 
           
          Parser timing
            MySQL: 	0.0287 s	(29 Requests)
            PHP: 	0.6018 s	 
            Total: 	0.6305 s


          I never had this issue before. The image in question is CHMOD to 644, btw.

          EDIT: How odd. It must have been from the server move. Now, it updated the file just fine.
            My Snippets
            -> PopUpChunk v1.0
            • 31178
            • 128 Posts
            I though I’d chip in with a bug I’ve found in webloginpe.class.php . I’m still very much a ’php learner’ so please correct me if I’ve got this wrong!
            I’m in the process of trying to get WebLoginPE working in conjunction with the SMF Connector and found that not all the events were working as expected.

            When logging out the OnBeforeWebLogout and OnWebLogout events were not firing because of missing () on the function calls and for OnWebLogout() the session parameters were null due to the session being destroyed before OnWebLogout() was called:

            	function Logout($type, $loHomeId = '')
            	{
            		$this->Type = $type;
            		$this->loHomeId = $loHomeId;
            		
            		$this->OnBeforeWebLogout;
            		$this->StatusToOffline();
            		$this->SessionHandler('destroy');
            		$this->OnWebLogout;
            		if ($type !== 'taconite')
            		{
            			$this->LogoutHomePage();
            		}
            	}

            needs to be
            	function Logout($type, $loHomeId = '')
            	{
            		$this->Type = $type;
            		$this->loHomeId = $loHomeId;
            		
            		$this->OnBeforeWebLogout();
            		$this->OnWebLogout();	
            		$this->StatusToOffline();
            		$this->SessionHandler('destroy');
            		if ($type !== 'taconite')
            		{
            			$this->LogoutHomePage();
            		}
            	}


            One issue I’m less sure about was with the OnWebLogin() function. SMF Connector is expecting username, but only user is being passed from the function.

            	function OnWebLogin()
            	{
            		global $modx;
            		$parameters = array('user' => $this->User);
            		$modx->invokeEvent('OnWebLogin', $parameters);
            	}

            needed changing to
            	function OnWebLogin()
            	{
            		global $modx;
            		$parameters = array(
            		'username' => $this->Username,
            		'user' => $this->User
            		);
            		$modx->invokeEvent('OnWebLogin', $parameters);
            		if (!empty($this->Report))
            		{
            			return; //There was an error in the last step
            		}
            	}


            Now I get a little hazy as to what is going on here. If the ’user’ parameter is still needed and what the difference is between ->User and ->Username?... anyhow it works for me!
              • 23491 ☆ A M B ☆
              • 1,056 Posts
              Quote from: uxello at Nov 20, 2007, 01:42 PM


              When logging out the OnBeforeWebLogout and OnWebLogout events were not firing because of missing () on the function calls and for OnWebLogout() the session parameters were null due to the session being destroyed before OnWebLogout() was called:


              Great catch!!


              May I ask why you changed the sequence/order of $this->OnWebLogout();

              FROM:

              		
              		$this->OnBeforeWebLogout();		
              		$this->StatusToOffline();
              		$this->SessionHandler('destroy');
              		$this->OnWebLogout();	
              

              TO:
              		
              		$this->OnBeforeWebLogout();		
              		$this->OnWebLogout();	
              		$this->StatusToOffline();
              		$this->SessionHandler('destroy');
              
              


              Isn’t onWebLogout to be ran AFTER they are officially ’logged out’ (aka Session Destroyed)?

              Quote from: uxello at Nov 20, 2007, 01:42 PM

              One issue I’m less sure about was with the OnWebLogin() function. SMF Connector is expecting username, but only user is being passed from the function.

              	function OnWebLogin()
              	{
              		global $modx;
              		$parameters = array('user' => $this->User);
              		$modx->invokeEvent('OnWebLogin', $parameters);
              	}

              needed changing to
              	function OnWebLogin()
              	{
              		global $modx;
              		$parameters = array(
              		'username' => $this->Username,
              		'user' => $this->User
              		);
              		$modx->invokeEvent('OnWebLogin', $parameters);
              		if (!empty($this->Report))
              		{
              			return; //There was an error in the last step
              		}
              	}


              Now I get a little hazy as to what is going on here. If the ’user’ parameter is still needed and what the difference is between ->User and ->Username?... anyhow it works for me!

              Good eye!

              I can attempt to clear the haze for you smiley

              Look into the SMFConnect Plugin that gets created by SMF Connector. You’ll find that this is where the magic happens!

              It directly references the current username via the "$username" variable, however this was created for the legacy/default WebLogin snippet.

              WebLoginPE sends an array of data ($this->User) to the plugin, which can be referenced in "SMFConnect" via
              $user['username']


              By updating $username references to leverage $user[’username’] I fixed my SMF connectivity issues... it’s not REALLY a bug of WLPE wink
                Mike Reid - www.pixelchutes.com
                MODx Ambassador / Contributor
                [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                ________________________________
                Where every pixel matters.
                • 31178
                • 128 Posts
                May I ask why you changed the sequence/order of $this->OnWebLogout();

                FROM:


                Code:

                $this->OnBeforeWebLogout();
                $this->StatusToOffline();
                $this->SessionHandler(’destroy’);
                $this->OnWebLogout();
                TO:

                Code:

                $this->OnBeforeWebLogout();
                $this->OnWebLogout();
                $this->StatusToOffline();
                $this->SessionHandler(’destroy’);


                Isn’t onWebLogout to be ran AFTER they are officially ’logged out’ (aka Session Destroyed)?

                Yes, you are probably right about the order. Though, if the order should be kept then I believe some changes need making in the OnWebLogout() function. In the original order OnWebLogout() makes reference to $_SESSION variables which no longer exist after the $this->SessionHandler(’destroy’) line is run, and so userid, internalKey and username are always NULL?
                	function OnWebLogout()
                	{
                		global $modx;
                		$parameters = array(
                			'userid'		=> $_SESSION['webInternalKey'],
                			'internalKey'	=> $_SESSION['webInternalKey'],
                			'username'	=> $_SESSION['webShortname']
                			);
                		$modx->invokeEvent('OnWebLogout', $parameters);
                	}


                ... and thanks for clarifying my haze! grin I’ve updated SMFConnect to use the $user array. I just need to sync the login durations next, but that is another story (topic!)

                I really love this snippet and hope it continues to work when MODX gets updated to merge user and manager security as I believe is on the cards for future releases.
                  • 17883
                  • 1,039 Posts
                  In profile view (or manager view)  I can´t delete entries. E.g. if I have a telephone number and don´t want to show it any more then deleting the entry doesn´t delete it in the database. The workaround with a blank is not good wink How can I fix this?

                  Thx in advance!

                  edit: Sorry, found it: http://modxcms.com/forums/index.php/topic,18271.msg120578.html#msg120578

                  But his Bug isn´t solved yet:

                  I’m not sure if this is me or WeboginPE...my guess is me.

                  If you login as a manager and from the managerList of people you edit someone else’s profile, the inputHandlers generated by WebLoginPE set their values according to the user viewing as opposed to the user whose profile I am editing. Making any changes to these fields populates the database correctly however.

                  Is there something I am doing wrong?

                  Thanks for any pointers!

                  Taff

                  Any solutions here?
                    • 29181
                    • 480 Posts
                    Yes, that problem still exists with me too. What I have done for the time being is to just display those fields in the manager view as opposed to making them editable.
                    That works for this setup as the things with checkboxes aren’t really something an admin would need to change.

                    This is solution the client can live with. (Praise the lord!!!)

                    I will be back in Germany in a fortnight, and if it hasn’t been sorted by then, I will hopefully be able to find the time to fix that.

                    Cheers,
                    Taff
                      Adrian Lawley: www.adrianlawley.com
                      • 28033
                      • 925 Posts
                      Sounds to me like some of the user editing code went into the manager editing code by accident.
                        My Snippets
                        -> PopUpChunk v1.0