PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > General Forums > General Discussion

General Discussion General use discussion forum for PhotoPost products.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old December 1st, 2005, 11:18 AM   #21 (permalink)
Junior Member
Verified Customer
 
Join Date: Aug 2004
Location: Lancaster, CA
Posts: 24
Send a message via Yahoo to mclare
if ( $Globals['showubb'] == "no" && $imgurl != "" ) {
echo<<<PPPRINT
<tr>
<td class="{$Style['tddetails']}" align="center" valign="top"><a href="{$downurl}">Download this file</a>
</td>
</tr>
PPPRINT;
}



And:


define( 'THIS_SCRIPT', "showphoto" );
require "pp-inc.php";

$showcode = "
Code:
Content visible to verified customers only.
";
$downurl = "{$Globals['datadir']}/$storecat/$bigimage";

$PATH_INFO = findenv("PATH_INFO");
if ( isset($PATH_INFO) && $Globals['spider'] == "yes" ) {
$test = explode('/', substr($PATH_INFO,1));
for($i=0; $i < count($test); $i++){
if( $i % 2 == 0 ) { $_REQUEST[$test[$i]]
mclare is offline   Reply With Quote
Old December 1st, 2005, 11:31 AM   #22 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,069
well it surely works as posted.

I see your issue. You did not place the $downurl line where it belongs. I stated to add the code in bold where the other line is. $showcode is at the bottom of showphoto.php

search showphoto.php and place the line in bold I gave you down there and then edit your showphoto template as below and you will see it works.

Code:
Content visible to verified customers only.
This surely places a link to the large image of the picture.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old December 1st, 2005, 09:15 PM   #23 (permalink)
Junior Member
Verified Customer
 
Join Date: Aug 2004
Location: Lancaster, CA
Posts: 24
Send a message via Yahoo to mclare
I did this:

$downurl = "{$Globals['datadir']}/$storecat/$bigimage";

And what happens is that it gives this url for the link:

"http://www.artists-exchange.com/covers/data/"

And does not show the category or bigimage name
mclare is offline   Reply With Quote
Old December 1st, 2005, 09:27 PM   #24 (permalink)
Junior Member
Verified Customer
 
Join Date: Aug 2004
Location: Lancaster, CA
Posts: 24
Send a message via Yahoo to mclare
Okay, I fixed the url amd now I just need it to pop up the download dialog instead of displaying the image. Any ideas? If I find the code, could you help me integrate it?

Thanks again Chuck
mclare is offline   Reply With Quote
Old December 1st, 2005, 09:45 PM   #25 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 68,069
I dont know the specifics of how to do a download versus display but if you find something let me know
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old December 1st, 2005, 10:42 PM   #26 (permalink)
Junior Member
Verified Customer
 
Join Date: Aug 2004
Location: Lancaster, CA
Posts: 24
Send a message via Yahoo to mclare
Okay, I found this:

It is the code to force the download. do you think you could figure out how to integrate it into PP?


<?php
$strFilePath = "C:\ whatever the path is ";
$strFileSize = filesize($strFilePath);
$strFileName = basename($strFilePath);

$fileContents = file_get_contents($$strFilePath);
$pathinfo = pathinfo($strFilePath);
$strFileType = $pathinfo['extension'];

switch ($strFileType) {
case 'asf':
$ContentType = 'video/x-ms-asf';
break;
case 'avi':
$ContentType = 'video/avi';
break;
case 'doc':
$ContentType = 'application/msword';
break;
case 'zip':
$ContentType = 'application/zip';
break;
case 'xls':
$ContentType = 'application/vndms-excel';
break;
case 'gif':
$ContentType = 'image/gif';
break;
case 'jpg':
case 'jpeg':
$ContentType = 'image/jpeg';
break;
case 'wav':
$ContentType = 'audio/wav';
break;
case 'mp3':
$ContentType = 'audio/mpeg3';
break;
case 'mpg':
case 'mpeg':
$ContentType = 'video/mpeg';
break;
case 'rtf':
$ContentType = 'application/rtf';
break;
case 'htm':
case 'html':
$ContentType = 'text/html';
break;
case 'asp':
$ContentType = 'text/asp';
break;
case 'mov':
$ContentType = 'video/quicktime';
break;
case 'txt':
$ContentType = 'text/plain';
break;
default:
//Handle All Other Files
$ContentType = 'application/octet-stream';
}

header("Content-Type: $ContentType);
header("Content-Length: $strFileSize");
header("Content-Disposition:attachment; filename=$strFileName");

echo $fileContents;
?>
mclare is offline   Reply With Quote
Old December 2nd, 2005, 10:17 AM   #27 (permalink)
Junior Member
Verified Customer
 
Join Date: Aug 2004
Location: Lancaster, CA
Posts: 24
Send a message via Yahoo to mclare
Here is another piece of code:

function download($path)

global $HTTP_USER_AGENT;
$file=basename($path);
$size = filesize($path);
header("Content-Type: application/octet-stream");
header("Content-Type: application/force-download");
header("Content-Length: $size");
// IE5.5 just downloads index.php if we don't do this
if(preg_match("/MSIE 5.5/", $HTTP_USER_AGENT))

header("Content-Disposition: filename=$file");
} else

header("Content-Disposition: attachment;
filename=$file");
}
header("Content-Transfer-Encoding: binary");
$fh = fopen($path, "r");
fpassthru($fh);
}
mclare is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems: New installation with VB3.5 azarl Photopost Pro Installation & Upgrades 1 November 22nd, 2005 09:56 AM
styleshhet - change table colors. firstcoastus Photopost Pro Installation & Upgrades 1 September 23rd, 2005 10:01 AM
vb3 integration problems... 77t3 Photopost Pro Installation & Upgrades 3 April 11th, 2005 04:48 PM
VB3 integration problems rsailors Photopost Pro Installation & Upgrades 3 March 8th, 2005 09:10 AM
VB3 Cookie problems apokphp Photopost Pro Installation & Upgrades 2 November 22nd, 2004 08:08 PM


All times are GMT -5. The time now is 05:00 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0