Home Private Messages Search
CPG Dragonfly™ CMS Dedicated Server & Bandwidth Sponsored by DedicatedNOW
Toggle Content
 
Forums ⇒ DragonflyCMS ⇒ Downloads Pro ⇒ Custom DownloadsPro


Custom DownloadsPro
Please post bugs in the Projects Module.
Otherwise, post here.

Go to page 1, 2  Next
Post new topic    Reply to topic    Printer Friendly Page     Forum Index ⇒  Add-Ons & BlocksDownloads Pro

View previous topic :: View next topic  
Author Message
BobCat
Nice poster
Nice poster

Offline Offline
Joined: Apr 03, 2008
Posts: 85
Location: Gold Coast, Australia
PostPosted: Mon Nov 03, 2008 3:08 am
Post subject: Custom DownloadsPro

I have made a second DownloadsPro module called it MapsDB

i want a totally seperate module just for game maps (map file and screen shot)

I got it all working (changed the _downloads to _mapdb)
Everything is fine except when you click on the file to download i either get a blank page (http error 500) /index.php?name=MapDB&get=1&mirror=1

or tested on other site i get

Code::
Fatal error: Call to undefined method CPG_File::secure_mapdb() in D:\SITES\wamp\www\Test1\modules\MapDB\index.php on line 262

which is on line 262
PHP:
if (!CPG_File::secure_mapdb($error, $dl_url, $dl_filename)) {

Anyone know how to fix this bug? any input welcome.


BobCat's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/Apache2.2.16/MySQL5.0.91/PHP5.2.14/DF9.2.3.3
Back to top
View user's profile Visit poster's website
Phoenix
• Many Posts •
• Many Posts •

Offline Offline
Joined: Apr 19, 2004
Posts: 8799
Location: Netizen
PostPosted: Mon Nov 03, 2008 3:56 am
Post subject: Re: Custom DownloadsPro

You've gone too far with renaming everything associated with "download".

The function secure_download() is a core DF function, nothing to do with DLpro, and should have been left as is.

_________________
DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin

Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website Photo Gallery
BobCat
Nice poster
Nice poster

Offline Offline
Joined: Apr 03, 2008
Posts: 85
Location: Gold Coast, Australia
PostPosted: Mon Nov 03, 2008 4:21 am
Post subject: Re: Custom DownloadsPro

Thanks for the quick reply

I worked out if i disable the security code it worked fine but i would rather have it as safe as possible, will go over it all and fix what u mentioned.

Thanks again


BobCat's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/Apache2.2.16/MySQL5.0.91/PHP5.2.14/DF9.2.3.3
Back to top
View user's profile Visit poster's website
WebSiteGuru
1000+ Posts Club
1000+ Posts Club

Offline Offline
Joined: Jun 09, 2005
Posts: 2318

PostPosted: Mon Nov 03, 2008 3:55 pm
Post subject: Re: Custom DownloadsPro

Then you might want to back track and change The function secure_download() back to the original.

_________________
Lead Theme Designer - WebSiteGuru Designs

WebSiteGuru's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.9 / Apache 2.2.6 / MySQL 5.0.27 / PHP 5 / DF Version 9.2.1
Back to top
View user's profile Visit poster's website Yahoo Messenger
BobCat
Nice poster
Nice poster

Offline Offline
Joined: Apr 03, 2008
Posts: 85
Location: Gold Coast, Australia
PostPosted: Tue Nov 04, 2008 5:27 am
Post subject: Re: Custom DownloadsPro

ok got it done and working fine
demo:
df-outpost.com/index.php?name=MapDB

This is handy for Gamers who want a seperate section just for maps.

Im using DP ver 3 as the base,
How can i add a ScreenShot to the blocks

e.g. "Latest Map" block-Latest_Map showing title and screenshot of the last added map.

*note* i have seen previous posts in forums related to SS in blocks but coding didn't seem to work for me or out of date.
Im using DF2.1.0 and DownloadsProv3


BobCat's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/Apache2.2.16/MySQL5.0.91/PHP5.2.14/DF9.2.3.3
Back to top
View user's profile Visit poster's website
rlgura
1000+ Posts Club
1000+ Posts Club

Offline Offline
Joined: Mar 27, 2006
Posts: 1146
Location: Cleveland, OH USA
PostPosted: Tue Nov 04, 2008 6:15 pm
Post subject: Re: Custom DownloadsPro

I added ss for the Top-Ten downloads block - works with DF 9.2.1 and Downloads Pro 3.0.0.14

Code::
<?php
/******************************************************
  Downloads Pro: Designed exclusively for Dragonfly CMS
  *****************************************************
  Copyright  � 2005 - 2006 by Trevor Eckart and DJMaze
  http://dragonflycms.org

  Please see the included LICENSE.txt for the terms and
  conditions that govern your use of this module

  $Source: block-Top10_Downloads_Center.php,v $
  $Revision: 1.0 $
  $Author: trevor, rlgura $
  $Date: 2007/04/24 17:46:00 $
******************************************************/
if (!defined('CPG_NUKE')) { exit; }

global $db, $prefix;

$dl_mod = 'Downloads';
$dl_mod_prefix = $prefix.'_'.strtolower($dl_mod);
require_once('modules/'.$dl_mod.'/functions/linking.inc');
$content = '';
if (!is_active($dl_mod)) {
    $content = 'ERROR';
    return trigger_error($dl_mod.' module is inactive', E_USER_WARNING);
}

$a = 1;
$result = $db->sql_query("SELECT d.lid, d.title, SUM(s.hits) AS hits, ss.url AS img_url, d.desc_short FROM ".$dl_mod_prefix."_downloads d
LEFT JOIN ".$dl_mod_prefix."_stats s ON (s.id = d.lid) 
LEFT JOIN ".$dl_mod_prefix."_screenshots ss ON (ss.id = d.screen) 
WHERE d.active=1 GROUP BY s.id ORDER BY hits DESC LIMIT 0,10");
if ($db->sql_numrows($result) < 1) {
    $content = 'ERROR';
    return trigger_error('There are no downloads in '.$dl_mod, E_USER_WARNING);
}
while (list($lid, $dtitle, $hits, $ss, $desc) = $db->sql_fetchrow($result)) {
    if ($ss) {
				if (ereg('://', $ss)) {
					$ss .= '" width="100'; } 
				else { $ss = dl_thumbimage($ss).'" width="100';}
			}
	else { $ss = dl_image('download.png').'" width="100'; }
	
    $content .= '<table><tr><td>';
    $content .= '<img src="'.$ss.'" border="0" alt="" /> </td>';
    $content .= '<td>'.$a.': <a href="'.getlink($dl_mod.'&amp;file=details&amp;id='.$lid).'">'.$dtitle.'</a><br /><br />';
    $content .= $desc.'</td>';
    $content .= '</tr></table><hr />';
    $a++;
    
    
}
$db->sql_freeresult($result);

_________________
Admin - Great Lakes Web Designs
Theme Designer - WebSite Guru Designs
Site Admin - Families with Food Allergies

rlgura's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.27-grsec/Apache 2.2.11/MySQL 5.0.67-community-log/PHP 5.2.8/DF 9.2.1
Back to top
View user's profile Visit poster's website
BobCat
Nice poster
Nice poster

Offline Offline
Joined: Apr 03, 2008
Posts: 85
Location: Gold Coast, Australia
PostPosted: Wed Nov 05, 2008 1:23 am
Post subject: Re: Custom DownloadsPro

Thanks rugura, your a champ!

i edit it a bit to only show the SS and Title and also test to be under not beside. view on link above

cool, thanks again.


BobCat's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/Apache2.2.16/MySQL5.0.91/PHP5.2.14/DF9.2.3.3
Back to top
View user's profile Visit poster's website
BobCat
Nice poster
Nice poster

Offline Offline
Joined: Apr 03, 2008
Posts: 85
Location: Gold Coast, Australia
PostPosted: Wed Nov 05, 2008 7:02 am
Post subject: Re: Custom DownloadsPro

i found a bug..

When i activate the block it works fine but now i can't access the downloads section, get 404 error, diable the block and it's fine.

I have added the code i changed below to see the changes i made.

PHP:
<?php
/******************************************************
Downloads Pro: Designed exclusively for Dragonfly CMS
*****************************************************
Copyright � 2005 - 2006 by Trevor Eckart and DJMaze
dragonflycms.org

Please see the included LICENSE.txt for the terms and
conditions that govern your use of this module

$Source: block-Top10_Maps.php,v $
$Revision: 1.0 $
$Author: trevor, rlgura $
$Date: 2007/04/24 17:46:00 $
******************************************************/
if (!defined('CPG_NUKE')) { exit; }

global
$db, $prefix;

$dl_mod = 'MapDB';
$dl_mod_prefix = $prefix.'_'.strtolower($dl_mod);
require_once(
'modules/'.$dl_mod.'/functions/linking.inc');
$content = '';
if (!
is_active($dl_mod)) {
$content = 'ERROR';
return
trigger_error($dl_mod.' module is inactive', E_USER_WARNING);
}

$a = 1;
$result = $db->sql_query("SELECT d.lid, d.title, SUM(s.hits) AS hits, ss.url AS img_url, d.desc_short FROM ".$dl_mod_prefix."_mapdb d
LEFT JOIN "
.$dl_mod_prefix."_stats s ON (s.id = d.lid)
LEFT JOIN "
.$dl_mod_prefix."_screenshots ss ON (ss.id = d.screen)
WHERE d.active=1 GROUP BY s.id ORDER BY hits DESC LIMIT 0,3"
);
if (
$db->sql_numrows($result) < 1) {
$content = 'ERROR';
return
trigger_error('There are no maps in '.$dl_mod, E_USER_WARNING);
}
while (list(
$lid, $dtitle, $hits, $ss, $desc) = $db->sql_fetchrow($result)) {
if (
$ss) {
if (ereg('://', $ss)) {
$ss .= '" width="100'; }
else { $ss = dl_thumbimage($ss).'" width="100';}
}
else { $ss = dl_image('download.png').'" width="100'; }

$content .= '<table><tr><td>';

$content .= '<td>'.$a.': <a href="'.getlink($dl_mod.'&amp;file=details&amp;id='.$lid).'">'.$dtitle.'</a><br /><br />';
$content .= '<img src="'.$ss.'" border="0" alt="" /><br> </td>';
$content .= '</tr></table><hr />';
$a++;


}
$db->sql_freeresult($result);


BobCat's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/Apache2.2.16/MySQL5.0.91/PHP5.2.14/DF9.2.3.3
Back to top
View user's profile Visit poster's website
rlgura
1000+ Posts Club
1000+ Posts Club

Offline Offline
Joined: Mar 27, 2006
Posts: 1146
Location: Cleveland, OH USA
PostPosted: Wed Nov 05, 2008 6:31 pm
Post subject: Re: Custom DownloadsPro

Downloads module won't show when this block is displayed with it? Does MapDB module show? Probably due to this block calling linking.inc
Just don't display this block along with Downloads module.

_________________
Admin - Great Lakes Web Designs
Theme Designer - WebSite Guru Designs
Site Admin - Families with Food Allergies

rlgura's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.27-grsec/Apache 2.2.11/MySQL 5.0.67-community-log/PHP 5.2.8/DF 9.2.1
Back to top
View user's profile Visit poster's website
macuserau
Nice poster
Nice poster

Offline Offline
Joined: May 18, 2006
Posts: 124
Location: South Coast Australia
PostPosted: Tue Oct 11, 2011 11:34 am
Post subject: Re: Custom DownloadsPro

is this Modded module available for DL


macuserau's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.3.3.0
Back to top
View user's profile Visit poster's website
macuserau
Nice poster
Nice poster

Offline Offline
Joined: May 18, 2006
Posts: 124
Location: South Coast Australia
PostPosted: Mon Oct 24, 2011 8:42 am
Post subject: Re: Custom DownloadsPro

I too have duplicated and modified this module along the lines that BobCat has.

I want a totally seperate module just for Permission Notes

I am receiving this error

Fatal error: Call to undefined function can_note() in /home/cofscout/public_html/modules/Notes/index.php on line 195




Line 195 is

$cpgtpl->assign_vars(array(

Anyone know how to fix this bug? any input welcome.


macuserau's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.3.3.0
Back to top
View user's profile Visit poster's website
Phoenix
• Many Posts •
• Many Posts •

Offline Offline
Joined: Apr 19, 2004
Posts: 8799
Location: Netizen
PostPosted: Mon Oct 24, 2011 8:55 am
Post subject: Re: Custom DownloadsPro

You have changed references to can_download to can_note without also renaming the function itself.

Since you missed that, there is also the possibility that you may have missed other instances of can_download.

_________________
DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin

Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website Photo Gallery
macuserau
Nice poster
Nice poster

Offline Offline
Joined: May 18, 2006
Posts: 124
Location: South Coast Australia
PostPosted: Mon Oct 24, 2011 9:08 am
Post subject: Re: Custom DownloadsPro

Thank you

I will review it and see if i can fix it.


macuserau's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.3.3.0
Back to top
View user's profile Visit poster's website
macuserau
Nice poster
Nice poster

Offline Offline
Joined: May 18, 2006
Posts: 124
Location: South Coast Australia
PostPosted: Mon Oct 24, 2011 9:22 am
Post subject: Re: Custom DownloadsPro

Thanks I found the other one in the index.php all good now.


macuserau's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.3.3.0
Back to top
View user's profile Visit poster's website
macuserau
Nice poster
Nice poster

Offline Offline
Joined: May 18, 2006
Posts: 124
Location: South Coast Australia
PostPosted: Mon Oct 24, 2011 9:33 am
Post subject: Re: Custom DownloadsPro

I have a question about the theme (page view) when you click on the note (download) the detail page looks mess up. I am not sure why this occurs, could some one offer some advice?

look here www.cofscouts.org.au/i...tails&id=2


macuserau's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.3.3.0
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index ⇒  Add-Ons & BlocksDownloads Pro
Page 1 of 2
All times are GMT
Go to page 1, 2  Next



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

Číta ďalej...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy