Merge Double Posts By Same Member

Started by ディン1031, June 11, 2005, 04:54:02 PM

Previous topic - Next topic

ディン1031

You're sure that it install without error?

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

perplexed

I have a little problem in that I only want this function to be available to the Admins not the moderators - the moderators have permission to modify posts - but I don't want them to be able to use the double post function.

Is there a way to restrict this for Admin use only?

~thanks

ディン1031

#182
Hmmmm yes it's possible :)


<edit file>
$themedir/Display.template.php
</edit file>

<search for>
//Doublepost for Merge?
if ($message['can_modify'] && $message['doublepost']['postok'] && !empty($message['doublepost']['lastpostid']))
echo '
<a href="', $scripturl, '?action=mergeposts;pid=', $message['id'], ';msnid=', $message['doublepost']['lastpostid'], ';topic=', $context['current_topic'], '">', $MergePosts_button, '</a>';
</search for>

<replace>
//Doublepost for Merge?
if ($context['user']['is_admin'] && $message['doublepost']['postok'] && !empty($message['doublepost']['lastpostid']))
echo '
<a href="', $scripturl, '?action=mergeposts;pid=', $message['id'], ';msnid=', $message['doublepost']['lastpostid'], ';topic=', $context['current_topic'], '">', $MergePosts_button, '</a>';
</replace>


Do you use the automatic function of the mod?

If not than you can mad this change too

<edit file>
$sourcedir/SplitTopics.php
</edit file>

<search for>

function MergePosts($error_report = TRUE) {

global $db_prefix, $modSettings, $user_info, $txt, $settings, $ID_MEMBER;

if(!is_bool($error_report))
$error_report = TRUE;
</search for>

<add after>

if(!$user_info['is_admin']) {
if($error_report)
fatal_error($txt['cannot_admin_forum']);
else
return;
}
</add after>


Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

perplexed

um what automatic function of the mod???

I dont have any settings in the admin panel for it if thats what you mean, so I cant change anything

(thanks for the info re changing to admin only)

ディン1031

You can enable this in the Admin -> Features and Settings -> Doublepost -> Automatic merge new doubleposts.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x


ディン1031

Quote from: perplexed on January 23, 2007, 05:48:14 PM
whoops, sorry I do have those settings *embarrassed*

~thanks
Than you should not made the second change ;).
Because than the automerge didn't work any more xD.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

hawkshaw

Cant see any "MERGE" button appears, it's replaced with "MODIFY" button instead :D
Tell me which file i must edit so it shows Merge.gif and not modify.gif ?

ディン1031

Hi

This is the part that i used :)
Display.template.php

$MergePosts_button = create_button('modify.gif', 'merge_doublepost', 'merge_doublepost', 'align="middle"');

replace with

$MergePosts_button = create_button('merge.gif', 'merge_doublepost', 'merge_doublepost', 'align="middle"');


Don't forget to add also a icon image in the icon dir.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

hawkshaw


autogespot.com

I got a little error :)

8: Undefined index: merge_doublepost
Bestand: /home/autogespot/domains/autogespot.com/public_html/forum/Sources/Subs.php
Regel: 3565

Can you help me?

ディン1031

Did you update all you language files?

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

autogespot.com


ディン1031

?_? and also the language files changes of the mod?

Hmmm, i didn't change anything in the Subs.php with the mod <<.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

perplexed

Quote from: DIN1031 on January 18, 2007, 07:46:13 AM
Hmmmm yes it's possible :)





Do you use the automatic function of the mod?

If not than you can mad this change too




Bye
DIN1031

cool thanks, I will try this after I upgrade :)

JSizzal

Hi I just installed it fine, but upon clickin on Features and Options I get this message:

QuoteFatal error: Cannot redeclare modifymergepostssettings() (previously declared in /home/decisive/public_html/forum/Sources/ModSettings.php:501) in /home/decisive/public_html/forum/Sources/ModSettings.php on line 530
..Wat to do!!

ディン1031

You have the mod installed twice!

Upload you backuped files <<. Or remove all the double entries...

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

rdawg

Hello im trying to install double posts mod, and im having an error "Modification parse error" with the .mod file.

Quote
nstalling this package will perform the following actions:
   Type    Action    Description
1.    Extract File    ./Themes/default/images/english/mergeposts.gif    
2.    Execute Modification    DoublePostMerge1.1rc2.mod    Modification parse error

any ideas ?

ディン1031

#198
Quote from: rdoggsv on March 11, 2007, 12:44:48 PM
Hello im trying to install double posts mod, and im having an error "Modification parse error" with the .mod file.

Quote
nstalling this package will perform the following actions:
   Type    Action    Description
1.    Extract File    ./Themes/default/images/english/mergeposts.gif    
2.    Execute Modification    DoublePostMerge1.1rc2.mod    Modification parse error

any ideas ?
You have a SaveMode Porblem that's a server problem not a problem of my mod.
Please serach the forum for this problem. Normal it have no rights to writing the files or the package dir.

I don't know where this problem has been cleard in the english forumspart, but i'm sure it is.

Bye
DIN1031

Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Shaltay

#199
Hello.
Thanks you for the nice mod!
I use it with SMF 1.1.2 and I have 2 little problems:

1) The button "Merge Post" does not appear if using any Theme except default. Why so?
2) Russian is not supported, but this problem can be solved by manual editing of index.russian.php (index.russian-utf8.php) and ModSettings.russian.php (ModSettings.russian-utf8.php).

If you need any help with Russian translation in future releases - you are welcome.

Advertisement: