As it stands I have a lot done for my website. However, like most breeding game sites I would like to give my users a way to "decorate" their pages. Though I am just a beginner in the coding world... I am a fast learner. ^^ So any turtorials, websites, or even help on the spot would be greatly appreciated. Details: Need page editor for registered users. For the "homepage". A way to limit basic users in what HTML tags they can use. A way for upgraded users to use all HTML tags. I have looked google over for such code, but I can't seem to find any tutorials that matches what I am specifically looking for. ^^ ---- P.S. I maybe willing to pay (USD) someone to code (or help code) my site. Just a little FYI. For further details contact me at: tcd@abreedersquest.net
you can code with a simple forms then validate the html tags with strip_tags() to allow only certain html tags to be allowed.
Ah.. that makes sense. I know on some websites they have HTML editors similar in nature to what you see in forums. So that is my reasoning for asking. =] I need to do research on strip_tags() a bit before I use them. To make sure I don't mess up any code I type out. ^^ Thank for you the help.
Okay I have the form, but how do I get php or form to include HTML into the text area and how do I get the information sent to the page to "stick"? As in can't be removed until user wants to change his or her page content. =]
thechosendarkness.. what are you trying to do ? you want to build 'Home Pages' that act as templates that can be modified in HTML by your users? If you want to limit their use of scripts and tags , you could just set up a template that has boxes that allow them to enter up to 10 URLS (other websites) and certain places to add picture files of a certain size etc. Like how MySpace works , they dont necessarily allow to edit and code the page anyway the users want to, they set it with specifics. A Simple process to do that would be : 1. code a HTML template page that works as a Tool Dashboard (this page would have input boxes that allow them to only enter the paths to images or websites. but you supply the "HTTP:// [ box begins here] they couuld upload all the files they want, and enter URL paths to any otherstuff you allow. Then they hit the submit button The submit button writes this to a file and gives it the attached users user_name so if o nthat site your user was 'thechosendarkness' the PHP would write that file and name it "thechosendarkness.html" and the Home pages code would be all of your pre-existing template , plus.. the tidbits you allowed them to add in. All of this would get written and create to a new file called "thechosendarkness.html" so that when they came to your website http://www.yoursite.com /thechosendarkness.html they would arrive at the page they had created. Nobody else would be able to edit that page (except you as site owner) because they would have to login .. and then get sent to their control panel / or dashboard ..or whatever you want to call it . aka= their main tool center that edits their own homepage. Make them login first, for many obvious reasons.. and also so that it can create and write the file with their user_name in it.
More like how games such as wajas*dot*com, squffies*dot*com, hoof-printz*dot*com, etc. are set up. A user registers a account to play the game. They have their own "homepage" as it were. Kind of like www*dot*urlhere*dot*net/pasture*dot*php?id=2 where they can decorate their main page. That way other users who view that user's account can see the conent of the page. Such as a layout or just very organized text or what have you. It is a way for a user to personalize their own little space. Kind of like a blog. Which is about as close as I can think of that would be generally what I am talking about. Basically a user uses a form to submit some text and then it is displayed on the page for others to see besides themselves. I hope that makes sense? I am basically trying to get that content to stick to the page. I know I might have to insert the data and then retrieve it, but I was wondering if there is a php command line that would post the information without the use of a database? If I have to use a database (which I have one set up) I am not sure how to "insert" the content of the submitted data from the user.
That depends on how you want to do it , but a database for text fields of user input that could bring down your database very quick as it would be a mass amount of data. If you assume a paragraph per section to every user. My first thought would be to write it to a file not to a database. Use the database for the users, passwords, etc I would also make it a template - so that while they can decorate and add text and images, it would be set up to where they would have to put them within specific areas. aka= "heres the 'about me ' text box' ..and heres where your profile picture will be.. then they type in their text ,upload their files, and hit the submit button. Your script could take their user_name and create the file . example thechosendarkness.html Giving them total control over the layout and function of their page would be pretty crazy in my opinion. because then you open yourself to a billion emails a day saying = "how do i do this? ..its broke" filled with HTML errors ,or table errors scrambling the page in some weird way. Start simple, and let your users define what want to see next , or see made , or made better etc. .. let them evolve your site. check out the fputs function for PHP whatever the user posts for text or their image files , use the PHP function to create a unique page with the users name, IP or whatever in the filename. Then your template page loads ..it looks to see which user name is logged in and then if youre user 'thechosendarkness' , it'll grab the file $user_name . "_" . $ip . "txt" or something along those lines. The text file is opened, and the 'about me' section and the image file string of "my_images/funny_pic.jpg" will all be filled into the template areas. So imagine users are submitting or posting all the information they fill in ..to a template page that will replace PHP variables with the cooresponding data they input, and it takes all that and creates a unique HTML page thechosendarkness.html when other people type = www.examplesite.com/thechosendarkness.html Your page would be returned. Thats the easiest way i could explain it. You might not want html extensions and more functions etc.. but that would be the basics of how to make what you want to work.
Okay, here is some screenshots to better illustrate what I am talking about: Here is what I have: Here is what I want to do: In order to get this result: Basically a way for my registered users to decorate their page. I am not sure if anyone is familiar with games like Wajas, Squffies, Hoof-Printz, Purefelinity, Small Critters, Horseland, etc. Each game has it to where the users can decorate their page. I don't know what is called or how to further explain it. I think Javascript might be involved, but I am not 100% sure. Seeing as I am trying to figure out a way NOT to use a database.