Keyword

Advanced Search

Search Results (Searched for: k2 Tag)

  • Frank Schreiber
  • Frank Schreiber's Avatar
18 Oct 2018 12:39
Problems with tags was created by Frank Schreiber

Problems with tags

Category: English K2 Community

Hi,

we updated K2 and Joomla! to the newest version and have problems with the tags.

There are two tag clouds on my website: one for my news-section and one for my video-section.

The clouds look the same, but to keep them separated, the tags for videos are with underline (i.e.: _funky) and the tags for news are without underline (i.e.: funky). The underline just gets hidden in the tag-cloud, but you can see it in the address-field of the browser, when clicking on a tag.

Now we have the problem, that clicking on a tag, sometimes results in "the page you requested was not found" (testnewjoomla.frankschreiber.com/en/news.html -> click on "award"), Clicking on the German translated tag (Auszeichnungen), it works, but the tag-cloud and navigation on the right side disappear: testnewjoomla.frankschreiber.com/de/tag/Auszeichnung.html

Also it happens, that clicking twice on a tag, the results jump from video- to news-category (or vice versa):
testnewjoomla.frankschreiber.com/de/tag/_klassisch.html -> please klick on tag "klassisch" again.

Some tags also simly work.

What happended here? Here are two links to the live-site, where everything works perfekt:
www.frankschreiber.com/de/news-archiv.html
www.frankschreiber.com/de/video.html

Best regards,

Frank
  • Chris
  • Chris's Avatar
15 Oct 2018 12:48
Problem with og tags was created by Chris

Problem with og tags

Category: English K2 Community

Hi,

I'm facing a strange and serious problem.
At home page I don't have any joomla article or k2 item, I have 2 modules which show some k2 items, as list.
I use Phoca opengraph content plugin for generating og tags
The problem is that all og tags are from the last k2 item posted. This is wrong, the home page should have Site's description.
Pls advice.

Thanks in advance
Chris
  • raunhar
  • raunhar's Avatar
13 Oct 2018 11:17
Category Description was created by raunhar

Category Description

Category: English K2 Community

URL: www.rajasthan-stone-exporter.com/2018/index.php/our-products/indian-slate-stone.html

Template : CMS Build Blue
Page Builder: Blue Page Builder by CMS BLue

There are few things that I need to do on the K2 Category Pages:
1. I have added description to the category. I need to show it above the items.
2. Is it possible to show the Item Title below the image.
3. Remove ALL (tag) .

Please help.
  • JoomlaWorks
  • JoomlaWorks's Avatar
11 Oct 2018 14:47

Getting only extraFields Dropdown ID (not Value) in tag.php

Category: English K2 Community

Extra fields are processed before they are sent to be displayed.

What K2 view/task are you trying to display the extra fields?
  • JoomlaWorks
  • JoomlaWorks's Avatar
11 Oct 2018 11:02

Getting only extraFields Dropdown ID (not Value) in tag.php

Category: English K2 Community

Can you paste your entire foreach loop please? Also see the above in case you want to retrieve a single extra field anywhere in your overrides:

=== Call specific extra fields in K2 templates ===
So how would you directly output individual extra fields in your K2 overrides? Simple. Just do something like this (e.g. in item.php) to get the extra field name:

$this->item->extraFields->EXTRAFIELD_ALIAS_HERE->name

To get the extra field value you would simply do this:

$this->item->extraFields->EXTRAFIELD_ALIAS_HERE->value
$this->item->extraFields->EXTRAFIELD_ALIAS_HERE->rawValue (for date type only)

Simply replace EXTRAFIELD_ALIAS_HERE with the actual alias of the extra field you wish to output.

In modules, use:

$item->extraFields->EXTRAFIELD_ALIAS_HERE->value
$item->extraFields->EXTRAFIELD_ALIAS_HERE->rawValue (for date type only)
  • JoomlaWorks
  • JoomlaWorks's Avatar
09 Oct 2018 09:53
Replied by JoomlaWorks on topic Tag subtemplte does not override

Tag subtemplte does not override

Category: English K2 Community

In order to assign a specific template override to a tag, you MUST create a menu item for that tag. It's the only way the system can differentiate WHICH sub-template you wish to use.

The other (advanced) option would be to append the sub-template name to the URL of each tag (by modifying the tag cloud's output) and then using a system plugin load the appropriate K2 sub-template.
  • smilesmile
  • smilesmile's Avatar
09 Oct 2018 09:19
Tag subtemplte does not override was created by smilesmile

Tag subtemplte does not override

Category: English K2 Community

Hi there!
I have an issue with overriding tag.php template. I got 2 sub templates for 2 different categories in /mytemplate/html/com_k2/.
Then I use k2 tools tag cloud functionality as a submenu, and all tag links generate tag listings in the default template.
I am sure I have done everything right. Reinstalled K2 several times. J3.8.1 K2 2.8.0.
Please give some hints what might be the cause of this!
greetings

The two instances of K2 tools tag cloud modules are published here: 2017.sklada.bg/bg/novini/ and here: 2017.sklada.bg/bg/izbrani-brandove/
As it might be seen the tag template in the second link is OK since it follows the menu link template (category), but in the first link as soon as any of the two submenu links (tags) "изложба | изложения" is clicked the tag listing has a template that has nothing to do with the previous view
  • Villy Koutsogianni
  • Villy Koutsogianni's Avatar
08 Oct 2018 21:53
Replied by Villy Koutsogianni on topic How to change tag view options?

How to change tag view options?

Category: English K2 Community

I totally understand and I thank you for your time and support so far.
This is exactly what I was talking about

It is a pity that for an obvious layout (tag view same as article view) one needs a 3rd party plg (that may not exist anymore) or else to hack the core K2 code.

My hopes, for a future update :)
  • Yannick Lämmel
  • Yannick Lämmel's Avatar
08 Oct 2018 18:18

Getting only extraFields Dropdown ID (not Value) in tag.php

Category: English K2 Community

Hi there,

before the K2 2.9 Update i was able to get extraField-Values like this (dropdowns):

$item->extraFields->Ort->value

After the 2.9 Update, im not getting a normal Array with all Values but this:
["extra_fields"]=>
string(890) "[{"id":"3","value":["5"]},{"id":"33","value":["7"]},{"id":"31","value":["2"]},..................

I managed to build a Array i could work with:

$extrafields = json_decode($item->extra_fields, true);
$extrafields = array_combine(array_column($extrafields,'id'),$extrafields);

But since it only gives me the ID of the Dropdown Option (not the Value itself), i cant work with it.
The Values are visible in extra_fields_search, but they are not ordered or anything.

How can i access the Dropdown Values?
  • JoomlaWorks
  • JoomlaWorks's Avatar
08 Oct 2018 01:08 - 08 Oct 2018 01:16

After Update to K2 2.9 Extra Fields Don't Work At All

Category: English K2 Community

Switch error reporting to maximum so you can see which part fails (and IF it's K2) as I'm working primarily on PHP 7.2 locally and have no issues at all.

As for sub-templating, JoomlaWorks was literally the first Joomla company to launch such features in its products. That's because we understand CM in CMS. What you want to do is probably called adaptive design/development and it's really not that hard.

In your template's index.php, this is what you need to have different subtemplates per device type:
<?php // URLs with "?m" or "&m" render mobile pages - much like Google's Blogger does / "?force" or "&force" is used to force the desktop view if(isset($_GET['m']) && !isset($_GET['force'])){ include('index.mobile.inc.php'); } else { include('index.desktop.inc.php'); }

Then you need a system plugin (using the onAfterInitialise event) to set a PHP constant like define("SITE_VIEW", "mobile"); or define("SITE_VIEW", "desktop");:
 // Desktop or mobile if(isset($_GET['m']) && !isset($_GET['force'])){ define("SITE_VIEW", "mobile"); } else { define("SITE_VIEW", "desktop"); }

And finally, in your html overrides under /html/com_k2/ you simply check for the value of SITE_VIEW to determine if the user visiting the site is using a mobile or desktop browser.

You would also need the JS redirect in your desktop sub-template, something like:
 <!-- Browser detect and redirect --> <script type="text/javascript"> (function() { // Get URL query strings function getQS(v) { var qs = window.location.search.substring(1); var qsArray = qs.split("&"); for (i = 0; i < qsArray.length; i++) { var qp = qsArray[i].split("="); if (qp[0] == v) { return true; } } } if (getQS('force')) { document.getElementsByTagName('a').onclick = function(el) { if (el.href.indexOf('?') > 0) { el.href = el.href + '&force=1'; } else { el.href = el.href + '?force=1'; } } } if (getQS('m') === undefined) { if (getQS('force')) return; var curUrl = window.location.href; var userAgent = navigator.userAgent || navigator.vendor || window.opera; var getLastChar = curUrl.substr((curUrl.length) - 1); if (((/Android/i).test(userAgent) && (/Mobile/i).test(userAgent)) || (/BlackBerry|iPhone|iPod|Opera Mini|IEMobile/i).test(userAgent)) { if (curUrl.indexOf('?') > 0) { window.location.replace(curUrl + '&m=1'); } else { window.location.replace(curUrl + '?m=1'); } } } })(); </script>

The above makes sure to set ?m or &m and handle ?force or &force if there's a link to enforce the desktop view in your site.

I'm just giving you an idea on how to implement things here, it's not THE solution of course. But the above can work great with any type of caching, either Joomla-based caching or stricter server-side caching e.g. via Varnish or Nginx.

If you need more info, I could make a blog post with more details.
  • JoomlaWorks
  • JoomlaWorks's Avatar
08 Oct 2018 01:00
Replied by JoomlaWorks on topic How to change tag view options?

How to change tag view options?

Category: English K2 Community

We probably limit where rating can render for performance reasons. If we do that indeed, it means you're gonna have to change the itemlist model and/or the item model. We're now getting deeper into changing core K2 and it's really beyond the scope of the support we provide here.

Generally speaking, I would implement all these as a plugin to make sure core K2 is not modified and changes/improvements stick after updating K2.
  • Villy Koutsogianni
  • Villy Koutsogianni's Avatar
07 Oct 2018 20:30
Replied by Villy Koutsogianni on topic How to change tag view options?

How to change tag view options?

Category: English K2 Community

Hits work fine but rating not.
It displays rating but with no rates at all.
If I vote for an item it then displays its total votes.
Here is the code
<?php if($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 $item->id; ?>" style="width:<?php echo $item->votingPercentage; ?>%;"></li> <li><a href="#" data-id="<?php echo $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 $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 $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 $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 $item->id; ?>" title="<?php echo JText::_('K2_5_STARS_OUT_OF_5'); ?>" class="five-stars">5</a></li> </ul> <div id="itemRatingLog<?php echo $item->id; ?>" class="itemRatingLog"><?php echo $item->numOfvotes; ?></div> <div class="clr"></div> </div> <div class="clr"></div> </div> <?php endif; ?>
  • JoomlaWorks
  • JoomlaWorks's Avatar
06 Oct 2018 11:22
Replied by JoomlaWorks on topic How to change tag view options?

How to change tag view options?

Category: English K2 Community

Just copy the setup from category.php. Shouldn't be difficult.

The item tags missing from the tag.php layout was something in our todo list. So given the chance today, I actually merged this into K2 core (in v2.9.1 dev): github.com/getk2/k2/archive/master.zip

I recommend you install on top as there are controls now in place in the K2 Settings for that (first tab there). Item tags in the tag layout will be enabled by default from now on.
  • Villy Koutsogianni
  • Villy Koutsogianni's Avatar
06 Oct 2018 09:10
Replied by Villy Koutsogianni on topic How to change tag view options?

How to change tag view options?

Category: English K2 Community

Kalimera Foti, thanks for your reply!
I have corrected the code as you suggested, but still no result.
It displays Also tagged under:
Is something wrong in tag.php?
<div class="catItemTags"><span><?php echo JText::_('Also tagged under: '); ?></span> <?php foreach ($this->item->tags as $tag): ?> <a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a>, <?php endforeach; ?> </div>


Thanks for your patience
  • JoomlaWorks
  • JoomlaWorks's Avatar
06 Oct 2018 08:38 - 06 Oct 2018 08:41
Replied by JoomlaWorks on topic How to change tag view options?

How to change tag view options?

Category: English K2 Community

The check is simply in the wrong place (it's inside the check in the item view). Revise your code and I'll make sure we update the code in K2 in the coming updates so you don't have to modify the model for the item every time.

Change it to:
<?php // Tags if ( ($view == 'item' && ($item->params->get('itemTags') || $item->params->get('itemRelated'))) || ($view == 'itemlist' && ($task == '' || $task == 'category') && $item->params->get('catItemTags')) || ($view == 'itemlist' && $task == 'user' && $item->params->get('userItemTags')) || ($view == 'latest' && $params->get('latestItemTags')) || ($view == 'itemlist' && $task == 'tag') /* Tag layout check */ ) { $tags = $this->getItemTags($item->id); for ($i = 0; $i < sizeof($tags); $i++) { $tags[$i]->link = JRoute::_(K2HelperRoute::getTagRoute($tags[$i]->name)); } $item->tags = $tags; }
  • Villy Koutsogianni
  • Villy Koutsogianni's Avatar
05 Oct 2018 20:17
Replied by Villy Koutsogianni on topic How to change tag view options?

How to change tag view options?

Category: English K2 Community

Maybe I forgot to click Submit :(

So this is what I need to achieve.
The way I display my K2 items is as in the attached image

So, in the tag view I need to display 2 columns, rating, hits and tagged under.
I also would like to use intro world limit instead of read more, as I do in blog layout.

In order to add -also tagged under- I have followed Krikor’s advise in post #167620
In file models/item.php I have added || ($view == 'itemlist' && $task == 'tag') as following
// Tags if (($view == 'item' && ($item->params->get('itemTags') || ($view == 'itemlist' && $task == 'tag') || $item->params->get('itemRelated'))) || ($view == 'itemlist' && ($task == '' || $task == 'category') && $item->params->get('catItemTags')) || ($view == 'itemlist' && $task == 'user' && $item->params->get('userItemTags')) || ($view == 'latest' && $params->get('latestItemTags'))) { $tags = $this->getItemTags($item->id); for ($i = 0; $i < sizeof($tags); $i++) { $tags[$i]->link = JRoute::_(K2HelperRoute::getTagRoute($tags[$i]->name)); } $item->tags = $tags; }

Then in file templates/default/tag.php I have added a div
<div class="catItemTags"><span><?php echo JText::_('Also tagged under: '); ?></span> <?php foreach ($this->item->tags as $tag): ?> <a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a>, <?php endforeach; ?> </div>

but with no result.

And what about 2 columns, rating, hits and world limit?

Thank you in advance
  • Gianluca
  • Gianluca's Avatar
05 Oct 2018 11:14 - 05 Oct 2018 11:16
Replied by Gianluca on topic [Solved]K2 language not working

[Solved]K2 language not working

Category: English K2 Community

Sorry for replying to this old thread but there are still problems with Italan translations. It's not working because of some text errore like this:

K2_CATEGORY_ADDED_IN_THE_LIST="La categoria \\"_QQ_"CATEGORY_NAME_HERE"_QQ\\" è già nella lista."

I don't know how it should be, just fixed my website removing all the "\\" in the ini file. If you can give me the correct format i will correct it in the transifex.
Thank you

EDIT: also, in the K2 download area, there are both "italian" and "italian (Italy)". Only the second one works because it has the corret tag it-IT, the first one with only "it" just don't work.
  • Kran Chi
  • Kran Chi's Avatar
02 Oct 2018 12:21 - 02 Oct 2018 13:13
Replied by Kran Chi on topic How to disable k2 edit-item popup?

How to disable k2 edit-item popup?

Category: English K2 Community

Yes of course because this forum do nothing!

You can check previous posts again that have locked. is there a tiny sample code from k2!? or at least an absolute path to a file!? you spend less that one minute for every question. even this threat replied when you saw that review!

You can check the Stackidea forum to see real support. Free or paid, there is a standard to support something.I think you have to be graceful that these users improve your alexa rank!

Also if there is a review right for every user, so I used that honestly.
I mentioned that I HAVE TO work with k2 because of template given to me, not the quality of this component.

When there are ECC+ (captcha), Komento (comment system) and native Joomla extra field, I can predict sooner or later k2 will be discontinued with this level of improvement & attention to user requirement.

I list again the k2 issues (fixed myself) to be sure it wasn't personal :

- No support for 3rd party captcha in comment form (I integrated OsolCapctah with k2 - so you can)
- There is no notification email after every comment and also approving by url.
- DON'T use popup, these days 50% of visitors using mobile device (also Check-in problem will be occured)
- Don't remove parent parameter with JS!
- No good control on front-end submit form (still need CSS to hide browse-server for example)
- Lock Tag still has some problems when suggestion is on (I removed this feature)
- Add a simple option to set URL after user submit an item (where to go). you can simply redirect him to my-items pages not stuck in the current submit page. User profile already has something like that.

It's 2018, don't forget that.
good luck.
  • Villy Koutsogianni
  • Villy Koutsogianni's Avatar
29 Sep 2018 16:02 - 29 Sep 2018 16:03
Replied by Villy Koutsogianni on topic How to change tag view options?

How to change tag view options?

Category: English K2 Community

It is a pity that for an obvious layout (tag view same as article view) one needs a 3rd party plg (that may not exist anymore) or else to hack the core K2 code.
  • JoomlaWorks
  • JoomlaWorks's Avatar
29 Sep 2018 00:45

After updating to version 2.9 "tag rating" doesnt display the log

Category: English K2 Community

GTmetrix simply scans the HTML it reads. It does not act as a real browser. So it should be taken with a grain of salt.

Something is removing the width value from the rating. It could also be an override with missing PHP variables. But since we haven't changed anything in relation to that since 2.8.0, my guess is JCH or another performance plugin is stripping that out (perhaps becuase it "sees" this as inline CSS). When you hit a star to rate, K2's JS kicks in and re-writes the width value, that's why you only see the rating after you add yours.
Displaying 601 - 620 out of 6582 results.

Powered by Kunena Forum