No, that worked well. I kept the bbcode tags and outputted to pre and it allows me to see the correct formatting I was after (after I copy and paste a row into the VB editor and preview it.
Thanks, i'll tinker around about more with the formatting and then start joy of updating the posts table.
--------------- Added [DATE]1347608664[/DATE] at [TIME]1347608664[/TIME] ---------------
OK, ran a test update and it *nearly* went perfectly.
What I missed is that the current contents of post.pagetext needs to remain, ideally after I add more formatted string.
So I need to insert $recipe into the begining of post.pagetext. Is there an SQL command like that, or should I read it into the array using some funkly JOIN thing (that I still haven't worked out) ?
--------------- Added [DATE]1347625652[/DATE] at [TIME]1347625652[/TIME] ---------------
Ok, managed to sort that out so it doesn't overwrite the existing data in pagetext.
All I need to do now is find a way to add a space or something when a field is empty so the formatting doesn't screw up and I'm laughing.
Is there an easy way to read all the fields in the current $recipe row and insert a space if the field is empty? Or does it need to be a check of each field ?
|