function images() { $vidsService = new OnDiskVideosService(); $albumId = $this->param('albumId'); $rep = $this->getResponse('html'); $tpl = new Jtpl(); $picasaService = new jPicasa(); $thumbnailSize = 400; foreach ($picasaService->images($albumId, $thumbnailSize) as $image) { $paint = new Painting($image); $paintings[] = $paint; //break; } $tpl->assign('albumId', $albumId); $tpl->assign('images', $paintings); if ($this->param('commented')) { $tpl->assign('commented', true); } else { $tpl->assign('commented', false); } $form = jForms::create('coment'); $form->setData('albumId', $albumId); $tpl->assign('form', $form); $vidFile = $vidsService->getVideo($picasaService->getAlbumById($albumId)->name); $tpl->assign('video', $vidFile); $rep->body->assign('MAIN', $tpl->fetch('images_html')); return $rep; }
function index() { $rep = $this->getResponse('html'); $tpl = new jTpl(); $form = jForms::create('search'); $tpl->assign('formulaire', $form); $vidsServ = new OnDiskVideosService(); $tpl->assign('video', $vidsServ->randomVideo()); $picasaSrv = new jPicasa(); $paintings = array(); foreach ($picasaSrv->lastImages() as $img) { $paintings[$img->name] = new Painting($img); } $tpl->assign('images', $paintings); $rep->body->assign('MAIN', $tpl->fetch('photogallery_index')); return $rep; }