Categories > TinyButStrong general (FR) >

Sous blocs ?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Pierre
Date: 2009-07-20
Time: 18:46

Sous blocs ?

Salut,
J'ai comme un pti problème avec les sous blocs ... je cherche dans le forum mais je vois pas trop où est mon soucis.

niveau code PHP je me retrouve avec un tableau qui donne ça :
Array
(
    [uid] => 10
    [pid] => 1
    [tstamp] => 1248100362
    [crdate] => 1247854111
    [cruser_id] => 1
    [parent_id] => 0
    [deleted] => 0
    [active] => 0
    [sorting] => 0
    [hidden] => 0
    [starttime] => 0
    [endtime] => 0
    [fe_group] =>
    [sys_language_uid] => 0
    [l18n_parent] => 0
    [l18n_diffsource] => a:24:{s:5:"title";N;s:8:"keywords";N;s:11:"description";N;s:7:"date_cr";N;s:8:"date_mod";N;s:7:"caption";N;s:8:"alt_text";N;s:12:"file_dl_name";N;s:18:"file_orig_location";N;s:18:"file_orig_loc_desc";N;s:8:"category";N;s:6:"hidden";N;s:9:"starttime";N;s:7:"endtime";N;s:8:"fe_group";N;s:7:"creator";N;s:9:"publisher";N;s:9:"copyright";N;s:5:"ident";N;s:12:"instructions";N;s:14:"oeuvre_louable";N;s:17:"oeuvre_calendrier";N;s:15:"pub_prioritaire";N;s:10:"pub_resume";N;}
    [t3ver_oid] => 0
    [t3ver_id] => 0
    [t3ver_wsid] => 0
    [t3ver_label] =>
    [t3ver_state] => 0
    [t3ver_stage] => 0
    [t3ver_count] => 0
    [t3ver_tstamp] => 0
    [media_type] => 9
    [title] => P700U - Culture éducation.pages
    [category] => 1
    [index_type] => auto
    [file_mime_type] => application
    [file_mime_subtype] => x-zip-compressed
    [file_type] => zip
    [file_type_version] =>
    [file_name] => P700U - Culture éducation.pages.zip
    [file_path] => fileadmin/publications/
    [file_size] => 51.2001953125
    [file_mtime] => 1247868511
    [file_inode] => 11206714
    [file_ctime] => 1247868511
    [file_hash] => 551a88ef33d36183fabd601029a3cccc
    [file_status] => 0
    [file_orig_location] =>
    [file_orig_loc_desc] =>
    [file_creator] =>
    [file_dl_name] => P700U - Culture éducation.pages.zip
    [file_usage] => 0
    [meta] =>
    [ident] =>
    [creator] =>
    [keywords] =>
    [description] => Ce document contient le manuel utilisateur de l'extension qui gère culture éducation !
    [alt_text] =>
    [caption] =>
    [abstract] =>
    [search_content] =>
    [language] =>
    [pages] => 0
    [publisher] =>
    [copyright] =>
    [instructions] =>
    [date_cr] => 1247868511
    [date_mod] => 1247868511
    [loc_desc] =>
    [loc_country] =>
    [loc_city] =>
    [hres] => 0
    [vres] => 0
    [hpixels] => 0
    [vpixels] => 0
    [color_space] =>
    [width] => 0
    [height] => 0
    [height_unit] =>
    [oeuvre_louable] => 1
    [tx_damdemo_info] =>
    [tx_damdemo_customcategory] => 0
    [oeuvre_calendrier] => 1
    [pub_prioritaire] => 0
    [pub_compteur] => 0
    [pub_resume] =>
    [pub_img] =>
    [download] => fileadmin/publications/P700U - Culture éducation.pages.zip
    [order] =>
    [img_preview] => typo3conf/ext/publications/
    [categories] => Array
        (
            [0] => Array
                (
                    [title] => publication cat2
                    [uid] => 18
                )

        )

)
Array
(
    [uid] => 11
    [pid] => 1
    [tstamp] => 1247854128
    [crdate] => 1247854111
    [cruser_id] => 1
    [parent_id] => 0
    [deleted] => 0
    [active] => 0
    [sorting] => 0
    [hidden] => 0
    [starttime] => 0
    [endtime] => 0
    [fe_group] =>
    [sys_language_uid] => 0
    [l18n_parent] => 0
    [l18n_diffsource] => a:23:{s:5:"title";N;s:8:"keywords";N;s:11:"description";N;s:7:"date_cr";N;s:8:"date_mod";N;s:7:"caption";N;s:8:"alt_text";N;s:12:"file_dl_name";N;s:18:"file_orig_location";N;s:18:"file_orig_loc_desc";N;s:8:"category";N;s:6:"hidden";N;s:9:"starttime";N;s:7:"endtime";N;s:8:"fe_group";N;s:7:"creator";N;s:9:"publisher";N;s:9:"copyright";N;s:5:"ident";N;s:12:"instructions";N;s:14:"oeuvre_louable";N;s:17:"oeuvre_calendrier";N;s:15:"pub_prioritaire";N;}
    [t3ver_oid] => 0
    [t3ver_id] => 0
    [t3ver_wsid] => 0
    [t3ver_label] =>
    [t3ver_state] => 0
    [t3ver_stage] => 0
    [t3ver_count] => 0
    [t3ver_tstamp] => 0
    [media_type] => 9
    [title] => document d\'analyse des nouvelles de l\'ASSSM.pages
    [category] => 1
    [index_type] => auto
    [file_mime_type] => application
    [file_mime_subtype] => x-zip-compressed
    [file_type] => zip
    [file_type_version] =>
    [file_name] => document d\'analyse des nouvelles de l\'ASSSM.pages.zip
    [file_path] => fileadmin/publications/
    [file_size] => 54.951171875
    [file_mtime] => 1247868511
    [file_inode] => 11206715
    [file_ctime] => 1247868511
    [file_hash] => d6288b5630b2acdc271e03371f82654d
    [file_status] => 0
    [file_orig_location] =>
    [file_orig_loc_desc] =>
    [file_creator] =>
    [file_dl_name] => document d\'analyse des nouvelles de l\'ASSSM.pages.zip
    [file_usage] => 0
    [meta] =>
    [ident] =>
    [creator] =>
    [keywords] =>
    [description] =>
    [alt_text] =>
    [caption] =>
    [abstract] =>
    [search_content] =>
    [language] =>
    [pages] => 0
    [publisher] =>
    [copyright] =>
    [instructions] =>
    [date_cr] => 1247868511
    [date_mod] => 1247868511
    [loc_desc] =>
    [loc_country] =>
    [loc_city] =>
    [hres] => 0
    [vres] => 0
    [hpixels] => 0
    [vpixels] => 0
    [color_space] =>
    [width] => 0
    [height] => 0
    [height_unit] =>
    [oeuvre_louable] => 1
    [tx_damdemo_info] =>
    [tx_damdemo_customcategory] => 0
    [oeuvre_calendrier] => 1
    [pub_prioritaire] => 0
    [pub_compteur] => 0
    [pub_resume] =>
    [pub_img] =>
    [download] => fileadmin/publications/document d\'analyse des nouvelles de l\'ASSSM.pages.zip
    [order] =>
    [img_preview] => typo3conf/ext/publications/
    [categories] => Array
        (
            [0] => Array
                (
                    [title] => publication cat2
                    [uid] => 18
                )

        )

)

le code PHP en tant que tel :
// On merge le bloc
        $this->tbs->mergeBlock('pub',$pub);
        $this->tbs->mergeBlock('cat',$pub['%p1%']['categories']);

au niveau HTML j'ai ça :
<tr class="bleu">
                            <td class="img-preview"><img src="[pub.img_preview]" alt="" width="50" height="69" /></td>
                            <td class="desc-preview">
                                <h4>[pub.title;block=tr]</h4>
                                <p>[pub.description]</p>
                                <p><strong>44 pages - [pub.file_type;magnet=strong] [pub.file_size;frm=(0,0 Ko)|||]</strong></p>
                                <p><em>Cat&eacute;gorie</em> - <a href="#">[cat.title;p1=[pub.$];block=a]</a></p>
                            </td>
                            <td class="download"><a href="[pub.download]"><img src="images/interface/Adobe-PDF_32.png" alt="" width="32" height="32" border="0" /></a></td>
                            <td class="preview"><a href="[pub.pub_resume;magnet=a]"><img src="images/interface/ico-Preview-32.png" alt="" width="32" height="32" border="0" /></a></td>
                            <td class="commander"><a href="[pub.order;magnet=a]"><img src="images/interface/ico-File_32.png" alt="" width="32" height="32" border="0" /></a></td>
                        </tr>

et je tourne en rond pour faire en sorte que l'affichage de mes catégories fonctionnent :S
Merci d'avance de tout hint ;)

Pierre
By: Pierre
Date: 2009-07-20
Time: 18:58

Re: Sous blocs ?

Je viens de voir les sous-blocs automatiques.
du coup j'essaye d'utiliser le _sub1.
donc le code de vient :
<tr class="bleu">
                            <td class="img-preview"><img src="[pub.img_preview]" alt="" width="50" height="69" /></td>
                            <td class="desc-preview">
                                <h4>[pub.title;block=tr;sub1=categories]</h4>
                                <p>[pub.description]</p>
                                <p><strong>44 pages - [pub.file_type;magnet=strong] [pub.file_size;frm=(0,0 Ko)|||]</strong></p>
                                <p><em>Cat&eacute;gorie</em> - <a href="#">[pub_sub1.title;block=a]</a></p>
                            </td>
                            <td class="download"><a href="[pub.download]"><img src="images/interface/Adobe-PDF_32.png" alt="" width="32" height="32" border="0" /></a></td>
                            <td class="preview"><a href="[pub.pub_resume;magnet=a]"><img src="images/interface/ico-Preview-32.png" alt="" width="32" height="32" border="0" /></a></td>
                            <td class="commander"><a href="[pub.order;magnet=a]"><img src="images/interface/ico-File_32.png" alt="" width="32" height="32" border="0" /></a></td>
                        </tr>
et le php :
// On merge le bloc
        $this->tbs->mergeBlock('pub',$pub);
Mais je n'y arrive pas non plus.
By: Pierre
Date: 2009-07-20
Time: 19:02

Re: Sous blocs ?

OK le problème est réglé cette fonctionnalité n'existe que dans la version 3.5 qui est encore en beta :)

Merci
By: Skrol29
Date: 2009-07-20
Time: 23:55

Re: Sous blocs ?

C'est une beta RC très stabilisée. On est très proche de version finale, je te conseille de l'utiliser si cette fonctionnalité te convient.