Auto Merge Double Post

Started by M-DVD, December 03, 2008, 10:18:25 AM

Previous topic - Next topic

M-DVD


Autumn13

*blushes* Thank you very much, you are such a doll. Sorry to be so bothersome!

vika.vedy

Hello again, M-DVD,
and I have another issue with other your mod: Auto Merge Double Post. I have corrected it and suggest to add my solution in next update of the MOD
The issue:
I have one board with totally restricted modifying messages,
so, when my members posts their next message right after previous, they receive "cannot_modify_own" error.

The solution is:
add 'modify_own' permission to the end and global array $user_info at the beginning of you doublePostCheck() function:
function doublePostCheck()
{
global $db_prefix, $ID_MEMBER, $topic, $modSettings, $user_info;

// Allow Doble Post?
if (allowedTo('doublePost') && !($modSettings['AutoMergePost_4all']))
return;

// Do the Query to checking exist Double Post
$result = db_query("
SELECT
t.ID_LAST_MSG, m.subject, m.body, m.posterTime
FROM
{$db_prefix}topics AS t, {$db_prefix}messages AS m
WHERE
t.ID_LAST_MSG = m.ID_MSG
AND m.ID_TOPIC = $topic
AND m.ID_MEMBER = $ID_MEMBER
LIMIT 1"
,__FILE__,__LINE__
);

// No Flood?
if (!mysql_num_rows($result))
return;

$row = mysql_fetch_assoc($result);
mysql_free_result($result);

// Allow Bump?
if (time() >= ($modSettings['AutoMergePost_time'] * 86400 + $row['posterTime']))
return;

// Now Modify >:D
$_REQUEST['msg'] = $_GET['msg'] = $row['ID_LAST_MSG'];
$_REQUEST['subject'] = $_POST['subject'] = addslashes(un_htmlspecialchars($row['subject']));
$_REQUEST['message'] = $_POST['message'] = un_htmlspecialchars(un_preparsecode($row['body'])) . "\n" . str_replace('$date', '[time]'.time().'[/time]', $modSettings['AutoMergePost_div']) . "\n" . $_POST['message'];
if(!in_array('modify_own',$user_info['permissions'])) $user_info['permissions'][] = 'modify_own';
}



Thank you fo this MOD!

M-DVD

Quote from: vika.vedy on June 18, 2009, 03:56:10 AM
Hello again, M-DVD,
...
The issue:
I have one board with totally restricted modifying messages,
so, when my members posts their next message right after previous, they receive "cannot_modify_own" error.

Yes, this is a known problem, also with easy solution. Now in July / August I will have time to update this mod and add the tricks that there are along this theme.

Thank you :)

wladymeer

I may not know if this mod was causing me a problem but after I installed it I've lost verification image on registration page and when I rolled back verification image was there again.

M-DVD

Quote from: wladymeer on June 23, 2009, 08:17:15 AM
I may not know if this mod was causing me a problem but after I installed it I've lost verification image on registration page and when I rolled back verification image was there again.

No, this mod has no relation to that place. The cause must be another. ::)

wladymeer

I'm not saying that this is causing the problem, maybe the problem is in collision with other mods, here is the list of currently installed on my forum:

AjaxChat Integration 3.2
Search Focus Dropdown 1.3
Locked Topic Color 1.0
Yet Another Global Announcements Mod 1.1.7.2
Aeva ~ Auto-Embed Video & Audio 6.9.99
Pm Number in All Pages
Simple Joomla! 1.5.x / SMF 2.0.x Bridge 1.0.14a
vB Style Topic Author Name 1.0
Advanced Reputation System 1.7.4
Recent posts user preference 3.06


But I do know that I installed it last and I've lost verification page - when I uninstalled it I got it back.

akbora

#247
I have an error. Date of first merged message is wrong.

For example:

Üst Üste Gelen Mesaj, Otomatik Birleştirildi: Bugün, 13:56:39deneme
Üst Üste Gelen Mesaj, Otomatik Birleştirildi: Bugün, 14:56:54deneme
Üst Üste Gelen Mesaj, Otomatik Birleştirildi: Bugün, 15:57:18deneme


I sent them between one minute.
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

M-DVD

Quote from: wladymeer on June 24, 2009, 10:36:33 PM
I'm not saying that this is causing the problem, maybe the problem is in collision with other mods, here is the list of currently installed on my forum:

Ok.

It is possible a "conflict between mods", but it is unlikely that the effects are there.

However, I will check it in the weekend.

--

Quote from: akbora on June 27, 2009, 08:58:38 AM
I have an error. Date of first merged message is wrong.

For example:

Üst Üste Gelen Mesaj, Otomatik Birleştirildi: Bugün, 13:56:39deneme
Üst Üste Gelen Mesaj, Otomatik Birleştirildi: Bugün, 14:56:54deneme
Üst Üste Gelen Mesaj, Otomatik Birleştirildi: Bugün, 15:57:18deneme

I sent them between one minute.


Something must be wrong in your forum/host.

This mod, records the time with the php function time(), and displays it using the BBCode [time] of SMF.

Ie, even though I try, I don't see how (the mod) can cause and fix it the failure.

netoya

QuoteSomething must be wrong in your forum/host.

Just noticed the same problem on my forum.

Eclipse16V

I worked with:
SMF 2 in German

Shop:
SID Giessen

Autumn13

I just wanted to reply and say everything works perfectly now. My whole forum appreciates it! Thank you!

mpver

Hi, I am trying to uninstal this mod but keep getting an error message:-
1.     Execute Modification     ./Themes/default/Admin.template.php     Test failed
2.    Execute Modification    ./Sources/ManagePermissions.php    Test successful
3.    Execute Modification    ./Sources/ManagePosts.php    Test failed
4.    Execute Modification    ./Sources/Post.php    Test successful
5.    Execute Modification    ./Sources/Subs-Post.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.english_british.php    Skipping file
9.    Execute Modification    ./Themes/default/languages/Modifications.english_british-utf8.php    Test successful
10.    Execute Modification    ./Themes/default/languages/Modifications.spanish.php    Skipping file
11.    Execute Modification    ./Themes/default/languages/Modifications.spanish-utf8.php    Skipping file
12.    Execute Modification    ./Themes/default/languages/Modifications.spanish_es.php    Skipping file
13.    Execute Modification    ./Themes/default/languages/Modifications.spanish_es-utf8.php    Test successful
14.    Execute Modification    ./Themes/default/languages/Modifications.spanish_latin.php    Test successful
15.    Execute Modification    ./Themes/default/languages/Modifications.spanish_latin-utf8.php    Test successful

Is it ok to ignore these errors or is it going to cause a problem with my forum, if so how do I disable this mod?

Owdy

Never used this MOD, but here it goes by Finnish

$txt['permissionname_doublePost'] = 'Salli peräkkäiset viestit';
$txt['permissionhelp_doublePost'] = 'Tämä asetus sallii peräkkäiset viestit.';
$txt['AutoMergePost_div'] = 'Lisää teksti yhdistettyjen viestien yhteyteen';
$txt['AutoMergePost_div_sub'] = 'Voit käyttää BBC koodia sekä $date variable';
$txt['AutoMergePost_time'] = 'Aika jolloin peräkkäiset viestit sallitaan';
$txt['AutoMergePost_time_sub'] = 'Aseta 0 ottaaksesi koko toiminnon pois käytöstä ja 9999 estääksesi kokonaan';
$txt['AutoMergePost_4all'] = 'Älä huomioi yhdistettyjen viestien oikeuksia';
$txt['AutoMergePost_4all_sub'] = 'Yhdistä peräkkäiset viestit aina, ylläpitäjiltäkin';
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

apTyaH

How-to delete added date of modification post when posts auto merged? I want when posts auto merge was added only string of AutoMergePost_div and without of modification date. I use smf 1.1.9 and AutoMergeDoublePost_v1.2.

M-DVD

Update Auto Merge Double Post v1.3:
=========================


Sorry for delay.

New features:

  • Also is available the Manual Merge.
  • You can enable and disable the Auto Merge or Manual Merge.
  • You can ignore the 'Maximum allowed post size' when try merge posts - Thanks TetsuoS by idea.
  • Manual Merge: You can set a permission and allow Merge the Double Post own or any.
  • Manual Merge: The manual merge double post is logged in the Moderation Action Log.
  • The Query have been improve - Thanks KUZMITCH for report.
  • Settings moved to: Admin > Posts and Topics > Merge Double Posts.
  • Fixed problem when the member not have edit's posts permission - Tranks vika.vedy by report.
  • Fixed problem with the 'Maximum time after posting to allow edit' - Tranks Beer and ccraciun by report.
  • Many changes in languages's files.
  • Extra: Fixed bug in Time BBCode.
  • Extra: Compatible with Ajax Quick Reply
  • Extra: Compatible with Reason For Editing Mod

How do I upgrade?

  • Uninstall the previous version
  • Install the new
  • You should edit the Display.template.php if is neccesary

=======================================

Características Nuevas:

  • También está disponible la Fusión Manual de Mensajes.
  • Puedes activar o desactivar por separado la Fusión Manual o la Fusión Automática.
  • Puedes configurar ignorar los 'Caracteres máximos permitidos en los mensajes' al intentar fusionar.
  • Fusión Manual: Es posible asignar permisos según grupos de usuarios y permitir la fusión de Doble Post propios o de cualquiera.
  • Fusión Manual: La fusión manual es registrada en el Log de Moderacción.
  • La consulta a la DB ha sido mejorada para casos de DB grandes.
  • Configuraciones movidas a: Administración > Mensajes y Temas > Fusión de Mensajes.
  • Reparado problema cuando el usuario no tenía permisos de modificar su mensaje.
  • Reparado problema cuando la fusión ocurría antes de haber transcurrido el tiempo permitido apra poder editar.
  • Extra: Reparado problema en el Time BBCode.
  • Extra: Compatible con Ajax Quick Reply
  • Extra: Compatible con Reason For Editing Mod


¿Como actualizar?

  • Desintalar la anterior versión
  • Instalar la nueva
  • Debes editar el Display.template.php si es necesario

Owdy

Awesome, manual setting is what i avve been waiting for. Thanks!
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

villasg

Greek-utf8
// MOD Auto Merge Double Post
$txt['permissionname_doublePost'] = 'Επιτρέπετε το ΔιπλοΠοστάρισμα';
$txt['permissionhelp_doublePost'] = 'Με αυτή την επιλογή επιτρέπετε σε αυτο το group το ΔιπλοΠοστάρισμα.';
$txt['AutoMergePost_div'] = 'Πρόσθεσε ένα κείμενο όταν ενώνονται τα ποστ
<div class="smalltext">You Μπορείς να χρησιμοποιήσεις BBC  κώδικα και $date variable</div>';
$txt['AutoMergePost_time'] = 'Χρόνος που μετα την παρέλευση του θα επιτρέπετε το ΔιπλοΠοστάρισμα στο topic
<div class="smalltext">Με 0 απενεργοποιείται το MOD και με 9999 δεν επιτρέπει ποτε το to ΔιπλοΠοστάρισμα</div>';
$txt['AutoMergePost_4all'] = 'Αγνόησε τα δικαιώματα ΔιπλοΠοσταρίσματος
<div class="smalltext">Πάντα να ενώνονται τα post , συμπεριλαμβανομένων και του Administrator</div>';

$txt['merge_button'] = 'Συγχώνευση Posts';
$txt['AutoMergePost_auto'] = 'Ενεργοποίηση αυτόματης Συγχώνευσης Doble Posts';
$txt['AutoMergePost_manual'] = 'Ενεργοποίηση χειροκίνητης Συγχώνευσης Doble Posts';
$txt['AutoMergePost_nomax'] = 'Παράβλεψε το maximum post size';
$txt['AutoMergePost_reason'] = 'Συγχωνευμένο DoublePost';

$txt['permissionname_doublePostmerge'] = 'Επέτρεψε το χειροκίνητο merge double posts';
$txt['permissionhelp_doublePostmerge'] = 'This permission allows users to merge double posts.';
$txt['permissionname_doublePostmerge_own'] = 'Δικό μου double posts';
$txt['permissionname_doublePostmerge_any'] = 'Οποιοδήποτε double posts';
$txt['cannot_merged_replies'] = 'Δεν σας επιτρέπεται να συγχωνεύσετε αυτα τα posts.';
$txt['modlog_ac_merged'] = 'Συγχωνευμένα &quot;{message}&quot; απο &quot;{member}&quot;';

$txt['manageposts_automerge_settings'] = 'Merge Double Posts';
$txt['manageposts_automerge_settings_description'] = 'Εδώ μπορείτε να ρυθμίσετε τα settings περιλαμβανομένων της  αυτόματης & χειροκίνητης συγχώνευσης των doubles posts.';]]></add>

   

villasg

Canot find in the admin panel the mod in ver 1.1.10

Owdy

I got same problem. It showed in default theme, then i realised that those thanslations arent complete. There are missing strings. I added them and now it appears in my own theme.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Advertisement: