Page 1 of 1

My blog... problems

Posted: Thu Dec 27, 2007 1:29 pm
by wildwobby
Hey, I have recently created a new blog.

http://wildwobby.blogdns.org

Now its alright, but I do have a few problems I'm hoping some of you might be able to help me with. I posted at wordpress.org a few days ago and have got no response.

Anyways, I'm trying out diferent php code display plugins, and I have finally found one that looks good EXCEPT:

1. '>' gets displayed as '>' which is VERY frustrating.
2. I don't know how to indent the code to make it more readable, tab doesn't work, and if I press space like 10 times, wordpress automatically tries to clean it up by deleting the extraneous spaces.

If someone can help me iron these kinks out I would be a very happy camper!

Posted: Thu Dec 27, 2007 1:39 pm
by feyd
What does this thread have to do with Unit Testing?

Posted: Thu Dec 27, 2007 1:39 pm
by wildwobby
Sorry if its the wrong forum, didn't know what else it fit under?

Posted: Thu Dec 27, 2007 1:48 pm
by markusn00b
Can you use <pre> ?

eg:

<pre>
//code you write goes here
</pre>
It should hold the whitespace.

As for the htmlentity problem

simply write the > as >

Posted: Thu Dec 27, 2007 2:08 pm
by wildwobby
<pre> messes up the format somehow...

the > automatically change to > after I save it.... but it displays like that in the browser too....

Posted: Fri Dec 28, 2007 9:57 am
by Jonah Bron
Is the "saving" code your own? If so, just do:

Code: Select all

$php_to_save = str_replace('<', '<', $php_to_save);
$php_to_save = str_replace('>', '>', $php_to_save);

Posted: Fri Dec 28, 2007 11:58 am
by wildwobby
No, its wordpress.