Yet Another Tagging System for MODX Revolution
goldsky / smarttag Goto Github PK
View Code? Open in Web Editor NEWYet Another Tagging System for MODX Revolution
Yet Another Tagging System for MODX Revolution
When I type in a tag which contains the letter 'a' in it, this letter gets stripped when I press enter. So, for example:
dance
will become
dnce
This is caused by the default friendly_alias_restrict_chars_pattern. In it's default state it is:
/[\0\x0B\t\n\r\f\a&=+%#<>"~:`@?[]{}|^']/
The \a is causing the 'a' to get stripped. When I remove the \a, the a's won't get stripped anymore.
I guess the \a&= needs to get grouped. I'm not a pro on regex, so I don't know how to properly group this.
This problem is caused by enhancement #13
Smarttag 1.0.0 rc1
MODX 2.2.15
To fully customise the CMP for client UX it would be useful to be able to hide the version number (its irrelevant to them) and rename the CMP from something like SmartTag to maybe Tag Management System or something more descriptive for clients
For long tags it would be useful if the Rename Tag box was already pre-filled with the tag that you want to modify. A bit like when you duplicate a resource it copies the old name ready to be edited. Sometimes just a spelling error or one character needs to be edited and not the entire tag.
Upon entering a new tag "Sedan" it will be forced to lowercase likewise "GMC" shows up as "gmc" in the smarttag table.
Apologies is this is due to incorrect set up of input properties (in which case please let me know).
We're using several SmartTags in a development system where some tag values contain commas. When saving a resource containing a 'comma-based' tag (let's call this R1), the smarttag value is correctly added to the 'smarttag_tags' table along with association in table 'smarttag_tagresources'. All good so far. The document resource (R1) also correctly shows the comma-based tag in the manager interface after screen refreshes. All good.
Problem appears after editing another resource document (any) and then reloading the original R1 resource. No comma-based tags seem to appear in the manager interface - though any tags NOT containing commas do. If resource R1 is then edited and saved (any field - content, pagetitle etc.), then association to those non-displayed comma-based tags is lost in table 'smarttag_tagresources'.
We fixed the problem in our dev system by editing file 'modx_core/components/smarttag/elements/tv/mgr/input/tpl/smarttag.tpl'. We changed line 37 from ',valueDelimiter: ","' to ',valueDelimiter: "|"'.
Again, if this is related to input properties not being correctly set up, then apologies. Otherwise, can we suggest some kind of permanent fix in a future release?
We're currently running version 1.0.0-rc2.
Many thanks for a great component goldsky. Really is a big help for our particular system requirements.
Maybe also add icons like Grid Class Key or Articles for view, edit, unpublish/publish.
Dear developers. I found exception if using extension with MIGX.
In template
~/core/components/smarttag/elements/tv/mgr/input/tpl/smarttag.tpl line 12
$tv->id can be string type in MIGX.
For correct work need replace
,tvId: {/literal}{$tv->id}{literal} /* replace to --> _/ ,tvId: '{/literal}{$tv->id}{literal}' (_add quotes*)
Please correction this in next release.
Thank you very much for your extension! :-)
In the BO of modx, while editing a resource, in the TV tab, tags are appearing in the creation order.
I'm making a snippet to retrieve all tags for a resource id (in order to differently highlight the tags). How can I browse the tags of a resource in this same order ?
Thanks very much,
Lionel
To show all the resources for a specific tag I use the "getResourcesTag" snippet from tagLister.
Since I want to use tags that are similar (like "air" and "pair"), I tried to use the property "&tagSearchType=exact
" which works when the resource has only one tag. If the resource has more than one tag, I get no results.
Here is my snippet call:
[[!getResourcesTag?
&parents=50
&tagKey=airSmartTag
&tpl=air.SmartTagResults
&toPlaceholder=results
&tagSearchType=exact
&includeContent=1
&includeTVs=1
&showHidden=1
&hideContainers=1
&cache=0
]]
If there is a built in functionality in SmartTag to achieve the same result as the "getResourcesTag" call, I'd be more than happy - unfortunately I couldn't find it.
From Slack:
Stuart McMartin 16:32
Just upgraded to 3.0.0. Smashing. Looks good.
I've a problem with some resources in the Manager. Best guess is something to do with Template Vars on offending resources.
And in the Error Log I get -
(ERROR @ /home/USER/apps/MyPROJECT/core/src/Revolution/modManagerResponse.php : 160) PHP warning: Invalid argument supplied for foreach()TypeError: Argument 1 passed to SmartTagInputRender::__construct() must be an instance of modTemplateVar, instance of MODX\Revolution\mysql\modTemplateVar given, called in /home/USER/apps/MYPROJECT/core/src/Revolution/modTemplateVar.php on line 473
Errors:
SmartTagInputRender->__construct()
MODX\Revolution\modTemplateVar->getRender()
MODX\Revolution\modTemplateVar->renderInput()
ResourceManagerController->loadTVs()
ResourceUpdateManagerController->process()
MODX\Revolution\modManagerController->render()
MODX\Revolution\modManagerResponse->outputContent()
MODX\Revolution\modManagerRequest->prepareResponse()
MODX\Revolution\modManagerRequest->handleRequest()
Might be quickest solved by replacing the input constructor from:
public function __construct(modTemplateVar $tv, array $config = array()) {
to
public function __construct($tv, array $config = array()) {
but I haven't tested if that flags up any strict errors or if any other compatibility issues exist.
If I try to rename a tag, it gets deleted from the database. Seems a little random. trying to rename "sedan" to "Sedan" will delete it, "sedan" to "sedans" seems fine.
It would be useful to be able to hide the Converter tab from certain user groups to prevent them from making breaking changes
I found out that the tables 'modx_smarttag_tagresources' and 'modx_smarttag_tags' are created with the default prefix (modx_). I use a custom prefix for my tables, and this was not used in the table names. It resulted in Smarttag not working and a lot of errors in the error log.
MODX 2.2.14
Smarttag 1.0.0 (beta6)
On a more powerful server it would make sense to load more than only 50 results by default, there is enough screen space for a lot more
Hi,
I want to select the tags of all children of one specific parent.
Even if the doc talk about a parentIds parameter, it doesn't include all the children :
[[!smarttagTags?
&parentIds=`129`
&includeHiddenDocs=`1`
&tplWrapper=`@code:[[+smarttag.tags]]`
&tplItem=`@code:<button class="button" data-filter=".tag-[[+smarttag.tag]]">[[+smarttag.tag]] <span>([[+smarttag.count]])</span></button>`
&tvNames=`EventTags`
]]
The other parameter allTags is working, but for ALL the resources of the website !
[[!smarttagTags?
&allTags=`1`
&includeHiddenDocs=`1`
&tplWrapper=`@code:[[+smarttag.tags]]`
&tplItem=`@code:<button class="button" data-filter=".tag-[[+smarttag.tag]]">[[+smarttag.tag]] <span>([[+smarttag.count]])</span></button>`
&tvNames=`EventTags`
]]
Is there a way to select all the tags of children of a specific resource, without specify each direct parents ?
Pretty strange question, but.. Am I able to put article's list of tags into the regular page? And create a page where all links to the articles will be listed, not in administration panel.
if a resource have multiple tv and few tv having same tags,
it will return the multiple rows,
suggested count to add in distinct(modResource.id)
This might be suitable for a future version (1.1 or something) but it would be useful (and smart) if SmartTags could have "children" tags that are related to a parent tag, for example:
accessory (parent)
accessories (child)
accessorize (child)
or
shoe (parent)
shoes (child)
If the tags are being used for search and a child tag gets a hit then it would show the results for the parent tag.
CLient is confused by having to type. And it's true. WE have mixed behavior. Some fields have a drop down, others no, but both offer type ahead.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27355950-show-all-tags-in-a-drop-down-list-on-click-similar-to-the-modx-multi-select-tv?utm_campaign=plugin&utm_content=tracker%2F813270&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F813270&utm_medium=issues&utm_source=github).If I change a name of a tag, it gets changed in the smarttag_tags table, but it no longer shows up in the TV field for the resource. This is because the plugin stores the NAME of the tag, rather than the ID number, in the actual value in the site_tmplvar_contentvalues table, in the value field. Changing the name updates that tag in smarttag_tags, but the "value" field in site_tmplvar_contentvalues does not also get updated.
I don't understand why this plugin stores this information in two places, 1) site_tmplvar_contentvalues and 2) smarttag_tagresources. It would work better to not use site_tmplvar_contentvalues at all, and just join the two smarttag tables instead, and use those to load the tag names into the TV field on individual resources.
I assume you're doing some sort of lookup from the smarttag tables, and that that's why a tag with a changed name doesn't show up (because it is still in site_tmplvar_contentvalues under the old name), but if you're not loading the names from site_tmplvar_contentvalues to fill out the TV field on the resource editing page, why not use IDs instead?
To aid general tag management it would be useful when viewing a grid of resources for one tag if the user could see other associated tags for those resources.
Hi. Can you separate tagname and tagalias in DB. It's need for correct using national languages in tegname and english in tagalias. As long we have to use the national language in URL. This isn't very good...
Thanks!
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/30524231-separate-tegname-and-tagalias-in-db?utm_campaign=plugin&utm_content=tracker%2F813270&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F813270&utm_medium=issues&utm_source=github).Just installed in MODX 2.6.5, and isn't working at all. No tag select field appears, and selecting SmartTag in the Extras menus results in a white screen on the right.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hi!
SmartTag version 1.0.1 pl.
When I add new value in TV in cyrilic, it automatically transliterated to latin.
For example, "новости" - "novosti".
When I hit Enter, tag is converted to
I need my tags in cyrillics.
For transliterating aliases I use "translit" extra from modx.com - http://modx.com/extras/package/translit.
I've got another site, SmartTag version 1.0.0 beta 6, I use "translit" extra too - and tags is saved in cyrillic, no problem.
What is wrong? Thanks for any advise
There needs to be a setting to list forbidden characters such as & symbol and + symbol which can break some URLs and JavaScript:
http://en.wikipedia.org/wiki/Uniform_resource_locator#List_of_allowed_URL_characters
This tv fields are not correctly displayed when editing resource.
Screenshot
https://file.modx.pro/files/f/3/0/f30f37fa4ea7fd996840d48f4009e04e.jpg
When there are two different SmartTag TVs (e.g. keywords
and country
) and some tag names are used across both TVs, then the total counts can sometimes be wrong.
For example keywords
has the games, art, Indonesia
and country
has Indonesia
; when calling a snippet like this:
[[!smarttagTags?
&parentIds=`1`
&limit=`50`
&tvNames=`keywords`
]]
The resulting list should just show Indonesia (1)
since this is tagged once within the keywords
TV, however the final count is Indonesia (2)
because it actually counts across all SmartTag TVs not just the specified TV in &tvNames
.
MODX version 2.4.0-pl, SmartTag 1.0.4-pl
I want to create a page which lists all the resources with a specified tag. (just like you could do with getResourcesTag for tagLister). How do I do this? Is there a specific snippet to use? And how can I make the tags link to that page? I have set the output type of the tv to 'smarttag' and I've filled in the href (I placed [[~18]] there, 18 is the resource which should list all the resources with that tag). However each tag just links to that page, there is no parameter added to the url so we don't know for what tag the resources should be collected.
Thanks for any help!
On the SmartTag CMP interface it would be useful if new tags could be added into the system in bulk from a comma seperated list
When I add fox
as a tag for one page, and then want to add ox
for another, the type ahead feature suggests I use fox
instead. No matter how hard I try, it won't let me enter anything else but fox
. The only way to fool it is to accept fox
, then add ox
and then remove fox
again. If you have many words containing the letters 'ox' that could become annoying very quickly.
Besides having the freedom to override the suggestion, it might also be more convenient if the type ahead feature searches for tags that begin with, rather than contain the typed phrase,
count of resources does not honor tvnames passed in
the subqueries need to support this within it.
(empty($tvNames) ? '': 'AND smarttagTagresources.tmplvar_id =TemplateVar.id') .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.