Page 7 of 7

Posted: Thu Jan 31, 2008 8:42 pm
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

Posted: Thu Jan 31, 2008 9:08 pm
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

Posted: Fri Feb 01, 2008 12:44 am
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

Posted: Fri Feb 01, 2008 5:15 pm
by judebert
Excellent, I'll give that a shot.

I expect to finish this soon; possibly before the weekend.

Posted: Mon Feb 11, 2008 4:49 am
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.

Posted: Fri Feb 15, 2008 6:13 am
by Don Chambers
And for more images, be sure to see this forum entry: http://board.s9y.org/viewtopic.php?t=12300

Posted: Fri Feb 15, 2008 9:44 am
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

Posted: Fri Feb 15, 2008 7:05 pm
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!

Posted: Sat Feb 16, 2008 1:38 pm
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

Posted: Sat Feb 16, 2008 2:59 pm
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

Posted: Sat Feb 16, 2008 5:14 pm
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

Enahncement wishes

Posted: Sun Feb 17, 2008 5:34 pm
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.

Re: Enahncement wishes

Posted: Mon Feb 18, 2008 7:47 pm
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.

Re: Enahncement wishes

Posted: Fri Mar 18, 2011 11:26 pm
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.