Keyword

Advanced Search

Search Results (Searched for: extra field order)

  • Kelsey Brookes
  • Kelsey Brookes's Avatar
19 Mar 2013 04:23
Replied by Kelsey Brookes on topic Sorting extrafield select or multiselect by names

Sorting extrafield select or multiselect by names

Category: English K2 Community

K2 Devs, I've just used this hack on yet another website.

This is a problem that I've seen asked numerous times across the forum and seems a bit of a fundamental problem. If you can't re-order the extra fields manually (which would also be good) then at least being able to order alphabetically is critical.
  • Periklis
  • Periklis's Avatar
18 Mar 2013 20:17
Replied by Periklis on topic Extra Fields more Columns...

Extra Fields more Columns...

Category: English K2 Community

I am afraid this is not only appearance issue. It is more complicated. The administrator should have the option to add extra columns in the item editing options and these extra options should be saved in database.

The how-to procedure in order to appear these options from the database, seems more easy to be accomplished.
  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
16 Mar 2013 09:11
Replied by Mohamed Abdelaziz on topic Copy/Import Large Number of Categories

Copy/Import Large Number of Categories

Category: English K2 Community

This is possible by importing them directly into database.

assume that the Id of CategoryA is A, and Id of CategoryB is B
INSERT INTO `#_k2_categories`( `name`, `alias`, `description`, `parent`, `extraFieldsGroup`, `published`, `access`, `ordering`, `image`, `params`, `trash`, `plugins`, `language`) SELECT `name`, `alias`, `description`, B, `extraFieldsGroup`, `published`, `access`, `ordering`, `image`, `params`, `trash`, `plugins`, `language` FROM `#_k2_categories` WHERE `parent` = A

Make sure to replace:
A with CategoryA id
B with CategoryB id
# with your database suffix
  • Scott Lavelle
  • Scott Lavelle's Avatar
06 Mar 2013 14:31
Replied by Scott Lavelle on topic K2 making site very slow - please help

K2 making site very slow - please help

Category: English K2 Community

Sawan,

I used the information from the K2 blog about how to get the values of specific fields rather than the whole list of extra fields. So I used this code in place of what's there. The only real differences are that 1. It creates an html table rather than an unordered list and 2. It specifies the fields individually rather than iterating over the whole list of fields (even though in this case I actually use all of the values, which allows the individual placement. I'm sure you could probably use the iterative loop to load the html table too if you wanted to use all the fields - this was just clearer to me. Here's the code:
<tr> <?php echo "<td>" . htmlspecialchars($item->extraFields->EventName->value) . "</td>"; ?> <?php echo "<td>" . $item->extraFields->Eventdate->value . ", " . $item->extraFields->EventTime->value ."</td>"; ?> <?php echo "<td>" . $item->extraFields->EventLocation->value . "</td>"; ?> <?php echo "<td>" . $item->extraFields->HomeAway->value . "</td>"; ?> <?php echo "<td>" . $item->extraFields->Results->value . "</td>"; ?> </tr>

Hope that helps.
  • Ralf Longwitz
  • Ralf Longwitz's Avatar
01 Mar 2013 15:27 - 01 Mar 2013 15:28
Sorting Extra fields - J!3.0 was created by Ralf Longwitz

Sorting Extra fields - J!3.0

Category: English K2 Community

Hi,

We have quite a few extra fields, spreading over 4 pages. Unfortunately, the number of fields shown on a page cannot be changed (why?).

Apparently the only way to order fields is by drag&drop. (why?)

Now we need to move fields on the top of the list, page one, to the end of the list, page 4. How?

Thanks!

(J!3.0.3, K2 2.6.5)
  • victorwooten
  • victorwooten's Avatar
23 Feb 2013 14:02
Replied by victorwooten on topic migrating problems

migrating problems

Category: English K2 Community

i did the migration from the beginning again and this time completely manually. (without using SP upgrade for the database).

but i have the same error.

i even cant save any k2 content/items/tags....
there is following error:

TableK2Category: :store fehlgeschlagen!
Unknown column 'language' in 'field list' SQL=UPDATE `ug25_k2_categories` SET `name`='Skillgames',`alias`='skillgames',`description`='',`parent`='0',`extraFieldsGroup`='1',`published`='1',`access`='1',`params`='{\"inheritFrom\":\"0\",\"theme\":\"\",\"num_leading_items\":\"2\",\"num_leading_columns\":\"1\",\"leadingImgSize\":\"Large\",\"num_primary_items\":\"4\",\"num_primary_columns\":\"2\",\"primaryImgSize\":\"Medium\",\"num_secondary_items\":\"4\",\"num_secondary_columns\":\"1\",\"secondaryImgSize\":\"Small\",\"num_links\":\"4\",\"num_links_columns\":\"1\",\"linksImgSize\":\"XSmall\",\"catCatalogMode\":\"0\",\"catFeaturedItems\":\"1\",\"catOrdering\":\"\",\"catPagination\":\"2\",\"catPaginationResults\":\"1\",\"catTitle\":\"1\",\"catTitleItemCounter\":\"1\",\"catDescription\":\"1\",\"catImage\":\"1\",\"catFeedLink\":\"1\",\"catFeedIcon\":\"1\",\"subCategories\":\"1\",\"subCatColumns\":\"2\",\"subCatOrdering\":\"\",\"subCatTitle\":\"1\",\"subCatTitleItemCounter\":\"1\",\"subCatDescription\":\"1\",\"subCatImage\":\"1\",\"itemImageXS\":\"\",\"itemImageS\":\"\",\"itemImageM\":\"\",\"itemImageL\":\"\",\"itemImageXL\":\"\",\"catItemTitle\":\"1\",\"catItemTitleLinked\":\"1\",\"catItemFeaturedNotice\":\"0\",\"catItemAuthor\":\"1\",\"catItemDateCreated\":\"1\",\"catItemRating\":\"0\",\"catItemImage\":\"1\",\"catItemIntroText\":\"1\",\"catItemIntroTextWordLimit\":\"\",\"catItemExtraFields\":\"0\",\"catItemHits\":\"0\",\"catItemCategory\":\"1\",\"catItemTags\":\"1\",\"catItemAttachments\":\"0\",\"catItemAttachmentsCounter\":\"0\",\"catItemVideo\":\"0\",\"catItemVideoWidth\":\"\",\"catItemVideoHeight\":\"\",\"catItemAudioWidth\":\"\",\"catItemAudioHeight\":\"\",\"catItemVideoAutoPlay\":\"0\",\"catItemImageGallery\":\"0\",\"catItemDateModified\":\"0\",\"catItemReadMore\":\"1\",\"catItemCommentsAnchor\":\"1\",\"catItemK2Plugins\":\"1\",\"itemDateCreated\":\"1\",\"itemTitle\":\"1\",\"itemFeaturedNotice\":\"1\",\"itemAuthor\":\"1\",\"itemFontResizer\":\"1\",\"itemPrintButton\":\"1\",\"itemEmailButton\":\"1\",\"itemSocialButton\":\"1\",\"itemVideoAnchor\":\"1\",\"itemImageGalleryAnchor\":\"1\",\"itemCommentsAnchor\":\"1\",\"itemRating\":\"1\",\"itemImage\":\"1\",\"itemImgSize\":\"Large\",\"itemImageMainCaption\":\"1\",\"itemImageMainCredits\":\"1\",\"itemIntroText\":\"1\",\"itemFullText\":\"1\",\"itemExtraFields\":\"1\",\"itemDateModified\":\"1\",\"itemHits\":\"1\",\"itemCategory\":\"1\",\"itemTags\":\"1\",\"itemAttachments\":\"1\",\"itemAttachmentsCounter\":\"1\",\"itemVideo\":\"1\",\"itemVideoWidth\":\"\",\"itemVideoHeight\":\"\",\"itemAudioWidth\":\"\",\"itemAudioHeight\":\"\",\"itemVideoAutoPlay\":\"0\",\"itemVideoCaption\":\"1\",\"itemVideoCredits\":\"1\",\"itemImageGallery\":\"1\",\"itemNavigation\":\"1\",\"itemComments\":\"1\",\"itemTwitterButton\":\"1\",\"itemFacebookButton\":\"1\",\"itemGooglePlusOneButton\":\"1\",\"itemAuthorBlock\":\"1\",\"itemAuthorImage\":\"1\",\"itemAuthorDescription\":\"1\",\"itemAuthorURL\":\"1\",\"itemAuthorEmail\":\"0\",\"itemAuthorLatest\":\"1\",\"itemAuthorLatestLimit\":\"5\",\"itemRelated\":\"1\",\"itemRelatedLimit\":\"5\",\"itemRelatedTitle\":\"1\",\"itemRelatedCategory\":\"0\",\"itemRelatedImageSize\":\"0\",\"itemRelatedIntrotext\":\"0\",\"itemRelatedFulltext\":\"0\",\"itemRelatedAuthor\":\"0\",\"itemRelatedMedia\":\"0\",\"itemRelatedImageGallery\":\"0\",\"itemK2Plugins\":\"1\",\"catMetaDesc\":\"\",\"catMetaKey\":\"\",\"catMetaRobots\":\"\",\"catMetaAuthor\":\"\"}',`language`='*' WHERE `id`='1'


any advice would be great.
thanks.
  • BEtrained
  • BEtrained's Avatar
18 Feb 2013 14:26

Display One extrafield in backoff. list items

Category: English K2 Community

In the list items backoffice view I would like to display the value of one K2 extrafields among the classical fields like titles, order, state... in an additional column, and that in order to control rapidly the existing value of that extrafiled.

An advice ?
  • Pellegrino Lippiello
  • Pellegrino Lippiello's Avatar
18 Feb 2013 11:01 - 18 Feb 2013 11:01
Error Adding new Articles was created by Pellegrino Lippiello

Error Adding new Articles

Category: English K2 Community

Hi to everyone,

i have a problem: when i Try to add a new article , it is not possible to add because there is this error:

TableK2Item::store failed - Duplicate entry '0' for key 'PRIMARY' SQL=INSERT INTO `jos_k2_items` ( `id`,`title`,`alias`,`catid`,`published`,`introtext`,`fulltext`,`image_caption`,`image_credits`,`video_caption`,`video_credits`,`created`,`created_by`,`created_by_alias`,`publish_up`,`publish_down`,`access`,`ordering`,`featured`,`metadata`,`metadesc`,`metakey`,`params` ) VALUES ( '','prov','prov','21','1','\r\n prrr
','','','','','','2013-02-17 10:10:28','62','','2013-02-17 10:10:28','0000-00-00 00:00:00','0','7','0','robots=\nauthor=','','','catItemTitle=\ncatItemTitleLinked=\ncatItemFeaturedNotice=\ncatItemAuthor=\ncatItemDateCreated=\ncatItemRating=\ncatItemImage=\ncatItemIntroText=\ncatItemExtraFields=\ncatItemHits=\ncatItemCategory=\ncatItemTags=\ncatItemAttachments=\ncatItemAttachmentsCounter=\ncatItemVideo=\ncatItemVideoWidth=\ncatItemVideoHeight=\ncatItemAudioWidth=\ncatItemAudioHeight=\ncatItemVideoAutoPlay=\ncatItemImageGallery=\ncatItemDateModified=\ncatItemReadMore=\ncatItemCommentsAnchor=\ncatItemK2Plugins=\nitemDateCreated=\nitemTitle=\nitemFeaturedNotice=\nitemAuthor=\nitemFontResizer=\nitemPrintButton=\nitemEmailButton=\nitemSocialButton=\nitemVideoAnchor=\nitemImageGalleryAnchor=\nitemCommentsAnchor=\nitemRating=\nitemImage=\nitemImgSize=\nitemImageMainCaption=\nitemImageMainCredits=\nitemIntroText=\nitemFullText=\nitemExtraFields=\nitemDateModified=\nitemHits=\nitemCategory=\nitemTags=\nitemAttachments=\nitemAttachmentsCounter=\nitemVideo=\nitemVideoWidth=\nitemVideoHeight=\nitemAudioWidth=\nitemAudioHeight=\nitemVideoAutoPlay=\nitemVideoCaption=\nitemVideoCredits=\nitemImageGallery=\nitemNavigation=\nitemComments=\nitemTwitterButton=\nitemFacebookButton=\nitemGooglePlusOneButton=\nitemAuthorBlock=\nitemAuthorImage=\nitemAuthorDescription=\nitemAuthorURL=\nitemAuthorEmail=\nitemAuthorLatest=\nitemAuthorLatestLimit=\nitemRelated=\nitemRelatedLimit=\nitemRelatedTitle=\nitemRelatedCategory=\nitemRelatedImageSize=\nitemRelatedIntrotext=\nitemRelatedFulltext=\nitemRelatedAuthor=\nitemRelatedMedia=\nitemRelatedImageGallery=\nitemK2Plugins=\n\n' )


How can i solve it?

Thanks
  • Marco van der Ziel
  • Marco van der Ziel's Avatar
16 Feb 2013 16:09
Replied by Marco van der Ziel on topic Extra field values - ordering

Extra field values - ordering

Category: English K2 Community

I think this is not possible. Maybe they can put this option in a newer version of K2. It's not do-able to remove all items first to place a new option.
  • Christian Rerucha
  • Christian Rerucha's Avatar
15 Feb 2013 18:02
Too many open database connections... was created by Christian Rerucha

Too many open database connections...

Category: English K2 Community

Hello. I am new to this forum, and I really have never posted in one before, so please forgive me if I am in the wrong place, or I am proceeding inappropriately here.

Anyway, We have a joomla 2.5.7 website. We have just 3 third party extensions:

1. K2
2. Breezing Forms
3. Akeeba Backup (which is currently NOT set up to back up automatically)

Almost every Friday morning at about 2:30 am (PST), our database is flooded with SQL requests, coming from our site. At 200 simultaneous connections, the database is automatically shut down (godaddy), and from that point forward, I have to call godaddy, have them manually close all the connections to the database, and essentially "Restart" the the database.

This ha been happening like clockwork for the last six months. Godaddy has not been helpful, nor forthcoming with information to assist in the "hunt" for the problem... until today. This morning, they were able to give me a clue. The following SQL request seems to be the culprit:

SELECT i.* ,
CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged ,
c.name as categoryname ,
c.id as categoryid ,
c.alias as categoryalias ,
c.params as categoryparams
FROM jos_k2_items as i LEFT JOIN jos_k2_categories AS c ON c.id = i.catid
WHERE i.published = 1 AND
i.access IN(1 , 1 ) AND
i.trash = 0 AND
c.published = 1 AND
c.access IN(1 , 1 ) AND
c.trash = 0 AND
( i.publish_up = '0000-00-00 00:00:00' OR
i.publish_up <= '2013-02-15 10:22:34' ) AND
( i.publish_down = '0000-00-00 00:00:00' OR
i.publish_down >= '2013-02-15 10:22:34' ) AND
MATCH(i.title ,
i.introtext ,
i.`fulltext` ,
i.image_caption ,
i.image_credits ,
i.video_caption ,
i.video_credits ,
i.extra_fields_search ,
i.metadesc ,
i.metakey) AGAINST ('Search...*' IN BOOLEAN MODE)
ORDER BY i.id DESC
LIMIT 0 , 10

So, let's start here. Is there any help you can give me? Does this code (or COULD this code) have anything to do with the "Too many connections" error that throws our site offline?

P.S. If I need to be posting this question somewhere else, please direct me to do so. As I said, I'm new this this whole forum thing. Apologies...
  • jean-philippe
  • jean-philippe's Avatar
14 Feb 2013 13:22
Replied by jean-philippe on topic Tabs re-order

Tabs re-order

Category: English K2 Community

Hi Karlo Woditzka,

you need to modify the Core k2.

If you do that, you need to change this after each update....

the file that you need to modify is :

[/administrator/components/com_k2/views/item/tmpl/default.php]

the line is: 190 - 192
 
  • Karlo Woditzka
  • Karlo Woditzka's Avatar
14 Feb 2013 05:45
Tabs re-order was created by Karlo Woditzka

Tabs re-order

Category: English K2 Community

How can I change the order of tabs in a form for entering content?
I wish my Extra Fields tab in the first place.
  • Jonas Reggelin
  • Jonas Reggelin's Avatar
08 Feb 2013 21:59
Replied by Jonas Reggelin on topic Extra field values - ordering

Extra field values - ordering

Category: English K2 Community

Can noebody help?
  • xaoc
  • xaoc's Avatar
07 Feb 2013 16:10 - 07 Feb 2013 16:12
Replied by xaoc on topic Is it possible to override generic.php?

Is it possible to override generic.php?

Category: English K2 Community

Thanks! I was successful by including of tags into generic.php. But by including of rating and extra fields i fail. Would you please help me with?

Here is the code includign tags into generic.php for those who is looking for:) Add this to your generic.php at the place, where you want see your tags. They will appear like unordered list
 
  • andrea
  • andrea's Avatar
30 Jan 2013 09:22
Order extra filed in K2 2.5.7 was created by andrea

Order extra filed in K2 2.5.7

Category: English K2 Community

hi guys.. i have about 30 extra fileds and i would like order in beck-end but if i set in the beck-end i need set too php and there is many confusion... is there other way more easy to order the extra field without update to k2 2.6?
  • Kelsey Brookes
  • Kelsey Brookes's Avatar
30 Jan 2013 03:26
Replied by Kelsey Brookes on topic Extra field values - ordering

Extra field values - ordering

Category: English K2 Community

Has there been any kind of solution to this?

I've got a very long list of extra field options in a multi-select with no discernable order due to the nature of the field's growth.

Deleting and re-adding is not an option.
  • william white
  • william white's Avatar
29 Jan 2013 22:48
Replied by william white on topic Override order of items in item view.

Override order of items in item view.

Category: English K2 Community

if 2.6.2 rename this code to item.php and place it into your override
Compare the two files for differences
<?php /** * @version $Id: item.php 1766 2012-11-22 14:10:24Z lefteris.kavadas $ * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2006 - 2012 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html */ // no direct access defined('_JEXEC') or die; ?> <?php if(JRequest::getInt('print')==1): ?> <!-- Print button at the top of the print page only --> <a class="itemPrintThisPage" rel="nofollow" href="#" onclick="window.print();return false;"> <span><?php echo JText::_('K2_PRINT_THIS_PAGE'); ?></span> </a> <?php endif; ?> <!-- Start K2 Item Layout --> <span id="startOfPageId<?php echo JRequest::getInt('id'); ?>"></span> <div id="k2Container" class="itemView<?php echo ($this->item->featured) ? ' itemIsFeatured' : ''; ?><?php if($this->item->params->get('pageclass_sfx')) echo ' '.$this->item->params->get('pageclass_sfx'); ?>"> <!-- Plugins: BeforeDisplay --> <?php echo $this->item->event->BeforeDisplay; ?> <!-- K2 Plugins: K2BeforeDisplay --> <?php echo $this->item->event->K2BeforeDisplay; ?> <div class="itemHeader"> <?php if($this->item->params->get('itemDateCreated')): ?> <!-- Date created --> <span class="itemDateCreated"> <?php echo JHTML::_('date', $this->item->created , JText::_('K2_DATE_FORMAT_LC2')); ?> </span> <?php endif; ?> <?php if($this->item->params->get('itemTitle')): ?> <!-- Item title --> <h2 class="itemTitle"> <?php if(isset($this->item->editLink)): ?> <!-- Item edit link --> <span class="itemEditLink"> <a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>"> <?php echo JText::_('K2_EDIT_ITEM'); ?> </a> </span> <?php endif; ?> <?php echo $this->item->title; ?> <?php if($this->item->params->get('itemFeaturedNotice') && $this->item->featured): ?> <!-- Featured flag --> <span> <sup> <?php echo JText::_('K2_FEATURED'); ?> </sup> </span> <?php endif; ?> </h2> <?php endif; ?> <?php if($this->item->params->get('itemAuthor')): ?> <!-- Item Author --> <span class="itemAuthor"> <?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>&nbsp; <?php if(empty($this->item->created_by_alias)): ?> <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a> <?php else: ?> <?php echo $this->item->author->name; ?> <?php endif; ?> </span> <?php endif; ?> </div> <!-- Plugins: AfterDisplayTitle --> <?php echo $this->item->event->AfterDisplayTitle; ?> <!-- K2 Plugins: K2AfterDisplayTitle --> <?php echo $this->item->event->K2AfterDisplayTitle; ?> <?php if( $this->item->params->get('itemFontResizer') || $this->item->params->get('itemPrintButton') || $this->item->params->get('itemEmailButton') || $this->item->params->get('itemSocialButton') || $this->item->params->get('itemVideoAnchor') || $this->item->params->get('itemImageGalleryAnchor') || $this->item->params->get('itemCommentsAnchor') ): ?> <div class="itemToolbar"> <ul> <?php if($this->item->params->get('itemFontResizer')): ?> <!-- Font Resizer --> <li> <span class="itemTextResizerTitle"><?php echo JText::_('K2_FONT_SIZE'); ?></span> <a href="#" id="fontDecrease"> <span><?php echo JText::_('K2_DECREASE_FONT_SIZE'); ?></span> <img src="<?php echo JURI::root(true); ?>/components/com_k2/images/system/blank.gif" alt="<?php echo JText::_('K2_DECREASE_FONT_SIZE'); ?>" /> </a> <a href="#" id="fontIncrease"> <span><?php echo JText::_('K2_INCREASE_FONT_SIZE'); ?></span> <img src="<?php echo JURI::root(true); ?>/components/com_k2/images/system/blank.gif" alt="<?php echo JText::_('K2_INCREASE_FONT_SIZE'); ?>" /> </a> </li> <?php endif; ?> <?php if($this->item->params->get('itemPrintButton') && !JRequest::getInt('print')): ?> <!-- Print Button --> <li> <a class="itemPrintLink" rel="nofollow" href="<?php echo $this->item->printLink; ?>" onclick="window.open(this.href,'printWindow','width=900,height=600,location=no,menubar=no,resizable=yes,scrollbars=yes'); return false;"> <span><?php echo JText::_('K2_PRINT'); ?></span> </a> </li> <?php endif; ?> <?php if($this->item->params->get('itemEmailButton') && !JRequest::getInt('print')): ?> <!-- Email Button --> <li> <a class="itemEmailLink" rel="nofollow" href="<?php echo $this->item->emailLink; ?>" onclick="window.open(this.href,'emailWindow','width=400,height=350,location=no,menubar=no,resizable=no,scrollbars=no'); return false;"> <span><?php echo JText::_('K2_EMAIL'); ?></span> </a> </li> <?php endif; ?> <?php if($this->item->params->get('itemSocialButton') && !is_null($this->item->params->get('socialButtonCode', NULL))): ?> <!-- Item Social Button --> <li> <?php echo $this->item->params->get('socialButtonCode'); ?> </li> <?php endif; ?> <?php if($this->item->params->get('itemVideoAnchor') && !empty($this->item->video)): ?> <!-- Anchor link to item video below - if it exists --> <li> <a class="itemVideoLink k2Anchor" href="<?php echo $this->item->link; ?>#itemVideoAnchor"><?php echo JText::_('K2_MEDIA'); ?></a> </li> <?php endif; ?> <?php if($this->item->params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)): ?> <!-- Anchor link to item image gallery below - if it exists --> <li> <a class="itemImageGalleryLink k2Anchor" href="<?php echo $this->item->link; ?>#itemImageGalleryAnchor"><?php echo JText::_('K2_IMAGE_GALLERY'); ?></a> </li> <?php endif; ?> <?php if($this->item->params->get('itemCommentsAnchor') && $this->item->params->get('itemComments') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?> <!-- Anchor link to comments below - if enabled --> <li> <?php if(!empty($this->item->event->K2CommentsCounter)): ?> <!-- K2 Plugins: K2CommentsCounter --> <?php echo $this->item->event->K2CommentsCounter; ?> <?php else: ?> <?php if($this->item->numOfComments > 0): ?> <a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor"> <span><?php echo $this->item->numOfComments; ?></span> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?> </a> <?php else: ?> <a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor"> <?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?> </a> <?php endif; ?> <?php endif; ?> </li> <?php endif; ?> </ul> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemRating')): ?> <!-- Item Rating --> <div class="itemRatingBlock"> <span><?php echo JText::_('K2_RATE_THIS_ITEM'); ?></span> <div class="itemRatingForm"> <ul class="itemRatingList"> <li class="itemCurrentRating" id="itemCurrentRating<?php echo $this->item->id; ?>" style="width:<?php echo $this->item->votingPercentage; ?>%;"></li> <li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_1_STAR_OUT_OF_5'); ?>" class="one-star">1</a></li> <li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_2_STARS_OUT_OF_5'); ?>" class="two-stars">2</a></li> <li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_3_STARS_OUT_OF_5'); ?>" class="three-stars">3</a></li> <li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_4_STARS_OUT_OF_5'); ?>" class="four-stars">4</a></li> <li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_5_STARS_OUT_OF_5'); ?>" class="five-stars">5</a></li> </ul> <div id="itemRatingLog<?php echo $this->item->id; ?>" class="itemRatingLog"><?php echo $this->item->numOfvotes; ?></div> <div class="clr"></div> </div> <div class="clr"></div> </div> <?php endif; ?> <div class="itemBody"> <!-- Plugins: BeforeDisplayContent --> <?php echo $this->item->event->BeforeDisplayContent; ?> <!-- K2 Plugins: K2BeforeDisplayContent --> <?php echo $this->item->event->K2BeforeDisplayContent; ?> <?php if($this->item->params->get('itemImage') && !empty($this->item->image)): ?> <!-- Item Image --> <div class="itemImageBlock"> <span class="itemImage"> <a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>"> <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" /> </a> </span> <?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?> <!-- Image caption --> <span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span> <?php endif; ?> <?php if($this->item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?> <!-- Image credits --> <span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span> <?php endif; ?> <div class="clr"></div> </div> <?php endif; ?> <?php if(!empty($this->item->fulltext)): ?> <?php if($this->item->params->get('itemIntroText')): ?> <!-- Item introtext --> <div class="itemIntroText"> <?php echo $this->item->introtext; ?> </div> <?php endif; ?> <?php if($this->item->params->get('itemFullText')): ?> <!-- Item fulltext --> <div class="itemFullText"> <?php echo $this->item->fulltext; ?> </div> <?php endif; ?> <?php else: ?> <!-- Item text --> <div class="itemFullText"> <?php echo $this->item->introtext; ?> </div> <?php endif; ?> <div class="clr"></div> <?php if($this->item->params->get('itemVideo') && !empty($this->item->video)): ?> <!-- Item video --> <a name="itemVideoAnchor" id="itemVideoAnchor"></a> <div class="itemVideoBlock"> <h3><?php echo JText::_('K2_MEDIA'); ?></h3> <?php if($this->item->videoType=='embedded'): ?> <div class="itemVideoEmbedded"> <?php echo $this->item->video; ?> </div> <?php else: ?> <span class="itemVideo"><?php echo $this->item->video; ?></span> <?php endif; ?> <?php if($this->item->params->get('itemVideoCaption') && !empty($this->item->video_caption)): ?> <span class="itemVideoCaption"><?php echo $this->item->video_caption; ?></span> <?php endif; ?> <?php if($this->item->params->get('itemVideoCredits') && !empty($this->item->video_credits)): ?> <span class="itemVideoCredits"><?php echo $this->item->video_credits; ?></span> <?php endif; ?> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?> <!-- Item extra fields --> <div class="itemExtraFields"> <h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3> <ul> <?php foreach ($this->item->extra_fields as $key=>$extraField): ?> <?php if($extraField->value != ''): ?> <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>"> <?php if($extraField->type == 'header'): ?> <h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4> <?php else: ?> <span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span> <span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span> <?php endif; ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemHits') || ($this->item->params->get('itemDateModified') && intval($this->item->modified)!=0)): ?> <div class="itemContentFooter"> <?php if($this->item->params->get('itemHits')): ?> <!-- Item Hits --> <span class="itemHits"> <?php echo JText::_('K2_READ'); ?> <b><?php echo $this->item->hits; ?></b> <?php echo JText::_('K2_TIMES'); ?> </span> <?php endif; ?> <?php if($this->item->params->get('itemDateModified') && intval($this->item->modified)!=0): ?> <!-- Item date modified --> <span class="itemDateModified"> <?php echo JText::_('K2_LAST_MODIFIED_ON'); ?> <?php echo JHTML::_('date', $this->item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?> </span> <?php endif; ?> <div class="clr"></div> </div> <?php endif; ?> <!-- Plugins: AfterDisplayContent --> <?php echo $this->item->event->AfterDisplayContent; ?> <!-- K2 Plugins: K2AfterDisplayContent --> <?php echo $this->item->event->K2AfterDisplayContent; ?> <div class="clr"></div> </div> <?php if($this->item->params->get('itemTwitterButton',1) || $this->item->params->get('itemFacebookButton',1) || $this->item->params->get('itemGooglePlusOneButton',1)): ?> <!-- Social sharing --> <div class="itemSocialSharing"> <?php if($this->item->params->get('itemTwitterButton',1)): ?> <!-- Twitter Button --> <div class="itemTwitterButton"> <a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal"<?php if($this->item->params->get('twitterUsername')): ?> data-via="<?php echo $this->item->params->get('twitterUsername'); ?>"<?php endif; ?>> <?php echo JText::_('K2_TWEET'); ?> </a> <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script> </div> <?php endif; ?> <?php if($this->item->params->get('itemFacebookButton',1)): ?> <!-- Facebook Button --> <div class="itemFacebookButton"> <div id="fb-root"></div> <script type="text/javascript"> (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <div class="fb-like" data-send="false" data-width="200" data-show-faces="true"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemGooglePlusOneButton',1)): ?> <!-- Google +1 Button --> <div class="itemGooglePlusOneButton"> <g:plusone annotation="inline" width="120"></g:plusone> <script type="text/javascript"> (function() { window.___gcfg = {lang: 'en'}; // Define button default language here var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script> </div> <?php endif; ?> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemCategory') || $this->item->params->get('itemTags') || $this->item->params->get('itemAttachments')): ?> <div class="itemLinks"> <?php if($this->item->params->get('itemCategory')): ?> <!-- Item category --> <div class="itemCategory"> <span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span> <a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a> </div> <?php endif; ?> <?php if($this->item->params->get('itemTags') && count($this->item->tags)): ?> <!-- Item tags --> <div class="itemTagsBlock"> <span><?php echo JText::_('K2_TAGGED_UNDER'); ?></span> <ul class="itemTags"> <?php foreach ($this->item->tags as $tag): ?> <li><a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a></li> <?php endforeach; ?> </ul> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemAttachments') && count($this->item->attachments)): ?> <!-- Item attachments --> <div class="itemAttachmentsBlock"> <span><?php echo JText::_('K2_DOWNLOAD_ATTACHMENTS'); ?></span> <ul class="itemAttachments"> <?php foreach ($this->item->attachments as $attachment): ?> <li> <a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo $attachment->link; ?>"><?php echo $attachment->title; ?></a> <?php if($this->item->params->get('itemAttachmentsCounter')): ?> <span>(<?php echo $attachment->hits; ?> <?php echo ($attachment->hits==1) ? JText::_('K2_DOWNLOAD') : JText::_('K2_DOWNLOADS'); ?>)</span> <?php endif; ?> </li> <?php endforeach; ?> </ul> </div> <?php endif; ?> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemAuthorBlock') && empty($this->item->created_by_alias)): ?> <!-- Author Block --> <div class="itemAuthorBlock"> <?php if($this->item->params->get('itemAuthorImage') && !empty($this->item->author->avatar)): ?> <img class="itemAuthorAvatar" src="<?php echo $this->item->author->avatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->author->name); ?>" /> <?php endif; ?> <div class="itemAuthorDetails"> <h3 class="itemAuthorName"> <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a> </h3> <?php if($this->item->params->get('itemAuthorDescription') && !empty($this->item->author->profile->description)): ?> <p><?php echo $this->item->author->profile->description; ?></p> <?php endif; ?> <?php if($this->item->params->get('itemAuthorURL') && !empty($this->item->author->profile->url)): ?> <span class="itemAuthorUrl"><?php echo JText::_('K2_WEBSITE'); ?> <a rel="me" href="<?php echo $this->item->author->profile->url; ?>" target="_blank"><?php echo str_replace('http://','',$this->item->author->profile->url); ?></a></span> <?php endif; ?> <?php if($this->item->params->get('itemAuthorEmail')): ?> <span class="itemAuthorEmail"><?php echo JText::_('K2_EMAIL'); ?> <?php echo JHTML::_('Email.cloak', $this->item->author->email); ?></span> <?php endif; ?> <div class="clr"></div> <!-- K2 Plugins: K2UserDisplay --> <?php echo $this->item->event->K2UserDisplay; ?> </div> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemAuthorLatest') && empty($this->item->created_by_alias) && isset($this->authorLatestItems)): ?> <!-- Latest items from author --> <div class="itemAuthorLatest"> <h3><?php echo JText::_('K2_LATEST_FROM'); ?> <?php echo $this->item->author->name; ?></h3> <ul> <?php foreach($this->authorLatestItems as $key=>$item): ?> <li class="<?php echo ($key%2) ? "odd" : "even"; ?>"> <a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a> </li> <?php endforeach; ?> </ul> <div class="clr"></div> </div> <?php endif; ?> <?php /* Note regarding 'Related Items'! If you add: - the CSS rule 'overflow-x:scroll;' in the element div.itemRelated {…} in the k2.css - the class 'k2Scroller' to the ul element below - the classes 'k2ScrollerElement' and 'k2EqualHeights' to the li element inside the foreach loop below - the style attribute 'style="width:<?php echo $item->imageWidth; ?>px;"' to the li element inside the foreach loop below ...then your Related Items will be transformed into a vertical-scrolling block, inside which, all items have the same height (equal column heights). This can be very useful if you want to show your related articles or products with title/author/category/image etc., which would take a significant amount of space in the classic list-style display. */ ?> <?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?> <!-- Related items by tag --> <div class="itemRelated"> <h3><?php echo JText::_("K2_RELATED_ITEMS_BY_TAG"); ?></h3> <ul> <?php foreach($this->relatedItems as $key=>$item): ?> <li class="<?php echo ($key%2) ? "odd" : "even"; ?>"> <?php if($this->item->params->get('itemRelatedTitle', 1)): ?> <a class="itemRelTitle" href="<?php echo $item->link ?>"><?php echo $item->title; ?></a> <?php endif; ?> <?php if($this->item->params->get('itemRelatedCategory')): ?> <div class="itemRelCat"><?php echo JText::_("K2_IN"); ?> <a href="<?php echo $item->category->link ?>"><?php echo $item->category->name; ?></a></div> <?php endif; ?> <?php if($this->item->params->get('itemRelatedAuthor')): ?> <div class="itemRelAuthor"><?php echo JText::_("K2_BY"); ?> <a rel="author" href="<?php echo $item->author->link; ?>"><?php echo $item->author->name; ?></a></div> <?php endif; ?> <?php if($this->item->params->get('itemRelatedImageSize')): ?> <img style="width:<?php echo $item->imageWidth; ?>px;height:auto;" class="itemRelImg" src="<?php echo $item->image; ?>" alt="<?php K2HelperUtilities::cleanHtml($item->title); ?>" /> <?php endif; ?> <?php if($this->item->params->get('itemRelatedIntrotext')): ?> <div class="itemRelIntrotext"><?php echo $item->introtext; ?></div> <?php endif; ?> <?php if($this->item->params->get('itemRelatedFulltext')): ?> <div class="itemRelFulltext"><?php echo $item->fulltext; ?></div> <?php endif; ?> <?php if($this->item->params->get('itemRelatedMedia')): ?> <?php if($item->videoType=='embedded'): ?> <div class="itemRelMediaEmbedded"><?php echo $item->video; ?></div> <?php else: ?> <div class="itemRelMedia"><?php echo $item->video; ?></div> <?php endif; ?> <?php endif; ?> <?php if($this->item->params->get('itemRelatedImageGallery')): ?> <div class="itemRelImageGallery"><?php echo $item->gallery; ?></div> <?php endif; ?> </li> <?php endforeach; ?> <li class="clr"></li> </ul> <div class="clr"></div> </div> <?php endif; ?> <div class="clr"></div> <?php if($this->item->params->get('itemImageGallery') && !empty($this->item->gallery)): ?> <!-- Item image gallery --> <a name="itemImageGalleryAnchor" id="itemImageGalleryAnchor"></a> <div class="itemImageGallery"> <h3><?php echo JText::_('K2_IMAGE_GALLERY'); ?></h3> <?php echo $this->item->gallery; ?> </div> <?php endif; ?> <?php if($this->item->params->get('itemNavigation') && !JRequest::getCmd('print') && (isset($this->item->nextLink) || isset($this->item->previousLink))): ?> <!-- Item navigation --> <div class="itemNavigation"> <span class="itemNavigationTitle"><?php echo JText::_('K2_MORE_IN_THIS_CATEGORY'); ?></span> <?php if(isset($this->item->previousLink)): ?> <a class="itemPrevious" href="<?php echo $this->item->previousLink; ?>"> &laquo; <?php echo $this->item->previousTitle; ?> </a> <?php endif; ?> <?php if(isset($this->item->nextLink)): ?> <a class="itemNext" href="<?php echo $this->item->nextLink; ?>"> <?php echo $this->item->nextTitle; ?> &raquo; </a> <?php endif; ?> </div> <?php endif; ?> <!-- Plugins: AfterDisplay --> <?php echo $this->item->event->AfterDisplay; ?> <!-- K2 Plugins: K2AfterDisplay --> <?php echo $this->item->event->K2AfterDisplay; ?> <?php if($this->item->params->get('itemComments') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1'))): ?> <!-- K2 Plugins: K2CommentsBlock --> <?php echo $this->item->event->K2CommentsBlock; ?> <?php endif; ?> <?php if($this->item->params->get('itemComments') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2')) && empty($this->item->event->K2CommentsBlock)): ?> <!-- Item comments --> <a name="itemCommentsAnchor" id="itemCommentsAnchor"></a> <div class="itemComments"> <?php if($this->item->params->get('commentsFormPosition')=='above' && $this->item->params->get('itemComments') && !JRequest::getInt('print') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2' && K2HelperPermissions::canAddComment($this->item->catid)))): ?> <!-- Item comments form --> <div class="itemCommentsForm"> <?php echo $this->loadTemplate('comments_form'); ?> </div> <?php endif; ?> <?php if($this->item->numOfComments>0 && $this->item->params->get('itemComments') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2'))): ?> <!-- Item user comments --> <h3 class="itemCommentsCounter"> <span><?php echo $this->item->numOfComments; ?></span> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?> </h3> <ul class="itemCommentsList"> <?php foreach ($this->item->comments as $key=>$comment): ?> <li class="<?php echo ($key%2) ? "odd" : "even"; echo (!$this->item->created_by_alias && $comment->userID==$this->item->created_by) ? " authorResponse" : ""; echo($comment->published) ? '':' unpublishedComment'; ?>"> <span class="commentLink"> <a href="<?php echo $this->item->link; ?>#comment<?php echo $comment->id; ?>" name="comment<?php echo $comment->id; ?>" id="comment<?php echo $comment->id; ?>"> <?php echo JText::_('K2_COMMENT_LINK'); ?> </a> </span> <?php if($comment->userImage): ?> <img src="<?php echo $comment->userImage; ?>" alt="<?php echo JFilterOutput::cleanText($comment->userName); ?>" width="<?php echo $this->item->params->get('commenterImgWidth'); ?>" /> <?php endif; ?> <span class="commentDate"> <?php echo JHTML::_('date', $comment->commentDate, JText::_('K2_DATE_FORMAT_LC2')); ?> </span> <span class="commentAuthorName"> <?php echo JText::_('K2_POSTED_BY'); ?> <?php if(!empty($comment->userLink)): ?> <a href="<?php echo JFilterOutput::cleanText($comment->userLink); ?>" title="<?php echo JFilterOutput::cleanText($comment->userName); ?>" target="_blank" rel="nofollow"> <?php echo $comment->userName; ?> </a> <?php else: ?> <?php echo $comment->userName; ?> <?php endif; ?> </span> <p><?php echo $comment->commentText; ?></p> <?php if($this->inlineCommentsModeration || ($comment->published && ($this->params->get('commentsReporting')=='1' || ($this->params->get('commentsReporting')=='2' && !$this->user->guest)))): ?> <span class="commentToolbar"> <?php if($this->inlineCommentsModeration): ?> <?php if(!$comment->published): ?> <a class="commentApproveLink" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=publish&commentID='.$comment->id.'&format=raw')?>"><?php echo JText::_('K2_APPROVE')?></a> <?php endif; ?> <a class="commentRemoveLink" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=remove&commentID='.$comment->id.'&format=raw')?>"><?php echo JText::_('K2_REMOVE')?></a> <?php endif; ?> <?php if($comment->published && ($this->params->get('commentsReporting')=='1' || ($this->params->get('commentsReporting')=='2' && !$this->user->guest))): ?> <a class="modal" rel="{handler:'iframe',size:{x:560,y:480}}" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=report&commentID='.$comment->id)?>"><?php echo JText::_('K2_REPORT')?></a> <?php endif; ?> <?php if($comment->reportUserLink): ?> <a class="k2ReportUserButton" href="<?php echo $comment->reportUserLink; ?>"><?php echo JText::_('K2_FLAG_AS_SPAMMER'); ?></a> <?php endif; ?> </span> <?php endif; ?> <div class="clr"></div> </li> <?php endforeach; ?> </ul> <div class="itemCommentsPagination"> <?php echo $this->pagination->getPagesLinks(); ?> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('commentsFormPosition')=='below' && $this->item->params->get('itemComments') && !JRequest::getInt('print') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2' && K2HelperPermissions::canAddComment($this->item->catid)))): ?> <!-- Item comments form --> <div class="itemCommentsForm"> <?php echo $this->loadTemplate('comments_form'); ?> </div> <?php endif; ?> <?php $user = JFactory::getUser(); if ($this->item->params->get('comments') == '2' && $user->guest): ?> <div><?php echo JText::_('K2_LOGIN_TO_POST_COMMENTS'); ?></div> <?php endif; ?> </div> <?php endif; ?> <?php if(!JRequest::getCmd('print')): ?> <div class="itemBackToTop"> <a class="k2Anchor" href="<?php echo $this->item->link; ?>#startOfPageId<?php echo JRequest::getInt('id'); ?>"> <?php echo JText::_('K2_BACK_TO_TOP'); ?> </a> </div> <?php endif; ?> <div class="clr"></div> </div> <!-- End K2 Item Layout -->
  • jean-philippe
  • jean-philippe's Avatar
17 Jan 2013 15:15
Extra_Field strip html code was created by jean-philippe

Extra_Field strip html code

Category: English K2 Community

Hi everyOne,

I'm currently to use K2 and i've add some extra field...

but when i'm try to put Html code in the "default Case" when I create 1 textField...
it's automatically strip...

i don't found the
 
  • ATHANASIOS ILIOPOULOS
  • ATHANASIOS ILIOPOULOS's Avatar
13 Jan 2013 22:58 - 13 Jan 2013 22:59
k2 extra field translation not working for default was created by ATHANASIOS ILIOPOULOS

k2 extra field translation not working for default

Category: English K2 Community

Hello Guys,

i have an issue that is going to destroy my mind ... i am not a PHP developer so i can not find any way to solve it...

I am using K2 (v 2.5.7) for CCK (with alotof custom templates) and Joomfish (2.1.7) deployed on a Joomla 1.5.26 installation.

I am using the following code (in my templates) in order to fetch my individual k2 extra fields by name:
$extraFld = array(); if ( $this->item->extra_fields ) { foreach ( $this->item->extra_fields as $key=>$extraField ) { $extraFld[ $extraField->name ] = $extraField->value; } }

and then i fetch it like this:
echo "<li class=\"dinning-cuisine\"><span>" . JText::_('Cuisine') . "</span><br />" . $extraFld['Cuisine'] . "</li>\n";

The problem is that if i TRANSLATE the extra field Cuisine (to Greek (default) and English) the default language translation DISAPPEARS (see below)

Attachment not found




while the English one works fine!

Attachment not found




Any ideas what is causing this weird behavior??

Please see attached screenshots...
  • Aleš
  • Aleš's Avatar
03 Jan 2013 08:22 - 03 Jan 2013 08:28

Sorting extrafield select or multiselect by names

Category: English K2 Community

I find it very annoying that when you have select or multiselect extrafield, they get sorted by index (meaning in order list values were added) instead of names.

To solve this, I've used little hack.

In file /administrator/components/com_k2/models/extrafield.php I have changed code starting from line 323: