- Posts: 37
COMMUNITY FORUM
Get article id
- Tiago Manuel da Costa Silva
-
Topic Author
- Offline
- Junior Member
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
Please Log in or Create an account to join the conversation.
- Tiago Manuel da Costa Silva
-
Topic Author
- Offline
- Junior Member
- Posts: 37
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
Please.
Simon
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
Can you mail to support at k2joom dot com I will take a look and see if I can get that working as well.
Tiago Manuel da Costa Silva said:Of course Simon.
The thing i did is temporary, because what i did was changing the print button for a pdf button.
Later i want to have a new button but i don´t know how to do it yet.
ok.
Procedure:
1º - I edit the file C:\xampp\htdocs\joomla\components\com_k2\templates\default\item.php
2º - I change the original code:
item->printLink; ?>" onclick="window.print();return false;">
item->printLink; ?>" rel="{handler:'iframe',size:{x:900,y:500}}">
For this code:
&lang= ','mywindow','width=800,height=400'
);return false;">
With this code i open the file i want, in my case to make the pdf (oh, I´m using FPDF), then i get the id of the article and the language so i can use $_GET on the "FILE TO OPEN", and print categories and extrafields on the pdf.
I don´t know if it the best way, but is working. Hope this can help.
Please Log in or Create an account to join the conversation.
- Tiago Manuel da Costa Silva
-
Topic Author
- Offline
- Junior Member
- Posts: 37
Please Log in or Create an account to join the conversation.
- Tiago Manuel da Costa Silva
-
Topic Author
- Offline
- Junior Member
- Posts: 37
How can i send the file to you?
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
Simon
Tiago Manuel da Costa Silva said:Simon, i´m always getting : Sorry, Your uploaded file type is not allowed
How can i send the file to you?
Please Log in or Create an account to join the conversation.
- AdrianK
-
- Offline
- Senior Member
- Posts: 46
Please Log in or Create an account to join the conversation.
- Tiago Manuel da Costa Silva
-
Topic Author
- Offline
- Junior Member
- Posts: 37
But i need to get a only some extra fields but using $this->item->extra_fields[1]->name;, how can i make my pdf file use this code?
Please Log in or Create an account to join the conversation.
- AdrianK
-
- Offline
- Senior Member
- Posts: 46
Please Log in or Create an account to join the conversation.
- Tiago Manuel da Costa Silva
-
Topic Author
- Offline
- Junior Member
- Posts: 37
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
$yourvar = JRequest::getInt('id');
right where you are in the code and use it on the fly?
Please Log in or Create an account to join the conversation.
- Tiago Manuel da Costa Silva
-
Topic Author
- Offline
- Junior Member
- Posts: 37
Does this answer your question?
Please Log in or Create an account to join the conversation.
- Tiago Manuel da Costa Silva
-
Topic Author
- Offline
- Junior Member
- Posts: 37
Please Log in or Create an account to join the conversation.