I need a voting plugin, will pay

Creating and modifying plugins.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

But when I vote

http://judebert.com/wasted_youth/index. ... ma_vote204

I *do* get back to the extended article page?

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/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Yes, but that's expected, because it's not permalinked. It's in archives/.

Try this page instead:
http://judebert.com/wasted_youth/permal ... ating.html
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Ah, you meant "Custom Permalinks" using the plugin.

Are you already using the version I updated yesterday? Actually I believe the fix I applied will also fix your problem.

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/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Excellent, I'll give that a shot.

I expect to finish this soon; possibly before the weekend.
Judebert
---
Website | Wishlist | PayPal
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

One week later...

It's done! I checked it in this evening. There is a nice explanation of the improved Karma Plugin on my website.
Judebert
---
Website | Wishlist | PayPal
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

And for more images, be sure to see this forum entry: http://board.s9y.org/viewtopic.php?t=12300
=Don=
gregman
Regular
Posts: 91
Joined: Wed Aug 15, 2007 9:32 pm

Post by gregman »

AWESOME, GUYS!

I just installed the new plugin and I am speechless!

Just some few suggestions:

Code: Select all

        @define('PLUGIN_KARMA_IMAGE_NONE_RATING', 'keine');
        @define('PLUGIN_KARMA_TAB_OPTIONS', 'Optionen');
        @define('PLUGIN_KARMA_TAB_APPEARANCE', 'Aussehen');
        @define('PLUGIN_KARMA_TAB_TEXT', 'Text');
was missing in the german language files.

Further I experienced some problems with word rating switched on. The word-rating doesn't match to a negative given vote. This probably is caused by the integer converting (e.g. integer of -2 + 0.5 = - 1!). Therefore I removed this line and switched the following code to

Code: Select all

            if ($rating < -1.5) {
                $rating = PLUGIN_KARMA_VOTEPOINT_1;
            } elseif ($rating < -0.5) {
                $rating = PLUGIN_KARMA_VOTEPOINT_2;
            } elseif ($rating < 0.5) {
                $rating = PLUGIN_KARMA_VOTEPOINT_3;
            } elseif ($rating < 1.5) {
                $rating = PLUGIN_KARMA_VOTEPOINT_4;
            } else {
                $rating = PLUGIN_KARMA_VOTEPOINT_5;
            }
Greg
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Ah, good idea. (I guess I never had any entries rated below "Okay". :)) No need to truncate to an integer. Why didn't I think of that?

I'll have that checked in about 10 minutes from now.

And thanks! You contributed the impetus to get this moving; I'm glad you're impressed with the result!
Judebert
---
Website | Wishlist | PayPal
gregman
Regular
Posts: 91
Joined: Wed Aug 15, 2007 9:32 pm

Post by gregman »

I just thought about the problem with the custom permalink plugin. Wouldn't it help to use $_SERVER['REQUEST_URI'] on every entry with an .htm/l ending, e.g.

Code: Select all

if (stristr($_SERVER['REQUEST_URI'], ".htm")) {
    $url = $_SERVER['REQUEST_URI'] . '?';
} else {
    $url = serendipity_currentURL() . '&';
}
It works fine on my installation.

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

Post by garvinhicking »

Hi!

That would create trouble on servers without URL rewriting cause it would then use index.php?/archives/permalink.htm?blabla with two "?"s.

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/
gregman
Regular
Posts: 91
Joined: Wed Aug 15, 2007 9:32 pm

Post by gregman »

Ah, I see. Well then, how about:

Code: Select all

if (stristr($_SERVER['REQUEST_URI'], "index.php?")) {
    $url = serendipity_currentURL() . '&';
} else {
    $url = $_SERVER['REQUEST_URI'] . '?';
}
Greg
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Enahncement wishes

Post by blog.brockha.us »

I would like to see some enhancements in the plugin:

* It would be nice to have the voting implemented as AJAX calls, so we don't have to reload the page for this.
* An option to disable the page call counter, if the visitor is just voting, proviewing or comitting a comment.

Is there something we can do about it?

About the German language files: I already changed them in the cvs. It seems my last changes didn't reach judebert, so they didn't made it into the cvs.
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: Enahncement wishes

Post by judebert »

blog.brockha.us wrote:* It would be nice to have the voting implemented as AJAX calls, so we don't have to reload the page for this.
I'll look into it and see what I can do.
blog.brockha.us wrote:* An option to disable the page call counter, if the visitor is just voting, proviewing or comitting a comment.
An interesting idea. It should be possible: just check for the appropriate fields and refuse to increment the visit counter if they're present.
blog.brockha.us wrote:About the German language files: I already changed them in the cvs. It seems my last changes didn't reach judebert, so they didn't made it into the cvs.
I thought I included those. If you send them again, I'll be happy to re-commit them.
Judebert
---
Website | Wishlist | PayPal
gregman
Regular
Posts: 91
Joined: Wed Aug 15, 2007 9:32 pm

Re: Enahncement wishes

Post by gregman »

blog.brockha.us wrote:* It would be nice to have the voting implemented as AJAX calls, so we don't have to reload the page for this.
I recently managed to do this using jquery but the "ajax call" feature only supports imagevoting and no voting timeouts. If it seems to be of use anyhow let me know. I will share some code.
Post Reply