Need help with the implementation the component ifPorfolio.... - Joomla! Forum - community, help and support


greetings friends.

i working commercial component ifportfolio. had serious 1 him of modifications , add options him but.

what need result of registries in 2 columns.

i made perfectly, component used series of functions, classes , library pattemplate.

the exit of data made means of file xml. show example him in post.

code: select all

<pattemplate:tmpl name="ifportfolio_ui">
<div id="{t_class_name}_div" align="left">
<pattemplate:tmpl name="ifportfolio_style_list">
<link rel="stylesheet" type="text/css" href="{t_stylesheet_url}"/>
</pattemplate:tmpl>
<pattemplate:tmpl name="ifportfolio_ui_list" type="condition" conditionvar="attributes">
<pattemplate:sub condition="false">
<br/>
<table class="{t_class_name}">
  <tr>
    <td class="{t_class_name}_image">{t_image_resource}</td>
    <td class="{t_class_name}_title" valign="top">{t_portfolio_heading}
      <div class="{t_class_name}_description">
    {t_description}      </div></td>
  </tr>
</table>
</pattemplate:sub>
<pattemplate:sub condition="true">
<br/>
<table class="{t_class_name}">
<tr>
<td colspan="4" class="{t_class_name}_title">
{t_portfolio_heading}
</td>
</tr>
<tr>
<!-- first attribute value pair. -->
<td class="{t_attrib_class_name}_title" align="left" valign="top">
{t_attribute_title}
</td>
<td class="{t_attrib_class_name}_desc" valign="top">
{t_attribute_value}
</td>
<td valign="top" align="left" rowspan="{t_rowspan_value}" class="{t_class_name}_description_cell">
<div class="{t_class_name}_description">
{t_description}
</div>
</td>
<td valign="middle" rowspan="{t_rowspan_value}" class="{t_class_name}_image">
{t_image_resource}
</td>
</tr>
<pattemplate:tmpl name="ifportfolio_ui_attribute">
<!-- successive attribute value pairs. -->
<tr>
<td class="{t_attrib_class_name}_title" align="left" valign="top">
{t_attribute_title}
</td>
<td class="{t_attrib_class_name}_desc" valign="top">
{t_attribute_value}
</td>
</tr>
</pattemplate:tmpl>
</table>
</pattemplate:sub>
</pattemplate:tmpl>
<pattemplate:tmpl name="ifportfolio_ui_image" visible="hidden">
<img src="{t_image_src}" width="{t_image_width}" height="{t_image_height}"/>
</pattemplate:tmpl>
<pattemplate:tmpl name="ifportfolio_ui_image_link" visible="hidden">
<a href="{t_resource_url}" target="_blank"><img src="{t_image_src}" width="{t_image_width}" height="{t_image_height}" border="0"/></a>
</pattemplate:tmpl>
<pattemplate:tmpl type="condition" conditionvar="linkurl"
name="ifportfolio_ui_title">
<pattemplate:sub condition="0">
{t_title}
</pattemplate:sub>
<pattemplate:sub condition="1">
<a href="{t_resource_url}" target="_blank">{t_title}</a>
</pattemplate:sub>
</pattemplate:tmpl>
</div>
<pattemplate:tmpl name="ifportfolio_ui_pages" type="condition" conditionvar="bounds" visibility="hidden">
<pattemplate:sub condition="start">
<div class="{t_class_name}_paging">
<a href="{t_site_name}?option=com_ifportfolio&direction=1&lower={t_lower_bound}&upper={t_upper_bound}&itemid={t_item_id}">siguiente >></a>
</div>
</pattemplate:sub>
<pattemplate:sub condition="middle">
<div class="{t_class_name}_paging">
<a href="{t_site_name}?option=com_ifportfolio&direction=-1&lower={t_lower_bound}&upper={t_upper_bound}&itemid={t_item_id}"><< anterior</a> | <a href="{t_site_name}?option=com_ifportfolio&direction=1&lower={t_lower_bound}&upper={t_upper_bound}&itemid={t_item_id}">siguiente >></a>
</div>
</pattemplate:sub>
<pattemplate:sub condition="end">
<div class="{t_class_name}_paging">
<a href="{t_site_name}?option=com_ifportfolio&direction=-1&lower={t_lower_bound}&upper={t_upper_bound}&itemid={t_item_id}"><< anterior</a>
</div>
</pattemplate:sub>
</pattemplate:tmpl>
{t_paging_header}
</pattemplate:tmpl>

hello friends. please see this near need faq in site of of joomla...

the problem consists of data not want means of array, means of variable of first code of example.


i leave code piece him investigates in faq...

code: select all

01  <?php
02        // data display
03        $data = array(
04                       array( "real_name" =>"clark kent", "superhero" =>"superman" ),
05                       array( "real_name" =>"bruce wayne", "superhero" =>"batman" ),
06                       array( "real_name" =>"kyle rayner", "superhero" =>"green lantern" ),
07                       array( "real_name" =>"wally west", "superhero" =>"the flash" ),
08                       array( "real_name" =>"linda danvers", "superhero" =>"supergirl" ),
09                     );
10        // number of columns per row
11        $cols  = 3;
12      
13        // calculate number of rows
14        $rows    = ceil( count( $data ) / $cols );
15        $counter = 0;
16      
17        // loop each row
18        for( $i = 0; $i <$rows; $i++ )
19        {
20          // clear cells last row
21          $tmpl->cleartemplate( "cell" );
22      
23          // put data 1 row in new array
24          $rowdata = array();
25          for( $j = 0; $j <$cols; $j++ )
26          {
27            if( isset( $data[$counter] ) )
28              array_push( $rowdata, $data[$counter++] );
29          }
30          // add data of 1 row cells
31          $tmpl->addrows( "cell", $rowdata );
32          // parse row , append data parsed rows
33          $tmpl->parsetemplate( "row", "a" );
34        }
35        $tmpl->displayparsedtemplate();
36        ?>





Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code