COMMUNITY FORUM
Search Results (Searched for: k2 Tag)
- Philippe
17 Nov 2018 12:13
Google creating wrong sitelink to tags not working was created by Philippe
Google creating wrong sitelink to tags not working
Category: English K2 Community
Hello there
I have troubles with k2's keywords creating "wrong" links. (Or maybe Joomla's?)
If I use the tag cloud module of k2 the following link is created as an example:
www.zubermedien.ch/index.php/portfolio/itemlist/tag/Print
With the link above everything works fine. However, it seems as if k2/or Joomla would also create a links as follows:
www.zubermedien.ch/index.php/component/tags/tag/print
The second link leads to a corrupted page.
The big problem is, that Google used one of those corrupted links as a sitelink in the search results!
(are those the taglink created by Joomla?)
Thanks for your help.
What I've tried so far
Deleted the Joomla tags
I have troubles with k2's keywords creating "wrong" links. (Or maybe Joomla's?)
If I use the tag cloud module of k2 the following link is created as an example:
www.zubermedien.ch/index.php/portfolio/itemlist/tag/Print
With the link above everything works fine. However, it seems as if k2/or Joomla would also create a links as follows:
www.zubermedien.ch/index.php/component/tags/tag/print
The second link leads to a corrupted page.
The big problem is, that Google used one of those corrupted links as a sitelink in the search results!
(are those the taglink created by Joomla?)
Thanks for your help.
What I've tried so far
- Fábio Jordan
14 Nov 2018 22:07
Replied by Fábio Jordan on topic Some K2 Articles are blank pages
Some K2 Articles are blank pages
Category: English K2 Community
Hi, Fotis. Thanks for the compliment.
So, I have enabled it, there's a lot of notices (with Undefined property), some warnings (about A non-numeric value encountered) and a few deprecateds (like Non-static method K2ModelItem::getItemTags). Those are errors in my K2 files in the template folder.
But, I get a warning of preg_match(): Unknown modifier '/' about cache file.
And also a PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 16384 bytes) in /home/cafecomf/public_html/plugins/content/jw_sigpro/jw_sigpro/includes/helper.php on line 266
I have no clue how to solve it right now, just saw on Google Search Console theres 20 pages with the same problem. But this is very odd.
Any help is appreciated.
Thanks again!
Regards
So, I have enabled it, there's a lot of notices (with Undefined property), some warnings (about A non-numeric value encountered) and a few deprecateds (like Non-static method K2ModelItem::getItemTags). Those are errors in my K2 files in the template folder.
But, I get a warning of preg_match(): Unknown modifier '/' about cache file.
And also a PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 16384 bytes) in /home/cafecomf/public_html/plugins/content/jw_sigpro/jw_sigpro/includes/helper.php on line 266
I have no clue how to solve it right now, just saw on Google Search Console theres 20 pages with the same problem. But this is very odd.
Any help is appreciated.
Thanks again!
Regards
- Mohamed Abdelaziz
10 Nov 2018 19:42
Replied by Mohamed Abdelaziz on topic How to limit related items to a category?
How to limit related items to a category?
Category: English K2 Community
To add multiple categories, use this version:
$query = "SELECT t.itemID FROM #__k2_tags_xref AS t JOIN #__k2_items AS i ON t.itemID = i.id WHERE t.tagID IN ({$sql}) AND t.itemID != {$itemID} AND i.catid IN (61,62) GROUP BY t.itemID";- Gorast
10 Nov 2018 19:36 - 10 Nov 2018 19:38
Replied by Gorast on topic How to limit related items to a category?
How to limit related items to a category?
Category: English K2 Community
OMG it works :D
Its not working for Parent category but if I specific the exact category it works!
Can I add another AND so another category is affected?
Like this
Thanks!
EDIT: Nope, its not working :D
Its not working for Parent category but if I specific the exact category it works!
Can I add another AND so another category is affected?
Like this
$query = "SELECT t.itemID FROM #__k2_tags_xref AS t JOIN #__k2_items AS i ON t.itemID = i.id WHERE t.tagID IN ({$sql}) AND t.itemID != {$itemID} AND i.catid = 61 GROUP BY t.itemID AND i.catid = 62 GROUP BY t.itemID";Thanks!
EDIT: Nope, its not working :D
- Mohamed Abdelaziz
10 Nov 2018 19:26
Replied by Mohamed Abdelaziz on topic How to limit related items to a category?
How to limit related items to a category?
Category: English K2 Community
It should be like this:
$query = "SELECT t.itemID FROM #__k2_tags_xref AS t JOIN #__k2_items AS i ON t.itemID = i.id WHERE t.tagID IN ({$sql}) AND t.itemID != {$itemID} AND i.catid = 61 GROUP BY t.itemID";- Gorast
10 Nov 2018 19:10
Replied by Gorast on topic How to limit related items to a category?
How to limit related items to a category?
Category: English K2 Community
$query = "SELECT t.itemID FROM #__k2_tags_xref AS t JOIN #__k2_items AS i ON t.itemID = i.id WHERE t.tagID IN ({$sql}) AND t.itemID != {$itemID} AND i.catid = (SELECT catid FROM #__k2_items WHERE id = {61}) GROUP BY t.itemID";
Is that it?
Is that it?
- JoomlaWorks
06 Nov 2018 15:59
Replied by JoomlaWorks on topic Description of a Tag
Description of a Tag
Category: English K2 Community
@Shawn
Replying...
1) Is there a point in assigning an image to a tag? Tag are usually created on the fly in the K2 item form. Have you seen any other tagging system (WordPress, Tumblr whatever) using an image assigned to a tag? I haven't. And if Joomla has what you say (haven't checked to be honest), well, let's just say that's the reason we built K2 in the first place.
2) If tags where to be nested, they would be called categories. Use categories instead. Categories also CAN have images.
3) Again, tags are not meant for categorization. Categories are.
In other words, use categories in K2, not tags. If you want multiple categorization, there's a great plugin which was recently launched: www.web357.com/joomla-extensions/multiple-categories-for-k2
Combining K2 and Multiple Categories for K2 (the plugin) you'll get a much better result than any other solution out there.
And you're thinking that the issue is hierarchies. Well, in the end, the issue is how great you can control and override your layout. And that's the real beauty in K2.
Replying...
1) Is there a point in assigning an image to a tag? Tag are usually created on the fly in the K2 item form. Have you seen any other tagging system (WordPress, Tumblr whatever) using an image assigned to a tag? I haven't. And if Joomla has what you say (haven't checked to be honest), well, let's just say that's the reason we built K2 in the first place.
2) If tags where to be nested, they would be called categories. Use categories instead. Categories also CAN have images.
3) Again, tags are not meant for categorization. Categories are.
In other words, use categories in K2, not tags. If you want multiple categorization, there's a great plugin which was recently launched: www.web357.com/joomla-extensions/multiple-categories-for-k2
Combining K2 and Multiple Categories for K2 (the plugin) you'll get a much better result than any other solution out there.
And you're thinking that the issue is hierarchies. Well, in the end, the issue is how great you can control and override your layout. And that's the real beauty in K2.
- Mohamed Abdelaziz
31 Oct 2018 10:34
No, you will modify itemlist.php model in the frontend as Fotis said
You will replace this line:
Replied by Mohamed Abdelaziz on topic How to limit related items to a category?
How to limit related items to a category?
Category: English K2 Community
Gorast wrote: Should I run this in phpMyAdmin?
No, you will modify itemlist.php model in the frontend as Fotis said
You will replace this line:
$query = "SELECT itemID FROM #__k2_tags_xref WHERE tagID IN ({$sql}) AND itemID!={$itemID} GROUP BY itemID";- Mohamed Abdelaziz
30 Oct 2018 14:16
Replied by Mohamed Abdelaziz on topic How to limit related items to a category?
How to limit related items to a category?
Category: English K2 Community
Try to replace the query line with this one:
If it works with you, I can help to implement this feature in the upcoming release.
$query = "SELECT t.itemID FROM #__k2_tags_xref AS t JOIN #__k2_items AS i ON t.itemID = i.id WHERE t.tagID IN ({$sql}) AND t.itemID != {$itemID} AND i.catid = (SELECT catid FROM #__k2_items WHERE id = {$itemID}) GROUP BY t.itemID";If it works with you, I can help to implement this feature in the upcoming release.
- Superkoala
27 Oct 2018 23:48
Datumsanzeige - Bilder links anordnen was created by Superkoala
Datumsanzeige - Bilder links anordnen
Category: Offizielle deutsche Gemeinschaft
Hallo,
gibt es eine Möglichkeit, dass die Bilder nicht über dem Text, sondern links davon angeordnet werden.
.TagItemView .TagItemImageBlock {float: left;} fand ich dazu im Forum - das hilft aber nichts.
Beispiel: derkompetenzentwickler.at/component/k2/itemlist/category/193?Itemid=2115
Vielen Dank,
Alex
gibt es eine Möglichkeit, dass die Bilder nicht über dem Text, sondern links davon angeordnet werden.
.TagItemView .TagItemImageBlock {float: left;} fand ich dazu im Forum - das hilft aber nichts.
Beispiel: derkompetenzentwickler.at/component/k2/itemlist/category/193?Itemid=2115
Vielen Dank,
Alex
- JoomlaWorks
25 Oct 2018 19:27
Replied by JoomlaWorks on topic Link from Item to Tag-View Menu only works sporadically
Link from Item to Tag-View Menu only works sporadically
Category: English K2 Community
The extension you mention probably causes the issues. If you want a real, working solution for multiple categories, Yiannis from Web357.com launched this just yesterday: www.web357.com/joomla-extensions/multiple-categories-for-k2
It's really a solid solution for multiple categories in K2 and I've personally tested it. Make sure you completely uninstall "Additional Categories for K2" as it hasn't been updated for many years unfortunately.
It's really a solid solution for multiple categories in K2 and I've personally tested it. Make sure you completely uninstall "Additional Categories for K2" as it hasn't been updated for many years unfortunately.
- Yannick Lämmel
25 Oct 2018 15:10
Replied by Yannick Lämmel on topic Link from Item to Tag-View Menu only works sporadically
Link from Item to Tag-View Menu only works sporadically
Category: English K2 Community
Yes, the false generated URLs are /path/to/category/tag/Tagname.
We use "Additional Categories for K2" from Thodoris Bgenopoulos. In the Items with duplicate displayed Categories, the Main Category was selected in the additional Categories as well. Correcting this does not help.
Turning off .html does not help.
The Menu Entry (K2 -> Categories) with all Categories selected does not grab the Tag View Link. Dont know why.
How to translate the Tags with Core Multilang? It seems like falang cant change the choosen tag of the menu entry to it's translated Version, so the URL Router can't find it.
We use "Additional Categories for K2" from Thodoris Bgenopoulos. In the Items with duplicate displayed Categories, the Main Category was selected in the additional Categories as well. Correcting this does not help.
Turning off .html does not help.
The Menu Entry (K2 -> Categories) with all Categories selected does not grab the Tag View Link. Dont know why.
How to translate the Tags with Core Multilang? It seems like falang cant change the choosen tag of the menu entry to it's translated Version, so the URL Router can't find it.
- George
23 Oct 2018 21:21
Replied by George on topic K2 comments problem with plugin comments..
K2 comments problem with plugin comments..
Category: English K2 Community
OK I try to find it but I cant, can you help me where is this ?
<?php /** * @version 2.9.x * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2006 - 2018 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html */ // no direct access defined('_JEXEC') or die; ?> <?php if(JRequest::getInt('print')==1): ?> <!-- Print button at the top of the print page only --> <a class="itemPrintThisPage" rel="nofollow" href="#" onclick="window.print();return false;"> <span><?php echo JText::_('K2_PRINT_THIS_PAGE'); ?></span> </a> <?php endif; ?> <!-- Start K2 Item Layout --> <span id="startOfPageId<?php echo JRequest::getInt('id'); ?>"></span> <div id="k2Container" class="itemView<?php echo ($this->item->featured) ? ' itemIsFeatured' : ''; ?><?php if($this->item->params->get('pageclass_sfx')) echo ' '.$this->item->params->get('pageclass_sfx'); ?>"> <!-- Plugins: BeforeDisplay --> <?php echo $this->item->event->BeforeDisplay; ?> <!-- K2 Plugins: K2BeforeDisplay --> <?php echo $this->item->event->K2BeforeDisplay; ?> <div class="itemHeader"> <?php if($this->item->params->get('itemDateCreated')): ?> <!-- Date created --> <span class="itemDateCreated"> <?php echo JHTML::_('date', $this->item->created, JText::_('K2_DATE_FORMAT_LC2')); ?> </span> <?php endif; ?> <?php if($this->item->params->get('itemTitle')): ?> <!-- Item title --> <h2 class="itemTitle"> <?php if(isset($this->item->editLink)): ?> <!-- Item edit link --> <span class="itemEditLink"> <a 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') && 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',1) || $this->item->params->get('itemFacebookButton',1) || $this->item->params->get('itemGooglePlusOneButton',1) ): ?> <!-- Social sharing --> <div class="itemSocialSharing"> <?php if($this->item->params->get('itemTwitterButton',1)): ?> <!-- Twitter Button --> <div class="itemTwitterButton"> <a href="https://twitter.com/share" class="twitter-share-button" data-lang="<?php echo $this->item->langTagForTW; ?>" data-via="<?php if($this->item->params->get('twitterUsername')) echo $this->item->params->get('twitterUsername'); ?>"><?php echo JText::_('K2_TWEET'); ?></a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> </div> <?php endif; ?> <?php if($this->item->params->get('itemFacebookButton',1)): ?> <!-- Facebook Button --> <div class="itemFacebookButton"> <div id="fb-root"></div> <script>(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)) return;js=d.createElement(s);js.id=id;js.src="//connect.facebook.net/<?php echo $this->item->langTagForFB; ?>/sdk.js#xfbml=1&version=v2.5";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</script> <div class="fb-like" data-width="200" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemGooglePlusOneButton',1)): ?> <!-- Google +1 Button --> <div class="itemGooglePlusOneButton"> <div class="g-plusone" data-size="medium"></div> <script>window.___gcfg={lang:'<?php echo $this->item->langTagForGP; ?>'};(function(){var po=document.createElement('script');po.type='text/javascript';po.async=true;po.src='https://apis.google.com/js/platform.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s);})();</script> </div> <?php endif; ?> <div class="clr"></div> </div> <?php endif; ?> <?php if( $this->item->params->get('itemCategory') || $this->item->params->get('itemTags') || $this->item->params->get('itemAttachments') ): ?> <div class="itemLinks"> <?php if($this->item->params->get('itemCategory')): ?> <!-- Item category --> <div class="itemCategory"> <span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span> <a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a> </div> <?php endif; ?> <?php if($this->item->params->get('itemTags') && count($this->item->tags)): ?> <!-- Item tags --> <div class="itemTagsBlock"> <span><?php echo JText::_('K2_TAGGED_UNDER'); ?></span> <ul class="itemTags"> <?php foreach ($this->item->tags as $tag): ?> <li><a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a></li> <?php endforeach; ?> </ul> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemAttachments') && count($this->item->attachments)): ?> <!-- Item attachments --> <div class="itemAttachmentsBlock"> <span><?php echo JText::_('K2_DOWNLOAD_ATTACHMENTS'); ?></span> <ul class="itemAttachments"> <?php foreach ($this->item->attachments as $attachment): ?> <li> <a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo $attachment->link; ?>"><?php echo $attachment->title; ?></a> <?php if($this->item->params->get('itemAttachmentsCounter')): ?> <span>(<?php echo $attachment->hits; ?> <?php echo ($attachment->hits==1) ? JText::_('K2_DOWNLOAD') : JText::_('K2_DOWNLOADS'); ?>)</span> <?php endif; ?> </li> <?php endforeach; ?> </ul> </div> <?php endif; ?> <div class="clr"></div> </div> <?php endif; ?> <?php if($this->item->params->get('itemAuthorBlock') && empty($this->item->created_by_alias)): ?> <!-- Author Block --> <div class="itemAuthorBlock"> <?php if($this->item->params->get('itemAuthorImage') && !empty($this->item->author->avatar)): ?> <img class="itemAuthorAvatar" src="<?php echo $this->item->author->avatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->author->name); ?>" /> <?php endif; ?> <div class="itemAuthorDetails"> <h3 class="itemAuthorName"> <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a> </h3> <?php if($this->item->params->get('itemAuthorDescription') && !empty($this->item->author->profile->description)): ?> <p><?php echo $this->item->author->profile->description; ?></p> <?php endif; ?> <?php if($this->item->params->get('itemAuthorURL') && !empty($this->item->author->profile->url)): ?> <span class="itemAuthorUrl"><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 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'... If you add: - the CSS rule 'overflow-x:scroll;' in the element div.itemRelated {…} in the k2.css - the class 'k2Scroller' to the ul element below - the classes 'k2ScrollerElement' and 'k2EqualHeights' to the li element inside the foreach loop below - the style attribute 'style="width:<?php echo $item->imageWidth; ?>px;"' to the li element inside the foreach loop below ...then your Related Items will be transformed into a vertical-scrolling block, inside which, all items have the same height (equal column heights). This can be very useful if you want to show your related articles or products with title/author/category/image etc., which would take a significant amount of space in the classic list-style display. */ ?> <?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?> <!-- Related items by tag --> <div class="itemRelated"> <h3><?php echo JText::_("K2_RELATED_ITEMS_BY_TAG"); ?></h3> <ul> <?php foreach($this->relatedItems as $key=>$item): ?> <li class="<?php echo ($key%2) ? "odd" : "even"; ?>"> <?php if($this->item->params->get('itemRelatedTitle', 1)): ?> <a class="itemRelTitle" href="<?php echo $item->link ?>"><?php echo $item->title; ?></a> <?php endif; ?> <?php if($this->item->params->get('itemRelatedCategory')): ?> <div class="itemRelCat"><?php echo JText::_("K2_IN"); ?> <a href="<?php echo $item->category->link ?>"><?php echo $item->category->name; ?></a></div> <?php endif; ?> <?php if($this->item->params->get('itemRelatedAuthor')): ?> <div class="itemRelAuthor"><?php echo JText::_("K2_BY"); ?> <a rel="author" href="<?php echo $item->author->link; ?>"><?php echo $item->author->name; ?></a></div> <?php endif; ?> <?php if($this->item->params->get('itemRelatedImageSize')): ?> <img style="width:<?php echo $item->imageWidth; ?>px;height:auto;" class="itemRelImg" src="<?php echo $item->image; ?>" alt="<?php 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 if($this->item->params->get('itemNavigation') && !JRequest::getCmd('print') && (isset($this->item->nextLink) || isset($this->item->previousLink))): ?> <!-- Item navigation --> <div class="itemNavigation"> <span class="itemNavigationTitle"><?php echo JText::_('K2_MORE_IN_THIS_CATEGORY'); ?></span> <?php if(isset($this->item->previousLink)): ?> <a class="itemPrevious" href="<?php echo $this->item->previousLink; ?>">« <?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; ?> <!-- 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 -->- JoomlaWorks
23 Oct 2018 18:54
Replied by JoomlaWorks on topic Link from Item to Tag-View Menu only works sporadically
Link from Item to Tag-View Menu only works sporadically
Category: English K2 Community
First off, the links to tags should not generate a 404. If you have an items with a url /path/to/item, then your tags will inherit the item's path and become /path/to/tag/name_of_tag.
Now, I see you have a plugin to do multiple categories. Which one is it as it could be messing with the output. I do see duplicate entries in categories in "Published in...".
Additionally, try switching the URL suffix (.html) off. This could be borking the URL router.
Finally, create a menu item in a menu that you don't use in the site (a hidden menu, sort of) and point that menu item to all K2 Categories and use "content" as the menu alias. This menu link will make sure that your tags that have NO direct menu item always inherit the path /content/tag/tag_name.
I haven't tested K2 with Falang latest (didn't know it's even maintained to be honest). And frankly, I'm about to remove support for it as it's much simpler to do multi-lingual sites with core Joomla nowadays.
Now, I see you have a plugin to do multiple categories. Which one is it as it could be messing with the output. I do see duplicate entries in categories in "Published in...".
Additionally, try switching the URL suffix (.html) off. This could be borking the URL router.
Finally, create a menu item in a menu that you don't use in the site (a hidden menu, sort of) and point that menu item to all K2 Categories and use "content" as the menu alias. This menu link will make sure that your tags that have NO direct menu item always inherit the path /content/tag/tag_name.
I haven't tested K2 with Falang latest (didn't know it's even maintained to be honest). And frankly, I'm about to remove support for it as it's much simpler to do multi-lingual sites with core Joomla nowadays.
- JoomlaWorks
22 Oct 2018 16:19
Replied by JoomlaWorks on topic Tag items view - 3 columns
Tag items view - 3 columns
Category: English K2 Community
You can do this in many ways. The easiest though is to create a template override and adjust specifically for that tag.
Read this first: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
Then create a menu item pointing to the tag you want and make sure you select your new sub-template. Now header over to the sub-template files and change the layout however you want.
Read this first: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
Then create a menu item pointing to the tag you want and make sure you select your new sub-template. Now header over to the sub-template files and change the layout however you want.
- JoomlaWorks
20 Oct 2018 16:10
Replied by JoomlaWorks on topic Problems with tags
Problems with tags
Category: English K2 Community
Your developer can simply join this thread.
If the tag cloud module is set correctly to filter tags by category, it will only display tags within a specific category. Unless these tags are common, the redirect will be correct.
What I could do for an upcoming update in K2 is add an extra URL param to also filter tagged items displayed (in the tag view) by a single category only, the one chosen in the tag cloud module.
In the meantime you can modify the tags.php module override (in mod_k2_tools) and utilize "$module->id" to differentiate the 2 modules and then in the links produced, add e.g. "?cat=video" or "?cat=news-archiv".
Then within your tag.php component override, "read" the "?cat=X" variable and display a different HTML structure. It's really very easy.
If the tag cloud module is set correctly to filter tags by category, it will only display tags within a specific category. Unless these tags are common, the redirect will be correct.
What I could do for an upcoming update in K2 is add an extra URL param to also filter tagged items displayed (in the tag view) by a single category only, the one chosen in the tag cloud module.
In the meantime you can modify the tags.php module override (in mod_k2_tools) and utilize "$module->id" to differentiate the 2 modules and then in the links produced, add e.g. "?cat=video" or "?cat=news-archiv".
Then within your tag.php component override, "read" the "?cat=X" variable and display a different HTML structure. It's really very easy.
- Frank Schreiber
20 Oct 2018 02:38 - 20 Oct 2018 11:08
Replied by Frank Schreiber on topic Problems with tags
Problems with tags
Category: English K2 Community
Hi Fotis,
thanks for your reply.
We didn’t edit anything, just copying from the live-site to the new test-site. As I remember, there was an issue with the newest version auf k2 and my template, which made problems. My programmer did the upgrade, because I’m not familiar with web programming. Could I please send you his pm for figuring out? We’re on a hurry, because my provider forces a switch from php 5.6 to 7 on next Wednesday, which makes my live-site unusable. Of course I’d post the solution afterwards.
Initially the two tag clouds have been invented to show different tags per category. Here you can see the result, which is working perfectly with the old version, on my live-site.
News category: www.frankschreiber.com/de/news-archiv.html
Video category: www.frankschreiber.com/de/video.html
Thanks and best regards,
Frank
thanks for your reply.
We didn’t edit anything, just copying from the live-site to the new test-site. As I remember, there was an issue with the newest version auf k2 and my template, which made problems. My programmer did the upgrade, because I’m not familiar with web programming. Could I please send you his pm for figuring out? We’re on a hurry, because my provider forces a switch from php 5.6 to 7 on next Wednesday, which makes my live-site unusable. Of course I’d post the solution afterwards.
Initially the two tag clouds have been invented to show different tags per category. Here you can see the result, which is working perfectly with the old version, on my live-site.
News category: www.frankschreiber.com/de/news-archiv.html
Video category: www.frankschreiber.com/de/video.html
Thanks and best regards,
Frank
- JoomlaWorks
19 Oct 2018 18:31
Replied by JoomlaWorks on topic Problems with SEF urls
Problems with SEF urls
Category: English K2 Community
This is actually standard Joomla behaviour. When you're on a item page (e.g. /some/path/to/item) and tag that does not have a direct menu item on it will render with the URL: /some/path/to/tag.
To solve this (as making menu items to all tags is impossible obviously) simply create a menu item in a hidden menu (an unused menu) that points to all categories. Give that menu item an alias of "content". Then all tags and users and any other entity in K2 that does not have a menu item assigned to it will render as /content/tag or /content/user. Browse the K2 blog at getk2.org/blog to check the various elements there and see what I mean.
To solve this (as making menu items to all tags is impossible obviously) simply create a menu item in a hidden menu (an unused menu) that points to all categories. Give that menu item an alias of "content". Then all tags and users and any other entity in K2 that does not have a menu item assigned to it will render as /content/tag or /content/user. Browse the K2 blog at getk2.org/blog to check the various elements there and see what I mean.
- JoomlaWorks
19 Oct 2018 17:59
Replied by JoomlaWorks on topic Getting only extraFields Dropdown ID (not Value) in tag.php
Getting only extraFields Dropdown ID (not Value) in tag.php
Category: English K2 Community
Everything works just fine on my end. I can't replicate your issue. Make sure the related option for extra fields is enabled in the first tab of the K2 Settings. If that doesn't work, try setting a test site with K2 to replicate the issue.
- JoomlaWorks
19 Oct 2018 17:46
Replied by JoomlaWorks on topic Problem with og tags
Problem with og tags
Category: English K2 Community
Are you using a link to all (or some) K2 categories as your homepage menu item and simply hiding the component output via PHP? That could be the reason...