COMMUNITY FORUM
Search Results (Searched for: extra field order)
- Justin Thomas
Extra fields won't show in the front end using JCE
Category: English K2 Community
I have:
Switched off ALL js calls together and one-by-one. No change.
Switched off the editor (user manager --> user --> no editor). No change.
Switched the loading order to push k2.js down under the loading of the googleapis. No change.
Made a normal menu item (my user menu is a qlue panel) and switched off qlue panel. No change.
Tried to "Post a new item" from "My page". No change.
Still the same problem, not able to select a category.
This is quite confusing.
- Leonard
how to insert an "Extra Field"?
Category: English K2 Community
I consider should be made a movie in order to exactly see how this things are done. A video is going to be more than 1000 words. Is going to be great to have a video to see how to add a extra field, how to add a picture and to apply hislide feature, a movie to show as different scenarios about what you can make with K2 from scratch to the final product.
Regards,
Leonard
- Leonard
how to insert an "Extra Field"?
Category: English K2 Community
Thank you,
Leonard
- Oren Wassersprung
Searchable labels does not show any results
Category: English K2 Community
does someone has a clue? do i miss something?
i'ts on my localhost.
joomla 2.5
K2: cant find version, but latest ( 1 week old)
Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1
PHP version 5.3.8
MySQL version 5.5.16
all k2 plugins are installed and enabled
scanned the whole system, scanned the code... everything looks fine.
I suspect this code for that problem: components\com_k2\models\item.php
- Arpeggio
28 Mar 2012 13:28 k2 v.2.5.5 (com_k2/models/item.php) bug was created by Arpeggio k2 v.2.5.5 (com_k2/models/item.php) bug
Category: English K2 Community
Hi all,
this is my first post and sorry for my english :( ....
btw working on new Joomla 2.5.3 and K2 v.2.5.5 something goes wrong.
Seem in com_k2/models/item.php in getItemExtraFields in line:
if($value) {
$rows[$i]->value = $value;
}
else {
unset($rows[$i]);
unset row at $i is ok but indexing go wrong so last item is skipped
my solution is on change
$query="SELECT * FROM #__k2_extra_fields WHERE published=1 AND id IN ({$condition}) ORDER BY ordering ASC";
$db->setQuery($query);
$rows = $db->loadObjectList();
for ($i=0; $i<sizeof($rows); $i++){
$value='';
in
$query="SELECT * FROM #__k2_extra_fields WHERE published=1 AND id IN ({$condition}) ORDER BY ordering ASC";
$db->setQuery($query);
$rows = $db->loadObjectList();
$rows_size=sizeof($rows);
for ($i=0; $i<$rows_size; $i++){
$value='';
- phegam
Event manager with a "start date as an extra field
Category: English K2 Community
i'm trying to create an event manager with K2 for my Website.
For the moment i set the creation article date as the event "start date", but using this way, the past articles are still displayed and i can't order my articles from today to the future.
I would like to create an extra field, but if i do that :
- how can i sort my events using this field
- how can i display only the "today" and "future" events
By advance thanks a lot for your help.
- Diego
Extra Filds Alphabetical Order Values
Category: English K2 Community
I need to put the value list in alphabetical order, example
(Extra field: news sources/values/names)
...Terra
...G1
...National Geographic
...The guardian
could someone guide me?
This is my first post. thank you
- Ania
Re: Extra field values - ordering
Category: English K2 Community
That's why I wonder if it's possible the numbers are ordered automatically from the lowest to the highest ones ?
- Andrey Miasoedov
Extra field values - ordering
Category: English K2 Community
The default values ordering should not be affected in ordering by extrafields or what problems you are experiencing?
- Ania
Extra field values - ordering
Category: English K2 Community
- Aaron
Extra field values - ordering
Category: English K2 Community
You will not be able to change the ID of the extra field through ordering. Those are written in the database and are unique IDs for the field.
- Ania
Extra field values - ordering
Category: English K2 Community
I have several extra fields where I need to put number values. I create i.e. an extra field (drop-down list or multi select list) called "lenght" . I put put 100, 200, etc. but then when I need to add i.e. 30 it goes to the end of the values list. It means the values aren't ordered and I need them to be ordered.Otherwise, when I leave it at the end, the K2 Extra fields Filter & Search doesn't work properly.
I can't use text fileds. They must be a list.
Is there any way the values are ordered automatically ?
- Aaron
Template help?
Category: English K2 Community
I figured it out!
Summary:
The extra fields will display (if present) along with their appropriate labels. When you break down the extra fields into individual components to rearrange, A new array had to be built in order to display the labels and names AND hid the labels if the fields were empty.
Solution:
1. Create the ID and Label Arrays:
- Saulius
26 Feb 2012 15:39 Replied by Saulius on topic Layout problems: Chrome Vs. Firefox Layout problems: Chrome Vs. Firefox
Category: English K2 Community
My dear friend William,
I think that's the problem - when I set the padding in Firefox it affects padding in Chrome, but still the image and extra fields are not correctly aligned. If you notice I have set the margin-top to -1087px. It seems that Chrome and Firefox treats the top of page differently. The same margin-top value in Chrome displays Extra fields a bit higher than it does in Firefox. In order to have this custom layout (extra fields to right of image) I manually customized K2.css file and although left and right padding/margin seems to work just fine, the TOP margin function doesn't.
I'm lost here.... :dry:
- Leah Maderal
K2 Query causing CPU overload on server
Category: English K2 Community
Since it looks like it has something to do with K2, I thought you might have some advice on how to clear this up.
Thanks.
Problematic query:
SELECT i.title AS title,
i.metadesc,
i.metakey,
c.name as section,
i.image_caption,
i.image_credits,
i.video_caption,
i.video_credits,
i.extra_fields_search,
i.created,
CONCAT(i.introtext, i.fulltext) AS text,
CASE WHEN CHAR_LENGTH(i.alias) THEN CONCAT_WS(':', i.id, i.alias) ELSE i.id END as slug,
CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as catslug
FROM boda_k2_items AS i
INNER JOIN boda_k2_categories AS c ON c.id=i.catid AND c.access IN(1,1)
WHERE (MATCH(i.title, i.introtext, i.`fulltext`,i.extra_fields_search,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.metadesc,i.metakey) AGAINST ('??alert(203)*' IN BOOLEAN MODE)
)
AND i.trash = 0
AND i.published = 1
AND i.access IN(1,1)
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 <= '2012-02-10 10:56:18' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2012-02-10 10:56:18' )
GROUP BY i.id ORDER BY i.created DESC LIMIT 0, 50
EXPLAIN:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE i fulltext item,catid,search search 0 1 Using where; Using temporary; Using filesort
1 SIMPLE c eq_ref PRIMARY,category,published,access,trash PRIMARY 4 bodas2012.i.catid 1 Using where
- Dimitris Dimokas
item.php customization
Category: English K2 Community
____________________________________________________________________________________________
<table style=" text-align: left; width: 100%;" border="0" cellpadding="0" cellspacing="2">
<tr>
<td style=" vertical-align: top;">
<!-- image block start -->
<!-- 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>
<br>
</td>
<td style="vertical-align: top; width: 100%;">
<!-- image block end -->
<!-- extra fields block start -->
<!-- Item extra fields -->
<div class="itemExtraFields">
<?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; ?>">
<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
<span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
</li>
<?php endif; ?>
<?php endforeach; ?>
<div class="clr"></div>
</div>
<!-- extra fields block end -->
<br>
</td>
</tr>
</table>
___________________________________________________________________________________________
BUT
It works except of the case that I have not upload an image for an article. When I do't have an image then the additional info fields are not visible.
I'm not a html developer us you can see and I'm trying to build a site for my store.
- Josh
related articles by via tag output by extra fields
Category: English K2 Community
Ok so I know this might be a bit tricky to follow but please be patient with me as I think other might be interested in this idea too.
My website has main "listings" which are obviously k2 items and all items related to the current items are displayed via the related items plugin at the bottom the item page. Items displayed here are not filtered by category rather it searches all categories for related items with any matching tags and displays it.
Now what i would like to achieve it this,
Each "listing" needs to have a news and events "module" and each of these modules should pull up all items (within a specified category) related to the current item, the thing is i would like to select the specific tag it pulls the related items from.
So in an ideal world i would have each "listing" with it's two "modules" inside the article.
One for news and one for events. Each "module" should then select the tag id or name from k2's extra fields and display only items with that tag and from within a specific category.
Now the tricky part, in order to tell each "module" which tag to use i though it might be possible to add 2 extra fields to k2 ie one for Events Tag Name and News Tag Name, so that for each article i create i can specify in the extra field which tag to use for each "modules" related items.
Is there a way I would output extra fields ie a tag id or name and insert that tag id or name into a "module" within the item view which then display relevant items filtered from specific categories? For each "module" the category id or name to filter tags by could just be hard coded into the "module" for now because those two categories wont change much but obviously this additional feature may allow for extra extendability later on.
I have managed to find a way to "print" extra fields values individually wherever i like on an item page but cant figure out how to use this data in conjunction with some kind of "mod" which can use those fields (which in my case would be specific tags)
For now all i am looking to do is create the two "modules", select in each article the tags id or name to uses and then send that id or name to the module to pull display matching items filtered within a specific category.
I know this is doable using existing modules however then I would have to create real modules for each article and load then via loadposition or similar but this would result in way to many modules so i am looking for a way to "build" this function on the page on the fly.
Anybody got any advice or pointers or had a similar problem ? Any assistance would be much appreciated.
This is the last real hurdle to overcome to make this new project of ours really work powerfully.
Thanks for any input in advance!
Josh
- Saulius
K2, JoomFish and the "Fatal error"
Category: English K2 Community
to be honest I'm not that new to K2 itself - I have already build three sites with K2 integrated in the content. All of them work fine. However, I faced this problem the other night while trying to make K2 work with Joomfish. Had some problems with JoomFish not seeing K2 realted stuff but managed to sort that out after reading this post here: community.getk2.org/forum/topics/joomfish-and-k2-how-do-they I did exactly as Olivier Nolbert suggested:
After doing that I'm able to see and translate all things related to K2 (inc. K2 extra fileds, K2 categories, etc.) except K2 Items. That's a problem coz that's what I need to translate... After going to components/Joom!Fish/Translation in joomla admin and choosing the language and (Content elements) K2 Items from the drop-down menu I get the following error Fatal error: Call to undefined method translationFilter::translationFilter() in /home/angrupe/domains/iseta.lt/public_html/administrator/components/com_joomfish/contentelements/translationK2_categoryFilter.php on line 18. None of that happens when I choose for example K2 Categories from the same drop-down menus. Here's how the above mention php file looks like:Hi,
If you've installed JoomFish after K2, and don't want to make a full K2 update, just unzip the K2 zip install file in local and copy/upload all files under "/administrator/components/com_joomfish/contentelements" in the same directory on your website.
Olivier
Line number 18 I think is function translationK2_categoryFilter($contentElement)<?php
/**
* @version $Id: translationK2_categoryFilter.php 1034 2011-10-04 17:00:00Z joomlaworks $
* @package K2
* @author JoomlaWorks www.joomlaworks.gr
* @copyright Copyright (c) 2006 - 2010 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: www.gnu.org/copyleft/gpl.html
*/
// Don't allow direct linking
defined( 'JPATH_BASE' ) or die( 'Direct Access to this location is not allowed.' );
class translationK2_categoryFilter extends translationFilter {
function translationK2_categoryFilter($contentElement) {
$this->filterNullValue = -1;
$this->filterType = "catid";
$this->filterField = $contentElement->getFilter("K2_category");
parent::translationFilter($contentElement);
}
function _createFilter() {
$database = &JFactory::getDBO();
if (!$this->filterField)
return "";
$filter = "";
if ($this->filter_value != $this->filterNullValue) {
$sql = "SELECT tab.id FROM #__k2_items as tab WHERE tab.catid=$this->filter_value";
$database->setQuery($sql);
$ids = $database->loadObjectList();
$idstring = "";
foreach ($ids as $pid) {
if (strlen($idstring) > 0)
$idstring .= ",";
$idstring .= $pid->id;
}
$filter = "c.id IN($idstring)";
}
return $filter;
}
function _createfilterHTML() {
if (!$this->filterField)
return "";
$db = &JFactory::getDBO();
$categoryOptions = array();
$categoryOptions[] = JHTML::_('select.option', '-1', JText::_('K2_SELECT_CATEGORY'));
$sql = "SELECT DISTINCT p.id, p.name FROM #__k2_categories as p, #__".$this->tableName." as c WHERE c.".$this->filterField."=p.id ORDER BY p.name";
$db->setQuery($sql);
$cats = $db->loadObjectList();
$catcount = 0;
foreach ($cats as $cat) {
$categoryOptions[] = JHTML::_('select.option', $cat->id, $cat->name);
$catcount++;
}
$catnameList = array();
$catnameList["title"] = JText::_('K2_CATEGORIES');
$catnameList["html"] = JHTML::_('select.genericlist', $categoryOptions, 'catid_filter_value', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'value', 'text', $this->filter_value);
return $catnameList;
}
}
?>
What could be the problem...?
I would really appreciate your help!
- Matthew Tollin
issues w my k2 admin menus
Category: English K2 Community
TableK2Category: :store failed
Table 'JB_Newstream.ukbtg_k2_categories' doesn't exist SQL=INSERT INTO `ukbtg_k2_categories` (`id`,`name`,`alias`,`description`,`parent`,`published`,`access`,`ordering`,`params`,`language`) VALUES ('','K2 plug in modules','k2-plug-in-modules','','0','1','1','','{\"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\":\"\"}','*')
- ATHANASIOS ILIOPOULOS
Save k2 item - extra field translation (html code)
Category: English K2 Community