Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
malo o linkovima

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
jurka



Joined: 26 Aug 2004
Posts: 1088
Location: Zagreb

PostPosted: 08.01.2006 17:39    Post subject: malo o linkovima Add user to your forum ignore list Reply with quote

imam dva linka na stranici, svaki od njih otvara isti file (.mov) s tom razlikom da bi prvi trebao na klik otvoriti novi prozor fiksnih dimenzija, dok bi drugi na klik ponudio mogućnost downloada istog tog filea.

ono što ne znam Embarassed je kako složiti da klikom na link ne otvaram file nego mi odmah ponudi download. i da je sve, naravno, u skladu sa standardima...

help?

_________________
Jedan šest | Behance | Vimeo
Back to top
View user's profile Send private message Visit poster's website
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 08.01.2006 17:42    Post subject: Add user to your forum ignore list Reply with quote

mislim da se nesta takvo nemoze, ako se radi o istom file-u... :/

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
jurka



Joined: 26 Aug 2004
Posts: 1088
Location: Zagreb

PostPosted: 08.01.2006 18:00    Post subject: Add user to your forum ignore list Reply with quote

da pojednostavim pitanje:
kako napraviti da mi klikom na link browser ponudi opciju za download tog filea (govorim o .mov fileu)?

_________________
Jedan šest | Behance | Vimeo
Back to top
View user's profile Send private message Visit poster's website
mile



Joined: 10 Sep 2003
Posts: 1327
Location: Jeruzalem

PostPosted: 08.01.2006 18:06    Post subject: Add user to your forum ignore list Reply with quote

možda redirect na brojač downloada?
ili da verziju za download zipaš?
Back to top
View user's profile Send private message Visit poster's website
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 08.01.2006 18:18    Post subject: Add user to your forum ignore list Reply with quote

jurka wrote:
da pojednostavim pitanje:
kako napraviti da mi klikom na link browser ponudi opciju za download tog filea (govorim o .mov fileu)?

ma skužio sam, ali o tome odlučuje korisnik tj. browser... i kažem, mislim da nema načina da ga prisilis da pokrene neki download manager ili nesta...

Quote:
ili da verziju za download zipaš?

mislim da je to jedino riješenje, ali rekao si da želiš jedan file...

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
jurka



Joined: 26 Aug 2004
Posts: 1088
Location: Zagreb

PostPosted: 08.01.2006 18:28    Post subject: Add user to your forum ignore list Reply with quote

mile wrote:
ili da verziju za download zipaš?

najjednostavnije je uvijek najbolje rješenje!
to ću i napraviti. super, hvala!!

_________________
Jedan šest | Behance | Vimeo
Back to top
View user's profile Send private message Visit poster's website
carr



Joined: 13 Nov 2003
Posts: 1397
Location: Karlovac

PostPosted: 08.01.2006 21:43    Post subject: Add user to your forum ignore list Reply with quote

jurka wrote:
da pojednostavim pitanje:
kako napraviti da mi klikom na link browser ponudi opciju za download tog filea (govorim o .mov fileu)?

ucitas taj fajl, posaljes mu content-type application/force-download i ispljunes ga van

_________________
Bolje biti malo lud, nego malo pametan.
Back to top
View user's profile Send private message Visit poster's website
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 08.01.2006 22:05    Post subject: Add user to your forum ignore list Reply with quote

Zar ti nije jednostavnije ispod napisati nešto tipa:
(right-click>save target as... for download, jel)

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 09.01.2006 00:26    Post subject: Add user to your forum ignore list Reply with quote

Stribor, care Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jeger



Joined: 06 Apr 2005
Posts: 25

PostPosted: 20.01.2006 14:38    Post subject: reply Add user to your forum ignore list Reply with quote

Za download..opcenito .. najbolje je sve zipat..
nemas zajebancije dal ce otvorit il nece..samo zip Cool
Back to top
View user's profile Send private message
fun.ky



Joined: 05 Jan 2006
Posts: 365
Location: Mostar

PostPosted: 28.01.2006 11:26    Post subject: Add user to your forum ignore list Reply with quote

Što kaže car najbolje mu je silom zadati, a sve po standradima Smile

PS: Evo ti primjera koji sam koristio za jednog klijenta koji je htjeo da stavlja file-ove raznih ekstenzija, jpg - koji se po default-u otvara a ne nudi za download opciju do šta ja znam uglavnom evo ti koda, koji na osnovu id-a vuče iz baze naziv file, i traži ga u određenom direktoriju. Mislim da je jednostavan, a radi odlično.

Code:
<?php
ob_start();
$id_down = $_REQUEST['id'];
include_once ("config.php");
$upit = "SELECT * from download where id = $id";
$rez = mysql_query ($upit);
if (!$rez)
   echo "Upit nije izvrshen";
$red = mysql_fetch_object ($rez);
$filename = "download/$red->file";
$file_extension = strtolower(substr(strrchr($filename,"."),1));
switch( $file_extension )
{
  case "pdf": $ctype="application/pdf"; break;
  case "exe": $ctype="application/octet-stream"; break;
  case "zip": $ctype="application/zip"; break;
  case "doc": $ctype="application/msword"; break;
  case "xls": $ctype="application/vnd.ms-excel"; break;
  case "ppt": $ctype="application/vnd.ms-powerpoint"; break;
  case "gif": $ctype="image/gif"; break;
  case "png": $ctype="image/png"; break;
  case "jpeg":
  case "jpg": $ctype="image/jpg"; break;
  default: $ctype="application/force-download";
}
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false); // potrebno za pojedine browser-e
header("Content-Type: $ctype");
header("Content-Disposition: attachment; filename=\"".basename($filename)."\";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filename));
readfile("$filename");
exit();

ob_end_flush();
?>


Ukoliko bude problema piši....

_________________
There is no style definition for good music!
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
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


Powered by phpBB © 2001, 2005 phpBB Group