Latest news from Messenger Stuff:
 
Time: 01-08-2009, 04:31 PM Hi, Guest! (LoginRegister)
January Poll: Have you shifted away from instant messaging to social networking in recent years? tell us here.
Notice: Guests can now post in the help and support forums. Read more ...


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Skins] HOW TO - Hide advertisements and other elements with MsgPlus!Live 4.5 skinning feature
12-05-2007, 06:04 PM (This post was last modified: 12-20-2007 04:53 PM by the andyman.)
Post: #1
[Skins] HOW TO - Hide advertisements and other elements with MsgPlus!Live 4.5 skinning feature
I figured that if the thread gets deleted from Msghelp, because of Patchou's strict rules on information regarding ad removal in messenger it can live on here, where we host skins with ad's removed.

In this tutorial I'll show you how to hide the advertisements from the contact list in 2 ways; Forced Hiding and Using Plus Options

NOTE: Skins WILL NOT be accepted on the forum or Official Skins Database if they already have hidden or have a visible option to hide the adverts from messenger

However, a skin may have the options commented out using <!-- and --> around the Plus Option (So that users can modify the skin by themselves, to display the option)
And/Or, a packaged skin may include a HideAds.reg file to enable the ad hiding functions.

These will both be accepted into the database and forums. On to the Tutorial!

Creating a new Skin

• Firstly extract the resources of your current messenger version, this can be done via Messenger Plus' own Skinning section within it's preferences. Navigate to Customize->Skinning and Press 'Extract Resources' from the Skin Developers Bar. This will present the extraction options window, extract to your chosen folder.

Hint: Selecting Consolidate Windows will arrange all the extracted resources into a more understandable/organised way

• Create a new folder in the Messenger Plus! Live Skins directory (usually "C:\Program Files\Messenger Plus! Live\Skins\") This will be where you place all the files related to your new skin. For now create a new folder with a name for your skin (eg. My Skin, Ads Hidden etc)

• Create a new file and call it SkinInfo.xml this is the where you will define everything your skin needs to replace, add or refer to later on.

• Edit SkinInfo.xml to have a header like so

Code:
<SkinInfo>
    <Information>
         <Name>Ads Hidden</Name>
        <Version>1</Version>
        <Description>A Skin to hide the Adverts in Messenger</Description>
        <AboutUrl>http://www.msgpluslive.com</AboutUrl>
        <Screenshot>
            <File>screenshot.png</File>
        </Screenshot>
        <Compatibility>
            <MsgVersion Major="8" Minor="0"/>
            <MsgVersion Major="8" Minor="1"/>
            <MsgVersion Major="8" Minor="5"/>
            <MsgVersion Major="9" Minor="0"/>
        </Compatibility>
    </Information>

NOTE: The Compatibility section restricts what version of Messenger your skin will load on, so you can make a skin only for WLM8.5 if you want too, and not allow/support WLM8.1, in the long run this helps avoid any issues your skin might pose to other versions of Messenger people may be using.

If you do not know what version of Messenger you have, you can find out by opening Messenger and on the Menu Bar (File, Contacts, Actions etc) Go to Help->About Messenger a window will be displayed that shows the version that you are running. Eg Version 8.1.0178 would translate to <MsgVersion Major="8" Minor="1"/>



Starting to Skin

You need to tell SkinInfo.xml what to replace so after </Information> you will need code similar to the example below
Code:
    <MessengerSkin>
        <ResGroup>
            <Restrictions>
                <MsgVersions>
                    <Version Major="8" Minor="5"/>
                    <Version Major="9" Minor="0"/>
                </MsgVersions>
            </Restrictions>

Everything inside the
<MessengerSkin> tag is part of what will be skinned
<ResGroup> can be used to separate sections, for instance a resgroup for replacing items only in 8.0 and another for 8.1 and so on.
<Restrictions> This can be used to restrict a Resgroup to only alter WLM 8.0 and 8.5, or only 8.5 etc (Essential for compatibility between different WLM Versions)

This tells the Group what to do basically.



Replacing Resources

After Restrictions Add <Resources><Replace>
Code:
    <MessengerSkin>
        <ResGroup>
            <Restrictions>
                <MsgVersions>
                    <Version Major="8" Minor="5"/>
                </MsgVersions>
            </Restrictions>
            <Resources>
            <Replace>
Everything inside <Replace> gets (Guess what! ;)) Replaced :d

So you'll want to add a code like this

Code:
<Resources>
            <Replace>
                <Windows>
                        <Definitions>
                            <Definition Id="920"><File>920 Definition.txt</File></Definition>
                            <Definition Id="923"><File>923 Definition.txt</File></Definition>
                            <Definition Id="949"><File>949 Definition.txt</File></Definition>
                        </Definitions>                    
                </Windows>
            </Replace>
    </Resources>

This is telling plus to replace the Window Definitions of Messenger with modified ones (there are other tags such as <styles> and <strings> but these are not needed for these modifications).

920 is the Chat Window, 923 Contact List Window and 949 is the Sharing Folders Window, all contain Advertisements.

Copy these definitions from your earlier extracted resources into your skin directory, if you haven't already, as now it's time to get editing! (H)



Editing Definitions - Forced Hiding

• Open up your skin directory's copy of 920 Definition.txt in the editor of your choice.

• Press "Ctrl+F" to bring up the search box, search for adbannergutter It should bring you to a line that says:
Code:
<Element layoutpos=bottom layout=filllayout() id=atom(adbannergutter)>

• To force hide the ad change "layoutpos=bottom" to "layoutpos=none"
This will hide the advert.

This method is the same for most Elements you may want to hide. So..

• Open up 923 Definition.txt and search for "SSConstrainer" It should bring you to:

Code:
<Element layoutpos=bottom layout=borderlayout() padding=rect(4,0,4,0)>
<Constrainer layoutpos=top ID=Atom(SSConstrainer) Layout=FillLayout()>

Notice the line above SSConstrainer has layoutpos=bottom" so...

• Change that as you did before to "layoutpos=none"

And Finally...

• Open up 949 Definition.txt and search for "adbannercont" It should bring you to:

Code:
<Element layoutpos=bottom layout=filllayout() ID=Atom(ai570)>
<element id=atom(adbannercont) layout=filllayout() layoutpos=bottom>

Notice the line above adbannercont has layoutpos=bottom" so once again...

• Change that to "layoutpos=none"

And you're done!

Save all files, apply the skin via Plus' Preferences and restart messenger the advertisements should now be gone :d



PlusSkin Option Hiding

I highly recommend that you use this feature instead of force modifying anything!

Using Plus' Advanced Options you can let users decide what features they want or don't want in their messenger, as mentioned previously, if you plan on releasing your skin on the forums or the database you are not allowed to display the option to remove ads, instead you should comment out the code in SkinInfo.xml that enables the Ad Options And/Or include a HideAds.reg that will modify the registry values to enable ad hiding

Don't worry I'll show you how to do both ;) all other options (such as removing buttons or the search bar can stay uncommented, so it might be of benefit to you if I show you how a code is formed anyway)

If you plan on using a HideAds.reg you don't even need to add the code below to SkinInfo.xml because when merging the HideAds.reg into the Registry, it will enable the function, without having plus create the option for it

But of course if you do not wish to release the skin onto the forums or official database, you are free to leave the options available :)

So, on with the show...

Commenting Out Code

If you add commenting marks around a section, that section will not be loaded, commenting can be used for organization purposes, so you can easily distinguish a particular code segment's purpose or for disabling a particular piece of code

• Open up SkinInfo.xml and add beneath the header section but before <MessengerSkin>
Code:
    </Information>
    <Options>
        <Skin>
            <Properties>
                <!--
                <BoolVal Name="RemListAd"><DispLabel>Hide Advertisment (Contact list)</DispLabel><Default>false</Default></BoolVal>
                <BoolVal Name="RemChatAd"><DispLabel>Hide Advertisement (Chat Window)</DispLabel><Default>false</Default></BoolVal>
                <BoolVal Name="RemShareAd"><DispLabel>Hide Advertisement (Sharing Folder Window)</DispLabel><Default>false</Default></BoolVal>
                -->
            </Properties>
         </Skin>
    </Options>

The <!-- defines the beginning of a comment section the --> defines it's end, items between will not be loaded along with the skin.

Editing Definitions for PlusSkin Options

• Open up your skin directory's copy of 920 Definition.txt in the editor of your choice.

• Press "Ctrl+F" to bring up the search box, search for adbannergutter It should bring you to a line that says:
Code:
<Element layoutpos=bottom layout=filllayout() id=atom(adbannergutter)>

• To add a PlusSkin option to allow you to hide the ad change "layoutpos=bottom" to "<*PlusSkin Conditions(RemChatAd = false)*>layoutpos=bottom</*PlusSkin*> <*PlusSkin Conditions(RemChatAd = true)*>layoutpos=none</*PlusSkin*>"
This will hide the advert if the option is true, if not it will leave the advert alone.
RemChatAd is the name I decided to give this command, notice it matches the same in the SkinInfo.xml

This method is the same for most Elements you may want to hide with the *PlusSkin* command. So let's continue..

• Open up 923 Definition.txt and search for "SSConstrainer" It should bring you to:

Code:
<Element layoutpos=bottom layout=borderlayout() padding=rect(4,0,4,0)>
<Constrainer layoutpos=top ID=Atom(SSConstrainer) Layout=FillLayout()>

Notice the line above SSConstrainer has layoutpos=bottom" so...

• Change that as you did before, but giving it a different title (I've used RemListAd) "<*PlusSkin Conditions(RemListAd = false)*>layoutpos=bottom</*PlusSkin*> <*PlusSkin Conditions(RemListAd = true)*>layoutpos=none</*PlusSkin*>"

And Finally...

• Open up 949 Definition.txt and search for "adbannercont" It should bring you to:

Code:
<Element layoutpos=bottom layout=filllayout() ID=Atom(ai570)>
<element id=atom(adbannercont) layout=filllayout() layoutpos=bottom>

Notice the line above adbannercont has layoutpos=bottom" so once again...

• Change that to to have a *PlusSkin* attribute (I chose to name this one RemShareAd) "<*PlusSkin Conditions(RemShareAd = false)*>layoutpos=bottom</*PlusSkin*> <*PlusSkin Conditions(RemShareAd = true)*>layoutpos=none</*PlusSkin*>"

And you're done Editing the Definitions!!!

If you did not <!-- comment out --> the options in SkinInfo.xml then Plus will automatically generate an options window that can be accessed by the preferences->Customize->Skins "Skin Options" button.
Or the plus button on the contact list->Messenger Skin->Skin's Options



Creating a HideAds.reg

So You've decided to release your skin publicly via these Forums or the Skins Database, GREAT! Your skin has the potential to be used by Millions of Messenger Plus Users! :d

But you want users to hide ads with a HideAds.reg have no fear, I can help you do this one too!

• In the Skin Directory create a new file call it HideAds.reg

• Right Click the file and choose 'Edit' it should open in notepad

• Add this code to the file.

Code:
; Purpose: Enables the options to Hide Advertisments in Beaver and Steve Skin.
; Created by aNILEator, 2007-11-25

[HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\GlobalSettings\Skins\Ads Hidden\Settings]
"RemChatAd"=dword:00000001
"RemListAd"=dword:00000001
"RemShareAd"=dword:00000001

Where Ads Hidden is the name of your skin as defined in SkinInfo.xml

• Save and exit

• Now if you run/merge HideAds.reg it should enable the advertisement hiding functions you defined as *PlusSkin* options

Now you can zip the contents of your skin directory and submit it to the Skins Database or upload here on the forums!

And that's the end of this [How To] you should have learnt a lot in an easy to follow format (That's what I hope anyway)

If this has been of particular help to you please take the time to thank me below for taking over 6 hours to type it out all for free (8-) I'm crazy)

And/Or please leave a reputation point for me please by clicking the star.

Thank You

Nile

[Image: star.gif]
Rate Me.

This Tutorial May Not Be Copied Without My Permission, Please Contact me for permission :)

Contact Me

[Image: eg.png][Image: wlm.png][Image: skype.png][Image: yim.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
12-05-2007, 08:47 PM (This post was last modified: 12-05-2007 08:48 PM by Chris.)
Post: #2
RE: [How To] - Hide Advertisements, and other elements with MsgPlus 4.5 Skinning feature
Great Work :).

I've pinned it to the top of the forum.

Chris
Messenger Stuff - Management
MyBB Group - Software Quality Assurance Team
Visit this user's website Find all posts by this user
Quote this message in a reply
12-05-2007, 10:17 PM
Post: #3
RE: [How To] - Hide Advertisements, and other elements with MsgPlus 4.5 Skinning feature
That's one hell of a tutorial, except it's not out yet ;o. Oh well, I'll be sure to try it later on ;) (I myself haven't even had enough time to dedicate to anything but confirming bugs and finding bugs by normal use).

[Image: 1.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
07-15-2008, 04:40 AM
Post: #4
RE: [Skins] HOW TO - Hide advertisements and other elements with MsgPlus!Live 4.5 skinning feature
Thank you for all the commentary Premier

Let's see here a great effort

Thank you very much
Find all posts by this user
Quote this message in a reply
Post Reply 


[-]
Quick Reply
Message
Type your reply to this message here.


Image Verification
Image Verification
(case insensitive)
Please enter the text within the image on the left in to the text box below. This process is used to prevent automated posts.

Forum Jump: