- Posts: 3
COMMUNITY FORUM
K2 Add new item window resize
- Bernard R.
- Offline
- New Member
Less
More
14 years 4 days ago #87287
by Bernard R.
Replied by Bernard R. on topic K2 Add new item window resize
POSSIBLE FIX FOR SAVE AND CLOSE BUTTON.
Not sure if this would work with everyone. It worked like a charm on my site.
(REMEMBER TO BACKUP YOUR FORM.PHP FILE BEFORE PROCEEDING WITH THIS FIX)
I added the following line of code to line 36 on form.php (located: components/com_k2_views/item/tmpl)
parent.$('sbox-window').close();
Not sure if this would work with everyone. It worked like a charm on my site.
(REMEMBER TO BACKUP YOUR FORM.PHP FILE BEFORE PROCEEDING WITH THIS FIX)
I added the following line of code to line 36 on form.php (located: components/com_k2_views/item/tmpl)
parent.$('sbox-window').close();
Please Log in or Create an account to join the conversation.
- Carlos Salas
- Offline
- Junior Member
Less
More
- Posts: 22
14 years 4 days ago #87288
by Carlos Salas
Replied by Carlos Salas on topic K2 Add new item window resize
go to components/com_k2/views/item/tmpl/form.php
After string 35: "submitform( pressbutton );"
You can add:
36: parent.$('sbox-window').close(); /* To close modalbox */
37: alert( ' Send ! ' ); /* To view a message */
Info by BFL found here: community.getk2.org/forum/topics/close-modalbox-on-frontend
modernmagic said:I have discovered that if you login and click "My Page" and then click "Post a new item" the "K2 Add Item" screen appears on a popup and everything works fine.
This confirms that the issue/bug is only when you click "Add New Item" in the K2 login module.
After string 35: "submitform( pressbutton );"
You can add:
36: parent.$('sbox-window').close(); /* To close modalbox */
37: alert( ' Send ! ' ); /* To view a message */
Info by BFL found here: community.getk2.org/forum/topics/close-modalbox-on-frontend
modernmagic said:I have discovered that if you login and click "My Page" and then click "Post a new item" the "K2 Add Item" screen appears on a popup and everything works fine.
This confirms that the issue/bug is only when you click "Add New Item" in the K2 login module.
Please Log in or Create an account to join the conversation.
- Peter Clarke
- Offline
- New Member
Less
More
- Posts: 4
13 years 10 months ago #87289
by Peter Clarke
Replied by Peter Clarke on topic K2 Add new item window resize
Hi All - not sure if this has been posted or not (too many posts to read!) but this helps in window resizing.
simon.getk2.org/tips-and-tricks/item/277-front-side-editor-iframe-adjustment
Cheers!
simon.getk2.org/tips-and-tricks/item/277-front-side-editor-iframe-adjustment
Cheers!
Please Log in or Create an account to join the conversation.
- John Willis
- Offline
- New Member
Less
More
- Posts: 9
13 years 9 months ago #87290
by John Willis
Replied by John Willis on topic K2 Add new item window resize
As i work through this (increasingly long) thread i also am hopeful that the front end editing size will be fixed. At the moment though, i tell my clients to pres F11 to get the browser tools out of the way. Some have a lot of stuff up there, which makes their window even smaller than normal.
I love K2 and will continue working with it, and have faith that this will be addressed in the future.
I love K2 and will continue working with it, and have faith that this will be addressed in the future.
Please Log in or Create an account to join the conversation.
- Peter Clarke
- Offline
- New Member
Less
More
- Posts: 4
13 years 9 months ago #87291
by Peter Clarke
Replied by Peter Clarke on topic K2 Add new item window resize
Hey John - did you click the link I posted above? If you are able to access the files via FTP it is really easy to do - and it works. I am not a "coder" or developer by any means - just a user and I was able to do it. Good luck!
John Willis said:
As i work through this (increasingly long) thread i also am hopeful that the front end editing size will be fixed. At the moment though, i tell my clients to pres F11 to get the browser tools out of the way. Some have a lot of stuff up there, which makes their window even smaller than normal.
I love K2 and will continue working with it, and have faith that this will be addressed in the future.
John Willis said:
As i work through this (increasingly long) thread i also am hopeful that the front end editing size will be fixed. At the moment though, i tell my clients to pres F11 to get the browser tools out of the way. Some have a lot of stuff up there, which makes their window even smaller than normal.
I love K2 and will continue working with it, and have faith that this will be addressed in the future.
Please Log in or Create an account to join the conversation.
- John Willis
- Offline
- New Member
Less
More
- Posts: 9
13 years 9 months ago #87292
by John Willis
Replied by John Willis on topic K2 Add new item window resize
Thanks Peter, I see two instances of this line in the components/com_k2/templates/user.php file. The example mentions href="/"> at the end of the lines,and i have this after the href="/"> Do i need to remove this part?
href="<?php echo $this->addLink; ?>"> <?php echo JText::_('Post a new item'); ?>
href="<?php echo $this->addLink; ?>"> <?php echo JText::_('Post a new item'); ?>
Please Log in or Create an account to join the conversation.
- Peter Clarke
- Offline
- New Member
Less
More
- Posts: 4
13 years 9 months ago #87293
by Peter Clarke
Replied by Peter Clarke on topic K2 Add new item window resize
HI John, just had to re-read the instructions. You only replace the red with the green text. So I am pretty sure you leave the "href" in tact. Make sure to keep an original copy of the file incase you need to go back to it!
Good Luck!
Peter
John Willis said:
Thanks Peter, I see two instances of this line in the components/com_k2/templates/user.php file. The example mentions href="/"> at the end of the lines,and i have this after the href="/"> Do i need to remove this part?
href="<?php echo $this->addLink; ?>"> <?php echo JText::_('Post a new item'); ?>
Good Luck!
Peter
John Willis said:
Thanks Peter, I see two instances of this line in the components/com_k2/templates/user.php file. The example mentions href="/"> at the end of the lines,and i have this after the href="/"> Do i need to remove this part?
href="<?php echo $this->addLink; ?>"> <?php echo JText::_('Post a new item'); ?>
Please Log in or Create an account to join the conversation.
- Andy Connell
- Offline
- Senior Member
Less
More
- Posts: 54
13 years 9 months ago #87294
by Andy Connell
Carlos Salas said:
Hi Petri!
You can disable the lightbox by removing the class and the rel.
Before:
After:
This way you will get a "normal" link to open in a same window or in a new tab.
Just remember remove the class="modal" because if you don't it will display a worst lightbox
P.S. I had to separate the code because it wont let me place a php code =/ sorry man
Greets.
Replied by Andy Connell on topic K2 Add new item window resize
Carlos Salas said:
Hi Petri!
You can disable the lightbox by removing the class and the rel.
Before:
class="modal" rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}" h r e f=" < ?php echo $user->profile->addLink; ?> " > < ?php echo JText::_('Add new item'); ? >< /a>
After:
h r e f="< ? php echo $user->profile->addLink; ?> " >
This way you will get a "normal" link to open in a same window or in a new tab.
Just remember remove the class="modal" because if you don't it will display a worst lightbox
P.S. I had to separate the code because it wont let me place a php code =/ sorry man
Greets.
Please Log in or Create an account to join the conversation.
- Andy Connell
- Offline
- Senior Member
Less
More
- Posts: 54
13 years 9 months ago #87295
by Andy Connell
Replied by Andy Connell on topic K2 Add new item window resize
Hi I cant get this to work either?I have removed code lines <a class="modal" rel="{handler:'iframe',size:{x:990,y:650}}" href="<?php echo $this->item->editLink; ?>"> to read; <a href="<?php echo $this->item->editLink; ?>">as suggested. Now when a user clicks to add/edit article in the front end. the front end editor opens up in a full width screen, that when you add your article and saveit is saved, and there is a message that says so, but the screen desont close down, and the cancel icon also doesnt close the screen down, you have to use your browsers back button to get back?Have I missed something out?Andy
Please Log in or Create an account to join the conversation.
- Hanny
- Offline
- Senior Member
Less
More
- Posts: 48
13 years 9 months ago #87296
by Hanny
Replied by Hanny on topic K2 Add new item window resize
By removing the 'iframe' code, all you're doing is making it appear in the existing window.
To resolve this bug - it will be something going on with the code behind the 'save' button. I've read that the authors of this component have chosen not to fix this bug - which is unfortunate. It's the single thing keeping me from being completely satisfied with this!
I personally don't know enough to go in tinkering around with the code behind the 'save' button - but was hoping these forums would provide some assistance.
So far, no luck.
To resolve this bug - it will be something going on with the code behind the 'save' button. I've read that the authors of this component have chosen not to fix this bug - which is unfortunate. It's the single thing keeping me from being completely satisfied with this!
I personally don't know enough to go in tinkering around with the code behind the 'save' button - but was hoping these forums would provide some assistance.
So far, no luck.
Please Log in or Create an account to join the conversation.