Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#157 2011-07-17 00:29:56

frickinmuck
Member
Registered: 2008-05-01
Posts: 118

Re: smd_tags: unlimited article, image, file and link taxonomy

Thanks for the explanation – I can see why that’s confusing things. When I empty the trigger field the error goes away, but the sidebar tags are generating this type of URL: http://article/sample-tag, which of course isn’t going to work.

However, I noticed another thing – my article tags lists aren’t actually showing the tags, they’re displaying as the article title instead. So, instead of getting “Sample Tag 1” “Sample Tag 2” I’m getting “Sample Blog Post 1” “Sample Blog Post 2”. The links associated with those tags take you to the article (as in, /blog/60/sample-blog-post). This is happening whether the trigger field is empty or not.

Edit: I should add that /blog/article/sample-tag doesn’t work, nor does article/sample-tag, regardless of what I have in the trigger field.

Last edited by frickinmuck (2011-07-17 00:34:52)


The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else.

Offline

#158 2011-07-17 20:15:00

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: smd_tags: unlimited article, image, file and link taxonomy

frickinmuck wrote:

When I empty the trigger field the error goes away, but the sidebar tags are generating this type of URL: http://article/sample-tag, which of course isn’t going to work.

I could probably be more clever about this — for example, default to the current section if the triggers are empty instead of rendering two slashes without anything between them — but it really comes down to what you actually want the visitor to see when they click a tag. What do you want to happen? If we start there and work back it’ll be easier than me proposing things that you probably don’t want.

my article tags lists aren’t actually showing the tags, they’re displaying as the article title instead.

I should have spotted this earlier but my brain was foggy last night: I think this is because you’re using <txp:smd_related_articles />. That tag fetches a list of articles that have the same tags as those in the current article, and displays permlinks to them. If you want to display a hyperlinked list of tags that are in the current article you should try this approach in your article Form:

<div class="tag-display">Tags:
   <txp:smd_tag_list wraptag="span" break=",">
      <txp:smd_tag_name link="1" />
   </txp:smd_tag_list>
</div>

Your tag will be hyperlinked, but they’ll also have the double slash thing in the URLs unless you add at least one trigger section (i.e. a destination tag landing page), or you override the behaviour with the section="some_section" attribute in <txp:smd_tag_name />. Is that sort of making sense? Again, we can look at what you actually want to happen when a visitor clicks a tag and work backwards to figure out the tags and settings you’ll need to accomplish it.

Last edited by Bloke (2011-07-17 20:16:04)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#159 2011-07-17 20:25:06

frickinmuck
Member
Registered: 2008-05-01
Posts: 118

Re: smd_tags: unlimited article, image, file and link taxonomy

Cool – I’ll try this, thanks. What I want to happen is, when someone clicks on a tag they get all the articles associated with that tag. Similar in functionality to txp:author, for example.


The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else.

Offline

#160 2011-07-17 20:48:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: smd_tags: unlimited article, image, file and link taxonomy

frickinmuck wrote:

when someone clicks on a tag they get all the articles associated with that tag.

Then you’ll need a landing page (a.k.a. trigger) set up in the prefs. Simplest method is to create a dedicated section for it: for the sake of argument I’ll call it tags. Set up the trigger and then create a section called tags. In the Page template for that section put this somewhere in your page flow:

<txp:smd_if_tag_list>
   <txp:smd_tag_list wraptag="" break="">
      <h2>Articles that match tag '<txp:smd_tag_name title="1" />'</h2>
      <txp:smd_related_tags wraptag="ul" break="li" section="" />
   </txp:smd_tag_list>
</txp:smd_if_tag_list>

That’ll get you going. The section="" is necessary because smd_related_tags defaults to grabbing matching articles from the current section and we want to get articles from all sections (because section ‘tags’ is bogus, just used for the sake of the tag list).

Last edited by Bloke (2011-07-17 20:50:26)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#161 2011-07-17 21:04:56

frickinmuck
Member
Registered: 2008-05-01
Posts: 118

Re: smd_tags: unlimited article, image, file and link taxonomy

Eureka! It’s working now! My hero!

The only issue I’m having now is that error is back:

Tag error:  <txp:smd_tag_list showall="1" sort="name asc"
     break="" wraptag="div"> ->  Warning: Invalid argument supplied for foreach()  on line 2390

That has to be something with the sidebar, I’m assuming? it shows up in the blog section. Here’s the code I’m using for the tags page:

<txp:smd_if_tag_list>
   <txp:smd_tag_list wraptag="" break="">
      <h2>Articles that match tag '<txp:smd_tag_name title="1" />'</h2>
      <txp:smd_related_tags form="blog_listing" section="" />
   </txp:smd_tag_list>
</txp:smd_if_tag_list>

For the article tag lists:

<div class="tag-display">Tags:
   <txp:smd_tag_list wraptag="span" break=",">
      <txp:smd_tag_name link="1" />
   </txp:smd_tag_list>
</div>

For the sidebar list:

<h1 class="sidebar-title">Tags</h1>
<txp:smd_tag_list showall="1" sort="name asc"
     break="" wraptag="div">
   <txp:if_different>
      <h2 class="alphachar"><txp:smd_tag_info item="lettername" /></h2></txp:if_different>
   <span class="atag">
      <txp:smd_tag_name link="1" wraptag="span" />
      <txp:smd_tag_count /><br />
   </span>
</txp:smd_tag_list>

EDIT: Plugin prefs:

URL name parameter: tag
URL type parameter: tagtype
Trigger: tags

Last edited by frickinmuck (2011-07-17 21:09:29)


The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else.

Offline

#162 2011-07-17 21:43:21

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: smd_tags: unlimited article, image, file and link taxonomy

frickinmuck wrote:

Eureka!

Glad we’re starting to cook.

The only issue I’m having now is that error is back:

That is totally weird because I cant replicate it on my server using your exact code and setup. I wondered if it might be the fact that your sidebar might come after the article’s tag list so I switchd it round so the ‘all’ tag list came after my <txp:article /> tag in the Page template. I still didn’t get the error.

I even put the tag list inside the article form: still worked. And I just checked the code and there’s no reason the new version of the plugin (at the moment at least) would behave any differently in this regard because the only changes have been minor jQuery tweaks to the admin side.

Totally freaky. I honestly don’t know what to suggest aside from maybe dropping me a login to your site so I can dig around and put some debug stuff in the code to try and see why yours is behaving differently to mine. If it’s a live or local site I guess that’s probably out of the question, but if you don’t mind doing that then it might be the fastest way to get to the bottom of this.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#163 2011-07-18 00:01:47

frickinmuck
Member
Registered: 2008-05-01
Posts: 118

Re: smd_tags: unlimited article, image, file and link taxonomy

Meh, that’s OK. It’s working, and that’s all I really care about. Thanks for all your kind assistance – you’ve been a massive help to me these past couple of weeks! I’ve got, like, 7 of your plugins on this site.


The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else.

Offline

#164 2011-08-01 20:15:44

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Trying this plugin out stef, thanks for your work on it! I want to be able to page tag results which you can’t do with tru_tags, but that is not related to my issue.

When I use tagging within an article with text list, textarea or textarea+ the currently assigned tags do not show bold as in the text list or in the textarea’s there is never any text unless I type it in.

however when I go to extensions -> manage tags the tags I typed in are there and associated with the article but I can’t remove them because they don’t show in the textarea in the write tab…

It does work when in select list mode though. The proper tags are highlighted and can be removed if desired.

Any ideas?

I would also like to request the tru_tags display option of a textarea with a text list below to select from, just add the warning that if you use thousands of tags it is going to be sloooooooooow!

thanks stef in advance

Offline

#165 2011-08-03 10:11:47

ilpalmo
Member
From: Stockholm, Sweden
Registered: 2007-07-02
Posts: 14
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Hi Stef and thanx for a great plugin! (and all your other fantastic plugins!)

I’m looking for a way to “infuse” a tag (or category if you’d like) to the related_tags tag to show a box displaying articles from one of the tags.
I’m not sure if I’m making myself clear but what I’m looking for is a equivalent tag for the txp:rss_uc_article_list so I don’t have to use both smd_tags and rss_unlimited_categories….

Anyone tried/managed to do this?

Offline

#166 2011-08-06 15:23:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: smd_tags: unlimited article, image, file and link taxonomy

ilpalmo wrote:

equivalent tag for the txp:rss_uc_article_list

I’m not entirely sure what this tag does but assuming it lists all articles that have a particular tag (or set of tags) then yes it’s possible. You can either look at the smd_tag_list tag and feed it a tag, or you can set up a dedicated section and route all tag requests to it. Thus your URL might be site.com/tags/heaven and on your landing page for that section you use smd_tag_list to read in the current tag from the URL (it does this automatically) and use smd_related_articles to list the articles that share this tag.

There are examples dotted around (might be on in the help itself) to give you a hint. Sorry I can’t help any more at the moment. Time limited over the next few weeks.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#167 2011-08-11 08:30:54

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Hey Stef – I installed this plugin onto a site a while back in preparation, I didn’t do any configuring other than a quick browse through and I just noticed that I now have this on my zem_contact_reborn form

<form id="zcr1363f080fc98df15c28f61ce589bcd36" class="zemContactForm" action="/contact-us/?smd_tag=&#38;smd_tagtype=#zcr1363f080fc98df15c28f61ce589bcd36" method="post">

I thought I might have to choose a section for tags like tru_tags, but couldn’t see anything obvious in the Preferences

Is that supposed to happen?

Running txp 4.4.1

Offline

#168 2011-08-15 23:29:47

curiouz
Member
Registered: 2006-06-20
Posts: 56

Re: smd_tags: unlimited article, image, file and link taxonomy

Same here. I’m also running txp 4.4.1 and after sending a zem_contact_reborn form “/?smd_tag=&smd_tagtype=” is added to the url…

Temporary fix: var smd = $('.zemContactForm').attr("action").replace('/?smd_tag=&#38;smd_tagtype=',''); $('.zemContactForm').attr("action", smd);

Last edited by curiouz (2011-08-16 00:30:45)

Offline

Board footer

Powered by FluxBB