install plugin showentries twice: howto?

Creating and modifying plugins.
Post Reply
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

install plugin showentries twice: howto?

Post by snafu »

hi dear users and developers!

i'd like to install the serendipity_plugin_showentries twice, to have two "moblog" areas in my project.

what do i have to do, to have the plugin twice like it is possible with the html-nugget?

thank you for answering!
snafu

it's for our new online - newspaper: http://kassel-zeitung.de/cms1/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: install plugin showentries twice: howto?

Post by garvinhicking »

Hi!

Yes, you can use that exactly like the HTML nugget plugin. Just install it again and again and again. :)

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/
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

Re: install plugin showentries twice: howto?

Post by snafu »

good morning garvin!

sorry, but in spartacus i see "Already installed", and i can't activate any download at all. yesterday i thought for copying the serendipity_plugin_showentries directory and renaming it and some of the names inside ..? do i have to do this?

maybe i'm totally wrong...

btw: i failed in serendipity_plugin_showentries plugin also trying to have TWO categories printed through this plugin: only the first one would appear in the sidebar. (i separated the id's with ; as it was said)

thanks in advance!
snafu
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: install plugin showentries twice: howto?

Post by garvinhicking »

Hi Snafu!

Oh, I'm sorry. Indeed it was a plugin bug. I had to add

Code: Select all

$propbag->add('stackable', true);
to the introspect method of the plugin. Just fixed in CVS.
btw: i failed in serendipity_plugin_showentries plugin also trying to have TWO categories printed through this plugin: only the first one would appear in the sidebar. (i separated the id's with ; as it was said)
Which s9y version are you using?

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/
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

Re: install plugin showentries twice: howto?

Post by snafu »

garvinhicking wrote:Hi Snafu!
Just fixed in CVS.
fine, i'll try it out at home (have to del. the plugin from server, otherwise spartacus wont load it from cvs)

garvinhicking wrote: Which s9y version are you using?
of course the shiny 1.0 :-)
(update was a matter of minutes watching files get ftped, and then one click - fine!)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: install plugin showentries twice: howto?

Post by garvinhicking »

Hi!

About the multi-cat thing - could you show me a screenshot of how you configured the plugin, or tell me your config values exactly?

Then I could try to reproduce 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/
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

Re: install plugin showentries twice: howto?

Post by snafu »

garvinhicking wrote:Hi!
About the multi-cat thing - could you show me a screenshot of how you configured the plugin
jepp:

Image

if i swap the categories, i see that the first one gets displayed, the other one is omitted.

all cat. hold entries, and i changed the cat. index numbers with the same effect
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: install plugin showentries twice: howto?

Post by garvinhicking »

Hi!

Hm, basically the code there should work. Could you please try this:

Edit your include/functions_entries.inc.php file. At around line 377 you should see this:

Code: Select all

    if (is_string($ret)) {
        die("Query failed: $ret");
    }
change this to:

Code: Select all

    if (is_string($ret)) {
        die("Query failed: $ret");
    } else {
        echo "Used query:<pre>" . print_r($query, true) . "</pre><br />\n";
    }
This will outout the used SQL query for fetching entries. Please tell me the one next to your sidebar showentries plugin, so that I can see if the "14" and "3" IDs are in there.

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/
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

Re: install plugin showentries twice: howto?

Post by snafu »

hi garvin,
Edit your include/functions_entries.inc.php file.
then i see the select command below.

the plugin over showentries is archive, the one below a html nugget

snafu ... (just waiting for testing here, afterwards i will load the plugin new from cvs)




---------------

SELECT
e.isdraft AS orderkey,

e.id,
e.title,
e.timestamp,
e.comments,
e.exflag,
e.authorid,
e.trackbacks,
e.isdraft,
e.allow_comments,
e.last_modified,

a.realname AS author,
a.email
, e.body, e.extended

FROM
kasselzeitung_entries AS e
LEFT JOIN kasselzeitung_authors a
ON e.authorid = a.authorid
LEFT JOIN kasselzeitung_entrycat ec
ON e.id = ec.entryid
LEFT JOIN kasselzeitung_category c
ON ec.categoryid = c.categoryid
LEFT OUTER JOIN kasselzeitung_entryproperties ep_access
ON (e.id = ep_access.entryid AND ep_access.property = 'ep_access')
WHERE isdraft = 'false' AND (( (c.category_left BETWEEN 23 AND 24))) AND e.timestamp <= 1150743715 AND (ep_access.property IS NULL OR ep_access.value = 'public')
GROUP BY e.id
ORDER BY orderkey DESC, timestamp DESC
LIMIT 0, 15
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: install plugin showentries twice: howto?

Post by garvinhicking »

Hi!

Hhhm, this query is a bit strange. It lists the "left" ids BETWEEN 23 and 24.

Could you show me a screenshot or dump of your serendipity_categories DB table?

Are you viewing the nugget plugin on your startpage, or when you're already in some category subpage?

Are you using specific event plugins like the startcat or hidecat 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/
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

Re: install plugin showentries twice: howto?

Post by snafu »

hi garvin,

now as the plugin is stackable, i succeeded in having two separate columns with categories.

i will try your suggestions and support the requested informations in an testsystem, as i won't wreck my "production" system by poking around too much :-)
(i know me well ) ...
Post Reply