Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


Re: Adding a new template to Tiki

posts: 96 Romania

Well this is what I have inside the tiki-download_file.php on the last line (header content stuff removed)

$smarty->assign('mid','tiki-download_file.tpl');
$smarty->display("tiki.tpl");

?>

The tiki-download_file.tpl is placed inside the templates folder so this displays the template just fine, but this only happens without the

header("Content-type: $type");

// Added by Jenolan  31/8/2003 /////////////////////////////////////////////
// File galleries should always be attachments (files) not inline (textual)
header( "Content-Disposition: attachment; filename=\"$file\"" );
//header( "Content-Disposition: inline; filename=$file" );

if( $info["path"] )
{
	header("Content-Length: ". filesize( $fgal_use_dir.$info["path"] ) );
}
else
{
	header("Content-Length: ". $info[ "filesize" ] );
}

////////////////////////////////////////////////////////////////////////////
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public");
if($info["path"]) {
  readfile($fgal_use_dir.$info["path"]);
} else {
  echo "$content";
}


part.

What I need to know is where do I add that stuff to make it work and still have a template?

There are no comments at this time.

Upcoming Events

1)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4) 
Tiki birthday
5)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting