Flags: you got it. : )
html_entity_decode, I think my earlier comment may have led you in the wrong direction. To be clear:
You are displaying this in an HTML page. Anything you want shown as “plain text” should be html-entity encoded. Do not decode it before putting it on your webpage. When you serve un-encoded text to a web browser, the web browser treats it as HTML. HTML entities are the only way the browser knows that it is supposed to be plain text.
What I was talking about earlier were other formats, which are not parsed as HTML. This is not one of those situations. Sorry for the confusion.
Hey guys, Ive been thinking that I have to start to impliment some sort of design to the site. I think it will help me keep this going and a solid design will make people look at the site more seriously, then the jumbled mess that it looks to be right now. I am not very good with photoshop, or design in general, so I just whipped up something simple for the dashboard page. I actually ran out of room but below the messaging box would be the “Post to general forum” area. I know this looks like a mess now, but I believe I can clean it up with some CSS. Let me know what you think! Thanks.
So is the method in place right now incorrect?
When you have text that is supposed to be “plain text,” it must be encoded as html entities by the time it gets to the page.
Say you had a post titled “All About The <H1>Headings</H1>”. If you use htmlentities, it will look like this:
All About The & lt;H1& gt;Headings& lt;/H1& gt;
But when viewed in the browser it will look like plain text. If you decode that, then when it gets to the browser, it will look like this:
All About The
This is exactly what XSS attacks are about: confusing what is supposed to be data (content) with what is supposed to be instructions (HTML markup).
Do you agree that I should implement a design and build upon that?
To achieve what goal?
To help learn PHP? No it won’t help with that – you’d be better off making your existing code better and truly understanding the concepts you are currently struggling with.
To help learn HTML and CSS better? It would help with that.
What are you hoping to get from this project? Once you’ve established that, then your area of focus should be clear.
Ok I just had to stop in and see how large this has grown. Holy &%$* that’s a lot of posts.
People will use ugly sites if they’re useful (even if they’re not all that usable sometimes). Look at Craigslist or Reddit.
Yeah… I couldn’t agree more with this more. I for one REALLY appreciate awesome design and clean UI and an overall “pretty” experience. However… there’s no arguing with facts. Craigslist, Reddit and 4chan are some of the ugliest sites in the world and have arguably more cultural impact than all the “pretty” sites combined.
Ugly and functional sometimes wins. Look at the CLI… NO ONE has found a more efficient way to do things… so it lives on.
BTW: I am NOT a 4chan anon, nor am I a very frequent Redditor. Just stating facts. Hell, I don’t even really use Craigslist but for once in a while. But… people DO use these sites in droves.
You could style the template up to be clean and usable in a few hours I would bet. It’s not that far off from the current flat design craze. Again… as long as it works and does what people want it to do… they won’t care. Designers (myself included) love to think otherwise… but it’s true. Now… design can ENHANCE the experience, but it doesn’t make it.
I want to make the site very useful and usable from a php point of view. But I also think it needs a common design throughout all the pages.
If you want to be able to write a site that is useful and usable, then you need to develop a skillset. Stop thinking about the site and start thinking about yourself. If you focus only on the end goal, you’ll just be disappointed when it doesn’t meet your expectations. Barely anyone builds a successful project on their first venture into coding.
Whatever happens, you are not going to have this site sorted soon, and both the back and front ends will need to be developed. Instead of trying to do it all at once, focus on what will help you most in the longer term. That is why I asked what it is you wanted to gain from this.
BenWalker has some good advice, I’d take to heart what he’s saying.
Regarding your site however, if you truly want people to use it, get it working as best as you can, that means the backend. People might use an ugly site that works, but they definitely won’t use a pretty site that doesn’t work.
I’m am all for form, but I do believe that form follows function. Unless you’re talking about art, in which case is the form the function? But that’s neither here nor there :)
You must be logged in to reply to this topic.