Keyword

Advanced Search

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

  • Whizz Designs
  • Whizz Designs's Avatar
01 Dec 2011 19:46
User can't save 'Content' or articles. was created by Whizz Designs

User can't save 'Content' or articles.

Category: English K2 Community

Joomla 1.5.25
K2 Version 2.5.3

I have an odd problem, my user can't update articles or K2 item 'Content'.

If I login on MY computer, using my user's details the system works PERFECTLY. I am using FireFox.

If my user logins in on HER computer she can't update and save articles. She can access them to edit but any changes she makes are not applied.

Also she can create K2 items, add an 'Image' and add 'Extra-fields', but any text she adds to the 'Content' area doesn't get saved when she clicks 'Save'. ONLY the 'Content' is lost all other changes to 'Image' or 'Extra-fields' apply fine.

This is not a Joomla issue or a K2 issue, as I can access and update on all of the computers in my house using her user details. As I can't replicate this problem I have no idea what could be causing it, but feel there is either a browser issue or something on her PC.

Anyone got any ideas?

Thanks,

Gillian
  • Pablo Picasso
  • Pablo Picasso's Avatar
23 Nov 2011 12:43
Replied by Pablo Picasso on topic K2 items disappear in administrator Joomla! 1.7

K2 items disappear in administrator Joomla! 1.7

Category: English K2 Community

I'm having the same problem. I can see a list of everything else (tags, users, usergroups, extra fields and extrafield groups, but not items or categories. I've opened a new topis as I hadn't found this one. Likewise I'm on Joomla! 1.7.3.
I've checked all permissions and access levels and list filters. They seem to be OK. I've checked the database and the items and categories are there.
I've set up a menu item to list all the categories on the front-end and that appears to work well. I'm stuck now. Anyone any ideas?

Cheers in advance
  • ATHANASIOS ILIOPOULOS
  • ATHANASIOS ILIOPOULOS's Avatar
22 Nov 2011 21:00
problem after import from local database was created by ATHANASIOS ILIOPOULOS

problem after import from local database

Category: English K2 Community

Hello guys,

i recently have upgraded my k2 component to my local system (http://localhost/joomlasite). Everything worked just fine so i just moved files (ftp) and database (export->import) to my online development site (www.bluetree.gr)

My local installation works just fine BUT i have a major problem to my online dev site. When i try to select one of the following:

administrator -> Components -> K2 -> User Groups
administrator -> Components -> K2 -> Extra Fields
administrator -> Components -> K2 -> Extra Field Groups

i received the corresponding errors:

Warning: require_once(/home/bluetree/public_html/administrator/components/com_k2/controllers/usergroups.php) [function.require-once]: failed to open stream: No such file or directory in /home/bluetree/public_html/administrator/components/com_k2/admin.k2.php on line 118

Fatal error: require_once() [function.require]: Failed opening required '/home/bluetree/public_html/administrator/components/com_k2/controllers/usergroups.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bluetree/public_html/administrator/components/com_k2/admin.k2.php on line 118



Warning: require_once(/home/bluetree/public_html/administrator/components/com_k2/controllers/extrafields.php) [function.require-once]: failed to open stream: No such file or directory in /home/bluetree/public_html/administrator/components/com_k2/admin.k2.php on line 118

Fatal error: require_once() [function.require]: Failed opening required '/home/bluetree/public_html/administrator/components/com_k2/controllers/extrafields.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bluetree/public_html/administrator/components/com_k2/admin.k2.php on line 118


Warning: require_once(/home/bluetree/public_html/administrator/components/com_k2/controllers/extrafieldsgroups.php) [function.require-once]: failed to open stream: No such file or directory in /home/bluetree/public_html/administrator/components/com_k2/admin.k2.php on line 118

Fatal error: require_once() [function.require]: Failed opening required '/home/bluetree/public_html/administrator/components/com_k2/controllers/extrafieldsgroups.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bluetree/public_html/administrator/components/com_k2/admin.k2.php on line 118


I also tried to re-import the database to another online installation but the same problem occurs. Anybody has an idea?
  • Individual IT
  • Individual IT's Avatar
07 Nov 2011 16:08 - 07 Nov 2011 16:10

Tool for importing / exporting items to / from K2

Category: English K2 Community

I wrote a small tool to import K2 content from a CSV file and to export K2 data to a CSV file.
www.individual-it.net/en/Joomla/

Its possible to import all fields including "extra fields", userids, images, tags, galleries, categories and attachments.

The file must have a heading row. Text delimiter: ' " ' field separator: ','
For "Multiple Select" Fields use also "," to separate the options e.g.: "option 1, option 3"

To have a example-file to first an export and check the documentation .

Here is user manual
If you like it please vote for it or write a review

If you have problems:
  1. check the old thread in the forum
  2. check if you use the most actual version
  3. check the minimum requirements
  4. post here if you still have a problem - and report:
    • the joomla version
    • the OS version
    • the K2 version
    • the K2 Import / Export tool version
    • the exact problem ("It doesn't work" - doesn't help anybody)

To stay up do date and informed follow me on twitter and have a look at this topic.
  • JoomlaWorks
  • JoomlaWorks's Avatar
19 Oct 2011 23:25
Replied by JoomlaWorks on topic Where is the documentation?

Where is the documentation?

Category: English K2 Community

There is a great wealth of video tutorials in the old K2 Community, located here: community.getk2.org/video

Same goes for any questions that might occur while developing a site with K2. The old community and soon the new one, provide the best source to learn K2 and solve issues.

Now that v2.5 is out, we plan to gradually fill the documentation section in this site with small practical tutorials covering all aspects of using K2. I personally plan to write 5 small tuts per week.

If you are just getting started, I can only say that working with K2 is like working with default Joomla! articles, only much easier and concise.

To get started, try this:
- Install K2 in an existing site.
- In the items list, top right, hit the import button. This will import your Joomla! articles into K2. Don't worry. The original Joomla! articles are left intact. This will allow you to have some content inside for you to play around.
- After the import, you already have some articles (items in K2 lingo) and categories that form your K2 content's structure. Now start creating some menu items to the K2 categories or items.
- Experiment with the K2 category options. When you flip the switch in some parameter in a K2 category, the switch will be enforced in all items of this category, everywhere in the site (unlike Joomla! articles).
- Enrich your K2 items: add tags, a K2 item image, video, gallery, upload some attachments.
- Extend your K2 item forms: go to the "extra fields" page in the K2 backend and create some new extra fields. "Extra fields" are new form items that extend the base K2 form. And that's one of the beauties of K2. You got a solid starting form for your item and you can extend it with additional fields. Imagine wanting to add a table of data (e.g. details about a movie) inside your items. Extra fields are the way to go. Once you create a few extra fields (you'll see that K2 asks you to group them), you "attach" these extra fields to your item forms, by assigning a particular extra field group to a K2 category.
- A K2 category can only be assigned to one extra field group. An extra field group however can be shared among many categories.
- Now after you've setup your extra fields (and groups) and assigned them to one or more categories, you can start adding more content to your K2 items. When you select a category that has an extra field group assigned to it, these fields will display in the "extra fields" tab inside the K2 item edit form.
- Create more menu items to users (user pages/blogs), tags or the uber-cool "latest items by users or categories" view.

Some additional things to keep in mind:
- K2 makes proper use of its "global" parameters. These parameters will most likely be set only once from you. Browse these parameters (see the button top right in all K2 lists in the backend). If some parameter seems funky too you, hover above its name for an in-depth explanation in the form of a "tooltip".
- We have a few but very powerful modules. One you'll be using most of the times and that's "K2 Content" (mod_k2_content). This is the primary module to fetch content from anywhere in K2 in dozens of combinations. The other modules allow you to fetch comments (K2 Comments/mod_k2_content), user lists (K2 Users/mod_k2_users), the K2 tools (mod_k2_tools) module allows you display lists like archives per year/month, a drop-down of your K2 categories, a calendar, a K2 specific search box, a tag cloud and more. Finally we have the K2 User (mod_k2_user) module, which is a replacement of the Joomla! login module: you use this module to allow your users to log into (and out of) your site. When they are logged in, they see some special actions, in relation to K2 and the powerful access rights that K2 can give to specific groups of users in K2.

More soon ;)
  • Igor Prado
  • Igor Prado's Avatar
07 Oct 2011 07:20

Solution for filter by an extrafield (K2 + Joomla 1.5)

Category: English K2 Community

Hi folks,

 

My client's website is using Joomla 1.5 + K2. The structure of the categories and items are:

 

- Type

|_ Item

|_ Item

|_ Item

- Type

|_ Item

|_ Item

 

and so on... It's only one level of category. All the items has the same extrafields group. In the index (default joomla menu item), I have several modules of "mod_k2_content" with specific rules showing this items (not necessary one module to each category... The items are all mixed up in the modules).

 

What I need: Now my client want to divde this categories "Type" into "Cities". Each city will have all the same Types, but different items. And when the user access the website, he will choose the city he wants to navigate. And all the menu items will show the items of that city.

So I have to divide items in Cities, but I don't want to create another level before "Type" with the Cities... This will result in many menu items, one for each city. And I will have to duplicate all the modules of "mod_k2_content" I have and associate then to specific city in menu items...

 

With this "problem", I thought: What if I create a extrafield with the Cities that the site will have and filter all the content by this extrafield? I will need to specify the city for each k2 item, but I will have just one tree off navigation (No need to create menu items for the cities) and just the actuals mod_k2_content modules associated to the default joomla menu item (index)...

 

Is there a solution for this?

 

Sorry for my bad english
  • Odin Mayland
  • Odin Mayland's Avatar
24 Sep 2011 23:39
Replied by Odin Mayland on topic Can't get extra fields to show

Can't get extra fields to show

Category: English K2 Community

I am using k2joom k2 template k2rounded as the basis, but I have modified it.

 

I am looking but if you know what to look for here is my k2rounded item.php :

<?php /**
* K2Rounded the k2 template by K2Joom
* Version 2.0 for K2 V2.4
* @version $Id: item.php 558 2010-09-22 11:25:17Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks www.joomlaworks.gr
* @copyright Copyright (c) 2006 - 2010 JoomlaWorks, a business unit of Nuevvo Webware Ltd. All rights reserved.
* @license GNU/GPL license: www.gnu.org/copyleft/gpl.html

*/


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

?>

<!-- Start K2 Item Layout -->
<span id="startOfPageId<?php echo JRequest::getInt('id'); ?>"></span>

<div id="k2Container" class="itemView<?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; ?>

<?php if(isset($this->item->editLink)): ?>
<!-- Item edit link -->
<span class="itemEditLink">
<a class="modal" rel="{handler:'iframe',size:{x:990,y:650}}" href="<?php echo $this->item->editLink; ?>">
<?php echo JText::_('Edit item'); ?>
</a>
</span>
<?php endif; ?>



<!-- Plugins: AfterDisplayTitle -->
<?php echo $this->item->event->AfterDisplayTitle; ?>



<div class="itemBody">

<!-- Plugins: BeforeDisplayContent -->
<?php echo $this->item->event->BeforeDisplayContent; ?>

<!-- K2 Plugins: K2BeforeDisplayContent -->
<?php echo $this->item->event->K2BeforeDisplayContent; ?>

<?php if($this->item->params->get('itemImage') && !empty($this->item->image)): ?>
<!-- Item Image -->
<div class="itemImageBlock">
<span class="itemImage">
<a class="modal" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('Click to preview image'); ?>">
<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
</a>
</span>

<?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
<!-- Image caption -->
<span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span>
<?php endif; ?>

<?php if($this->item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
<!-- Image credits -->
<span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
<?php endif; ?>

<div class="clr"></div>
</div>
<?php endif; ?>

<div class="itemHeader">


<?php if($this->item->params->get('itemFeaturedNotice') && $this->item->featured): ?>
<!-- Featured flag -->
<span class="featured">
<?php /*?><sup>
<?php echo JText::_('Featured'); ?>
</sup><?php */?>
</span>
<?php endif; ?>
<?php if($this->item->params->get('itemTitle')): ?>
<!-- Item title -->
<h2 class="itemTitle">
<?php echo $this->item->title; ?>

</h2>
<?php endif; ?>

<?php if($this->item->params->get('itemAuthor')): ?>
<!-- Item Author -->
<span class="itemAuthor">
<?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?> 
<?php if(empty($this->item->created_by_alias)): ?>
<a 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>
<div class="itemToolbar">
<?php if($this->item->params->get('itemFontResizer')): ?>
<!-- Font Resizer -->
<ul>
<li>
<span class="itemTextResizerTitle"><?php echo JText::_('Text size:'); ?></span>
<a href="#" id="fontDecrease">
<span><?php echo JText::_('-'); ?></span>
<img src="components/com_k2/images/system/blank.gif" alt="<?php echo JText::_('decrease font size'); ?>" />
</a>
<a href="#" id="fontIncrease">
<span><?php echo JText::_('+'); ?></span>
<img src="components/com_k2/images/system/blank.gif" alt="<?php echo JText::_('increase font size'); ?>" />
</a>
</li>
<?php if($this->item->params->get('itemPrintButton')): ?>
<!-- Print Button -->
<li>
<?php if(JRequest::getCmd('print')==1): ?>
<a class="itemPrintLink" href="<?php echo $this->item->printLink; ?>" onclick="window.print();return false;">
<span><?php echo JText::_('Print'); ?></span>
</a>
<?php else: ?>
<a class="modal itemPrintLink" title="Print me Out" href="<?php echo $this->item->printLink; ?>" rel="{handler:'iframe',size:{x:900,y:500}}">
<span><?php echo JText::_('Print'); ?></span>
</a>
<?php endif; ?>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
</div>
<?php if(!empty($this->item->fulltext)): ?>

<?php if($this->item->params->get('itemIntroText')): ?>
<!-- Item introtext -->
<div class="itemIntroText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>

<?php if($this->item->params->get('itemFullText')): ?>
<!-- Item fulltext -->
<div class="itemFullText">
<?php echo $this->item->fulltext; ?>
</div>
<?php endif; ?>

<?php else: ?>

<!-- Item text -->
<div class="itemFullText">
<?php echo $this->item->introtext; ?>
</div>

<?php endif; ?>



<?php if($this->item->params->get('itemImageGallery') && !empty($this->item->gallery)): ?>
<!-- Item image gallery -->
<a name="itemImageGalleryAnchor" id="itemImageGalleryAnchor"></a>
<div class="itemImageGallery">
<?php echo $this->item->gallery; ?>
</div>
<?php endif; ?>











<?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
<!-- Item extra fields /*there was originally a : between the ?>:</ */ -->
<div class="itemExtraFields">
<h3><?php echo JText::_(''); ?></h3>
<ul>
<?php foreach ($this->item->extra_fields as $key=>$extraField):?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
<span class="itemExtraFieldsLabel"><?php /*echo $extraField->name; */?></span>
<span class="itemExtraFieldsValue"><?php echo JHTML::_('content.prepare', $extraField->value); ?></span>
<br class="clr" />
</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>

<div class="itemrelatedtag">
<?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
<!-- Related items by tag -->
<div class="itemRelated">
<h3><?php echo JText::_("Similar Items"); ?></h3>
<ul>
<?php foreach($this->relatedItems 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; ?>
</div>

<?php if($this->item->params->get('itemDateCreated')): ?>
<!-- Date created -->
<span class="itemDateCreated">
<?php echo JText::_('Written on'); ?> <?php echo JHTML::_('date', $this->item->created , JText::_('DATE_FORMAT_LC2')); ?>

<?php endif; ?>

<?php if($this->item->params->get('itemDateModified') && intval($this->item->modified)!=0):?>
<!-- Item date modified -->
<?php if($this->item->created != $this->item->modified): ?>

<?php echo JText::_(' and last modified on'); ?> <?php echo JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<?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('itemHits') ||
$this->item->params->get('itemTwitterLink') ||
$this->item->params->get('itemCategory') ||
$this->item->params->get('itemTags') ||
$this->item->params->get('itemShareLinks') ||
$this->item->params->get('itemAttachments')
): ?>




<?php if($this->item->params->get('itemAttachments') && count($this->item->attachments)): ?>
<!-- Item attachments -->
<div class="itemAttachmentsBlock">
<span><?php echo JText::_("Download attachments:"); ?></span>
<ul class="itemAttachments">
<?php foreach ($this->item->attachments as $attachment): ?>
<li>
<a title="<?php echo htmlentities($attachment->titleAttribute, ENT_QUOTES, 'UTF-8'); ?>" href="<?php echo JRoute::_('index.php?option=com_k2&view=item&task=download&id='.$attachment->id); ?>">
<?php echo $attachment->title ; ?>
</a>
<?php if($this->item->params->get('itemAttachmentsCounter')): ?>
<span>(<?php echo $attachment->hits; ?> <?php echo (count($attachment->hits)==1) ? JText::_("download") : JText::_("downloads"); ?>)</span>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>


<?php endif; ?>

<?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::_('Related Video'); ?></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('itemNavigation') && !JRequest::getCmd('print') && (isset($this->item->nextLink) || isset($this->item->previousLink))): ?>
<!-- Item navigation -->
<div class="itemNavigation">
<?php if($this->item->params->get('itemTags') && count($this->item->tags)): ?>
<!-- Item tags -->
<span class="itemTagsBlock">
<span><?php echo JText::_("See all items similar to:"); ?></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>
</span>
<?php endif; ?>
<span class="itemNavigationTitle"><?php echo JText::_('More in this category:'); ?></span>

<?php if(isset($this->item->previousLink)): ?>
<a class="itemPrevious" href="<?php echo $this->item->previousLink; ?>">
« <?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; ?> »
</a>
<?php endif; ?>

</div>
<?php endif; ?>


<!-- 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('itemEmailButton') && (!JRequest::getInt('print')) ): ?>
<!-- Email Button -->
<li>
<a class="itemEmailLink" onclick="window.open(this.href,'win2','width=400,height=350,menubar=yes,resizable=yes'); return false;" title="Email this!!" href="<?php echo $this->item->emailLink; ?>">
<span><?php echo JText::_('E-mail'); ?></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::_('Video'); ?></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::_('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>
<!-- K2 Plugins: K2CommentsCounter -->
<?php echo $this->item->event->K2CommentsCounter; ?>
<?php if(empty($this->item->event->K2CommentsCounter)):?>
<?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::_('comments') : JText::_('comment'); ?>
</a>
<?php else: ?>
<a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
<?php echo JText::_('Be the first to comment!'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
</li>
<?php endif; ?>
</ul>
<div class="clr"></div>

<?php endif; ?>
<?php if($this->item->params->get('itemHits') || $this->item->params->get('itemTwitterLink')): ?>

<?php if($this->item->params->get('itemHits')): ?>
<!-- Item Hits -->
<div class="plusone"><g:plusone size="small" count="false"></g:plusone></div>
<span class="itemHits">
<?php echo JText::_('Read'); ?> <b><?php echo $this->item->hits; ?></b> <?php echo JText::_('times'); ?>
</span>
<?php endif; ?>

<?php if($this->item->params->get('itemHits') && $this->item->params->get('itemTwitterLink')): ?>
<?php endif; ?>

<?php endif; ?>
<div class="itemLinks">

<?php if($this->item->params->get('itemShareLinks')): ?>
<!-- Item social links -->
<span class="itemSocialLinksBlock">
<span></span>
<ul class="itemSocialLinks">
&lt;li&gt;&lt;a class="googlebuzz" title="&lt;?php echo JText::_("Add to Google Buzz"); ?&gt;" href="www.google.com/buzz/post?url=<?php echo $this->item->socialLink; ?>&message=<?php echo urlencode($this->item->title); ?>" target="_blank"> <span><?php echo JText::_("Add to Google Buzz"); ?></span></a></li>
&lt;li&gt;&lt;a class="facebook" title="&lt;?php echo JText::_("Add to Facebook"); ?&gt;" href="www.facebook.com/sharer.php?u=<?php echo $this->item->socialLink; ?>&t=<?php echo urlencode($this->item->title); ?>" target="_blank"><span><?php echo JText::_("Add to Facebook"); ?></span></a></li>
&lt;li&gt;&lt;a class="delicious" title="&lt;?php echo JText::_("Add to Delicious"); ?&gt;" href="del.icio.us/post?url=<?php echo $this->item->socialLink; ?>&title=<?php echo urlencode($this->item->title); ?>" target="_blank"><span><?php echo JText::_("Add to Delicious"); ?></span></a></li>
&lt;li&gt;&lt;a class="digg" title="&lt;?php echo JText::_("Digg this"); ?&gt;" href="digg.com/submit?url=<?php echo $this->item->socialLink; ?>&title=<?php echo urlencode($this->item->title); ?>" target="_blank"><span><?php echo JText::_("Digg this"); ?></span></a></li>
&lt;li&gt;&lt;a class="reddit" title="&lt;?php echo JText::_("Add to Reddit"); ?&gt;" href="reddit.com/submit?url=<?php echo $this->item->socialLink; ?>&title=<?php echo urlencode($this->item->title); ?>" target="_blank"><span><?php echo JText::_("Add to Reddit"); ?></span></a></li>
&lt;li&gt;&lt;a class="stumble" title="&lt;?php echo JText::_("Add to StumbleUpon"); ?&gt;" href="www.stumbleupon.com/submit?url=<?php echo $this->item->socialLink; ?>&title=<?php echo urlencode($this->item->title); ?>" target="_blank"><span><?php echo JText::_("Add to StumbleUpon"); ?></span></a></li>
&lt;li class="clr"&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;?php if($this-&gt;item-&gt;params-&gt;get('itemTwitterLink') &amp;&amp; $this-&gt;item-&gt;params-&gt;get('twitterUsername')): ?&gt;
&lt;!-- Twitter Link --&gt;
&lt;span class="itemTwitterLink"&gt;
&lt;a title="&lt;?php echo JText::_(' Tweet it to your followers!'); ?&gt;" href="&lt;?php echo $this-&gt;item-&gt;twitterURL; ?&gt;" target="_blank"&gt;
&lt;?php echo JText::_('&gt;'); ?&gt;
&lt;/a&gt;
&lt;/span&gt;

&lt;/span&gt;

&lt;?php endif; ?&gt;


&lt;?php endif; ?&gt;





&lt;/div&gt;

&lt;?php if($this-&gt;item-&gt;params-&gt;get('itemRating')): ?&gt;
&lt;!-- Item Rating --&gt;
&lt;div class="itemRatingBlock"&gt;



&lt;span&gt;&lt;?php echo JText::_('Rate this item'); ?&gt;&lt;/span&gt;
&lt;div class="itemRatingForm"&gt;
&lt;ul class="itemRatingList"&gt;
&lt;li class="itemCurrentRating" id="itemCurrentRating&lt;?php echo $this-&gt;item-&gt;id; ?&gt;" style="width:&lt;?php echo $this-&gt;item-&gt;votingPercentage; ?&gt;%;"&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" rel="&lt;?php echo $this-&gt;item-&gt;id; ?&gt;" title="&lt;?php echo JText::_('1 star out of 5'); ?&gt;" class="one-star"&gt;1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" rel="&lt;?php echo $this-&gt;item-&gt;id; ?&gt;" title="&lt;?php echo JText::_('2 stars out of 5'); ?&gt;" class="two-stars"&gt;2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" rel="&lt;?php echo $this-&gt;item-&gt;id; ?&gt;" title="&lt;?php echo JText::_('3 stars out of 5'); ?&gt;" class="three-stars"&gt;3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" rel="&lt;?php echo $this-&gt;item-&gt;id; ?&gt;" title="&lt;?php echo JText::_('4 stars out of 5'); ?&gt;" class="four-stars"&gt;4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" rel="&lt;?php echo $this-&gt;item-&gt;id; ?&gt;" title="&lt;?php echo JText::_('5 stars out of 5'); ?&gt;" class="five-stars"&gt;5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div id="itemRatingLog&lt;?php echo $this-&gt;item-&gt;id; ?&gt;" class="itemRatingLog"&gt;&lt;?php echo $this-&gt;item-&gt;numOfvotes; ?&gt;&lt;/div&gt;
&lt;div class="clr"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="clr"&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;?php endif; ?&gt;


&lt;/div&gt;


&lt;div class="itemCommentsandAuthor"&gt;

&lt;!-- Plugins: AfterDisplay --&gt;
&lt;?php echo $this-&gt;item-&gt;event-&gt;AfterDisplay; ?&gt;

&lt;!-- K2 Plugins: K2AfterDisplay --&gt;
&lt;?php echo $this-&gt;item-&gt;event-&gt;K2AfterDisplay; ?&gt;

&lt;?php if($this-&gt;item-&gt;params-&gt;get('itemComments') &amp;&amp; ( ($this-&gt;item-&gt;params-&gt;get('comments') == '2' &amp;&amp; !$this-&gt;user-&gt;guest) || ($this-&gt;item-&gt;params-&gt;get('comments') == '1'))):?&gt;
&lt;!-- K2 Plugins: K2CommentsBlock --&gt;
&lt;?php echo $this-&gt;item-&gt;event-&gt;K2CommentsBlock; ?&gt;
&lt;?php endif;?&gt;

&lt;?php if($this-&gt;item-&gt;params-&gt;get('itemComments') &amp;&amp; !JRequest::getInt('print') &amp;&amp; ($this-&gt;item-&gt;params-&gt;get('comments') == '1' || ($this-&gt;item-&gt;params-&gt;get('comments') == '2')) &amp;&amp; empty($this-&gt;item-&gt;event-&gt;K2CommentsBlock)):?&gt;
&lt;!-- Item comments --&gt;
&lt;a name="itemCommentsAnchor" id="itemCommentsAnchor"&gt;&lt;/a&gt;

&lt;div class="itemComments"&gt;
&lt;?php if($this-&gt;item-&gt;params-&gt;get('commentsFormPosition')=='above' &amp;&amp; $this-&gt;item-&gt;params-&gt;get('itemComments') &amp;&amp; !JRequest::getInt('print') &amp;&amp; ($this-&gt;item-&gt;params-&gt;get('comments') == '1' || ($this-&gt;item-&gt;params-&gt;get('comments') == '2' &amp;&amp; K2HelperPermissions::canAddComment($this-&gt;item-&gt;catid)))): ?&gt;
&lt;!-- Item comments form --&gt;
&lt;div class="itemCommentsForm"&gt;
&lt;?php echo $this-&gt;loadTemplate('comments_form'); ?&gt;
&lt;/div&gt;
&lt;?php endif; ?&gt;

&lt;?php if($this-&gt;item-&gt;numOfComments&gt;0 &amp;&amp; $this-&gt;item-&gt;params-&gt;get('itemComments') &amp;&amp; !JRequest::getInt('print') &amp;&amp; ($this-&gt;item-&gt;params-&gt;get('comments') == '1' || ($this-&gt;item-&gt;params-&gt;get('comments') == '2'))): ?&gt;
&lt;!-- Item user comments --&gt;
&lt;h3 class="itemCommentsCounter"&gt;
&lt;span&gt;&lt;?php echo $this-&gt;item-&gt;numOfComments; ?&gt;&lt;/span&gt; &lt;?php echo ($this-&gt;item-&gt;numOfComments&gt;1) ? JText::_('comments') : JText::_('comment'); ?&gt;
&lt;/h3&gt;
&lt;ul class="itemCommentsList"&gt;
&lt;?php foreach ($this-&gt;item-&gt;comments as $key=&gt;$comment): ?&gt;
&lt;li class="&lt;?php echo ($key%2) ? "odd" : "even"; echo (!$this-&gt;item-&gt;created_by_alias &amp;&amp; $comment-&gt;userID==$this-&gt;item-&gt;created_by) ? " authorResponse" : ""; ?&gt;"&gt;
&lt;span class="commentLink"&gt;
&lt;a href="&lt;?php echo $this-&gt;item-&gt;link; ?&gt;#comment&lt;?php echo $comment-&gt;id; ?&gt;" name="comment&lt;?php echo $comment-&gt;id; ?&gt;" id="comment&lt;?php echo $comment-&gt;id; ?&gt;"&gt;
&lt;?php echo JText::_('Comment Link'); ?&gt;
&lt;/a&gt;
&lt;/span&gt;
&lt;?php if($comment-&gt;userImage):?&gt;
&lt;img src="&lt;?php echo $comment-&gt;userImage; ?&gt;" alt="&lt;?php echo $comment-&gt;userName; ?&gt;" width="&lt;?php echo $this-&gt;item-&gt;params-&gt;get('commenterImgWidth'); ?&gt;" /&gt;
&lt;?php endif; ?&gt;

&lt;span class="commentDate"&gt;
&lt;?php echo JHTML::_('date', $comment-&gt;commentDate, JText::_('DATE_FORMAT_LC2')); ?&gt;
&lt;/span&gt;

&lt;span class="commentAuthorName"&gt;
&lt;?php echo JText::_("posted by"); ?&gt;
&lt;?php if(!empty($comment-&gt;userLink)): ?&gt;
&lt;a href="&lt;?php echo $comment-&gt;userLink; ?&gt;" title="&lt;?php echo $comment-&gt;userName; ?&gt;" rel="nofollow"&gt;
&lt;?php echo $comment-&gt;userName; ?&gt;
&lt;/a&gt;
&lt;?php else: ?&gt;
&lt;?php echo $comment-&gt;userName; ?&gt;
&lt;?php endif; ?&gt;
&lt;/span&gt;

&lt;p&gt;&lt;?php echo $comment-&gt;commentText; ?&gt;&lt;/p&gt;
&lt;br class="clr" /&gt;
&lt;/li&gt;
&lt;?php endforeach; ?&gt;
&lt;/ul&gt;

&lt;div class="itemCommentsPagination"&gt;
&lt;?php echo $this-&gt;pagination-&gt;getPagesLinks(); ?&gt;
&lt;div class="clr"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;?php endif; ?&gt;

&lt;?php if($this-&gt;item-&gt;params-&gt;get('commentsFormPosition')=='below' &amp;&amp; $this-&gt;item-&gt;params-&gt;get('itemComments') &amp;&amp; !JRequest::getInt('print') &amp;&amp; ($this-&gt;item-&gt;params-&gt;get('comments') == '1' || ($this-&gt;item-&gt;params-&gt;get('comments') == '2' &amp;&amp; K2HelperPermissions::canAddComment($this-&gt;item-&gt;catid)))): ?&gt;
&lt;!-- Item comments form --&gt;
&lt;div class="itemCommentsForm"&gt;
&lt;?php echo $this-&gt;loadTemplate('comments_form'); ?&gt;
&lt;/div&gt;
&lt;?php endif; ?&gt;

&lt;?php $user = &amp;JFactory::getUser(); if ($this-&gt;item-&gt;params-&gt;get('comments') == '2' &amp;&amp; $user-&gt;guest):?&gt;
&lt;div&gt;&lt;?php echo JText::_('Login to post comments');?&gt;&lt;/div&gt;
&lt;?php endif; ?&gt;

&lt;/div&gt;
&lt;?php endif; ?&gt;



&lt;?php if($this-&gt;item-&gt;params-&gt;get('itemAuthorBlock') &amp;&amp; empty($this-&gt;item-&gt;created_by_alias)):?&gt;
&lt;div class="itemAuthorBlockWrapper"&gt;
&lt;!-- Author Block --&gt;
&lt;h3 class="itemAuthorName"&gt;
&lt;a href="&lt;?php echo $this-&gt;item-&gt;author-&gt;link; ?&gt;"&gt;&lt;?php echo $this-&gt;item-&gt;author-&gt;name; ?&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;div class="itemAuthorBlock"&gt;

&lt;?php if($this-&gt;item-&gt;params-&gt;get('itemAuthorImage') &amp;&amp; !empty($this-&gt;item-&gt;author-&gt;avatar)):?&gt;
&lt;img class="itemAuthorAvatar" src="&lt;?php echo $this-&gt;item-&gt;author-&gt;avatar; ?&gt;" alt="&lt;?php echo $this-&gt;item-&gt;author-&gt;name; ?&gt;" /&gt;
&lt;?php endif; ?&gt;

&lt;div class="itemAuthorDetails"&gt;


&lt;?php if($this-&gt;item-&gt;params-&gt;get('itemAuthorDescription') &amp;&amp; !empty($this-&gt;item-&gt;author-&gt;profile-&gt;description)):?&gt;
&lt;p&gt;&lt;?php echo $this-&gt;item-&gt;author-&gt;profile-&gt;description; ?&gt;&lt;/p&gt;
&lt;?php endif; ?&gt;

&lt;?php if($this-&gt;item-&gt;params-&gt;get('itemAuthorURL') &amp;&amp; !empty($this-&gt;item-&gt;author-&gt;profile-&gt;url)):?&gt;
&lt;span class="itemAuthorUrl"&gt;&lt;?php echo JText::_("Website:"); ?&gt; &lt;a href="&lt;?php echo $this-&gt;item-&gt;author-&gt;profile-&gt;url; ?&gt;" target="_blank"&gt;&lt;?php echo str_replace('http://','',$this-&gt;item-&gt;author-&gt;profile-&gt;url); ?></a></span>
&lt;?php endif; ?&gt;

&lt;?php if($this-&gt;item-&gt;params-&gt;get('itemAuthorEmail')):?&gt;
&lt;span class="itemAuthorEmail"&gt;&lt;?php echo JText::_("E-mail:"); ?&gt; &lt;?php echo JHTML::_('Email.cloak', $this-&gt;item-&gt;author-&gt;email); ?&gt;&lt;/span&gt;
&lt;?php endif; ?&gt;

&lt;div class="clr"&gt;&lt;/div&gt;

&lt;!-- K2 Plugins: K2UserDisplay --&gt;
&lt;?php echo $this-&gt;item-&gt;event-&gt;K2UserDisplay; ?&gt;

&lt;/div&gt;
&lt;div class="clr"&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;?php if($this-&gt;item-&gt;params-&gt;get('itemAuthorLatest') &amp;&amp; empty($this-&gt;item-&gt;created_by_alias) &amp;&amp; isset($this-&gt;authorLatestItems)): ?&gt;
&lt;!-- Latest items from author --&gt;
&lt;div class="itemAuthorLatest"&gt;
&lt;h3&gt;&lt;?php echo JText::_("Latest from"); ?&gt; &lt;?php echo $this-&gt;item-&gt;author-&gt;name; ?&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;?php foreach($this-&gt;authorLatestItems as $key=&gt;$item): ?&gt;
&lt;li class="&lt;?php echo ($key%2) ? "odd" : "even"; ?&gt;"&gt;
&lt;a href="&lt;?php echo $item-&gt;link ?&gt;"&gt;&lt;?php echo $item-&gt;title; ?&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;?php endforeach; ?&gt;
&lt;/ul&gt;
&lt;div class="clr"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;?php endif; ?&gt;


&lt;div class="clr"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;


&lt;div class="itemBackToTop"&gt;
&lt;a class="k2Anchor" href="&lt;?php echo $this-&gt;item-&gt;link; ?&gt;#startOfPageId&lt;?php echo JRequest::getInt('id'); ?&gt;"&gt;&lt;?php echo JText::_("go back to top"); ?&gt;&lt;/a&gt;

&lt;?php if($this-&gt;item-&gt;params-&gt;get('itemCategory')): ?&gt;
&lt;!-- Item category name --&gt;
&lt;span class="itemCategory"&gt;
&lt;span&gt;&lt;?php echo JText::_('or return to:'); ?&gt;&lt;/span&gt;
&lt;a href="&lt;?php echo $this-&gt;item-&gt;category-&gt;link; ?&gt;"&gt;&lt;?php echo $this-&gt;item-&gt;category-&gt;name; ?&gt;&lt;/a&gt;
&lt;/span&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;

&lt;div class="clr"&gt;&lt;/div&gt;

&lt;/div&gt;



&lt;!-- End K2 Item Layout --&gt;
  • johanna
  • johanna's Avatar
22 Sep 2011 19:24
Replied by johanna on topic First name, last name

First name, last name

Category: English K2 Community

Thanks for your reply. I'm going to have to pick the data apart somehow. I'm not a programmer. Ultimately a MYSQL table or CSV export is just text so I'll find a way.

 

I think it would have been better if the K2 extended fields plugin saved the extra data in separate fields instead of one field.

 

There are components to export Joomla user table and K2 content but not K2 users.
  • alexandre
  • alexandre's Avatar
18 Sep 2011 01:07
Three (3) questions about K2 & community was created by alexandre

Three (3) questions about K2 & community

Category: English K2 Community

Hello all

I've been using K2 for a few sites now but have some questions I haven't seen solved in the forums. 

Maybe they are somewhat basic, but address common problems of building professional sites with K2.

 

1) How to parse joomla plugins in the K2 user profile?

Since it's possible to always display the user profile after articles (being it a blogger, a company or a product seller), parsing joomla plugins within it allows us to, for example, include a contact form or atbs or even some additional info, that can't be acomplished with the current extra fields or even external coms like Sherpa. So, what do on has to change in K2 to allow for parsing of joomla plugins in the user profile area?

 

2) Is there a simple way of adding recaptcha to the K2 registration form?

I've seen a couple of workarounds in the forums, some of them leading to conflicts with other recaptcha solutions installed in the site. Pardon me all that have invested time and dedication in bringing the solutons found in the forum, but If tried them all and none worked flawlessly. Yes, one can argue that is because of the template or maybe because of another recaptcha comp installed, but still all involved hacking the code and not having a stable solution. So, anyone has a solution for this?

 

3) What is the component used for the K2 community registration?

Sort of off-topic, but it's a nice registration process and forms.

 

thanks in advance
  • emc23
  • emc23's Avatar
16 Aug 2011 18:22
extending User using K2 was created by emc23

extending User using K2

Category: English K2 Community

With K2, VirtueMart and K2Mart (and the usermeta plugin) installed,  I am trying to provide the most straightforward registration process for my clients.

Virtuemart Registration includes shipping info and other related info but is not extendable.

K2 offers Male and Female and description

While usermeta allows me to extend the joomla registration process using an extra table.

 

K2s choice of fields seems arbitrary. Are they example fields? Is there a way of extending it's functionality similar to usermeta? 

If not what are the disadvantages to turning the plugin off and sticking with usermeta?

 

Any other issues I might need to address?

 

thanks

 

Rob

 
  • BBC
  • BBC's Avatar
09 Jul 2011 21:09
Replied by BBC on topic Use Joomla Plugins in extra fields?

Use Joomla Plugins in extra fields?

Category: English K2 Community

Ah, sorry, i see now. Plugin code and brackets are prepared in K2 template. So it is just to write folder name in extra field ?

 

So with this code is absolutely possible to have Magic Tabs, and have an extra field (even with editor) for each tab, to populate. And users cannot destroy anything.

 

www.greatjoomla.com/news/plugins/update-core-design-magic-ta...

jqueryui.com/themeroller/
  • Rastislav Klc
  • Rastislav Klc's Avatar
06 Jul 2011 19:36
Replied by Rastislav Klc on topic Simple Image Gallery does not work in k2

Simple Image Gallery does not work in k2

Category: English K2 Community

Hi guys,

there is so much stir in this topic that I would like to clarify the whole thing the way I understand it.


K2 is content component for Joomla. As such it brings its own handling of certain aspects of output and awesome templating techniques :) Therefore it does not necessary behaves exactly as original content in Joomla. Extra Fields, I think, were originally meant to simply enter some simple "extra" information that can be used in template .php file to user's liking. Extra Field does not necessary holds information that should be outputted DIRECTLY to the browser. It could be counter of some sort, it can be weight, color, age, etc. (value can be used as counter in cycles, path to file, extra configuration...). But also it can hold html code meant for output (ex: room description of hotel in my website).


So the information of what should happen with this Extra Field information is prescribed in .php template file. There is some default behavior which is written in bunch of default templates, for ex. in file:
components/com_k2/templates/default/item.php

However you should never touch this file. Therefore there is perfectly legitimate and advised way of customizing and overwriting this .php template file - which is essential to K2 templating. You can read details about K2 templating here simon.getk2.org/k2-documents/item/91-templating. Making long story short, for above file there should be this custom file that will handle representation of default item:
templates/YOUR_TEMPLATE/html/com_k2/default/item.php

This is not a hack, this is how it should be done and you are not touching core files, just customizing template.

 

So basically when you create template from scratch (or just copying and adjusting existing default template), you need to define how those Extra Fields will be handled. By default they are just plainly echoed for browser as name and value pair. See that original item.php file around line 255. However they are not scanned for {plugin} tags, therefore plugins are not recognized.

 

You can write your own template (or copy and adjust existing). There are basically 2 aproaches that come to my mind. Both will require to adjust for ex. this file
templates/YOUR_TEMPLATE/html/com_k2/default/item.php
and of course that template must be activated in Joomla backend. You do not have to build whole new template, neither your template will have to have all the template files, it is enough to copy and adjust just single file, rest of the template will automagically use default template provided by K2. So finaly here are two snipets that could be used in item.php custom template file:

 

1) Output all the extra fields in the same fashion as it was main content (example lacks any extra html formating):
&lt;?php foreach ($this-&gt;item-&gt;extra_fields as $key=&gt;$extraField): ?&gt; &lt;?php echo JHTML::_('content.prepare', $extraField-&gt;value); ?&gt;&lt;?php endforeach; ?&gt;

In this case you can write in any extra field html + any plugin with its crazy parameters and it will be outputed as expected. So you can enter in backend's extrafield something like this:
This is my gallery. {gallery rows=3 cols=1 width=200 height=140 crop=1 labels=captions alignment=left orientation=horizontal buttons=0 links=0 counter=0 overlay=1}stories/brasil/{/gallery} Pictures are showing my vacation in Brasil :)
 

2) There could be numerous cases when you decide that extrafield will hold just partial info (like path to the gallery). ex: first extrafield will be gallery description, second field path, etc. you get the idea:
&lt;?php
$galleryDesc = $this-&gt;item-&gt;extra_fields[1]-&gt;value $galleryPath = $this-&gt;item-&gt;extra_fields[2]-&gt;value
echo
$galleryDesc .'&lt;br /&gt;'
;
echo JHTML::_('content.prepare', '{gallery}' .
$galleryPath
.'
{/gallery}'
); ?&gt;

So the difference is in designers mind. You just have to know what to expect in Extra Fields and prepare content according. then in .php template file put all the pieces together as you like.


This was exhausting post :)

 

PS: there couold be some syntax mishap, I did not test it, but sure the idea is right.
  • matthew turner
  • matthew turner's Avatar
06 Jul 2011 02:34
Replied by matthew turner on topic Simple Image Gallery does not work in k2

Simple Image Gallery does not work in k2

Category: English K2 Community

Hi Jock,

Yes that works in extrafields using the template over ride code i previously posted... !!

Nice gallery, not seen it before - thanks.

Plug in code I entered into a "Text Field" extra field which worked:

{gallery rows=3 cols=1 width=200 height=140 crop=1 labels=captions alignment=left orientation=horizontal buttons=0 links=0 counter=0 overlay=1}food/{/gallery}

 

I even have loadposition plugin running using the same code, and Joomlaworks Gallery pro plugin at the same time...

If this is for users to fill in you could re write the code where several extrafields make up the "whole" plugin string...?

And at the same time keep overall control of the layout / plug in over rides that you want eg pop up engine/light box used?

The options are limitless once you assign the extrafields to variables....

Extra images..

Mp3s...

Email links...
  • Roomio
  • Roomio's Avatar
27 May 2011 17:30

Hide the photo gallery from the front page

Category: English K2 Community

Greeting..!!

I have installed this amazing plug-in on K2 module with the aim to manage Joomla! contents on my website...

The home page contains many of items, each one contains thumbnail, article and extra fields..

When I tried to assign image gallery to each item, I faced a problem that it shows all image galleries on the home page with the items, not only on the specific page...

I want to keep my home page clean and light and don't want to show the galleries on it...

At the same time I want the user be able to brows the image gallery when he opens the specific item page only.. so could you please guide me how I can do that ...

 

Best Regards
  • Roomio
  • Roomio's Avatar
27 May 2011 17:24

Hide the photo gallery from the front page,

Category: Simple Image Gallery

Greeting..!!
I have installed this amazing plug-in on K2 module with the aim to manage Joomla! contents on my website...
The home page contains many of items, each one contains thumbnail, article and extra fields..
When I tried to assign image gallery to each item, I faced a problem that it shows all image galleries on the home page with the items, not only on the specific page...
I want to keep my home page clean and light and don't want to show the galleries on it...
At the same time I want the user be able to brows the image gallery when he opens the specific item page only.. so could you please guide me how I can do that ...

Best Regards
  • BBC
  • BBC's Avatar
23 May 2011 22:50
Replied by BBC on topic Can I add extra fields to K2 users?

Can I add extra fields to K2 users?

Category: English K2 Community

Go to Joomla extension site. There you have a plugin for custom fields for users.

 

I don´t know if they are searchable. Didn´t tried.
  • Ed Saleh
  • Ed Saleh's Avatar
21 May 2011 17:39
Replied by Ed Saleh on topic Use Joomla Plugins in extra fields?

Use Joomla Plugins in extra fields?

Category: English K2 Community

How did you use "Art Plugin"? There's no instructions at all

To rephrase the above question, how can we make the "Text Area" extra field to be used as a regular editor that executes plugins. The "Text Area" currently works as an editor but it does NOT execute plugins. 
JoomlaJet said:

actually, this one (the first one I pointed out):

extensions.joomla.org/extensions/core-enhancements/embed-a-i...

does work the way you are asking. I just did a quick test to make sure, and it does cause the plugins to be parsed correctly.

The only "catch" is that some users say that it doesn't work when they turn on caching and truthfully, I didn't test that out for myself. 

 

I have used this 2 ways and both worked:

1. add plugin code to the k2 field

2. add plugin code the the k2 custom template
  • mike cartwright
  • mike cartwright's Avatar
20 May 2011 20:23
Integration with Community Builder Profile Data? was created by mike cartwright

Integration with Community Builder Profile Data?

Category: English K2 Community

I have scoured the web and this website, but I cannot find a plugin to integrate K2 and Community Builder.

I would like to use the user profile on community builder to create an input area (custom tab with custom fields) for the K2 fields and extra fields.  It should not be too hard, but it does not look like there is such a plugin available.

So, does anyone know of a way to accomplish this?

I should be able to code it myself, with a little help. I would need to know where and how to access both the Community Builder data and the K2 data (including extra fields). My coding skills are pretty good. My understanding of the Joomla framework however, is pretty basic.

Thanks in advance for any and all help!
  • Josh
  • Josh's Avatar
20 May 2011 18:24
Replied by Josh on topic Limiting introtext under tag lists?

Limiting introtext under tag lists?

Category: English K2 Community

hi sorry about the late reply.

I use only one generic.php as I don't think its actually possible to use more than one themed generic.php. I believe that generic.php should be placed within the /templates/YOURJOOMLATEMPLATE/html/com_k2/ and not within an override sub folder

(community.getk2.org/notes/Templating_in_K2 paragraph 4 and 5)

 

Try using only one generic.php and moving the &lt;?php echo K2HelperUtilities::wordLimit($item-&gt;introtext,30); ?&gt;

to inside the genericItemIntroText div. just below the uncommented &lt;?php /* echo $item-&gt;introtext; */?&gt;

 

Like such:

 

&lt;?php/** * @version        $Id: generic.php 478 2010-06-16 16:11:42Z joomlaworks $ * @package        K2 * @author        JoomlaWorks www.joomlaworks.gr * @copyright    Copyright (c) 2006 - 2010 JoomlaWorks, a business unit of Nuevvo Webware Ltd. All rights reserved. * @license        GNU/GPL license: www.gnu.org/copyleft/gpl.html */// no direct accessdefined('_JEXEC') or die('Restricted access');?><!-- Start K2 Generic Layout --><div id="k2Container" class="genericView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>">    <?php if($this->params->get('show_page_title')): ?>    <!-- 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('userFeed')): ?>    <!-- RSS feed icon -->    <div class="k2FeedIcon">        <a href="/<?php echo $this->feed; ?>" title="<?php echo JText::_('Subscribe to this RSS feed'); ?>">            <span><?php echo JText::_('Subscribe to this RSS feed'); ?></span>        </a>        <div class="clr"></div>    </div>    <?php endif; ?>    <?php if(count($this->items)): ?>    <div class="genericItemList">        <?php foreach($this->items as $item): ?>        <!-- Start K2 Item Layout -->        <div class="genericItemView">            <div class="genericItemHeader">                <?php if($item->params->get('genericItemDateCreated')): ?>                <!-- Date created -->                <span class="genericItemDateCreated">                    <?php echo JHTML::_('date', $item->created , JText::_('DATE_FORMAT_LC2')); ?>                </span>                <?php endif; ?>                         <?php if($item->params->get('genericItemTitle')): ?>              <!-- Item title -->              <h2 class="genericItemTitle">                  <?php if ($item->params->get('genericItemTitleLinked')): ?>                    <a href="/<?php echo $item->link; ?>">                      <?php echo $item->title; ?>                  </a>                  <?php else: ?>                  <?php echo $item->title; ?>                  <?php endif; ?>              </h2>              <?php endif; ?>          </div>          <div class="genericItemBody">              <?php if($item->params->get('genericItemImage') && !empty($item->imageGeneric)): ?>              <!-- Item Image -->              <div class="genericItemImageBlock">                  <span class="genericItemImage">                    <a href="/<?php echo $item->link; ?>" title="<?php if(!empty($item->image_caption)) echo $item->image_caption; else echo $item->title; ?>">                        <img src="/<?php echo $item->imageGeneric; ?>" alt="<?php if(!empty($item->image_caption)) echo $item->image_caption; else echo $item->title; ?>" style="width:<?php echo $item->params->get('itemImageGeneric'); ?>px; height:auto;" />                    </a>                  </span>                  <div class="clr"></div>              </div>              <?php endif; ?>             <?php if($item->params->get('genericItemIntroText')): ?>        <!-- Item introtext -->        <div class="genericItemIntroText">          <?php /* echo $item->introtext; */?><?php echo K2HelperUtilities::wordLimit($item->introtext,30); ?>        </div>                <?php endif; ?>              <div class="clr"></div>          </div>                   <div class="clr"></div>                   <?php if($item->params->get('genericItemExtraFields') && count($item->extra_fields)): ?>          <!-- Item extra fields -->           <div class="genericItemExtraFields">              <h4><?php echo JText::_('Additional Info'); ?></h4>              <ul>                <?php foreach ($item->extra_fields as $key=>$extraField): ?>                <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">                    <span class="genericItemExtraFieldsLabel"><?php echo $extraField->name; ?></span>                    <span class="genericItemExtraFieldsValue"><?php echo $extraField->value; ?></span>                       </li>                <?php endforeach; ?>                </ul>            <div class="clr"></div>          </div>          <?php endif; ?>                     <?php if($item->params->get('genericItemCategory')): ?>            <!-- Item category name -->            <div class="genericItemCategory">                <span><?php echo JText::_('Published in'); ?></span>                <a href="/<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a>            </div>            <?php endif; ?>                       <?php if ($item->params->get('genericItemReadMore')): ?>            <!-- Item "read more..." link -->            <div class="genericItemReadMore">                <a class="k2ReadMore" href="/<?php echo $item->link; ?>">                    <?php echo JText::_('Read more...'); ?>                </a>            </div>            <?php endif; ?>            <div class="clr"></div>        </div>        <!-- End K2 Item Layout -->               <?php endforeach; ?>    </div>    <!-- Pagination -->    <?php if($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 Generic Layout -->

 

community.getk2.org/profiles/blogs/modifying-the-tags-results
  • NintendoNerds
  • NintendoNerds's Avatar
19 May 2011 15:31
Replied by NintendoNerds on topic Limiting introtext under tag lists?

Limiting introtext under tag lists?

Category: English K2 Community

Wow! That looks great, Josh. I tried making that change to my generic.php file but it did not work. Below, I have posted the generic.php file from my override directory. Also, here is how my current tag listing looks:

www.nintendonerds.com/articles/other/itemlist/tag/may%202011

 

&lt;?php/** * @version        $Id: generic.php 478 2010-06-16 16:11:42Z joomlaworks $ * @package        K2 * @author        JoomlaWorks www.joomlaworks.gr * @copyright    Copyright (c) 2006 - 2010 JoomlaWorks, a business unit of Nuevvo Webware Ltd. All rights reserved. * @license        GNU/GPL license: www.gnu.org/copyleft/gpl.html */// no direct accessdefined('_JEXEC') or die('Restricted access');?><!-- Start K2 Generic Layout --><div id="k2Container" class="genericView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>">    <?php if($this->params->get('show_page_title')): ?>    <!-- 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('userFeed')): ?>    <!-- RSS feed icon -->    <div class="k2FeedIcon">        <a href="/<?php echo $this->feed; ?>" title="<?php echo JText::_('Subscribe to this RSS feed'); ?>">            <span><?php echo JText::_('Subscribe to this RSS feed'); ?></span>        </a>        <div class="clr"></div>    </div>    <?php endif; ?>    <?php if(count($this->items)): ?>    <div class="genericItemList">        <?php foreach($this->items as $item): ?>        <!-- Start K2 Item Layout -->        <div class="genericItemView">            <div class="genericItemHeader">                <?php if($item->params->get('genericItemDateCreated')): ?>                <!-- Date created -->                <span class="genericItemDateCreated">                    <?php echo JHTML::_('date', $item->created , JText::_('DATE_FORMAT_LC2')); ?>                </span>                <?php endif; ?>                          <?php if($item->params->get('genericItemTitle')): ?>              <!-- Item title -->              <h2 class="genericItemTitle">                  <?php if ($item->params->get('genericItemTitleLinked')): ?>                    <a href="/<?php echo $item->link; ?>">                      <?php echo $item->title; ?>                  </a>                  <?php else: ?>                  <?php echo $item->title; ?>                  <?php endif; ?>              </h2>              <?php endif; ?>          </div>          <div class="genericItemBody">              <?php if($item->params->get('genericItemImage') && !empty($item->imageGeneric)): ?>              <!-- Item Image -->              <div class="genericItemImageBlock">                  <span class="genericItemImage">                    <a href="/<?php echo $item->link; ?>" title="<?php if(!empty($item->image_caption)) echo $item->image_caption; else echo $item->title; ?>">                        <img src="/<?php echo $item->imageGeneric; ?>" alt="<?php if(!empty($item->image_caption)) echo $item->image_caption; else echo $item->title; ?>" style="width:<?php echo $item->params->get('itemImageGeneric'); ?>px; height:auto;" />                    </a>                  </span>                  <div class="clr"></div>              </div>              <?php endif; ?>              <?php if($item->params->get('genericItemIntroText')): ?>        <!-- Item introtext -->        <div class="genericItemIntroText">          <?php /* echo $item->introtext; */?>        </div>        <?php echo K2HelperUtilities::wordLimit($item->introtext,30); ?>        <?php endif; ?>              <div class="clr"></div>          </div>                    <div class="clr"></div>                    <?php if($item->params->get('genericItemExtraFields') && count($item->extra_fields)): ?>          <!-- Item extra fields -->            <div class="genericItemExtraFields">              <h4><?php echo JText::_('Additional Info'); ?></h4>              <ul>                <?php foreach ($item->extra_fields as $key=>$extraField): ?>                <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">                    <span class="genericItemExtraFieldsLabel"><?php echo $extraField->name; ?></span>                    <span class="genericItemExtraFieldsValue"><?php echo $extraField->value; ?></span>                        </li>                <?php endforeach; ?>                </ul>            <div class="clr"></div>          </div>          <?php endif; ?>                      <?php if($item->params->get('genericItemCategory')): ?>            <!-- Item category name -->            <div class="genericItemCategory">                <span><?php echo JText::_('Published in'); ?></span>                <a href="/<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a>            </div>            <?php endif; ?>                        <?php if ($item->params->get('genericItemReadMore')): ?>            <!-- Item "read more..." link -->            <div class="genericItemReadMore">                <a class="k2ReadMore" href="/<?php echo $item->link; ?>">                    <?php echo JText::_('Read more...'); ?>                </a>            </div>            <?php endif; ?>            <div class="clr"></div>        </div>        <!-- End K2 Item Layout -->                <?php endforeach; ?>    </div>    <!-- Pagination -->    <?php if($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 Generic Layout -->
Displaying 161 - 180 out of 248 results.

Powered by Kunena Forum