freetag execute without sidebar

Creating and modifying plugins.
_jwc_
Regular
Posts: 27
Joined: Tue Jun 17, 2008 9:51 pm
Contact:

freetag execute without sidebar

Post by _jwc_ »

Hi all,
sorry if I am writing a post that has already written, but I didn't find any information that can help me.

I would like to execute the freetag in a div rather than a table without using the sidebar.

To do it I start in a first moment to modify the side bar trying to force it to display just the freetag plugin:

original sidebar code was this:




{if $is_raw_mode}
<div id="serendipity{$pluginside}SideBar">
{/if}
{foreach from=$plugindata item=item}
{if $item.class == "serendipity_quicksearch_plugin"}{else}
<div class="serendipitySideBarItem container_{$item.class}">
{if $item.title != ""}
<div class="serendipitySideBarTitle {$item.class}">
<div class="roundtop"><img src="{$serendipityBaseURL}templates/bex01/img/bexlt.gif" alt="corner graphic" width="15" height="15" class="corner" style="display: none"/>
<div class="cornertitle">{$item.title}</div>
</div>
</div>
{/if}
<div class="serendipitySideBarContent">{$item.content}</div>
</div>
{/if}
{/foreach}
{if $is_raw_mode}
</div>
{/if}


I thought the code make a foreach to parse every plug in and show the title and the content of each plug in

With the following modify I hoped to show just the freetag plugin but it doesn't work



{if $is_raw_mode}
<div id="serendipity{$pluginside}SideBar">
{/if}
{foreach from=$plugindata item=item}
{if $item.class == "serendipity_quicksearch_plugin"}{else}
<div class="serendipitySideBarItem container_{$item.class}">
{if $item.title == "Tags"} <--------------------------------------------(tags should be the name of the plugin)
<div class="serendipitySideBarTitle {$item.class}">
<div class="roundtop"><img src="{$serendipityBaseURL}templates/bex01/img/bexlt.gif" alt="corner graphic" width="15" height="15" class="corner" style="display: none"/>
<div class="cornertitle">{$item.title}</div>
</div>
</div>
{/if}
<div class="serendipitySideBarContent">{$item.content}</div>
</div>
{/if}
{/foreach}
{if $is_raw_mode}
</div>
{/if}


anyway it still to show each plugin

I also tried to read about smarty function http://www.s9y.org/78.html#A5
but i'm not able to use the API in order to call the freetag plugin.
Do we have a totorial?
Where can I find the name of the plugin in order to use the API?


I really would apreciate your help
Regards
------------
..::JWC::..
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: freetag execute without sidebar

Post by garvinhicking »

Hi!

Do I understand you right: You want to display the content of the freetag sidebar plugin somewhere else than in the sidebar?

To do that, you must follow this:

1. Edit your index.tpl template file. Go to the place in the HTML structure where you want your tag list.

2. Insert a smarty call like this:

Code: Select all

<div class="freetags">
  {serendipity_showPlugin class="serendipity_plugin_freetag" side="hidden"}
</div>
3. Go to your s9y plugin configuration and move the freetag plugin from the left or right sidebar into the "HIDDEN" column. This is to only show your freetag plugin at the place you wanted it, and no longer in the sidebar. If you wanted to have the taglist in BOTH the sidebar AND your custom location, you can leave the plugin, but must change the smarty call above from "side='hidden'" to "side='left'" (or 'right' for that matter).

Best 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/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: freetag execute without sidebar

Post by yellowled »

garvinhicking wrote:

Code: Select all

<div class="freetags">
  {serendipity_showPlugin class="serendipity_plugin_freetag" side="hidden"}
</div>
I haven't actually investigated the docs for this yet, but I have been wondering if there is an option (and if not, if it would be possible to add that option) for this: I'm displaying just the Top 25 tags in the sidebar. Would it be possible to show all tags on another page, i.e. a static page, and link to that page from the sidebar plugin?

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: freetag execute without sidebar

Post by garvinhicking »

Hi YL!

That should be possible if you

- edit the serendipity_plugin_freetag.php file and change stackable from "false" to "true"

- install the sidebar plugin a second time, with different config options. Set that plugin to the hidden side.

- use the showplugin smarty call, and use the ID of the plugin

So the most important step is to install the sidebar plugin multiple times, which by default the freetag plugin does not support. If multiple instances work fine, we could officially modify the plugin...

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/
_jwc_
Regular
Posts: 27
Joined: Tue Jun 17, 2008 9:51 pm
Contact:

Re: freetag execute without sidebar

Post by _jwc_ »

garvinhicking wrote:Hi!

Do I understand you right: You want to display the content of the freetag sidebar plugin somewhere else than in the sidebar?
Hi Garvin,
you are right, i want just show the plugin's contents.

I followed you instruction but probably I wrong something...

I have some questions if you don’t mind.
• Do I leave the sidebar in any part of the page or I can delete it?
• I don’t know the name I should use to call the pluin how can I know it?

I tried different way but any of this worked
The last one was

1)
a. I edited index.tmp
b. Found the place where I want show the plugin and edit the follw code

{serendipity_printSidebar side="right"} ----------------(don’t know if I can delete)
<div class="freetags">
{serendipity_showPlugin class="serendipity_plugin_entrylinks" side="hidden"}
{serendipity_showPlugin class="serendipity_plugin_eventwrapper" side="hidden"}
{serendipity_showPlugin class="serendipity_plugin_history" side="hidden"}
{serendipity_showPlugin class="serendipity_plugin_pollbox" side="hidden"}
{serendipity_showPlugin class="serendipity_plugin_recententries" side="hidden"}
{serendipity_showPlugin class="serendipity_plugin_remoterss" side="hidden"}
{serendipity_showPlugin class="serendipity_plugin_shoutbox" side="hidden"}
{serendipity_showPlugin class="serendipity_plugin_templatedropdown" side="hidden"}
</div>

c. Went in admin and put ALL the plugins in Hidden column

Because I don’t know the name of the plugin I used the name of the folder that contain the plugins
• serendipity_plugin_entrylinks
• serendipity_plugin_eventwrapper
• serendipity_plugin_history
• serendipity_plugin_pollbox
• serendipity_plugin_recententries
• serendipity_plugin_remoterss
• serendipity_plugin_shoutbox
• serendipity_plugin_templatedropdown

I also tried to delete the call at the sidebar but I didn’t found any change.

Don’t know where is the mistake.
Thanks for any help
------------
..::JWC::..
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: freetag execute without sidebar

Post by yellowled »

garvinhicking wrote:If multiple instances work fine, we could officially modify the plugin...
Okay, so if I find some time to test this one of these days, I'll be the guinea pig and report back :)

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: freetag execute without sidebar

Post by garvinhicking »

Hi!
• Do I leave the sidebar in any part of the page or I can delete it?
Well, if you have other sidebar plugins than the freetag plugin, you MUST keep the sidebar call of course. If freetag is the ONLY sidebar plugin you ever want to have, you could have a much easier solution by just putting the {serendipity_printSidebar} call to wherever you want your freetag plugin to appear. But I suppose you have other plugins...
• I don’t know the name I should use to call the pluin how can I know it?
I already wrote it, the name is serendipity_plugin_freetag :)

You should ONLY use the showplugin call for your freetag, I did not tell you to call any other plugins with it. All other plugins are created through the usual printSidebar command which evaluates the plugin_sidebar.tpl

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/
_jwc_
Regular
Posts: 27
Joined: Tue Jun 17, 2008 9:51 pm
Contact:

Post by _jwc_ »

Now it is clearerDo I understood right:
I can just invoke the freetag plugin without sidebar and no other plugins.

I said that the plugin I want display is called freetag because I have seen there is a folder called freetag on my plugin folder, but I am not 100% sure the plugin, used to show tags, is called freetag

When I display it inside the sidebar the title is “tags”
How can I know it?

Thanks,
jwc
------------
..::JWC::..
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Like I wrote, the name is serendipity_plugin_freetag :-D

So, a question for you to make things more precise. Do you want to:

A) Let the freetag plugin be the ONLY PLUGIN displayed on your whole blog?

or

B) Show the other installed sidebar plugins as usual, but show the freetag on a DIFFERENT place than the other plugins.

Best 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/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: freetag execute without sidebar

Post by yellowled »

garvinhicking wrote:That should be possible if you

- edit the serendipity_plugin_freetag.php file and change stackable from "false" to "true"

- install the sidebar plugin a second time, with different config options. Set that plugin to the hidden side.

- use the showplugin smarty call, and use the ID of the plugin
Okay, so I tried this just now, and it actually works - well, kind of :)

My approach was kind of "hackish" since I tried to cover some things the plugin doesn't provide using the template's .tpl files (i.e. adding a link to the full tag cloud static page to the sidebar plugin, which of course also shows up on the full tag cloud static page, so it would have to be hidden there using CSS, and what was I just now ..? Ah.)

My personal bottom line: It works, but it is also way too complicated for the average user to set up. I'm also not sure whether it is actually necessary given the fact that the freetag plugin displays a list of related tags once a tag from the sidebar plugin or entry footer is selected.

In addition to what you stated above, one will also have to:

- set up a special type of staticpage, including a seperate .tpl file to display the full tag cloud

- add that static page with no content (since the content is supposed to be the output of the hidden second instance of the freetag plugin)

- configure both the hidden and visible sidebar plugin to make sure their config options "make sense"

- tweak the sidebar.tpl to display a link to the full tag cloud like I stated above

Even if one completes all these steps, the hidden sidebar plugin is still displayed as if it was sitting in a sidebar, so one would also have to either tweak the sidebar.tpl even more or (much more likely) add some styles to the css to display the hidden sidebar plugin differently in the static page's content.

Bottom line (in my humble opinon): It's not worth the effort :)

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: freetag execute without sidebar

Post by garvinhicking »

Hi!

I personally don't find it too complicated, just a matter of using the API and staticpages API. However, of course I see this as advanced usage.

Do you have propositions about how the process could be made easier?

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/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: freetag execute without sidebar

Post by yellowled »

garvinhicking wrote:I personally don't find it too complicated, just a matter of using the API and staticpages API.
Yeah, well, that might be because you coded the whole damn thing :wink:
garvinhicking wrote:However, of course I see this as advanced usage.
It is, which is why I came to my personal bottom line: I'm guessing most of the average users would already have difficulties in finding the correct plugin id in the database or writing their own .tpl file to display the full tag cloud.
garvinhicking wrote:Do you have propositions about how the process could be made easier?
Well, I guess the easiest way would be if the plugin was able to generate the static page automagically :) That would also eliminate the necessity to generate that page manually, add a second hidden instance of the plugin etc.

As far as I can see, there is always a limit for the number of tags displayed in the sidebar plugin, which makes perfect sense since there is limited space available for any sidebar plugin.

So in an ideal world, the (event) plugin would have an option to generate a single page displaying all tags - ideally not only displaying the "full" output of the sidebar plugin, but a seperate page, ideally even with it's own .tpl file. The sidebar plugin would need another option to include a link to that page.

Another idea would be to somehow include that full tag cloud in the archives page, which I think would be a great place to put it, although I realize that this would probably require changes to the archives plugin as well.

YL
_jwc_
Regular
Posts: 27
Joined: Tue Jun 17, 2008 9:51 pm
Contact:

Post by _jwc_ »


So, a question for you to make things more precise. Do you want to:

A) Let the freetag plugin be the ONLY PLUGIN displayed on your whole blog?

or

B) Show the other installed sidebar plugins as usual, but show the freetag on a DIFFERENT place than the other plugins.
Hi Garvin,
answer is B.

But I don't understand why it doesn't work.
To be more precise I have installed different plugins but any of them is called freetag.

Infact in my plugin administartion page I have one plugin called Tags, and one plugin called "tagging for entries" that should be the freetag if I am not wrong.

Now I have a dubt

using the following code
{serendipity_printSidebar side="hidden"}
{serendipity_showPlugin class="serendipity_plugin_freetag" side="hidden"}

it doesn't happen nothing.

What I would like to do is show the cloud tag in the bottom of the page.

Sorry but I still don't understand why doesn't work

Thanks for any help
------------
..::JWC::..
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You can only install one instance of the freetag sidebar plugin. Thus, the plugin titled "Tags" must be something else you created, most probably a HTML nugget plugin.

This can be disregarded.

The only thing that counts is the "serendipity_plugin_freetag" one.

Do this:

1. Go to your plugin admin. Move the "Tagging entries" SIDEBAR plugin (NOT EVENT PLUGIN!) to the hidden column. Save the plugin layout.

2. Edit your index.tpl template file, use a fresh umodified version where you did not yet mangle with any custom smarty calls or modified things. Now insert this piece of code in the HTML place where you want it:

Code: Select all

<div class="freetags">
  {serendipity_showPlugin class="serendipity_plugin_freetag" side="hidden"}
</div>
LEAVE the {serendipity_printSidebar} where it is. Do not modify that. Do not modify your sidebar.tpl code. Leave it like the untouched original version.

3. Be happy, this should work :)

Best 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/
_jwc_
Regular
Posts: 27
Joined: Tue Jun 17, 2008 9:51 pm
Contact:

Post by _jwc_ »

Be happy, this should work Smile
:roll:
Unfortunately doesn't work.

I will reinstall s9y again and then I will try again.
I don't know, probably there is something set wrong.


At the moment thanks
jwc
------------
..::JWC::..
Post Reply