We all do the same :-))


then here's a tip:
How to make these Content Editors, without even think of the PHP code add a
graphic into the text. (ie: an article)


you tell them to add in the textbox they typed they article in the
following:

[img|name|align|valign|border]

and that is it.

another field will be where they will upload the graphic etc....

this thing from anywhere in the text, andf vualya: it is up there....

PHP will check it, rename it, find it, find it's sizes and precreate the IMG
tag...

Note the first parameter IMG, it is means that you can also add some other
staff... not only graphics...

just my 0.2c..

Cheers,
Maxim Maletsky.


-----Original Message-----
From: Josh G [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 12:00 PM
To: PHP User Group
Subject: Re: [PHP] mixing HTML and PHP code


----- Original Message -----
From: "Jade Ohlhauser" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Friday, January 12, 2001 1:40 PM
Subject: Re: [PHP] mixing HTML and PHP code


> IMHO even better is:
> input_text('hello', 20, $value);
>
> that's how that would appear on our site. We order the parameters
logically
> and include a catch all final parameter that will add text to the HTML
tag.

I agree... In fact the last major project I did by myself was even better,
it was

layout_textbox(array(

    vname  => "user_name",
    desc    => "Enter your name",
    size      => 20,
    pixel_size => 120, //Just for better control in IE
    max_size => 30 ));

doesn't matter what order they go in, and the function puts
defaults in for missing variables.

you get the idea... made coding slightly longer, execution slightly
slower, but maintainince 100% faster, no more looking up queer
function definitions every time you wanted to change the size or
value of something.

Plus, when i changed all text fields in the system to simple ones
with a different stylesheet, I simply update layout_textbox function.
Couldn't use stylesheet, or buttons would be affected as well...

> On our site that would more like:
>
> (comments)
>
> (include files)
>
> (page specific variables)
>
> html();
>
> head($title);
> head_css('stylesheet.css');
> head_script('script.js);
> x('head');
>
> body($style)
> table(0, 0, 0, '100%', '', BLACK);
> tr('top'); td(); image('fire.jpg'); x('td'); x('tr');
> x('table');
>
> x('body');
> x('html');

Almost exactly the same, save it would be

layout_open_table(array(.....));

foo foo foo

layout_close_table();

Didn't think anybody out there did it the way I do :-)

Gfunk

       My name was Brian McGee,
       I stayed up listening to Queen,
       When I was seventeen.

http://www.gfunk007.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to