Page 1 of 1

display plugins in static page

Posted: Mon May 08, 2006 4:52 am
by Yukari
I'd like to know how I can display a plugin in a static page...

what i'd like to do is to show the Statistics I can see in the admin in a static page, and also the plugins to display top refereers...

I read the thread for pulling plugins out of the sidebar but he wants to display in the frontpage so it didn't really help...

if someone can help me, i'd appreciate a lot.
thanks

Re: display plugins in static page

Posted: Mon May 08, 2006 12:15 pm
by garvinhicking
Hi!

You actually can't do this without some coding skills.

There are two ways to achieve that. The one is to create yourself a Smarty function that retrieves and shows the data, then you install the "serendipity_event_smartymarkup" plugin which can be applied to static page contents. By creating a custom smarty function, you could call it via "{my_custom_function var="xxx"}".

In the case of just fetching the statistics output, you don'T need to create your own custom smarty function; it suffices to install that smartymarkup plugin and use this code in your plugin:

Code: Select all

{serendipity_hookPlugin hook="backend_sidebar_entries_event_display_statistics" hookAll=true}
(Read http://www.s9y.org/78.html for details)

The second way is to create an event plugin, or modify the statistics even plugin to show it's data on a specific event hook.

HTH,
Garvin

Posted: Tue May 09, 2006 6:10 am
by Yukari
thank ya so much.
I'll try it out. :P