Additional information plugin (static and dynamic)

Creating and modifying plugins.
Post Reply
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Additional information plugin (static and dynamic)

Post by danst0 »

Hi,

I don't know if there is a name for it but I did not find any plugin which fits my requirements:
I am regularly reviewing scientific articles in my blog. Right now I always link the authors name to their individual home page.
Plugin I am looking for:
- I want to have an intermediary page on my server for each author from whom I reviewed a paper
- This page may be accessible like domain.com/author-name/
- On this page I would like to have static content (like picture and web address)
- And I would like to have dynamic content, namely the links to the articles I reviewed from this author.

So my question(s):
Is there already a plugin for that?
Could I use static pages (but how to include the dynamic content)?
Any other suggestions?

Thank you,

Daniel
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Additional information plugin (static and dynamic)

Post by yellowled »

danst0 wrote:Could I use static pages (but how to include the dynamic content)?
Yes, by using the static page type "static page with related category". Each author would need to have his own category. You can then emit articles from that category on that particular static page.

YL
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Additional information plugin (static and dynamic)

Post by danst0 »

Ok, that's a nice function!
My categories are by topic right now, but I could add categories for the authors as well.

One problem is, that I then had to assign multiple categories to one entry (the topic, and for some articles by multiple authors all the authors categories).
Is this possible?

Or is there a way to use this function using tags?

Daniel
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Additional information plugin (static and dynamic)

Post by Don Chambers »

There is an event plugin "Category Assignment" that allows you to assign an entry to multiple categories.
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Additional information plugin (static and dynamic)

Post by garvinhicking »

Don Chambers wrote:There is an event plugin "Category Assignment" that allows you to assign an entry to multiple categories.
Also, you can always assign an entry to multiple categories simply by clicking the "+" icon next to the category dropdown, which transforms it to a multiselect. The event plugin is only meant for people who want to assign multiple categories to multple entries in one go.

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/
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Additional information plugin (static and dynamic)

Post by danst0 »

Great, now I am able to assign multiple categories. And I have the possibility to have them in the sidebar using the category plugin.
Since the goal is to combine static (information about the author,...) and dynamic (link list to my summaries) content, this does not seem to be the best solution.

Ok so I could use the static-page-sidebar-plugin, but I already use one for navigation purposes and I don't seem to be able to have multiple static page sidebar plugins with differing content?

Is there a way to have two separate static-page-sidebar-plugins or another solution?

Daniel

ps. What effect has the "related static-page" reference in the category properties window?
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Additional information plugin (static and dynamic)

Post by danst0 »

Ok, I finally decided that I will not be able to maintain static pages for all authors, especially since I realized that I have a more pressing problem:

As described above I would like to add basically a third categorization (for the authors I write about) to my articles (beside "categories" and "tags"). Using the existing functions of neither of those does not seem to be enough, since I had to add about 150 author names to one of them. But you do not want to have 150 additional tags or categories mixed with your usual topic related lists.

So my question is: Is it somehow possible (potentially using programming) to add a another tag to each entry which is administered and stored in a different place than the standard tags?
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Additional information plugin (static and dynamic)

Post by Don Chambers »

danst0 wrote:So my question is: Is it somehow possible (potentially using programming) to add a another tag to each entry which is administered and stored in a different place than the standard tags?
How about using an extended property field?
=Don=
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Additional information plugin (static and dynamic)

Post by danst0 »

I now decided to duplicate the freetag plugin. I renamed everything within the php files related to the "old" free tag plugin.
Up to now I am able to assign separate tags (author tags) to each entry, related entries are automatically filtered.
But I am having problems with the backend tag management. It seems that my new author tag plugin overwrites the Manage Tags Link in the admin environment, so I only have one link and not two as I expected...

Could someone please tell me how these plugin management links (in the backend) are registered? Do they have a separate ID, that I did not rename?

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

Re: Additional information plugin (static and dynamic)

Post by garvinhicking »

Hi!

Wow. :)

I don't think this is going to work; the freetag plugin registers too many variables that are distinct and will interfer with each other if you clone a plugin like that.

Instead I would maybe suggest to use tags like "-interal", so prefix all internal tags with a "-" in front of it. Then you could patch the places where tags are shown to hide any tag that has "-" in front of it (template display and the sidebar comes to my mind - maybe this can even be solved with smarty templating syntax only).

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/
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Additional information plugin (static and dynamic)

Post by danst0 »

Sounds good, I renamed all varibles I could find, but there still were some glitches.

Where can I learn more about Smarties? :-)

I found information about the smarty variables and a short paragraph on using smarty and php. What I needed would be some string handling capabilities to filter the tags starting with "-"

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

Re: Additional information plugin (static and dynamic)

Post by garvinhicking »

Hi!

Smarty is well documented on http://smarty.net. What you basically need is to edit your template's config.inc.php and disable the security mode ($serendipity['smarty']->security = false) and then you can also use any PHP command in your IF structures:

Code: Select all

{if preg_match('@-internal', $tagname)}
<!--hide tag-->
{else}
{$tagname}
{/if}
something like that...

HTH,
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/
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Additional information plugin (static and dynamic)

Post by danst0 »

Thanks!
Post Reply