eZ Community » Projects » eZ Tags

eZ Tags

Monday 31 January 2011 - http://projects.ez.no/eztags

eZ Tags is an eZ Publish extension for taxonomy management and easier classification of content objects, providing more functionality for tagging content objects than ezkeyword datatype included in eZ Publish kernel.

» Visit project page    » Project members    » Reviews

Latest forum activity - Visit project's forums page

Friday 18 February 2011 7:05:07 pm

Hi,

I've tried to install you extension, the datatype is working well but I have an error on the admin module.

I see in my firebug, this request failed during tree displaying:

<code>

http://mywebsite/tags/treemenu/0/...922/43b864bde60564a9abad0598b1d5d203

</code>

And this error :

<code>

Fatal error: Call to undefined method eZSiteAccess::match() in /var/www/bayard/www/index_treemenu_tags.php on line 103

</code>

Have you an idea about this error ?

Thanks.

Julien.

Friday 18 March 2011 4:35:08 pm

Hi mate

When I try to delete a subtree of tags, I get an error unknown function on line 468 of file eztagsobject.php

 

static function recursiveTagDelete($rootTag)

{

$children = eZTagsObject::fetchByParentID($rootTag->ID);

foreach($children as $child)

{

recursiveTagDelete($child);

}

replacing recursiveTagDelete($child);

with self::recursiveTagDelete($child);

solves the issue

Wednesday 23 March 2011 5:05:08 pm

Hello,

Thank you for your bug report!

We will include the fix in the sources very soon.

EDIT: Looks like Ivo beat me to it happy.gif Emoticon

Wednesday 23 March 2011 5:35:08 pm

Hi Julien,

sorry for the late reply! Looks like notifications for this forum never got to my inbox sad.gif Emoticon

Concerning your problem, this was a bug in extension when used on eZ Publish 4.3 and was fixed long time ago on GitHub.

Here is the commit with the bugfix: https://github.com/ezsystems/ezta...456f46b974e1e622e86abae5bdd768d4ed1a

P.S. eZ Publish 4.2 and below are not supported by the extension due to ezjscore not being included in default installation, if by any chance you're using those versions.

Thursday 28 April 2011 4:35:11 pm

Hi,

Do you have some examples on how to use the eztagscloud() template operator?

Thanks!

Thursday 28 April 2011 5:05:13 pm

Hi Jean-Luc,

it's actually pretty simple. It acts the same way as tagscloud operator included in ezwebin.

Just call it like {eztagscloud()} and it should return the tag cloud as the output.

Monday 02 May 2011 12:35:12 pm

Good luck with that!

Be sure to let us know your findings happy.gif Emoticon

Monday 02 May 2011 1:05:13 pm

I'm glad everything is fine! happy.gif Emoticon

Tuesday 31 May 2011 3:35:16 pm

Are the tags compatible with eZ Find?

I mean is it possible to search by tag?

Tuesday 31 May 2011 4:05:15 pm

Yes they are. As long as your tags content attribute is searchable, it will end up in solr index and will show up in search results.

Saturday 02 July 2011 7:35:19 pm

I want to translate this great extension in Italian as soon as I get more skillful with it!

I'm wondering how it is possible to create sub-levels to top level:

On the screenshot in your blog I see that you can create sub-levels to group tags for different subtrees, like "Blog", "Solutions" and so on.

To achieve this I first tried to add sub-levels by clicking the icon near "Top level tags" in the eztags treemenu, but it lets me only add child tags.

Then I tried to click the Select Subtree button under "Limit by tags subtree:" in the class datatype just to see what happens, but it doesn't work. I'm using the Community Project 2011.6 version.

 

Saturday 02 July 2011 8:05:20 pm

Hello Sandra,

Sublevels you see on screenshots are actually child tags. What you see on screenshot on our blog are all tags in the treemenu. Every tag (including the root "Top level tags"blunk.gif Emoticon can have any number of tags below them.

So Blog, Solutions and Techology sub-levels are child tags of "Top level tags" and Android, Adobe Flash and Apple are child tags of Technology tag/sub-level.

It is left to you to decide what you will do with the tag tree, just like the content node tree. You can use sub-levels Blog, Solutions and Techology for top level navigation for example, or just as containers for eztags attributes in different classes and so on.

I hope I managed to clarify this to you happy.gif Emoticon

P.S. If you do translate the extension to Italian, be sure to create a pull request on github happy.gif Emoticon https://github.com/ezsystems/eztags/

Tuesday 05 July 2011 2:35:19 pm

Hello,

Any plans about implementing multlingual support for eZ Tags ?

I might have time to give a hand if you want.

Cheers

Wednesday 06 July 2011 10:35:19 am

Hi Matthieu,

That would be nice happy.gif Emoticon We have this idea as a top on our todo list, but problem is that we don't have time.

As eztags are in the core really simple and straightforward we wanted to do multilingual in that way too. We already have synonyms for tags (which are also tags) so we should use them for this purpose. In that way we will not add additional table, just 1 column. If you really have some time I would suggest to do it in 2 steps:

1. basic stuff - marking a tag with some language code:

- add a column in the tag table "language code"

- go through all the persistency code so the information gets in templates,etc.

- in the tag management interface add the dropdown with installed languages on tag edit form

- when adding a tag through object edit form add the object language code

2. using it in multilingual way- when fetching a tag there should be an additional parameter with the language code which should use the tag + synonyms list and show the first tag matching the right language code.

Or something like this happy.gif Emoticon

 

Let me know what you think....

 

Wednesday 06 July 2011 11:05:18 am

Actually, I disagree with you guys.

I think we should have a separate eztags_name table in order not to polute the main eztags table.

The reason is we need to extensively modify existing code that works with eztags table to filter out language variants and to fetch and display only the needed language.

I would not go that way.

Wednesday 06 July 2011 11:35:18 am

We obviously didn't brainstorm enough happy.gif Emoticon

Edi, can you list pros and cons for your approach?

Wednesday 06 July 2011 12:05:19 pm

Pros:

- less code to modify (much less)

- we don't polute eztags table

- we can know in which language was tag initially created, which can be useful sometimes

- it's natural to have it separated if we want to do it right

- error free: by using eztags table for translations, it can happen that translation of a tag ends up somewhere else in tag tree, which wouldn't be good

- you cannot have a translation with exactly the same tag name as the original, eztags doesn't allow that to prevent unnecessary tag duplication

Cons:

- can't think of any except having another table to worry about, but I don't see it as a problem

Monday 01 August 2011 8:35:13 pm

Hi Matthieu,

are you still interested in helping out with creating multilingual support for eZ Tags?

We agreed internally that it would indeed be the best to use a separate "eztags_name" table as a basis for translated tags.

We can hardly find the time to do it ourselves properly, so if you're interested we'll gladly share our conclusions and even help with the code a little.

P.S. There should be a new version of eZ Tags coming up soon with some improvements under the hood (nothing too fancy, but still varants a new version number happy.gif Emoticon)

Thursday 04 August 2011 11:35:13 pm

We are so interested in a multilingual feature, we require this for one of our projects, so if we can help in any way...

 

Thursday 25 August 2011 12:05:16 pm

Hi

Is it possible to use fetch to find all e.g. articles with tags?

Also, how can I fetch all tags without using eztagsclod()

Cheers,

Peder

Tuesday 30 August 2011 4:35:15 pm

Hello Peder,

Both things are possible.

1) To fetch all articles with certain tag, you can use the extended attribute filter that comes with eZ Tags. For example.

<code>

{def $articles_with_tag = fetch( content, tree, hash( parent_node_id, 2,

extended_attribute_filter, hash( id, TagsAttributeFilter,

params, hash( tag_id, $tag.id ) ),

class_filter_type, include,

class_filter_array, array( article ) ) )}

</code>

P.S. Currently this extended attribute filter supports only one tag, but in version 1.2 (should be released soon) there will support for multiple tags.

2) To fetch all tags, you can use included fetch functions, for example:

<code>

{def $all_tags = fetch( tags, tree, hash( parent_tag_id, 0 ) )}

</code>

Regards

Edi

Wednesday 07 September 2011 11:35:15 am

Hello Edi,

Sorry for this long silence, I was on holiday. I'm still wiling to help but my Todo has been really busy these days. I can't say when I'll get some time but eZ Tags is still in the list blunk.gif Emoticon

Cheers

Friday 09 September 2011 7:35:15 pm

Hi

How can we display tags in the template?

Thanks

Mark

Friday 09 September 2011 8:05:15 pm

Hi Mark,

it depends on what template do you want tags to be displayed in.

If you want them for example in full view of a node whose object has eZ Tags datatype, then you can use:

<code>{attribute_view_gui attribute=$node.data_map.my_tags_attribute}</code>

This will show tags that are related to the object with my_tags_attribute attribute.

If you want to display tags no matter with what object are they related, you can use fetches like:

<code>{def $tags =fetch(tags, list, hash(parent_tag_id, 0))}</code>

Sunday 11 September 2011 1:05:17 am

Thanks!

Tuesday 20 September 2011 8:35:16 pm

Hey guys,

I started implementing multilanguage for eZ Tags. You can track my progress at https://github.com/ezsystems/eztags/commits/multilanguage/ (commits start at Sep 16th)

Just a preliminary support for editing tags with multilanguage is enabled, so there's still much work to do.

Check it out, tell me what you think, give suggestions and so on, make some pull requests happy.gif Emoticon

You can also try it by updating the database schema to match the current one and filling eztags_keyword table by yourself (no upgrade scripts yet, those will come last as this is still very much experimental ofcourse)

Friday 23 September 2011 5:05:17 pm

And what about fetching all tags starting with F, i.e 'F*' ? Does the extension support fetches on tag name with wildcards?

I'm currently facing a business case where I am considering showing an alphabetical list based on taxonomy. It would be nice to implement this together with the alphabetical navigation template.

Thanks!

Friday 23 September 2011 5:35:17 pm

That was on my to do list, but never got around implementing it.

Probably will be included in the future version.

Or you can do it yourself and make a pull request happy.gif Emoticon

Monday 26 September 2011 1:05:16 pm

ok, I made a small pull request.

Friday 14 October 2011 12:35:18 pm

Hi,

is it possible to add additional attributes to an eztag? Like, for example, if I wanted the tag page netgen.hr/eng/tags/view/ezpublish/extensions/eztags to show custom metadata, or a specific description on the tag page for the tag "performance" or "eztags".

Like adding a few options in eztags.ini that you could turn on or off, which would enable extra fields in tag/edit (administration/tags/id/11).

I might be completely wrong about the purpose of eztags and this is rather a use case for tree nodes and classes. But this is what I did at groops.de tagging, mostly for SEO.

Jens

Friday 14 October 2011 6:05:19 pm

Hi Jens,

I must say this is an interesting idea, but unfortunatelly, I don't see it as an option in future releases of eZ Tags.

If we were to implement it correctly, we would need a support for a full fledged attribute based editing, kind of like a simplified version of object/class/attribute model of eZ Publish. What that means? There needs to be an interface to edit the attributes, their names and values and relations to certain tags (like content edit in eZP). There needs to be an interface for users to add the names of attributes which would be editable (like classes in eZP).

All of this greatly complicates the 99% usecases of eZ Tags and goes against the initial idea of simplicity of eZ Tags.

Maybe there are ways for you to implement it yourself, by forexample overriding design/standard/templates/tags/view.tpl, adding something like this to your ini files:

[TagMetadata_TAG_ID]

MetadataArray[attribute1]=value1

MetadataArray[attribute2]=value2

[TagMetadata_ANOTHER_TAG_ID]

MetadataArray[attribute3]=value3

MetadataArray[attribute4]=value4

and building upon that in overriden templates. There wouldn't be nice editing interface, but it would work.

Regards,

Edi

Saturday 15 October 2011 12:35:20 pm

Hi Edi,

thanks for pointing this out. And you're right, probably it's not a good idea to bloat eztags with everything that's already there in node tree and the object/class/attribute model. eztags are just so nice to use that you're tempted to replace as much taxonomy stuff with it as possible.

Jens

Monday 17 October 2011 11:35:20 am

This can be also solvable with a specific object (e.g. tag_description) which could hold all the data needed to include in the tags/view page.

If you want to add custom info to a tag page just create that object and tag it.

The custom tags/view template would fetch that object and use the information....

 

Monday 24 October 2011 8:05:18 pm

Hello Harry,

I haven't observed that behaviour. The paging works fine in my tests.

I noticed that the link you provided for offseted view is http://example.com/tags/view/TopTag/SubTag/offset/10

which is wrong. The link should be http://example.com/tags/view/TopTag/SubTag/(offset)/10

Notice the parentheses around the "offset" parameter. Standard google.tpl navigator template generates the links that way, and links formated this way are good.

Regards,

Edi

Tuesday 25 October 2011 7:05:21 pm

Hello Edi,

You have a sharp eye, thanks for observing this error in the link.

It indeed turns out the be a bug in our navigator/google.tpl template; after fixing that, the tags/view page works fine indeed.

Kind regards,

Harry Oosterveen

 

Tuesday 25 October 2011 9:35:20 pm

Good to hear that happy.gif Emoticon

Cheers,

Edi

Friday 18 November 2011 2:05:20 pm

I have noticed a bug when adding multiple tags to an attribute. Sometimes it can be neccessary to change the order these tags based on relevancy. This works fine, except when the following condition is met:

Add an object with some tags.

Store the object.

Re-edit the object and remove all tags, then re-add the exact same tags but in different order.

Save the object.

The new order is not saved.

Friday 18 November 2011 3:05:21 pm

Hi Sander,

I wouldn't call it a bug as there is no intented priority sorting in eztags datatype. It occurs naturally with database INSERT and SELECT commands.

What you can do to save the new order is store the draft (or republish, but storing the draft should be enough) after removing tags, to force eZ to remove the tag links from database table and then readd them again and publish. This way the new links should be generated in the new order.

 

Wednesday 14 December 2011 11:05:25 am

1. can the tag set be limited so that, for a given content class / tag attribute, the creator of content can not add new tags but has to rely on the ones set up by the admin (but still keep the autocomplete editing widget)?

2. what happens if a tag is renamed: does all content with that tag get its view cache expired, and /or is it resent to ezflow?

Wednesday 14 December 2011 1:05:23 pm

Hi Gaetano

1. That is possible, you just need to revoke the tag/add policy for that role

2. Currently no. It is in the todo list but no deadlines set happy.gif Emoticon would be great from your side if you would include eztags to "smartcacheclear" as ezkeyword

Wednesday 14 December 2011 1:35:27 pm

Thanks Ivo, quick turnaround!

One more then: is it possible to limit the editor who creates a new tag to only create in one specific tag level and not to be able to create tag subtrees?

Wednesday 14 December 2011 2:05:23 pm

is it possible to limit the editor who creates a new tag to only create in one specific tag level and not to be able to create tag subtrees?

There is no depth limitation on tag/add policy (which would be the best solution) but there are couple of things you can do:

- there is a subtree limit per attribute so the users can only use tags from one part of the tree

- you can easily hack eztag edit tpl to not show the tree selection, just add the tag in that subtree

 

Monday 19 December 2011 12:05:24 pm

@Ivo: I've been asked for this precise use case: a customer asks for tags first thing, but then they want a "landing page" for each tag, that is widgetable.

I'd implement this as a contet-object, using eZFlow.

This means that for each tag we need to have a corresponding "tag object" as well.

But then, is there any big value in using eztags for this? I might as well use an object-relation attribute in my main content classes to link them to the tags, and forego eztags completely. The only missing thing would be some nice tag-like editing widget for the object-relation attribute (and possibly inline creation of a new tag object).

Am I missing something?

Monday 19 December 2011 3:05:24 pm

Hi Gaetano,

There is one very important thing that eztags offer and standard object relation way is not: loose relating

For object relation you need both sides to exist. For tags you don't. Imagine this situation:

- editor tags articles, galleries, images etc.

- at some point editor wants to make a landing page for that topic

- he merges similar tags to one (and makes synonyms at the same time)

- he creates the landing page object, tags is with the main tag

- full template of the object shows all content automatically

How would you accomplish that editorial simplicity without eztags?

 

Monday 19 December 2011 6:05:24 pm

Hi Xavier,

no, not yet, but we're working on it happy.gif Emoticon Should be part of the next release of eZ Tags.

Friday 23 December 2011 10:05:24 am

I've developed an extension to ezfSolrDocumentFieldBase class to add tag_id to Solr index, I can share this with you if you wish.

regards!

Friday 23 December 2011 10:35:23 am

Sure, why not happy.gif Emoticon

Thanks a lot happy.gif Emoticon

That's what I did too, but it only stores keywords for now, as a replacement for metaData method in datatype.

Wednesday 11 January 2012 11:35:24 am

Could you share this with me too, Xavier? happy.gif Emoticon

 

Wednesday 11 January 2012 12:05:24 pm

Hi guys,

sorry for the delay. How can I send you the file? I'm not used with git, and can't find your mail address anywhere.

regards,

Wednesday 11 January 2012 12:35:26 pm

Great to know gist!

You can find the file here: https://gist.github.com/1594258

regards!

Wednesday 11 January 2012 1:35:25 pm

nice thanx, do we add anything to the ezfind settings file and solrconfig?

Wednesday 11 January 2012 2:05:25 pm

Thanks Xavier for your contribution, it looks great happy.gif Emoticon

P.S. This is what I did till now: https://github.com/ezsystems/ezta...asses/ezfsolrdocumentfieldeztags.php

@tofik, this should be enough in ezfind.ini.append.php

[SolrFieldMapSettings]

CustomMap[eztags]=ezfSolrDocumentFieldTagID

Thursday 12 January 2012 5:05:24 pm

Hi Tamas,

Already fixed in master happy.gif Emoticon

I was planning on releasing eZ Tags 1.2.2 today anyways, so you actually caught this just in time.

Thursday 12 January 2012 6:35:25 pm

Hi Tamas,

eZ Tags 1.2.2 has been released which includes the said fix happy.gif Emoticon

Wednesday 18 January 2012 10:35:24 am

Cheers happy.gif Emoticon

Monday 06 February 2012 4:05:31 pm

Hi Guys,

First of all I would like to thank you all very much for this great extension.

Second of all, I'm facing some trouble with the multilingual functionality, though I'm aware that it's still under development.

I have an object that contains a tag called "Music" for example. When I search for Music this object shows up. However when I added a translation for the tag, "Musica" for example I found out that the original term "Music" was removed from the search index.

And when I went back and edited the original translation, it removed the index of the second one.

Bottom line, only that last edited translation gets indexed while the other one gets removed.

Monday 06 February 2012 4:35:33 pm

My taxonomy tree looks like this.

-Music

-----Strings

----------Violin

Is there a way that when I add Violin tag to an object it appears when I search for Music?

Monday 06 February 2012 6:35:27 pm

Hi Abdallah,

this is not currently possible, but it is certainly a feature worth implementing happy.gif Emoticon Will add it to todo and hopefully should be part of next big release happy.gif Emoticon

Monday 06 February 2012 7:35:27 pm

Thank you Edi for your taking the time to answer.

Do you think it will be out soon?

Monday 13 February 2012 11:35:33 pm

Hi Abdallah,

Time flies and I don't have so much time as I want, so I really can't make any promises when eZ Tags 2.0 should be usable.

Monday 14 May 2012 11:05:39 am

Good catch Gaetano, thanks for reporting it happy.gif Emoticon

Monday 14 May 2012 12:35:35 pm

Fixed happy.gif Emoticon

https://github.com/ezsystems/ezta...5d8332bd5816e36236f0e24f1b974729e07d

Monday 21 May 2012 10:35:32 am

Hi, great extension, thank you very much for it!

Does it a special reason that the first 2 tags on tag root get a icon and the others don't?

Monday 21 May 2012 11:05:35 am

Hi scrieler,

those are the example icons just so you can see that it is possible to customize the icon of every existing tag.

As Xavier mentioned, you can use [Icons]/IconMap from eztags.ini to customize the icons.

Do ask here if you need any more help happy.gif Emoticon

Thursday 24 May 2012 12:05:36 am

ah, ok, wondered me if the first two tags are special blunk.gif Emoticon

thank u Xavier Serna and Edi Modrić =)

Tuesday 25 September 2012 12:35:39 pm

Hello everyone,

What is the minimum ezpublish version to install this extension ?

Cheers

Tuesday 25 September 2012 2:35:36 pm

Hi,

minimum supported version of eZ Publish is 4.3.

Monday 01 October 2012 12:05:39 pm

Hi,

although late, I wanted to let you know that this feature is now implemented happy.gif Emoticon

It's not part of recent 2.0 beta release, but you can find the commit below:

https://github.com/ezsystems/ezta...3f5071c0f6288f3ed4a9815e0191f5be4fe0

Tuesday 27 November 2012 3:35:46 pm

Is there a way to allow synonym searches to return results for items they are associated with?

Example

Tag: Martini Glasses

Synonym: martini

When I search for martini I would like it to return all Martini Glass tag items also.

Thanks

Tuesday 27 November 2012 5:05:54 pm

Hi Luke,

this is not currently possible with eZ Tags 1.2.2 version, but this is one of the items on my TODO list for eZ Tags 2.0 final release which is currently in beta (see here: http://www.netgenlabs.com/Blog/eZ-Tags-2.0-beta-is-released-try-it-out).

Wednesday 23 January 2013 6:05:50 pm

Hi guys,

I need a simple example in which I can understand the use of extended_attribute_filter for multiple tag <b>(and not just for one tag).</b>

I have my code like this

<code>

{def $articles_with_tag = fetch( content, tree, hash( parent_node_id, 2,

extended_attribute_filter, hash(id, TagsAttributeFilter, params, hash(

tag_id, $my_article.data_map.my_article_tag.content.tags.0.id)),

class_filter_type, include,limit,10,

class_filter_array, array( article ) ) )}

</code>

This works just for the first tag find in my_article_tag attribute.

How can I check for the other tags?

I try with something like

<code>

{def $articles_with_tag = fetch( content, tree, hash( parent_node_id, 2,

extended_attribute_filter, hash(id, TagsAttributeFilter, params, hash(

array('or',

array(tag_id, $my_article.data_map.my_article_tag.content.tags.0.id),

array(tag_id, $my_article.data_map.my_article_tag.content.tags.1.id),

array(tag_id, $my_article.data_map.my_article_tag.content.tags.2.id)

)),

class_filter_type, include,limit,10,

class_filter_array, array( article ) ) )}

</code>

but I know it's not the right way.

Do you have some ideas or better some real example?

Thanks a lot

Luca

Friday 25 January 2013 9:35:48 pm

You could take the $my_article.data_map.my_article_tag.content.tags array and do a for loop on this array and read in into another array that is just of the IDs of each tag

{foreach $my_article.data_map.my_article_tag.content.tags as $tag}

{set $tag_array = $tag_array|append($tag.id)

{/foreach}

This should give you and array $tag_array that will look like array($tag1, $tag2, $tag3...ect.)

Then this $tag_array can be used as your hash value.

hash(id, TagsAttributeFilter, params, hash(tag_id, $tag_array))

edit:

I have found this will return any item tagged with ANY of the tags so $tag1 OR $tag2 OR $tag3. I am still trying to find a way to return only items that have ALL of the tags $tag1 AND $tag2 AND $tag3

Saturday 26 January 2013 9:35:47 am

Hi Luke! Thanks for tip!

It's exactly what I need (return ANY item tag with ANY of the tags in array).

I will try it on monday and will be back here to tell you if everythings is ok!

Thanks!

Monday 28 January 2013 11:36:00 am

Hi Luca,

Luke is right, you can use array instead of a single tag as he already demonstrated happy.gif Emoticon

And yes, it will return nodes which have any of the tag IDs specified.

@Luke unfortunatelly, there is no way to achieve "AND" functionality as of yet. I have looked it before as there was an exact request for this feature, but it was far too complicated.

I will give it shot again though ( or you can, and create a pull request on github happy.gif Emoticon )

Monday 28 January 2013 12:06:00 pm

Hi Luke.

Your script works like a charm.

Just one thing to add to make it work.

In the first line you have to declare array variable

<code>

{def $tag_array=array()}

</code>

THANKS THANKS THANKS!!

Luca

Tuesday 29 January 2013 5:05:53 pm

I have developed a way I believe will allow tags to be searched with an AND condition that will require all tags passed to the function to be on the objects returned.

First I created a new function in the eztagsattributefilter.php file called function createSqlPartsAND( $params ) as a copy of the original

At the end of the function before the $returnArray assignment I added the following code.

foreach ( $tagIDsArray as $tagID )

{

if ($tagID != null){

$dbString = $dbString . " AND exists (select 1

from eztags_attribute_link j1,

ezcontentobject j2

WHERE j1.keyword_id = $tagID

AND j1.object_id = j2.id

AND j2.id = ezcontentobject.id

AND j1.objectattribute_version = j2.current_version)";

}

}

This creates an additional filter on the query that makes sure all of the requested tags exist on each object returned.

This was also added to the extendedattributefilter.ini.append.php file to give the new function visability to my .tpl files

[TagsAttributeFilterAND]

ExtensionName=eztags

ClassName=eZTagsAttributeFilter

MethodName=createSqlPartsAND

FileName=classes/eztagsattributefilter.php

Tuesday 29 January 2013 6:35:48 pm

Hi Luke,

this looks like a good solution! happy.gif Emoticon

However, I would do it a little bit another way by adding a new parameter to existing attribute filter called "require_all_tags" which is false by default.

If it is false, it retains the current functionality, and if it's true, it uses the code from your method.

Also, I think that in case when "require_all_tags" would be true, the entire "$dbString = $db->generateSQLINStatement( $tagIDsArray, 'i1.keyword_id', false, true, 'int' );" line can be replaced with your SQL. Right?

Tuesday 29 January 2013 8:05:51 pm

Yeah the require all tags param would be a great way to do that. The situation I have might also require a AND and OR combination so I was thinking about using multiple parameters for that also. As to your point about the other SQL not being need I believe this is correct but I have not tested it that way.

Wednesday 30 January 2013 12:05:50 pm

Do you mean having AND and OR filter in the same content/list or content/tree fetch?

I haven't thought of that. In that case maybe it is better to have a separate attribute filter defined.

Wednesday 17 July 2013 5:06:08 pm

Hi guys,

Just wondering if any one did an eZ Flow block that would fetch a list of content based on tags?

The eZ Flow block would take as an input the tag(s) and the number of items to fetch.

Couldnt find any thing yet but thought of asking in case...

Thanks

Wednesday 17 July 2013 5:35:57 pm

Hi Roland,

I'm not aware of such functionality implemented by the community, but it should be pretty straightforward to do so.

Thursday 22 August 2013 6:06:08 am

Hi there,

Been scratching my head for the past hour. Is there any way to pull in a list of tags from multiple attributes that is being used by a particular node?

I have a content class which has 3 tag attributes which have different subtrees attached. I know I can get them separately easy enough but there's a point where I would like to display them in all hit within my template at one point.

Suggestions welcomed happy.gif Emoticon.

Thursday 22 August 2013 10:06:03 am

Hi Hayden,

there's no ready made fetch that would list all the tags from all attributes, but you can always do something like this:

<code>

{foreach $node.data_map as $attribute}

{if $attribute.data_type_string|eq( 'eztags' )}

{if $attribute.has_content}

{attribute_view_gui attribute=$attribute}

{/if}

{/if}

{/foreach}

</code>

I hope that's enough happy.gif Emoticon

Friday 23 August 2013 1:35:56 am

Thanks for replying Edi - i've managed to work out a solution based off your suggestion.

Friday 23 August 2013 9:36:01 am

Good to hear that! happy.gif Emoticon

Tuesday 11 February 2014 7:35:27 pm

Hi all,

Is there a way to display the treeview in a template in the Front Office ?

I 'm trying to have the same display as in Back Office with including the code in my template:

<code>

<div class="TagCloud">

{include uri=concat( 'design:tags/tags_structure_menu_dynamic.tpl' ) }

</div>

</code>

... but the tree dosn't work : the javascipt doesn't seems to be included in my page, I've got the error : ReferenceError: ezpopmenu_showTopLevel is not defined when I click on a tree-node).

How can I do to display the treeview in my template ?

Wednesday 12 February 2014 10:35:29 am

Hi Alex,

does your front end have ezpopupmenu.js located at design/standard/javascript/popupmenu/ezpopupmenu.js included in your templates?

eZ Tags tree menu uses this system script to display the tree menu.

Wednesday 12 February 2014 7:35:27 pm

To be sure that this file is well include, I've copied it in the ezwebin/design/javascript directorie and force it to be include in the header with a design.ini.append.phpp settings.

Now I don't have anymore the previous error, when I click on a node ( only the first 2 nodes are displayed ). When I click on node name I open a link to the correct seciton, but when I clik on the bullet juste in front of the link nothing happend, the tree does not expend or collapse.

I forget : I have to said that the tree is not design as it is in the back office ([+] and verticals dots are missing ). I guess that the correct css is overrided or not include, but I don't know which one. Is there a special CSS stylesheets I have to include too ?

You can have a look here : http://dorisnet.alex-design.fr/Taxonomie

Monday 17 February 2014 5:05:34 pm

Hi Alex,

I see that you fixed it already happy.gif Emoticon

What did you do to make it work?

Monday 02 June 2014 3:35:48 pm

Hi all,

is anybody working on a mass tagging feature for eZ tags? Something like, going into a folder, see the newest 50 objects with eztags datatype , enter tags into a text field, check all objects of this list, which should get the tag and press the button "add tags"?

Greetings, ekke

Monday 02 June 2014 5:05:29 pm

Hi Ekke,

as far as I know, nobody is working on such feature. We had one inquiry a year or two back with exactly the same request.

The problem is not trivial I'm afraid:

1) You need to have at least as many publish operations as there are objects (each translation object requires separate republish, so the number of publish operations goes up pretty quick)

2) How would you select which object translations get updated?

3) One class can have multiple eztags attributes. How would you select which eztags attribute will be updated?

4) How will you handle objects of multiple classes as they can have eztags attributes with different identifiers?

Tuesday 08 July 2014 9:35:26 am

Excuse the newbie question.

I know I can fetch a Tag by keyword:

<code>

$tag = eZTagsObject::fetchByKeyword('UK');

</code>

However, I'm trying to write a custom fetch class, and I actually want to determine the tag ids for an array of keywords. I'd rather not iterate over the array.

I've tried the following:

<code>

eZPersistentObject::fetchObjectList( eZTagsObject::definition(),

array('id'),

array('keyword' => array('UK','London')),

null,

null,

false,

false,

null,

null,

null

);

</code>

But my syntax for the keyword is incorrect. Any pointers would be much appreciated.

Tuesday 08 July 2014 10:35:27 am

Hi!

This works fine:

<code>

$result = eZPersistentObject::fetchObjectList(

eZTagsObject::definition(),

array( 'id' ),

array( 'keyword' => array( array( 'test tag 1', 'test tag 2' ) ) ),

null,

null,

false

);

</code>

However, you will still need to iterate over the array to extract the IDs since you will get an array of arrays:

<code>

array(2) {

[0]=>

array(1) {

["id"]=>

string(1) "1"

}

[1]=>

array(1) {

["id"]=>

string(1) "2"

}

}

</code>

You can use array_map function like this to extract the IDs:

<code>

$tagIds = array_map(

function( $tag ) {

return (int)$tag['id'];

},

$result

);

</code>

Wednesday 09 July 2014 7:35:39 am

Thanks Edi, works a treat!

If you're able to assist on one more thing I'd be even more grateful.

I had been experimenting with setting the $field_filters for the ezPersistentObject::fetchObjectList() to null, and instead adding a $custom_conds using the following fragment:

<code>

if ( isset( $parameters['Tags'] ) ) {

$tag_string = "'".implode("','",

array_filter(

array_map('trim', explode(';', $parameters['Tags']) )

)

)."'";

}

$customCond = " WHERE eztags.keyword IN ($tag_string)";

</code>

As you can see it's a pretty poor way to bind the variable to the SQL fragment. Is there a better way to bind an array of strings?

 

Wednesday 09 July 2014 10:35:25 am

Hi,

There is

<code>

eZDBInterface::generateSQLINStatement()

</code>

function, so you can try playing with that.

Wednesday 09 July 2014 11:35:29 am

Wonderful. Many thanks!

Friday 24 April 2015 4:35:30 pm

Hi Veronique,

It should work if you grant access to tags/read function to user role for which you wish to display the tab.

Let me know if it works for you!

Cheers!

Friday 24 April 2015 5:05:31 pm

Hi Edi,

Thank you for your reply. I try with 'read', 'edit' and 'add' function of tag module, but the eZtabgs tab isn't display!

Where I can find information about the displaying tab extension?

Regards

Véronique

Friday 24 April 2015 5:35:45 pm

Hi Edi,

Sorry, I've added the all these 3 functions 'edit', view' and 'read'!

But with only 'read' function, the eZtags tab is displayed, great!!

Thanks again

Véronique

Friday 24 April 2015 6:05:33 pm

When I create new policy for my dedicated users role, Is it possible to have a function 'all functions' in the function list? To give access for all functions, I've created one policy for each function of tags module

Thanks for your reply

Véronique

Saturday 25 April 2015 11:35:34 pm

Hi Veronique,

That's fairly standard part of eZ Publish funcionality and is not related to eZ Tags.

When adding a new policy, choose "tags" from "Module" dropdown and click "Grant access to all functions" button.

Cheers!

Monday 27 April 2015 6:35:34 pm

Hi Edi,

Thanks for this information but when Ichoose 'tags' in "Module" dropdown, the "Grant access to all functions" button is not available and the first element of "function" dropdown is displayed!

So I've only the possibility to create one policy by each function

Is there any eZtag extension modification to solve this problem?

Regards

Véronique

 

Tuesday 28 April 2015 10:05:53 am

Hi Veronique,

unfortunately, I cannot reproduce the issue.

I tested on the latest version of eZ Publish and "Grant access to all functions" button remains functional, and I can allow access to all functions of tags module.

It probably has something to do with your specific installation. Maybe you have some hacks running on it?

Tuesday 28 April 2015 10:35:35 am

Hi Edi,

Thank again for your reply. My eZpublish version is 4.4, I know it's not the last one but it's like that!

Yes I would like to adapt my version to make avalaible the "Grant access to all functions" button.

Is there any body help me to solve this problem? I'm continuing to looking for solutions.

Best regards

Véronique

Tuesday 28 April 2015 11:05:37 am

Hi,

without physical access to your eZ Publish installation, I doubt I can help you.

I tested eZ Tags now on eZ Publish 4.4 and everything works as expected.

Wednesday 29 April 2015 6:35:30 pm

Hi Edi,

Do you test with which eZtags version? I use version 1.3.0

I compare version 1.3.0 and 2.0 beta, there are different.

Regards

Véronique

Thursday 30 April 2015 12:05:38 pm

Hi Veronique,

yes, I tested with both versions, both of them are working fine.

Members - Visit project's team page
Real name:
Edi Modrić
Country:
Croatia 
#Posts:
324
Real name:
Ivo Lukač
Country:
Croatia 
#Posts:
798
Real name:
Vjeran Vlahovic
Country:
Croatia 
#Posts:
74
Project reviews - See all reviews

Wednesday 06 April 2011 6:35:17 pm

This is the extension I was looking for, very useful and efficient!
Proudly Developed with from