Keyword

K2 Add new item window resize

  • Jasper Newton
  • Jasper Newton's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 4 months ago #87247 by Jasper Newton
Replied by Jasper Newton on topic K2 Add new item window resize
Christian,

Where've you seen that? can't find it, Might be useful.

Thanks.



Christian Matthieas said:I saw someone posted code that gave an autoframe height... has anyone checked to see if that works? I didn't use it because the person just gave out code without saying what to replace.


Jasper Newton said:Hmmm. yes.Hi Christian, Carlos,The "fix" seems to work for at least 2.3,2.4,2.4.1 (not sure about early versions, should do tho.)The simple "SIMPLE" solution would be a backend "auto" frame height to suit every bodies screen resolutions.But.....as you've read, K2 won't do that because we dared to question their supreme beings. Maybe professionalism shall prevail and they will swallow their pride and adopt it, funny thing is I don't want any thanks from them (they don't even have to acknowledge me, just adopt it), I just want to help others, and hopefully, I have.K2 have, as you have seen, rejected this "for now" because we were nasty to them and disrespected their work, even though I praised them twice. Maybe their is hope for the future..........................................Christian Matthieas said:Carlos Salas said:Hello everyone!Maybe you guys can guide me.I have 2 questions.1. What Jasper wrote here can be used in K2 v2.4.1?2. Is it possible that this could be adapted to a popup window with jquery, javascript, etc?Thank you!Greets.

Yes this works for 2.4.1for the second question I could not answer. A person from K2 probably won't be on here to tell you though. don't hold your breath.Morning Jasper. the fight goes on.

Please Log in or Create an account to join the conversation.

  • Christian Matthieas
  • Christian Matthieas's Avatar
  • Offline
  • Premium Member
More
14 years 4 months ago #87248 by Christian Matthieas
Replied by Christian Matthieas on topic K2 Add new item window resize
LMAO Jasper...

Check out this post from 2009 and check out how they said they were fixing it and check out what they fixed... LMAO

community.getk2.org/forum/topics/frontend-ajax-editor-issue?commentId=3536014%3AComment%3A8437

talk about hard headed

Please Log in or Create an account to join the conversation.

  • Jasper Newton
  • Jasper Newton's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 4 months ago #87249 by Jasper Newton
Replied by Jasper Newton on topic K2 Add new item window resize
Marvelous

Thanking you very much, Ill give it a go this week some-when.
So the bug that's not a bug, and the problem that's not a problem just "an annoyance" has been "fixed" by K2 3 times
in 3 different versions, while not actually fixing it, denying its a problem or a bug, and actually being resolved, albeit temporarily by users?
smart work.
It'd be a far push to suggest that the person then who clearly wont accept its an issue, now a year on and users STILL finding it an issue, was the same person...............oh it is?........oh.

Thanks tho.


Christian Matthieas said:LMAO Jasper...
Check out this post from 2009 and check out how they said they were fixing it and check out what they fixed... LMAO

community.getk2.org/forum/topics/frontend-ajax-editor-issue?...

talk about hard headed

Please Log in or Create an account to join the conversation.

  • Christian Matthieas
  • Christian Matthieas's Avatar
  • Offline
  • Premium Member
More
14 years 4 months ago #87250 by Christian Matthieas
Replied by Christian Matthieas on topic K2 Add new item window resize
It is not the auto resizer but it seems like a good fix. And the lady wonderfully lists the same files we found without anyone bitching about hacking "CORE" files.

Let me know if you like the method of a new window better. Seems like a good idea.. I don't know though.



Jasper Newton said:MarvelousThanking you very much, Ill give it a go this week some-when.So the bug that's not a bug, and the problem that's not a problem just "an annoyance" has been "fixed" by K2 3 timesin 3 different versions, while not actually fixing it, denying its a problem or a bug, and actually being resolved, albeit temporarily by users?smart work.It'd be a far push to suggest that the person then who clearly wont accept its an issue, now a year on and users STILL finding it an issue, was the same person...............oh it is?........oh.Thanks tho.Christian Matthieas said:LMAO Jasper...Check out this post from 2009 and check out how they said they were fixing it and check out what they fixed... LMAOhttp://community.getk2.org/forum/topics/frontend-ajax-editor-issue?...talk about hard headed

Please Log in or Create an account to join the conversation.

More
14 years 4 months ago #87251 by Carlos Salas
Replied by Carlos Salas on topic K2 Add new item window resize
This works!!

rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}"

Please Log in or Create an account to join the conversation.

  • Christian Matthieas
  • Christian Matthieas's Avatar
  • Offline
  • Premium Member
More
14 years 4 months ago #87252 by Christian Matthieas
Replied by Christian Matthieas on topic K2 Add new item window resize
What does this do and for us non-coders what exactly are we replacing?

thanks so much



Carlos Salas said:This works!!rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}"

Please Log in or Create an account to join the conversation.

More
14 years 4 months ago #87253 by Carlos Salas
Replied by Carlos Salas on topic K2 Add new item window resize
Sorry Christian, people.

You need to replace the "so famous" rel="{handler:'iframe',size:{x:990,y:650}}"
I will copy/paste what Jasper post at the begining.

1) To alter the size of the window in the K2 Login module, find the Userblock.php file, found by; modules/mod_k2_login/tmpl/userblock.php. On or around line 35 (in mine, may vary in yours), find the line;

rel="{handler:'iframe',size:{x:990,y:650}}"

And replace it with this:

rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}"

In a few words, what this code does is resize the popup window (appears when you click "Add new item" from K2 Login module), conform to your window (not screen) resolution. Then you can see whole the window in a wide view. Well that's what I can see from my laptop. (1280x800)

Note: Maybe you will see many of this rel="{handler:'iframe',size:{x:990,y:650}}" well, just replace all of them to get the problem fixed.

If you want to do this with the component for a better font-end edit just follow these steps:

2)To alter the size of the window in the category add item link, again find the file "Category.php, item.php and User.php"
These can be found by; component/com_k2/templates/default/(category.php/item.php/user.php)
Again find the exact same line as before
rel="{handler:'iframe',size:{x:990,y:650}}" and replace it.

3) To alter the size of the modal window for the "Edit item" link, find the category_item.php file; found by: component/com_k2/templates/default/category_item.php
Do exactly the same as above.


About all this.. I think this happens because the K2 designers are using a hi resolution screen, so for all of them it's normal to get this big window and for us it's annoying but I hope and trust that this "error" will be fixed in the next version.

Greets.





Christian Matthieas said:What does this do and for us non-coders what exactly are we replacing?
thanks so much



Carlos Salas said:This works!!rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}"

Please Log in or Create an account to join the conversation.

  • Jasper Newton
  • Jasper Newton's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 4 months ago #87254 by Jasper Newton
Replied by Jasper Newton on topic K2 Add new item window resize
Dear Carlos,

I have tried this, and can confirm it works a treat!! thanks very much. Even nicer than what I've been using :D.
On my laptop it gives me a nice crisp wide screen window that fits nicely into my window

Really appreciate it. ta
Just a reminder, sure yo know, when you update K2 it'll overwrite these changes, hence this thread
And re K2 fixing this "error", its only an "annoyance" so won't be fixed according to them. By merely discussing this issue and trying to help other users, we are disrespecting them (apparently)

Thanks again.
Jasper


Carlos Salas said:Sorry Christian, people.
You need to replace the "so famous" rel="{handler:'iframe',size:{x:990,y:650}}"
I will copy/paste what Jasper post at the begining.

1) To alter the size of the window in the K2 Login module, find the Userblock.php file, found by; modules/mod_k2_login/tmpl/userblock.php. On or around line 35 (in mine, may vary in yours), find the line;

rel="{handler:'iframe',size:{x:990,y:650}}"

And replace it with this:

rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}"

In a few words, what this code does is resize the popup window (appears when you click "Add new item" from K2 Login module), conform to your window (not screen) resolution. Then you can see whole the window in a wide view. Well that's what I can see from my laptop. (1280x800)

Note: Maybe you will see many of this rel="{handler:'iframe',size:{x:990,y:650}}" well, just replace all of them to get the problem fixed.

If you want to do this with the component for a better font-end edit just follow these steps:

2)To alter the size of the window in the category add item link, again find the file "Category.php, item.php and User.php"
These can be found by; component/com_k2/templates/default/(category.php/item.php/user.php)
Again find the exact same line as before
rel="{handler:'iframe',size:{x:990,y:650}}" and replace it.

3) To alter the size of the modal window for the "Edit item" link, find the category_item.php file; found by: component/com_k2/templates/default/category_item.php
Do exactly the same as above.


About all this.. I think this happens because the K2 designers are using a hi resolution screen, so for all of them it's normal to get this big window and for us it's annoying but I hope and trust that this "error" will be fixed in the next version.

Greets.





Christian Matthieas said:What does this do and for us non-coders what exactly are we replacing? thanks so much



Carlos Salas said:This works!!rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}"

Please Log in or Create an account to join the conversation.

  • Christian Matthieas
  • Christian Matthieas's Avatar
  • Offline
  • Premium Member
More
14 years 4 months ago #87255 by Christian Matthieas
Replied by Christian Matthieas on topic K2 Add new item window resize
CARLOS... THANK YOU... JASPER THANK YOU... K2 THANKS... This is now SOLVED... IMPLEMENT THIS FOR 2.5 and call it a WRAP. WORKS PERFECT AWESOME... WINDOW RESIZING ISSUE COMPLETED.

WE FOUGHT THE LAW and the WE WON... and K2 is better because of it. SEE HOW community involvement WORKS. HIP HIP HOP HOORAY. HOOOO



Jasper Newton said:Dear Carlos,I have tried this, and can confirm it works a treat!! thanks very much. Even nicer than what I've been using :D.On my laptop it gives me a nice crisp wide screen window that fits nicely into my windowReally appreciate it. taJust a reminder, sure yo know, when you update K2 it'll overwrite these changes, hence this threadAnd re K2 fixing this "error", its only an "annoyance" so won't be fixed according to them. By merely discussing this issue and trying to help other users, we are disrespecting them (apparently)Thanks again.JasperCarlos Salas said:Sorry Christian, people.You need to replace the "so famous" rel="{handler:'iframe',size:{x:990,y:650}}"I will copy/paste what Jasper post at the begining.1) To alter the size of the window in the K2 Login module, find the Userblock.php file, found by; modules/mod_k2_login/tmpl/userblock.php. On or around line 35 (in mine, may vary in yours), find the line;rel="{handler:'iframe',size:{x:990,y:650}}"And replace it with this:rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}"In a few words, what this code does is resize the popup window (appears when you click "Add new item" from K2 Login module), conform to your window (not screen) resolution. Then you can see whole the window in a wide view. Well that's what I can see from my laptop. (1280x800)Note: Maybe you will see many of this rel="{handler:'iframe',size:{x:990,y:650}}" well, just replace all of them to get the problem fixed.If you want to do this with the component for a better font-end edit just follow these steps:2)To alter the size of the window in the category add item link, again find the file "Category.php, item.php and User.php"These can be found by; component/com_k2/templates/default/(category.php/item.php/user.php)Again find the exact same line as beforerel="{handler:'iframe',size:{x:990,y:650}}" and replace it.3) To alter the size of the modal window for the "Edit item" link, find the category_item.php file; found by: component/com_k2/templates/default/category_item.phpDo exactly the same as above.About all this.. I think this happens because the K2 designers are using a hi resolution screen, so for all of them it's normal to get this big window and for us it's annoying but I hope and trust that this "error" will be fixed in the next version.Greets.Christian Matthieas said:What does this do and for us non-coders what exactly are we replacing?thanks so muchCarlos Salas said:This works!!rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}"

Please Log in or Create an account to join the conversation.

More
14 years 4 months ago #87256 by Petri Niemelä
Replied by Petri Niemelä on topic K2 Add new item window resize
Hi!
I have problem with this lighbox editing entirely. When user is trying to edit item or add new item or moderate comments, nothing happens when he she clicks those links. However if he she rightclicks it opens a new window... Is there a way to completely disable the lightbox, maybe then it would work?



Christian Matthieas said:CARLOS... THANK YOU... JASPER THANK YOU... K2 THANKS... This is now SOLVED... IMPLEMENT THIS FOR 2.5 and call it a WRAP. WORKS PERFECT AWESOME... WINDOW RESIZING ISSUE COMPLETED.
WE FOUGHT THE LAW and the WE WON... and K2 is better because of it. SEE HOW community involvement WORKS. HIP HIP HOP HOORAY. HOOOO



Jasper Newton said:Dear Carlos,I have tried this, and can confirm it works a treat!! thanks very much. Even nicer than what I've been using :D.On my laptop it gives me a nice crisp wide screen window that fits nicely into my windowReally appreciate it. taJust a reminder, sure yo know, when you update K2 it'll overwrite these changes, hence this threadAnd re K2 fixing this "error", its only an "annoyance" so won't be fixed according to them. By merely discussing this issue and trying to help other users, we are disrespecting them (apparently)Thanks again.JasperCarlos Salas said:Sorry Christian, people.You need to replace the "so famous" rel="{handler:'iframe',size:{x:990,y:650}}"I will copy/paste what Jasper post at the begining.1) To alter the size of the window in the K2 Login module, find the Userblock.php file, found by; modules/mod_k2_login/tmpl/userblock.php. On or around line 35 (in mine, may vary in yours), find the line;rel="{handler:'iframe',size:{x:990,y:650}}"And replace it with this:rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}"In a few words, what this code does is resize the popup window (appears when you click "Add new item" from K2 Login module), conform to your window (not screen) resolution. Then you can see whole the window in a wide view. Well that's what I can see from my laptop. (1280x800)Note: Maybe you will see many of this rel="{handler:'iframe',size:{x:990,y:650}}" well, just replace all of them to get the problem fixed.If you want to do this with the component for a better font-end edit just follow these steps:2)To alter the size of the window in the category add item link, again find the file "Category.php, item.php and User.php"These can be found by; component/com_k2/templates/default/(category.php/item.php/user.php)Again find the exact same line as beforerel="{handler:'iframe',size:{x:990,y:650}}" and replace it.3) To alter the size of the modal window for the "Edit item" link, find the category_item.php file; found by: component/com_k2/templates/default/category_item.phpDo exactly the same as above.About all this.. I think this happens because the K2 designers are using a hi resolution screen, so for all of them it's normal to get this big window and for us it's annoying but I hope and trust that this "error" will be fixed in the next version.Greets.Christian Matthieas said:What does this do and for us non-coders what exactly are we replacing?thanks so muchCarlos Salas said:This works!!rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}"

Please Log in or Create an account to join the conversation.

More
14 years 4 months ago #87257 by Carlos Salas
Replied by Carlos Salas on topic K2 Add new item window resize
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.

More
14 years 4 months ago #87258 by Petri Niemelä
Replied by Petri Niemelä on topic K2 Add new item window resize
Hi!
Thanks. Which php files I have to edit / replace this text for it to work?



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.

  • Christian Matthieas
  • Christian Matthieas's Avatar
  • Offline
  • Premium Member
More
14 years 4 months ago #87259 by Christian Matthieas
Replied by Christian Matthieas on topic K2 Add new item window resize
Whoaaa You are not thinking of HACKING THE CORE FILES ARE YOU??? OMGGGGGGGGGG LMAO. JK... We kid We kid. you have to read the very first thread. Jasper lays it out exacty what files you need to change and where. i.e. item, item_list, category, userblock... I think that is it but if you read the beggining it is layed out perfectly.



Petri Niemelä said:Hi!Thanks. Which php files I have to edit / replace this text for it to work?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 lightboxP.S. I had to separate the code because it wont let me place a php code =/ sorry manGreets.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #87260 by zig zag
Replied by zig zag on topic K2 Add new item window resize
Currently the only thing stopping me from using K2 is the lightbox popup for editing, I've been through about 5 JA templates so far trying to find one that doesn't have js conflicts with K2's lightbox and still can't get it to work :( K2 would be much better if there was an option in the backend to use or disable the lightbox completely, this would end 99.9% of all js problems.

Please Log in or Create an account to join the conversation.

  • Jasper Newton
  • Jasper Newton's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 3 months ago #87261 by Jasper Newton
Replied by Jasper Newton on topic K2 Add new item window resize
Hi Zig Zag,
Thanks for your post, As i'm sure you've read from this thread, a temporary fix has been found. K2 wont do what everybody else is screaming from rooftops about, because we questioned there supreme being-ness.


zig zag said:Currently the only thing stopping me from using K2 is the lightbox popup for editing, I've been through about 5 JA templates so far trying to find one that doesn't have js conflicts with K2's lightbox and still can't get it to work :( K2 would be much better if there was an option in the backend to use or disable the lightbox completely, this would end 99.9% of all js problems.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #87262 by zig zag
Replied by zig zag on topic K2 Add new item window resize
Unfortunately for me even if I remove the light box and just have a direct link instead there are still script errors with the tabs on the edit form - if you click the last tab the page reloads again so that the edit form is shown within the main content area of joomla instead of taking you to the last tab, if I could just find a way of making it do that in the first place when you clicked edit it would be perfect as there are no errors that way.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #87263 by Skip
Replied by Skip on topic K2 Add new item window resize
Quote:About all this.. I think this happens because the K2 designers are using a hi resolution screen, so for all of them it's normal to get this big window and for us it's annoying but I hope and trust that this "error" will be fixed in the next version.

Mom cuts about 4 inches off of the end of a roast before cooking it.

Puzzled, her daughter asked her why she cut 4 inches off the end of the roast before cooking it. Mom says that's how her mom taught her to cook a roast.

Daughter asked grandma about this. Grandma told her she cut the end off the roast so it would fit in the cooking pan.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #87264 by Skip
Replied by Skip on topic K2 Add new item window resize
And I would like to see an option to completely disable the use of lightbox / pop-ups in the front end editor for K2 items.

Please Log in or Create an account to join the conversation.

  • Christian Matthieas
  • Christian Matthieas's Avatar
  • Offline
  • Premium Member
More
14 years 3 months ago #87265 by Christian Matthieas
Replied by Christian Matthieas on topic K2 Add new item window resize
i don't get it... the fix isn't good enough for you guys? The new fix works perfectly... perhaps you are not finding it througout this thread.



Skip said:And I would like to see an option to completely disable the use of lightbox / pop-ups in the front end editor for K2 items.

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #87266 by zig zag
Replied by zig zag on topic K2 Add new item window resize
i don't get it... the fix isn't good enough for you guys? The new fix works perfectly... perhaps you are not finding it througout this thread.

Hi do you mean the fix to open the editor in a new window by removing the class="modal" etc, if so this doesn't work for me as the tabs still don't work, when you click on the last tab it takes you through to editing it inline as you would do a normal joomla article (frontend), when you finally get to that point everything works as it should. Hence would like to see this option rather than the lightbox or new window etc as there is still too much js going on for it to be compatible with anything other than a basic joomla template.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum