// 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)");
}
}
}
// 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)");
}
}
}
}
<img src="[+form.captcha+]" width="148" height="60" alt="If you have trouble reading the code, refresh this page." /> <input type="text" name="formcode" />
Sure, I can parse it throug $wlpe->Template() first to check if it is a chunk, file path, or straight text.
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.
if (count($completeUserList) == 0) { /*return a string saying "no users" or whatever*/ }
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.
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

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 ®Required=`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 ®Required to just &requiredFields and have it available outside of registration services.
-sD-
Dr. Scotty Delicious, Scientist DFPA.