Customizing SMF > Modifications and Packages
Auto Merge Double Post
FireDitto:
Is there a way to make it so that the merged post will bump the thread as if it were a new post, but merge so that it is a part of the old post?
It would still look exactly as it does, but the bump would send the thread to the top of the list, mark it as unread, and bring it attention once more, without choking it up with a line of 'bump' posts.
I have an RP site, and it would be very good to be able to bump threads that have become forgotten or overlooked, without having to post new posts on it etc.
Is this possible?
rickmastfan67:
--- Quote from: Geor'G on June 11, 2011, 12:04:28 PM ---
--- Quote ---how to use this mod on rc5?
--- End quote ---
Works - smf rc4-rc5
Fix, update
--- End quote ---
Thanks for posting this fixed file. However, I might have just spotted a bug.
When installing it on my test forum (offline), I noticed that the modifications don't work for the "core" theme. (yes I clicked the box first and it said it passed the modification test on the core Display.template.php file...)
In the "default/Curve" theme, the "merge.gif" image loads perfectly fine beside the "Merge Posts" text. However, in the "core" theme, this doesn't happen. The "Merge Posts" text is there (however not in bold), but the "merge.gif" image isn't even though it's in the proper directory.
Do you know why this might be happening? This was the first mod I installed in the test forum, so there can't be any conflicting mods effecting it. Is there something more that needs to be added to the Display.template.php file in the core theme to get the image to properly show up? This is with SMF 2.0.2. Thanks.
rickmastfan67:
--- Quote from: rickmastfan67 on May 26, 2012, 09:52:04 AM ---
--- Quote from: Geor'G on June 11, 2011, 12:04:28 PM ---
--- Quote ---how to use this mod on rc5?
--- End quote ---
Works - smf rc4-rc5
Fix, update
--- End quote ---
Thanks for posting this fixed file. However, I might have just spotted a bug.
When installing it on my test forum (offline), I noticed that the modifications don't work for the "core" theme. (yes I clicked the box first and it said it passed the modification test on the core Display.template.php file...)
In the "default/Curve" theme, the "merge.gif" image loads perfectly fine beside the "Merge Posts" text. However, in the "core" theme, this doesn't happen. The "Merge Posts" text is there (however not in bold), but the "merge.gif" image isn't even though it's in the proper directory.
Do you know why this might be happening? This was the first mod I installed in the test forum, so there can't be any conflicting mods effecting it. Is there something more that needs to be added to the Display.template.php file in the core theme to get the image to properly show up? This is with SMF 2.0.2. Thanks.
--- End quote ---
I've been able to fix this problem myself. Geor'G, if you don't mind updating your post's attachment, here's the fixes to allow it to install correctly in the "core" theme (/Themes/core/) Display.template.php file. If you don't want to update your attachment, I'll post the version with the fix in a little while to help people out. ;)
I took the code from the original 1.3 version when it's parsed to install in 1.1.16 and tweaked to code a tad to work for the 2.0 version of the same theme and it worked. Tested it offline, got no errors, and it can properly merge posts.
--- Code: --- <file name="$themes_dir/core/Display.template.php" error="skip">
<operation>
<search position="after"><![CDATA[
$split_button = create_button('split.gif', 'split', 'split', 'align="middle"');]]></search>
<add><![CDATA[
$merge_button = create_button('merge.gif', 'merge_button', 'merge_button', 'align="middle"');]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
// What about splitting it off the rest of the topic?
]]></search>
<add><![CDATA[
// Can the user merge the doble post?
if ($message['can_merge'])
echo '
<li><a href="', $scripturl, '?action=post2;merge=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', $merge_button, '</a></li>';
]]></add>
</operation>
</file>
--- End code ---
Hopes this helps out other people who still want to use the "Core" theme for their 2.0 forums or are making a theme based off the core theme. ;)
I also put in the "error="skip"" command in case people had already deleted the core theme to save space so the installer wouldn't reject the addon because of it being missing.
gevv:
--- Quote from: Geor'G on June 11, 2011, 12:04:28 PM ---
--- Quote ---how to use this mod on rc5?
--- End quote ---
Works - smf rc4-rc5
Fix, update
--- End quote ---
thanks @Geor'G smf 2.0.2 works
problem: automatically added to the post title "\"
http://postimage.org/image/qqv1k8z8b/
sample
merge post add auto "\" merge again add "\" merge again add "\"
luuuciano:
I have reported it on #526... then PM Geor'G about that, he said that did not have that problem (odd)
To "solve" it I have erased the addslashes function on Subs-Post.php
// $_REQUEST['subject'] = $_POST['subject'] = addslashes(un_htmlspecialchars($row['subject']));
$_REQUEST['subject'] = $_POST['subject'] = un_htmlspecialchars($row['subject']);
So... no addlashes...... I have tried adding odd things on subjects, ', ", etc... without problems
Is that safe??
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version