Keyword

Advanced Search

Search Results (Searched for: extra field order)

  • Justin Thomas
  • Justin Thomas's Avatar
08 Apr 2012 23:33
Replied by Justin Thomas on topic Extra fields won't show in the front end using JCE

Extra fields won't show in the front end using JCE

Category: English K2 Community

OK. So far no responses. Well, it was Sunday when I posted, so I have done a little more work and still no change.

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
  • Leonard's Avatar
08 Apr 2012 15:03
Replied by Leonard on topic how to insert an "Extra Field"?

how to insert an "Extra Field"?

Category: English K2 Community

Hello,

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
  • Leonard's Avatar
06 Apr 2012 19:12
Replied by Leonard on topic how to insert an "Extra Field"?

how to insert an "Extra Field"?

Category: English K2 Community

I have done what you have told me. Thank you. Now please look at the attachment. how to practically insert that field. I don't see any insert button, nothing. How to make it appear in "content" in order to play with it, or where I supposed to see it. I really don't understand the mechanism. Please put some light in my thinking.
Thank you,

Leonard
  • Oren Wassersprung
  • Oren Wassersprung's Avatar
03 Apr 2012 16:43 - 05 Apr 2012 14:40
Searchable labels does not show any results was created by Oren Wassersprung

Searchable labels does not show any results

Category: English K2 Community

searchable labels does not show any results.
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
  • Arpeggio's Avatar
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
  • phegam's Avatar
23 Mar 2012 16:37

Event manager with a "start date as an extra field

Category: English K2 Community

Hello,

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
  • Diego's Avatar
20 Mar 2012 09:38

Extra Filds Alphabetical Order Values

Category: English K2 Community

Hi All,

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
  • Ania's Avatar
14 Mar 2012 09:20
Re: Extra field values - ordering was created by Ania

Re: Extra field values - ordering

Category: English K2 Community

I have some extra fields which are drop down lists. The default values are numbers. There's no problem if I put the numbers from lower to higher. Unfortunately, I have many situations when I have to add a number which is lower then the previous ones i.e. I have values 1000, 2000, 3000 and when I need to add 500 it goes to the end of the values and when I save changes in the extra field the 500 doesn't go to the beginning of the values but it is still at the bottom of the list. It caues problems while creating an item but first of all it makes the K2 Extra fields Filter & Search module doesn't work correctly: the items with lower numbers stand at the end and when some one is looking for the items with values from 0 to 1000, the item with 500 won't show up because on the drop down list of the extra field it stands after 3000.

That's why I wonder if it's possible the numbers are ordered automatically from the lowest to the highest ones ?
  • Andrey Miasoedov
  • Andrey Miasoedov's Avatar
10 Mar 2012 04:22
Replied by Andrey Miasoedov on topic Extra field values - ordering

Extra field values - ordering

Category: English K2 Community

Ania,

The default values ordering should not be affected in ordering by extrafields or what problems you are experiencing?
  • Ania
  • Ania's Avatar
09 Mar 2012 08:41
Replied by Ania on topic Extra field values - ordering

Extra field values - ordering

Category: English K2 Community

Yes, I know I can order extra fields this way but what I need to do is to order the default values of an extra field. Is it possible ?
  • Aaron
  • Aaron's Avatar
08 Mar 2012 23:08
Replied by Aaron on topic Extra field values - ordering

Extra field values - ordering

Category: English K2 Community

you can order them in the admin side.. go to extra fields click on the word "order" at the top of the column and then select whichever order you need.

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
  • Ania's Avatar
08 Mar 2012 22:22
Extra field values - ordering was created by Ania

Extra field values - ordering

Category: English K2 Community

I've got the following problem with K2 extra fields:

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
  • Aaron's Avatar
04 Mar 2012 22:55
Replied by Aaron on topic Template help?

Template help?

Category: English K2 Community

William, et al,

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
  • Saulius's Avatar
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
  • Leah Maderal's Avatar
14 Feb 2012 13:12
K2 Query causing CPU overload on server was created by Leah Maderal

K2 Query causing CPU overload on server

Category: English K2 Community

GoDaddy shut down the site weddingsinplaya.com because this query is causing massive CPU load on the server. I have it back online temporarily.

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
  • Dimitris Dimokas's Avatar
12 Feb 2012 15:08
item.php customization was created by Dimitris Dimokas

item.php customization

Category: English K2 Community

I have make this changes to my item.php file because I wanted to have the additional info beside of the article image:


____________________________________________________________________________________________
<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
  • Josh's Avatar
08 Feb 2012 16:07

related articles by via tag output by extra fields

Category: English K2 Community

Hi all,
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
  • Saulius's Avatar
07 Feb 2012 13:50 - 07 Feb 2012 14:15
K2, JoomFish and the "Fatal error" was created by Saulius

K2, JoomFish and the "Fatal error"

Category: English K2 Community

Hello, everyone @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:

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

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:

<?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;
}
}
?>

Line number 18 I think is function translationK2_categoryFilter($contentElement)


What could be the problem...?
I would really appreciate your help!
  • Matthew Tollin
  • Matthew Tollin's Avatar
30 Dec 2011 21:14
issues w my k2 admin menus was created by Matthew Tollin

issues w my k2 admin menus

Category: English K2 Community

getting this error message. think a certain plug-in is causing things to go screwy..

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
  • ATHANASIOS ILIOPOULOS's Avatar
27 Dec 2011 08:04
Replied by ATHANASIOS ILIOPOULOS on topic Save k2 item - extra field translation (html code)

Save k2 item - extra field translation (html code)

Category: English K2 Community

Anyone has a similar problem? Or at least somebody that could do what i have described with NO problem? In order to check of it is a K2 and joomfish integration BUG or it is a specific installation problem...
Displaying 361 - 380 out of 529 results.