- Posts: 9
COMMUNITY FORUM
[Solved] K2 frontend item submission form
- flabz
-
Topic Author
- Offline
- New Member
Less
More
15 years 1 month ago #81382
by flabz
[Solved] K2 frontend item submission form was created by flabz
I was looking for solution for a long time but didn't found anything...
By default, K2 frontend editor is beeing opened in popup modal window.
The link in K2 login module that opens the form is the following:<a class="modal" rel="{handler:'iframe',size:{x:990,y:650}}" href="<?php echo $user->profile->addLink; ?>"><?php echo JText::_('Add new item'); ?></a>
I don't want that form to be a modal. So, the easiest answer for my
question is removing 'class' and 'rel' descriptions from that link.
But. In that case article submission form opens on a blank page. And,
although 'Save' button works, 'Cancel' button doesn't work at all...
Anyway, even if all the buttons work fine, such representing of that
form isn't suitable for me.
My purpose is to open K2 item submission form within site template (inmain component area). For now I've copied all my template's html code to that form template, and that's the worst solution i could imagine... No dynamic blocks
output, all the changes to menus should be done manually etc...
I even don't hope that anyone can give me an advice what to do, but who
knows.... Please!.. Has anyone any ideas how to do that?
By default, K2 frontend editor is beeing opened in popup modal window.
The link in K2 login module that opens the form is the following:<a class="modal" rel="{handler:'iframe',size:{x:990,y:650}}" href="<?php echo $user->profile->addLink; ?>"><?php echo JText::_('Add new item'); ?></a>
I don't want that form to be a modal. So, the easiest answer for my
question is removing 'class' and 'rel' descriptions from that link.
But. In that case article submission form opens on a blank page. And,
although 'Save' button works, 'Cancel' button doesn't work at all...
Anyway, even if all the buttons work fine, such representing of that
form isn't suitable for me.
My purpose is to open K2 item submission form within site template (inmain component area). For now I've copied all my template's html code to that form template, and that's the worst solution i could imagine... No dynamic blocks
output, all the changes to menus should be done manually etc...
I even don't hope that anyone can give me an advice what to do, but who
knows.... Please!.. Has anyone any ideas how to do that?
Please Log in or Create an account to join the conversation.
- flabz
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 9
15 years 1 month ago #81383
by flabz
Replied by flabz on topic [Solved] K2 frontend item submission form
Please.... Even if anyone knows that it's impossible to do - post here the answer...
I'm bored of searching the solution... If it's impossible - i'll just stop breaking my head...
I'm bored of searching the solution... If it's impossible - i'll just stop breaking my head...
Please Log in or Create an account to join the conversation.
- Armands P
-
- Offline
- New Member
Less
More
- Posts: 3
15 years 1 month ago #81384
by Armands P
Replied by Armands P on topic [Solved] K2 frontend item submission form
Probably not the answer you are looking for, but...
It seems in the modal window k2 overrides the default template - tells not to display anything but k2 on the page
I'm guessing joomla has such a feature built in - and k2 is using it
So I would search in the Joomla documentation - and try to find the k2 php files responsible for this behavior
Such reprogramming might take some time - if you're on a deadline - your hack maybe the best solution.
P.S.
Why a modal window doesn't work for you?
If it doesn`t fit in your design - you can redesign it with css - and sometimes some js editing.
It seems in the modal window k2 overrides the default template - tells not to display anything but k2 on the page
I'm guessing joomla has such a feature built in - and k2 is using it
So I would search in the Joomla documentation - and try to find the k2 php files responsible for this behavior
Such reprogramming might take some time - if you're on a deadline - your hack maybe the best solution.
P.S.
Why a modal window doesn't work for you?
If it doesn`t fit in your design - you can redesign it with css - and sometimes some js editing.
Please Log in or Create an account to join the conversation.
- flabz
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 9
15 years 1 month ago #81385
by flabz
Replied by flabz on topic [Solved] K2 frontend item submission form
Thanks a lot for your reply, but I've already found the solution!
I solved everything in very easy way!
Just created in my joomla template folder new file called "component.php", which was the copy of my main "index.php" file. That's all! Everything worked fine!)))
I'm very confused, because I've read lots of Joomla documentation and MVC classes description while looking for answer... But it was so easy....
P.S.
Why a modal window doesn't work for me? As for me - it works. But my customer doesn't accept it...
I solved everything in very easy way!
Just created in my joomla template folder new file called "component.php", which was the copy of my main "index.php" file. That's all! Everything worked fine!)))
I'm very confused, because I've read lots of Joomla documentation and MVC classes description while looking for answer... But it was so easy....
P.S.
Why a modal window doesn't work for me? As for me - it works. But my customer doesn't accept it...
Please Log in or Create an account to join the conversation.
- Armands P
-
- Offline
- New Member
Less
More
- Posts: 3
15 years 1 month ago #81386
by Armands P
Replied by Armands P on topic [Solved] K2 frontend item submission form
Nice solution - adding this to my knowledge base folder :)
Please Log in or Create an account to join the conversation.
- desiboy
-
- Offline
- New Member
Less
More
- Posts: 1
14 years 11 months ago #81387
by desiboy
Replied by desiboy on topic [Solved] K2 frontend item submission form
I'm having the same issue. can you please explain this step by step. Thanks.
Please Log in or Create an account to join the conversation.
- sigpro_firsttry
-
- Offline
- Junior Member
Less
More
- Posts: 37
14 years 11 months ago #81388
by sigpro_firsttry
Replied by sigpro_firsttry on topic [Solved] K2 frontend item submission form
Yes, please share this excellent solution with us!
Thanks!
Thanks!
Please Log in or Create an account to join the conversation.
- PM Muthumbi
-
- Offline
- New Member
Less
More
- Posts: 15
14 years 10 months ago #81389
by PM Muthumbi
Replied by PM Muthumbi on topic [Solved] K2 frontend item submission form
Flabz, please explain this, it is interesting coz most of us are almost going nuts trying to crack our heads on this issue. I am doing this right away. Thanks for sharing.
sigpro_firsttry said:Yes, please share this excellent solution with us!
Thanks!
sigpro_firsttry said:Yes, please share this excellent solution with us!
Thanks!
Please Log in or Create an account to join the conversation.
- PM Muthumbi
-
- Offline
- New Member
Less
More
- Posts: 15
14 years 10 months ago #81390
by PM Muthumbi
Replied by PM Muthumbi on topic [Solved] K2 frontend item submission form
Is there a hidden solution to this than the above provided by Flabz, i did exactly that but i am getting an error, Cannot redeclare class K2ModelItem in /components/com_k2/models/item.php on line 930. I will be gland to get this solution.
The annoying thing is the fact that the cancel button does not work and that the whole form fills the page and one can only escape the item addition by going back where you came from. For frontend users this can be a very difficult thing to do.
PM Muthumbi said:Flabz, please explain this, it is interesting coz most of us are almost going nuts trying to crack our heads on this issue. I am doing this right away. Thanks for sharing. sigpro_firsttry said:Yes, please share this excellent solution with us! Thanks!
The annoying thing is the fact that the cancel button does not work and that the whole form fills the page and one can only escape the item addition by going back where you came from. For frontend users this can be a very difficult thing to do.
PM Muthumbi said:Flabz, please explain this, it is interesting coz most of us are almost going nuts trying to crack our heads on this issue. I am doing this right away. Thanks for sharing. sigpro_firsttry said:Yes, please share this excellent solution with us! Thanks!
Please Log in or Create an account to join the conversation.