04-24-2019, 06:11 AM
Okay, I see.
So if I wanted to create a Wall plugin, such that folks could post pictures and text into a public Wall, kind of like a Facebook Activity Wall, I'd want to store those images in a folder. The filenames of those images would need to be stored in the database along with the timestamp, the user that posted it, and perhaps if it was to also be used as the user's avatar/profile pic. I wouldn't want to touch existing tables that UserSpice maintains, so I'd want to create a table just for the Wall plugin. In DB.php, there isn't currently a CREATE TABLE function, that I can see. Is that correct?
So if I wanted to CREATE TABLE IF NOT EXISTS wall ()... would I need to extend the DB class, or is there already an easy way to CREATE a new table that I'm not seeing?
What sort of general guidelines are there for Plugins. I mean, what if I wanted to count the number of Wall posts a user created in a period of time to make sure they don't spam the Wall? Would that go in the regular UserSpice maintained table, or would that go in the Wall table that I created? What's the best practice for this situation?
So if I wanted to create a Wall plugin, such that folks could post pictures and text into a public Wall, kind of like a Facebook Activity Wall, I'd want to store those images in a folder. The filenames of those images would need to be stored in the database along with the timestamp, the user that posted it, and perhaps if it was to also be used as the user's avatar/profile pic. I wouldn't want to touch existing tables that UserSpice maintains, so I'd want to create a table just for the Wall plugin. In DB.php, there isn't currently a CREATE TABLE function, that I can see. Is that correct?
So if I wanted to CREATE TABLE IF NOT EXISTS wall ()... would I need to extend the DB class, or is there already an easy way to CREATE a new table that I'm not seeing?
What sort of general guidelines are there for Plugins. I mean, what if I wanted to count the number of Wall posts a user created in a period of time to make sure they don't spam the Wall? Would that go in the regular UserSpice maintained table, or would that go in the Wall table that I created? What's the best practice for this situation?