Ninjakreborn Posted October 3, 2006 Share Posted October 3, 2006 I have set up the framework almost for a program. I know it's not a good idea to create new tables dynamically(database tables). At this point though, I have a lot of information going throughpaypal, and coming back to paypal's IPN system. The thing is if I am not careful this could be riddled with security issues, when they finally payout. I am taking either template1.php or template2.php depending on which one they have chosen(more are getting added later), and I am opening it, reading the contents of it, and saving it in a variable. Then I need to find a way to create a cms for it, I need to get the cms put within the file information somehow, as well as decide what table structure in the database I can use for something like this. So they will be able to login to there administration area later on, and do what they need to do?? Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/ Share on other sites More sharing options...
obsidian Posted October 3, 2006 Share Posted October 3, 2006 well, one idea is simply to use the idea that many forum systems use and store all your major colors in the database and allow your users to update them through a form. Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103068 Share on other sites More sharing options...
Ninjakreborn Posted October 3, 2006 Author Share Posted October 3, 2006 Sorry I accidentally titled it dynamic css, instead of dymanic cms Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103070 Share on other sites More sharing options...
trq Posted October 3, 2006 Share Posted October 3, 2006 What exactly is your question? Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103104 Share on other sites More sharing options...
Ninjakreborn Posted October 3, 2006 Author Share Posted October 3, 2006 I have set up the framework almost for a program. I know it's not a good idea to create new tables dynamically(database tables). At this point though, I have a lot of information going throughpaypal, and coming back to paypal's IPN system. The thing is if I am not careful this could be riddled with security issues, when they finally payout. I am taking either template1.php or template2.php depending on which one they have chosen(more are getting added later), and I am opening it, reading the contents of it, and saving it in a variable. Then I need to find a way to create a cms for it, I need to get the cms put within the file information somehow, as well as decide what table structure in the database I can use for something like this. So they will be able to login to there administration area later on, and do what they need to do?? Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103105 Share on other sites More sharing options...
trq Posted October 3, 2006 Share Posted October 3, 2006 Cool.. so copy and paste works. Now... what part are you stuck with exactly? Surely in all your experience your able to think through a solution.It sounds to me like your approuching this entirely the wrong way. Why are you making new files for different clients? Ive written frameworks that can run multiple websites at the same time. You just need to store each sites configuration and data in a normalized manor. They don't even need seperate databases or tables though at times this does make things more efficient. Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103117 Share on other sites More sharing options...
Ninjakreborn Posted October 3, 2006 Author Share Posted October 3, 2006 I am working on it. EIther way this is more advanced file handling, I never did heavy file handling like this before. I have to create a dynamic cms, for pages that are dynamically generated, and create dynamic folders with that info, and dynamically grant admin access.I was wondering about the cms part, I have to allow them to edit the text within a content div, on the template page. I have spent all day, learning and setting up a paypal account on the development center, and created 2 test email accounts, 1 for sender, and 1 for reciever. So now I have setup the paypal form, I am preparing to be able to test it, I have some ideas how I am going to function this, but I still have a ways to go, any advice, or ideas on the cms part would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103125 Share on other sites More sharing options...
trq Posted October 3, 2006 Share Posted October 3, 2006 A simple cms to display data within a div is simply a matter of storing that data in a database. Maybe a tutorial on a [i]blog system[/i] or something simular would help? Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103127 Share on other sites More sharing options...
Ninjakreborn Posted October 3, 2006 Author Share Posted October 3, 2006 I build cms's all the timeIn this situation however, I have to be able to build them dynamically, everytime someone creates a sub-domain, and the page get's moved there, it has to have a seperate area for that cms??? Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103152 Share on other sites More sharing options...
trq Posted October 3, 2006 Share Posted October 3, 2006 yeah, I understand the problem. I just dont understand how to simply convey the solution. It just doesn't seem too difficult to me. I have entire sites all running as part of the same cms application. Its just a matter of database normalization. Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103157 Share on other sites More sharing options...
Ninjakreborn Posted October 3, 2006 Author Share Posted October 3, 2006 The way I do a standard text editing cms. I have a table, for instance if they have control over the text in there privacy policyI have a table in the db called privacy policyit has id, header, text fieldsthen they can add/edit/delete them through there admin, rather smoothlyHere though, if I had a different table for each person who signed up, I don't know how well that turned out. Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103161 Share on other sites More sharing options...
trq Posted October 3, 2006 Share Posted October 3, 2006 You dont need different tables for each user. Youve got to look at the database differently. What does your id column do? You need to relate each record in your database to the client it belongs to.Using your example, this would be as simple as adding a user_id field. However, there are better, more dynamic ways of going about this. What if you also wanted to add a footer field? You need to be able to do this without modifying the database structure. the answer is normalization. You would have two tables.[code]privacy_policy ( id INT user_id INT)privacy_lolicy_data ( id INT key TEXT val TEXT)[/code]To add a record you would simply insert into privacy_policy your users_id, then, using the newly created id run a series of inserts on privacy_policy_data that looked something like....[code]$id = mysql_insert_id();$sql = "INSERT INTO privacy_policy_data (id,key,val) VALUES ('$id','header','this is the header')";$sql = "INSERT INTO privacy_policy_data (id,key,val) VALUES ('$id','footer','this is the footer')";[/code]this enables you to add as many fileds as you need without ever modifying the database structure. This sort of organization can build dynamic structures quite easily. Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103179 Share on other sites More sharing options...
Ninjakreborn Posted October 3, 2006 Author Share Posted October 3, 2006 actually that's a good idea, I used that idea for a few things, for instance when I have a messaging system, I store all the messages in one table, and use the userid of the fromsender and to sender. So yes, thanks for the advice, that will get me past that part, thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/22875-dynamic-cms/#findComment-103181 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.