TinyPortal

Development => Block Codes => Topic started by: OzButcher on January 11, 2007, 12:21:14 AM

Title: Downloads: Show x New Files
Post by: OzButcher on January 11, 2007, 12:21:14 AM
I'm displaying the standard Downloads: Show x New Files in a block.

How can I add a bullet in front of each new download?
Title: Re: Downloads: Show x New Files
Post by: SRaven on January 11, 2007, 12:38:26 AM
if you want to use them in a list, you could use:

<ul>
<li>Download 1
<li>Download 2
<li>Download 3
<li>Download 4
<li> etc...
</ul>

or put  • infront of each download name.
Title: Re: Downloads: Show x New Files
Post by: haxen on January 11, 2007, 01:16:58 AM
Oz, what is your code and what type of block did u use to get that?
Title: Re: Downloads: Show x New Files
Post by: OzButcher on January 11, 2007, 01:33:50 AM
ah I forgot to mention... I used a TPMODULE to display that data.

Went into admin center, created a new block 'TPmodule' selected 'Downloads: Show x New Files'. I know its somewhere in the php files... if someone knows where the appropriate code is and how to change it that would be great. :)
Title: Re: Downloads: Show x New Files
Post by: akulion on January 11, 2007, 06:08:12 AM
i dont have the time to test it out right now so this is a wild guess from a quick view in the file...

check in TPortalBlocks.template.php file (in the default themes folder)

in it find this code:

case 'art-recent';
$it=array();
$it=art_recentitems('5','date');
if(sizeof($it)>0){
foreach($it as $item){
echo '<span class="smalltext"><a title="'.$item['date'].'" href="'.$scripturl.'?page='.$item['id'].'">'.$item['subject'].'</a>
</span><br />';


To add a bullet to each try this: (replace above with below code)

case 'art-recent';
$it=array();
$it=art_recentitems('5','date');
if(sizeof($it)>0){
foreach($it as $item){
echo '<li><span class="smalltext"><a title="'.$item['date'].'" href="'.$scripturl.'?page='.$item['id'].'">'.$item['subject'].'</a>
</span></li><br />';


just be sure to make a backup of the tportalblocks.template.php file before attempting modifications :up:

in case u have problem finding the code just search for function TPortal_module() the code is in that function, infact it deals with thedifferent types of download modules that function
Title: Re: Downloads: Show x New Files
Post by: OzButcher on January 11, 2007, 06:11:40 AM
thanks Aku, will give it a go.

bugger didnt change anything. I had a look at all themes but nothing changed.