- Posts: 2
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- how to view pdf attachments in new window?(instead of downloading)
how to view pdf attachments in new window?(instead of downloading)
- aquib ali
-
Topic Author
- Offline
- New Member
Less
More
14 years 8 months ago #87865
by aquib ali
how to view pdf attachments in new window?(instead of downloading) was created by aquib ali
how to view pdf attachments in new window?(instead of downloading) or add a separate button for viewing the attachment(mainly .pdf)...plz help..its really important :(thnx in advance
Please Log in or Create an account to join the conversation.
- Marco Carrai
-
- Offline
- New Member
Less
More
- Posts: 2
14 years 8 months ago #87866
by Marco Carrai
Replied by Marco Carrai on topic how to view pdf attachments in new window?(instead of downloading)
I have the same problem...
I can't find the solution.
:(
I can't find the solution.
:(
Please Log in or Create an account to join the conversation.
- aquib ali
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 2
14 years 8 months ago #87867
by aquib ali
Replied by aquib ali on topic how to view pdf attachments in new window?(instead of downloading)
go to directory:
..\components\com_k2\templates\default
open: item.php
in div class="itemAttachmentsBlock"(line 374)
at the end of the block add the following code:
< ? php $view="http://localhost\aq\media\k2\attachments/".$attachment->title ;
$html='VIEW ATTACHMENT
'; echo $html;
? >
(if working on a local server..else mention your home directory instead of localhost)
..\components\com_k2\templates\default
open: item.php
in div class="itemAttachmentsBlock"(line 374)
at the end of the block add the following code:
< ? php $view="http://localhost\aq\media\k2\attachments/".$attachment->title ;
$html='VIEW ATTACHMENT
'; echo $html;
? >
(if working on a local server..else mention your home directory instead of localhost)
Please Log in or Create an account to join the conversation.
- Marco Carrai
-
- Offline
- New Member
Less
More
- Posts: 2
14 years 7 months ago #87868
by Marco Carrai
Replied by Marco Carrai on topic how to view pdf attachments in new window?(instead of downloading)
...thanks, but it doesn't work for me.
It open the "save as" window
Any other clue ?
It open the "save as" window
Any other clue ?
Please Log in or Create an account to join the conversation.
- Jakub Jedynak
-
- Offline
- Senior Member
Less
More
- Posts: 56
14 years 7 months ago #87869
by Jakub Jedynak
Replied by Jakub Jedynak on topic how to view pdf attachments in new window?(instead of downloading)
Use "Edocs - Embed Documents!" plugin.
Please Log in or Create an account to join the conversation.
- TOTHOMweb
-
- Offline
- New Member
11 years 3 weeks ago #87870
by TOTHOMweb
Replied by TOTHOMweb on topic Re: how to view pdf attachments in new window?(instead of downloading)
In case anyone needs it, you can do it by editting (or better, overriding using K2 component templates) the file /components/com_k2/templates/<your template>/item.php
And after
And after
Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- how to view pdf attachments in new window?(instead of downloading)