Keyword

Advanced Search

Search Results (Searched for: Joomla K2 user extra fields)

  • John Dunstan
  • John Dunstan's Avatar
04 Mar 2014 12:21
Replied by John Dunstan on topic Sorry K2

Sorry K2

Category: English K2 Community

Fotis,

I have done nothing but say what I have been reading and seeing for the last 12 or more months about K2...and the JoomlArt thing is completely correct.

With all this said, I can see why you get defensive, as you've just announced V3...Which is definitely needed!

I can say that I am now personally going to hold off on 'any other solutions that I may have mentioned', in anticipation of K2 v3.

As i said, i am a k2 lover, and the whole time while building a site with EasyBlog, I kept wanting to go back to K2...but since their hadn't been many major changes for a long time, and the big boys starting to support EasyBlog, it seemed time to change....Hell, If JoomlArt decide its time to change, they must know more than I do right?

Either way, these proposed changes will more than likely keep me with k2 :cheer:

One thing though, i really wish K2 was an integration within Joomla Articles...Using K2 for everything is great, but it kinda defeats the purpose of having Joomla Articles in the first place.. I would assume K2 was born out of the pore Joomla artciles system in 1.0 and 1.5, but Joomla 3 articles are good, especially now that we have tags in Joomla 3....this would be one of my big wishes, i also say this as all my clients struggle to see why they need K2 when Joomla articles 'seems (to them at least) similar to K2 (yes i agree its different, but these are my clients who pay my bills :).

K2 3 looks great, more so looking forward to K2 3.1...

2 more things:

1) I always seem to have a need to build business directory's were different 'fields' (k2 extra fields) need to be shown or hidden to clients in frontend editing based on the joomla user group they are (IE: they have subscribed to gold, silver, or bronze package and each package will give subscribers access to different K2 extra fields). Not many Joomla directory softwares can even achieve this, without modification...so if K2 could do this, there seriously would be no need for the directory softwares that are available for Joomla right now

2) the new k2 2.6.8 has the new innoDB...You said that existing sites wont be upgraded to this. Could you advise how we can upgrade existing sites to use innoDB? I have a few projects in development using K2 and a couple of recently live sites that would benefit from this.

Great work..i do hope that anyone who has gone away from K2 does come back now with the new version about to come out...i would also be more than happy to help alpha / beta test it..
  • Sylvias
  • Sylvias's Avatar
13 Feb 2014 21:03 - 15 Feb 2014 03:42
How to Execute Remote API Methods? was created by Sylvias

How to Execute Remote API Methods?

Category: English K2 Community

Hi K2 Engineers and Community!

I hadn't been here in a while, but now I am back! I wanted been trying unsuccessfully to find information as to how to send CRUD (Create, Read, Update, Delete {and Search too!}) remote API methods for K2 items, categories, users, roles, groups etc.,

1- Can anyone point me to the right direction because it is possible, right?

2- How do I even authenticate my request? I've never even done this with joomla articles...

2- Anything I should know about with custom extra fields, batch actions and/or limitations?

3- If there is no documentation for this and if you quickly show me how to do it--I will make it a point to create a rather dashing "K2 Remote API CRUD Methods Table" with some nifty explanations that could be used for the official K2 Documentation with the head columns below, so the our K2 Community will always benefit from it!

"Useful Purpose, Action Method, URL, CRUD(s) Request Type, Data Expected, Possible Response Codes, Response Properties"

Thank you!

Sylvia
  • Beate Schrader
  • Beate Schrader's Avatar
07 Feb 2014 13:16
K2 useable for creating portal? was created by Beate Schrader

K2 useable for creating portal?

Category: English K2 Community

Hello,

I'm trying to realize a user portal for step-by-step construction manuals. The manuals have to be written by the logged in users. For inserting the manuals text I made some extra fields for the several steps of tutorial. For each step text field I need the possibility to upload an image directly from the users computer.

So I began trying K2 for that and first it looks like the ideal component. But then I failed withe the extra field Image. This only allows to upload the image via mediamanager. But the users should not have access to all images on the server. I wanted to create it like the image tab in the joomla article so that users can't select the directory and the file-size for the image.

As a best solution I would prefer a workaround like this:
  • user is generating the article with only some of all details
  • user is referring to a new form for insert the several steps
  • while uploading he first image for a step it will be generated an image directory for this article
  • all images that will be uploaded will automaticly be stored in that directory


Do this sounds very complicated? Is that generally possible with K2 or is it better to choose another CCK?

Many thanks for spending time for my issue and kind regards
Beate
  • Tim
  • Tim's Avatar
22 Jan 2014 23:48

Image extra field not empty once value is deleted

Category: English K2 Community

Hi Yiota

I tried that code and also tested on Joomla 2.5.17 and K2.6.7 with no luck.

I do have two possible workarounds. One is similar to Steven's in the afore mentioned thread:
 
  • Dennis Miliopoulos
  • Dennis Miliopoulos's Avatar
26 Nov 2013 16:37
Replied by Dennis Miliopoulos on topic Pagination is not displayed in category list

Pagination is not displayed in category list

Category: English K2 Community

Same problem here!

I have disabled the custom category template and switched template but the pagination div is still empty.

This is the site ivoryhomeinteriors.com/en/living-room

Find the settings attached

I am using the default category.php and here's the altered category_item.php.
<?php /** * @version $Id: category_item.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $ * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html */ // no direct access defined('_JEXEC') or die; // Define default image size (do not change) K2HelperUtilities::setDefaultImage($this->item, 'itemlist', $this->params); ?> <!-- Start K2 Item Layout --> <div class="catItemView group<?php echo ucfirst($this->item->itemGroup); ?><?php echo ($this->item->featured) ? ' catItemIsFeatured' : ''; ?><?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="catItemHeader"> <?php if($this->item->params->get('catItemDateCreated')): ?> <!-- Date created --> <span class="catItemDateCreated"> <?php echo JHTML::_('date', $this->item->created , JText::_('K2_DATE_FORMAT_LC2')); ?> </span> <?php endif; ?> <?php if($this->item->params->get('catItemTitle')): ?> <?php if($this->item->params->get('catItemAuthor')): ?> <!-- Item Author --> <span class="catItemAuthor"> <?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?> <?php if(isset($this->item->author->link) && $this->item->author->link): ?> <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('catItemRating')): ?> <!-- Item Rating --> <div class="catItemRatingBlock"> <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="catItemBody"> <!-- Plugins: BeforeDisplayContent --> <?php echo $this->item->event->BeforeDisplayContent; ?> <!-- K2 Plugins: K2BeforeDisplayContent --> <?php echo $this->item->event->K2BeforeDisplayContent; ?> <?php if($this->item->params->get('catItemImage') && !empty($this->item->image)): ?> <!-- Item Image --> <div class="catItemImageBlockIvory"> <span class="catItemImage"> <a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>"> <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> <div class="clr"></div> </div> <?php endif; ?> <!-- Item title --> <h3 class="catItemTitle ivory" style="font-size:110%;"> <?php if(isset($this->item->editLink)): ?> <!-- Item edit link --> <span class="catItemEditLink"> <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 if ($this->item->params->get('catItemTitleLinked')): ?> <a href="<?php echo $this->item->link; ?>"> <?php echo $this->item->title; ?> </a> <?php else: ?> <?php echo $this->item->title; ?> <?php endif; ?> <?php if($this->item->params->get('catItemFeaturedNotice') && $this->item->featured): ?> <!-- Featured flag --> <span> <sup> <?php echo JText::_('K2_FEATURED'); ?> </sup> </span> <?php endif; ?> </h3> <?php endif; ?> <?php if($this->item->params->get('catItemIntroText')): ?> <!-- Item introtext --> <div class="catItemIntroText"> <?php echo $this->item->introtext; ?> </div> <?php endif; ?> <div class="clr"></div> <?php if($this->item->params->get('catItemExtraFields') && count($this->item->extra_fields)): ?> <!-- Item extra fields --> <div class="catItemExtraFields"> <h4><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h4> <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="catItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4> <?php else: ?> <span class="catItemExtraFieldsLabel"><?php echo $extraField->name; ?></span> <span class="catItemExtraFieldsValue"><?php echo $extraField->value; ?></span> <?php endif; ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <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('catItemHits') || $this->item->params->get('catItemCategory') || $this->item->params->get('catItemTags') || $this->item->params->get('catItemAttachments') ): ?> <div class="catItemLinks"> <?php if($this->item->params->get('catItemHits')): ?> <!-- Item Hits --> <div class="catItemHitsBlock"> <span class="catItemHits"> <?php echo JText::_('K2_READ'); ?> <b><?php echo $this->item->hits; ?></b> <?php echo JText::_('K2_TIMES'); ?> </span> </div> <?php endif; ?> <?php if($this->item->params->get('catItemCategory')): ?> <!-- Item category name --> <div class="catItemCategory"> <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('catItemTags') && count($this->item->tags)): ?> <!-- Item tags --> <div class="catItemTagsBlock"> <span><?php echo JText::_('K2_TAGGED_UNDER'); ?></span> <ul class="catItemTags"> <?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('catItemAttachments') && count($this->item->attachments)): ?> <!-- Item attachments --> <div class="catItemAttachmentsBlock"> <span><?php echo JText::_('K2_DOWNLOAD_ATTACHMENTS'); ?></span> <ul class="catItemAttachments"> <?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('catItemAttachmentsCounter')): ?> <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; ?> <div class="clr"></div> <?php if($this->item->params->get('catItemVideo') && !empty($this->item->video)): ?> <!-- Item video --> <div class="catItemVideoBlock"> <h3><?php echo JText::_('K2_RELATED_VIDEO'); ?></h3> <?php if($this->item->videoType=='embedded'): ?> <div class="catItemVideoEmbedded"> <?php echo $this->item->video; ?> </div> <?php else: ?> <span class="catItemVideo"><?php echo $this->item->video; ?></span> <?php endif; ?> </div> <?php endif; ?> <?php if($this->item->params->get('catItemImageGallery') && !empty($this->item->gallery)): ?> <!-- Item image gallery --> <div class="catItemImageGallery"> <h4><?php echo JText::_('K2_IMAGE_GALLERY'); ?></h4> <?php echo $this->item->gallery; ?> </div> <?php endif; ?> <div class="clr"></div> <?php if($this->item->params->get('catItemCommentsAnchor') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?> <!-- Anchor link to comments below --> <div class="catItemCommentsLink"> <?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 href="<?php echo $this->item->link; ?>#itemCommentsAnchor"> <?php echo $this->item->numOfComments; ?> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?> </a> <?php else: ?> <a href="<?php echo $this->item->link; ?>#itemCommentsAnchor"> <?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?> </a> <?php endif; ?> <?php endif; ?> </div> <?php endif; ?> <?php if ($this->item->params->get('catItemReadMore')): ?> <!-- Item "read more..." link --> <div class="catItemReadMore"> <a class="k2ReadMore" href="<?php echo $this->item->link; ?>"> <?php echo JText::_('K2_READ_MORE'); ?> </a> </div> <?php endif; ?> <div class="clr"></div> <?php if($this->item->params->get('catItemDateModified')): ?> <!-- Item date modified --> <?php if($this->item->modified != $this->nullDate && $this->item->modified != $this->item->created ): ?> <span class="catItemDateModified"> <?php echo JText::_('K2_LAST_MODIFIED_ON'); ?> <?php echo JHTML::_('date', $this->item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?> </span> <?php endif; ?> <?php endif; ?> <!-- Plugins: AfterDisplay --> <?php echo $this->item->event->AfterDisplay; ?> <!-- K2 Plugins: K2AfterDisplay --> <?php echo $this->item->event->K2AfterDisplay; ?> <div class="clr"></div> </div> <!-- End K2 Item Layout --> 
  • informaticien51
  • informaticien51's Avatar
24 Nov 2013 12:17 - 24 Nov 2013 12:19
Replied by informaticien51 on topic Modifier le template d'article K2

Modifier le template d'article K2

Category: Communauté française K2

voici le fichier demandé:
Vu que les pieces jointes ne fonctionnes pas, je copie le code du fichier ci dessous :
<?php /** * @version $Id: item.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $ * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2006 - 2013 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> <?php echo "categorie Joomla" ;?> <!-- 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; ?> <div class="clr"></div> <?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(!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; ?> <?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('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('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 -->
  • Sean
  • Sean's Avatar
19 Nov 2013 01:11 - 19 Nov 2013 01:12

Leverage Extra Fields for use with BreezingForms

Category: English K2 Community

I am working with Joomla v3.2, K2 v2.6.7 and Breezing Forms v1.84.

My end goal is to have a Contact form that injects specific Extra Fields into certain form fields (made with Breezing Forms). The reason for this is to create a dynamic form, that can be set once and edited from the Front-end Editing capabilities of K2.

I have an extra field of 'Email' where a user enters the email address of where the contact should be sent upon submission. I need to pass the saved value for 'Email' into my form field. I attempted the following:
 
  • Steven Johnson
  • Steven Johnson's Avatar
11 Nov 2013 15:48 - 11 Nov 2013 15:49

[SOLVED] "User Extra Fields" for Joomla 3 for customization

Category: English K2 Community

Thanks so much for posting this, I wished I had seen the post sooner.

Everything seems to work fine on 3.1.5 site

I was able to install your modified package on a Joomla 3.2 site.

I get this error when the plugin is enabled.
 
  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
08 Nov 2013 18:59
Replied by Krikor Boghossian on topic Hiding Attachments or Extra Fields based on User L

Hiding Attachments or Extra Fields based on User L

Category: English K2 Community

You can Joomla!'s API to hide or show elements in a K2 template

eg. forum.joomla.org/viewtopic.php?p=2725146

Just make sure $user is not initialy defined in the K2 template as well.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
08 Nov 2013 13:41
Replied by Krikor Boghossian on topic A Directory site that users submit its entries

A Directory site that users submit its entries

Category: English K2 Community

For the advanced search funtionality you will have to develop a custom component.

The other functionality can be done with K2, You simply have to use extrafields and core Joomla! functions for the user/guest check.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
24 Oct 2013 12:53
Replied by Krikor Boghossian on topic [SOLVED] image upload and extra fields required

[SOLVED] image upload and extra fields required

Category: English K2 Community

$document = & JFactory::getDocument(); $document->addScriptDeclaration(" Joomla.submitbutton = function(pressbutton){ if (pressbutton == 'cancel') { submitform( pressbutton ); return; } if (\$K2.trim(\$K2('#title').val()) == '') { alert( '".JText::_('K2_ITEM_MUST_HAVE_A_TITLE', true)."' ); } else if (\$K2.trim(\$K2('#catid').val()) == '0') { alert( '".JText::_('K2_PLEASE_SELECT_A_CATEGORY', true)."' ); } else if( \$K2('.fileUpload').val() == '') { alert('No image selected'); return false; } else { syncExtraFieldsEditor(); \$K2('#selectedTags option').attr('selected', 'selected'); submitform( pressbutton ); } } ");

This forces the user to upload a new item each time. tested it and works.
$document = & JFactory::getDocument(); $document->addScriptDeclaration(" Joomla.submitbutton = function(pressbutton){ if (pressbutton == 'cancel') { submitform( pressbutton ); return; } if (\$K2.trim(\$K2('#title').val()) == '') { alert( '".JText::_('K2_ITEM_MUST_HAVE_A_TITLE', true)."' ); } else if (\$K2.trim(\$K2('#catid').val()) == '0') { alert( '".JText::_('K2_PLEASE_SELECT_A_CATEGORY', true)."' ); } else if( \$K2('.fileUpload').val() == '' && \$K2('#existingImageValue').val() == '' ) { alert('No image selected'); return false; } else { syncExtraFieldsEditor(); \$K2('#selectedTags option').attr('selected', 'selected'); submitform( pressbutton ); } } "); 

This will check both the new AND existing image fields.

Please note this ONLY for adding new item, You should make a case where the default code is used when the $task is editing.
  • Franz Wohlkönig
  • Franz Wohlkönig's Avatar
01 Oct 2013 16:17
Replied by Franz Wohlkönig on topic Steckbrief - Aufbau so wie am Bild

Steckbrief - Aufbau so wie am Bild

Category: Offizielle deutsche Gemeinschaft

Servus,

Extra-Felder sind bei k2 dabei und können vielfältig verwendet werden. Für Benutzerprofile gibt es das zusätzliche PlugIn "User Extended Fields for K2 (by JoomlaWorks)".

Optik, Anordnung ist CSS-Sache bzw. hat das Template was dabei. Frag bei der Site nach, vielleicht können sie dir CSS-Files abgeben.

Servus
Franz
  • robert
  • robert's Avatar
19 Sep 2013 18:23 - 19 Sep 2013 18:27
Replied by robert on topic Removing Icons/Links from the Admin Module

Removing Icons/Links from the Admin Module

Category: English K2 Community

Well I guess I will try to break it down here and MAYBE someone with some expert PHP knowledge can confirm it will work.

As I mentioned above I followed the tutorial about making certain menu items available to SuperUsers and Staff Members.

SuperUsers are the site developers and Staff are the actual users of the site. We wanted to limit some items so that a Staff member cant install or change certain items that may break the site or worst may be vulnerable to hackers.

We do not use the standard Joomla article/category creation system instead we have opted to use K2. With that said we have hidden from Staff the any access to the standard joomla article/category creation, access to components, modules, plugins etc. but we have left access to the K2 admin module for creating and managment of articles, categories, comments etc.

Now, since the K2 admin panel offers access to Extend K2, Extra Fields, Extra field Groups and other items, we want to prevent staff members from access those items, while allowing SuperUsers access to add items if required.

So we see that the file /domain.com/administrator/modules/mod_k2_quickicons/tmpl/default.php is the file that shows the access point to K2 features we want to hide.

We have already created the override folder and file at /administrator/template/html//mod_k2_quickicons/default.php

Currently the file looks like...
 
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
11 Sep 2013 13:35
Replied by Krikor Boghossian on topic Joomla K2 user extra fields

Joomla K2 user extra fields

Category: English K2 Community

You need to read this tutorial before overriding any files.
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
  • Murali Vallath
  • Murali Vallath's Avatar
10 Sep 2013 20:43
Replied by Murali Vallath on topic Joomla K2 user extra fields

Joomla K2 user extra fields

Category: English K2 Community

I am unable to locate the register.php and profile.php files.. they are not in the templates directory

Could you share the exact path?

Thanks
  • Vseva
  • Vseva's Avatar
30 Aug 2013 23:44 - 01 Sep 2013 20:07

K2 2.6.7 rating & extrafields on custom user page

Category: English K2 Community

HI !

In the previous version of K2 2.6.6, I had customized the user.php view to accommodate both the item's rating and extrafields, and it worked just fine.

But now that I've updated to K2 2.6.7 my customizations don't work anymore and I can't figure out why ????

Anyone got any ideas they could throw my way as to why ?

(if don't know php I doubt you'll be able to answer this one)

Thx in advance.
 
  • Johan
  • Johan's Avatar
16 Aug 2013 03:31 - 16 Aug 2013 03:42

Allow User to edit certain item (automated)

Category: English K2 Community

Yea, you just assign the k2 item to the user and allow front-end editing of own items.

Note: I thought you said, you want them to be able to only edit the AD. So I wrote this.

For your second question. How do you plan on running the ads? There is a component for Joomla called ad agency that can help you with this. However if that ad is gonna be specific on certain pages and not random from advertisers then you need to tell me how you plan on getting the ad from them. Upload? Where? How?Email it to you? Will it change? Will there be durations involved in the Ad? What type of ad? etc.

More importantly, where do you want to display the ad? If you want to add it from a k2 item. You can either create an exta field as an image/text/ etc whatever the type of ad is. And show it wheverever in the k2 item if that specific item if thats what you wanna do. You can use a custom itemform.php to allow only editing of that specific field using something like

<?php $user =& JFactory::getUser()

and if ($user->xxx) ??

<?php echo $extrafields[the ID of the extra field];?>
  • Dafne Giacobbe
  • Dafne Giacobbe's Avatar
10 Aug 2013 21:10
Modulo RokSprocket Mosaic con K2...non funziona was created by Dafne Giacobbe

Modulo RokSprocket Mosaic con K2...non funziona

Category: Comunità italiana K2

Ho cercato di creare un Modulo RokSprocket Mosaic (che con joomla funziona benissimo) con articoli presi da K2, nel momento in cui ho selezionato K2 mi sono apparsi gli errori sottostanti.
Adesso addirittura non mi fa entrare da amministrazione nel modulo per correggerlo.


Messaggio di errore

500 - Si è verificato un errore.

Table 'Sql573083_1.r9fc1_k2_comments' doesn't exist SQL=SELECT a.id, a.title, a.alias, a.introtext, a.`fulltext`, a.catid, a.published, a.access, a.created, a.modified, a.extra_fields, a.extra_fields_search, a.created_by, a.created_by_alias, a.featured, a.language, a.hits, a.publish_up, a.publish_down, a.language, a.metakey, a.metadesc, a.metadata,c.name AS category_title, c.image AS category_image, c.alias as category_alias,CONCAT_WS(",", f.id) AS field_ids, CONCAT_WS(",", f.name) AS field_names,CONCAT_WS(",", t.id) AS tag_ids, CONCAT_WS(",", t.name) AS tag_names,COUNT(co.id) AS comment_count,ua.name AS author_name,um.name AS last_modified_by,ROUND(v.rating_sum / v.rating_count, 0) AS rating, v.rating_count as rating_count,vl.title AS access_title,l.title AS language_title FROM r9fc1_k2_items as a LEFT JOIN r9fc1_k2_categories AS c ON c.id = a.catid LEFT JOIN r9fc1_k2_extra_fields_groups AS fg ON fg.id = c.extraFieldsGroup LEFT JOIN r9fc1_k2_extra_fields AS f ON f.group = fg.id LEFT JOIN r9fc1_k2_tags_xref AS tx ON tx.itemID = a.id LEFT JOIN r9fc1_k2_tags AS t ON t.id = tx.tagID LEFT JOIN r9fc1_k2_comments AS co ON co.itemID = a.id LEFT JOIN r9fc1_users AS ua ON ua.id = a.created_by LEFT JOIN r9fc1_users AS um ON um.id = a.modified_by LEFT JOIN r9fc1_k2_rating AS v ON a.id = v.itemID LEFT JOIN r9fc1_viewlevels AS vl ON a.access = vl.id LEFT JOIN r9fc1_languages AS l ON a.language = l.lang_code LEFT OUTER JOIN (select rsi.provider_id, rsi.order from r9fc1_roksprocket_items as rsi where module_id = 232) rsi on a.id = rsi.provider_id WHERE ((a.access IN(1,1,2,3) AND a.trash = 0) AND a.id IN (44,53,54,55,56,45,46,47,43)) GROUP BY a.id ORDER BY IF(ISNULL(rsi.order),1,0),rsi.order

Poi ho controllato e nel pannello di controllo K2 Commenti appare questo:

Warning: Invalid argument supplied for foreach() in /web/htdocs/www.weddingsanddreams.it/home/administrator/components/com_k2/views/comments/view.html.php on line 52

Qualcuno sa cosa posso fare?
grazie
  • Don Omondi
  • Don Omondi's Avatar
01 Aug 2013 05:47
Blank Top Category was created by Don Omondi

Blank Top Category

Category: English K2 Community

Got k2 v 2.67 joomla 3.11 infact let me copy paste my server info

PHP Built On Linux root.serverke16.com 2.6.32-458.6.2.lve1.2.30.el6.x86_64 #1 SMP Fri Jul 12 15:02:22 EEST 2013 x86_64
Database Version 5.1.68-cll-lve
Database Collation utf8_general_ci
PHP Version 5.3.26
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.1.1 Stable [ Ember ] 26-April-2013 14:00 GMT
Joomla! Platform Version Joomla Platform 12.2.0 Stable [ Neil Armstrong ] 21-September-2012 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36

When I installed k2 it was on a joomla 3.14 site and it had issues like extra fields etc, my research showed it was a joomla bug so I downgraded back to joomla 3.11. Now everything seemed ok I created categories and published them but when I displayed a menu link to the top category nothing shows on the component area not even category name or image but if I insert a link to a subcategory its ok. Its a small but very very significant issue. Allow me to go on... so on my localhost site copy on my windows 7 wamp server everything is ok. Again I researched and learnt that turning on error display to maximum on joomla global config help so I did and this it what it had to say on the relevant page.

Notice: Undefined offset: 1 in /home/mybiz/public_html/components/com_k2/router.php on line 204 Notice: Undefined offset: 1 in /home/mybiz/public_html/components/com_k2/router.php on line 204 Notice: Undefined offset: 1 in /home/mybiz/public_html/components/com_k2/router.php on line 204

Any assistance is GREATLY appreciated... been trying and trying for 3 days and 3 nights now :(
Displaying 81 - 100 out of 248 results.