News:

Wondering if this will always be free?  See why free is better.

Main Menu

vReportBoard Mod

Started by Valodim, August 21, 2006, 07:58:17 PM

Previous topic - Next topic

SONSiVRi

"Kimmie"
Yeah this one is possible also. One checkbox in settings page and if you set it new reports doesn't show as repply under original one if its already solved (and maybe report has been deleted later). In summary: Second report belong same message will be in different report topic if previous report has been solved. You want that huh?
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Kimmie

Quote from: SONSiVRi on November 11, 2008, 08:54:32 AM
"Kimmie"
Yeah this one is possible also. One checkbox in settings page and if you set it new reports doesn't show as repply under original one if its already solved (and maybe report has been deleted later). In summary: Second report belong same message will be in different report topic if previous report has been solved. You want that huh?


YES YES YES PLEASE   heheheheh

I havent tried your new code you already posted yet. Do you want me to go ahead and apply the new codes or do I need to wait and just apply the ones you are going to make?

Costa

Quote from: HecKel on November 09, 2008, 07:57:54 PM
And if you don't mind, some of your translations have some issues, they don't have a proper meaning, for example:
some?!?!
The translation from joomlamz have VERY issues.
The SimplePortal have very things made by Google!
When you translate something you need to havecautions, see if the phrases made sense.

$txt['report_solve'] = 'Solve/Unsolve';
Where is the translation?

$txt['permissionname_report_solve'] = 'Resolvido Relatórios';

What?!

$txt['permissionhelp_report_seeinline'] = 'Essa permissão mostra um marcador de lugares comunicados na mensagem opinião, e indica se eles foram ou não resolvidos.';

WTF?!

Please, have more carefull when you translate mod's, the Portuguese/Brazilian/Mozambique/Angola/ect etc Community have pleased.

Farewell
- Costa
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

SONSiVRi

Quote from: Kimmie on November 12, 2008, 02:11:19 PM
Quote from: SONSiVRi on November 11, 2008, 08:54:32 AM
"Kimmie"
Yeah this one is possible also. One checkbox in settings page and if you set it new reports doesn't show as repply under original one if its already solved (and maybe report has been deleted later). In summary: Second report belong same message will be in different report topic if previous report has been solved. You want that huh?


YES YES YES PLEASE   heheheheh

I havent tried your new code you already posted yet. Do you want me to go ahead and apply the new codes or do I need to wait and just apply the ones you are going to make?

If you don't have a test place so don't bother. Because I will work on new one as you asked.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

SONSiVRi

"Kimmie"
It's ready. But its not same as you wanted. I didn't changed the working style, reports goes under as repply in already created topics. But this time you can freely delete those topics.

Here is the story of how it's work;
If new report has arrives, system checks already made it before and if its then it passes through second check routine (that I included). This additional routine checks original topic exist or not. If it doesn't exist anymore (because you deleted) system adds fresh new topic. But if exist and solved, it bumps up that topic and change it's situation into "unsolved" and you can do whatever you want. This way is better because you can see how many times a topic is reported and you may take extra actions.

Find in SendTopic.php
// Report to the report board.
function ReportToModerator2()
{
bla bla bla
}


Replace with
// Report to the report board.
function ReportToModerator2()
{

global $txt, $scripturl, $db_prefix, $topic, $board, $board_info, $user_info, $ID_MEMBER, $modSettings, $sourcedir, $language;

// Check their session... don't want them redirected here without their knowledge.
checkSession();

// You must have the proper permissions!
isAllowedTo('report_any');

include_once($sourcedir . '/Subs-Post.php');

if(empty($modSettings['report_board']))
fatal_lang_error('rtm_noboard');

if($board == $modSettings['report_board'])
fatal_lang_error('rtm_reportboard');

// Get the basic topic information, and make sure they can see it.
$_POST['msg'] = (int) $_POST['msg'];

// fetch quote and stuff
$request = db_query("
SELECT m.ID_MEMBER, IFNULL(lr.ID_TOPIC, 0), m.posterName, mem.realName, m.posterTime, m.subject, m.body
FROM {$db_prefix}messages AS m
LEFT JOIN {$db_prefix}members AS mem ON (m.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}log_reports AS lr ON (m.ID_MSG = lr.ID_MSG)
WHERE m.ID_MSG = $_POST[msg]
AND m.ID_TOPIC = $topic
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) == 0)
fatal_lang_error('smf232');
list ($member, $oldtopic, $posterName, $realName, $mdate, $form_subject, $form_message) = mysql_fetch_row($request);
mysql_free_result($request);

// Check report topic exist anymore. Returns 0 if its not.
$request = db_query("
SELECT IFNULL(ID_TOPIC, 0)
FROM {$db_prefix}topics
WHERE ID_TOPIC = $oldtopic
LIMIT 1", __FILE__, __LINE__);
list ($oldtopic_exist) = mysql_fetch_row($request);
mysql_free_result($request);

// if "report topic" isn't exist anymore.
if ($oldtopic_exist == 0)
{
// delete report entry in database
db_query("
DELETE FROM {$db_prefix}log_reports
WHERE ID_TOPIC = $oldtopic
LIMIT 1", __FILE__, __LINE__);
// and make $oldtopic = 0 so new topic can be created instead of posting repply in old one
$oldtopic = 0;
}

if ($member == $ID_MEMBER)
fatal_lang_error('rtm_not_own', false);

$form_message = preg_replace('~<br(?: /)?' . '>~i', "\n", $form_message);

// Remove any nested quotes, if necessary.
if (!empty($modSettings['removeNestedQuotes']))
$form_message = preg_replace(array('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '~^\n~', '~\[/quote\]~'), '', $form_message);
// and replace all img tgs by url tags
$form_message = preg_replace('/\[img\](.+?)\[\/img\]/is', '[url]\1[/url]', $form_message);
// Add a quote string on the front and end.
$form_message = '[quote author=' . $posterName . ' link=topic=' . $topic . '.msg' . $_POST['msg'] . '#msg' . $_POST['msg'] . ' date=' . $mdate . ']' . "\n" . $form_message . "\n" . '[/quote]';

// some parsing
$message = htmlspecialchars($_POST['comment'], ENT_QUOTES) . "\n\n" . $form_message;
preparsecode($message);

// we need to know :)
$query = db_query("
SELECT countPosts
FROM {$db_prefix}boards
WHERE ID_BOARD = $modSettings[report_board]", __FILE__, __LINE__);
if(mysql_num_rows($query) > 0)
list($countPosts) = mysql_fetch_row($query);
    else
        fatal_lang_error('rtm_notexist');

// set up all options
$msgOptions = array(
'id' => 0,
'subject' => '[' . addslashes($board_info['name']) . '] ' . addslashes($form_subject),
'body' => addslashes($message),
'icon' => 'unsolved',
'smileys_enabled' => true,
'attachments' => array(),
);
$topicOptions = array(
'id' => $oldtopic,
'board' => $modSettings['report_board'],
'poll' => null,
'lock_mode' => null,
'sticky_mode' => null,
'mark_as_read' => false,
);
$posterOptions = array(
'id' => $ID_MEMBER,
'name' => $user_info['username'],
'email' => $user_info['email'],
// do reports count as posts?
'update_post_count' => !empty($countPosts),
);

// and post!
createPost($msgOptions, $topicOptions, $posterOptions);

    // insert into report log
    if($oldtopic == 0)
        db_query("INSERT INTO {$db_prefix}log_reports (ID_MSG, ID_TOPIC, solved) VALUES ($_POST[msg], $topicOptions[id], 0)", __FILE__, __LINE__);

// If this message already reported (and may solved later), then make it UNSOLVED again because its reported for some reasons again.
if($oldtopic != 0)
{
// This is "reported" entry appears red/green in posts
db_query("
UPDATE {$db_prefix}log_reports
SET solved = 0
WHERE ID_TOPIC = $oldtopic
LIMIT 1", __FILE__, __LINE__);

// Get first message of "report topic"
$request = db_query("
SELECT m.ID_MSG
FROM {$db_prefix}topics AS t, {$db_prefix}messages AS m
WHERE t.ID_TOPIC = $oldtopic
AND m.ID_MSG = t.ID_FIRST_MSG
LIMIT 1", __FILE__, __LINE__);
list ($first_msg) = mysql_fetch_row($request);
mysql_free_result($request);

// Set first message of report topic's icon UNSOLVED
db_query("
UPDATE {$db_prefix}messages
SET icon = 'unsolved'
WHERE ID_MSG = $first_msg
LIMIT 1", __FILE__, __LINE__);
}

// Back to the board!
redirectexit('board=' . $board . '.0');
}
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Kimmie

SONSiVRi

You are my hero hehehe. I will try out the new codes later this afternoon. I am waiting on my cable guy to come out right now because I am switching internet service providers so I will get you some feedback on it in a few hours after I have had time to test it out :)

klra

Any chance of an update to 1.1.7?

Costa

It works on SMF 1.1.7
I have 2 foruns (one open pubic, other for test) and this mod works on both
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

klra

Quote from: Costa on November 14, 2008, 02:25:23 PM
It works on SMF 1.1.7
I have 2 foruns (one open pubic, other for test) and this mod works on both

It still shows 1.1.4 on the Mod site.

Costa

The author don't update, but works in 1.1.7

Farewell
- Costa
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

SONSiVRi

Quote from: klra on November 14, 2008, 07:01:24 PM
Quote from: Costa on November 14, 2008, 02:25:23 PM
It works on SMF 1.1.7
I have 2 foruns (one open pubic, other for test) and this mod works on both

It still shows 1.1.4 on the Mod site.
This will help;
http://www.site.com/forum/index.php?action=packages;emulate_version=1.1.7
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Costa

For 1.1.6 and 1.1.7, just upload the attach on this post

It works in SMF 1.1.6/7
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Rhine

Is it possible to make that solved reports comes in their own forum?

klra


klra


Quote from: Costa on November 15, 2008, 07:44:35 AM
For 1.1.6 and 1.1.7, just upload the attach on this post

It works in SMF 1.1.6/7

I get this error -

Execute Modification   ./Sources/ManagePermissions.php   Test failed

klra

Quote from: SONSiVRi on November 15, 2008, 07:27:18 AM
Quote from: klra on November 14, 2008, 07:01:24 PM
Quote from: Costa on November 14, 2008, 02:25:23 PM
It works on SMF 1.1.7
I have 2 foruns (one open pubic, other for test) and this mod works on both

It still shows 1.1.4 on the Mod site.
This will help;
http://www.site.com/forum/index.php?action=packages;emulate_version=1.1.7

OK, I just reread your post, not sure what to do with this.

Wouldn't it just be easier to just update the package to 1.1.7?

Sabre™

You are not supposed to bump a thread within a 24 hour time frame, yet alone 3 times in 16 minutes.  ::)
With 233 posts here, you'd think you'd know this !!??
This is a world forum where we live in different time frames, so sometimes you need to WAIT!!!

Quote from: klra on November 15, 2008, 12:50:51 PM
Wouldn't it just be easier to just update the package to 1.1.7?

Only the mod author can update the package on the mod page.
You can go to the mod download page and click on "Notify me of updates!" to wait for that.
Or...      with your error, you can still install the mod, then add this code to your  ManagePermissions.php  in your sources folder.

Find
'karma_edit' => false,

and add after it

'report_solve' => false,
'report_seeinline' => false,


then find
'pm_send',

and add after it
'report_solve',
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


klra

QuoteYou are not supposed to bump a thread within a 24 hour time frame, yet alone 3 times in 16 minutes

They were not bumps, but replys,and one was a double reply that I didn't submit (I removed it).

Thanks for the lecture. A person with your massive amount of posts and experience should understand that the private message system is usually used to address these types of issues, unless you are trying to embarass me.

Sorry for the thread creep-

Costa

Please, calm down guys
If you two have a problem, resolve that by PM, not with public posts




klra, did your problem as resolved?
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

klra

Unfortunately, no.

I tried your package and it won't install. Not quite sure why though, as it is setup correctly with the version information (I tried my own edits before).

Any suggestions?

I'd really like to have this Mod installed, as it looks like a great tool for the staff of of my forums.

Advertisement: