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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,021
  • Total Topics: 21,332
  • Online today: 744
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 385
  • Total: 385

0 files on download manager ?

Started by feline, January 08, 2006, 02:28:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

feline

Oups .. the download manager allways shows 0 file
Not good .. who can I fix this?

Other on DL Manager ..
I create a new section, get him a name, description and set groups to access ..
save ..
then i look at this .. all access empty .. ops?
I set new ..
save ..
look ...
yea .. good

Why ??

Fel

PS: i have found many small (bugs ?) .. it's a long list  ::)

elpvn

Which TP & SMF version do you using ?
Are you sure to check in the child categories ?

Note that: The parent categories in download section only viewing items in owner and do not show total item have in it, in all of child categories it have (a small bug ? ;D)

Ex:
You'll  not have seen any file view in this screen (at the download index, in multimedia category)


But when you enter sub category (ca nhạc category) then it show your file (happy new year song)

feline

Quote from: elpvn on January 08, 2006, 03:00:09 AM
Which TP & SMF version do you using ?
Are you sure to check in the child categories ?

Note that: The parent categories in download section only viewing items in owner and do not show total item have in it, in all of child categories it have (a small bug ? ;D)
I'm using RC2 and latest TP ..
and I have sub categories, yes
I think this is a bug ?

Fel

elpvn

#3
Quote from: FelOther on DL Manager ..
I create a new section, get him a name, description and set groups to access ..
save ..
then i look at this .. all access empty .. ops?
I set new ..
save ..
look ...
yea .. good

Why ??

Fel

If can not see any file appears after sure upload, then why do you not try creat new one again, just once time so yetÃ,  :)
Are you sure CHMOD tp-downloads folder to 755 ? ,...etc...

QuoteI still have sub categories. Yes ! I think this is a bug
That's right ! It's a small bug and let's hoping it will be fixed in next beta by BlocÃ,  ;)

Porky

Bloc still hasn't fixed or hasn't updated his own board...lol see pic(from Blocs)

[attachment deleted by admin]

bloc

Darn. Still not correct...oh well, a task for tomorrow then. :)

elpvn

Try this solve of Fel:



first .. the TPdlmanager.php

find this:

//fetch all categories
$context['TPortal']['dlcategories'] = array();
$request = db_query("SELECT * FROM {$tp_prefix}dlmanager WHERE type = 'dlcat'", __FILE__, __LINE__);

if(mysql_num_rows($request)>0){
while ($row = mysql_fetch_assoc($request))
{
$context['TPortal']['dlcategories'][$row['id']] = array(
'id' => $row['id'],
'name' => $row['name'],
'parent' => $row['parent']
);
}
mysql_free_result($request);


then add after:

// get number of files in cats *added by Feline*
$context['TPortal']['dlcatcount']=array();
$request = db_query("SELECT category FROM {$tp_prefix}dlmanager WHERE type = 'dlitem'", __FILE__, __LINE__);
if(mysql_num_rows($request)>0){
while ($row = mysql_fetch_assoc($request))
{
if(isset($context['TPortal']['dlcatcount'][$row['category']]))
$context['TPortal']['dlcatcount'][$row['category']]++;
else
$context['TPortal']['dlcatcount'][$row['category']]=1;
}
mysql_free_result($request);
}


and next find:

// any items to collect?
if(sizeof($cats_allow)>0){
$context['TPortal']['dlcatcount']=array();
$request = db_query("SELECT * FROM {$tp_prefix}dlmanager WHERE type = 'dlitem'", __FILE__, __LINE__);
if(mysql_num_rows($request)>0){
while ($row = mysql_fetch_assoc($request))
{
if(isset($context['TPortal']['dlcatcount'][$row['category']]))
$context['TPortal']['dlcatcount'][$row['category']]++;
else
$context['TPortal']['dlcatcount'][$row['category']]=1;
}
mysql_free_result($request);
}
}


replace this with:

// any items to collect?
if(sizeof($cats_allow)>0){
$context['TPortal']['dlcatcount']=array();
$totalfiles = 0;
$request = db_query("SELECT * FROM {$tp_prefix}dlmanager", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request)) {
if ($row['type'] == 'dlitem') {
$totalfiles++;
if(isset($context['TPortal']['dlcatcount'][$row['category']]))
$context['TPortal']['dlcatcount'][$row['category']]++;
else
$context['TPortal']['dlcatcount'][$row['category']]=1;
}
elseif($row['category'] == $row['parent'])
$rootcat = $row['id'];
}
mysql_free_result($request);
if (isset($rootcat))
$context['TPortal']['dlcatcount'][$rootcat] = $totalfiles;
}



also, I have mod the TPdlmanager.template.php that empty cat's are not displayed

find:

//show any categories - if not single item mode.
if($context['TPortal']['dlaction']!='item'){
foreach($context['TPortal']['dlcats'] as $dlcat){


add after:

if(isset($context['TPortal']['dlcatcount'][$dlcat['id']]))
{



and find at the end of this block:

echo '
</td>
</tr>';
}


and add after a simple }



Quote from http://www.xyfrauen.com/index.php?topic=206.0  :)

bloc


This website is proudly hosted on Crocweb Cloud Website Hosting.