K2 is a wonderful CCK and content replacement for the standard joomla content. In fact I am using it with k2mart to create some awesome shopping cart goodnes. Of course the shopping cart I am converting from is a Custom CMS/E-commerce system that has tons of custom html pieces in the product buy now pages.
Specifically I needed the ability to choose several custom messages that have little html to open new windows, highlight messages etc.
There are community links for an older version of k2 here
These don't work in the latest so here is an updated working html hax for K2 v2.4.1!
Open up Administrator/components/com_k2/models/extrafield.php
//line 32 if (!$row->bind(JRequest::get('post'))) //around line 53 look for $objects = array (); $values = JRequest::getVar('option_value'); $names = JRequest::getVar('option_name');
Replace with the following (if you have questions see documentation)
//line 32 - replaced if (!$row->bind(JRequest::get('post',JREQUEST_ALLOWHTML))) //around line 53 - replaced $objects = array (); $values = JRequest::getVar('option_value','','post','string',JREQUEST_ALLOWRAW); $names = JRequest::getVar('option_name','','post','string',JREQUEST_ALLOWRAW);




15 comments:
Hi I'm try your solution but nothing change.
I only need to change the extrafield.php ?
Thanks!
This hack doesn't work for me either.
When I make changes I lost my wysiwyg editor in content tab, also there is still just textarea in custom fields tab.
I'm using K2 2.4.1, Joomla 1.5.22 and JCE Editor 1.5.7.11.
This hack just adds the ability to save html in the custom fields it does not show the editor
worked great thanks - now I can add a reference to a video icon for videos like this:
Video
Now The text 'Video' appears in the admin dropdown but the class none will make it disappear on the site so only the icon shows. I use this in conjunction with the K2 Content wall module that can call the specific field and your good to go.
Hello what would be solution for K2 2.5.5 version on Joomls 2.5
This works great, I'm using Joomla! 2.5.4, K2 version 2.5.6
Thanks!
for me it's not working! tell me plz what to do?
What version of k2 and Joomla are you using? Can you send me the copy of your extrafield.php file
/components/com_k2/models/extrafield.php
info AT codepyro.com
I am using last version with joomla 2.5.6 extrafield.php I can send tomorrow. But i did everything like u said changed 32 line and 51 (it wasn't 53 in my file ) so but nothing happened
ew how to send u my Extrafield.php file??? it's more than 4.096 chars... tell me mail or something maybe?
Yea, zip and email it. Email typically blocks php files.
info AT codepyro.com is my addy
Thank you! Work perfect!
Your are awesome!!
Thank you very much!!
It works perfectly!!! Thank you very much <3
Spot on with this write-up, I seriously believe this site needs far more attention. I'll
probably be returning to see more, thanks for the advice!
Post a Comment