Titles, Photo's and Comment stuff

Created 16 years ago by Matt,
Last updated February 27th 2018, 1:51:55 pm

Been a while since last postinge, nad much has happened!

:)

Went to Alton Towers which was cool! Waiting to see the photo's, not much from the day methinks, but certainly some interesting pics from Chateuax Byrd, where it seems, it is compulsary to visit chickens, play snooker and wear brightly coloured waistcoats! Huzzar to quote glamage :)

I Have been driving a red flower van, and since before that I have been taking pictures during Hastings Old Town Festival and Carnival, and selling them :-) These are now online albeit in low res on at http://photo.stabeler.com/otw/

I have also tweaked my blog a little, firstly, I have added a bit to the links to blog items on the right, as I wanted them to be a little less generic, so have added the blog title's to the end of the URL as i'm told that this means that google and suchlike will index it better :-)

Secondly, at the request of Tom, I have removed the conflicting encoding messages... doh :-)

Also, I have managed to remove the UTF-8 encoded titles from my mobile blogs (which wasn't apparent anyway as I had made them all say the same!) which means that I can now add the mobile blog title to a mobile blog entry! :)

Also, I have written a cunning comments management interface to edit, verify and delete peoples comments :-)

Thats all for now :)

Comments

  1. "I have removed the conflicting encoding messages..."<br /> <br /> <?xml version="1.0" encoding="iso-8859-1" ?"."><br /> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><br /> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><br /> <br /> <head><br /> <title> Stabeler.com </title><br /> <meta http-equiv="Content-Type" content="text/html: charset=utf-8" /><br /> <br /> ???<br /> <br /> You need to run stripslashes() on the titles in the recent items list too :) - Tom on Sun Aug 28 2005 10:59:59 GMT+0000 (Coordinated Universal Time)
  2. I posted the offending html tags in my previous comment, but they're not showing up - you need to run htmlentities() on the comment text :) Think my last post will prevent this page from validating - sorry! - Tom on Sun Aug 28 2005 11:02:22 GMT+0000 (Coordinated Universal Time)
  3. yes I really must get that sorted out, have just tested the htmlentities() thing and it buggers up my<br /> nl2br(), so am going to make it a bbcode style stuff now :-) hehe may need some help with regex Tom :-) - matt stabeler on Sun Aug 28 2005 17:56:05 GMT+0000 (Coordinated Universal Time)
  4. Assuming you are not putting html code in your posts (use BBCode style instead with [ and ] - Geffy and I can give you functions to work with this).<br /> <br /> If you are on Geffys server then you DO NOT need to run addslashes() as magic quotes are on (exception: mobile blogs, as they do not come through POST).<br /> <br /> So submitted POST forms will automatically have single and double quotation marks backslash escaped ready for database insertion.<br /> <br /> Do no other encoding before inserting the data into the database.<br /> <br /> When you come to retrieve data from the database for browser output:<br /> <br /> $string = htmlentities($string, ENT_QUOTES):<br /> $string = nl2br($string):<br /> $string = stripslashes($string):<br /> <br /> The order in which you use the functions is important!<br /> <br /> Now if you (or people commenting) enter HTML code, it does not screw up your page and special chars correctly encoded.<br /> <br /> If you want to have links and formatting in your blog posts (or allow your commenters to do so) look at using BBCode style tags.. i.e. like:<br /> <br /> [ulist]<br /> [item]thing 1[/item]<br /> [item]thing 2[/item]<br /> [item]thing 3[/item]<br /> [/ulist]<br /> <br /> [olist]<br /> [item]thing 1[/item]<br /> [item]thing 2[/item]<br /> [item]thing 3[/item]<br /> [/olist]<br /> <br /> [link=http://stabeler.com/][title=Amazing blog of Matt]Matt[/link]<br /> <br /> [b]this can become strong in xhtml[/b]<br /> <br /> [i]this can become em in xhtml[/i]<br /> <br /> For mobile blog posts, you need to do something extra. To remove those odd line breaks and equals signs and to decode chars that have been hex encoded (like the pound sign), you'll need to use:<br /> <br /> $string = quoted_printable_decode($string):<br /> <br /> You will still need to run the other functions (as explained above).<br /> <br /> Any questions, drop me an e-mail / IM. - Tom on Mon Aug 29 2005 15:48:07 GMT+0000 (Coordinated Universal Time)
  5. .. and check the first 10 lines of source code for this page - still need to decide which encoding takes your fancy :) - Tom on Mon Aug 29 2005 15:51:57 GMT+0000 (Coordinated Universal Time)
  6. are you running nl2br before or after you run htmlentities, could you not use an ereg_replace or a preg_replace on the entity encoded string to perform the same effect as nl2br? - Geffy on Mon Aug 29 2005 17:02:28 GMT+0000 (Coordinated Universal Time)
  7. dont know why, but I am going to keep seeing if I can cant silly <a href="javascript:alert('hello there'):">stuff</a> in here - Geffy on Mon Aug 29 2005 17:04:30 GMT+0000 (Coordinated Universal Time)
  8. mnn nice cheese - matt stabeler on Mon Aug 29 2005 18:08:12 GMT+0000 (Coordinated Universal Time)