TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,913
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 589
  • Total: 590
  • @rjen

[Block] Last Upload Block for DL Center of TP

Started by bioemm.com, December 19, 2008, 04:29:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bioemm.com

Hi

can any one change article block
http://www.tinyportal.net/index.php/topic,26124.0.html

for usage of Last Upload Block???

thx

IchBin

Pulled right from the TP functions that Bloc already has. This is assuming you are using at least TP 1.x I think. Put this in a phpbox type of block.

global $txt;

$it=array();
$it=dl_recentitems('1','date','array');
if(sizeof($it)>0){
foreach($it as $item){
echo '
<img src="'.$item['icon'].'" align="right" style="margin-left: 4px; " alt="" />
<a href="'.$item['href'].'"><b>'.$item['name'].'</b></a>
<p class="smalltext">'.$txt['tp-uploadedby'].' <b>'.$item['author'].'</b> <br />( '.$item['date'].')<br />
'.$txt['tp-downloads'].'/'.$txt['tp-itemviews'].': <b>'.$item['downloads'].' / '.$item['views'].'</b></p>';
}
}

bioemm.com

thank u IchBinâ,,¢

the code work very good

Maddog452

Sorry to hijack a thread, but is it possible to limit the category from where it takes the latest upload?? For Example, the latest upload from "dl=cat6"

Cheers

IchBin

Not with the code I gave. The code I posted uses a built in function for grabing the entry. You'd have to modify the actual function in TP to grab a specific category or something. Unless you write a different code snippet.

Maddog452


UkGangsta

nice code ichbin but is there anyway to make this scroll the items u want to show and stop on mouse over ?

UkGangsta


IchBin

Is there any reason you couldn't try it? I don't mean to be rude, but google has thousands of pages that can show you how to scroll HTML using the marquee tag, and then how to start/stop something using javascript. Any reason you can't try it out yourself instead getting all impatient on me here?

UkGangsta

im not impatient sorry if u thought otherwise i have used google and found a wealth of information thxs

This website is proudly hosted on Crocweb Cloud Website Hosting.