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 #1, 19 years ago
    Pleas post Feature Requests for WebloginPE 1.3.0 here.

    -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
      • 5568
      • 35 Posts
      Ok this is a big one, but this may be beyond the scope of the snippet?

      Current CustomTable() function from the class.php file, the whole function is not posted below, just the requested area:
      		// Check if custom fields exist in custom table. If they do not, create them.
      		if ($this->CustomFields !== '')
      		{
      			$columns = $modx->db->query("SELECT * FROM ".$this->CustomTable);
      			$columnNames = $modx->db->getColumnNames($columns);
      			foreach ($this->CustomFields as $field)
      			{
      				if (!in_array($field, $columnNames))
      				{
      					$addColumn = $modx->db->query("ALTER TABLE ".$this->CustomTable." ADD (`".$field."` VARCHAR(255) NOT NULL)");
      				}
      			}
      		}		
      


      Hopeful change in the function:
      		// Check if custom fields exist in custom table. If they do not, create them.
      		if ($this->CustomFields !== '')
      		{
      			$columns = $modx->db->query("SELECT * FROM ".$this->CustomTable);
      			$columnNames = $modx->db->getColumnNames($columns);
      			foreach ($this->CustomFields as $field)
      			{
      				if (!in_array($field, $columnNames))
      				{
                      				$newfield = strpos($field, 'longtext');
      	                			if ($newfield > 0)
      		                 		{
      					$addColumn = $modx->db->query("ALTER TABLE ".$this->CustomTable." ADD (`".$field."` LONGTEXT NOT NULL)");
                                              } else {
      					$addColumn = $modx->db->query("ALTER TABLE ".$this->CustomTable." ADD (`".$field."` VARCHAR(255) NOT NULL)");
                                        }
      				}
      			}
      		}
      



      Of course the above requested change would not be exactly as it appears, there are other possible field types that could be used here.  This may be more for personal reasons, but I just thought it would be a great new added feature in the future.

      Keep up the GREAT work, this snippet is looking very good as it is,
      Mark
        • 5568
        • 35 Posts
        Captcha option or options?
          • 26435
          • 1,193 Posts
          ScottyDelicious Reply #4, 19 years ago
          Wow!
          I like the idea of specifying the DATA TYPE for the MySQL column!
          It could always just default to VARCHAR(255).

          As for CAPTCHA options...
          What are you looking for?
          WebLoginPE supports this in registration (as that is the only place it checks for "required" fields) using &regRequired=`formcode`.
          <img src="[+form.captcha+]" width="148" height="60" alt="If you have trouble reading the code, refresh this page." />
          <input type="text" name="formcode" />
          


          Are you saying you would like this expanded to other services? Like formcode validation for Login?
          If this is correct, what services were you thinking? I could change the parameter from &regRequired to just &requiredFields and have it available outside of registration services.

          -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
            • 28033
            • 925 Posts
            I’ve noticed that in using the sorting options that was introduced in v1.3.0, I need to add the custom tables in _extended in each page. Now, when my site will have 20+ ways to sort users eventually (15+ right now), that means whenever a new field is added, I’ll have to either manually edit every WLPE call in my User List, or go into phpMyAdmin and do a Search & Replace query.

            But for most users, they wouldn’t know how to pull that off. So maybe allow a chunk to represent the text, like how chunks can be used for templates for various sections of WLPE. I’d guess this would need an IFELSE (dunno how this is coded in PHP), so it would allow for doing this new method, or use the old method that’s currently in place.

            EDIT: Something small I noticed. If no users exist for a sorting option, WLPE will output a "blank" page with nothing on it. Maybe add a lang string that says something like, "No users have filled out data for DATAHERE", with DATAHERE being the sorting option that was used. If that can’t be done, just saying "No users exist for that sorting option." would work, too.

            Just so the user doesn’t think they "broke" the script or something. The more user-friendly the script is, the better, in my personal opinion. smiley
              My Snippets
              -> PopUpChunk v1.0
              • 26435
              • 1,193 Posts
              ScottyDelicious Reply #6, 19 years ago
              Quote from: Soshite at Sep 18, 2007, 08:53 PM

              I’ve noticed that in using the sorting options that was introduced in v1.3.0, I need to add the custom tables in _extended in each page. Now, when my site will have 20+ ways to sort users eventually (15+ right now), that means whenever a new field is added, I’ll have to either manually edit every WLPE call in my User List, or go into phpMyAdmin and do a Search & Replace query.
              Sure, I can parse it throug $wlpe->Template() first to check if it is a chunk, file path, or straight text.

              Quote from: Soshite at Sep 18, 2007, 08:53 PM

              But for most users, they wouldn’t know how to pull that off. So maybe allow a chunk to represent the text, like how chunks can be used for templates for various sections of WLPE. I’d guess this would need an IFELSE (dunno how this is coded in PHP), so it would allow for doing this new method, or use the old method that’s currently in place.

              EDIT: Something small I noticed. If no users exist for a sorting option, WLPE will output a "blank" page with nothing on it. Maybe add a lang string that says something like, "No users have filled out data for DATAHERE", with DATAHERE being the sorting option that was used. If that can’t be done, just saying "No users exist for that sorting option." would work, too.

              Just so the user doesn’t think they "broke" the script or something. The more user-friendly the script is, the better, in my personal opinion. smiley

              Yeah, like:
              if (count($completeUserList) == 0) { /*return a string saying "no users" or whatever*/ }

              -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
                Hey sD,

                I’d like to see this Flash animation implemented into EVERY user’s profile page, by default:

                http://cristgaming.com/pirate.swf

                :D
                  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
                  Quote from: pixelchutes at Sep 19, 2007, 02:19 PM

                  Hey sD,

                  I’d like to see this Flash animation implemented into EVERY user’s profile page, by default:

                  http://cristgaming.com/pirate.swf

                  :D

                  By the option &piratemode=`true`. tongue
                    My Snippets
                    -> PopUpChunk v1.0
                    • 26435
                    • 1,193 Posts
                    ScottyDelicious Reply #9, 19 years ago
                    Quote from: pixelchutes at Sep 19, 2007, 02:19 PM

                    Hey sD,

                    I’d like to see this Flash animation implemented into EVERY user’s profile page, by default:

                    http://cristgaming.com/pirate.swf

                    :D
                    OMFG.
                    I can now die happy laugh

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


                      I send pointless little messages
                      • 5568
                      • 35 Posts
                      Quote from: Dr. at Sep 18, 2007, 05:03 PM

                      Wow!

                      ...

                      As for CAPTCHA options...
                      What are you looking for?
                      WebLoginPE supports this in registration (as that is the only place it checks for "required" fields) using &regRequired=`formcode`.
                      <img src="[+form.captcha+]" width="148" height="60" alt="If you have trouble reading the code, refresh this page." />
                      <input type="text" name="formcode" />
                      


                      Are you saying you would like this expanded to other services? Like formcode validation for Login?
                      If this is correct, what services were you thinking? I could change the parameter from &regRequired to just &requiredFields and have it available outside of registration services.

                      -sD-
                      Dr. Scotty Delicious, Scientist DFPA.

                      Yes, definitely in login and registration, after that I can’t see any real reason in today’s web, who know’s about tommorrow’s web, lol!, it is a pirate’s life after all.

                      Why login?  You have an option for Automatic login.

                      Probably &reqField would work, have you ever noticed that sometimes ModX will replace &regRequired with @Required, weired, only happens when you EDIT your document without pressing the HTML button?

                      Anyways, there may come a point in time where you will want a field in login that is not in Registration?

                      Just a thought,
                      Mark

                      PS: The flash animation is COOL!