- Posts: 8
COMMUNITY FORUM
K2 Modal Window Size and pop up
- jason
-
Topic Author
- Offline
- New Member
The solution to make this work without hacking the core files is to make a copy of the original template and rename this to whatever you want. For example i renamed the new folder news.
Then all you need to do is edit some of the template files and install JCE Editor and JCE Media box.
1: enable System - JCE MediaBox plugin
For this I choose the light pop up theme. Shorten the fade and scale speed to 10 so it looks like less of a pop up window.
Set the Overlay color #FFFFFF, Width: 100% and Height 100% and click save.
2. To override K2's default Modal pop up you will need to edit the template files.
Components/com/k2/templates/templatenamefolder/
open all the files and change any off the lines: <a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>">
to
<a class="jcepopup rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>">
It doesn't matter about the size as the jce modal plugin overrides the iframe size to 100% as set above in the plugin.
3. I used the K2 User login module so applied the same jcepopup class to the module files as well.
4: Finally when you go to admin components k2 in the admin area there is a parameters tab under frontend editing i set the default state for the toogle bar to hidden. This hides the meta box and opens the page using the full width.
Have a look at the screen shot and let me know if anyone comes up with any usefull ideas.
I have done this in joomla 2.5
Jason
Attachment not found
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
- Posts: 8743
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Helmut Mehlhart
-
- Offline
- Junior Member
- Posts: 22
2. When I override the "new" template files, where do I have to define K2 to take the new template?
or do you mean to override the original template files ? (Item 2 of your description)
Please Log in or Create an account to join the conversation.
- jason
-
Topic Author
- Offline
- New Member
- Posts: 8
See attached.
Attachment not found
Regards
Jason
Please Log in or Create an account to join the conversation.
- Helmut Mehlhart
-
- Offline
- Junior Member
- Posts: 22
I made a backup of all template files in the default folder to another folder.
Then i edited all files in the default folder like this:
<a class="jcepopup" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>">
In your description the " in red is missing. Is it right what i wrote ?
I think nothing has changed since yet on my popup window.
Pls. see one file as an example.
Attachment not found
Please Log in or Create an account to join the conversation.
- Helmut Mehlhart
-
- Offline
- Junior Member
- Posts: 22
Please Log in or Create an account to join the conversation.
- FlyingScot
-
- Offline
- New Member
- Posts: 17
This is what I see when I inspect the element on the page:
<!-- .modal {
position: fixed;
top: 50%;
left: 50%;
z-index: 1050;
width: 560px;
margin: -250px 0px 0px -280px;
overflow: auto;
background-color: rgb(255, 255, 255);
border: 1px solid rgba(0, 0, 0, 0.3);
border-radius: 6px 6px 6px 6px;
box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.3);
background-clip: padding-box;
} -->
It's driving me crazy. I have spent hours on this. I can't find that code in any of the css files. And the stupid box pops up on the page covering the title of the article and floating when you scroll down the page. In addition the picture of the authors that are in the pop up are only 100px wide but the box is 560px.
Anybody?
You can see how really stupid it looks here:
www.totalhealthmagazine.com/features/radio-interviews/dr-stephen-sinatra-on-the-great-cholesterol-myth.html
Please Log in or Create an account to join the conversation.
- FlyingScot
-
- Offline
- New Member
- Posts: 17
<!--
.modal {
position: top;
top: 0px;
left: 60%;
z-index: 1050;
width: 150px;
margin: -250px 0px 0px -280px;
overflow: auto;
background-color: rgb(255, 255, 255);
border: 1px solid rgba(0, 0, 0, 0.3);
border-radius: 6px 6px 6px 6px;
box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.3);
background-clip: padding-box;
} -->
Please Log in or Create an account to join the conversation.
- David
-
- Offline
- New Member
- Posts: 11
Thanks
Attachment not found
Please Log in or Create an account to join the conversation.
- David
-
- Offline
- New Member
- Posts: 11
modules/mod_k2_user/tmpl/userblock.php
Around Line 35, you'll find
<a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $user->profile->addLink; ?>"><?php echo JText::_('K2_ADD_NEW_ITEM'); ?></a>
Replace with:
<a class="jcepopup rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $user->profile->addLink; ?>"><?php echo JText::_('K2_ADD_NEW_ITEM'); ?></a>
Please Log in or Create an account to join the conversation.
- etkritikonspoudon
-
- Offline
- Junior Member
- Posts: 38
If you have succeeded in this, is there any way to alter the behaviour of the popup for the K2 Image?
That is, not force images above their maximum dimensions, be it in small, medium or large setting...
By default K2 creates copies of images of the various sizes for different views. I would like to have K2 Respect the dimensions of the Item image and not overstretch them, while linking to original image for the lightbox popup...
Any way to do that? it's driving me mad...I got 300px images that are forced to more than double the size.
I can set a reasonable size for Item image, e.g. 350px width, and I can edit the K2 files to change placement of the image and its caption (to float on the left, instead of sitting on top), but I can't find a way to limit the popup to the image's maximum original dimensions.
If you find an answer on this, please share with the K2 Team as well.
Please Log in or Create an account to join the conversation.
- Alexander nichtsointeressant
-
- Offline
- New Member
- Posts: 1
how did you manage that, or did'nt you?
thanks
Please Log in or Create an account to join the conversation.
- Robert_ITMan
-
- Offline
- New Member
- Posts: 10
www.ourfingertips.ca - websites developed and managed @ ourfingertips
Let me help you make the most of the technology at our fingertips
Please Log in or Create an account to join the conversation.