We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26435
    • 1,193 Posts
    ScottyDelicious Reply #171, 19 years ago
    Quote from: pixelchutes at Sep 05, 2007, 01:37 PM

    Thx, sD. I figured that was the reason behind it, but was sort of hoping there might be some way to avoid it

    ...so I guess my other option is the AJAX route, eh?
    For sure!
    Check out the jQuery taconite plugin (it’s include with WebLoginPE and that is what this snippet was originally designed for).
    I believe that there are some examples in the "taconite XML examples" folder.

    -sD-
    Dr. Scotty Delicious, Scientist DFPA.
      Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
      All of the above... in no specific order.


      I send pointless little messages
      • 23491 ☆ A M B ☆
      • 1,056 Posts
      Quote from: Dr. at Sep 05, 2007, 02:16 PM

      Check out the jQuery taconite plugin

      Dude, that is just sick. Sick I tell you. 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.
        • 28033
        • 925 Posts
        While I was checking a news story on GamePro.com, I noticed something that might be neat for WLPE.

        A simple function where WLPE takes a random user, and outputs their name, and maybe a short bit of info about they, like in a "user_title" field or something), along with their avatar. If you click the user’s name/avatar, it’ll go to their userpage.

        Now, for this to work as they did it, the Userlist and User Info pages would need to be available to look at for any user (of course, anything else would be for registered users only, as normal). This could be a neat idea for some sites to bring attention to their web user system, I’d think.

        http://www.gamepro.com/, in case you wanted to see how it worked. I think they change the featured user each day, but I dunno if there’s a PHP option to only select a member from the database each day or not.
          My Snippets
          -> PopUpChunk v1.0
          • 22586
          • 74 Posts
          Wow, awesome snippet. Thanks Dr.Scotty!
            • 23491 ☆ A M B ☆
            • 1,056 Posts
            @sD--

            You know what would be super cool and pretty easy to implement (IMO): Event-based functions, similar to eForm’s.

            See here: http://www.pixelchutes.com/assets/snippets/eform/docs/eform.htm#events

            Really, I would love to be able to run a Custom function "on a successful update" event (e.g. onUpdateSuccess or the like) to really take control during the profile edit process, etc!

            If you can think of any reasons this would be a bad idea, or too hard to implement, please let us know. Otherwise, I’d also be interested to hear of other even function opportunities, e.g. during registration onBeforeRegister, etc, etc smiley

            FYI: I have mashed up SMF Connector and WLPE. By adding and mapping internalKey to SMF’s members table `smf_members` I can have custom control over Forum profiles, too smiley (Namely things like e-mail and Display Name, attributes that aren’t able to be changed natively w/ SMF Connector...) It’s scary how easy you’ve made it. Event functions to run prior to or following the update/edit procedure would allow for dupe checking and extended validation in unique circumstances!

              Mike Reid - www.pixelchutes.com
              MODx Ambassador / Contributor
              [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
              ________________________________
              Where every pixel matters.
              • 26435
              • 1,193 Posts
              ScottyDelicious Reply #176, 19 years ago
              Quote from: pixelchutes at Sep 06, 2007, 09:28 AM

              @sD--

              You know what would be super cool and pretty easy to implement (IMO): Event-based functions, similar to eForm’s.

              Really, I would love to be able to run a Custom function "on a successful update" event (e.g. onUpdateSuccess or the like) to really take control during the profile edit process, etc!
              I am not sure what you are talking about?
              I understand the concept, for instance when the user clicks the login button, I could create events for wlpeOnBeforeLogin and wlpeOnLoginSuccess, but how would you run a custom function? Where would this custom function be? in the class? what would the function be? I just don’t get it, but I am probably looking at it from the wrong angle.
              Quote from: pixelchutes at Sep 06, 2007, 09:28 AM

              If you can think of any reasons this would be a bad idea, or too hard to implement, please let us know. Otherwise, I’d also be interested to hear of other even function opportunities, e.g. during registration onBeforeRegister, etc, etc smiley
              I will withold judgement for now until I fully understand what your intentions are. I suppose an event could be created for OnBefore and OnSuccess of each ’service’.

              Quote from: pixelchutes at Sep 06, 2007, 09:28 AM

              FYI: I have mashed up SMF Connector and WLPE. By adding and mapping internalKey to SMF’s members table `smf_members` I can have custom control over Forum profiles, too smiley (Namely things like e-mail and Display Name, attributes that aren’t able to be changed natively w/ SMF Connector...) It’s scary how easy you’ve made it. Event functions to run prior to or following the update/edit procedure would allow for dupe checking and extended validation in unique circumstances!
              Neat!
              It is scary indeed. I have been looking at the code and wondering "how the f*** did I come up with this?" tongue

              -sD-
              Dr. Scotty Delicious, Scientist DFPA.
                Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                All of the above... in no specific order.


                I send pointless little messages
                • 23491 ☆ A M B ☆
                • 1,056 Posts
                it’s pretty simple really:

                [!Load_WLPE_EventFunctions!]
                [!WebLoginPE? &onLoginSuccess=`theFunctionName`!]
                


                So, basically you create a snippet with your function declarations, and you call it prior to calling [!WebLoginPE!]
                eForm also has a runSnippet parameter that allows you to "load" such functions in the same snippet call smiley

                e.g.
                [!WebLoginPE? &customFunctions=`Load_WLPE_EventFunctions` &onLoginSuccess=`theFunctionName`!]
                


                Then, (as with eForm), it simply runs the function reference at the appropriate event/time.

                eForm example for running an event function (slightly modified):
                //<?php
                	# invoke onBeforeFormParse event set by another script
                	if ($eFormOnBeforeFormParse) {
                		if( $isDebug && !function_exists($eFormOnBeforeFormParse))
                			$fields['debug'] .= "eFormOnBeforeFormParse event: Could not find the function " . $eFormOnBeforeFormParse;
                		else{
                			$templates = array('tpl'=>$tpl,'report'=>$report,'thankyou'=>$thankyou,'autotext'=>$autotext);
                			if( $eFormOnBeforeFormParse($fields,$templates)===false )
                				return ""; // Error 
                			else{
                				// Success
                			}
                		}
                	}
                
                


                Note how eForm actually passes certain variables as arguments to the custom functions. This way, the custom functions can interact with and have more control over the eForm variables.

                If you take your function arguments "by reference", you can even manipulate the data for use by WLPE prior to returning to WLPE’s process.

                //<?php
                function theFunctionName( &$arg1, &$arg2 ){
                //...
                }
                

                  Mike Reid - www.pixelchutes.com
                  MODx Ambassador / Contributor
                  [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                  ________________________________
                  Where every pixel matters.
                  • 26435
                  • 1,193 Posts
                  ScottyDelicious Reply #178, 19 years ago
                  Well... That seems totally doable.
                  The big question is... What do we call the next version of WebLoginPE? version 1.3 seems like such a small increment for so many big changes. laugh

                  -sD-
                  Dr. Scotty Delicious, Scientist DFPA.
                    Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                    All of the above... in no specific order.


                    I send pointless little messages
                    • 20289
                    • 958 Posts
                    Quote from: Dr. at Sep 06, 2007, 11:39 AM

                    Well... That seems totally doable.
                    The big question is... What do we call the next version of WebLoginPE? version 1.3 seems like such a small increment for so many big changes. laugh

                    -sD-
                    Dr. Scotty Delicious, Scientist DFPA.

                    I suggest you assume the ZI’s definition of WebloginPE!, seems fair enough? laugh
                    BTW im going to translate the language file for Persian, if the next release is already in queue of submission?.
                      [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
                      [td][Wiki] [Persian support forum]
                      [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
                      [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
                      • 28033
                      • 925 Posts
                      pixelchutes, do you know if it would be possible to apply the SMF<->WLPE briding you’ve done to other forum software (like MyBB)? That would be pretty cool, IMO.
                        My Snippets
                        -> PopUpChunk v1.0