PDA

View Full Version : Help making cutenews tags...



Luckyrare
23-10-2005, 01:05 PM
Okay,

I am making cutenews into a tutorial system, I no some people may just say "Make your own", but I think its a good script.

Okay to start I opened up my

"inc/functions.inc.php"

And added a few extra lines...


/* 19 */ "'\[php\](.*?)\[/php\]'i",

and that will make the
tag... and this will replace what shows on the page.

[PHP]/* 19 */ "<table width='100%' border='1' cellpadding='0' cellspacing='0'><tr><td width='100%' valign='top'> PHP</td></tr><tr><td valign='top'>
<?
highlight_string('\\1');
?>
</td></tr></table>",
(Thanks to mentor helping the funtion tag "hightlight_string('') )

But it doesnt show how it should...

This is how I want it to show on the cutenews...

http://www.xenigma.co.uk/habbox.php


Any ideas on making it work?
As it doesnt show how I want it to!

Thanks!

Mentor
23-10-2005, 03:34 PM
Ok, im not sure, but one problem is you are already in php so dont realy need the php tags? try this? (im guessing so many be wrong)

"<table width='100%' border='1' cellpadding='0' cellspacing='0'><tr><td width='100%' valign='top'> PHP</td></tr><tr><td valign='top'>".highlight_string('\\1')."
</td></tr></table>",

That way the php is not broken, and the function is part of the text part

Want to hide these adverts? Register an account for free!