Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: vbgamer45 on January 12, 2013, 10:13:21 PM

Title: MSN Remover
Post by: vbgamer45 on January 12, 2013, 10:13:21 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=3609)

MSN Remover


SMF Version: 2.0.X and 1.1.X
Mod Version: 1.0

Description:
In March Microsoft is removing MSN and merging it into Skype, so with this here is a mod that will remove MSN from your forum files.

This mod does not install Skype and I suggest people look at Additional Instant Messengers (http://custom.simplemachines.org/mods/index.php?mod=3338) by hcfwesker (http://www.simplemachines.org/community/index.php?action=profile;u=244295).

Changelog:

v1.0
Initial Release

Thanks
I would like to thank hadesflames and Shawn Gossman for testing and bug fixing this mod.

Why Not Visit:
http://www.smfhacks.com (http://www.smfhacks.com)
Title: Re: MSN Remover
Post by: Arantor on January 12, 2013, 10:20:21 PM
Where's the like button?
Title: Re: MSN Remover
Post by: hcfwesker on January 21, 2013, 12:03:07 PM
I was actually fixing to go through the gruelling process of manually removing MSN when the time came, then saw this listed as a new MOD on the mod page.  Very Nice!
Title: Re: MSN Remover
Post by: Deaks on January 21, 2013, 12:51:29 PM
i did all the work for you lol :D
Title: Re: MSN Remover
Post by: Deadfire on March 14, 2013, 02:09:52 PM
just a small bug when running it in 2.0.4, seems you have "MemberList.php" instead of "Memberlist.php" otherwise it's awesome :)
Title: Re: MSN Remover
Post by: Deaks on March 14, 2013, 02:20:54 PM
thanks I will update when I get back :)
Title: Re: MSN Remover
Post by: Burke ♞ Knight on December 27, 2014, 10:46:37 AM
I found an issue, when uninstalling. You can not just do a remove of code, without a point to have, when uninstalling. I do not know how that got missed, but here's what I'm talking about:

Profile.template.php

<operation>
<search position="replace"><![CDATA[ <td align="center">', $member['msn']['link'], '</td>
]]></search>
<add><![CDATA[]]></add>
</operation>


It tells to remove it, but there's nothing to tell where to re-add it, when uninstalling, which causes it to be added to the top of the file, breaking the page's format, as well as leaving text at the very top.

Now, that also makes it hard for people, as they have NO idea where to manually re-add the code. :P

EDIT:

Apparently, it never actually removes the code, too.
Title: Re: MSN Remover
Post by: Burke ♞ Knight on December 27, 2014, 10:55:50 AM
<file name="$sourcedir/Memberlist.php">
<operation>
<search position="replace"><![CDATA[),
'msn' => array(
'label' => $txt['msn'],
'width' => '30'
),]]></search>
<add><![CDATA[),]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[ ),
'msn' => array(
'down' => 'LENGTH(mem.msn) > 0 ASC, IFNULL(mem.msn, 1=1) DESC, mem.msn DESC',
'up' => 'LENGTH(mem.msn) > 0 DESC, IFNULL(mem.msn, 1=1) ASC, mem.msn ASC'
),]]></search>
<add><![CDATA[),]]></add>
</operation>
<operation>
<search position="replace"><![CDATA['msn', 'aim',]]></search>
<add><![CDATA['aim',]]></add>
</operation>
</file>


Really?

You know, when uninstalling, how many times ), shows up in that file? 30 times, and you expect SMF and people to know which of those are the correct ones to replace?
Title: Re: MSN Remover
Post by: vbgamer45 on December 27, 2014, 12:13:19 PM
I didn't make the mod originally it was transferred for me will look into it though
Title: Re: MSN Remover
Post by: Burke ♞ Knight on December 27, 2014, 12:19:18 PM
Yeah, I was wondering about that. I know you well, and I was shocked to see such issues with one of your mods...

I know you are way better of a coder to have this happen, and was shocked.... LOL
Title: Re: MSN Remover
Post by: vbgamer45 on December 27, 2014, 12:21:33 PM
Yeah I never do such small replacements since I know those cause issues
Title: Re: MSN Remover
Post by: vbgamer45 on December 27, 2014, 03:25:48 PM
Update! Made the edits a little more unique for better uninstall
Title: Re: MSN Remover
Post by: Burke ♞ Knight on December 27, 2014, 08:37:12 PM
(http://bkd.pw/bk_like.png)
Title: Re: MSN Remover
Post by: taradxxx on December 27, 2014, 10:22:44 PM
thank you
Title: Re: MSN Remover
Post by: Tyler.Burton on March 12, 2015, 12:30:50 PM
I would just like to verify before I download it, this mod works with 2.0.9 and will only remove the MSN feature from profiles; am I correct?
Title: Re: MSN Remover
Post by: Deaks on March 12, 2015, 12:40:22 PM
yes
Title: Re: MSN Remover
Post by: GL700Wing on May 26, 2017, 07:44:33 AM
Just tried to install this mod but it is failing because it cannot find a non-existent file - it's looking for ./Sources/MemberList.php instead of ./Sources/Memberlist.php.
Title: Re: MSN Remover
Post by: vbgamer45 on May 26, 2017, 07:58:01 AM
Fixed updated.
Title: Re: MSN Remover
Post by: GL700Wing on May 26, 2017, 08:09:56 AM
Quote from: vbgamer45 on May 26, 2017, 07:58:01 AM
Fixed updated.
Thanks.

Still a minor issue for SMF 2.0.14 in ./Sources/Load.php which now referes to 'https' in place of 'http'

'msn' => $profile['msn'] !='' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => $profile['msn'],
'href' => 'https://members.msn.com/' . $profile['msn'],
'link' => '<a class="msn new_win" href="https://members.msn.com/' . $profile['msn'] . '" title="' . $txt['msn_title'] . ' - ' . $profile['msn'] . '"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $txt['msn_title'] . ' - ' . $profile['msn'] . '" /></a>',
'link_text' => '<a class="msn new_win" href="https://members.msn.com/' . $profile['msn'] . '" title="' . $txt['msn_title'] . ' - ' . $profile['msn'] . '">' . $profile['msn'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'real_posts' => $profile['posts'],
Title: Re: MSN Remover
Post by: GL700Wing on May 26, 2017, 09:26:35 AM
Also, removing this mod doesn't correctly undo all edits in ./Sources/ManageSettings.php because there are two lines that match the following replacement:
Find:
'icq', 'msn',
Replace with:
'icq',

The result is that the uninstall puts two  'msn',  variables on the first line and none on the second line.

Suggest using the following edits instead:
Find:
// What about standard fields they can tweak?
$standard_fields = array('icq', 'msn',

Replace with:
// What about standard fields they can tweak?
$standard_fields = array('icq',


Find:
{
$standard_fields = array('icq', 'msn',

Replace with:
{
$standard_fields = array('icq',

Title: Re: MSN Remover
Post by: GL700Wing on May 27, 2017, 12:47:43 AM
Same thing also happens in ./Sources/Load.php because there are two lines that match the following replacement:
Find:
mem.yim, mem.msn,
Replace with:
mem.yim,

Suggest using the following edits instead:
Find:
mem.member_ip2, mem.icq, mem.aim, mem.yim, mem.msn,
Replace with:
mem.member_ip2, mem.icq, mem.aim, mem.yim,

Find:
mem.birthdate, mem.icq, mem.aim, mem.yim, mem.msn,
Replace with:
mem.birthdate, mem.icq, mem.aim, mem.yim,