Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

ZenKit Masonary & K2 tags not supporting spaces

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi folks,

just wanted to confirm that I'm not going crackers or managed to break something myself.

I am using the ZenKit Masonary K2 template, very impressed with the work and layout, but am a little confused with the K2 Tags. It seems not to support having multiple word tags, however the standard K2 items do.

Example Tag: "Systems Engineering"
works with K2 Tools & tags in K2 Articles, but not with Masonary in Category view.

If I click the "Systems Engineering" tag (filter), no articles are displayed, but if I click a single work ( "systems" or "Engineering" ) tag (filter) that works fine.

(if I use a dash "-" between words EG: "Systems-Engineering", K2 removes the dash and displays "SystemsEngineering" but still works from K2 Tools and K2 Article tags.


Added: If I view the source of the page, the tag (filter) is displayed correctly, with the space as ".Systems Engineering"

thanks a lot folks,
Russ
  • WinterRG's Avatar
  • WinterRG
  • LIfetime Developer - Big Bamboo
  • 3 posts
  • Karma: 0
Last Edit: 11 years 9 months ago by WinterRG. Reason: added additional info...
The administrator has disabled public write access.
is there a way to use 'strip tags' to replace an underscore with a word space?
  • blueshift's Avatar
  • blueshift
  • 6 Month Developer
  • 2579 posts
  • 78 Thanks
  • Karma: 26
The administrator has disabled public write access.
Hi Russ,

Ive just uploaded a fix for that issue and added a week to your sub for finding it - thanks!

@David do you mean php in general or in the templates somewhere?

The PHP manual is an invaluable source of information:
php.net/manual/en/function.str-replace.php

Most of my PHP knowledge comes form there and from pulling apart Joomla extensions.
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Hey Anthony,

much appreciated from up on the Sunny Coast (hope it's not too cold down there for you!)

I'll install and test the update as soon as is feasible, (it's for my own site rebuild and update, so it's taken a back-step to other projects at the moment)

Also, there really wasn't any need, but many thanks for the bonus week too... :D

Take it easy,
RussW
  • WinterRG's Avatar
  • WinterRG
  • LIfetime Developer - Big Bamboo
  • 3 posts
  • Karma: 0
The administrator has disabled public write access.
@Anthony - i was referring to the same issue, and was considering as you suggested, tweaking a php file somewhere, presumably K2, to render the tag "Urban_Design" into "Urban Design"
  • blueshift's Avatar
  • blueshift
  • 6 Month Developer
  • 2579 posts
  • 78 Thanks
  • Karma: 26
The administrator has disabled public write access.
Ah right that makes sense.

The new code in the masonry category.php file basically uses this array to parse through the tag name:
$replace=array(" ","'",".","/","-","&","%","*","#","_","+","=","(",")");

It just strips the underscore out so you just need to write the tag as you need and the code will do the rest now.

@Russ Thanks! and nice to meet you.

Cheers
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
does any recent update of ZK address this? (maybe that was the point of your post directly above this.) Or should I plan on doing the php edit as suggested higher up the thread? I am about to install this on a site which has a plethora of two-word tags.
  • blueshift's Avatar
  • blueshift
  • 6 Month Developer
  • 2579 posts
  • 78 Thanks
  • Karma: 26
Last Edit: 11 years 8 months ago by blueshift.
The administrator has disabled public write access.
Yes it's been updated.
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
great. i'm about to give it a workout. ;)
  • blueshift's Avatar
  • blueshift
  • 6 Month Developer
  • 2579 posts
  • 78 Thanks
  • Karma: 26
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers