COMMUNITY FORUM
Search Results (Searched for: k2 Tag)
- Lefteris
04 May 2015 12:44
Replied by Lefteris on topic System plugin shouldn't modify <html> tag on /adminstrator
System plugin shouldn't modify <html> tag on /adminstrator
Category: English K2 Community
Hi,
I just applied the fix : github.com/joomlaworks/k2/commit/f5cea21896647bf5be0cbe7ee9498272f298b27c .
Thank you for reporting.
I just applied the fix : github.com/joomlaworks/k2/commit/f5cea21896647bf5be0cbe7ee9498272f298b27c .
Thank you for reporting.
- Joe Campbell
02 May 2015 19:21 - 02 May 2015 19:23
Replied by Joe Campbell on topic Template override css file not loading
Template override css file not loading
Category: English K2 Community
Hi SandSol,
1) Add and activate the template override for the desired category.
2) Modify the class names for each element you want styled different for the category. For example you can append the category name to the end of the class (div.itemHeader h2.itemTitleBlog). Your template override CSS file would then only need to be comprised of these CSS styles unique to this category. Make sure you change the class name for both the template override file (e.g. item, category, tag) and the CSS file.
3) Add the following code to each template override file that would require it (e.g. item.php, category_item.php, tag.php)
<?php $doc->addCustomTag('<link rel="stylesheet" href="/templates/TEMPLATE-NAME/html/com_k2/OVERRIDE-FOLDER-NAME/CSS-FILENAME.css" type="text/css" />'); ?>
Place the code after...
How the code works: it adds the CSS link to the page <head> for the file (you specified) located in the template override path (you provided).
This solution was inspired by:
y-designs.com/support/tutorials/how-to-inject-css-prior-to-the-css4k2-system.html#comment-1539215230
I hope this helps,
Joe Campbell
1) Add and activate the template override for the desired category.
2) Modify the class names for each element you want styled different for the category. For example you can append the category name to the end of the class (div.itemHeader h2.itemTitleBlog). Your template override CSS file would then only need to be comprised of these CSS styles unique to this category. Make sure you change the class name for both the template override file (e.g. item, category, tag) and the CSS file.
3) Add the following code to each template override file that would require it (e.g. item.php, category_item.php, tag.php)
<?php $doc->addCustomTag('<link rel="stylesheet" href="/templates/TEMPLATE-NAME/html/com_k2/OVERRIDE-FOLDER-NAME/CSS-FILENAME.css" type="text/css" />'); ?>
Place the code after...
defined('_JEXEC') or die; ?>How the code works: it adds the CSS link to the page <head> for the file (you specified) located in the template override path (you provided).
This solution was inspired by:
y-designs.com/support/tutorials/how-to-inject-css-prior-to-the-css4k2-system.html#comment-1539215230
I hope this helps,
Joe Campbell
- Joe Campbell
01 May 2015 23:48
Replied by Joe Campbell on topic No Image on Facebook ... No Image, Title, or Description Whe
No Image on Facebook ... No Image, Title, or Description Whe
Category: English K2 Community
Hi Andre,
I would recommend removing the OG tags produced by K2 and use sh404SEF social tags (as it made for to render all of your social tags)
Here are two examples of OG tag conflict/issues with using both K2 & sh404SEF currently on your website:
supconnect.com/tag/fishing - Duplicate URL, title & type OG tags
supconnect.com/ - No OG tags
Here is a post that I put up a little while ago that provides instructions on how to remove K2 OG tags (note: it's a Hack):
www.joomlaworks.net/forum/k2-en/41210-k2-power-tip-remove-open-graph-meta-k2-hack
Lastly, by using sh404SEF for all of your social tag needs, you have the ability to better manage your K2 tag pages (which I see you use heavily)
K2 tags currently do not have images which means it can not render a social tag image.
I hope this helps,
Joe Campbell
I would recommend removing the OG tags produced by K2 and use sh404SEF social tags (as it made for to render all of your social tags)
Here are two examples of OG tag conflict/issues with using both K2 & sh404SEF currently on your website:
supconnect.com/tag/fishing - Duplicate URL, title & type OG tags
supconnect.com/ - No OG tags
Here is a post that I put up a little while ago that provides instructions on how to remove K2 OG tags (note: it's a Hack):
www.joomlaworks.net/forum/k2-en/41210-k2-power-tip-remove-open-graph-meta-k2-hack
Lastly, by using sh404SEF for all of your social tag needs, you have the ability to better manage your K2 tag pages (which I see you use heavily)
K2 tags currently do not have images which means it can not render a social tag image.
I hope this helps,
Joe Campbell
- Andre Niemeyer
01 May 2015 20:58
No Image on Facebook ... No Image, Title, or Description Whe was created by Andre Niemeyer
No Image on Facebook ... No Image, Title, or Description Whe
Category: English K2 Community
All the og: elements and properties seem to be in place for the k2 articles on the Gavick News2 template, but none of the information is displaying on Facebook when doing a Facebook Share:
Sample Article:
supconnect.com/tips/how-to-stand-up-on-your-paddle-board
I've tinkered with the news2 backend settings, disabled sh404sef social settings, ... and I'm still at a loss. The og tags are there and with their respective values but for some reason Facebook is not showing any of it there.
thanks in advance for the help!
Sample Article:
supconnect.com/tips/how-to-stand-up-on-your-paddle-board
I've tinkered with the news2 backend settings, disabled sh404sef social settings, ... and I'm still at a loss. The og tags are there and with their respective values but for some reason Facebook is not showing any of it there.
thanks in advance for the help!
- Eric Minden
29 Apr 2015 22:32 - 29 Apr 2015 22:33
Update to 4.7.0 YouTube shortened Links Stopped Working was created by Eric Minden
Update to 4.7.0 YouTube shortened Links Stopped Working
Category: AllVideos
Hello,
First of all thank you so much for this fantastic plugin. It has been a pleasure to use.
I'm having issues in AllVideos 4.7.0 where Youtube links with the shortened urls are not working as they did in AV 4.5.
Example:
Removing the url at the beginning fixes the problem:
I have a lot of videos I have setup with the shortened url. Is there an update coming with a fix to this soon? Are other users experiencing this issue?
Here's a link to an example video that has not been fixed:
www.southasianheritage.org/our-blog-food-fashion-music-arts/south-asian-culture/south-asian-recipes/item/90-south-asian-cooking-mishti-doi-sweet-yogurt
Here's one I have fixed:
www.southasianheritage.org/annual-celebration/item/83-cable-14-south-asian-heritage-10th-annual-celebration-may-10-2014
Using Joomla 3.4.1 and K2 2.6.9
Thanks!
First of all thank you so much for this fantastic plugin. It has been a pleasure to use.
I'm having issues in AllVideos 4.7.0 where Youtube links with the shortened urls are not working as they did in AV 4.5.
Example:
{youtube}https://youtu.be/6-dh6Ga-2n0{/youtube}Removing the url at the beginning fixes the problem:
{youtube}6-dh6Ga-2n0{/youtube}I have a lot of videos I have setup with the shortened url. Is there an update coming with a fix to this soon? Are other users experiencing this issue?
Here's a link to an example video that has not been fixed:
www.southasianheritage.org/our-blog-food-fashion-music-arts/south-asian-culture/south-asian-recipes/item/90-south-asian-cooking-mishti-doi-sweet-yogurt
Here's one I have fixed:
www.southasianheritage.org/annual-celebration/item/83-cable-14-south-asian-heritage-10th-annual-celebration-may-10-2014
Using Joomla 3.4.1 and K2 2.6.9
Thanks!
- Casper Voogt
29 Apr 2015 22:00 - 29 Apr 2015 22:02
System plugin shouldn't modify <html> tag on /adminstrator was created by Casper Voogt
System plugin shouldn't modify <html> tag on /adminstrator
Category: English K2 Community
We just upgraded our CiviCRM to 4.6.2 and were then unable to use its Mailing feature. I traced this down to a syntax error in the HTML code produced by Joomla/K2, specifically "function onAfterRender()" in /plugins/system/k2.php. The relevant section of code was:
The problem in our case was that 'prefix="og: ogp.me......' was being passed into a CiviCRM JavaScript variable verbatim without escaping the quotes, even though other HTML elements with quotes do get escaped properly by CiviCRM. Seems that K2 alters the HTML output at a later stage than when CiviCRM grabs the HTML output - something along those lines. I could have probably solved this in CiviCRM's code too, but felt it made sense to do this in the K2 plugin, because why would we want OpenGraph HTML code in our admin area?
So, I changed this to:
Basically, the above checks whether we're on the public side, and only runs if we are. This resolves the issue for me, though I could imagine this might not even be sufficient in some other situations where there might be a frontend conflict, but I do think this is at least an improvement.
if (JString::strpos($response, 'prefix="og: http://ogp.me/ns#"') === false) { $searches[] = '<html '; $searches[] = '<html>'; $replacements[] = '<html prefix="og: http://ogp.me/ns#" '; $replacements[] = '<html prefix="og: http://ogp.me/ns#">'; }The problem in our case was that 'prefix="og: ogp.me......' was being passed into a CiviCRM JavaScript variable verbatim without escaping the quotes, even though other HTML elements with quotes do get escaped properly by CiviCRM. Seems that K2 alters the HTML output at a later stage than when CiviCRM grabs the HTML output - something along those lines. I could have probably solved this in CiviCRM's code too, but felt it made sense to do this in the K2 plugin, because why would we want OpenGraph HTML code in our admin area?
So, I changed this to:
$app =& JFactory::getApplication(); if ($app->isSite()){ if (JString::strpos($response, 'prefix="og: http://ogp.me/ns#"') === false) { $searches[] = '<html '; $searches[] = '<html>'; $replacements[] = '<html prefix="og: http://ogp.me/ns#" '; $replacements[] = '<html prefix="og: http://ogp.me/ns#">'; } }Basically, the above checks whether we're on the public side, and only runs if we are. This resolves the issue for me, though I could imagine this might not even be sufficient in some other situations where there might be a frontend conflict, but I do think this is at least an improvement.
- Stefan Reiser
27 Apr 2015 17:05
K2 Tool Archiv was created by Stefan Reiser
K2 Tool Archiv
Category: Offizielle deutsche Gemeinschaft
Hallo zusammen,
ich habe in eine Kategorie Archiv mit mehrerer Unterkatagorien Archiv1, Archiv2 usw. erstellt. Die Konfiguration ist auf der Kategorie Archiv und wird in die Unterkategorien vererbt.
Nun habe ich in der Unterkategorie Archiv1 z.B. von 2011-2014 Berichte integriert. Das K2 Tool mit der Modulfunktionalität "Archiv" zeigt mir aber nur die Berichte bis Oktober 2013 an. Also alle abwärts bis 2011 fehlen.
Erstelle ich ein Menü dieses Archivs sind alle Berichte bis 2011 vorhanden also an Public, nicht freigeschaltet oder so kann es nicht liegen.
Kann mir jemand einen Tipp geben woran dies vielleicht liegen könnt?
Archiv1 per K2 Tool - Fehler
Menü zu Archiv1 - Alles OK
Liebe Grüße
Stefan
ich habe in eine Kategorie Archiv mit mehrerer Unterkatagorien Archiv1, Archiv2 usw. erstellt. Die Konfiguration ist auf der Kategorie Archiv und wird in die Unterkategorien vererbt.
Nun habe ich in der Unterkategorie Archiv1 z.B. von 2011-2014 Berichte integriert. Das K2 Tool mit der Modulfunktionalität "Archiv" zeigt mir aber nur die Berichte bis Oktober 2013 an. Also alle abwärts bis 2011 fehlen.
Erstelle ich ein Menü dieses Archivs sind alle Berichte bis 2011 vorhanden also an Public, nicht freigeschaltet oder so kann es nicht liegen.
Kann mir jemand einen Tipp geben woran dies vielleicht liegen könnt?
Archiv1 per K2 Tool - Fehler
Menü zu Archiv1 - Alles OK
Liebe Grüße
Stefan
- Krikor Boghossian
27 Apr 2015 13:47
Replied by Krikor Boghossian on topic readmore crazy
readmore crazy
Category: English K2 Community
The settings for tags are located in K2's parameters.
Keep in mind that for tags there is only a hide/ show batch toggler.
You cannot show/ hide it on a per item basis.
Keep in mind that for tags there is only a hide/ show batch toggler.
You cannot show/ hide it on a per item basis.
- Krikor Boghossian
27 Apr 2015 13:37
Replied by Krikor Boghossian on topic Front end error
Front end error
Category: English K2 Community
This is a template issue.
The template is using custom language strings and not K2's default one.
Eg K2_TAGGED should be K2_TAGGED_UNDER
This is an issue that the template's developer should address.
The template is using custom language strings and not K2's default one.
Eg K2_TAGGED should be K2_TAGGED_UNDER
This is an issue that the template's developer should address.
- Krikor Boghossian
27 Apr 2015 13:26
Replied by Krikor Boghossian on topic Problem with SEF URL For Users/Authors
Problem with SEF URL For Users/Authors
Category: English K2 Community
The advanced SEF for K2 are meant to be used instead of menu items.
If I where you I would map each category into a menu item and then if I had a handful of users I would map these users to menu items as well.
If the users are too many you can create an empty K2 categories menu item (leave the selection empty) so all orphan users and tags are rendered through that menu item.
If I where you I would map each category into a menu item and then if I had a handful of users I would map these users to menu items as well.
If the users are too many you can create an empty K2 categories menu item (leave the selection empty) so all orphan users and tags are rendered through that menu item.
- Rui Braz
23 Apr 2015 16:52
Replied by Rui Braz on topic How to: SIG Pro gallery in Tag view
How to: SIG Pro gallery in Tag view
Category: English K2 Community
Ooopps!
Small correction to the tag.php posted earlier:
Small correction to the tag.php posted earlier:
<?php /** * @version 2.6.x * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html */ // no direct access defined('_JEXEC') or die; ?> <!-- Start K2 Tag Layout --> <div id="k2Container" class="tagView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>"> <?php if($this->params->get('show_page_title')): ?> <!-- Page title --> <div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"> <?php echo $this->escape($this->params->get('page_title')); ?> </div> <?php endif; ?> <?php if($this->params->get('tagFeedIcon',1)): ?> <!-- RSS feed icon --> <div class="k2FeedIcon"> <a href="<?php echo $this->feed; ?>" title="<?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>"> <span><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></span> </a> <div class="clr"></div> </div> <?php endif; ?> <?php if(count($this->items)): ?> <?php echo $item->introtext; ?> <?php $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $params = JComponentHelper::getParams('com_k2'); ?> <div class="tagItemList"> <?php foreach($this->items as $item): ?> <?php if ($item->gallery) { if (JString::strpos($item->gallery, 'flickr.com') === false) { $item->gallery = "{gallery}{$item->id}{/gallery}"; } $params->set('galleries_rootfolder', 'media/k2/galleries'); $item->text = $item->gallery; $dispatcher->trigger('onContentPrepare', array( 'com_k2.itemlist', &$item, &$params, $limitstart )); $item->gallery = $item->text; } ?> <?php if ($item->video) { $item->gallery = "{youtube}{$item->id}{/youtube}"; $item->text = $item->video; $dispatcher->trigger('onContentPrepare', array( 'com_k2.itemlist', &$item, &$params, $limitstart )); $item->video = $item->text; } ?> <!-- Start K2 Item Layout --> <div class="tagItemView"> <div class="tagItemHeader"> <?php if($item->params->get('tagItemDateCreated',1)): ?> <!-- Date created --> <span class="tagItemDateCreated"> <?php echo JHTML::_('date', $item->created , JText::_('K2_DATE_FORMAT_LC2')); ?> </span> <?php endif; ?> <?php if($item->params->get('tagItemTitle',1)): ?> <!-- Item title --> <h2 class="tagItemTitle"> <?php if ($item->params->get('tagItemTitleLinked',1)): ?> <a href="<?php echo $item->link; ?>"> <?php echo $item->title; ?> </a> <?php else: ?> <?php echo $item->title; ?> <?php endif; ?> </h2> <?php endif; ?> </div> <div class="tagItemBody"> <?php if($item->params->get('tagItemImage',1) && !empty($item->imageGeneric)): ?> <!-- Item Image --> <div class="tagItemImageBlock"> <span class="tagItemImage"> <a href="<?php echo $item->link; ?>" title="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>"> <img src="<?php echo $item->imageGeneric; ?>" alt="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>" style="width:<?php echo $item->params->get('itemImageGeneric'); ?>px; height:auto;" /> </a> </span> <div class="clr"></div> </div> <?php endif; ?> <?php if($item->params->get('tagItemIntroText',1)): ?> <!-- Item introtext --> <div class="tagItemIntroText"> <?php echo $item->introtext; ?> <?php echo $item->gallery; ?> <?php echo $item->video; ?> </div> <?php endif; ?> <div class="clr"></div> </div> <div class="clr"></div> <?php if($item->params->get('tagItemExtraFields',0) && count($item->extra_fields)): ?> <!-- Item extra fields --> <div class="tagItemExtraFields"> <h4><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h4> <ul> <?php foreach ($item->extra_fields as $key=>$extraField): ?> <?php if($extraField->value != ''): ?> <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>"> <?php if($extraField->type == 'header'): ?> <h4 class="tagItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4> <?php else: ?> <span class="tagItemExtraFieldsLabel"><?php echo $extraField->name; ?></span> <span class="tagItemExtraFieldsValue"><?php echo $extraField->value; ?></span> <?php endif; ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <div class="clr"></div> </div> <?php endif; ?> <?php if($item->params->get('tagItemCategory')): ?> <!-- Item category name --> <div class="tagItemCategory"> <span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span> <a href="<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a> </div> <?php endif; ?> <?php if ($item->params->get('tagItemReadMore')): ?> <!-- Item "read more..." link --> <div class="tagItemReadMore"> <a class="k2ReadMore" href="<?php echo $item->link; ?>"> <?php echo JText::_('K2_READ_MORE'); ?> </a> </div> <?php endif; ?> <div class="clr"></div> </div> <!-- End K2 Item Layout --> <?php endforeach; ?> </div> <!-- Pagination --> <?php if($this->pagination->getPagesLinks()): ?> <div class="k2Pagination"> <?php echo $this->pagination->getPagesLinks(); ?> <div class="clr"></div> <?php echo $this->pagination->getPagesCounter(); ?> </div> <?php endif; ?> <?php endif; ?> </div> <!-- End K2 Tag Layout -->- Rui Braz
23 Apr 2015 16:48
Replied by Rui Braz on topic How to: SIG Pro gallery in Tag view
How to: SIG Pro gallery in Tag view
Category: English K2 Community
Eureka!
After a ton of copy&pasting, a ton of trials&erros, I managed to get a working tag.php!
I'm posting it to help others with the same issue:
Thank you Krikor (and Ronny in the other thread you point me to)! I wouldn't have done it without you!
After a ton of copy&pasting, a ton of trials&erros, I managed to get a working tag.php!
I'm posting it to help others with the same issue:
<?php /** * @version 2.6.x * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html */ // no direct access defined('_JEXEC') or die; ?> <!-- Start K2 Tag Layout --> <div id="k2Container" class="tagView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>"> <?php if($this->params->get('show_page_title')): ?> <!-- Page title --> <div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"> <?php echo $this->escape($this->params->get('page_title')); ?> </div> <?php endif; ?> <?php if($this->params->get('tagFeedIcon',1)): ?> <!-- RSS feed icon --> <div class="k2FeedIcon"> <a href="<?php echo $this->feed; ?>" title="<?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>"> <span><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></span> </a> <div class="clr"></div> </div> <?php endif; ?> <?php if(count($this->items)): ?> <?php echo $item->introtext; ?> <?php $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $params = JComponentHelper::getParams('com_k2'); ?> <div class="tagItemList"> <?php foreach($this->items as $item): ?> <?php if ($item->gallery) { if (JString::strpos($item->gallery, 'flickr.com') === false) { $item->gallery = "{gallery}{$item->id}{/gallery}"; } $params->set('galleries_rootfolder', 'media/k2/galleries'); $item->text = $item->gallery; $dispatcher->trigger('onContentPrepare', array( 'com_k2.itemlist', &$item, &$params, $limitstart )); $item->gallery = $item->text; } ?> <?php echo $item->gallery; ?> <?php if ($item->video) { $item->gallery = "{youtube}{$item->id}{/youtube}"; $item->text = $item->video; $dispatcher->trigger('onContentPrepare', array( 'com_k2.itemlist', &$item, &$params, $limitstart )); $item->video = $item->text; } ?> <?php echo $item->video; ?> <!-- Start K2 Item Layout --> <div class="tagItemView"> <div class="tagItemHeader"> <?php if($item->params->get('tagItemDateCreated',1)): ?> <!-- Date created --> <span class="tagItemDateCreated"> <?php echo JHTML::_('date', $item->created , JText::_('K2_DATE_FORMAT_LC2')); ?> </span> <?php endif; ?> <?php if($item->params->get('tagItemTitle',1)): ?> <!-- Item title --> <h2 class="tagItemTitle"> <?php if ($item->params->get('tagItemTitleLinked',1)): ?> <a href="<?php echo $item->link; ?>"> <?php echo $item->title; ?> </a> <?php else: ?> <?php echo $item->title; ?> <?php endif; ?> </h2> <?php endif; ?> </div> <div class="tagItemBody"> <?php if($item->params->get('tagItemImage',1) && !empty($item->imageGeneric)): ?> <!-- Item Image --> <div class="tagItemImageBlock"> <span class="tagItemImage"> <a href="<?php echo $item->link; ?>" title="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>"> <img src="<?php echo $item->imageGeneric; ?>" alt="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>" style="width:<?php echo $item->params->get('itemImageGeneric'); ?>px; height:auto;" /> </a> </span> <div class="clr"></div> </div> <?php endif; ?> <?php if($item->params->get('tagItemIntroText',1)): ?> <!-- Item introtext --> <div class="tagItemIntroText"> <?php echo $item->introtext; ?> </div> <?php endif; ?> <div class="clr"></div> </div> <div class="clr"></div> <?php if($item->params->get('tagItemExtraFields',0) && count($item->extra_fields)): ?> <!-- Item extra fields --> <div class="tagItemExtraFields"> <h4><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h4> <ul> <?php foreach ($item->extra_fields as $key=>$extraField): ?> <?php if($extraField->value != ''): ?> <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>"> <?php if($extraField->type == 'header'): ?> <h4 class="tagItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4> <?php else: ?> <span class="tagItemExtraFieldsLabel"><?php echo $extraField->name; ?></span> <span class="tagItemExtraFieldsValue"><?php echo $extraField->value; ?></span> <?php endif; ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <div class="clr"></div> </div> <?php endif; ?> <?php if($item->params->get('tagItemCategory')): ?> <!-- Item category name --> <div class="tagItemCategory"> <span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span> <a href="<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a> </div> <?php endif; ?> <?php if ($item->params->get('tagItemReadMore')): ?> <!-- Item "read more..." link --> <div class="tagItemReadMore"> <a class="k2ReadMore" href="<?php echo $item->link; ?>"> <?php echo JText::_('K2_READ_MORE'); ?> </a> </div> <?php endif; ?> <div class="clr"></div> </div> <!-- End K2 Item Layout --> <?php endforeach; ?> </div> <!-- Pagination --> <?php if($this->pagination->getPagesLinks()): ?> <div class="k2Pagination"> <?php echo $this->pagination->getPagesLinks(); ?> <div class="clr"></div> <?php echo $this->pagination->getPagesCounter(); ?> </div> <?php endif; ?> <?php endif; ?> </div> <!-- End K2 Tag Layout --> Thank you Krikor (and Ronny in the other thread you point me to)! I wouldn't have done it without you!
- Rui Braz
23 Apr 2015 16:47
Replied by Rui Braz on topic [SOLVED] Use plugins in tag-view
[SOLVED] Use plugins in tag-view
Category: English K2 Community
Eureka!
After a ton of copy&pasting, a ton of trials&erros, I managed to get a working tag.php!
I'm posting it to help others with the same issue:
Thank you Ronny (and Krikor, in another thread)! Your code sent me in the correct path; I wouldn't have done it without you!
After a ton of copy&pasting, a ton of trials&erros, I managed to get a working tag.php!
I'm posting it to help others with the same issue:
<?php /** * @version 2.6.x * @package K2 * @author JoomlaWorks https://www.joomlaworks.net * @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved. * @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html */ // no direct access defined('_JEXEC') or die; ?> <!-- Start K2 Tag Layout --> <div id="k2Container" class="tagView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>"> <?php if($this->params->get('show_page_title')): ?> <!-- Page title --> <div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"> <?php echo $this->escape($this->params->get('page_title')); ?> </div> <?php endif; ?> <?php if($this->params->get('tagFeedIcon',1)): ?> <!-- RSS feed icon --> <div class="k2FeedIcon"> <a href="<?php echo $this->feed; ?>" title="<?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>"> <span><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></span> </a> <div class="clr"></div> </div> <?php endif; ?> <?php if(count($this->items)): ?> <?php echo $item->introtext; ?> <?php $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $params = JComponentHelper::getParams('com_k2'); ?> <div class="tagItemList"> <?php foreach($this->items as $item): ?> <?php if ($item->gallery) { if (JString::strpos($item->gallery, 'flickr.com') === false) { $item->gallery = "{gallery}{$item->id}{/gallery}"; } $params->set('galleries_rootfolder', 'media/k2/galleries'); $item->text = $item->gallery; $dispatcher->trigger('onContentPrepare', array( 'com_k2.itemlist', &$item, &$params, $limitstart )); $item->gallery = $item->text; } ?> <?php echo $item->gallery; ?> <?php if ($item->video) { $item->gallery = "{youtube}{$item->id}{/youtube}"; $item->text = $item->video; $dispatcher->trigger('onContentPrepare', array( 'com_k2.itemlist', &$item, &$params, $limitstart )); $item->video = $item->text; } ?> <?php echo $item->video; ?> <!-- Start K2 Item Layout --> <div class="tagItemView"> <div class="tagItemHeader"> <?php if($item->params->get('tagItemDateCreated',1)): ?> <!-- Date created --> <span class="tagItemDateCreated"> <?php echo JHTML::_('date', $item->created , JText::_('K2_DATE_FORMAT_LC2')); ?> </span> <?php endif; ?> <?php if($item->params->get('tagItemTitle',1)): ?> <!-- Item title --> <h2 class="tagItemTitle"> <?php if ($item->params->get('tagItemTitleLinked',1)): ?> <a href="<?php echo $item->link; ?>"> <?php echo $item->title; ?> </a> <?php else: ?> <?php echo $item->title; ?> <?php endif; ?> </h2> <?php endif; ?> </div> <div class="tagItemBody"> <?php if($item->params->get('tagItemImage',1) && !empty($item->imageGeneric)): ?> <!-- Item Image --> <div class="tagItemImageBlock"> <span class="tagItemImage"> <a href="<?php echo $item->link; ?>" title="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>"> <img src="<?php echo $item->imageGeneric; ?>" alt="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>" style="width:<?php echo $item->params->get('itemImageGeneric'); ?>px; height:auto;" /> </a> </span> <div class="clr"></div> </div> <?php endif; ?> <?php if($item->params->get('tagItemIntroText',1)): ?> <!-- Item introtext --> <div class="tagItemIntroText"> <?php echo $item->introtext; ?> </div> <?php endif; ?> <div class="clr"></div> </div> <div class="clr"></div> <?php if($item->params->get('tagItemExtraFields',0) && count($item->extra_fields)): ?> <!-- Item extra fields --> <div class="tagItemExtraFields"> <h4><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h4> <ul> <?php foreach ($item->extra_fields as $key=>$extraField): ?> <?php if($extraField->value != ''): ?> <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>"> <?php if($extraField->type == 'header'): ?> <h4 class="tagItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4> <?php else: ?> <span class="tagItemExtraFieldsLabel"><?php echo $extraField->name; ?></span> <span class="tagItemExtraFieldsValue"><?php echo $extraField->value; ?></span> <?php endif; ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <div class="clr"></div> </div> <?php endif; ?> <?php if($item->params->get('tagItemCategory')): ?> <!-- Item category name --> <div class="tagItemCategory"> <span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span> <a href="<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a> </div> <?php endif; ?> <?php if ($item->params->get('tagItemReadMore')): ?> <!-- Item "read more..." link --> <div class="tagItemReadMore"> <a class="k2ReadMore" href="<?php echo $item->link; ?>"> <?php echo JText::_('K2_READ_MORE'); ?> </a> </div> <?php endif; ?> <div class="clr"></div> </div> <!-- End K2 Item Layout --> <?php endforeach; ?> </div> <!-- Pagination --> <?php if($this->pagination->getPagesLinks()): ?> <div class="k2Pagination"> <?php echo $this->pagination->getPagesLinks(); ?> <div class="clr"></div> <?php echo $this->pagination->getPagesCounter(); ?> </div> <?php endif; ?> <?php endif; ?> </div> <!-- End K2 Tag Layout --> Thank you Ronny (and Krikor, in another thread)! Your code sent me in the correct path; I wouldn't have done it without you!
- Ronny Van Der Borght
23 Apr 2015 13:01
Replied by Ronny Van Der Borght on topic [SOLVED] Use plugins in tag-view
[SOLVED] Use plugins in tag-view
Category: English K2 Community
Well infact that is my entier code. I never work with the default K2 templates, i always start from scratch and use only the components i need and put them in overrides.
You can send me your tag.php, i don't mind looking at it.
You can send me your tag.php, i don't mind looking at it.
- Lefteris
22 Apr 2015 13:34
Replied by Lefteris on topic embed video in user page
embed video in user page
Category: English K2 Community
@Surdo
Have you applied the code from www.joomlaworks.net/forum/k2-en/41103-use-plugins-in-tag-view#143141 ? All you need to do is replace the "gallery" word with "video" word.
Have you applied the code from www.joomlaworks.net/forum/k2-en/41103-use-plugins-in-tag-view#143141 ? All you need to do is replace the "gallery" word with "video" word.
- Austin Lindsay
22 Apr 2015 02:45
Replied by Austin Lindsay on topic Are K2 Tags bad for SEO?
Are K2 Tags bad for SEO?
Category: English K2 Community
Thanks Joseph. I'll bear that in mind. I'd say all of the tags are relevant, but I was just worried about the search engines picking up the content across more than one page (ie. a blog post may feature on the home page as a latest item, on the featured page, and also across multiple tags.
- Joe Campbell
21 Apr 2015 21:27
Replied by Joe Campbell on topic Are K2 Tags bad for SEO?
Are K2 Tags bad for SEO?
Category: English K2 Community
Hi Austin,
I was taught that tags are for human navigation, which makes sense. As tags make it easy for people to discover related content.
So you then have to ask yourself, do you want some or any of your tag pages indexed. If the tag page(s) adds value to someone's search, then "Yes", but if not then "No". For example, if your website offers Joomla Tips and you have a tag entitled "K2 Tips & Tricks" that page would have value for someone like myself looking specifically for K2 information.
So basically, it depends on your website structure and strategy.
Before I forget - don't forget to use a Sitemap. Here a great article on the subject:
joomlaseo.com/Checklist/sitemap-xml-for-search-engines
I hope this helps,
Joe Campbell
I was taught that tags are for human navigation, which makes sense. As tags make it easy for people to discover related content.
So you then have to ask yourself, do you want some or any of your tag pages indexed. If the tag page(s) adds value to someone's search, then "Yes", but if not then "No". For example, if your website offers Joomla Tips and you have a tag entitled "K2 Tips & Tricks" that page would have value for someone like myself looking specifically for K2 information.
So basically, it depends on your website structure and strategy.
Before I forget - don't forget to use a Sitemap. Here a great article on the subject:
joomlaseo.com/Checklist/sitemap-xml-for-search-engines
I hope this helps,
Joe Campbell
- Austin Lindsay
21 Apr 2015 21:04
Replied by Austin Lindsay on topic Are K2 Tags bad for SEO?
Are K2 Tags bad for SEO?
Category: English K2 Community
Thanks for the replies guys, and sorry for the late reply.
You both seem to make good sense so I guess there's no definitive answer.
Are there any tips to make the tags more SEO friendly?
For example, if I have a site that has one sole category called 'Joomla Blog' and then had multiple tags such as 'K2' and 'PHP', is this a decent structure for SEO?
Thanks!
You both seem to make good sense so I guess there's no definitive answer.
Are there any tips to make the tags more SEO friendly?
For example, if I have a site that has one sole category called 'Joomla Blog' and then had multiple tags such as 'K2' and 'PHP', is this a decent structure for SEO?
Thanks!
- Joe Campbell
21 Apr 2015 16:01
K2 Power Tip: Remove Open Graph Meta - K2 Hack was created by Joe Campbell
K2 Power Tip: Remove Open Graph Meta - K2 Hack
Category: English K2 Community
This is a vital hack if your using another extension to add Open Graph meta tags or if you choose to use K2 extra fields to power your meta tags (my preference)
Files:
/components/com_k2/views/item/view.html.php
/components/com_k2/views/latest/view.html.php
Instructions:
Search for "og:" and comment out with "//", for both files
Source:
pastebin.com/iSKmKqbv
Files:
/components/com_k2/views/item/view.html.php
/components/com_k2/views/latest/view.html.php
Instructions:
Search for "og:" and comment out with "//", for both files
Source:
pastebin.com/iSKmKqbv
- Krikor Boghossian
21 Apr 2015 12:09
Replied by Krikor Boghossian on topic Auto Insert Snippets Tag
Auto Insert Snippets Tag
Category: English K2 Community
I would place this code in my overrides.
You can also check the item's category id (in the item.php file) and paste the appropriate snippet.
More on overrides can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
You can also check the item's category id (in the item.php file) and paste the appropriate snippet.
More on overrides can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates