collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 329
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.

Author Topic: Block for Downloads System 1.1.4  (Read 9489 times)

0 Members and 1 Guest are viewing this topic.

Offline Burke Knight

  • Sr. Member
  • ****
  • Posts: 394
  • Gender: Male
  • I tell it how I see it. Don't like it? Hit Alt+F4
    • BurkeKnight Enterprises
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
Block for Downloads System 1.1.4
« on: November 07, 2008, 07:48:09 PM »
Hello,

I need a block for Downloads System 1.1.4 if anyone would be so kind to make one. :)

I'm running SMF 2.0 Beta 4 with SimplePortal Classic 2.0.5

Thank you. :)

Offline Xindows

  • Semi Newbie
  • *
  • Posts: 6
Re: Block for Downloads System 1.1.4
« Reply #1 on: April 09, 2009, 03:59:11 PM »
I need to i'm use version Downloads System 1.1.5.1   :nervous-happy:

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Block for Downloads System 1.1.4
« Reply #2 on: April 09, 2009, 08:19:55 PM »
Moved to the Block Request Board.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Nickawompus

  • Newbie
  • Posts: 3
Re: Block for Downloads System 1.1.4
« Reply #3 on: April 16, 2009, 10:41:42 AM »
This would be a great block, maybe just like the recent gallery additions block. 

I'm using:

SMF 1.1.8
SimplePortal 2.2
Downloads System 1.1.4

Thanks in advance

Offline evilhunter

  • Semi Newbie
  • *
  • Posts: 17
Re: Block for Downloads System 1.1.4
« Reply #4 on: April 27, 2009, 09:04:44 AM »
I would also like to know how this can be made for

SMF: 2.0 RC1
SP: 2.2
Download System:      1.1.5.1

Offline Blue

  • Customizer
  • *
  • Posts: 379
  • Gender: Male
  • Block Maker? =P
Re: Block for Downloads System 1.1.4
« Reply #5 on: May 07, 2009, 10:35:40 PM »
How do you want your block? Like a list of Random Downloads?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Offline Nickawompus

  • Newbie
  • Posts: 3
Re: Block for Downloads System 1.1.4
« Reply #6 on: May 31, 2009, 07:58:35 AM »
I would use it as Latest Downloads but random list would work also. Same thing as the gallery block would be cool.

Thanks in advance

Steve

Offline Gurbet_42

  • Full Member
  • ***
  • Posts: 166
  • Gender: Male
    • Müziksiz ilahiler
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Block for Downloads System 1.1.4
« Reply #7 on: June 03, 2009, 06:21:42 PM »
This would be a great block, maybe just like the recent gallery additions block. 

I'm using:

SMF 1.1.8
SimplePortal 2.2
Downloads System 1.1.4

Thanks in advance

Try this

Code: [Select]
global $db_prefix, $scripturl;

$request = db_query("SELECT f.ID_FILE, f.ID_MEMBER, f.date, f.ID_CAT, f.title AS ftitle,
c.title, m.realName, m.ID_MEMBER AS mID_MEMBER
FROM {$db_prefix}down_file AS f, {$db_prefix}down_cat AS c, {$db_prefix}members AS m
WHERE f.ID_CAT = c.ID_CAT
AND f.approved = '1'
AND f.ID_MEMBER = m.ID_MEMBER
ORDER BY f.ID_FILE DESC
LIMIT 35",__FILE__,__LINE__);
while($row = mysql_fetch_assoc($request)) {
echo '<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td valign="top" class="smalltext">', sp_embed_image('dot'), ' <a href="',$scripturl,'?action=downloads;sa=view;id=',$row['ID_FILE'],'">',$row['ftitle'],'</a></td>
<td valign="top" class="smalltext" align="right">',$row['totaldownloads'],'</td>
</tr>
</table>';
}

http://ilahivesohbet.com  -  Müziksiz ilahiler

Offline Nickawompus

  • Newbie
  • Posts: 3
Re: Block for Downloads System 1.1.4
« Reply #8 on: June 05, 2009, 07:16:31 PM »
Works great, thank you, thank you, thank you  :D

It's in the left block

linky to my board

 :applause:  ;D

Offline LP

  • Semi Newbie
  • *
  • Posts: 23
  • SMF Version: 2 RC1.2
  • SP Version: 2.3.1
Re: Block for Downloads System 1.1.4
« Reply #9 on: October 30, 2009, 02:13:46 PM »
Updated for SMF 2.0

Code: [Select]
global $db_prefix, $scripturl, $smcFunc;

$request = $smcFunc['db_query']('',"SELECT f.ID_FILE, f.ID_MEMBER, f.date, f.ID_CAT, f.title AS ftitle,
c.title, m.real_Name, m.ID_MEMBER AS mID_MEMBER
FROM {$db_prefix}down_file AS f, {$db_prefix}down_cat AS c, {$db_prefix}members AS m
WHERE f.ID_CAT = c.ID_CAT
AND f.approved = '1'
AND f.ID_MEMBER = m.ID_MEMBER
ORDER BY f.ID_FILE DESC
LIMIT 35");
while($row = $smcFunc['db_fetch_assoc']($request)) {
echo '<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td valign="top" class="smalltext">', sp_embed_image('dot'), ' <a href="',$scripturl,'?action=downloads;sa=view;id=',$row['ID_FILE'],'">',$row['ftitle'],'</a></td>
<td valign="top" class="smalltext" align="right">',$row['totaldownloads'],'</td>
</tr>
</table>';
}

Offline Winny

  • Just Registered
  • Posts: 1
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Block for Downloads System 1.1.4
« Reply #10 on: February 17, 2010, 08:27:22 AM »
Hmm...
I just saw this post, I'm using the download system pro.
I'll be trying to find a way showing the image too.

Offline Sentinel [AF]

  • Semi Newbie
  • *
  • Posts: 25
  • Gender: Male
  • Mr Grumpy
    • Alternating Frequencies
  • SMF Version: 2 Beta 4
  • SP Version: 2.0.5
Re: Block for Downloads System 1.1.4
« Reply #11 on: March 22, 2010, 06:02:55 AM »
I've modified the blocks for the SMF 2.X code posted about 2 posts up & fixed the totaldownloads bit as you forgot to add * "f.totaldownloads" to the query so it wasn't showing up in the results.

Both these codes are neatened versions for using in a side block as they correctly display title & downloads at top and a link with shortened subject code on download name with smalltext floatleft  download count with smalltext floatright.

check the attached screenshot.

Code: (Gets Latest 4 Submissions from database - Change LIMIT for amount) [Select]
global $db_prefix, $scripturl, $smcFunc;

$request = $smcFunc['db_query']('',"SELECT f.ID_FILE, f.ID_MEMBER, f.date, f.ID_CAT, f.totaldownloads, f.title AS ftitle,
c.title, m.real_Name, m.ID_MEMBER AS mID_MEMBER
FROM {$db_prefix}down_file AS f, {$db_prefix}down_cat AS c, {$db_prefix}members AS m
WHERE f.ID_CAT = c.ID_CAT
AND f.approved = '1'
AND f.ID_MEMBER = m.ID_MEMBER
ORDER BY f.ID_FILE DESC
LIMIT 4");
   echo '
         <table border="0" cellpadding="1" cellspacing="0" width="100%" colspan="2">
            <tr>
               <th style="text-align: left;">Title</td>
               <th colspan="2" style="text-align: right;">Downloads</td>
            </tr>';
while($row = $smcFunc['db_fetch_assoc']($request)) {
echo '
<tr>
<td><a href="',$scripturl,'?action=downloads;sa=view;id=',$row['ID_FILE'],'" title="',$row['ftitle'],'">'. shorten_subject($row['ftitle'], 20) .'</a></td>
<td style="text-align: right;">',$row['totaldownloads'],'</td>
</tr>';
};
echo '
</table>';


Code: (Gets 4 Random files from database - Change LIMIT for amount) [Select]
global $db_prefix, $scripturl, $smcFunc;

$request = $smcFunc['db_query']('',"SELECT f.ID_FILE, f.ID_MEMBER, f.date, f.ID_CAT, f.totaldownloads, f.title AS ftitle,
c.title, m.real_Name, m.ID_MEMBER AS mID_MEMBER
FROM {$db_prefix}down_file AS f, {$db_prefix}down_cat AS c, {$db_prefix}members AS m
WHERE f.ID_CAT = c.ID_CAT
AND f.approved = '1'
AND f.ID_MEMBER = m.ID_MEMBER
ORDER BY RAND()
LIMIT 4");
   echo '
         <table border="0" cellpadding="1" cellspacing="0" width="100%" colspan="2">
            <tr>
               <th style="text-align: left;">Title</td>
               <th colspan="2" style="text-align: right;">Downloads</td>
            </tr>';
while($row = $smcFunc['db_fetch_assoc']($request)) {
echo '
<tr>
<td><a href="',$scripturl,'?action=downloads;sa=view;id=',$row['ID_FILE'],'" title="',$row['ftitle'],'">'. shorten_subject($row['ftitle'], 20) .'</a></td>
<td style="text-align: right;">',$row['totaldownloads'],'</td>
</tr>';
};
echo '
</table>';


I'm still running SMF 2.04b but I assume the code should still work for all versions of 2.X.

ez :)
« Last Edit: March 23, 2010, 09:35:54 PM by Sentinel [AF] »
0ot


Offline Dermot

  • Semi Newbie
  • *
  • Posts: 23
  • Gender: Male
  • echo 'HeHe';
    • Irish-gaming
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Block for Downloads System 1.1.4
« Reply #12 on: May 05, 2010, 02:02:03 AM »

Just what i was looking for, thank you  ;)
Smf 2.0 RC3Simple Portal 2.3.2Firefox 3.6IE 8.0 (well its sits i dont use it)

Offline yield

  • Semi Newbie
  • *
  • Posts: 8
Re: Block for Downloads System 1.1.4
« Reply #13 on: May 22, 2010, 05:07:47 PM »
Hi!

I tried the code posted by Sentinel and got the following error when previewing the block

Quote
Fatal error: Function name must be a string in /afs/[...]/web/Sources/PortalBlocks.php(3444) : eval()'d code on line 3

and the following when adding the block

Quote
Syntax error in block code. Please check the code.

Any clue?

Using SMF 1.1.11 and SP 2.3.2.

Thanks

Edit
Just noticed that this topic is for DS 1.1.4 and I'm using 1.1.5... maybe that's the cause..

Offline Sentinel [AF]

  • Semi Newbie
  • *
  • Posts: 25
  • Gender: Male
  • Mr Grumpy
    • Alternating Frequencies
  • SMF Version: 2 Beta 4
  • SP Version: 2.0.5
Re: Block for Downloads System 1.1.4
« Reply #14 on: May 28, 2010, 09:53:20 AM »
Hi!

I tried the code posted by Sentinel and got the following error when previewing the block

Quote
Fatal error: Function name must be a string in /afs/[...]/web/Sources/PortalBlocks.php(3444) : eval()'d code on line 3

and the following when adding the block

Quote
Syntax error in block code. Please check the code.

Any clue?

Using SMF 1.1.11 and SP 2.3.2.

Thanks

Edit
Just noticed that this topic is for DS 1.1.4 and I'm using 1.1.5... maybe that's the cause..

other problem might be because I use SMF 2.X.

possibly !?
0ot