Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#421 2019-01-17 11:12:51
Re: smd_tags: unlimited article, image, file and link taxonomy
Vienuolis wrote #316163:
Could you point me please to some examples of public websites with live smd_tags?
There was an estate agent site I knew of a while ago but I can’t remember the URL. If I dig it up, I’ll post it here.
How it deploys or replaces the categories
As jakob says, you can run the plugin independently of categories – set up your own tag hierarchies per content type – or you can optionally link any tag (and, by inference, its children) to a Txp category. If you do that, then changing category on the Write panel will dynamically alter the available tags to only those linked to the chosen category.
This gives an opportunity to narrow down the available tags that users can pick from based on the category, instead of displaying a huge list of tags they need to wade through first. For an etymology site, this might be a game changer!
how to combine it with the search function?
It doesn’t interact with the regular search feature of Txp (you’ll nee to carve your own queries as jakob suggests). The plugin does, however, offer tags that permit the URL to be interpreted in many ways to display content that matches the given tag(s).
If you are dead set against using a trigger word (e.g. example.org/tags) then you can run it without and combine it with the /title-only permlink scheme, but – again as jakob alludes – you may end up with URL clashes. I seem to recall the plugin tries to be clever about it and if you’re using certain permlink schemes it tests articleness, but it’s not foolproof. The risk is yours.
Building a URL that contain multiple tags is something that’s not automatic, unfortunately. The estate agent site I alluded to earlier permitted checkbox sets of tags to be selected in a dedicated search panel. Property type was one tag tree, with detached, semi-detached, terrace, bungalow, etc in it). Another tag tree held a select list of the desired number of bedrooms and each article was tagged with the relevant number it contained.
When the submit button was hit, a few lines of JavaScript constructed a URL based on the selected options and then forwarded the user to that URL (e.g. example.com/propertysearch/detached+5bed) and then the Page template took over to display the matching content.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#422 2019-01-17 12:05:06
Re: smd_tags: unlimited article, image, file and link taxonomy
Vienuolis wrote #316163:
Could you point me please to some examples of public websites with live smd_tags?
A search for smd_tags in the “showcase your site” of this forum returns quite a few results.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#423 2019-01-29 21:26:28
Re: smd_tags: unlimited article, image, file and link taxonomy
Hi!
I’m trying to display a list of related articles when I click on a tag.
My page template has this:
<txp:smd_if_tag_list>
<txp:smd_tag_list><txp:smd_tag_name /></txp:smd_tag_list>
<txp:smd_related_tags><txp:permlink><txp:title /></txp:permlink></txp:smd_related_tags>
</txp:smd_if_tag_list>
It displays the tag name as expected, but the smd_related_tags returns nothing at all. I’m wondering what it is that I’ve missed.
Also, I have this on my default article form, to display files with the same tags as the current article:
<txp:if_individual_article>
<txp:smd_related_tags type="file" label="Relevanta filer" labeltag="h6" wraptag="div" class="fileDownload" break="">
<p class="four columns"><txp:file_download_link><txp:file_download_name title="1" /></txp:file_download_link> <txp:file_download_description escape="html" /></p>
</txp:smd_related_tags>
</txp:if_individual_article>
and it works fine, except the file_download_name displays the tag title instead of the file title. So I get a long list of files all called “test_tag”.
I’m feeling a bit lost here…
Offline
#424 2019-01-29 22:25:06
Re: smd_tags: unlimited article, image, file and link taxonomy
helsinkifrostbites wrote #316343:
I’m trying to display a list of related articles when I click on a tag… It displays the tag name as expected, but the smd_related_tags returns nothing at all. I’m wondering what it is that I’ve missed.
Presumably your smd_tags code is in a dedicated Section to trigger it from the URL? In which case you’ll need to feed <txp:smd_related_tags> with a section attribute to tell it where to look for matching tags. Otherwise it’ll default to “this section” which doesn’t contain any articles.
Also, if you want to show related tags for each tag in a (nested) list of tags you’ll need to move your closing </txp:smd_tag_list> after the closing </txp:smd_related_tags> so it’ll generate a list per tag.
the file_download_name displays the tag title instead of the file title. So I get a long list of files all called “test_tag”.
Drat, that’s a bug. Thank you for finding it. I think I’ve squashed it in the 4.7.0 branch (I assume you’re using the latest version of Textpattern, right?) but I’ll need to do some further tests to check you can still extract the tag title with item="title" when extracting stuff via <txp:smd_tag_info>. Should work, but I haven’t tested it yet.
If you need a bundled plugin that contains the patched code, let me know and I’ll send one over. If you’re okay with copying and pasting just the code block from GitHub over your existing plugin code, then by all means do that instead to patch it for now until I can test and then officially release it. EDIT: released.
Thank you for the report.
Last edited by Bloke (2019-01-29 23:20:24)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#425 2019-01-30 07:05:55
Re: smd_tags: unlimited article, image, file and link taxonomy
Thank you! I knew I was missing something bleeding obvious. Everything works now :)
Offline
#426 2019-01-30 12:54:15
Re: smd_tags: unlimited article, image, file and link taxonomy
I get this in the Manage tags prefs when I create a tag with scandi characters (å, ä, ö etc):
Deprecated: Parser::textileThis() is deprecated. Use Parser::parse() instead. in … /textpattern/vendors/Netcarver/Textile/Parser.php on line 2033
Still works fine though.
Offline
#427 2019-01-30 15:05:35
Re: smd_tags: unlimited article, image, file and link taxonomy
helsinkifrostbites wrote #316354:
Deprecated: Parser::textileThis()
Drat, forgot about fixing that. I spotted it yesterday as well and it fell out of my head. I’ll fix it today, thanks for the nudge.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#428 2019-04-09 08:08:25
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,331
Re: smd_tags: unlimited article, image, file and link taxonomy
Bloke wrote #316356:
Drat, forgot about fixing that. I spotted it yesterday as well and it fell out of my head. I’ll fix it today, thanks for the nudge.
i assume you haven’t fixed it yet? installed latest from github and get the same error just a while ago…
Offline
#429 2019-04-09 09:38:28
Re: smd_tags: unlimited article, image, file and link taxonomy
Yes I have fixed it, but only in the 4.7.0 branch. Check that out and you should be good to go.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#430 2019-04-09 10:01:51
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,331
Re: smd_tags: unlimited article, image, file and link taxonomy
Bloke wrote #317561:
Yes I have fixed it, but only in the 4.7.0 branch. Check that out and you should be good to go.
sorry for dummy question: how to install it?
Offline
#431 2019-04-09 11:52:40
Re: smd_tags: unlimited article, image, file and link taxonomy
Gallex wrote #317562:
sorry for dummy question: how to install it?
I’ve released a new beta for you. Download and install the smd_tags_v0.6.0_zip.txt file as normal.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#432 2019-04-14 08:03:10
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,331
Re: smd_tags: unlimited article, image, file and link taxonomy
i need your help to get it work.
- under plugin prefs i set up the name of a section to be landing page.
- created a section tags and assigned it with default page.
- added this code at the bottom of a default page:
<txp:smd_tag_list label="Sildid" labeltag="h6" showall="1" class="smd-tag-list">
<txp:smd_tag_name link="1" title="1" />
<txp:smd_tag_count />
</txp:smd_tag_list>
here you can see it live (at the bottom). but if i click any tag – nothing showing up! do i need to add some more code to default page or what i’m missing?
Offline
#433 2019-04-23 12:48:52
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,331
Re: smd_tags: unlimited article, image, file and link taxonomy
is my url managment (take a look) is wrong or do i need to add some extra code into my default page?
why it doesn’t output any articles if i click on a tag link at the bottom of a page?
Stef?
Offline
#434 2019-04-23 13:07:56
Re: smd_tags: unlimited article, image, file and link taxonomy
Gallex wrote #317736:
why it doesn’t output any articles if i click on a tag link
Sorry I didn’t reply sooner. <txp:smd_tag_list> only outputs the tag tree. You need to use <txp:smd_related_tags> to go and fetch articles that are ‘related’ to the clicked tag:
<txp:smd_tag_list ... >
<txp:smd_tag_name link="1" title="1" />
<txp:smd_related_tags section="articles" wraptag="ul" break="li">
<txp:permlink><txp:title /></txp:permlink>
</txp:smd_related_tags>
</txp:smd_tag_list>
You must specify the section in which your articles are located, otherwise it defaults to “this section” and you probably won’t have any articles assigned to the tags section.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#435 2020-01-27 20:54:02
Re: smd_tags: unlimited article, image, file and link taxonomy
I assume this is a PHP error but didn’t see where anyone else had brought it up.
Textpattern version: 4.8.0-dev (b7c0d0c8e0bbcbc29b0121e76a8d814f)
Last update: 2020-01-25 22:57:41/2020-01-25 22:41:48
Textpattern path: __TXP-ROOT/textpattern
Article URL pattern: year_month_day_title
Production status: debug
Temporary directory path: __TXP-ROOT/textpattern/tmp
PHP version: 7.3.12
Active plugins:
smd_tags-0.60
The code
<txp:smd_tag_list wraptag="div" class="post-tags" break=""
shuffle="1" indent="">
<txp:smd_tag_name link="1" />
</txp:smd_tag_list>
The error
Tag error: <txp:smd_tag_list wraptag="div" class="post-tags" break=""
shuffle="1" indent="">
<txp:smd_tag_name link="1" />
</txp:smd_tag_list> -> 8192: The each() function is deprecated. This message will be suppressed on further calls while parsing form single-content on page article
As of this writing, it can be seen live.
Oh, and when adding a new tag, the backend displays:
Deprecated
: Parser::textileThis() is deprecated. Use Parser::parse() instead. in
/home/.../vendors/Netcarver/Textile/Parser.php
on line
2048
Offline