Merge Double Posts By Same Member

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

Previous topic - Next topic

Greybrow

1.0.3 version works only in default theme :(

ディン1031

#81
Quote from: Greybrow on January 22, 2006, 01:31:53 PM
1.0.3 version works only in default theme :(
Normal :P, i can't made a version for each existing theme ;D

That's a work that you must done by your self for each other theme...

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

Greybrow

#82
Ok, done.
After installing the mod, that is what I changed:

In Display.template.php on my style before:

// Can the user modify the contents of this post?

I added:

//Doublepost for Merge?
$MergePosts_button = $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/mergeposts.gif" alt="'.$txt['merge_doublepost'].'" Title="'.$txt['merge_doublepost'].'" border="0" />' : $txt['merge_doublepost'];

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>';

Also the button mergeposts.gif had to be added to my language dir.

Btw:
Your mod generates errors.
In mod file instead:
index.php
You should use:
$boarddir/index.php

and instead:
Themes/default/Display.template.php
You should use:
$themedir/Display.template.php


btw2:
$newbody = $msn['0']['body'].(empty($modSettings['MergePost_NoHR']) ? (empty($modSettings['MergePost_OldTimeAdd']) ? '[br][size=1]'.$txt['search_date_posted'].': '.$msn['0']['Time'].'[/size]' : '').'[hr]' : '[br]').$msn['1']['body'];


I think it looks better:
$newbody = $msn['0']['body'].(empty($modSettings['MergePost_NoHR']) ? (empty($modSettings['MergePost_OldTimeAdd']) ? '[hr][size=1]'.$txt['search_date_posted'].': '.$msn['0']['Time'].'[/size][br]' : '[hr]') : '[br]').$msn['1']['body'];


btw3:
Great idea with this automerge function :)

ディン1031

Okay i know this with the $boardurl and the $themedir but i've currently not so much time to change it :X
(I'm only on my lunch at work here). But i hope i can correct it on my vacations ;).

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

[Dark.Shadow]

ok, i got a problem, im using smf 1.1 rc 2 and i have installed this mod.... but when i try to acces the Features and Options , i get this:

Fatal error: Cannot redeclare modifymergepostssettings() (previously declared in /home/unipumps/public_html/Sources/ModSettings.php:371) in /home/unipumps/public_html/Sources/ModSettings.php on line 398

and when i uninstall i get this:

Hacker?

and the problem still is going on.... how do i fix it...? :(

ディン1031

Somehow you installed my mod twince XD

Serach for function ModifyMergePostsSettings()
{
global $txt, $scripturl, $context, $settings, $sc;

$config_vars = array(
// Automatic Merge Optione?
array('check', 'MergePost_Automatic'),
array('int', 'MergePost_AutomaticTime'),
'',
//Admin can made Doubleposts
array('check', 'MergePost_AdminDoublePost'),
'',
// Some Order option for the merging :X?
array('check', 'MergePost_OldTimeAdd'),
array('check', 'MergePost_NoHR'),
);

// Saving?
if (isset($_GET['save']))
{
saveDBSettings($config_vars);
redirectexit('action=featuresettings;sa=MergePosts');
}

$context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=MergePosts';
$context['settings_title'] = $txt['MergePost_Headline'];

prepareDBSettingContext($config_vars);
}

and remove it one time ;).
(If it happend again, remove it again XD)...

But i can not guranty that it work good... because this could also do some strange things :x...

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

fiver

Hi DIN1031

Great mod!

Just a typo
QuotePostet at: February 01, 2006, 02:11:59 AM

Where can I correct the typo from Postet to Posted?

Thanks ;D


fiver

Found it! and changed from "Postet at" to "Posted on"

<edit file>
$languagedir/index.english.php
</edit file>

<search for>
$txt['merge_check'] = 'Merge?';
$txt['merge_no_poll'] = 'No poll';
</search for>

<add after>
$txt['merge_doublepost'] = 'Double Posts';
$txt['merge_error_dbpo'] = 'You are not allowed to do this!';
$txt['merge_error_notf'] = 'Sorry, no Posts found to Merge.';
$txt['merge_error_noid'] = 'No Message ID or Topic found!';
$txt['search_date_posted'] = 'Postet at';
</add after>

ディン1031

hui a translatione error xD never saw this and no one told me that hmm i should correct it.

Thx
fivearts
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

HecKel

is this mod compatible with SMF 1.0.6? I can't install this :(

HecKel
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

ディン1031

It's 1.06 compatible, i've tested it... (also it should work with the installer).

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

haktanir2

The mod works fine but it says "Postet" instead of Posted

which file would I have to edit to fix this?

fiver


ディン1031

Quote from: fivearts on February 06, 2006, 09:25:48 AM
For those who use Merge Double Posts with Leaf's Hide Post, do note an interesting side-effect:
http://www.fivearts.net/index.php/topic,146.msg610.html#msg610

cheers
:)
Logical, because the second post is the master post so he use als settings of this post and for the normal version it work because there are no special settings for posts :x.

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

fiver

#94
Hi DIN1031,

Your mod has been very useful.  :D It helped merged 3 posts (within 7 mins) into 1 post:
http://www.fivearts.net/index.php/topic,66.msg310.html#msg310

In the above post, you might have noticed that I have added two BR before HR and one BR after, like this:
[BR][BR][HR][BR]

By moving the "Posted on" away from the HR, it seems clearer the "Posted on" is refering to the message above it.

After using Merge Double Post, one thing I am concerned is the merging of 2 long posts. It will become a very long post. At the moment I only have an example of a long post and a short post merged: http://www.fivearts.net/index.php/topic,18.msg113.html#msg113

Is it possible to include a setting to decide how many words or characters before merging 2 posts?
For example:
post1 (90 words or less) + post2 (90 words or less) = to merge
post1 (90 words or less) + post2 (91 words or more) = to merge
post1 (90 words or more) + post2 (90 words or less) = to merge
post1 (91 words or more) + post2 (91 words or more) = do not merge

post1 (90 words or less) + post2 (90 words or less) + post3 (90 words or less) = merge post 1 and 2 (if 1+2 = 90 words or less, merge post3. if 1+2 = 91 words or more, do not merge post 3)

I noticed that in Admin > Post and Topics (smf1.1rc2) there is already a rule:
Maximum allowed post size: [box] characters

So there might be some way of counting characters? Will you be considering this idea?

cheers,
:)



ディン1031

#95
hmmm i think i've check the max size hmmm or did i want do this and forgot it, okay i will insert it it's a good idea XD, but what should i do should i delete the old text, or is than no way to merge it? hmmm okay before i do this i need a little bit think time XD.

Oh i see you answer it allready 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

fiver

OH I SEE!!! Thanks for the enlightenment.  ;D  :D ;D

[Dark.Shadow]

thanks, i fixed the problem, i had the mod installed like 5 times xD

ディン1031

Okay here is 1.04 with the lenth check of the new posts :)

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

fiver

Hi DIN1031,

Need your advise. When I tried to uninstall Merge Double Post 1.03 (MDP), I get error messages . So I uninstalled all other mods that were installed after MDP, and then uninstall MDP. I still get these error messages:

QuoteUninstall Actions "Merge Double Posts":   
Installing this package will perform the following actions:
Type   Action   Description   
1.   Execute Modification   ./index.php   Test successful   
2.   Execute Modification   ./Sources/Display.php   Test successful   
3.   Execute Modification   ./Sources/SplitTopics.php   Test failed   
4.   Execute Modification   ./Sources/ModSettings.php   Test successful   
5.   Execute Modification   ./Sources/Subs-Post.php   Test successful   
6.   Execute Modification   ./Themes/default/Display.template.php   Test successful   
7.   Execute Modification   ./Themes/default/languages/index.english.php   Test failed   
8.   Execute Modification   ./Themes/default/languages/ModSettings.english.php   Test successful

What should I do?
:(

Advertisement: