News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Advanced Reputation System

Started by Fustrate, March 25, 2008, 12:51:10 PM

Previous topic - Next topic

darkacex


khamseen

Hey Yoda. Me again... I'm actually having the exact same problem as Glennk. I ran the short test you told him to and got the Monty Python quote too. And when I check the database files, the comments are there too just not being displayed.
"In hope we find despair and in despair we find truth." - Myself

digger


xPreatorianx

How do I add this mod to a custom theme? I have no idea where to even start!

The custom theme is XD-ZEDA

Darthemis

I'm sorry I couldnt read the whole topic, so I apologize if someone answered this yet:

My problem is that there's no way to send reputation. I installed the mod and applaud and smite labels completely disappeared and I'm still wondering why...

I read in the second page of the topic about someone who had the same problem and fixed it with some stuff about member's permissions... I'm afraid that didn't work for me, even administrators can´t...

Thank u very much, I'll be so pleased if someone could help me.

digger

Quote from: glennk on November 14, 2008, 08:20:38 AM
Still not working Yoda. As you can see the comment area is blank but I did leave a comment. Can you think of anything that would be causing this ??



Thanks again - Glenn

Modify install.xml and reinstall mod

find

while ($row = $smcFunc['db_fetch_assoc']($request))
{
loadMemberData($row['id_executor']);
loadMemberContext($row['id_executor'], false);

$context['member']['karma_received'][] = array(
'action_type' => $row['action_type'],
'executor' => $memberContext[$row['id_executor']]['link'],
'time' => timeformat($row['log_time']),
'comment' => parsesmileys($row['comment']),
'topic_href' => $row['topic'] . '.msg' . $row['message'] . '#msg' . $row['message'],
'topic_title' => $row['title'],
'delete_value' => $row['id_target'] . '|' . $row['id_executor'] . '|' . $row['log_time'],
);
}

replace with

while ($row = $smcFunc['db_fetch_assoc']($request))
{
loadMemberData($row['id_executor']);
loadMemberContext($row['id_executor'], false);
                        parseSmileys($row['comment']);
$context['member']['karma_received'][] = array(
'action_type' => $row['action_type'],
'executor' => $memberContext[$row['id_executor']]['link'],
'time' => timeformat($row['log_time']),
'comment' => $row['comment'],
'topic_href' => $row['topic'] . '.msg' . $row['message'] . '#msg' . $row['message'],
'topic_title' => $row['title'],
'delete_value' => $row['id_target'] . '|' . $row['id_executor'] . '|' . $row['log_time'],
);
}


find

while ($row = $smcFunc['db_fetch_assoc']($request))
{
loadMemberData($row['id_target']);
loadMemberContext($row['id_target'], false);

$context['member']['karma_sent'][] = array(
'action_type' => $row['action_type'],
'target' => $memberContext[$row['id_target']]['link'],
'time' => timeformat($row['log_time']),
'comment' => parsesmileys($row['comment']),
'topic_href' => $row['topic'] . '.msg' . $row['message'] . '#msg' . $row['message'],
'topic_title' => $row['title'],
'delete_value' => $row['id_target'] . '|' . $row['id_executor'] . '|' . $row['log_time'],
);
}

replace with

while ($row = $smcFunc['db_fetch_assoc']($request))
{
loadMemberData($row['id_target']);
loadMemberContext($row['id_target'], false);
                        parseSmileys($row['comment']);
$context['member']['karma_sent'][] = array(
'action_type' => $row['action_type'],
'target' => $memberContext[$row['id_target']]['link'],
'time' => timeformat($row['log_time']),
'comment' => $row['comment'],
'topic_href' => $row['topic'] . '.msg' . $row['message'] . '#msg' . $row['message'],
'topic_title' => $row['title'],
'delete_value' => $row['id_target'] . '|' . $row['id_executor'] . '|' . $row['log_time'],
);
}


Fustrate

Ah, I had no clue that I had inserted the parsesmileys into the actual release - I thought it had been just for the one I gave to Bigguy.

Props to you, digger ;)
Steven Hoffman
Former Team Member, 2009-2012

digger

Quote from: YodaOfDarkness on November 24, 2008, 07:32:37 PM
Ah, I had no clue that I had inserted the parsesmileys into the actual release - I thought it had been just for the one I gave to Bigguy.

Props to you, digger ;)

parseSmileys function don't return any result.
It can't be used like $txt = parsesmileys($txt);

Fustrate

Ya, I had already changed that for the next version, but I didn't realize that it was in the current release. I'm gonna download it as-is, change those lines, and reupload it (without any of the new things I've added but not tested yet)
Steven Hoffman
Former Team Member, 2009-2012

unik63

I'm trying to install this mod on 2.0 beta 4, since i'm a newbie, i'm using automatic install. When i run it, it gives an error:


8. Execute Modification ./Sources/Display.php Test failed
  1. Add After ./Sources/Display.php Test successful
  2. Replace ./Sources/Display.php Test failed
  3. Add After ./Sources/Display.php Test successful




When you open the error file, it shows:

Find [Select]
      $messages_request = $smcFunc['db_query']('', '
         SELECT
            id_msg, icon, subject, poster_time, poster_ip, id_member, modified_time, modified_name, body,
            smileys_enabled, poster_name, poster_email, approved,
            id_msg_modified < {int:new_from} AS is_read
         FROM {db_prefix}messages
         WHERE id_msg IN ({array_int:message_list})
         ORDER BY id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),
         array(
            'message_list' => $messages,
            'new_from' => $topicinfo['new_from'],
         )
      );Replace [Select]
      $messages_request = $smcFunc['db_query']('', '
         SELECT
            m.id [nofollow]_msg, m.icon, m.subject, m.poster_time, m.poster_ip, m.id [nofollow]_member, m.modified_time, m.modified_name, m.body,
            m.smileys_enabled, m.poster_name, m.poster_email, m.approved,
            m.id [nofollow]_msg_modified < {int:new_from} AS is_read, k.message AS is_repped
         FROM {db_prefix}messages AS m
            LEFT JOIN {db_prefix}log_karma AS k ON (k.message = m.id [nofollow]_msg AND k.id [nofollow]_executor = {int:current_member})
         WHERE m.id [nofollow]_msg IN ({array_int:message_list})
         ORDER BY m.id [nofollow]_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),
         array(
            'message_list' => $messages,
            'new_from' => $topicinfo['new_from'],
            'current_member' => $user_info['id'],
         )

I would really love to install this mod, please tell me what should i do.
Thanks

Fustrate

After you install it, you'll need to open /Sources/Display.php and find what's in the first box, and replace it with what's in the second box.
Steven Hoffman
Former Team Member, 2009-2012

unik63

It means I can go ahead and install it even it will be installed with the error, and then just replace the codding.

Your help appreciated.

unik63

I found these lines and it says:
$messages_request = $smcFunc['db_query']('', '
         SELECT
            id_msg, icon, subject, poster_time, poster_ip, id_member, modified_time, modified_name, body,
            smileys_enabled, poster_name, poster_email, approved,
            '.($board_info['thank_you_post_enable'] && allowedTo('thank_you_post_show') ? 'thank_you_post, thank_you_post_counter,' : '').'
            id_msg_modified < {int:new_from} AS is_read
         FROM {db_prefix}messages
         WHERE id_msg IN ({array_int:message_list})
         ORDER BY id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),
         array(
            'message_list' => $messages,
            'new_from' => $topicinfo['new_from'],
         )
      );

I have installed Thank you mod, should I uninstall it before i install your mod?

Fustrate

Make a backup of that file, and then put this in:

Quote from: unik63 on November 25, 2008, 03:16:32 AM
      $messages_request = $smcFunc['db_query']('', '
         SELECT
            m.id_msg, m.icon, m.subject, m.poster_time, m.poster_ip, m.id_member, m.modified_time, m.modified_name, m.body,
            m.smileys_enabled, m.poster_name, m.poster_email, m.approved,
            '.($board_info['thank_you_post_enable'] && allowedTo('thank_you_post_show') ? 'thank_you_post, thank_you_post_counter,' : '').'
            m.id_msg_modified < {int:new_from} AS is_read, k.message AS is_repped
         FROM {db_prefix}messages AS m
            LEFT JOIN {db_prefix}log_karma AS k ON (k.message = m.id_msg AND k.id_executor = {int:current_member})
         WHERE m.id_msg IN ({array_int:message_list})
         ORDER BY m.id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),
         array(
            'message_list' => $messages,
            'new_from' => $topicinfo['new_from'],
            'current_member' => $user_info['id'],
         )
Steven Hoffman
Former Team Member, 2009-2012

glennk

Quote from: digger on November 24, 2008, 05:44:51 PM
Quote from: glennk on November 14, 2008, 08:20:38 AM
Still not working Yoda. As you can see the comment area is blank but I did leave a comment. Can you think of anything that would be causing this ??



Thanks again - Glenn

Modify install.xml and reinstall mod

find

while ($row = $smcFunc['db_fetch_assoc']($request))
{
loadMemberData($row['id_executor']);
loadMemberContext($row['id_executor'], false);

$context['member']['karma_received'][] = array(
'action_type' => $row['action_type'],
'executor' => $memberContext[$row['id_executor']]['link'],
'time' => timeformat($row['log_time']),
'comment' => parsesmileys($row['comment']),
'topic_href' => $row['topic'] . '.msg' . $row['message'] . '#msg' . $row['message'],
'topic_title' => $row['title'],
'delete_value' => $row['id_target'] . '|' . $row['id_executor'] . '|' . $row['log_time'],
);
}

replace with

while ($row = $smcFunc['db_fetch_assoc']($request))
{
loadMemberData($row['id_executor']);
loadMemberContext($row['id_executor'], false);
                        parseSmileys($row['comment']);
$context['member']['karma_received'][] = array(
'action_type' => $row['action_type'],
'executor' => $memberContext[$row['id_executor']]['link'],
'time' => timeformat($row['log_time']),
'comment' => $row['comment'],
'topic_href' => $row['topic'] . '.msg' . $row['message'] . '#msg' . $row['message'],
'topic_title' => $row['title'],
'delete_value' => $row['id_target'] . '|' . $row['id_executor'] . '|' . $row['log_time'],
);
}


find

while ($row = $smcFunc['db_fetch_assoc']($request))
{
loadMemberData($row['id_target']);
loadMemberContext($row['id_target'], false);

$context['member']['karma_sent'][] = array(
'action_type' => $row['action_type'],
'target' => $memberContext[$row['id_target']]['link'],
'time' => timeformat($row['log_time']),
'comment' => parsesmileys($row['comment']),
'topic_href' => $row['topic'] . '.msg' . $row['message'] . '#msg' . $row['message'],
'topic_title' => $row['title'],
'delete_value' => $row['id_target'] . '|' . $row['id_executor'] . '|' . $row['log_time'],
);
}

replace with

while ($row = $smcFunc['db_fetch_assoc']($request))
{
loadMemberData($row['id_target']);
loadMemberContext($row['id_target'], false);
                        parseSmileys($row['comment']);
$context['member']['karma_sent'][] = array(
'action_type' => $row['action_type'],
'target' => $memberContext[$row['id_target']]['link'],
'time' => timeformat($row['log_time']),
'comment' => $row['comment'],
'topic_href' => $row['topic'] . '.msg' . $row['message'] . '#msg' . $row['message'],
'topic_title' => $row['title'],
'delete_value' => $row['id_target'] . '|' . $row['id_executor'] . '|' . $row['log_time'],
);
}



Hey thanks Ill try this when I get sokme spare time and let you know how I get on.

glennk

HI Yoda can you clarify something for me please.

Have you changed the code in the mod as suggested by digger or do I need to make those changes manaually ? I deleted themod, downloaded it again and reinstalled but still get the same problem of blank comments.

Fustrate

I haven't updated it yet, no. You'll have to do the manual edits yourself.
Steven Hoffman
Former Team Member, 2009-2012

glennk

Ok thanks for getting abck to me. Hopefully get this sorted in the coming days

glennk

Thats done the trick. Thanks for your assiatance digger and thanks to Yoda for spending time trying to help.

I am now wondering if it i possible to get the comments to show actually in the post you are commenting on ??

A bit like this ? See the second post from Jagnet. The comment appears in the post.

http://forums.seochat.com/google-page-rank-47/3-year-old-site-dropped-pr-from-5-to-3t-224919.html

digger

There is another error in the mod

'total' => $profile['karma_good'] + $profile['karma_bad']

must be

'total' => $profile['karma_good'] - $profile['karma_bad']

because karma_good and karma_bad are positive both.

Advertisement: