feature-request freeTag: page with all tags

Creating and modifying plugins.
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

feature-request freeTag: page with all tags

Post by stm999999999 »

hello,

at the moment you can display the used tags on the sidebar - but space on sidebar is scarce; so you can and have to limitate the amount of displayed tags.

My wish: to have a "more ..." on the bottom of the sidebar-plugin that links to a page with all the used tags, displayed in the body of the blog (like an article or a static page)! Best with the same (but independant!) options of displaying like on the sidebar: list / cloud and "same size" / "weighted size."
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: feature-request freeTag: page with all tags

Post by garvinhicking »

Hi!

Very good feature suggestion, I'd like that. In fact it's a very, very good task for someone who wants to have a go at the plugin API, this would not be too hard. I could try to help along the way, of course.

Basic steps to be taken:

1. Copy the configuration options that you need from the sidebar plugin to the event plugin

2. In the event plugin, add a hook for the 'entry_display' logic. Add code like:

Code: Select all

if ($serendipity['GET']['subpage'] == 'taglist') {
    $eventData['clean_page'] => true;
}
3. In the event plugin, add a hook for the 'entries_header' logik by using the output of the sidebarpls plugin "generate_content()" functionality. Add code like:

Code: Select all

if ($serendipity['GET']['subpage'] == 'taglist') {
// Code from sidebar plugin for taglisting here
}
And that would be it, already. Then you could patch up the sidebar plugin to adda link to index.php?serendipity[subpage]=taglist.

BTW, you can already achieve what you want by using Smarty {serendipity_showPlugin} functionality. Set the sidebar plugin to hidden and call it in a staticpage by using the smartymarkup plugin, so that you call the showPlugin method in that staticpage. Then you can even have a custom permalink for it.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
konus
Regular
Posts: 334
Joined: Mon Jun 16, 2008 1:57 pm
Location: Dresden, Germany
Contact:

Post by konus »

Any updates on this issue? How did you solve your problem stm999999999?
Christine
Regular
Posts: 54
Joined: Wed Mar 25, 2009 11:50 pm

Re: feature-request freeTag: page with all tags

Post by Christine »

Was anything like this ever implemented? I'd love this feature.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: feature-request freeTag: page with all tags

Post by Timbalu »

Beside building an extra plugin for this case (and we don't have that yet, AFAIK)...

Why should you want to have that...?
You can use

Code: Select all

{serendipity_showPlugin class="serendipity_plugin_freetag"}
in an entries_archives.tpl, or even staticpage, for example. And you have the related tags (cloud). Why would you need all tags then, which is not better a "sitemap"?

Always have in mind: Tagging can influence your sites performance, so better use with care!
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Christine
Regular
Posts: 54
Joined: Wed Mar 25, 2009 11:50 pm

Re: feature-request freeTag: page with all tags

Post by Christine »

Timbalu wrote:Why should you want to have that...?
Because I'd like to have a smaller list in the sidebar by tag count, only featuring a few of the most used ones and not taking up too much of the sidebar, and then if someone wants to find less used tags, there's a page full tag list sorted alphabetically. This is something I'd like on a site, and I think it's pretty different to a site map.

Thanks, knowing I could put this in a static page helped. I ended up using the solution suggested here: http://board.s9y.org/viewtopic.php?p=75116 and it's exactly what I need. :)

ETA: The above works, but for some reason, despite putting the extra tag plugin in the hidden section, setting side="hidden" shows nothing. I had to use side="right" negate="true" to get it to display :?.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: feature-request freeTag: page with all tags

Post by Timbalu »

Christine wrote:I ended up using the solution
Which is using the plugin stackable and set this instance to show "all" Tags? eg

Code: Select all

{serendipity_showPlugin id="serendipity_plugin_freetag:21323223efsd22aa" side="right" negate="true"}
:?:
Christine wrote:setting side="hidden" shows nothing. I had to use side="right" negate="true" to get it to display
It is

Code: Select all

side="hide"
not "hidden"! And this only, if you have moved your freetag sidebar plugin into the "hidden" sidebar section in your backend sidebar plugin list page. Then the normal plugin output is disabled, while being "hidden", but the plugin itself still being active, which can be accessed by

Code: Select all

{serendipity_showPlugin class="serendipity_plugin_freetag" side="hide"}
Btw

Code: Select all

{serendipity_showPlugin class="serendipity_plugin_freetag"}
is the same as

Code: Select all

{serendipity_showPlugin class="serendipity_plugin_freetag" side="*"}
And what exactly does the

Code: Select all

 negate="true"
change for you?

I am asking this, while I think this could be a very old bug in the API, expecting boolean or null but getting strings all the time. And additionally "negate" should only work if side is not "*"!

Another BTW with Announcement
I have an extended freetag Developer Edition which is available here and might be worth testing this too.
https://github.com/ophian/serendipity_e ... g/releases
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Christine
Regular
Posts: 54
Joined: Wed Mar 25, 2009 11:50 pm

Re: feature-request freeTag: page with all tags

Post by Christine »

Timbalu wrote:Which is using the plugin stackable and set this instance to show "all" Tags?
Yep, exactly.
Timbalu wrote:It is

Code: Select all

side="hide"
not "hidden"! And this only, if you have moved your freetag sidebar plugin into the "hidden" sidebar section in your backend sidebar plugin list page.
Ah, thanks, 'hide' worked. Is this documented anywhere? Almost all the references on the board say it's side="hidden". And yes, I had placed it in the hidden sidebar.
Timbalu wrote:And what exactly does the

Code: Select all

 negate="true"
change for you?
Well there was one instance of the tag plugin in the right sidebar, which was a limited number sorted by Tag count, and one in the hidden sidebar, which was all tags sorted alphabetically. When I had the code as side="right" negate="true", it would show only the hidden one, so that was my workaround before I just tried side="hide".
Timbalu wrote: I have an extended freetag Developer Edition which is available here and might be worth testing this too.
https://github.com/ophian/serendipity_e ... g/releases
OK, thanks, I'll try that out. The pic of the cloud looks cool.

By the way, one thing I find lacking in the current freetag - and I'm not sure yet if the developer edition has changed this - is not being able to choose the direction to sort tags, especially for tag count. It didn't make sense for me to have the least used tags first when sorting by tag count, so I changed it in the plugin. But it would be great to have that option in the configuration options.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: feature-request freeTag: page with all tags

Post by Timbalu »

Christine wrote:Ah, thanks, 'hide' worked. Is this documented anywhere? Almost all the references on the board say it's side="hidden".
Yes it is a typo in the documentary. We are working on it and will try to remember changing things like this.
Christine wrote:The pic of the cloud looks cool.
Yeah, I like it too. It is my favourite build-in modern (flash replacing) 2D-Canvas tool! ;-)
Christine wrote:By the way, one thing I find lacking in the current freetag - and I'm not sure yet if the developer edition has changed this - is not being able to choose the direction to sort tags, especially for tag count. It didn't make sense for me to have the least used tags first when sorting by tag count, so I changed it in the plugin. But it would be great to have that option in the configuration options.
Yes, please check that up. I currently do not remember where this influences any output, but if you give me a hint, I'll see what I can do about it the next days.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Christine
Regular
Posts: 54
Joined: Wed Mar 25, 2009 11:50 pm

Re: feature-request freeTag: page with all tags

Post by Christine »

I tried this out and loved the tag cloud effect in action.

I did not see any option to sort ascending or descending. The way I have gotten what I need for now (in 3.66) is just changing asort to arsort in the plugin.

There was one issue with the new one. I tried to set it up similar to my setup of 3.66, with one instance in the sidebar and one hidden instance I call on a separate page. If I had a cloud on the page and a list in the sidebar, there was no line break after each tag in the sidebar, no matter what I set in that instance. I can't remember exactly right now but I think this problem persisted even after I turned off the cloud in the other instance.

I could test it some more if there's a way to install it alongside 3.66. I had to uninstall 3.66 to try it out and don't want to do that again.

One more question, is there a way to remove /plugin from the tag URL? I'd like to have the URL as just /tag.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: feature-request freeTag: page with all tags

Post by Timbalu »

Christine wrote:One more question, is there a way to remove /plugin from the tag URL? I'd like to have the URL as just /tag.
No. This is the same sort of issue as before. Serendipity needs to get a unique path part to know what to do. In this case: check into the plugins 'external_plugin' hook.
Christine wrote:I could test it some more if there's a way to install it alongside 3.66. I had to uninstall 3.66 to try it out and don't want to do that again.
This is a drop-in replacement upgrade.

About the line break issue, I need an example to see for myself.

Edit: [
Christine wrote:.. with one instance in the sidebar and one hidden instance I call on a separate page ...
Which probably isn't meant using the plugin stackable, which should not be possible.
]
Christine wrote:I did not see any option to sort ascending or descending. The way I have gotten what I need for now (in 3.66) is just changing asort to arsort in the plugin.
I see. You mean the list in the freetag sidebar plugin with the option order_by to "total by count".
I will add a new config option for desc sort.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: feature-request freeTag: page with all tags

Post by Timbalu »

I updated the plugin to support the descending sort option now.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply