PDA

View Full Version : Something between maketextareacode and makelabelcode...


Burns
04-05-2002, 11:01 AM
Hi!

I want to change the post approvement site a little,
so i'm playing with moderate.php now...

I dont like this "maketextareacode" box,
because
a) too small font
b) black on white
c) too small for big posts, waste of space for small space
( it has a pre-definded size )

I really dont need to edit these posts, just want to be able read them
( without wasting my eyes to this unreadable font ),
so ideal would be the view smilar to the forum view...

I tried "makelabelcode" function, it even works,
but if a long post has no line breakes,
the line never breaks, untill... i dont know... ;)
( so i have wide wide WIDE window )

Anyone have an advice which function could i use
to display text blocks,
like tables with constant width and variable height ?
May be even with customizeble font size and text/background colors ?

Thanks in advance

Burns

Admin
04-05-2002, 11:12 AM
Use makelabelcode() with wordwrap() to add line breaks to the message.

Burns
04-05-2002, 11:28 AM
Thank you FireFly !
It looks better, but now i miss paragraphs :(
( the empty lines, can see them in the "area" box;
a long text without paragraphs is difficult to read too )

Also, isn't there any length-limit at "makelabelcode",
so a very long message would not be displayed complete ?

Are there any more advanced function,
that is already defined in vB code ?

Admin
04-05-2002, 11:30 AM
After you wordwrap() the message, passit through nl2br() so you get proper line breaks. :)
You can always use bbcodeparse2() but I think it's an overkill for this purpose (unless you want to see smilies and images and stuff).

Burns
04-05-2002, 12:10 PM
Thank you, it looks really nice now... :)

only one thing left...
i use dark-blue/dark-green for the background,
the adminstration has light-grey as background,
now what if the user choose a color too close to that grey ?

Is there any way to change the text/background color of administration ?

Admin
04-05-2002, 12:16 PM
You can change it globally in the cp.css file (it's a stylesheet).
Or you can just disable the color tag in the text:
$message = str_replace('[size', '[size', $message);
(if $message is the variable, I can't remember)
Then use bbcodeparse2(),

Burns
04-05-2002, 12:39 PM
Changed cp.css, it's perfect now ! :rambo:
Thank you again !

Admin
04-05-2002, 03:51 PM
No problems. :)