Hallo again chaps, id like your help tweaking the following bit of code:
I have been trying to add a couple of <br>'s at the bottom but whatever i put it just comes up at the top? Even if i try <? echo "<br /><br />"; ?> at the bottom of all of it it appears at the top?!
Also - i would like to restrict the amount of charecters to a certain number, say 20, and then have "..." at the end so that if someone has a long download title it will stay on one line and say "Example Download Hel..." rather than "Example Download Hello World" and going onto another line (this script shows latest downloads in a small width column and i want to keep it neat if possible!).
Appreciate any help you can give
<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
include_once( $mosConfig_absolute_path."/administrator/components/com_docman/docman.class.php");
global $_DOCMAN;
if(!is_object($_DOCMAN)) {
$_DOCMAN = new dmMainFrame();
}
$_DOCMAN->setType(_DM_TYPE_MODULE);
$_DOCMAN->loadLanguage('modules');
require_once($_DOCMAN->getPath('classes', 'utils'));
require_once($_DOCMAN->getPath('classes', 'file'));
require_once($_DOCMAN->getPath('classes', 'model'));
// get the parameters
$limits = abs($params->def( 'limits', 3 ));
$show_icon = abs($params->def( 'show_icon', 1 ));
$show_category = abs($params->def( 'show_category', 1 ));
$menuid = $_DOCMAN->getMenuId();
$content ="";
$enum = 0;
$rows = DOCMAN_Docs::getDocsByUserAccess(0, 'date', '', $limits);
foreach ($rows as $row)
{
$doc = new DOCMAN_Document($row->id);
$url = sefRelToAbs( "index.php?option=com_docman&task=cat_view&Itemid=$menuid&gid=".$doc->getData('catid')."&orderby=dmdate_published&ascdesc=DESC" );
$content .= "<a class=\"dm_mod_latestdown\" href=\"$url\">";
if ($show_icon)
$content .= "<img src=\"".$doc->getPath('icon', 1, '16x16')."\" alt=\"file icon\" border=\"0\"/> ";
$content=$content."<b>".$doc->getData('dmname')."</b>";
if ($show_category)
$content .= "<br />(".$row->cat_title.")";
$content .= "</a><br />";
$enum++;
}
if (!$count = count($rows))
$content=$content."<br />"._DML_MOD_NODOCUMENTS;
?>
I have been trying to add a couple of <br>'s at the bottom but whatever i put it just comes up at the top? Even if i try <? echo "<br /><br />"; ?> at the bottom of all of it it appears at the top?!
Also - i would like to restrict the amount of charecters to a certain number, say 20, and then have "..." at the end so that if someone has a long download title it will stay on one line and say "Example Download Hel..." rather than "Example Download Hello World" and going onto another line (this script shows latest downloads in a small width column and i want to keep it neat if possible!).
Appreciate any help you can give
