Looking on sourceforge I'm assuming I download the latest updates under Voltan's branch is that correct? Is it a final version, RC, Beta? Has it been tested? Does it work?
Any news here?
Cheers,
Marty.
<{if $display_pdf}>
Here the specific html code...
<{/if}>
timgno wrote:
You can create a simple code in preferences and templates like this:
xoops_version.php file:$i++;
$modversion['config'][$i]['name'] = 'display_pdf';
$modversion['config'][$i]['title'] = '_MI_PUBLISHER_DISPPDF';
$modversion['config'][$i]['description'] = '_MI_PUBLISHER_DISPPDFDSC';
$modversion['config'][$i]['formtype'] = 'yesno';
$modversion['config'][$i]['valuetype'] = 'int';
$modversion['config'][$i]['default'] = 0;
and set to 0 default check.
On the user side, look for the php files associated with the template and add this line of code:$display_pdf = $publisher->getConfig('display_pdf');
$xoopsTpl->assign('display_pdf', $display_pdf);
Specifically, the template file, create this condition:<{if $display_pdf}>
Here the specific html code...
<{/if}>
<!-- BEGIN DYNAMIC BLOCK --><{foreach item=file from=$item.files}>
<tr>
<td class="odd" align="left">
<{if $file.mod}>
<a href="<{$publisher_url}>/file.php?op=mod&fileid=<{$file.fileid}>">
<img src="<{$publisher_url}>/images/links/edit.gif" title="<{$smarty.const._CO_PUBLISHER_EDITFILE}>" alt="<{$smarty.const._CO_PUBLISHER_EDITFILE}>" /></a>
<a href="<{$publisher_url}>/file.php?op=del&fileid=<{$file.fileid}>">
<img src="<{$publisher_url}>/images/links/delete.png" title="<{$smarty.const._CO_PUBLISHER_DELETEFILE}>" alt="<{$smarty.const._CO_PUBLISHER_DELETEFILE}>" /></a>
<{/if}>
<a href="<{$publisher_url}>/visit.php?fileid=<{$file.fileid}>" target="_blank">
<img src="<{$publisher_url}>/images/links/file.gif" title="<{$lang_download_file}>" alt="<{$smarty.const._MD_PUBLISHER_DOWNLOAD_FILE}>" /> <strong><{$file.name}></strong>
</a>
<div><{$file.description}></div>
</td>
<td class="odd" align="center"><{$file.datesub}></td>
<td class="odd" align="center"><{$file.hits}></td>
</tr>
<{/foreach}> <!-- END DYNAMIC BLOCK -->