Keyword

Advanced Search

Search Results (Searched for: k2 Tag)

  • Leena
  • Leena's Avatar
26 Jul 2021 08:38

How to Show K2 Item Tag List in Template's index.php

Category: English K2 Community

I need to get the tag list of a K2 item and display it in a position in my template's index.php.

Pasting the code below in index.php allows me to retrieve's the K2 item's title:

$app = JFactory::getApplication();
$jinput = $app->input; 
$option = $jinput->getCmd('option');
$view = $jinput->getCmd('view');

if ($option=="com_k2" && $view=="item") 
{
    $item_id = $jinput->getInt('id');

    JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_k2/tables');
    $item = JTable::getInstance('K2Item', 'Table', array());
    $item->load($item_id);

    echo "<p>" . $item->title . "</p>";
}

How can I tweak this to get the item's tag list instead?

Thank you!

I think a possible answer is here:  Custom K2 Content Module Assistance - Page 2 - Community Forum - JoomlaWorks , but the code won't show so I'm not sure what to do.
  • Goble002
  • Goble002's Avatar
20 Jul 2021 12:37
Replied by Goble002 on topic Duplicate k2 category listing

Duplicate k2 category listing

Category: English K2 Community

Hi and thanks,

however this will add :
/item/ in my k2 items URL
/itemlist/tag/ in my k2 tags

I cannot afford to create menu items for these 500+ k2 items and Google has already index them.

May be a small trick in htaccess or somewhere else ?
  • Gregory Dahl
  • Gregory Dahl's Avatar
23 Jun 2021 03:13
Lost all my galleries in SIG Pro was created by Gregory Dahl

Lost all my galleries in SIG Pro

Category: Simple Image Gallery PRO

I installed a joomlabamboo.com template called responsive2. I was experiencing issues with the menu. 
I wanted to test for a conflict with Simple Image Gallery Pro (It was at least 6 years old), So I turned it off, ran my test, no change, so I turned SIG Pro back on.
Now none of the galleries appear out front. They exist under each K2 item, but they do not load into each page. 
I purchased and installed the latest version.
I have searched in the MySql DB in the K2 tables, but couldn't find anything. I looked in the com_sig folders (the original sig stored info in txt files, not in the db).

Anyone run across this? Any Ideas?

Staging Site:
primus2.access-websites.com/products-menu/led-products-comp/item/721-elements-3-led-wet

Legacy:
primuslighting.com/products-menu/led-products-comp/item/721-elements-3-led-wet
  • JoomlaWorks
  • JoomlaWorks's Avatar
23 Jun 2021 01:35

K2 removes HTML tags from the introductory texts. Links are shown as text only.

Category: English K2 Community

K2 Settings > Site (tab) > Content Cleanup

Keep in mind that if you have a word limit enforced in a category or module, then all HTML tags are stripped to prevent HTML breaking from unclosed HTML tags.
  • JoomlaWorks
  • JoomlaWorks's Avatar
22 Jun 2021 23:15
Replied by JoomlaWorks on topic Tage show value and default page

Tage show value and default page

Category: English K2 Community

Replying...

1. You'll need to find a different solution.

2. If a user owns 500+ items (to edit) in which case the pagination becomes an issue, then it's best to have them access the backend for content editing, not the frontend. You can configure Joomla easily so a user access e.g. only K2. Frontend editing is for casual content contributors, not regulars.
  • forensis
  • forensis's Avatar
17 Jun 2021 19:47

K2 removes HTML tags from the introductory texts. Links are shown as text only.

Category: English K2 Community

I'm looking for the option to set K2 so that HTML code also works in the introductory texts / teasers? I definitely want links and line breaks to appear correctly.
Here I have a "practical manual for Joomla 3.x and K2" from the author Karl-Heinz Derhake that is apparently no longer up-to-date. Unfortunately there is no other German documentation for K2 far and wide.
In the manual, under 10.3.2 Parameters - Contents: Point 10.3.2.2 Contents of clearing up: "Enter the HTML tags that should not be removed from the introductory text: Separate valid HTML tags with commas, e.g. img, br, p, a, b, span etc"
I can't tell which K2 version it refers to, but this tab no longer exists in the current K2 v2.10.4 - or I'm too blind to find this option. I didn't have to set anything special in the direct Joomla articles; they make HTML links appear right in the introductory texts, but K2 mercilessly throws any HTML code out of the teasers. Does anyone know whether this non-remove HTML option no longer exists in K2 or whether it can be found somewhere else?
Kind regards, Fori
  • forensis
  • forensis's Avatar
17 Jun 2021 19:35

K2 wirft HTML-Tags aus den Einleitungstexten raus. Links kommen nur als Text

Category: Offizielle deutsche Gemeinschaft

Ich suche nach der Option, K2 so einzustellen, dass auch in den Einleitungstexten/Teasern HTML-Code funktioniert? Ich möchte auf jeden Fall, dass Links und Zeilenumbrüche richtig dargestellt werden.Hier habe ich ein offenbar nicht mehr aktuelles "Praxishandbuch zu Joomla 3.x und K2" von einem Karl-Heinz Derhake. Leider gibt es weit und breit keine andere deutsche Dokumentation für K2.In dem Handbuch steht unter 10.3.2 Parameter – Inhalt: Punkt 10.3.2.2 Inhalt Aufräumen:"Geben Sie die HTML-Tags an, die nicht aus dem Einleitungstext entfernt werden sollen: Gültige HTML-Tags durch Komma trennen, z.B. img, br, p, a, b, span etc"Ich kann nicht erkennen, auf welche K2-Version er sich bezieht, aber in der aktuellen K2 v2.10.4 gibt es diesen Reiter nicht mehr - oder ich bin zu blind, diese Option zu finden.In den direkten Joomla-Artikeln musste ich nichts Spezielles einstellen; sie lassen HTML-Links in den Einleitungstexten richtig erscheinen, aber K2 wirft gnadenlos jeden HTML-Code aus den Teasern raus.Weiß jemand, ob es diese HTML-Nicht-entfernen Option in K2 heute gar nicht mehr gibt oder ob sie irgendwo anders zu finden ist?

Viele Grüße
Fori
  • Goble002
  • Goble002's Avatar
17 Jun 2021 15:40
Structured data template file was created by Goble002

Structured data template file

Category: English K2 Community

Hello,

I was reading this thread :  Best Way to add Google Structured Data to K2

Any updated template on github to copy paste microdata from ?

For example microdata for "ratings", "k2 tags" are missing here .

Thanks ! ;-)
  • Bảo hộ lao động tốt
  • Bảo hộ lao động tốt's Avatar
16 Jun 2021 07:40
Replied by Bảo hộ lao động tốt on topic facebook share button not showing in post k2

facebook share button not showing in post k2

Category: English K2 Community

it doesn't work

<!-- Facebook Button -->
        <div class="itemFacebookButton">
            <div id="fb-root"></div>
            <script async defer crossorigin="anonymous" src="connect.facebook.net/item->langTagForFB; ?>/sdk.js#xfbml=1&version=v3.3">
            <div class="fb-like" data-href="<?php echo $this->item->sharinglink; ?>" data-width="160" data-layout="button_count" data-action="like" data-size="small" data-show-faces="false" data-share="true"></div>
        </div>
  • saovry
  • saovry's Avatar
11 Jun 2021 05:28
Replied by saovry on topic Tage show value and default page

Tage show value and default page

Category: English K2 Community

2. I assume you mean frontend editing, right?
Yes, my users has problem to edit items at front page. K2 helps can help this point? Every time user edit items so the page load to first page so they they need click button next again and again until they get their page to edit tiems.

1. What is the purpose of the counter/number? Is it an indicator of how many items have a given tag? If so, it's a really terrible idea in terms of performance...
because my user want to know, how many people want to become doctor, teacher, nurse, male, female and more since some time items has the same tages? Do you have any idea about this points sir...
  • JoomlaWorks
  • JoomlaWorks's Avatar
31 May 2021 21:36
Replied by JoomlaWorks on topic K2 item table: print tags into metakey row

K2 item table: print tags into metakey row

Category: English K2 Community

If you're interested in a proper sitemap for Google News though, we have a (yet un-released, but battle-tested) commercial plugin that does exactly that - and it's the lightest it can get. Use our contact page here www.joomlaworks.net/support/get-help/contact if you'd like a copy.
  • JoomlaWorks
  • JoomlaWorks's Avatar
31 May 2021 21:33
Replied by JoomlaWorks on topic K2 item table: print tags into metakey row

K2 item table: print tags into metakey row

Category: English K2 Community

Last time I checked, the spec for Google News XML sitemaps does not require (nor accept) any keywords...

support.google.com/news/publisher-center/answer/9606710?hl=en
  • RomyS
  • RomyS's Avatar
31 May 2021 21:19
Replied by RomyS on topic K2 item table: print tags into metakey row

K2 item table: print tags into metakey row

Category: English K2 Community

Yes Fotis, I understand. In the case of the k2 feed I use it for the common user, but for example to send news to Google News I use OSMAP PRO and he looks for the "metakey" tab of the database.
That is why it offers you the option of printing them in the database!
  • JoomlaWorks
  • JoomlaWorks's Avatar
31 May 2021 21:08
Replied by JoomlaWorks on topic K2 item table: print tags into metakey row

K2 item table: print tags into metakey row

Category: English K2 Community

Well, this is specific to some component for feeds. K2 can output the tags for each item in its feeds (you need to enable that in K2's settings > feeds). Your feed component could simply pick these up instead (if it already has K2-specific integration).
  • RomyS
  • RomyS's Avatar
31 May 2021 21:06
Replied by RomyS on topic K2 item table: print tags into metakey row

K2 item table: print tags into metakey row

Category: English K2 Community

Hi Fotis!
It is not duplicating, since at least in my installation the column "metakey" of the item in the database is empty.

RSS components read the "metakey" in item table to submit keywords in feeds. As the item's "metakey" table is empty, then the RSS does NOT send keywords!

I hope you understand what I propose. Just in case: I use the latest version of K2!

Regards
  • JoomlaWorks
  • JoomlaWorks's Avatar
31 May 2021 20:55
  • RomyS
  • RomyS's Avatar
27 May 2021 08:02

K2 item table: print tags into metakey row

Category: English K2 Community

Hi Fotis and team!

The option to print the Tags as meta keyword in the head is great, but I am trying to achieve that:

IF saving an item $row->metakey is empty  == selected $tags->name are printed inside $row->metakey

This would simplify and help top SEO by being able to send tha tags as keywords in a sitemap or rss.
I know the modification needs to be done in the item's backend model save method, but I only find these lines referring to both fields and I don't know how to combine them.  Please, could you guide me? 


METAKEY > line 140 >
$metadata = JRequest::getVar('meta', null, 'post', 'array');
        if (is_array($metadata)) {
            $txt = array();
            foreach ($metadata as $k => $v) {
                if ($k == 'description') {
                    $row->metadesc = $v;
                } elseif ($k == 'keywords') {
                    $row->metakey = $v;
                } else {
                    $txt[] = "$k=$v";
                }
            }
            $row->metadata = implode("\n", $txt);
        }


TAGS > line 714 >
   $tags = JRequest::getVar('selectedTags', null, 'POST', 'array');
           
Regards
  • JoomlaWorks
  • JoomlaWorks's Avatar
21 May 2021 20:01 - 29 Mar 2022 22:00

Display k2 item with "registered" access level in category view

Category: English K2 Community

K2 never supported this feature by default (allow introtext to be public then require a login to see the actual item). But it's easily done in K2 template overrides. Since v2.7.1 is really old, it's most likely that you had modified (you or someone else) core files of K2 in the past, adding that functionality (which again is dead simple to add in a K2 sub-template).

First of all, consult this guide getk2.org/documentation/tutorials/templating-with-k2-and-the-concepts-of-sub-templates to make a copy of K2's template overrides inside your template's /html folder.

Once you copy the files in /templates/YOUR_TEMPLATE/html/com_k2/ you should have a "default" folder in there. Duplicate that folder to the name "restricted". Then open up the file /templates/YOUR_TEMPLATE/html/com_k2/restricted/item.php and replace its contents with this:
<?php /** * @version 2.10.x * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2006 - 2021 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL license: https://www.gnu.org/copyleft/gpl.html */ // no direct access defined('_JEXEC') or die; // Test if this is a guest (not logged in) user $user = JFactory::getUser(); if ($user->guest): ?> <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'); ?>"> <h2>Restricted access</h2> <p>You need to <a href="<?php echo JRoute::_('index.php?option=com_users&view=login'); ?>">login</a> first!</p> </div> <?php else: ?> <?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 data-k2-modal="edit" 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); ?> <?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') && !empty($this->item->video)) || ($this->item->params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)) || ($this->item->params->get('itemCommentsAnchor') && $this->item->params->get('itemComments') && $this->item->params->get('comments')) ): ?> <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> </a> <a href="#" id="fontIncrease"> <span><?php echo JText::_('K2_INCREASE_FONT_SIZE'); ?></span> </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('itemImage') && !empty($this->item->image)): ?> <!-- Item Image --> <div class="itemImageBlock"> <span class="itemImage"> <a data-k2-modal="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('itemExtraFields') && isset($this->item->extra_fields) && 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; ?> alias<?php echo ucfirst($extraField->alias); ?>"> <?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('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') || $this->item->params->get('itemFacebookButton') || $this->item->params->get('itemLinkedInButton') ): ?> <!-- Social sharing --> <div class="itemSocialSharing"> <?php if($this->item->params->get('itemTwitterButton')): ?> <!-- Twitter Button --> <div class="itemTwitterButton"> <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo $this->item->sharinglink; ?>" data-via="<?php if($this->item->params->get('twitterUsername')) echo $this->item->params->get('twitterUsername'); ?>" data-related="<?php if($this->item->params->get('twitterUsername')) echo $this->item->params->get('twitterUsername'); ?>" data-lang="<?php echo $this->item->langTagForTW; ?>" data-dnt="true" data-show-count="true">Tweet</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> </div> <?php endif; ?> <?php if($this->item->params->get('itemFacebookButton')): ?> <!-- Facebook Button --> <div class="itemFacebookButton"> <div id="fb-root"></div> <script async defer crossorigin="anonymous" src="https://connect.facebook.net/<?php echo $this->item->langTagForFB; ?>/sdk.js#xfbml=1&version=v3.3"></script> <div class="fb-like" data-href="<?php echo $this->item->sharinglink; ?>" data-width="160" data-layout="button_count" data-action="like" data-size="small" data-show-faces="false" data-share="true"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemLinkedInButton')): ?> <!-- LinkedIn Button --> <div class="itemLinkedInButton"> <script src="https://platform.linkedin.com/in.js" type="text/javascript"> lang: <?php echo $this->item->langTagForLI; ?> </script> <script type="IN/Share" data-url="<?php echo $this->item->sharinglink; ?>"></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') && isset($this->item->tags) && 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') && isset($this->item->attachments) && 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 ($attachment->titleAttribute) ? K2HelperUtilities::cleanHtml($attachment->titleAttribute) : K2HelperUtilities::cleanHtml($attachment->filename); ?>" href="<?php echo $attachment->link; ?>"> <?php echo ($attachment->title) ? $attachment->title : $attachment->filename; ?> </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"><i class="icon-globe"></i> <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('itemAuthorURL') && !empty($this->item->author->profile->url) && $this->item->params->get('itemAuthorEmail')): ?> <span class="k2HorizontalSep">|</span> <?php endif; ?> <?php if($this->item->params->get('itemAuthorEmail')): ?> <span class="itemAuthorEmail"><i class="icon-envelope"></i> <?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 class="clr"></div> </div> <div class="clr"></div> </div> <?php endif; ?> <?php /* A note regarding 'Latest items from author'... The $item object in the foreach loop carries most item data, so if you wish to show the image of these items just echo $item->image. Do a var_dump($item) to see what's included with $item. */ ?> <?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 /* A note regarding 'Related items by tag'... 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') && !empty($item->image)): ?> <img style="width:<?php echo $item->imageWidth; ?>px;height:auto;" class="itemRelImg" src="<?php echo $item->image; ?>" alt="<?php echo 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 /* Developer Note for the previous/next items: The full item data (e.g. images, the category etc.) are available under $this->item->previous & $this->item->next */ ?> <?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->previous->link)): ?> <a class="itemPrevious" href="<?php echo $this->item->previous->link; ?>">&laquo; <?php echo $this->item->previous->title; ?></a> <?php endif; ?> <?php if(isset($this->item->next->link)): ?> <a class="itemNext" href="<?php echo $this->item->next->link; ?>"><?php echo $this->item->next->title; ?> &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 data-k2-modal="iframe" 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> <!-- Comments Pagination --> <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 class="itemCommentsLoginFirst"><?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 --> <?php endif; ?>


It should be easy to figure out what to change to make your login message look more integrated to your site.

Now the last thing you need to do is assign the "restricted" template to the category (or categories) you wish to apply this "login to see" restriction.
  • JoomlaWorks
  • JoomlaWorks's Avatar
21 May 2021 19:03

How can i uninstall K2 to reinstall recover articles

Category: English K2 Community

Removing K2 but keeping the data tables is pointless. Just re-install if you believe you (or someone else) may have edited any core K2 files.

Perhaps the change though lies in the stock template (again, if it's modified).

In any case, it is a matter of broken HTML. Or was actually as I see your site looks just fine on Chrome (macOS).

Here are 3 screenshots of the site's frontpage (which loads content randomly): jmp.sh/2VYtKQ1

If the layout broke at one point, this may be due to some unclosed <p> tag for example in your introtext. In that case, just enable introtext cleanup (in the K2 Settings) and your HTML will never break in listings.
  • jabeznika
  • jabeznika's Avatar
20 May 2021 21:52 - 21 May 2021 14:03
Replied by jabeznika on topic The plugin could not locate the folder

The plugin could not locate the folder

Category: Simple Image Gallery PRO

Sorry, today I noticed the same problem with "Simple Image Gallery Pro" on different web sites (and different hosting). It is unexpected, few days earlier all was OK.

NoticeThere was a problem rendering your image gallery. Please make sure that the folder you are using in the Simple Image Gallery Pro plugin tags exists and contains valid image files. The plugin could not locate the folder: media/k2/galleries/155

I tryed to change folder permissions, but no result. 

Example: plandeks.lv/ru/remont-tentov/zamena-kryshi.html
Displaying 101 - 120 out of 6582 results.

Powered by Kunena Forum