My blog... problems

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wildwobby
Forum Commoner
Posts: 66
Joined: Sat Jul 01, 2006 8:35 pm

My blog... problems

Post 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!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

What does this thread have to do with Unit Testing?
wildwobby
Forum Commoner
Posts: 66
Joined: Sat Jul 01, 2006 8:35 pm

Post by wildwobby »

Sorry if its the wrong forum, didn't know what else it fit under?
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Post 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 >
wildwobby
Forum Commoner
Posts: 66
Joined: Sat Jul 01, 2006 8:35 pm

Post 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....
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Post 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);
wildwobby
Forum Commoner
Posts: 66
Joined: Sat Jul 01, 2006 8:35 pm

Post by wildwobby »

No, its wordpress.
Post Reply