Keyword

Advanced Search

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

  • Sophie
  • Sophie's Avatar
04 Mar 2015 18:35
Replied by Sophie on topic Extra Fields do not show in editform

Extra Fields do not show in editform

Category: English K2 Community

<?php
/**
* @version 2.6.x
* @package K2
* @author JoomlaWorks www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: www.gnu.org/copyleft/gpl.html
*/

// no direct access
defined('_JEXEC') or die;

$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 {
syncExtraFieldsEditor();
var validation = validateExtraFields();
if(validation === true) {
\$K2('#selectedTags option').attr('selected', 'selected');
submitform( pressbutton );
}
}
}
");

?>

<form action="<?php echo JURI::root(true); ?>/index.php" enctype="multipart/form-data" method="post" name="adminForm" id="adminForm">
<?php if($this->mainframe->isSite()): ?>
<div id="k2FrontendContainer">
<div id="k2Frontend">
<table class="k2FrontendToolbar" cellpadding="2" cellspacing="4">
<tr>
<td id="toolbar-save" class="button">
<a class="toolbar" href="#" onclick="Joomla.submitbutton('save'); return false;"> <span title="<?php echo JText::_('K2_SAVE'); ?>" class="icon-32-save icon-save"></span> <?php echo JText::_('K2_SAVE'); ?> </a>
</td>
<td id="toolbar-cancel" class="button">
<a class="toolbar" href="#"> <span title="<?php echo JText::_('K2_CANCEL'); ?>" class="icon-32-cancel icon-cancel"></span> <?php echo JText::_('K2_CLOSE'); ?> </a>
</td>
</tr>
</table>
<div id="k2FrontendEditToolbar">
<h2 class="header icon-48-k2">
<?php echo (JRequest::getInt('cid')) ? JText::_('K2_EDIT_ITEM') : JText::_('K2_ADD_ITEM'); ?>
</h2>
</div>
<div class="clr"></div>
<hr class="sep" />
<div id="k2FrontendPermissionsNotice">
<p><?php echo $this->permissionsMessage; ?></p>
</div>
<?php endif; ?>
<div id="k2ToggleSidebarContainer"> <a href="#" id="k2ToggleSidebar"><?php echo JText::_('K2_TOGGLE_SIDEBAR'); ?></a> </div>
<table cellspacing="0" cellpadding="0" border="0" class="adminFormK2Container table">
<tbody>
<tr>
<td>
<table class="adminFormK2">
<tr>
<td class="adminK2LeftCol">
<label for="title"><?php echo JText::_('K2_TITLE'); ?></label>
</td>
<td class="adminK2RightCol">
<input class="text_area k2TitleBox" type="text" name="title" id="title" maxlength="250" value="<?php echo $this->row->title; ?>" />
</td>
</tr>
<tr>
<td class="adminK2LeftCol">
<label for="alias"><?php echo JText::_('K2_TITLE_ALIAS'); ?></label>
</td>
<td class="adminK2RightCol">
<input class="text_area k2TitleAliasBox" type="text" name="alias" id="alias" maxlength="250" value="<?php echo $this->row->alias; ?>" />
</td>
</tr>
<tr>
<td class="adminK2LeftCol">
<label><?php echo JText::_('K2_CATEGORY'); ?></label>
</td>
<td class="adminK2RightCol">
<?php echo $this->lists; ?>
</td>
</tr>
<tr>
<td class="adminK2LeftCol">
<label><?php echo JText::_('K2_TAGS'); ?></label>
</td>
<td class="adminK2RightCol">
<?php if($this->params->get('taggingSystem')): ?>
<!-- Free tagging -->
<ul class="tags">
<?php if(isset($this->row->tags) && count($this->row->tags)): ?>
<?php foreach($this->row->tags as $tag): ?>
<li class="tagAdded">
<?php echo $tag->name; ?>
<span title="<?php echo JText::_('K2_CLICK_TO_REMOVE_TAG'); ?>" class="tagRemove">x</span>
<input type="hidden" name="tags[]" value="<?php echo $tag->name; ?>" />
</li>
<?php endforeach; ?>
<?php endif; ?>
<li class="tagAdd">
<input type="text" id="search-field" />
</li>
<li class="clr"></li>
</ul>
<span class="k2Note"> <?php echo JText::_('K2_WRITE_A_TAG_AND_PRESS_RETURN_OR_COMMA_TO_ADD_IT'); ?> </span>
<?php else: ?>
<!-- Selection based tagging -->
<?php if( !$this->params->get('lockTags') || $this->user->gid>23): ?>
<div style="float:left;">
<input type="text" name="tag" id="tag" />
<input type="button" id="newTagButton" value="<?php echo JText::_('K2_ADD'); ?>" />
</div>
<div id="tagsLog"></div>
<div class="clr"></div>
<span class="k2Note"> <?php echo JText::_('K2_WRITE_A_TAG_AND_PRESS_ADD_TO_INSERT_IT_TO_THE_AVAILABLE_TAGS_LISTNEW_TAGS_ARE_APPENDED_AT_THE_BOTTOM_OF_THE_AVAILABLE_TAGS_LIST_LEFT'); ?> </span>
<?php endif; ?>
<table cellspacing="0" cellpadding="0" border="0" id="tagLists">
<tr>
<td id="tagListsLeft">
<span><?php echo JText::_('K2_AVAILABLE_TAGS'); ?></span> <?php echo $this->lists; ?>
</td>
<td id="tagListsButtons">
<input type="button" id="addTagButton" value="<?php echo JText::_('K2_ADD'); ?> &raquo;" />
<br />
<br />
<input type="button" id="removeTagButton" value="&laquo; <?php echo JText::_('K2_REMOVE'); ?>" />
</td>
<td id="tagListsRight">
<span><?php echo JText::_('K2_SELECTED_TAGS'); ?></span> <?php echo $this->lists; ?>
</td>
</tr>
</table>
<?php endif; ?>
</td>
</tr>
<?php if($this->mainframe->isAdmin() || ($this->mainframe->isSite() && $this->permissions->get('publish') || ($this->permissions->get('editPublished') && $this->row->id && $this->row->published) )): ?>
<?php if($this->permissions->get('publish')): ?>
<tr>
<td class="adminK2LeftCol">
<label for="featured"><?php echo JText::_('K2_IS_IT_FEATURED'); ?></label>
</td>
<td class="adminK2RightCol">
<?php echo $this->lists; ?>
</td>
</tr>
<?php endif; ?>
<tr>
<td class="adminK2LeftCol">
<label><?php echo JText::_('K2_PUBLISHED'); ?></label>
</td>
<td class="adminK2RightCol">
<?php echo $this->lists; ?>
</td>
</tr>
<?php endif; ?>
</table>

<!-- Required extra field warning -->
<div id="k2ExtraFieldsValidationResults">
<h3><?php echo JText::_('K2_THE_FOLLOWING_FIELDS_ARE_REQUIRED'); ?></h3>
<ul id="k2ExtraFieldsMissing">
<li><?php echo JText::_('K2_LOADING'); ?></li>
</ul>
</div>

<!-- Tabs start here -->
<div class="simpleTabs" id="k2Tabs">
<ul class="simpleTabsNavigation">
<li id="tabContent"><a href="#k2Tab1"><?php echo JText::_('K2_CONTENT'); ?></a></li>
<?php if ($this->params->get('showImageTab')): ?>
<li id="tabImage"><a href="#k2Tab2"><?php echo JText::_('K2_IMAGE'); ?></a></li>
<?php endif; ?>
<?php if ($this->params->get('showImageGalleryTab')): ?>
<li id="tabImageGallery"><a href="#k2Tab3"><?php echo JText::_('K2_IMAGE_GALLERY'); ?></a></li>
<?php endif; ?>
<?php if ($this->params->get('showVideoTab')): ?>
<li id="tabVideo"><a href="#k2Tab4"><?php echo JText::_('K2_MEDIA'); ?></a></li>
<?php endif; ?>
<?php if ($this->params->get('showExtraFieldsTab')): ?>
<li id="tabExtraFields"><a href="#k2Tab5"><?php echo JText::_('K2_EXTRA_FIELDS'); ?></a></li>
<?php endif; ?>
<?php if ($this->params->get('showAttachmentsTab')): ?>
<li id="tabAttachments"><a href="#k2Tab6"><?php echo JText::_('K2_ATTACHMENTS'); ?></a></li>
<?php endif; ?>
<?php if(count(array_filter($this->K2PluginsItemOther)) && $this->params->get('showK2Plugins')): ?>
<li id="tabPlugins"><a href="#k2Tab7"><?php echo JText::_('K2_PLUGINS'); ?></a></li>
<?php endif; ?>
</ul>

<!-- Tab content -->
<div class="simpleTabsContent" id="k2Tab1">
<?php if($this->params->get('mergeEditors')): ?>
<div class="k2ItemFormEditor"> <?php echo $this->text; ?>
<div class="dummyHeight"></div>
<div class="clr"></div>
</div>
<?php else: ?>
<div class="k2ItemFormEditor"> <span class="k2ItemFormEditorTitle"> <?php echo JText::_('K2_INTROTEXT_TEASER_CONTENTEXCERPT'); ?> </span> <?php echo $this->introtext; ?>
<div class="dummyHeight"></div>
<div class="clr"></div>
</div>
<div class="k2ItemFormEditor"> <span class="k2ItemFormEditorTitle"> <?php echo JText::_('K2_FULLTEXT_MAIN_CONTENT'); ?> </span> <?php echo $this->fulltext; ?>
<div class="dummyHeight"></div>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if (count($this->K2PluginsItemContent)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemContent as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
<?php if ($this->params->get('showImageTab')): ?>
<!-- Tab image -->
<div class="simpleTabsContent" id="k2Tab2">
<table class="admintable">
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ITEM_IMAGE'); ?>
</td>
<td>
<input type="file" name="image" class="fileUpload" />
<i>(<?php echo JText::_('K2_MAX_UPLOAD_SIZE'); ?>: <?php echo ini_get('upload_max_filesize'); ?>)</i>
<br />
<br />
<input type="text" name="existingImage" id="existingImageValue" class="text_area" readonly />
<input type="button" value="<?php echo JText::_('K2_BROWSE_SERVER'); ?>" id="k2ImageBrowseServer" />
<br />
<br />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ITEM_IMAGE_CAPTION'); ?>
</td>
<td>
<input type="text" name="image_caption" size="30" class="text_area" value="<?php echo $this->row->image_caption; ?>" />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ITEM_IMAGE_CREDITS'); ?>
</td>
<td>
<input type="text" name="image_credits" size="30" class="text_area" value="<?php echo $this->row->image_credits; ?>" />
</td>
</tr>
<?php if (!empty($this->row->image)): ?>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ITEM_IMAGE_PREVIEW'); ?>
</td>
<td>
<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->row->image; ?>" title="<?php echo JText::_('K2_CLICK_ON_IMAGE_TO_PREVIEW_IN_ORIGINAL_SIZE'); ?>">
<img alt="<?php echo $this->row->title; ?>" src="<?php echo $this->row->thumb; ?>" class="k2AdminImage" />
</a>
<input type="checkbox" name="del_image" id="del_image" />
<label for="del_image"><?php echo JText::_('K2_CHECK_THIS_BOX_TO_DELETE_CURRENT_IMAGE_OR_JUST_UPLOAD_A_NEW_IMAGE_TO_REPLACE_THE_EXISTING_ONE'); ?></label>
</td>
</tr>
<?php endif; ?>
</table>
<?php if (count($this->K2PluginsItemImage)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemImage as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('showImageGalleryTab')): ?>
<!-- Tab image gallery -->
<div class="simpleTabsContent" id="k2Tab3">
<?php if ($this->lists): ?>
<table class="admintable table" id="item_gallery_content">
<tr>
<td align="right" valign="top" class="key">
<?php echo JText::_('K2_COM_BE_ITEM_ITEM_IMAGE_GALLERY'); ?>
</td>
<td valign="top">
<?php if($this->sigPro): ?>
<a class="modal" rel="{handler: 'iframe', size: {x: 940, y: 560}}" href="index.php?option=com_sigpro&view=galleries&task=create&newFolder=<?php echo $this->sigProFolder; ?>&type=k2&tmpl=component&template=system"><?php echo JText::_('K2_COM_BE_ITEM_SIGPRO_UPLOAD'); ?></a> <i>(<?php echo JText::_('K2_COM_BE_ITEM_SIGPRO_UPLOAD_NOTE'); ?>)</i>
<input name="sigProFolder" type="hidden" value="<?php echo $this->sigProFolder; ?>" />
<br />
<br />
<?php echo JText::_('K2_OR'); ?>
<?php endif; ?>
<?php echo JText::_('K2_UPLOAD_A_ZIP_FILE_WITH_IMAGES'); ?> <input type="file" name="gallery" class="fileUpload" /> <span class="hasTip k2GalleryNotice" title="<?php echo JText::_('K2_UPLOAD_A_ZIP_FILE_HELP_HEADER'); ?>::<?php echo JText::_('K2_UPLOAD_A_ZIP_FILE_HELP_TEXT'); ?>"><?php echo JText::_('K2_UPLOAD_A_ZIP_FILE_HELP'); ?></span> <i>(<?php echo JText::_('K2_MAX_UPLOAD_SIZE'); ?>: <?php echo ini_get('upload_max_filesize'); ?>)</i>
<br />
<br />
<?php echo JText::_('K2_OR_ENTER_A_FLICKR_SET_URL'); ?><?php echo JText::_('K2_OR_ENTER_A_FLICKR_SET_URL'); ?>
<input type="text" name="flickrGallery" size="50" value="<?php echo ($this->row->galleryType == 'flickr') ? $this->row->galleryValue : ''; ?>" /> <span class="hasTip k2GalleryNotice" title="<?php echo JText::_('K2_VALID_FLICK_API_KEY_HELP_HEADER'); ?>::<?php echo JText::_('K2_VALID_FLICK_API_KEY_HELP_TEXT'); ?>"><?php echo JText::_('K2_UPLOAD_A_ZIP_FILE_HELP'); ?></span>

<?php if (!empty($this->row->gallery)): ?>
<!-- Preview -->
<div id="itemGallery">
<?php echo $this->row->gallery; ?>
<br />
<input type="checkbox" name="del_gallery" id="del_gallery" />
<label for="del_gallery"><?php echo JText::_('K2_CHECK_THIS_BOX_TO_DELETE_CURRENT_IMAGE_GALLERY_OR_JUST_UPLOAD_A_NEW_IMAGE_GALLERY_TO_REPLACE_THE_EXISTING_ONE'); ?></label>
</div>
<?php endif; ?>
</td>
</tr>
</table>
<?php else: ?>
<?php if (K2_JVERSION == '15'): ?>
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message fade">
<ul>
<li><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_SIMPLE_IMAGE_GALLERY_PRO_PLUGIN_IF_YOU_WANT_TO_USE_THE_IMAGE_GALLERY_FEATURES_OF_K2'); ?></li>
</ul>
</dd>
</dl>
<?php elseif(K2_JVERSION == '25'): ?>
<div id="system-message-container">
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message">
<ul>
<li><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_SIMPLE_IMAGE_GALLERY_PRO_PLUGIN_IF_YOU_WANT_TO_USE_THE_IMAGE_GALLERY_FEATURES_OF_K2'); ?></li>
</ul>
</dd>
</dl>
</div>
<?php else: ?>
<div class="alert">
<h4 class="alert-heading"><?php echo JText::_('K2_NOTICE'); ?></h4>
<div><p><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_SIMPLE_IMAGE_GALLERY_PRO_PLUGIN_IF_YOU_WANT_TO_USE_THE_IMAGE_GALLERY_FEATURES_OF_K2'); ?></p></div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (count($this->K2PluginsItemGallery)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemGallery as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('showVideoTab')): ?>
<!-- Tab video -->
<div class="simpleTabsContent" id="k2Tab4">
<?php if ($this->lists): ?>
<table class="admintable" id="item_video_content">
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_SOURCE'); ?>
</td>
<td>
<div id="k2VideoTabs" class="simpleTabs">
<ul class="simpleTabsNavigation">
<li><a href="#k2VideoTab1"><?php echo JText::_('K2_UPLOAD'); ?></a></li>
<li><a href="#k2VideoTab2"><?php echo JText::_('K2_BROWSE_SERVERUSE_REMOTE_MEDIA'); ?></a></li>
<li><a href="#k2VideoTab3"><?php echo JText::_('K2_MEDIA_USE_ONLINE_VIDEO_SERVICE'); ?></a></li>
<li><a href="#k2VideoTab4"><?php echo JText::_('K2_EMBED'); ?></a></li>
</ul>
<div id="k2VideoTab1" class="simpleTabsContent">
<div class="panel" id="Upload_video">
<input type="file" name="video" class="fileUpload" />
<i>(<?php echo JText::_('K2_MAX_UPLOAD_SIZE'); ?>: <?php echo ini_get('upload_max_filesize'); ?>)</i> </div>
</div>
<div id="k2VideoTab2" class="simpleTabsContent">
<div class="panel" id="Remote_video"> <a id="k2MediaBrowseServer" href="index.php?option=com_k2&view=media&type=video&tmpl=component&fieldID=remoteVideo"><?php echo JText::_('K2_BROWSE_VIDEOS_ON_SERVER')?></a> <?php echo JText::_('K2_OR'); ?> <?php echo JText::_('K2_PASTE_REMOTE_VIDEO_URL'); ?>
<br />
<br />
<input type="text" size="50" name="remoteVideo" id="remoteVideo" value="<?php echo $this->lists ?>" />
</div>
</div>
<div id="k2VideoTab3" class="simpleTabsContent">
<div class="panel" id="Video_from_provider"> <?php echo JText::_('K2_SELECT_VIDEO_PROVIDER'); ?> <?php echo $this->lists; ?> <br/><br/> <?php echo JText::_('K2_AND_ENTER_VIDEO_ID'); ?>
<input type="text" size="50" name="videoID" value="<?php echo $this->lists ?>" />
<br />
<br />
<a class="modal" rel="{handler: 'iframe', size: {x: 990, y: 600}}" href="www.joomlaworks.net/allvideos-documentation">

</div>
<div id="k2VideoTab4" class="simpleTabsContent">
<div class="panel" id="embedVideo">
<?php echo JText::_('K2_PASTE_HTML_EMBED_CODE_BELOW'); ?>
<br />
<textarea name="embedVideo" rows="5" cols="50" class="textarea"><?php echo $this->lists; ?></textarea>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_CAPTION'); ?>
</td>
<td>
<input type="text" name="video_caption" size="50" class="text_area" value="<?php echo $this->row->video_caption; ?>" />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_CREDITS'); ?>
</td>
<td>
<input type="text" name="video_credits" size="50" class="text_area" value="<?php echo $this->row->video_credits; ?>" />
</td>
</tr>
<?php if($this->row->video): ?>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_PREVIEW'); ?>
</td>
<td>
<?php echo $this->row->video; ?>
<br />
<input type="checkbox" name="del_video" id="del_video" />
<label for="del_video"><?php echo JText::_('K2_CHECK_THIS_BOX_TO_DELETE_CURRENT_VIDEO_OR_USE_THE_FORM_ABOVE_TO_REPLACE_THE_EXISTING_ONE'); ?></label>
</td>
</tr>
<?php endif; ?>
</table>
<?php else: ?>
<?php if (K2_JVERSION == '15'): ?>
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message fade">
<ul>
<li><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_ALLVIDEOS_PLUGIN_IF_YOU_WANT_TO_USE_THE_FULL_VIDEO_FEATURES_OF_K2'); ?></li>
</ul>
</dd>
</dl>
<?php elseif(K2_JVERSION == '25'): ?>
<div id="system-message-container">
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message">
<ul>
<li><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_ALLVIDEOS_PLUGIN_IF_YOU_WANT_TO_USE_THE_FULL_VIDEO_FEATURES_OF_K2'); ?></li>
</ul>
</dd>
</dl>
</div>
<?php else: ?>
<div class="alert">
<h4 class="alert-heading"><?php echo JText::_('K2_NOTICE'); ?></h4>
<div><p><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_ALLVIDEOS_PLUGIN_IF_YOU_WANT_TO_USE_THE_FULL_VIDEO_FEATURES_OF_K2'); ?></p></div>
</div>
<?php endif; ?>
<table class="admintable" id="item_video_content">
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_SOURCE'); ?>
</td>
<td>
<div id="k2VideoTabs" class="simpleTabs">
<ul class="simpleTabsNavigation">
<li><a href="#k2VideoTab4"><?php echo JText::_('K2_EMBED'); ?></a></li>
</ul>
<div class="simpleTabsContent" id="k2VideoTab4">
<div class="panel" id="embedVideo">
<?php echo JText::_('K2_PASTE_HTML_EMBED_CODE_BELOW'); ?>
<br />
<textarea name="embedVideo" rows="5" cols="50" class="textarea"><?php echo $this->lists; ?></textarea>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_CAPTION'); ?>
</td>
<td>
<input type="text" name="video_caption" size="50" class="text_area" value="<?php echo $this->row->video_caption; ?>" />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_CREDITS'); ?>
</td>
<td>
<input type="text" name="video_credits" size="50" class="text_area" value="<?php echo $this->row->video_credits; ?>" />
</td>
</tr>
<?php if($this->row->video): ?>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_PREVIEW'); ?>
</td>
<td>
<?php echo $this->row->video; ?>
<br />
<input type="checkbox" name="del_video" id="del_video" />
<label for="del_video"><?php echo JText::_('K2_USE_THE_FORM_ABOVE_TO_REPLACE_THE_EXISTING_VIDEO_OR_CHECK_THIS_BOX_TO_DELETE_CURRENT_VIDEO'); ?></label>
</td>
</tr>
<?php endif; ?>
</table>
<?php endif; ?>
<?php if (count($this->K2PluginsItemVideo)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemVideo as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('showExtraFieldsTab')): ?>
<!-- Tab extra fields -->
<div class="simpleTabsContent" id="k2Tab5">
<div id="extraFieldsContainer">
<?php if (count($this->extraFields)): ?>
<table class="admintable" id="extraFields">
<?php foreach($this->extraFields as $extraField): ?>
<?php if($extraField->type == 'header'): ?>
<tr>
<td colspan="2" ><h4 class="k2ExtraFieldHeader"><?php echo $extraField->name; ?></h4></td>
</tr>
<?php else: ?>
<tr>
<td align="right" class="key">
<label for="K2ExtraField_<?php echo $extraField->id; ?>"><?php echo $extraField->name; ?></label>
</td>
<td>
<?php echo $extraField->element; ?>
</td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</table>
<?php else: ?>
<?php if (K2_JVERSION == '15'): ?>
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message fade">
<ul>
<li><?php echo JText::_('K2_PLEASE_SELECT_A_CATEGORY_FIRST_TO_RETRIEVE_ITS_RELATED_EXTRA_FIELDS'); ?></li>
</ul>
</dd>
</dl>
<?php elseif (K2_JVERSION == '25'): ?>
<div id="system-message-container">
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message">
<ul>
<li><?php echo JText::_('K2_PLEASE_SELECT_A_CATEGORY_FIRST_TO_RETRIEVE_ITS_RELATED_EXTRA_FIELDS'); ?></li>
</ul>
</dd>
</dl>
</div>
<?php else: ?>
<div class="alert">
<h4 class="alert-heading"><?php echo JText::_('K2_NOTICE'); ?></h4>
<div>
<p><?php echo JText::_('K2_PLEASE_SELECT_A_CATEGORY_FIRST_TO_RETRIEVE_ITS_RELATED_EXTRA_FIELDS'); ?></p>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<?php if (count($this->K2PluginsItemExtraFields)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemExtraFields as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('showAttachmentsTab')): ?>
<!-- Tab attachements -->
<div class="simpleTabsContent" id="k2Tab6">
<div class="itemAttachments">
<?php if (count($this->row->attachments)): ?>
<table class="adminlist">
<tr>
<th>
<?php echo JText::_('K2_FILENAME'); ?>
</th>
<th>
<?php echo JText::_('K2_TITLE'); ?>
</th>
<th>
<?php echo JText::_('K2_TITLE_ATTRIBUTE'); ?>
</th>
<th>
<?php echo JText::_('K2_DOWNLOADS'); ?>
</th>
<th>
<?php echo JText::_('K2_OPERATIONS'); ?>
</th>
</tr>
<?php foreach($this->row->attachments as $attachment): ?>
<tr>
<td class="attachment_entry">
<?php echo $attachment->filename; ?>
</td>
<td>
<?php echo $attachment->title; ?>
</td>
<td>
<?php echo $attachment->titleAttribute; ?>
</td>
<td>
<?php echo $attachment->hits; ?>
</td>
<td>
<a href="<?php echo $attachment->link; ?>"><?php echo JText::_('K2_DOWNLOAD'); ?></a> <a class="deleteAttachmentButton" href="<?php echo JURI::base(true); ?>/index.php?option=com_k2&amp;view=item&amp;task=deleteAttachment&amp;id=<?php echo $attachment->id?>&amp;cid=<?php echo $this->row->id; ?>"><?php echo JText::_('K2_DELETE'); ?></a>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
</div>
<div id="addAttachment">
<input type="button" id="addAttachmentButton" value="<?php echo JText::_('K2_ADD_ATTACHMENT_FIELD'); ?>" />
<i>(<?php echo JText::_('K2_MAX_UPLOAD_SIZE'); ?>: <?php echo ini_get('upload_max_filesize'); ?>)</i> </div>
<div id="itemAttachments"></div>
<?php if (count($this->K2PluginsItemAttachments)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemAttachments as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if(count(array_filter($this->K2PluginsItemOther)) && $this->params->get('showK2Plugins')): ?>
<!-- Tab other plugins -->
<div class="simpleTabsContent" id="k2Tab7">
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemOther as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
</div>
<!-- Tabs end here -->

<input type="hidden" name="isSite" value="<?php echo (int)$this->mainframe->isSite(); ?>" />
<?php if($this->mainframe->isSite()): ?>
<input type="hidden" name="lang" value="<?php echo JRequest::getCmd('lang'); ?>" />
<?php endif; ?>
<input type="hidden" name="id" value="<?php echo $this->row->id; ?>" />
<input type="hidden" name="option" value="com_k2" />
<input type="hidden" name="view" value="item" />
<input type="hidden" name="task" value="<?php echo JRequest::getVar('task'); ?>" />
<input type="hidden" name="Itemid" value="<?php echo JRequest::getInt('Itemid'); ?>" />
<?php echo JHTML::_('form.token'); ?>
</td>
<td id="adminFormK2Sidebar"<?php if($this->mainframe->isSite() && !$this->params->get('sideBarDisplayFrontend')): ?> style="display:none;"<?php endif; ?> class="xmlParamsFields">
<?php if($this->row->id): ?>
<table class="sidebarDetails">
<tr>
<td>
<strong><?php echo JText::_('K2_ITEM_ID'); ?></strong>
</td>
<td>
<?php echo $this->row->id; ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_PUBLISHED'); ?></strong>
</td>
<td>
<?php echo ($this->row->published > 0) ? JText::_('K2_YES') : JText::_('K2_NO'); ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_FEATURED'); ?></strong>
</td>
<td>
<?php echo ($this->row->featured > 0) ? JText::_('K2_YES'): JText::_('K2_NO'); ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_CREATED_DATE'); ?></strong>
</td>
<td>
<?php echo $this->lists; ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_CREATED_BY'); ?></strong>
</td>
<td>
<?php echo $this->row->author; ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_MODIFIED_DATE'); ?></strong>
</td>
<td>
<?php echo $this->lists; ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_MODIFIED_BY'); ?></strong>
</td>
<td>
<?php echo $this->row->moderator; ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_HITS'); ?></strong>
</td>
<td>
<?php echo $this->row->hits; ?>
<?php if($this->row->hits): ?>
<input id="resetHitsButton" type="button" value="<?php echo JText::_('K2_RESET'); ?>" class="button" name="resetHits" />
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
<?php if($this->row->id): ?>
<tr>
<td>
<strong><?php echo JText::_('K2_RATING'); ?></strong>
</td>
<td>
<?php echo $this->row->ratingCount; ?> <?php echo JText::_('K2_VOTES'); ?>
<?php if($this->row->ratingCount): ?>
<br />
(<?php echo JText::_('K2_AVERAGE_RATING'); ?>: <?php echo number_format(($this->row->ratingSum/$this->row->ratingCount),2); ?>/5.00)
<?php endif; ?>
<input id="resetRatingButton" type="button" value="<?php echo JText::_('K2_RESET'); ?>" class="button" name="resetRating" />
</td>
</tr>
</table>
<?php endif; ?>
<div id="k2Accordion">
<h3><a href="#"><?php echo JText::_('K2_AUTHOR_PUBLISHING_STATUS'); ?></a></h3>
<div>
<table class="admintable">
<?php if(isset($this->lists)): ?>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_LANGUAGE'); ?>
</td>
<td>
<?php echo $this->lists; ?>
</td>
</tr>
<?php endif; ?>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_AUTHOR'); ?>
</td>
<td id="k2AuthorOptions">
<span id="k2Author"><?php echo $this->row->author; ?></span>
<?php if($this->mainframe->isAdmin() || ($this->mainframe->isSite() && $this->permissions->get('editAll'))): ?>
<a class="modal" rel="{handler:'iframe', size: {x: 800, y: 460}}" href="index.php?option=com_k2&amp;view=users&amp;task=element&amp;tmpl=component"><?php echo JText::_('K2_CHANGE'); ?></a>
<input type="hidden" name="created_by" value="<?php echo $this->row->created_by; ?>" />
<?php endif; ?>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_AUTHOR_ALIAS'); ?>
</td>
<td>
<input class="text_area" type="text" name="created_by_alias" maxlength="250" value="<?php echo $this->row->created_by_alias; ?>" />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ACCESS_LEVEL'); ?>
</td>
<td>
<?php echo $this->lists; ?>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_CREATION_DATE'); ?>
</td>
<td class="k2ItemFormDateField">
<?php echo $this->lists; ?>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_START_PUBLISHING'); ?>
</td>
<td class="k2ItemFormDateField">
<?php echo $this->lists; ?>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_FINISH_PUBLISHING'); ?>
</td>
<td class="k2ItemFormDateField">
<?php echo $this->lists; ?>
</td>
</tr>
</table>
</div>
<h3><a href="#"><?php echo JText::_('K2_METADATA_INFORMATION'); ?></a></h3>
<div>
<table class="admintable">
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_DESCRIPTION'); ?>
</td>
<td>
<textarea name="metadesc" rows="5" cols="20"><?php echo $this->row->metadesc; ?></textarea>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_KEYWORDS'); ?>
</td>
<td>
<textarea name="metakey" rows="5" cols="20"><?php echo $this->row->metakey; ?></textarea>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ROBOTS'); ?>
</td>
<td>
<input type="text" name="meta[robots]" value="<?php echo $this->lists->get('robots'); ?>" />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_AUTHOR'); ?>
</td>
<td>
<input type="text" name="meta[author]" value="<?php echo $this->lists->get('author'); ?>" />
</td>
</tr>
</table>
</div>
<?php if($this->mainframe->isAdmin()): ?>
<h3><a href="#"><?php echo JText::_('K2_ITEM_VIEW_OPTIONS_IN_CATEGORY_LISTINGS'); ?></a></h3>
<div>
<?php if(version_compare( JVERSION, '1.6.0', 'ge' )): ?>
<fieldset class="panelform">
<ul class="adminformlist">
<?php foreach($this->form->getFieldset('item-view-options-listings') as $field): ?>
<li>
<?php if($field->type=='header'): ?>
<div class="paramValueHeader"><?php echo $field->input; ?></div>
<?php elseif($field->type=='Spacer'): ?>
<div class="paramValueSpacer">&nbsp;</div>
<div class="clr"></div>
<?php else: ?>
<div class="paramLabel"><?php echo $field->label; ?></div>
<div class="paramValue"><?php echo $field->input; ?></div>
<div class="clr"></div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</fieldset>
<?php else: ?>
<?php echo $this->form->render('params', 'item-view-options-listings'); ?>
<?php endif; ?>
</div>
<h3><a href="#"><?php echo JText::_('K2_ITEM_VIEW_OPTIONS'); ?></a></h3>
<div>
<?php if(version_compare( JVERSION, '1.6.0', 'ge' )): ?>
<fieldset class="panelform">
<ul class="adminformlist">
<?php foreach($this->form->getFieldset('item-view-options') as $field): ?>
<li>
<?php if($field->type=='header'): ?>
<div class="paramValueHeader"><?php echo $field->input; ?></div>
<?php elseif($field->type=='Spacer'): ?>
<div class="paramValueSpacer">&nbsp;</div>
<div class="clr"></div>
<?php else: ?>
<div class="paramLabel"><?php echo $field->label; ?></div>
<div class="paramValue"><?php echo $field->input; ?></div>
<div class="clr"></div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</fieldset>
<?php else: ?>
<?php echo $this->form->render('params', 'item-view-options'); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if($this->aceAclFlag): ?>
<h3><a href="#"><?php echo JText::_('AceACL') . ' ' . JText::_('COM_ACEACL_COMMON_PERMISSIONS'); ?></a></h3>
<div><?php AceaclApi::getWidget('com_k2.item.'.$this->row->id, true); ?></div>
<?php endif; ?>
</div>
</td>
</tr>
</tbody>
</table>
<div class="clr"></div>
<?php if($this->mainframe->isSite()): ?>
</div>
</div>
<?php endif; ?>
</form>
  • komir
  • komir's Avatar
17 Feb 2015 21:03 - 17 Feb 2015 23:28
Replied by komir on topic K2 as classifieds

K2 as classifieds

Category: English K2 Community

Hi, thank you, most of all is clear about k2 as classifieds page (categories, extra fields, commercial filter module like joomlart ...) , but, need idea
1. How to create Country and City part, when user post ads need to select country and city?
2. Is there any solution (commercial or nor commercial) for featured ads/articles for K2, like, when user make payment he can post featured ads/article in some day range, like 15 days?
3. Is there any solution (commercial or nor commercial) for featured ads/articles for K2, like, when user make payment he can post featured ads/article and that article is active 15 days and after that, article/ads become inactive?

Thank you
  • Michael Yaeger
  • Michael Yaeger's Avatar
11 Feb 2015 22:04 - 12 Feb 2015 19:39
[SOLVED] Display name of parent category was created by Michael Yaeger

[SOLVED] Display name of parent category

Category: English K2 Community

I want to show the name of the parent category on my category page (kind of like a breadcrumb, but in a different context). Here is my K2viewItemList object array:
K2ViewItemlist Object ( [_name:protected] => itemlist [_models:protected] => Array ( [item] => K2ModelItem Object ( [__state_set:protected] => [_db:protected] => JDatabaseDriverMysqli Object ( [name] => mysqli [nameQuote:protected] => ` [nullDate:protected] => 0000-00-00 00:00:00 [_database:JDatabaseDriver:private] => surface_alpha [connection:protected] => mysqli Object ( [affected_rows] => 1 [client_info] => 5.6.21 [client_version] => 50621 [connect_errno] => 0 [connect_error] => [errno] => 0 [error] => [error_list] => Array ( ) [field_count] => 1 [host_info] => Localhost via UNIX socket [info] => [insert_id] => 0 [server_info] => 5.6.22 [server_version] => 50622 [stat] => Uptime: 3667 Threads: 3 Questions: 37806 Slow queries: 0 Opens: 261 Flush tables: 1 Open tables: 239 Queries per second avg: 10.309 [sqlstate] => 00000 [protocol_version] => 10 [thread_id] => 478 [warning_count] => 0 ) [count:protected] => 48 [cursor:protected] => [debug:protected] => [limit:protected] => 0 [log:protected] => Array ( ) [timings:protected] => Array ( ) [callStacks:protected] => Array ( ) [offset:protected] => 0 [options:protected] => Array ( [driver] => mysqli [host] => localhost [user] => surface_alpha [password] => UT*p65!38g5) [database] => surface_alpha [prefix] => ddxnf_ [select] => 1 [port] => 3306 [socket] => ) [sql:protected] => SELECT COUNT(*) FROM #__k2_comments WHERE itemID=11 AND published=1 [tablePrefix:protected] => ddxnf_ [utf:protected] => 1 [errorNum:protected] => 0 [errorMsg:protected] => [transactionDepth:protected] => 0 [disconnectHandlers:protected] => Array ( ) ) [name:protected] => item [option:protected] => com_k2 [state:protected] => JObject Object ( [_errors:protected] => Array ( ) [task] => category [parameters.menu] => Joomla\Registry\Registry Object ( [data:protected] => stdClass Object ( [categories] => Array ( [0] => 6 ) [singleCatOrdering] => [menu-anchor_title] => [menu-anchor_css] => [menu_image] => [menu_text] => 1 [page_title] => [show_page_heading] => 0 [page_heading] => [pageclass_sfx] => [menu-meta_description] => [menu-meta_keywords] => [robots] => [secure] => 0 [mega_showtitle] => 1 [mega_font_awesome] => [mega_desc] => [mega_tooltip] => 0 [mega_tooltip_content] => [mega_cols] => 1 [mega_group] => 0 [mega_width] => [mega_colw] => [mega_colxw] => [mega_class] => [submenu_align] => auto [mega_subcontent] => 0 ) ) ) [event_clean_cache:protected] => onContentCleanCache [_errors:protected] => Array ( ) [isSigInstalled] => 1 ) [itemlist] => K2ModelItemlist Object ( [__state_set:protected] => [_db:protected] => JDatabaseDriverMysqli Object ( [name] => mysqli [nameQuote:protected] => ` [nullDate:protected] => 0000-00-00 00:00:00 [_database:JDatabaseDriver:private] => surface_alpha [connection:protected] => mysqli Object ( [affected_rows] => -1 [client_info] => 5.6.21 [client_version] => 50621 [connect_errno] => 0 [connect_error] => [errno] => 0 [error] => [error_list] => Array ( ) [field_count] => 1 [host_info] => Localhost via UNIX socket [info] => [insert_id] => 0 [server_info] => 5.6.22 [server_version] => 50622 [stat] => Uptime: 3667 Threads: 3 Questions: 37807 Slow queries: 0 Opens: 261 Flush tables: 1 Open tables: 239 Queries per second avg: 10.310 [sqlstate] => 00000 [protocol_version] => 10 [thread_id] => 478 [warning_count] => 0 ) [count:protected] => 48 [cursor:protected] => [debug:protected] => [limit:protected] => 0 [log:protected] => Array ( ) [timings:protected] => Array ( ) [callStacks:protected] => Array ( ) [offset:protected] => 0 [options:protected] => Array ( [driver] => mysqli [host] => localhost [user] => surface_alpha [password] => UT*p65!38g5) [database] => surface_alpha [prefix] => ddxnf_ [select] => 1 [port] => 3306 [socket] => ) [sql:protected] => SELECT COUNT(*) FROM #__k2_comments WHERE itemID=11 AND published=1 [tablePrefix:protected] => ddxnf_ [utf:protected] => 1 [errorNum:protected] => 0 [errorMsg:protected] => [transactionDepth:protected] => 0 [disconnectHandlers:protected] => Array ( ) ) [name:protected] => itemlist [option:protected] => com_k2 [state:protected] => JObject Object ( [_errors:protected] => Array ( ) [task] => category [parameters.menu] => Joomla\Registry\Registry Object ( [data:protected] => stdClass Object ( [categories] => Array ( [0] => 6 ) [singleCatOrdering] => [menu-anchor_title] => [menu-anchor_css] => [menu_image] => [menu_text] => 1 [page_title] => [show_page_heading] => 0 [page_heading] => [pageclass_sfx] => [menu-meta_description] => [menu-meta_keywords] => [robots] => [secure] => 0 [mega_showtitle] => 1 [mega_font_awesome] => [mega_desc] => [mega_tooltip] => 0 [mega_tooltip_content] => [mega_cols] => 1 [mega_group] => 0 [mega_width] => [mega_colw] => [mega_colxw] => [mega_class] => [submenu_align] => auto [mega_subcontent] => 0 ) ) ) [event_clean_cache:protected] => onContentCleanCache [_errors:protected] => Array ( ) ) ) [_basePath:protected] => /home/surface/alpha/components/com_k2 [_defaultModel:protected] => itemlist [_layout:protected] => category [_layoutExt:protected] => php [_layoutTemplate:protected] => _ [_path:protected] => Array ( [template] => Array ( [0] => /home/surface/alpha/templates/theme1666/html/com_k2/product/ [1] => /home/surface/alpha/templates/theme1666/html/com_k2/templates/product/ [2] => /home/surface/alpha/components/com_k2/templates/product/ [3] => /home/surface/alpha/templates/theme1666/html/com_k2/ [4] => /home/surface/alpha/templates/theme1666/html/com_k2/default/ [5] => /home/surface/alpha/templates/theme1666/html/com_k2/templates/default/ [6] => /home/surface/alpha/templates/theme1666/html/com_k2/templates/ [7] => /home/surface/alpha/components/com_k2/templates/default/ [8] => /home/surface/alpha/components/com_k2/templates/ [9] => /home/surface/alpha/templates/theme1666/html/com_k2/itemlist/ [10] => /home/surface/alpha/components/com_k2/views/itemlist/tmpl/ ) [helper] => Array ( [0] => /home/surface/alpha/components/com_k2/helpers/ ) ) [_template:protected] => /home/surface/alpha/templates/theme1666/html/com_k2/templates/product/category_item.php [_output:protected] => Dark Morro Dark Morro Swatchboard Suggested Grout [_escape:protected] => htmlspecialchars [_charset:protected] => UTF-8 [_errors:protected] => Array ( ) [baseurl] => [document] => JDocumentHTML Object ( [_links] => Array ( [http://alpha.surfaceartinc.com/premium-tile/by-collection/venetian-classics/itemlist/category/5-sun-valley-plank.html] => Array ( [relation] => canonical [relType] => rel [attribs] => Array ( ) ) [/premium-tile/by-collection/venetian-classics/itemlist/category/5-sun-valley-plank.feed?type=rss] => Array ( [relation] => alternate [relType] => rel [attribs] => Array ( [type] => application/rss+xml [title] => RSS 2.0 ) ) [/premium-tile/by-collection/venetian-classics/itemlist/category/5-sun-valley-plank.feed?type=atom] => Array ( [relation] => alternate [relType] => rel [attribs] => Array ( [type] => application/atom+xml [title] => Atom 1.0 ) ) ) [_custom] => Array ( ) [template] => [baseurl] => [params] => [_file] => [_template:protected] => [_template_tags:protected] => Array ( ) [_caching:protected] => [_html5:JDocumentHTML:private] => [title] => Sun Valley Plank - Surface Art, Inc. [description] => [link] => [base] => http://alpha.surfaceartinc.com/premium-tile/by-collection/venetian-classics/itemlist/category/5-sun-valley-plank.html [language] => en-us [direction] => ltr [_generator] => Joomla! - Open Source Content Management [_mdate] => [_tab] => [_lineEnd] => [_charset] => utf-8 [_mime] => text/html [_namespace] => [_profile] => [_scripts] => Array ( [/media/system/js/mootools-core.js] => Array ( [mime] => text/javascript [defer] => [async] => ) [/media/jui/js/jquery.min.js] => Array ( [mime] => text/javascript [defer] => [async] => ) [/media/jui/js/jquery-noconflict.js] => Array ( [mime] => text/javascript [defer] => [async] => ) [/media/jui/js/jquery-migrate.min.js] => Array ( [mime] => text/javascript [defer] => [async] => ) [/media/system/js/core.js] => Array ( [mime] => text/javascript [defer] => [async] => ) [/components/com_k2/js/k2.js?v2.6.9&sitepath=/] => Array ( [mime] => text/javascript [defer] => [async] => ) [/plugins/content/jw_sigpro/jw_sigpro/includes/js/jquery_magnificpopup/jquery.magnific-popup.min.js?v=0.9.9] => Array ( [mime] => text/javascript [defer] => [async] => ) [/plugins/content/jw_sigpro/jw_sigpro/tmpl/GalleriaWhite/js/behaviour.js] => Array ( [mime] => text/javascript [defer] => [async] => ) [/plugins/content/jw_sigpro/jw_sigpro/includes/js/behaviour.js] => Array ( [mime] => text/javascript [defer] => [async] => ) [/media/system/js/mootools-more.js] => Array ( [mime] => text/javascript [defer] => [async] => ) [/media/system/js/modal.js] => Array ( [mime] => text/javascript [defer] => [async] => ) [/media/jui/js/bootstrap.min.js] => Array ( [mime] => text/javascript [defer] => [async] => ) ) [_script] => Array ( [text/javascript] => jQuery.noConflict(); jQuery(function($) { $('.magnificpopup').magnificPopup({ type: 'image', tLoading: 'Loading image #%curr%...', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] // Will preload 0 - before current, and 1 after the current image }, image: { tError: 'The image #%curr% could not be loaded.', titleSrc: function(item) { return item.el.attr('title'); } } }); }); jQuery(function($) { SqueezeBox.initialize({}); SqueezeBox.assign($('a.modal').get(), { parse: 'rel' }); }); jQuery(document).ready(function(){ jQuery('.hasTooltip').tooltip({"html": true,"container": "body"}); }); ) [_styleSheets] => Array ( [/components/com_k2/css/k2.css] => Array ( [mime] => text/css [media] => [attribs] => Array ( ) ) [/plugins/content/jw_sigpro/jw_sigpro/includes/js/jquery_magnificpopup/magnific-popup.css?v=0.9.9] => Array ( [mime] => text/css [media] => [attribs] => Array ( ) ) [/plugins/content/jw_sigpro/jw_sigpro/tmpl/GalleriaWhite/css/template.css] => Array ( [mime] => text/css [media] => screen [attribs] => Array ( ) ) [/plugins/content/jw_sigpro/jw_sigpro/includes/css/print.css] => Array ( [mime] => text/css [media] => print [attribs] => Array ( ) ) [/media/system/css/modal.css] => Array ( [mime] => text/css [media] => [attribs] => Array ( ) ) ) [_style] => Array ( ) [_metaTags] => Array ( [http-equiv] => Array ( [content-type] => text/html; charset=utf-8 ) [standard] => Array ( [keywords] => [rights] => [og:url] => http://alpha.surfaceartinc.com/premium-tile/by-collection/venetian-classics/itemlist/category/5-sun-valley-plank.html [og:title] => Sun Valley Plank - Surface Art, Inc. [og:type] => website [og:description] => ) ) [_engine] => [_type] => html [mediaVersion:protected] => 0463ba70cfe64500152ce66936d97d13 ) [category] => TableK2Category Object ( [id] => 5 [name] => Sun Valley Plank [alias] => sun-valley-plank [description] => [parent] => 6 [extraFieldsGroup] => 1 [published] => 1 [image] => /components/com_k2/images/placeholder/category.png [access] => 1 [ordering] => 1 [params] => {"inheritFrom":"0","theme":"product","num_leading_items":"0","num_leading_columns":"1","leadingImgSize":"Large","num_primary_items":"0","num_primary_columns":"2","primaryImgSize":"Medium","num_secondary_items":"40","num_secondary_columns":"3","secondaryImgSize":"Small","num_links":"0","num_links_columns":"1","linksImgSize":"XSmall","catCatalogMode":"0","catFeaturedItems":"1","catOrdering":"","catPagination":"2","catPaginationResults":"1","catTitle":"1","catTitleItemCounter":"0","catDescription":"1","catImage":"0","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":"0","catItemFeaturedNotice":"0","catItemAuthor":"0","catItemDateCreated":"0","catItemRating":"0","catItemImage":"1","catItemIntroText":"1","catItemIntroTextWordLimit":"","catItemExtraFields":"1","catItemHits":"0","catItemCategory":"1","catItemTags":"1","catItemAttachments":"0","catItemAttachmentsCounter":"0","catItemVideo":"0","catItemVideoWidth":"","catItemVideoHeight":"","catItemAudioWidth":"","catItemAudioHeight":"","catItemVideoAutoPlay":"0","catItemImageGallery":"1","catItemDateModified":"0","catItemReadMore":"0","catItemCommentsAnchor":"0","catItemK2Plugins":"1","itemDateCreated":"0","itemTitle":"1","itemFeaturedNotice":"0","itemAuthor":"0","itemFontResizer":"0","itemPrintButton":"0","itemEmailButton":"0","itemSocialButton":"0","itemVideoAnchor":"0","itemImageGalleryAnchor":"0","itemCommentsAnchor":"0","itemRating":"0","itemImage":"1","itemImgSize":"Small","itemImageMainCaption":"1","itemImageMainCredits":"1","itemIntroText":"1","itemFullText":"1","itemExtraFields":"1","itemDateModified":"0","itemHits":"0","itemCategory":"1","itemTags":"0","itemAttachments":"0","itemAttachmentsCounter":"0","itemVideo":"0","itemVideoWidth":"","itemVideoHeight":"","itemAudioWidth":"","itemAudioHeight":"","itemVideoAutoPlay":"0","itemVideoCaption":"0","itemVideoCredits":"0","itemImageGallery":"1","itemNavigation":"1","itemComments":"0","itemTwitterButton":"1","itemFacebookButton":"1","itemGooglePlusOneButton":"1","itemAuthorBlock":"0","itemAuthorImage":"0","itemAuthorDescription":"0","itemAuthorURL":"0","itemAuthorEmail":"0","itemAuthorLatest":"0","itemAuthorLatestLimit":"5","itemRelated":"1","itemRelatedLimit":"20","itemRelatedTitle":"1","itemRelatedCategory":"0","itemRelatedImageSize":"0","itemRelatedIntrotext":"0","itemRelatedFulltext":"0","itemRelatedAuthor":"0","itemRelatedMedia":"0","itemRelatedImageGallery":"0","itemK2Plugins":"1","catMetaDesc":"","catMetaKey":"","catMetaRobots":"","catMetaAuthor":""} [trash] => 0 [plugins] => [language] => * [_tbl:protected] => #__k2_categories [_tbl_key:protected] => id [_tbl_keys:protected] => Array ( [0] => id ) [_db:protected] => JDatabaseDriverMysqli Object ( [name] => mysqli [nameQuote:protected] => ` [nullDate:protected] => 0000-00-00 00:00:00 [_database:JDatabaseDriver:private] => surface_alpha [connection:protected] => mysqli Object ( [affected_rows] => -1 [client_info] => 5.6.21 [client_version] => 50621 [connect_errno] => 0 [connect_error] => [errno] => 0 [error] => [error_list] => Array ( ) [field_count] => 1 [host_info] => Localhost via UNIX socket [info] => [insert_id] => 0 [server_info] => 5.6.22 [server_version] => 50622 [stat] => Uptime: 3667 Threads: 3 Questions: 37808 Slow queries: 0 Opens: 261 Flush tables: 1 Open tables: 239 Queries per second avg: 10.310 [sqlstate] => 00000 [protocol_version] => 10 [thread_id] => 478 [warning_count] => 0 ) [count:protected] => 48 [cursor:protected] => [debug:protected] => [limit:protected] => 0 [log:protected] => Array ( ) [timings:protected] => Array ( ) [callStacks:protected] => Array ( ) [offset:protected] => 0 [options:protected] => Array ( [driver] => mysqli [host] => localhost [user] => surface_alpha [password] => UT*p65!38g5) [database] => surface_alpha [prefix] => ddxnf_ [select] => 1 [port] => 3306 [socket] => ) [sql:protected] => SELECT COUNT(*) FROM #__k2_comments WHERE itemID=11 AND published=1 [tablePrefix:protected] => ddxnf_ [utf:protected] => 1 [errorNum:protected] => 0 [errorMsg:protected] => [transactionDepth:protected] => 0 [disconnectHandlers:protected] => Array ( ) ) [_trackAssets:protected] => [_rules:protected] => [_locked:protected] => [_autoincrement:protected] => 1 [_observers:protected] => JObserverUpdater Object ( [observers:protected] => Array ( ) [doCallObservers:protected] => 1 ) [_jsonEncode:protected] => Array ( ) [_errors:protected] => Array ( ) [event] => stdClass Object ( [K2CategoryDisplay] => ) [metaDescription] => [metaKeywords] => [metaRobots] => [metaAuthor] => [link] => /premium-tile/by-collection/venetian-classics/itemlist/category/5-sun-valley-plank.html [text] => ) [user] => JUser Object ( [isRoot:protected] => [id] => 0 [name] => [username] => [email] => [password] => [password_clear] => [block] => [sendEmail] => 0 [registerDate] => [lastvisitDate] => [activation] => [params] => [groups] => Array ( [0] => 9 ) [guest] => 1 [lastResetTime] => [resetCount] => [requireReset] => [_params:protected] => Joomla\Registry\Registry Object ( [data:protected] => stdClass Object ( ) ) [_authGroups:protected] => Array ( [0] => 1 [1] => 9 ) [_authLevels:protected] => Array ( [0] => 1 [1] => 1 [2] => 5 ) [_authActions:protected] => [_errorMsg:protected] => [_errors:protected] => Array ( ) [aid] => 0 [gid] => 1 ) [feed] => /premium-tile/by-collection/venetian-classics/itemlist/category/5-sun-valley-plank.feed [leading] => Array ( ) [primary] => Array ( ) [secondary] => Array ( [0] => stdClass Object ( [id] => 17 [title] => Whitney White [alias] => whitney-white [catid] => 5 [published] => 1 [introtext] => Rustic Wood Effect Italian [fulltext] => Tile Outline [video] => [gallery] => Click to enlarge image Sun-Valley---Dark-Morro.jpg Title Click to enlarge image Sun-Valley---Dark-Morro.jpg Click to enlarge image Sun-Valley---Sugar-Brown.jpg Click to enlarge image Sun-Valley-Plank---Sage-Green.jpg [extra_fields] => Array ( [0] => stdClass Object ( [id] => 1 [name] => PEI Rating [value] => V [type] => textfield [group] => 1 [published] => 1 [ordering] => 1 [alias] => PEIRating ) [1] => stdClass Object ( [id] => 2 [name] => Shade Variation [value] => 3 [type] => textfield [group] => 1 [published] => 1 [ordering] => 2 [alias] => ShadeVariation ) [2] => stdClass Object ( [id] => 3 [name] => MOHS Rating [value] => * [type] => textfield [group] => 1 [published] => 1 [ordering] => 3 [alias] => MOHSRating ) [3] => stdClass Object ( [id] => 4 [name] => SCOF Wet [value] => 0.62 [type] => textfield [group] => 1 [published] => 1 [ordering] => 4 [alias] => SCOFWet ) [4] => stdClass Object ( [id] => 5 [name] => SCOF Dry [value] => 0.72 [type] => textfield [group] => 1 [published] => 1 [ordering] => 5 [alias] => SCOFDry ) [5] => stdClass Object ( [id] => 6 [name] => DCOF [value] => * [type] => textfield [group] => 1 [published] => 1 [ordering] => 6 [alias] => DCOF ) [6] => stdClass Object ( [id] => 7 [name] => Composition [value] => PORCELAIN, IMPERVIOUS [type] => textfield [group] => 1 [published] => 1 [ordering] => 7 [alias] => Composition ) [7] => stdClass Object ( [id] => 8 [name] => Usage [value] => INTERIOR, EXTERIOR [type] => textfield [group] => 1 [published] => 1 [ordering] => 8 [alias] => Usage ) [8] => stdClass Object ( [id] => 9 [name] => Installation [value] => FLOOR, WALL [type] => textfield [group] => 1 [published] => 1 [ordering] => 9 [alias] => Installation ) [9] => stdClass Object ( [id] => 10 [name] => Swatchboard [value] => http://www.surfaceartinc.com/files/Tile%20Images/Sun%20Valley%20Plank/svalley-bd2.jpg [type] => textfield [group] => 1 [published] => 1 [ordering] => 10 [alias] => Swatchboard ) [10] => stdClass Object ( [id] => 11 [name] => Suggested Grout [value] => Quartz Lock 2 #210 Cream [type] => textfield [group] => 1 [published] => 1 [ordering] => 11 [alias] => SuggestedGrout ) ) [extra_fields_search] => V 3 * 0.62 0.72 * PORCELAIN, IMPERVIOUS INTERIOR, EXTERIOR FLOOR, WALL http://www.surfaceartinc.com/files/Tile%20Images/Sun%20Valley%20Plank/svalley-bd2.jpg Quartz Lock 2 #210 Cream [created] => 2015-02-10 10:01:53 [created_by] => 381 [created_by_alias] => [checked_out] => 0 [checked_out_time] => 0000-00-00 00:00:00 [modified] => 2015-02-10 20:40:32 [modified_by] => 847 [publish_up] => 2015-02-10 10:01:53 [publish_down] => 0000-00-00 00:00:00 [trash] => 0 [access] => 1 [ordering] => 6 [featured] => 0 [featured_ordering] => 0 [image_caption] => [image_credits] => [video_caption] => [video_credits] => [hits] => 0 [params] => Joomla\Registry\Registry Object ( [data:protected] => stdClass Object ( [enable_css] => 1 [jQueryHandling] => 1.8remote [backendJQueryHandling] => remote [userName] => 1 [userImage] => 1 [userDescription] => 1 [userURL] => 1 [userEmail] => 0 [userFeedLink] => 1 [userFeedIcon] => 1 [userItemCount] => 10 [userItemTitle] => 1 [userItemTitleLinked] => 1 [userItemDateCreated] => 1 [userItemImage] => 1 [userItemIntroText] => 1 [userItemCategory] => 1 [userItemTags] => 1 [userItemCommentsAnchor] => 1 [userItemReadMore] => 1 [userItemK2Plugins] => 1 [tagItemCount] => 10 [tagItemTitle] => 1 [tagItemTitleLinked] => 1 [tagItemDateCreated] => 1 [tagItemImage] => 1 [tagItemIntroText] => 1 [tagItemCategory] => 1 [tagItemReadMore] => 1 [tagItemExtraFields] => 0 [tagOrdering] => [tagFeedLink] => 1 [tagFeedIcon] => 1 [genericItemCount] => 10 [genericItemTitle] => 1 [genericItemTitleLinked] => 1 [genericItemDateCreated] => 1 [genericItemImage] => 1 [genericItemIntroText] => 1 [genericItemCategory] => 1 [genericItemReadMore] => 1 [genericItemExtraFields] => 0 [genericFeedLink] => 1 [genericFeedIcon] => 1 [feedLimit] => 10 [feedItemImage] => 1 [feedImgSize] => S [feedItemIntroText] => 1 [feedTextWordLimit] => [feedItemFullText] => 1 [feedItemTags] => 0 [feedItemVideo] => 0 [feedItemGallery] => 0 [feedItemAttachments] => 0 [feedBogusEmail] => [introTextCleanup] => 0 [introTextCleanupExcludeTags] => [introTextCleanupTagAttr] => [fullTextCleanup] => 0 [fullTextCleanupExcludeTags] => [fullTextCleanupTagAttr] => [xssFiltering] => 0 [linkPopupWidth] => 900 [linkPopupHeight] => 600 [imagesQuality] => 100 [itemImageXS] => 76 [itemImageS] => 268 [itemImageM] => 556 [itemImageL] => 844 [itemImageXL] => 1132 [itemImageGeneric] => 556 [catImageWidth] => 268 [catImageDefault] => 1 [userImageWidth] => 172 [userImageDefault] => 1 [commenterImgWidth] => 76 [onlineImageEditor] => splashup [imageTimestamp] => 0 [imageMemoryLimit] => [socialButtonCode] => [twitterUsername] => [facebookImage] => Medium [comments] => 1 [commentsOrdering] => DESC [commentsLimit] => 10 [commentsFormPosition] => below [commentsPublishing] => 1 [commentsReporting] => 2 [commentsReportRecipient] => [inlineCommentsModeration] => 0 [gravatar] => 1 [antispam] => 0 [recaptchaForRegistered] => 1 [akismetForRegistered] => 1 [commentsFormNotes] => 1 [commentsFormNotesText] => [frontendEditing] => 1 [showImageTab] => 1 [showImageGalleryTab] => 1 [showVideoTab] => 1 [showExtraFieldsTab] => 1 [showAttachmentsTab] => 1 [showK2Plugins] => 1 [sideBarDisplayFrontend] => 0 [mergeEditors] => 1 [sideBarDisplay] => 1 [attachmentsFolder] => [hideImportButton] => 0 [googleSearch] => 0 [googleSearchContainer] => k2GoogleSearchContainer [K2UserProfile] => 1 [redirect] => 101 [adminSearch] => simple [cookieDomain] => [taggingSystem] => 1 [lockTags] => 0 [showTagFilter] => 0 [k2TagNorm] => 0 [k2TagNormCase] => lower [k2TagNormAdditionalReplacements] => [recaptcha_public_key] => [recaptcha_private_key] => [recaptcha_theme] => clean [recaptchaOnRegistration] => 0 [akismetApiKey] => [stopForumSpam] => 0 [stopForumSpamApiKey] => [showItemsCounterAdmin] => 1 [showChildCatItems] => 1 [disableCompactOrdering] => 0 [metaDescLimit] => 150 [enforceSEFReplacements] => 0 [SEFReplacements] => À|A, Á|A, Â|A, Ã|A, Ä|A, Å|A, à|a, á|a, â|a, ã|a, ä|a, å|a, Ā|A, ā|a, Ă|A, ă|a, Ą|A, ą|a, Ç|C, ç|c, Ć|C, ć|c, Ĉ|C, ĉ|c, Ċ|C, ċ|c, Č|C, č|c, Ð|D, ð|d, Ď|D, ď|d, Đ|D, đ|d, È|E, É|E, Ê|E, Ë|E, è|e, é|e, ê|e, ë|e, Ē|E, ē|e, Ĕ|E, ĕ|e, Ė|E, ė|e, Ę|E, ę|e, Ě|E, ě|e, Ĝ|G, ĝ|g, Ğ|G, ğ|g, Ġ|G, ġ|g, Ģ|G, ģ|g, Ĥ|H, ĥ|h, Ħ|H, ħ|h, Ì|I, Í|I, Î|I, Ï|I, ì|i, í|i, î|i, ï|i, Ĩ|I, ĩ|i, Ī|I, ī|i, Ĭ|I, ĭ|i, Į|I, į|i, İ|I, ı|i, Ĵ|J, ĵ|j, Ķ|K, ķ|k, ĸ|k, Ĺ|L, ĺ|l, Ļ|L, ļ|l, Ľ|L, ľ|l, Ŀ|L, ŀ|l, Ł|L, ł|l, Ñ|N, ñ|n, Ń|N, ń|n, Ņ|N, ņ|n, Ň|N, ň|n, ʼn|n, Ŋ|N, ŋ|n, Ò|O, Ó|O, Ô|O, Õ|O, Ö|O, Ø|O, ò|o, ó|o, ô|o, õ|o, ö|o, ø|o, Ō|O, ō|o, Ŏ|O, ŏ|o, Ő|O, ő|o, Ŕ|R, ŕ|r, Ŗ|R, ŗ|r, Ř|R, ř|r, Ś|S, ś|s, Ŝ|S, ŝ|s, Ş|S, ş|s, Š|S, š|s, ſ|s, Ţ|T, ţ|t, Ť|T, ť|t, Ŧ|T, ŧ|t, Ù|U, Ú|U, Û|U, Ü|U, ù|u, ú|u, û|u, ü|u, Ũ|U, ũ|u, Ū|U, ū|u, Ŭ|U, ŭ|u, Ů|U, ů|u, Ű|U, ű|u, Ų|U, ų|u, Ŵ|W, ŵ|w, Ý|Y, ý|y, ÿ|y, Ŷ|Y, ŷ|y, Ÿ|Y, Ź|Z, ź|z, Ż|Z, ż|z, Ž|Z, ž|z, α|a, β|b, γ|g, δ|d, ε|e, ζ|z, η|h, θ|th, ι|i, κ|k, λ|l, μ|m, ν|n, ξ|x, ο|o, π|p, ρ|r, σ|s, τ|t, υ|y, φ|f, χ|ch, ψ|ps, ω|w, Α|A, Β|B, Γ|G, Δ|D, Ε|E, Ζ|Z, Η|H, Θ|Th, Ι|I, Κ|K, Λ|L, Μ|M, Ξ|X, Ο|O, Π|P, Ρ|R, Σ|S, Τ|T, Υ|Y, Φ|F, Χ|Ch, Ψ|Ps, Ω|W, ά|a, έ|e, ή|h, ί|i, ό|o, ύ|y, ώ|w, Ά|A, Έ|E, Ή|H, Ί|I, Ό|O, Ύ|Y, Ώ|W, ϊ|i, ΐ|i, ϋ|y, ς|s, А|A, Ӑ|A, Ӓ|A, Ә|E, Ӛ|E, Ӕ|E, Б|B, В|V, Г|G, Ґ|G, Ѓ|G, Ғ|G, Ӷ|G, y|Y, Д|D, Е|E, Ѐ|E, Ё|YO, Ӗ|E, Ҽ|E, Ҿ|E, Є|YE, Ж|ZH, Ӂ|DZH, Җ|ZH, Ӝ|DZH, З|Z, Ҙ|Z, Ӟ|DZ, Ӡ|DZ, Ѕ|DZ, И|I, Ѝ|I, Ӥ|I, Ӣ|I, І|I, Ї|JI, Ӏ|I, Й|Y, Ҋ|Y, Ј|J, К|K, Қ|Q, Ҟ|Q, Ҡ|K, Ӄ|Q, Ҝ|K, Л|L, Ӆ|L, Љ|L, М|M, Ӎ|M, Н|N, Ӊ|N, Ң|N, Ӈ|N, Ҥ|N, Њ|N, О|O, Ӧ|O, Ө|O, Ӫ|O, Ҩ|O, П|P, Ҧ|PF, Р|P, Ҏ|P, С|S, Ҫ|S, Т|T, Ҭ|TH, Ћ|T, Ќ|K, У|U, Ў|U, Ӳ|U, Ӱ|U, Ӯ|U, Ү|U, Ұ|U, Ф|F, Х|H, Ҳ|H, Һ|H, Ц|TS, Ҵ|TS, Ч|CH, Ӵ|CH, Ҷ|CH, Ӌ|CH, Ҹ|CH, Џ|DZ, Ш|SH, Щ|SHT, Ъ|A, Ы|Y, Ӹ|Y, Ь|Y, Ҍ|Y, Э|E, Ӭ|E, Ю|YU, Я|YA, а|a, ӑ|a, ӓ|a, ә|e, ӛ|e, ӕ|e, б|b, в|v, г|g, ґ|g, ѓ|g, ғ|g, ӷ|g, y|y, д|d, е|e, ѐ|e, ё|yo, ӗ|e, ҽ|e, ҿ|e, є|ye, ж|zh, ӂ|dzh, җ|zh, ӝ|dzh, з|z, ҙ|z, ӟ|dz, ӡ|dz, ѕ|dz, и|i, ѝ|i, ӥ|i, ӣ|i, і|i, ї|ji, Ӏ|i, й|y, ҋ|y, ј|j, к|k, қ|q, ҟ|q, ҡ|k, ӄ|q, ҝ|k, л|l, ӆ|l, љ|l, м|m, ӎ|m, н|n, ӊ|n, ң|n, ӈ|n, ҥ|n, њ|n, о|o, ӧ|o, ө|o, ӫ|o, ҩ|o, п|p, ҧ|pf, р|p, ҏ|p, с|s, ҫ|s, т|t, ҭ|th, ћ|t, ќ|k, у|u, ў|u, ӳ|u, ӱ|u, ӯ|u, ү|u, ұ|u, ф|f, х|h, ҳ|h, һ|h, ц|ts, ҵ|ts, ч|ch, ӵ|ch, ҷ|ch, ӌ|ch, ҹ|ch, џ|dz, ш|sh, щ|sht, ъ|a, ы|y, ӹ|y, ь|y, ҍ|y, э|e, ӭ|e, ю|yu, я|ya [k2Sef] => 0 [k2SefLabelCat] => content [k2SefLabelTag] => tag [k2SefLabelUser] => author [k2SefLabelSearch] => search [k2SefLabelDate] => date [k2SefLabelItem] => 0 [k2SefLabelItemCustomPrefix] => [k2SefInsertItemId] => 1 [k2SefItemIdTitleAliasSep] => dash [k2SefUseItemTitleAlias] => 1 [k2SefInsertCatId] => 1 [k2SefCatIdTitleAliasSep] => dash [k2SefUseCatTitleAlias] => 1 [sh404SefLabelCat] => [sh404SefLabelUser] => blog [sh404SefLabelItem] => 2 [sh404SefTitleAlias] => alias [sh404SefModK2ContentFeedAlias] => feed [sh404SefInsertItemId] => 0 [sh404SefInsertUniqueItemId] => 0 [cbIntegration] => 0 [categories] => Array ( [0] => 6 ) [menu_text] => 1 [show_page_heading] => 0 [secure] => 0 [mega_showtitle] => 1 [mega_tooltip] => 0 [mega_cols] => 1 [mega_group] => 0 [submenu_align] => auto [mega_subcontent] => 0 [page_title] => Venetian Classics [page_description] => Premium tile and stone [page_rights] => [robots] => [inheritFrom] => 0 [theme] => product [num_leading_items] => 0 [num_leading_columns] => 1 [leadingImgSize] => Large [num_primary_items] => 0 [num_primary_columns] => 2 [primaryImgSize] => Medium [num_secondary_items] => 40 [num_secondary_columns] => 3 [secondaryImgSize] => Small [num_links] => 0 [num_links_columns] => 1 [linksImgSize] => XSmall [catCatalogMode] => 0 [catFeaturedItems] => 1 [catPagination] => 2 [catPaginationResults] => 1 [catTitle] => 1 [catTitleItemCounter] => 0 [catDescription] => 1 [catImage] => 0 [catFeedLink] => 1 [catFeedIcon] => 1 [subCategories] => 1 [subCatColumns] => 2 [subCatTitle] => 1 [subCatTitleItemCounter] => 1 [subCatDescription] => 1 [subCatImage] => 1 [catItemTitle] => 1 [catItemTitleLinked] => 0 [catItemFeaturedNotice] => 0 [catItemAuthor] => 0 [catItemDateCreated] => 0 [catItemRating] => 0 [catItemImage] => 1 [catItemIntroText] => 1 [catItemExtraFields] => 1 [catItemHits] => 0 [catItemCategory] => 1 [catItemTags] => 1 [catItemAttachments] => 0 [catItemAttachmentsCounter] => 0 [catItemVideo] => 0 [catItemVideoAutoPlay] => 0 [catItemImageGallery] => 1 [catItemDateModified] => 0 [catItemReadMore] => 0 [catItemCommentsAnchor] => 0 [catItemK2Plugins] => 1 [itemDateCreated] => 0 [itemTitle] => 1 [itemFeaturedNotice] => 0 [itemAuthor] => 0 [itemFontResizer] => 0 [itemPrintButton] => 0 [itemEmailButton] => 0 [itemSocialButton] => 0 [itemVideoAnchor] => 0 [itemImageGalleryAnchor] => 0 [itemCommentsAnchor] => 0 [itemRating] => 0 [itemImage] => 1 [itemImgSize] => Small [itemImageMainCaption] => 1 [itemImageMainCredits] => 1 [itemIntroText] => 1 [itemFullText] => 1 [itemExtraFields] => 1 [itemDateModified] => 0 [itemHits] => 0 [itemCategory] => 1 [itemTags] => 0 [itemAttachments] => 0 [itemAttachmentsCounter] => 0 [itemVideo] => 0 [itemVideoAutoPlay] => 0 [itemVideoCaption] => 0 [itemVideoCredits] => 0 [itemImageGallery] => 1 [itemNavigation] => 1 [itemComments] => 0 [itemTwitterButton] => 1 [itemFacebookButton] => 1 [itemGooglePlusOneButton] => 1 [itemAuthorBlock] => 0 [itemAuthorImage] => 0 [itemAuthorDescription] => 0 [itemAuthorURL] => 0 [itemAuthorEmail] => 0 [itemAuthorLatest] => 0 [itemAuthorLatestLimit] => 5 [itemRelated] => 1 [itemRelatedLimit] => 20 [itemRelatedTitle] => 1 [itemRelatedCategory] => 0 [itemRelatedImageSize] => 0 [itemRelatedIntrotext] => 0 [itemRelatedFulltext] => 0 [itemRelatedAuthor] => 0 [itemRelatedMedia] => 0 [itemRelatedImageGallery] => 0 [itemK2Plugins] => 1 ) )
  • Alan Campbell
  • Alan Campbell's Avatar
11 Feb 2015 01:22
Problems with field validation was created by Alan Campbell

Problems with field validation

Category: English K2 Community

Hello again!

I'm having some trouble with K2 Extra Fields.

I have a front end editing form that I want all fields to be required and need to validate the data entered. Unfortunately, validation isn't working.

I have had this problem since I had vanilla K2 plus vanilla Joomla. I tried lots of different was to get around it to no avail.
- Using different templates
- Disabling templates on the user form
- Using the Joomla validation (which is turned on in the example below but has no effect)
- JQuery no-conflict mode


To see the issue:
Go to chl.soc.srcf.net/quid/
Click on the three little bars at top-left to open the login panel.
Log in with the test credentials:
User = testymctest
Pass = test

Then go to chl.soc.srcf.net/quid/submit-a-project

The form only seems to require title and dates, despite me setting all to required in the backend.

Dates aren't validated at all and you can enter anything without validation---this causes the site to freak out whenever this item is shown with a DateTime parse error. So there's no validation on front or backend.

Can anyone help me?

Alan
  • Michael Yaeger
  • Michael Yaeger's Avatar
11 Feb 2015 00:33
Replied by Michael Yaeger on topic [SOLVED] K2 Data Map

[SOLVED] K2 Data Map

Category: English K2 Community

I did a print_r command on the item array and got the following output:
stdClass Object ( [id] => 3 [title] => Wild Juniper [alias] => wild-juniper [catid] => 4 [published] => 1 [introtext] => High Density Ceramic Body Porcelain Finish Light Commercial Interior Use Rustic Travertine Effect [fulltext] => Tile Outline [video] => [gallery] => Click to enlarge image sunvalleyplank.jpg Mojave Scene #1 Click to enlarge image sunvalleyplank.jpg Click to enlarge image sunvalleyplank2.jpg Click to enlarge image sunvalleyplank3.jpg [extra_fields] => Array ( [0] => stdClass Object ( [id] => 1 [name] => PEI Rating [value] => III [type] => textfield [group] => 1 [published] => 1 [ordering] => 1 [alias] => PEIRating ) [1] => stdClass Object ( [id] => 2 [name] => Shade Variation [value] => 1 [type] => textfield [group] => 1 [published] => 1 [ordering] => 2 [alias] => ShadeVariation ) [2] => stdClass Object ( [id] => 3 [name] => MOHS Rating [value] => 3 [type] => textfield [group] => 1 [published] => 1 [ordering] => 3 [alias] => MOHSRating ) [3] => stdClass Object ( [id] => 4 [name] => SCOF Wet [value] => 0.63 [type] => textfield [group] => 1 [published] => 1 [ordering] => 4 [alias] => SCOFWet ) [4] => stdClass Object ( [id] => 5 [name] => SCOF Dry [value] => 0.86 [type] => textfield [group] => 1 [published] => 1 [ordering] => 5 [alias] => SCOFDry ) [5] => stdClass Object ( [id] => 6 [name] => DCOF [value] => 0.65 [type] => textfield [group] => 1 [published] => 1 [ordering] => 6 [alias] => DCOF ) [6] => stdClass Object ( [id] => 7 [name] => Composition [value] => High Density Ceramic Body [type] => textfield [group] => 1 [published] => 1 [ordering] => 7 [alias] => Composition ) [7] => stdClass Object ( [id] => 8 [name] => Usage [value] => Interior [type] => textfield [group] => 1 [published] => 1 [ordering] => 8 [alias] => Usage ) [8] => stdClass Object ( [id] => 9 [name] => Installation [value] => Floor, Wall [type] => textfield [group] => 1 [published] => 1 [ordering] => 9 [alias] => Installation ) [9] => stdClass Object ( [id] => 10 [name] => Swatchboard [value] => http://www.surfaceartinc.com/files/Tile%20Images/Mojave/mojave-bd.jpg [type] => textfield [group] => 1 [published] => 1 [ordering] => 10 [alias] => Swatchboard ) [10] => stdClass Object ( [id] => 11 [name] => Suggested Grout [value] => http://www.surfaceartinc.com/files/Grout/quartzlock-swatch.png [type] => textfield [group] => 1 [published] => 1 [ordering] => 11 [alias] => SuggestedGrout ) [11] => stdClass Object ( [id] => 12 [name] => Complimentary Glass [value] => http://www.surfaceartinc.com/files/Glass/cl-gl-slate-zm.jpg [type] => textfield [group] => 1 [published] => 1 [ordering] => 12 [alias] => ComplimentaryGlass ) ) [extra_fields_search] => III 1 3 0.63 0.86 0.65 High Density Ceramic Body Interior Floor, Wall http://www.surfaceartinc.com/files/Tile%20Images/Mojave/mojave-bd.jpg http://www.surfaceartinc.com/files/Grout/quartzlock-swatch.png http://www.surfaceartinc.com/files/Glass/cl-gl-slate-zm.jpg [created] => 2015-01-29 16:45:09 [created_by] => 381 [created_by_alias] => [checked_out] => 0 [checked_out_time] => 0000-00-00 00:00:00 [modified] => 2015-02-10 18:56:53 [modified_by] => 847 [publish_up] => 2015-01-29 16:45:09 [publish_down] => 0000-00-00 00:00:00 [trash] => 0 [access] => 1 [ordering] => 1 [featured] => 0 [featured_ordering] => 0 [image_caption] => [image_credits] => [video_caption] => [video_credits] => [hits] => 5 [params] => Joomla\Registry\Registry Object ( [data:protected] => stdClass Object ( [enable_css] => 1 [jQueryHandling] => 1.8remote [backendJQueryHandling] => remote [userName] => 1 [userImage] => 1 [userDescription] => 1 [userURL] => 1 [userEmail] => 0 [userFeedLink] => 1 [userFeedIcon] => 1 [userItemCount] => 10 [userItemTitle] => 1 [userItemTitleLinked] => 1 [userItemDateCreated] => 1 [userItemImage] => 1 [userItemIntroText] => 1 [userItemCategory] => 1 [userItemTags] => 1 [userItemCommentsAnchor] => 1 [userItemReadMore] => 1 [userItemK2Plugins] => 1 [tagItemCount] => 10 [tagItemTitle] => 1 [tagItemTitleLinked] => 1 [tagItemDateCreated] => 1 [tagItemImage] => 1 [tagItemIntroText] => 1 [tagItemCategory] => 1 [tagItemReadMore] => 1 [tagItemExtraFields] => 0 [tagOrdering] => [tagFeedLink] => 1 [tagFeedIcon] => 1 [genericItemCount] => 10 [genericItemTitle] => 1 [genericItemTitleLinked] => 1 [genericItemDateCreated] => 1 [genericItemImage] => 1 [genericItemIntroText] => 1 [genericItemCategory] => 1 [genericItemReadMore] => 1 [genericItemExtraFields] => 0 [genericFeedLink] => 1 [genericFeedIcon] => 1 [feedLimit] => 10 [feedItemImage] => 1 [feedImgSize] => S [feedItemIntroText] => 1 [feedTextWordLimit] => [feedItemFullText] => 1 [feedItemTags] => 0 [feedItemVideo] => 0 [feedItemGallery] => 0 [feedItemAttachments] => 0 [feedBogusEmail] => [introTextCleanup] => 0 [introTextCleanupExcludeTags] => [introTextCleanupTagAttr] => [fullTextCleanup] => 0 [fullTextCleanupExcludeTags] => [fullTextCleanupTagAttr] => [xssFiltering] => 0 [linkPopupWidth] => 900 [linkPopupHeight] => 600 [imagesQuality] => 100 [itemImageXS] => 76 [itemImageS] => 268 [itemImageM] => 556 [itemImageL] => 844 [itemImageXL] => 1132 [itemImageGeneric] => 556 [catImageWidth] => 268 [catImageDefault] => 1 [userImageWidth] => 172 [userImageDefault] => 1 [commenterImgWidth] => 76 [onlineImageEditor] => splashup [imageTimestamp] => 0 [imageMemoryLimit] => [socialButtonCode] => [twitterUsername] => [facebookImage] => Medium [comments] => 1 [commentsOrdering] => DESC [commentsLimit] => 10 [commentsFormPosition] => below [commentsPublishing] => 1 [commentsReporting] => 2 [commentsReportRecipient] => [inlineCommentsModeration] => 0 [gravatar] => 1 [antispam] => 0 [recaptchaForRegistered] => 1 [akismetForRegistered] => 1 [commentsFormNotes] => 1 [commentsFormNotesText] => [frontendEditing] => 1 [showImageTab] => 1 [showImageGalleryTab] => 1 [showVideoTab] => 1 [showExtraFieldsTab] => 1 [showAttachmentsTab] => 1 [showK2Plugins] => 1 [sideBarDisplayFrontend] => 0 [mergeEditors] => 1 [sideBarDisplay] => 1 [attachmentsFolder] => [hideImportButton] => 0 [googleSearch] => 0 [googleSearchContainer] => k2GoogleSearchContainer [K2UserProfile] => 1 [redirect] => 101 [adminSearch] => simple [cookieDomain] => [taggingSystem] => 1 [lockTags] => 0 [showTagFilter] => 0 [k2TagNorm] => 0 [k2TagNormCase] => lower [k2TagNormAdditionalReplacements] => [recaptcha_public_key] => [recaptcha_private_key] => [recaptcha_theme] => clean [recaptchaOnRegistration] => 0 [akismetApiKey] => [stopForumSpam] => 0 [stopForumSpamApiKey] => [showItemsCounterAdmin] => 1 [showChildCatItems] => 1 [disableCompactOrdering] => 0 [metaDescLimit] => 150 [enforceSEFReplacements] => 0 [SEFReplacements] => À|A, Á|A, Â|A, Ã|A, Ä|A, Å|A, à|a, á|a, â|a, ã|a, ä|a, å|a, Ā|A, ā|a, Ă|A, ă|a, Ą|A, ą|a, Ç|C, ç|c, Ć|C, ć|c, Ĉ|C, ĉ|c, Ċ|C, ċ|c, Č|C, č|c, Ð|D, ð|d, Ď|D, ď|d, Đ|D, đ|d, È|E, É|E, Ê|E, Ë|E, è|e, é|e, ê|e, ë|e, Ē|E, ē|e, Ĕ|E, ĕ|e, Ė|E, ė|e, Ę|E, ę|e, Ě|E, ě|e, Ĝ|G, ĝ|g, Ğ|G, ğ|g, Ġ|G, ġ|g, Ģ|G, ģ|g, Ĥ|H, ĥ|h, Ħ|H, ħ|h, Ì|I, Í|I, Î|I, Ï|I, ì|i, í|i, î|i, ï|i, Ĩ|I, ĩ|i, Ī|I, ī|i, Ĭ|I, ĭ|i, Į|I, į|i, İ|I, ı|i, Ĵ|J, ĵ|j, Ķ|K, ķ|k, ĸ|k, Ĺ|L, ĺ|l, Ļ|L, ļ|l, Ľ|L, ľ|l, Ŀ|L, ŀ|l, Ł|L, ł|l, Ñ|N, ñ|n, Ń|N, ń|n, Ņ|N, ņ|n, Ň|N, ň|n, ʼn|n, Ŋ|N, ŋ|n, Ò|O, Ó|O, Ô|O, Õ|O, Ö|O, Ø|O, ò|o, ó|o, ô|o, õ|o, ö|o, ø|o, Ō|O, ō|o, Ŏ|O, ŏ|o, Ő|O, ő|o, Ŕ|R, ŕ|r, Ŗ|R, ŗ|r, Ř|R, ř|r, Ś|S, ś|s, Ŝ|S, ŝ|s, Ş|S, ş|s, Š|S, š|s, ſ|s, Ţ|T, ţ|t, Ť|T, ť|t, Ŧ|T, ŧ|t, Ù|U, Ú|U, Û|U, Ü|U, ù|u, ú|u, û|u, ü|u, Ũ|U, ũ|u, Ū|U, ū|u, Ŭ|U, ŭ|u, Ů|U, ů|u, Ű|U, ű|u, Ų|U, ų|u, Ŵ|W, ŵ|w, Ý|Y, ý|y, ÿ|y, Ŷ|Y, ŷ|y, Ÿ|Y, Ź|Z, ź|z, Ż|Z, ż|z, Ž|Z, ž|z, α|a, β|b, γ|g, δ|d, ε|e, ζ|z, η|h, θ|th, ι|i, κ|k, λ|l, μ|m, ν|n, ξ|x, ο|o, π|p, ρ|r, σ|s, τ|t, υ|y, φ|f, χ|ch, ψ|ps, ω|w, Α|A, Β|B, Γ|G, Δ|D, Ε|E, Ζ|Z, Η|H, Θ|Th, Ι|I, Κ|K, Λ|L, Μ|M, Ξ|X, Ο|O, Π|P, Ρ|R, Σ|S, Τ|T, Υ|Y, Φ|F, Χ|Ch, Ψ|Ps, Ω|W, ά|a, έ|e, ή|h, ί|i, ό|o, ύ|y, ώ|w, Ά|A, Έ|E, Ή|H, Ί|I, Ό|O, Ύ|Y, Ώ|W, ϊ|i, ΐ|i, ϋ|y, ς|s, А|A, Ӑ|A, Ӓ|A, Ә|E, Ӛ|E, Ӕ|E, Б|B, В|V, Г|G, Ґ|G, Ѓ|G, Ғ|G, Ӷ|G, y|Y, Д|D, Е|E, Ѐ|E, Ё|YO, Ӗ|E, Ҽ|E, Ҿ|E, Є|YE, Ж|ZH, Ӂ|DZH, Җ|ZH, Ӝ|DZH, З|Z, Ҙ|Z, Ӟ|DZ, Ӡ|DZ, Ѕ|DZ, И|I, Ѝ|I, Ӥ|I, Ӣ|I, І|I, Ї|JI, Ӏ|I, Й|Y, Ҋ|Y, Ј|J, К|K, Қ|Q, Ҟ|Q, Ҡ|K, Ӄ|Q, Ҝ|K, Л|L, Ӆ|L, Љ|L, М|M, Ӎ|M, Н|N, Ӊ|N, Ң|N, Ӈ|N, Ҥ|N, Њ|N, О|O, Ӧ|O, Ө|O, Ӫ|O, Ҩ|O, П|P, Ҧ|PF, Р|P, Ҏ|P, С|S, Ҫ|S, Т|T, Ҭ|TH, Ћ|T, Ќ|K, У|U, Ў|U, Ӳ|U, Ӱ|U, Ӯ|U, Ү|U, Ұ|U, Ф|F, Х|H, Ҳ|H, Һ|H, Ц|TS, Ҵ|TS, Ч|CH, Ӵ|CH, Ҷ|CH, Ӌ|CH, Ҹ|CH, Џ|DZ, Ш|SH, Щ|SHT, Ъ|A, Ы|Y, Ӹ|Y, Ь|Y, Ҍ|Y, Э|E, Ӭ|E, Ю|YU, Я|YA, а|a, ӑ|a, ӓ|a, ә|e, ӛ|e, ӕ|e, б|b, в|v, г|g, ґ|g, ѓ|g, ғ|g, ӷ|g, y|y, д|d, е|e, ѐ|e, ё|yo, ӗ|e, ҽ|e, ҿ|e, є|ye, ж|zh, ӂ|dzh, җ|zh, ӝ|dzh, з|z, ҙ|z, ӟ|dz, ӡ|dz, ѕ|dz, и|i, ѝ|i, ӥ|i, ӣ|i, і|i, ї|ji, Ӏ|i, й|y, ҋ|y, ј|j, к|k, қ|q, ҟ|q, ҡ|k, ӄ|q, ҝ|k, л|l, ӆ|l, љ|l, м|m, ӎ|m, н|n, ӊ|n, ң|n, ӈ|n, ҥ|n, њ|n, о|o, ӧ|o, ө|o, ӫ|o, ҩ|o, п|p, ҧ|pf, р|p, ҏ|p, с|s, ҫ|s, т|t, ҭ|th, ћ|t, ќ|k, у|u, ў|u, ӳ|u, ӱ|u, ӯ|u, ү|u, ұ|u, ф|f, х|h, ҳ|h, һ|h, ц|ts, ҵ|ts, ч|ch, ӵ|ch, ҷ|ch, ӌ|ch, ҹ|ch, џ|dz, ш|sh, щ|sht, ъ|a, ы|y, ӹ|y, ь|y, ҍ|y, э|e, ӭ|e, ю|yu, я|ya [k2Sef] => 0 [k2SefLabelCat] => content [k2SefLabelTag] => tag [k2SefLabelUser] => author [k2SefLabelSearch] => search [k2SefLabelDate] => date [k2SefLabelItem] => 0 [k2SefLabelItemCustomPrefix] => [k2SefInsertItemId] => 1 [k2SefItemIdTitleAliasSep] => dash [k2SefUseItemTitleAlias] => 1 [k2SefInsertCatId] => 1 [k2SefCatIdTitleAliasSep] => dash [k2SefUseCatTitleAlias] => 1 [sh404SefLabelCat] => [sh404SefLabelUser] => blog [sh404SefLabelItem] => 2 [sh404SefTitleAlias] => alias [sh404SefModK2ContentFeedAlias] => feed [sh404SefInsertItemId] => 0 [sh404SefInsertUniqueItemId] => 0 [cbIntegration] => 0 [categories] => Array ( [0] => 3 ) [menu_text] => 1 [show_page_heading] => 0 [secure] => 0 [mega_showtitle] => 1 [mega_tooltip] => 0 [mega_cols] => 1 [mega_group] => 0 [submenu_align] => auto [mega_subcontent] => 0 [page_title] => High Desert [page_description] => Premium tile and stone [page_rights] => [robots] => [inheritFrom] => 0 [theme] => product [num_leading_items] => 0 [num_leading_columns] => 1 [leadingImgSize] => Large [num_primary_items] => 0 [num_primary_columns] => 2 [primaryImgSize] => Medium [num_secondary_items] => 40 [num_secondary_columns] => 3 [secondaryImgSize] => Small [num_links] => 0 [num_links_columns] => 1 [linksImgSize] => XSmall [catCatalogMode] => 0 [catFeaturedItems] => 1 [catPagination] => 2 [catPaginationResults] => 1 [catTitle] => 1 [catTitleItemCounter] => 0 [catDescription] => 1 [catImage] => 0 [catFeedLink] => 1 [catFeedIcon] => 1 [subCategories] => 1 [subCatColumns] => 2 [subCatTitle] => 1 [subCatTitleItemCounter] => 1 [subCatDescription] => 1 [subCatImage] => 1 [catItemTitle] => 1 [catItemTitleLinked] => 0 [catItemFeaturedNotice] => 0 [catItemAuthor] => 0 [catItemDateCreated] => 0 [catItemRating] => 0 [catItemImage] => 1 [catItemIntroText] => 1 [catItemExtraFields] => 1 [catItemHits] => 0 [catItemCategory] => 1 [catItemTags] => 1 [catItemAttachments] => 0 [catItemAttachmentsCounter] => 0 [catItemVideo] => 0 [catItemVideoAutoPlay] => 0 [catItemImageGallery] => 1 [catItemDateModified] => 0 [catItemReadMore] => 0 [catItemCommentsAnchor] => 0 [catItemK2Plugins] => 1 [itemDateCreated] => 0 [itemTitle] => 1 [itemFeaturedNotice] => 0 [itemAuthor] => 0 [itemFontResizer] => 0 [itemPrintButton] => 0 [itemEmailButton] => 0 [itemSocialButton] => 0 [itemVideoAnchor] => 0 [itemImageGalleryAnchor] => 0 [itemCommentsAnchor] => 0 [itemRating] => 0 [itemImage] => 1 [itemImgSize] => Small [itemImageMainCaption] => 1 [itemImageMainCredits] => 1 [itemIntroText] => 1 [itemFullText] => 1 [itemExtraFields] => 1 [itemDateModified] => 0 [itemHits] => 0 [itemCategory] => 1 [itemTags] => 0 [itemAttachments] => 0 [itemAttachmentsCounter] => 0 [itemVideo] => 0 [itemVideoAutoPlay] => 0 [itemVideoCaption] => 0 [itemVideoCredits] => 0 [itemImageGallery] => 1 [itemNavigation] => 1 [itemComments] => 0 [itemTwitterButton] => 1 [itemFacebookButton] => 1 [itemGooglePlusOneButton] => 1 [itemAuthorBlock] => 0 [itemAuthorImage] => 0 [itemAuthorDescription] => 0 [itemAuthorURL] => 0 [itemAuthorEmail] => 0 [itemAuthorLatest] => 0 [itemAuthorLatestLimit] => 5 [itemRelated] => 1 [itemRelatedLimit] => 20 [itemRelatedTitle] => 1 [itemRelatedCategory] => 0 [itemRelatedImageSize] => 0 [itemRelatedIntrotext] => 0 [itemRelatedFulltext] => 0 [itemRelatedAuthor] => 0 [itemRelatedMedia] => 0 [itemRelatedImageGallery] => 0 [itemK2Plugins] => 1 [galleries_rootfolder] => [vfolder] => [afolder] => [vwidth] => [vheight] => [autoplay] => [enabledownload] => ) ) [metadesc] => [metadata] => robots= author= [metakey] => [plugins] => [language] => * [categoryname] => Mojave [categoryid] => 4 [categoryalias] => mojave [categoryparams] => {"inheritFrom":"0","theme":"product","num_leading_items":"0","num_leading_columns":"1","leadingImgSize":"Large","num_primary_items":"0","num_primary_columns":"2","primaryImgSize":"Medium","num_secondary_items":"40","num_secondary_columns":"3","secondaryImgSize":"Small","num_links":"0","num_links_columns":"1","linksImgSize":"XSmall","catCatalogMode":"0","catFeaturedItems":"1","catOrdering":"","catPagination":"2","catPaginationResults":"1","catTitle":"1","catTitleItemCounter":"0","catDescription":"1","catImage":"0","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":"0","catItemFeaturedNotice":"0","catItemAuthor":"0","catItemDateCreated":"0","catItemRating":"0","catItemImage":"1","catItemIntroText":"1","catItemIntroTextWordLimit":"","catItemExtraFields":"1","catItemHits":"0","catItemCategory":"1","catItemTags":"1","catItemAttachments":"0","catItemAttachmentsCounter":"0","catItemVideo":"0","catItemVideoWidth":"","catItemVideoHeight":"","catItemAudioWidth":"","catItemAudioHeight":"","catItemVideoAutoPlay":"0","catItemImageGallery":"1","catItemDateModified":"0","catItemReadMore":"0","catItemCommentsAnchor":"0","catItemK2Plugins":"1","itemDateCreated":"0","itemTitle":"1","itemFeaturedNotice":"0","itemAuthor":"0","itemFontResizer":"0","itemPrintButton":"0","itemEmailButton":"0","itemSocialButton":"0","itemVideoAnchor":"0","itemImageGalleryAnchor":"0","itemCommentsAnchor":"0","itemRating":"0","itemImage":"1","itemImgSize":"Small","itemImageMainCaption":"1","itemImageMainCredits":"1","itemIntroText":"1","itemFullText":"1","itemExtraFields":"1","itemDateModified":"0","itemHits":"0","itemCategory":"1","itemTags":"0","itemAttachments":"0","itemAttachmentsCounter":"0","itemVideo":"0","itemVideoWidth":"","itemVideoHeight":"","itemAudioWidth":"","itemAudioHeight":"","itemVideoAutoPlay":"0","itemVideoCaption":"0","itemVideoCredits":"0","itemImageGallery":"1","itemNavigation":"1","itemComments":"0","itemTwitterButton":"1","itemFacebookButton":"1","itemGooglePlusOneButton":"1","itemAuthorBlock":"0","itemAuthorImage":"0","itemAuthorDescription":"0","itemAuthorURL":"0","itemAuthorEmail":"0","itemAuthorLatest":"0","itemAuthorLatestLimit":"5","itemRelated":"1","itemRelatedLimit":"20","itemRelatedTitle":"1","itemRelatedCategory":"0","itemRelatedImageSize":"0","itemRelatedIntrotext":"0","itemRelatedFulltext":"0","itemRelatedAuthor":"0","itemRelatedMedia":"0","itemRelatedImageGallery":"0","itemK2Plugins":"1","catMetaDesc":"","catMetaKey":"","catMetaRobots":"","catMetaAuthor":""} [itemGroup] => secondary [category] => TableK2Category Object ( [id] => 4 [name] => Mojave [alias] => mojave [description] => [parent] => 3 [extraFieldsGroup] => 1 [published] => 1 [image] => 4.jpg [access] => 1 [ordering] => 1 [params] => {"inheritFrom":"0","theme":"product","num_leading_items":"0","num_leading_columns":"1","leadingImgSize":"Large","num_primary_items":"0","num_primary_columns":"2","primaryImgSize":"Medium","num_secondary_items":"40","num_secondary_columns":"3","secondaryImgSize":"Small","num_links":"0","num_links_columns":"1","linksImgSize":"XSmall","catCatalogMode":"0","catFeaturedItems":"1","catOrdering":"","catPagination":"2","catPaginationResults":"1","catTitle":"1","catTitleItemCounter":"0","catDescription":"1","catImage":"0","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":"0","catItemFeaturedNotice":"0","catItemAuthor":"0","catItemDateCreated":"0","catItemRating":"0","catItemImage":"1","catItemIntroText":"1","catItemIntroTextWordLimit":"","catItemExtraFields":"1","catItemHits":"0","catItemCategory":"1","catItemTags":"1","catItemAttachments":"0","catItemAttachmentsCounter":"0","catItemVideo":"0","catItemVideoWidth":"","catItemVideoHeight":"","catItemAudioWidth":"","catItemAudioHeight":"","catItemVideoAutoPlay":"0","catItemImageGallery":"1","catItemDateModified":"0","catItemReadMore":"0","catItemCommentsAnchor":"0","catItemK2Plugins":"1","itemDateCreated":"0","itemTitle":"1","itemFeaturedNotice":"0","itemAuthor":"0","itemFontResizer":"0","itemPrintButton":"0","itemEmailButton":"0","itemSocialButton":"0","itemVideoAnchor":"0","itemImageGalleryAnchor":"0","itemCommentsAnchor":"0","itemRating":"0","itemImage":"1","itemImgSize":"Small","itemImageMainCaption":"1","itemImageMainCredits":"1","itemIntroText":"1","itemFullText":"1","itemExtraFields":"1","itemDateModified":"0","itemHits":"0","itemCategory":"1","itemTags":"0","itemAttachments":"0","itemAttachmentsCounter":"0","itemVideo":"0","itemVideoWidth":"","itemVideoHeight":"","itemAudioWidth":"","itemAudioHeight":"","itemVideoAutoPlay":"0","itemVideoCaption":"0","itemVideoCredits":"0","itemImageGallery":"1","itemNavigation":"1","itemComments":"0","itemTwitterButton":"1","itemFacebookButton":"1","itemGooglePlusOneButton":"1","itemAuthorBlock":"0","itemAuthorImage":"0","itemAuthorDescription":"0","itemAuthorURL":"0","itemAuthorEmail":"0","itemAuthorLatest":"0","itemAuthorLatestLimit":"5","itemRelated":"1","itemRelatedLimit":"20","itemRelatedTitle":"1","itemRelatedCategory":"0","itemRelatedImageSize":"0","itemRelatedIntrotext":"0","itemRelatedFulltext":"0","itemRelatedAuthor":"0","itemRelatedMedia":"0","itemRelatedImageGallery":"0","itemK2Plugins":"1","catMetaDesc":"","catMetaKey":"","catMetaRobots":"","catMetaAuthor":""} [trash] => 0 [plugins] => [language] => * [_tbl:protected] => #__k2_categories [_tbl_key:protected] => id [_tbl_keys:protected] => Array ( [0] => id ) [_db:protected] => JDatabaseDriverMysqli Object ( [name] => mysqli [nameQuote:protected] => ` [nullDate:protected] => 0000-00-00 00:00:00 [_database:JDatabaseDriver:private] => surface_alpha [connection:protected] => mysqli Object ( [affected_rows] => 1 [client_info] => 5.6.21 [client_version] => 50621 [connect_errno] => 0 [connect_error] => [errno] => 0 [error] => [error_list] => Array ( ) [field_count] => 1 [host_info] => Localhost via UNIX socket [info] => [insert_id] => 0 [server_info] => 5.6.22 [server_version] => 50622 [stat] => Uptime: 572306 Threads: 3 Questions: 15141512 Slow queries: 10 Opens: 78128 Flush tables: 7 Open tables: 768 Queries per second avg: 26.457 [sqlstate] => 00000 [protocol_version] => 10 [thread_id] => 84448 [warning_count] => 0 ) [count:protected] => 47 [cursor:protected] => [debug:protected] => [limit:protected] => 0 [log:protected] => Array ( ) [timings:protected] => Array ( ) [callStacks:protected] => Array ( ) [offset:protected] => 0 [options:protected] => Array ( [driver] => mysqli [host] => localhost [user] => surface_alpha [password] => UT*p65!38g5) [database] => surface_alpha [prefix] => ddxnf_ [select] => 1 [port] => 3306 [socket] => ) [sql:protected] => SELECT COUNT(*) FROM #__k2_comments WHERE itemID=3 AND published=1 [tablePrefix:protected] => ddxnf_ [utf:protected] => 1 [errorNum:protected] => 0 [errorMsg:protected] => [transactionDepth:protected] => 0 [disconnectHandlers:protected] => Array ( ) ) [_trackAssets:protected] => [_rules:protected] => [_locked:protected] => [_autoincrement:protected] => 1 [_observers:protected] => JObserverUpdater Object ( [observers:protected] => Array ( ) [doCallObservers:protected] => 1 ) [_jsonEncode:protected] => Array ( ) [_errors:protected] => Array ( ) [link] => /premium-tile/by-collection/high-desert/itemlist/category/4-mojave.html ) [link] => /premium-tile/by-collection/high-desert/item/3-wild-juniper.html [printLink] => /premium-tile/by-collection/high-desert/item/3-wild-juniper.html?tmpl=component&print=1 [tags] => Array ( ) [imageXSmall] => /media/k2/items/cache/94d43e327d9303539cb1e2aac7032668_XS.jpg [imageSmall] => /media/k2/items/cache/94d43e327d9303539cb1e2aac7032668_S.jpg [imageMedium] => /media/k2/items/cache/94d43e327d9303539cb1e2aac7032668_M.jpg [imageLarge] => /media/k2/items/cache/94d43e327d9303539cb1e2aac7032668_L.jpg [imageXLarge] => /media/k2/items/cache/94d43e327d9303539cb1e2aac7032668_XL.jpg [imageGeneric] => /media/k2/items/cache/94d43e327d9303539cb1e2aac7032668_Generic.jpg [extraFields] => stdClass Object ( [PEIRating] => stdClass Object ( [id] => 1 [name] => PEI Rating [value] => III [type] => textfield [group] => 1 [published] => 1 [ordering] => 1 [alias] => PEIRating ) [ShadeVariation] => stdClass Object ( [id] => 2 [name] => Shade Variation [value] => 1 [type] => textfield [group] => 1 [published] => 1 [ordering] => 2 [alias] => ShadeVariation ) [MOHSRating] => stdClass Object ( [id] => 3 [name] => MOHS Rating [value] => 3 [type] => textfield [group] => 1 [published] => 1 [ordering] => 3 [alias] => MOHSRating ) [SCOFWet] => stdClass Object ( [id] => 4 [name] => SCOF Wet [value] => 0.63 [type] => textfield [group] => 1 [published] => 1 [ordering] => 4 [alias] => SCOFWet ) [SCOFDry] => stdClass Object ( [id] => 5 [name] => SCOF Dry [value] => 0.86 [type] => textfield [group] => 1 [published] => 1 [ordering] => 5 [alias] => SCOFDry ) [DCOF] => stdClass Object ( [id] => 6 [name] => DCOF [value] => 0.65 [type] => textfield [group] => 1 [published] => 1 [ordering] => 6 [alias] => DCOF ) [Composition] => stdClass Object ( [id] => 7 [name] => Composition [value] => High Density Ceramic Body [type] => textfield [group] => 1 [published] => 1 [ordering] => 7 [alias] => Composition ) [Usage] => stdClass Object ( [id] => 8 [name] => Usage [value] => Interior [type] => textfield [group] => 1 [published] => 1 [ordering] => 8 [alias] => Usage ) [Installation] => stdClass Object ( [id] => 9 [name] => Installation [value] => Floor, Wall [type] => textfield [group] => 1 [published] => 1 [ordering] => 9 [alias] => Installation ) [Swatchboard] => stdClass Object ( [id] => 10 [name] => Swatchboard [value] => http://www.surfaceartinc.com/files/Tile%20Images/Mojave/mojave-bd.jpg [type] => textfield [group] => 1 [published] => 1 [ordering] => 10 [alias] => Swatchboard ) [SuggestedGrout] => stdClass Object ( [id] => 11 [name] => Suggested Grout [value] => http://www.surfaceartinc.com/files/Grout/quartzlock-swatch.png [type] => textfield [group] => 1 [published] => 1 [ordering] => 11 [alias] => SuggestedGrout ) [ComplimentaryGlass] => stdClass Object ( [id] => 12 [name] => Complimentary Glass [value] => http://www.surfaceartinc.com/files/Glass/cl-gl-slate-zm.jpg [type] => textfield [group] => 1 [published] => 1 [ordering] => 12 [alias] => ComplimentaryGlass ) ) [cleanTitle] => Wild Juniper [numOfComments] => 0 [text] => High Density Ceramic Body Porcelain Finish Light Commercial Interior Use Rustic Travertine Effect [event] => stdClass Object ( [BeforeDisplay] => [AfterDisplay] => [AfterDisplayTitle] => [BeforeDisplayContent] => [AfterDisplayContent] => [K2BeforeDisplay] => [K2AfterDisplay] => [K2AfterDisplayTitle] => [K2BeforeDisplayContent] => [K2AfterDisplayContent] => ) [image] => /media/k2/items/cache/94d43e327d9303539cb1e2aac7032668_S.jpg [imageWidth] => 268 ) 1
This will be a good starting point. I'll try to do the same on the category, tag, etc. elements to see what all else is available.
  • Alex
  • Alex's Avatar
05 Feb 2015 20:49
Category View Sub-Theme was created by Alex

Category View Sub-Theme

Category: English K2 Community

Hi,

I've been trying to create a category view using K2 which will display a table with a header row, followed by the extra field details of each of the items within a category.

I've managed to get this list to work and display items as intended but what I can't work out is how I can get this list to then link to the items in question so that if a user clicks on a part of each line it will open up that item (article). - I hope that makes sense.

The code I have so far is below and I want to add the link for each item to the Result field.
<?php /** * @version 2.6.x * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html */ // no direct access defined('_JEXEC') or die; ?> <?php $this->items = array_merge($this->leading, $this->primary, $this->secondary, $this->links); ?> <!-- Start K2 Category Layout --> <div id="k2Container" class="itemListView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>"> <table width="100%"> <tr> <th>Date</th> <th>Opponent</th> <th>H/A</th> <th>Competition</th> <th>Result</th> <th>Value</th> </tr> <?php foreach($this->items as $item): ?> <tr> <td><?php echo $item->extraFields->Date->value ;?></td> <td><?php echo $item->extraFields->Opponent->value ;?></td> <td><?php echo $item->extraFields->HomeorAway>value ;?></td> <td><?php echo $item->extraFields->Competition->value ;?></td> <td><?php echo $item->extraFields->Result->value ;?></td> <td><?php echo $item->extraFields->Scorers->value ;?></td> </tr> <?php endforeach; ?> </table> </div> <!-- End K2 Category Layout -->

While I've been using Joomla for a number of years this is my first time with K2 so I'd appreciate any help you can provide.
  • Martin
  • Martin's Avatar
31 Jan 2015 21:02
not able to add folder in front end was created by Martin

not able to add folder in front end

Category: English K2 Community

Hi all,

When adding an article from frontend the users are not able to add images or folders through the "extra fields" tab.
Also images that are already are on the server cannot be selected to add to the artcle.
Am I forgetting something?

Joomla 3.3.6
K2 2.6.9

kind regards,

Martin.
  • Peter T
  • Peter T's Avatar
08 Jan 2015 15:05 - 08 Jan 2015 15:24

Hide or change Extra Fields header in item view

Category: English K2 Community

Hi all,

I am using K2 with template overrides on Joomla 3.3.6.
I can't seem to find a way to hide or change the Extra fields header (default text: Additional info).

I've tried to use "display:none" in the k2.css override.
I've also tired to edit item.php and even generic.php to remove it. However, it is still there.
Furthermore, I've tried the usual things: searched the forum and googled for a solution.

I would imagine that many user would like to do the same thing, so I would be grateful if someone more enlightened and skilled could help me.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
04 Dec 2014 13:06
Replied by Krikor Boghossian on topic Extened field for registered users

Extened field for registered users

Category: English K2 Community

You can render extrafields directly in your template.
<?php if(isset($this->item->extraFields->ALIAS->value)): ?> <?php echo $this->item->extraFields->ALIAS->value; ?> <?php endif; ?>

Then you can check if the user is logged in and perform the appropriate action.
You can do this with Joomla!'s user funtions.
docs.joomla.org/Accessing_the_current_user_object

Be careful that someone rendering your site with another template he might still be able to see the extrafields.

PS. You should override your template. More info can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
  • Michael Yaeger
  • Michael Yaeger's Avatar
25 Nov 2014 04:07
Replied by Michael Yaeger on topic Multiple Extra Field Groups

Multiple Extra Field Groups

Category: English K2 Community

Lefteris wrote: Hi. We are currently working on the version 3 of K2 which introduces extra fields for categories, users and tags. The repository of the new version is github.com/joomlaworks/k2-v3-dev-build/ . If your code is based on version 2 of K2 the repository is located at github.com/joomlaworks/k2 .


What is the projected launch date for v3? I have a project starting that needs these features!
  • Nikola
  • Nikola's Avatar
17 Nov 2014 23:35 - 17 Nov 2014 23:37

[SOLVED] Overriding frontend item edit form (itemform.php)

Category: English K2 Community

The least I can do for the community is share some of my ideas :)

Should anyone else try this, please note that there are probably way more elegant solutions. I am absolutely confident that none of my frontend users have ever heard of any debugging tools, so there is absolutely no way for them to screw anything up - therefore I only use CSS to hide what they don't need to see.

1) Create the "default" itemform.php override in templates/my_joomla_template/html/com_k2/default
2) Add this portion of code to the top:
 <?php JURI::current(); $router =& JSite::getRouter(); $query = $router->parse(JURI::getInstance()); $current_url = JURI::getInstance()->buildQuery($query); ?>

The $current_url contains the non-SEF current URL. This is, of course, important if Joomla SEF optimization is on.
Next, for example, I have 3 different K2 categories and 3 K2 user groups, each group is given permissions to add/edit items in its own category. Let's call them Cat1, Cat2 and Cat3.
Now, as Krikor suggested, it is absolutely imperative to have a menu item which shows each of these categories. It does not have to be visible, but it must exist somewhere, in a helper menu of some kind. Suppose I create 3 menu items, and their respective Itemids are 101, 102 and 103.

The next step is to load custom CSS files.
I compare the $current_url against the known Itemids and load the corresponding CSS.
 <?php if (strpos($current_url,'Itemid=101') == true) : ?> <link href="<?php echo $this->baseurl ?>/templates/my_joomla_template/css/itemid101.css" rel="stylesheet" type="text/css"/> <?php endif; ?>

These CSS files hide various fields I don't want the inexperienced users to see and modify. For example, one category is such that I only need the extra fields, so I hide all the other tabs. The view override (item.php) is such that it only prints some basic HMTL along with extra field values, and so on.

The other thing I need is to modify the labels, so for example, the "Extra fields" label is changed to "General Data" for the Cat1 and to "Professor Personal Data" for the Cat2. I achieve this by creating new PHP variables and placing them inside the aforementioned condition (perhaps a clumsy solution for a multilanguage site, however I don't have this kind of problem):
 <?php if (strpos($current_url,'Itemid=101') == true) : ?> <link href="<?php echo $this->baseurl ?>/templates/my_joomla_template/css/itemid101.css" rel="stylesheet" type="text/css"/> <?php $label_extrafields = "General Data"; endif; if (strpos($current_url,'Itemid=102') == true) : ?> <link href="<?php echo $this->baseurl ?>/templates/my_joomla_template/css/itemid102.css" rel="stylesheet" type="text/css"/> <?php $label_extrafields = "Professor Personal Data"; endif; ?>

Now, in the itemform.php, instead of:
... <li id="tabAttachments"><a href="#k2Tab6"><?php echo JText::_('K2_ATTACHMENTS'); ?></a></li> ...

I have:
... <li id="tabExtraFields"><a href="#k2Tab5"><?php echo $label_extrafields; ?></a></li> ...

And so on.

Here's an example form (sorry it's cyrilic, but you'll get the overall idea): i.imgur.com/Z56YoI0.png

This form only shows extra fields and attachments tabs. The output in this category is always the same, except for the extra fields: i.imgur.com/FsJAIt5.png (the extra fields and the attachment are marked red, the rest is always the same).

As I said, it's extremely easy to tweak when you need a really customized solution backed by an awesome framework :) I needed my users to create uniformed articles using extra fields as a kind of form, and thanks to the awesomness of K2, I've managed to do it in 2-3 hours of work.

Thank you once again!
  • sohopros
  • sohopros's Avatar
29 Oct 2014 21:13
Create relationship between Items was created by sohopros

Create relationship between Items

Category: English K2 Community

We are looking for a CCK solution to create a Joomla Custom Application for our customer. Our customer is a manufacturer's representative that sells electronic components through Sales Representatives.

The company has three division and represents dozens of manufacturers within many product categories. Manufacturers are related with Product Categories and Product Categories with a company division.
Manufacturer's authorize the company to sell products in certain regions. And Regions are a collection of zipcodes.

Representatives are assigned to a division. Once they represent a division they can to sell products from any manufacturer or product category that is assigned to that division.The representative area (not related with manufacturer's region) is defined by zipcodes.

We mapped six main entities (or K2 extra fields groups/categories) on our schema.
- Company Division
- Product Category
- Manufacturer
- Region
- Representative
- Zipcode

A database model is presenting how we believe the entities show be created is show below:

Attachment not found



We need to create a interface where users will be able to find a Representative by selecting a Product Category or a Manufacturer along with a zipcode. Something like the mock-up presented below:

Attachment not found



Questions:
1 - Are we able to create a link (database relationship) between two distinct entities on K2?
2 - If question 1 is positive, can we create filters for manufacturers and product categories on the representatives listing even though the relationship set on the representatives will be with the division (that will be related with product categories and manufacturers)?
3 - Which plugin would you recommend to accomplish the desired result?


We do sincerely appreciate any help we can get. Try several products so far and could not a solution.
  • Lefteris
  • Lefteris's Avatar
29 Oct 2014 14:38
Replied by Lefteris on topic Multiple Extra Field Groups

Multiple Extra Field Groups

Category: English K2 Community

Hi. We are currently working on the version 3 of K2 which introduces extra fields for categories, users and tags. The repository of the new version is github.com/joomlaworks/k2-v3-dev-build/ . If your code is based on version 2 of K2 the repository is located at github.com/joomlaworks/k2 .
  • Tibbe van Asten
  • Tibbe van Asten's Avatar
13 Oct 2014 12:15
Replied by Tibbe van Asten on topic Add dropdown field to k2 user profile

Add dropdown field to k2 user profile

Category: English K2 Community

Excuse me for the late answer.

I have used a solution like this one: manchumahara.com/2010/03/18/how-to-add-extra-fields-in-joomla-registration/

I have also tried to install User Extended Field, but that leads to error.
  • Kevin
  • Kevin's Avatar
08 Sep 2014 18:07

Is there a way to manage extra fields on categorie

Category: English K2 Community

Hello Krikor,

Thanks for this quick reply !

In fact I already checked the k2 extensions and I didn't see anything relevant (accepting one plugin to extend joomla users with extra field).
I already saw the readme of the beta3 of k2 with news features (it feels great!), but unfortunately, we cannot upgrade to joomla 3 for this project.

I guess I will have to write my own extension for k2 ?
  • Maucio
  • Maucio's Avatar
06 Jun 2014 13:58
User Rating - Reputable user was created by Maucio

User Rating - Reputable user

Category: English K2 Community

Hi All,
I am trying to set up a kind of AD Board. I created the K2 categories, K2 extra fields, extended the user registration with Joomla's 'User Profile' plugin and all works as expected.

what I am now trying to achieve is the ability for the site visitor to rate an specific advertiser.

For example, I am registered as an advertiser and have 10 ADs (k2 items), can I, how can I allow the site visitor to rate me as in oppose to my ADs.

Is it possible? any suggestion?

A bit like a vendor, rated for good communication, fast response, etc...

I appreciate any help.

Cheers
  • Lefteris
  • Lefteris's Avatar
24 Apr 2014 11:58
Replied by Lefteris on topic Help: custom item view layout

Help: custom item view layout

Category: English K2 Community

Try this in the item.php override:
<?php /** * @version 2.6.x * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html */ // no direct access defined('_JEXEC') or die; ?> <?php if(JRequest::getInt('print')==1): ?> <!-- Print button at the top of the print page only --> <a class="itemPrintThisPage" rel="nofollow" href="#" onclick="window.print();return false;"> <span><?php echo JText::_('K2_PRINT_THIS_PAGE'); ?></span> </a> <?php endif; ?> <!-- Start K2 Item Layout --> <span id="startOfPageId<?php echo JRequest::getInt('id'); ?>"></span> <div id="k2Container" class="itemView<?php echo ($this->item->featured) ? ' itemIsFeatured' : ''; ?><?php if($this->item->params->get('pageclass_sfx')) echo ' '.$this->item->params->get('pageclass_sfx'); ?>"> <!-- Plugins: BeforeDisplay --> <?php echo $this->item->event->BeforeDisplay; ?> <!-- K2 Plugins: K2BeforeDisplay --> <?php echo $this->item->event->K2BeforeDisplay; ?> <div class="itemHeader"> <?php if($this->item->params->get('itemDateCreated')): ?> <!-- Date created --> <span class="itemDateCreated"> <?php echo JHTML::_('date', $this->item->created , JText::_('K2_DATE_FORMAT_LC2')); ?> </span> <?php endif; ?> <?php if($this->item->params->get('itemTitle')): ?> <!-- Item title --> <h2 class="itemTitle"> <?php if(isset($this->item->editLink)): ?> <!-- Item edit link --> <span class="itemEditLink"> <a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>"> <?php echo JText::_('K2_EDIT_ITEM'); ?> </a> </span> <?php endif; ?> <?php echo $this->item->title; ?> <?php if($this->item->params->get('itemFeaturedNotice') && $this->item->featured): ?> <!-- Featured flag --> <span> <sup> <?php echo JText::_('K2_FEATURED'); ?> </sup> </span> <?php endif; ?> </h2> <?php endif; ?> <?php if($this->item->params->get('itemAuthor')): ?> <!-- Item Author --> <span class="itemAuthor"> <?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>&nbsp; <?php if(empty($this->item->created_by_alias)): ?> <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a> <?php else: ?> <?php echo $this->item->author->name; ?> <?php endif; ?> </span> <?php endif; ?> </div> <!-- Plugins: AfterDisplayTitle --> <?php echo $this->item->event->AfterDisplayTitle; ?> <!-- K2 Plugins: K2AfterDisplayTitle --> <?php echo $this->item->event->K2AfterDisplayTitle; ?> <?php if( $this->item->params->get('itemFontResizer') || $this->item->params->get('itemPrintButton') || $this->item->params->get('itemEmailButton') || $this->item->params->get('itemSocialButton') || $this->item->params->get('itemVideoAnchor') || $this->item->params->get('itemImageGalleryAnchor') || $this->item->params->get('itemCommentsAnchor') ): ?> <div class="itemToolbar"> <ul> <?php if($this->item->params->get('itemFontResizer')): ?> <!-- Font Resizer --> <li> <span class="itemTextResizerTitle"><?php echo JText::_('K2_FONT_SIZE'); ?></span> <a href="#" id="fontDecrease"> <span><?php echo JText::_('K2_DECREASE_FONT_SIZE'); ?></span> <img src="<?php echo JURI::root(true); ?>/components/com_k2/images/system/blank.gif" alt="<?php echo JText::_('K2_DECREASE_FONT_SIZE'); ?>" /> </a> <a href="#" id="fontIncrease"> <span><?php echo JText::_('K2_INCREASE_FONT_SIZE'); ?></span> <img src="<?php echo JURI::root(true); ?>/components/com_k2/images/system/blank.gif" alt="<?php echo JText::_('K2_INCREASE_FONT_SIZE'); ?>" /> </a> </li> <?php endif; ?> <?php if($this->item->params->get('itemPrintButton') && !JRequest::getInt('print')): ?> <!-- Print Button --> <li> <a class="itemPrintLink" rel="nofollow" href="<?php echo $this->item->printLink; ?>" onclick="window.open(this.href,'printWindow','width=900,height=600,location=no,menubar=no,resizable=yes,scrollbars=yes'); return false;"> <span><?php echo JText::_('K2_PRINT'); ?></span> </a> </li> <?php endif; ?> <?php if($this->item->params->get('itemEmailButton') && !JRequest::getInt('print')): ?> <!-- Email Button --> <li> <a class="itemEmailLink" rel="nofollow" href="<?php echo $this->item->emailLink; ?>" onclick="window.open(this.href,'emailWindow','width=400,height=350,location=no,menubar=no,resizable=no,scrollbars=no'); return false;"> <span><?php echo JText::_('K2_EMAIL'); ?></span> </a> </li> <?php endif; ?> <?php if($this->item->params->get('itemSocialButton') && !is_null($this->item->params->get('socialButtonCode', NULL))): ?> <!-- Item Social Button --> <li> <?php echo $this->item->params->get('socialButtonCode'); ?> </li> <?php endif; ?> <?php if($this->item->params->get('itemVideoAnchor') && !empty($this->item->video)): ?> <!-- Anchor link to item video below - if it exists --> <li> <a class="itemVideoLink k2Anchor" href="<?php echo $this->item->link; ?>#itemVideoAnchor"><?php echo JText::_('K2_MEDIA'); ?></a> </li> <?php endif; ?> <?php if($this->item->params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)): ?> <!-- Anchor link to item image gallery below - if it exists --> <li> <a class="itemImageGalleryLink k2Anchor" href="<?php echo $this->item->link; ?>#itemImageGalleryAnchor"><?php echo JText::_('K2_IMAGE_GALLERY'); ?></a> </li> <?php endif; ?> <?php if($this->item->params->get('itemCommentsAnchor') && $this->item->params->get('itemComments') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?> <!-- Anchor link to comments below - if enabled --> <li> <?php if(!empty($this->item->event->K2CommentsCounter)): ?> <!-- K2 Plugins: K2CommentsCounter --> <?php echo $this->item->event->K2CommentsCounter; ?> <?php else: ?> <?php if($this->item->numOfComments > 0): ?> <a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor"> <span><?php echo $this->item->numOfComments; ?></span> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?> </a> <?php else: ?> <a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor"> <?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?> </a> <?php endif; ?> <?php endif; ?> </li> <?php endif; ?> </ul> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemRating')): ?> <!-- Item Rating --> <div class="itemRatingBlock"> <span><?php echo JText::_('K2_RATE_THIS_ITEM'); ?></span> <div class="itemRatingForm"> <ul class="itemRatingList"> <li class="itemCurrentRating" id="itemCurrentRating<?php echo $this->item->id; ?>" style="width:<?php echo $this->item->votingPercentage; ?>%;"></li> <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_1_STAR_OUT_OF_5'); ?>" class="one-star">1</a></li> <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_2_STARS_OUT_OF_5'); ?>" class="two-stars">2</a></li> <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_3_STARS_OUT_OF_5'); ?>" class="three-stars">3</a></li> <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_4_STARS_OUT_OF_5'); ?>" class="four-stars">4</a></li> <li><a href="#" data-id="<?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('itemExtraFields') && count($this->item->extra_fields)): ?> <!-- Item extra fields --> <div class="itemExtraFields"> <h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3> <ul> <?php foreach ($this->item->extra_fields as $key=>$extraField): ?> <?php if($extraField->value != ''): ?> <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>"> <?php if($extraField->type == 'header'): ?> <h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4> <?php else: ?> <span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span> <span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span> <?php endif; ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemImage') && !empty($this->item->image)): ?> <!-- Item Image --> <div class="itemImageBlock"> <span class="itemImage"> <a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>"> <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" /> </a> </span> <?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?> <!-- Image caption --> <span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span> <?php endif; ?> <?php if($this->item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?> <!-- Image credits --> <span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span> <?php endif; ?> <div class="clr"></div> </div> <?php endif; ?> <?php if(!empty($this->item->fulltext)): ?> <?php if($this->item->params->get('itemIntroText')): ?> <!-- Item introtext --> <div class="itemIntroText"> <?php echo $this->item->introtext; ?> </div> <?php endif; ?> <?php if($this->item->params->get('itemFullText')): ?> <!-- Item fulltext --> <div class="itemFullText"> <?php echo $this->item->fulltext; ?> </div> <?php endif; ?> <?php else: ?> <!-- Item text --> <div class="itemFullText"> <?php echo $this->item->introtext; ?> </div> <?php endif; ?> <div class="clr"></div> <?php if($this->item->params->get('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 -->

If you need more than this, hire a developer to do it for you.
  • Tom
  • Tom's Avatar
06 Mar 2014 18:43
Paid Development was created by Tom

Paid Development

Category: English K2 Community

Hi there - hope this is the appropriate forum - please point me elsewhere if needed!

I have a few custom requests that despite searching forums, am having no luck with. Would be willing to pay (within reason!) to get one or all of these solved.

1. Smart Search integration.

I want to be able to include the K2 Author and Tags in the Joomla Smart Search results layout.

2. Smart Search results ordering

I would like users to be able to sort their results based on; relevance, created date, popularity.

3. Extra field search

I have one set of extra fields that ideally, I would like included in the general Smart Search keyword search - but could live with a separate search field. Would need to be within Smart Search though (i.e. not something like K2 Filter & Search module).

4. One-off item paid access

The big one! I would like non-registered users to have the option to purchase (credit card/ paypal) access to an individual K2 item and that item only.

As always, any advice/ pointers greatly appreciated.

Many thanks.
  • behzad
  • behzad's Avatar
04 Mar 2014 21:57
Replied by behzad on topic Extrafields on user page

Extrafields on user page

Category: English K2 Community

:( it doesn't work look at my page :
e-iab.ir/index.php/component/k2/itemlist/user/779-%D8%A7%DA%A9%D8%A8%D8%B1-%D8%A7%D8%B5%D8%BA%D8%B1%DB%8C.html

and this is the user.php :
<?php /** * @version $Id: user.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; // Get user stuff (do not change) $user = JFactory::getUser(); ?> <!-- Start K2 User Layout --> <div id="k2Container" class="userView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>"> <?php if($this->params->get('show_page_title') && $this->params->get('page_title')!=$this->user->name): ?> <!-- Page title --> <div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"> <?php echo $this->escape($this->params->get('page_title')); ?> </div> <?php endif; ?> <?php if($this->params->get('userFeedIcon',1)): ?> <!-- RSS feed icon --> <div class="k2FeedIcon"> <a href="<?php echo $this->feed; ?>" title="<?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>"> <span><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></span> </a> <div class="clr"></div> </div> <?php endif; ?> <?php if ($this->params->get('userImage') || $this->params->get('userName') || $this->params->get('userDescription') || $this->params->get('userURL') || $this->params->get('userEmail')): ?> <div class="userBlock"> <?php if(isset($this->addLink) && JRequest::getInt('id')==$user->id): ?> <!-- Item add link --> <span class="userItemAddLink"> <a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->addLink; ?>"> <?php echo JText::_('K2_POST_A_NEW_ITEM'); ?> </a> </span> <?php endif; ?> <?php if ($this->params->get('userImage') && !empty($this->user->avatar)): ?> <img src="<?php echo $this->user->avatar; ?>" alt="<?php echo $this->user->name; ?>" style="width:<?php echo $this->params->get('userImageWidth'); ?>px; height:auto;" /> <?php endif; ?> <?php if ($this->params->get('userName')): ?> <h2><?php echo $this->user->name; ?></h2> <?php endif; ?> <?php if ($this->params->get('userDescription') && trim($this->user->profile->description)): ?> <div class="userDescription"><?php echo $this->user->profile->description; ?></div> <?php endif; ?> <?php if (($this->params->get('userURL') && isset($this->user->profile->url) && $this->user->profile->url) || $this->params->get('userEmail')): ?> <div class="userAdditionalInfo"> <?php if ($this->params->get('userURL') && isset($this->user->profile->url) && $this->user->profile->url): ?> <span class="userURL"> <?php echo JText::_('K2_WEBSITE_URL'); ?>: <a href="<?php echo $this->user->profile->url; ?>" target="_blank" rel="me"><?php echo $this->user->profile->url; ?></a> </span> <?php endif; ?> <?php if ($this->params->get('userEmail')): ?> <span class="userEmail"> <?php echo JText::_('K2_EMAIL'); ?>: <?php echo JHTML::_('Email.cloak', $this->user->email); ?> </span> <?php endif; ?> </div> <?php endif; ?> <div class="clr"></div> <?php echo $this->user->event->K2UserDisplay; ?> <div class="clr"></div> </div> <?php endif; ?> <?php if(count($this->items)): ?> <!-- Item list --> <div class="userItemList"> <?php foreach ($this->items as $item): ?> <!-- Start K2 Item Layout --> <div class="userItemView<?php if(!$item->published || ($item->publish_up != $this->nullDate && $item->publish_up > $this->now) || ($item->publish_down != $this->nullDate && $item->publish_down < $this->now)) echo ' userItemViewUnpublished'; ?><?php echo ($item->featured) ? ' userItemIsFeatured' : ''; ?>"> <!-- Plugins: BeforeDisplay --> <?php echo $item->event->BeforeDisplay; ?> <!-- K2 Plugins: K2BeforeDisplay --> <?php echo $item->event->K2BeforeDisplay; ?> <div style="background-color:#F90;width:200px; height:200px;"> <?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?> <?php if(isset($this->item->extraFields->model->value)): ?> <?php echo $this->item->extraFields->model->name; ?> <?php echo $this->item->extraFields->model->value; ?> <?php endif; ?> <?php endif; ?> </div> <div class="userItemHeader"> <?php if($this->params->get('userItemDateCreated')): ?> <!-- Date created --> <span class="userItemDateCreated"> <?php echo JHTML::_('date', $item->created , JText::_('K2_DATE_FORMAT_LC2')); ?> </span> <?php endif; ?> <?php if($this->params->get('userItemTitle')): ?> <!-- Item title --> <h3 class="userItemTitle"> <?php if(isset($item->editLink)): ?> <!-- Item edit link --> <span class="userItemEditLink"> <a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $item->editLink; ?>"> <?php echo JText::_('K2_EDIT_ITEM'); ?> </a> </span> <?php endif; ?> <?php if ($this->params->get('userItemTitleLinked') && $item->published): ?> <a href="<?php echo $item->link; ?>"> <?php echo $item->title; ?> </a> <?php else: ?> <?php echo $item->title; ?> <?php endif; ?> <?php if(!$item->published || ($item->publish_up != $this->nullDate && $item->publish_up > $this->now) || ($item->publish_down != $this->nullDate && $item->publish_down < $this->now)): ?> <span> <sup> <?php echo JText::_('K2_UNPUBLISHED'); ?> </sup> </span> <?php endif; ?> </h3> <?php endif; ?> </div> <!-- Plugins: AfterDisplayTitle --> <?php echo $item->event->AfterDisplayTitle; ?> <!-- K2 Plugins: K2AfterDisplayTitle --> <?php echo $item->event->K2AfterDisplayTitle; ?> <div class="userItemBody"> <!-- Plugins: BeforeDisplayContent --> <?php echo $item->event->BeforeDisplayContent; ?> <!-- K2 Plugins: K2BeforeDisplayContent --> <?php echo $item->event->K2BeforeDisplayContent; ?> <?php if($this->params->get('userItemImage') && !empty($item->imageGeneric)): ?> <!-- Item Image --> <div class="userItemImageBlock"> <span class="userItemImage"> <a href="<?php echo $item->link; ?>" title="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>"> <img src="<?php echo $item->imageGeneric; ?>" alt="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>" style="width:<?php echo $this->params->get('itemImageGeneric'); ?>px; height:auto;" /> </a> </span> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->params->get('userItemIntroText')): ?> <!-- Item introtext --> <div class="userItemIntroText"> <?php echo $item->introtext; ?> </div> <?php endif; ?> <div class="clr"></div> <!-- Plugins: AfterDisplayContent --> <?php echo $item->event->AfterDisplayContent; ?> <!-- K2 Plugins: K2AfterDisplayContent --> <?php echo $item->event->K2AfterDisplayContent; ?> <div class="clr"></div> </div> <?php if($this->params->get('userItemCategory') || $this->params->get('userItemTags')): ?> <div class="userItemLinks"> <?php if($this->params->get('userItemCategory')): ?> <!-- Item category name --> <div class="userItemCategory"> <span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span> <a href="<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a> </div> <?php endif; ?> <?php if($this->params->get('userItemTags') && isset($item->tags)): ?> <!-- Item tags --> <div class="userItemTagsBlock"> <span><?php echo JText::_('K2_TAGGED_UNDER'); ?></span> <ul class="userItemTags"> <?php foreach ($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; ?> <div class="clr"></div> </div> <?php endif; ?> <div class="clr"></div> <?php if($this->params->get('userItemCommentsAnchor') && ( ($this->params->get('comments') == '2' && !$this->user->guest) || ($this->params->get('comments') == '1')) ): ?> <!-- Anchor link to comments below --> <div class="userItemCommentsLink"> <?php if(!empty($item->event->K2CommentsCounter)): ?> <!-- K2 Plugins: K2CommentsCounter --> <?php echo $item->event->K2CommentsCounter; ?> <?php else: ?> <?php if($item->numOfComments > 0): ?> <a href="<?php echo $item->link; ?>#itemCommentsAnchor"> <?php echo $item->numOfComments; ?> <?php echo ($item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?> </a> <?php else: ?> <a href="<?php echo $item->link; ?>#itemCommentsAnchor"> <?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?> </a> <?php endif; ?> <?php endif; ?> </div> <?php endif; ?> <?php if ($this->params->get('userItemReadMore')): ?> <!-- Item "read more..." link --> <div class="userItemReadMore"> <a class="k2ReadMore" href="<?php echo $item->link; ?>"> <?php echo JText::_('K2_READ_MORE'); ?> </a> </div> <?php endif; ?> <div class="clr"></div> <!-- Plugins: AfterDisplay --> <?php echo $item->event->AfterDisplay; ?> <!-- K2 Plugins: K2AfterDisplay --> <?php echo $item->event->K2AfterDisplay; ?> <div class="clr"></div> </div> <!-- End K2 Item Layout --> <?php endforeach; ?> </div> <!-- Pagination --> <?php if(count($this->pagination->getPagesLinks())): ?> <div class="k2Pagination"> <?php echo $this->pagination->getPagesLinks(); ?> <div class="clr"></div> <?php echo $this->pagination->getPagesCounter(); ?> </div> <?php endif; ?> <?php endif; ?> </div> <!-- End K2 User Layout --> 
  • behzad
  • behzad's Avatar
04 Mar 2014 16:29
Replied by behzad on topic Extrafields on user page

Extrafields on user page

Category: English K2 Community

Hi
I did this but it doesn't work , my joomla is 2.5.18 and k2 is 2.6.7
could you tell me how can I add extrafield for each item in component/com_k2/template/defaults/user.php ?
Displaying 61 - 80 out of 248 results.

Powered by Kunena Forum