xoops forums

timgno

Module Developer
Posted on: 2011/10/23 16:15
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#1

Xoops Html Classes

Only for testing out of xoops production

download

Cesagonchu

Moderator
Posted on: 2011/10/23 17:15
Cesagonchu
Cesagonchu (Show more)
Moderator
Posts: 877
Since: 2010/2/1 2
#2

Re: Xoops Html Classes

Thank you

timgno

Module Developer
Posted on: 2012/1/19 14:27
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#3

Re: Xoops Html Classes

Others classes are included in first package

Download

syrian_arab

Just popping in
Posted on: 2012/1/21 6:00
syrian_arab
syrian_arab (Show more)
Just popping in
Posts: 35
Since: 2011/2/11
#4

Re: Xoops Html Classes

Thank you, but what work Xoops Html Classes

timgno

Module Developer
Posted on: 2012/1/27 7:59
timgno
timgno (Show more)
Module Developer
Posts: 1504
Since: 2007/6/21
#5

Re: Xoops Html Classes

These classes are an outline of what should be for xoops, in reality, their function should replace that code integrated in other classes xoops. To give an example:
echo '<table width="100%" cellspacing="1" class="outer">';
            echo 
'<tr>';
            echo 
'<th align="center" width="30%">'._AM_TDMCREATE_NAME.'</th>';
            echo 
'<th align="center" width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
            echo 
'<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
            echo 
'<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
            echo 
'<th align="center" width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
            echo 
'<th align="center" width="10%">'._AM_TDMCREATE_NB_CHAMPS.'</th>';
            echo 
'<th align="center" width="20%">'._AM_TDMCREATE_FORMACTION.'</th>';            
            echo 
'</tr>';


This code above would be taken up with this:
$table = new XoopsHtmlTable ($rows$caption ''$frame ''$rules ''$cellspacing ''$cellpadding ''$class ''$id '');
echo 
$table->addRow($attributes_AM_TDMCREATE_NAME);
...

As you can see in the code above I added a line that integrates a part of php code, but this is still extended.

Some variables, such as attributes, are arrays that contain the properties of html tags, so can be integrated in a small code space.

The same is true of content, such as variable definitions _AM_TDMCREATE_NAME, these can be listed in an array and then integrated in this way:
$defines = array(_AM_TDMCREATE_NAME_AM_TDMCREATE_IMAGE_AM_TDMCREATE_DISPLAY_ADMIN_AM_TDMCREATE_DISPLAY_USER_AM_TDMCREATE_BLOCKS_AM_TDMCREATE_NB_CHAMPS_AM_TDMCREATE_FORMACTION);
echo 
$table->addRows($attributes$defines);
...

I hope this is clear enough.