- Posts: 21
COMMUNITY FORUM
K2 Item Image Big Problem
- John Farouk
- Topic Author
- Offline
- Junior Member
Less
More
8 years 9 months ago #146209
by John Farouk
Replied by John Farouk on topic K2 Item Image Big Problem
hi Lefteris
Please i need help my website www.ahlyafrica.com has been spoiled i made some changes in bootstrap as you follow up after a while i got the home page error no background and Logo stuck
I am a beginner to handle that can you please help me sir I can send you my login details for cpanel and joomla now as PM
I tried to restore the defaults but in vain
Really need help...Waiting reply
Please i need help my website www.ahlyafrica.com has been spoiled i made some changes in bootstrap as you follow up after a while i got the home page error no background and Logo stuck
I am a beginner to handle that can you please help me sir I can send you my login details for cpanel and joomla now as PM
I tried to restore the defaults but in vain
Really need help...Waiting reply
Please Log in or Create an account to join the conversation.
- John Farouk
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
8 years 9 months ago #146210
by John Farouk
Replied by John Farouk on topic K2 Item Image Big Problem
Hi again
I suceeded to restore defaults but the problem of the article image came again please help
www.ahlyafrica.com/index.php/%D9%83%D9%84-%D8%A7%D9%84%D8%A3%D8%AE%D8%A8%D8%A7%D8%B1/item/237-%D8%A7%D9%84%D8%A3%D9%87%D9%84%D9%8A-%D9%8A%D8%AA%D8%B5%D8%AF%D8%B1-%D9%85%D8%AC%D9%85%D9%88%D8%B9%D8%AA%D9%87-%D8%A8%D8%A7%D9%84%D9%83%D9%88%D9%86%D9%81%D8%AF%D8%B1%D8%A7%D9%84%D9%8A%D8%A9-%D8%B9%D9%84%D9%89-%D8%AD%D8%B3%D8%A7%D8%A8-%D8%A7%D9%84%D9%86%D8%AC%D9%85-%D8%A7%D9%84%D8%B3%D8%A7%D8%AD%D9%84%D9%8A
I suceeded to restore defaults but the problem of the article image came again please help
www.ahlyafrica.com/index.php/%D9%83%D9%84-%D8%A7%D9%84%D8%A3%D8%AE%D8%A8%D8%A7%D8%B1/item/237-%D8%A7%D9%84%D8%A3%D9%87%D9%84%D9%8A-%D9%8A%D8%AA%D8%B5%D8%AF%D8%B1-%D9%85%D8%AC%D9%85%D9%88%D8%B9%D8%AA%D9%87-%D8%A8%D8%A7%D9%84%D9%83%D9%88%D9%86%D9%81%D8%AF%D8%B1%D8%A7%D9%84%D9%8A%D8%A9-%D8%B9%D9%84%D9%89-%D8%AD%D8%B3%D8%A7%D8%A8-%D8%A7%D9%84%D9%86%D8%AC%D9%85-%D8%A7%D9%84%D8%B3%D8%A7%D8%AD%D9%84%D9%8A
Please Log in or Create an account to join the conversation.
- John Farouk
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
8 years 9 months ago #146213
by John Farouk
Replied by John Farouk on topic K2 Item Image Big Problem
I can't believe myself nobody here to help me how is that?????????????
Please Log in or Create an account to join the conversation.
- Kelsey Brookes
- Offline
- Elite Member
8 years 9 months ago #146215
by Kelsey Brookes
Replied by Kelsey Brookes on topic K2 Item Image Big Problem
John, I'm not in your time zone and I'm very very busy at the moment with a ton deadlines. I've only just now had a chance to come back to this thread.
I understand this is important to you, but it's a small community, not Facebook. Replies aren't instant.
Send me the following:
FTP login details
Joomla Admin login details
to help (at) thinksync.com.au and I'll try and help with this one issue.
I understand this is important to you, but it's a small community, not Facebook. Replies aren't instant.
Send me the following:
FTP login details
Joomla Admin login details
to help (at) thinksync.com.au and I'll try and help with this one issue.
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
8 years 9 months ago #146224
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic K2 Item Image Big Problem
@John Farouk
Have you resolved the issue? I can see the image as expected in the last link you provided. It would be great to share the solution here to help other users of this community who might face the same issue.
Have you resolved the issue? I can see the image as expected in the last link you provided. It would be great to share the solution here to help other users of this community who might face the same issue.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Kelsey Brookes
- Offline
- Elite Member
8 years 9 months ago #146248
by Kelsey Brookes
Replied by Kelsey Brookes on topic K2 Item Image Big Problem
I'd say he's either left a tag unclosed (or forgotten to delete the closing tag after removing the opening) or accidentally duplicated the img tag.
The solution is really simple, and it's one that I have to deal with on almost every site I develop at the moment:
Templates using Bootstrap and K2 have a fundamental issue with the a tag in the image block of item.php. Because it uses the class of 'modal', the main item image of K2 will disappear: a.modal in Bootstrap has 'display: none;' set.
So as mentioned in an earlier post there are a couple of simple solutions:
1) Don't need the article image to be a modal?
Override the item.php template and remove the 'a' tag surrounding the item image.
2) Need modals, and are happy with the K2 modal?
Search all css files in your template for .modal - if it's based on Bootstrap, you'll find it in bootstrap.css, bootstrap.min.css or a combined.css file, depending on how the template authors have setup the template.
3) Need modals, but want to use the Bootstrap modal system throughout the site?
This is where it gets a bit trickier because you'll really need to disable the K2 modal system.
To do this I do the following:
- Override item.php with the necessary Bootstrap equivalent modal code
- Disable K2 css, jquery and any other options in K2 preferences - bear in mind this means you'll need to create the template styles yourself
- Disable Mootools by using the Mootools Enable/Disable plugin
- Strip out the SqueezeBox script in the site header which K2 instansiates and with Mootools gone will now cause js errors
The first step is the most complicated bit and if you're not comfortable with template overrides then you should probably avoid option #3 entirely. Get it right however and you can have all of your media in Bootstrap modals and strip out redundant systems.
The solution is really simple, and it's one that I have to deal with on almost every site I develop at the moment:
Templates using Bootstrap and K2 have a fundamental issue with the a tag in the image block of item.php. Because it uses the class of 'modal', the main item image of K2 will disappear: a.modal in Bootstrap has 'display: none;' set.
So as mentioned in an earlier post there are a couple of simple solutions:
1) Don't need the article image to be a modal?
Override the item.php template and remove the 'a' tag surrounding the item image.
2) Need modals, and are happy with the K2 modal?
Search all css files in your template for .modal - if it's based on Bootstrap, you'll find it in bootstrap.css, bootstrap.min.css or a combined.css file, depending on how the template authors have setup the template.
3) Need modals, but want to use the Bootstrap modal system throughout the site?
This is where it gets a bit trickier because you'll really need to disable the K2 modal system.
To do this I do the following:
- Override item.php with the necessary Bootstrap equivalent modal code
- Disable K2 css, jquery and any other options in K2 preferences - bear in mind this means you'll need to create the template styles yourself
- Disable Mootools by using the Mootools Enable/Disable plugin
- Strip out the SqueezeBox script in the site header which K2 instansiates and with Mootools gone will now cause js errors
The first step is the most complicated bit and if you're not comfortable with template overrides then you should probably avoid option #3 entirely. Get it right however and you can have all of your media in Bootstrap modals and strip out redundant systems.
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
8 years 9 months ago #146257
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic K2 Item Image Big Problem
@Kelsey Brookes
Thank you for sharing this small guide. The class modal is an issue but we really cannot decide to change the class in the current K2 version. It will break people's sites that are already using the class in their overrides with the core Joomla! modal script.
Thank you for sharing this small guide. The class modal is an issue but we really cannot decide to change the class in the current K2 version. It will break people's sites that are already using the class in their overrides with the core Joomla! modal script.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Kelsey Brookes
- Offline
- Elite Member
8 years 8 months ago #146275
by Kelsey Brookes
Replied by Kelsey Brookes on topic K2 Item Image Big Problem
Yeah, I know - I definitely agree that backwards compatibility for the current version series is a priority.
What I would love to see, if there were to be a K2 2.7, is an option in parameters to turn off K2's instansiation of SqueezeBox, just like we can choose not to load k2.css or jQuery. Existing sites maintain backwards compatibility while the rest of us can override to our heart's content without jumping through hoops.
For me it's really Squeezebox that causes the most headaches, usually generating errors that causes other JS to fail because it's instansiated near the top of the document. ReReplacer can get rid of it, but it's a bit hit-and-miss.
What I would love to see, if there were to be a K2 2.7, is an option in parameters to turn off K2's instansiation of SqueezeBox, just like we can choose not to load k2.css or jQuery. Existing sites maintain backwards compatibility while the rest of us can override to our heart's content without jumping through hoops.
For me it's really Squeezebox that causes the most headaches, usually generating errors that causes other JS to fail because it's instansiated near the top of the document. ReReplacer can get rid of it, but it's a bit hit-and-miss.
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
8 years 8 months ago #146285
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic K2 Item Image Big Problem
That's a very good idea. Would you mind create an issue for this on the repository on GitHub at github.com/joomlaworks/k2 ?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Kelsey Brookes
- Offline
- Elite Member
8 years 8 months ago #146306
by Kelsey Brookes
Replied by Kelsey Brookes on topic K2 Item Image Big Problem
Please Log in or Create an account to join the conversation.