Released: KARMA VOTE plugin!

17 years 11 months ago #13032 by lennox
Released: KARMA VOTE plugin! was created by lennox
Post edited by: lennox, at: 2006/05/17 14:56

Post edited by: lennox, at: 2006/05/17 14:57


LENNOX
Official CB 3th Party Developer
Working on the CBRC2 Lennoxonline module
Official partner and PR-man of dcsFlashGames
RELEASED: Highest Karma Module
RELEASED: PROFILE VOTE KARMA PLUGIN


www.nightcity.nl

Attachments:

Please Log in to join the conversation.

17 years 11 months ago #13036 by lennox
Replied by lennox on topic Re:Released: KARMA VOTE plugin!
Mmm, I got a little fight with joomlaboard,
The files don't want to be on it :)

Now, i have created a Blog , the downloads are already in it!

see it:
www.joomlapolis.com/content/view/1074/1/


LENNOX
Official CB 3th Party Developer
Working on the CBRC2 Lennoxonline module
Official partner and PR-man of dcsFlashGames
RELEASED: Highest Karma Module
RELEASED: PROFILE VOTE KARMA PLUGIN


www.nightcity.nl

Please Log in to join the conversation.

17 years 11 months ago #13145 by forty
Replied by forty on topic Re:Released: KARMA VOTE plugin!
When i change code on joomlaboard i have an error

Parse error: parse error in C:\WM\www\components\com_joomlaboard\sb_karma.php on line 86

Please Log in to join the conversation.

17 years 11 months ago #13182 by lennox
Replied by lennox on topic Re:Released: KARMA VOTE plugin!
Thankyou , i must have missed a tiny piece of the replacment code, please check the readme again


LENNOX
Official CB 3th Party Developer
Working on the CBRC2 Lennoxonline module
Official partner and PR-man of dcsFlashGames
RELEASED: Highest Karma Module
RELEASED: PROFILE VOTE KARMA PLUGIN


www.nightcity.nl

Please Log in to join the conversation.

17 years 11 months ago #13185 by denden
Replied by denden on topic Re:Released: KARMA VOTE plugin!
First, I got to this work amazingly, since I'm quite new to PHP. (I used to be a PERL kinda guy!) Anyway, here's what I did to get it to work... This is just temperary, we need to get a one liner javascript to just go to previous address, since karmas in joomlaboard now go to profiles, instead of back to the forum.

Open sb_karma.php
Find the following code starting at line 74...
[code:1] {
if ($do == "increase"«»)
{
$database->setQuery('UPDATE #__sb_users SET karma_time='.$time.' WHERE userid='.$my->id.'');
$database->query();
$database->setQuery('UPDATE #__sb_users SET karma=karma+1 WHERE userid='.$userid.'');
$database->query();
echo _KARMA_INCREASED.'<br /> <a href="'.sefRelToAbs('index.php?option=com_joomlaboard&Itemid='.$Itemid.'&func=view&catid='.$catid.'&id='.$pid).'">'._POST_CLICK.'</a>.';
?>
<script language="javascript">
setTimeout("location='<?php echo sefRelToAbs('index.php?option=com_joomlaboard&Itemid='.$Itemid.'&func=view&catid='.$catid.'&id='.$pid); ?>'",3500);
</script>
<?php
}

else if ($do == "decrease"«»)
{
$database->setQuery('UPDATE #__sb_users SET karma_time='.$time.' WHERE userid='.$my->id.'');
$database->query();
$database->setQuery('UPDATE #__sb_users SET karma=karma-1 WHERE userid='.$userid.'');
$database->query();
echo _KARMA_DECREASED.'<br /> <a href="'.sefRelToAbs('index.php?option=com_joomlaboard&Itemid='.$Itemid.'&func=view&catid='.$catid.'&id='.$pid).'">'._POST_CLICK.'</a>.';
?>
<script language="javascript">
setTimeout("location='<?php echo sefRelToAbs('index.php?option=com_joomlaboard&Itemid='.$Itemid.'&func=view&catid='.$catid.'&id='.$pid); ?>'",3500);
</script>
[/code:1]

And replace with this (for english) Dont forget to replace the 2 instances of YOURDOMAIN.COM with your actual domain name.
[code:1] {
if ($do == "increase"«»)
{
$database->setQuery('UPDATE #__sb_users SET karma_time='.$time.' WHERE userid='.$my->id.'');
$database->query();
$database->setQuery('UPDATE #__sb_users SET karma=karma+1 WHERE userid='.$userid.'');
$database->query();
echo _KARMA_INCREASED.'<br /> <a href=http://YOURDOMAIN.com/component/option,com_comprofiler/task,userProfile/user,'.$userid.'/>[CLICK HERE TO CONTINUE]</A>';
?>

<?php
}

else if ($do == "decrease"«»)
{
$database->setQuery('UPDATE #__sb_users SET karma_time='.$time.' WHERE userid='.$my->id.'');
$database->query();
$database->setQuery('UPDATE #__sb_users SET karma=karma-1 WHERE userid='.$userid.'');
$database->query();
echo _KARMA_DECREASED.'<br /> <a href=http://YOURDOMAIN.com/component/option,com_comprofiler/task,userProfile/user,'.$userid.'/>[CLICK HERE TO CONTINUE]</A>';
?>
[/code:1]
Thanks lennox for doing the hard work. I'm starting to get the hand of this stuff! :) Now to really see if I could hack this up.

Post edited by: denden, at: 2006/05/18 10:50

Post edited by: denden, at: 2006/05/18 10:51

Please Log in to join the conversation.

17 years 11 months ago #13196 by forty
Replied by forty on topic Re:Released: KARMA VOTE plugin!
Its not working again.....i do it local (localhost)

Thats the result....

ihave joomlaboard 1.1.2 stable
and CM 1.0 stable

An invalid post id was requested.
\n

Joomlaboard Forum Component 1.1.2 Stable
Two Shoes M-Factory

Post edited by: forty, at: 2006/05/18 11:40
Attachments:

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.597 seconds

Facebook Twitter LinkedIn