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