Popular Entries

Creating and modifying plugins.
Post Reply
BabeSpot
Regular
Posts: 30
Joined: Sun Dec 04, 2005 8:42 pm

Popular Entries

Post by BabeSpot »

Hi Garvin, it's me again ...

I have one question about the "popular entries" plugin. Is it possible to code this plugin in a way that admins can choose to have their entries listed by the number of comments made (like it is now), but also have an option to list them by the amount of entry exits?

Regards, Michel
My Serendipity: BabeSpot !
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Popular Entries

Post by garvinhicking »

Yeah, that's possible. Just committed the new version!

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/
BabeSpot
Regular
Posts: 30
Joined: Sun Dec 04, 2005 8:42 pm

Post by BabeSpot »

Hi Garvin,

Where can I actually find it? I've searched myself a headache... :D
My Serendipity: BabeSpot !
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

It's here: http://cvs.sourceforge.net/viewcvs.py/p ... arentries/

(Should be fetchable via Spartacus, though)

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/
BabeSpot
Regular
Posts: 30
Joined: Sun Dec 04, 2005 8:42 pm

Post by BabeSpot »

Thx Garvin! It was indeed fetched in Spartacus...

I have one question; what part of the plugin do I have to edit so that the numbers of hits won't appear behind the links in the side-bar? I noticed that I had to go into the includes.inc.php to remove those numbers behind the top-exits in the side-bar, but I can't find where I have to remove the exits number now.

When I used this plugin before (so in order by most commented), the numbers didn't show up. But since I decided to show them in order of most exited entries the number is there again...

Thx in advance... You're really very helpfull and willing to help in this community...

Regards, Michel
My Serendipity: BabeSpot !
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

You can remove those numbers by editing the plugin file in plugins/serendipity_plugin_popularentries/serendipity_plugin_popularentries.php

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/
BabeSpot
Regular
Posts: 30
Joined: Sun Dec 04, 2005 8:42 pm

Post by BabeSpot »

Thx Garvin, I knew that it should be in that file but everytime I change this, my sidebar gives me an error...

I think I have to change line 194/195:

Code: Select all

        echo '<a href="' . $entryLink . '" title="' . htmlspecialchars($entry['title']) . '">' . $entry['title'] . '</a><br />';
                echo '<div class="serendipitySideBarDate">(' . (!empty($entry['points']) ? htmlspecialchars($entry['points']) : 0) . ')</div>';
But can you tell me how? :D

Thanks !
My Serendipity: BabeSpot !
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Replace it with this:

Code: Select all

        echo '<a href="' . $entryLink . '" title="' . htmlspecialchars($entry['title']) . '">' . $entry['title'] . '</a><br />';
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/
BabeSpot
Regular
Posts: 30
Joined: Sun Dec 04, 2005 8:42 pm

Post by BabeSpot »

Yup... that's it ! Thanks a lot again !
My Serendipity: BabeSpot !
Post Reply