Jump to content

Advice on myspace type site


graham23s

Recommended Posts

Hi Guys,

 

i'm thinking of doing a cut down version of a myspace/community type site, planning it on paper just now but 1 thing i can't figure out is how the users add html to the dynamic pages, i take it the html is stored in myslq (in the users membership details) just to echo out like any other piece of information you grab from mysql but would that not disrupt the entire layout of the site for the user if thay put in non-proper code? is there a better way i could do this?

 

any info or advide would be appreciated

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/70501-advice-on-myspace-type-site/
Share on other sites

Yes. You'll have to use some regular expression to test for improper tags, tags which aren't closed ect. For example you wouldn't want any <body>, <head> or <title> tags. So strip those...

 

 

Further more you would want your users "site" to be contained within a single div or something like that so it can't mess up the entire site :)

At the moment, they can use anything they want, a whole section of site just mimics a directory set full of php pages which are wrapped up into a cms template... But I know what you mean and it is possible to parse out offending words, however I want it so that script structure is not damaged and errors out (e.g. thinking about spliting on ';' and then checking each line, but not sure, future devs!).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.