Fork me on GitHub

Rapport de message :*
 

Re: Adapter le contenu d'un block a une page

Titre du sujet : Re: Adapter le contenu d'un block a une page
par yomhatiqva sur 23/11/2006 17:36:17

Tu as tout compris J'ai créé le module "top", mais je bute en fait sur la manière d'intégrer le script des blocs dans une page ex:

Citation :

function b_smartmedia_clips_recent_show($options)
{
// This must contain the name of the folder in which reside SmartClient
if( !defined("SMARTMEDIA_DIRNAME") ){
define("SMARTMEDIA_DIRNAME", 'smartmedia');
}
include_once(XOOPS_ROOT_PATH."/modules/" . SMARTMEDIA_DIRNAME . "/include/common.php");

//$max_clips = $options[0];
$title_length = $options[0];
$max_clips = $options[1];

$smartmedia_clip_handler =& xoops_getmodulehandler('clip', 'smartmedia');
$clipsArray =& $smartmedia_clip_handler->getClipsFromAdmin(0, $max_clips, 'clips.counter', 'DESC', 'all');

If ($clipsArray) {
foreach ($clipsArray as $clipArray) {
$clip = array();
$clip['itemlink'] = '<a href="' . SMARTMEDIA_URL . 'clip.php?categoryid=' . $clipArray['categoryid'] . '&folderid=' . $clipArray['folderid'] . '&clipid=' . $clipArray['clipid'] . '">' . $clipArray['title']. '</a>';
$clip['categoryid'] = $clipArray['categoryid'];
// $clip['counter'] = $clipArray[]->getVar('counter');
$block['clips'][] = $clip;
unset ($clip);
}
}

$block['smartmedia_url'] = SMARTMEDIA_URL;

return $block;
}


Par quoi dois-je remplacer $block ?
Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

47 Personne(s) en ligne (38 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 47 | Plus ...