Take, for instance, the photo field.
How do I edit the table to have a text for a default avatar (the text I would want would be default.png, btw.)? (This is for a User program I’m starting on my website, btw.)
-
MODX Staff
- 1,535 Posts
You’ll need to go into PHPMyAdmin (or equivalent) and set a default value for that field. It’s not possible to do it through the MODx Manager.
Garry Nutting
Senior Developer
MODX, LLC
Email:
[email protected]
Twitter: @garryn
Web: modx.com
My SQL is pretty rusty, but I think you might be able to do something like the following using the db_api to execute the sql:
alter table web_user_attributes modify photo set default ’’default.png"
It would be much safer, though, to do it in PhpMyAdmin, and probably easier as well unless you have a lot of sites to do it in.
You probably know how, but let me run it down for future readers:
1. Launch phpMyAdmin, usually in the ISP’s control panel -- click on in MySQL databases and look for the obscure phpMyAdmin link near the very bottom of the page.
2. Select the MODx database.
3. Select the web_user_attributes table.
4. Find the "photo" field and click on the pencil to modify it.
5. Fill in your desired value under "default"
6. Click save.
Cheers,
Bob