What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Skinning » [How To] - Hide Elements, Forced Hiding and Options

Pages: (3): « First [ 1 ] 2 3 » Last »
[How To] - Hide Elements, Forced Hiding and Options
Author: Message:
aNILEator
Skinning Contest Winner
*****

Avatar
...in the wake of the aNILEator

Posts: 3718
Reputation: 90
35 / Male / Flag
Joined: Oct 2003
Status: Away
O.P. [How To] - Hide Elements, Forced Hiding and Options
In this tutorial I'll show you how to hide elements from messenger.

In this example You will learn how to hide the search bar from the contact list.

There are 2 ways of hiding elements Forced Hiding and Using *PlusSkin* Options This tutorial covers both methods and provides additional information.

Although this tutorial will only show how to hide the search bar element the same methods can be used to hide most elements.

NOTE: Skins WILL NOT BE ACCEPTED on the forum or Official Skins Database if they force hide advertisements or have a visible option to hide the adverts from messenger

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, Hide The Search Bar 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>Hide The Search Bar</Name>
        <Version>1.00</Version>
        <Description>A Skin to hide the Search Bar 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 and compatibility with 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="923"><File>923 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).

923 is the Contact List Window which we will be editing later on.

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

HINT: If you plan on creating a skin that modifies lots of files, you may want to organize them into folders, or copy over the whole contents of the Consolidated Windows Folder to your skin's directory, this may help you to keep things organized.



Editing Definitions - Forced Hiding

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

• Press "Ctrl+F" to bring up the search box, search for idSearchContainer It should bring you to some lines that say:
code:
<Element layoutpos=bottom padding=rect(8,0,8,8) layout=filllayout() ID=Atom(ai217)>
<element id=atom(idSearchContainer) layout=filllayout() padding=rect(4,0,4,4)>


Notice that in the line above there is a "layoutpos=bottom" specified, to hide the Search Bar you want to edit this attribute.

• To force hide the Search Bar change "layoutpos=bottom" to "layoutpos=none"
This will hide the Search Bar from the contact list.

This method is the same for most Elements you may want to force hide.
If an element that you want to hide does not have a layoutpos to modify, you can add one, it may work depending on the element. Give it a go :)

So..

Save all files, apply the skin via Plus' Preferences and restart messenger the Search Bar Element should now be gone :D

HINT: Sometimes Element ID's change between messenger versions, so it's best to check before you edit anything, that you are editing the correct line.



*PlusSkin* Options 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.

The options are enabled via the registry so a .reg file could be included with your skin to activate any options that you are otherwise not allowed to display in the options window for your skin ;)

Putting <!--Comments Tags--> around an option will also not allow it load in your skins Options Window
Unless the tags are removed or the option is enabled via the registry.

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

Comment Tags can also be used for organization purposes, so you can easily distinguish a particular code segment's purpose or for disabling a particular piece of code that you perhaps are still working on and do not want loaded at the moment.

So, on with the show...

Adding Options to the Options Window

Messenger Plus will automatically generate an options box when you define your options in SkinInfo.xml so here's how to add options.

• Open up SkinInfo.xml and between </Information> and <MessengerSkin> add the following
code:
    </Information>
    <Options>
        <Skin>
            <Properties>
                <BoolVal Name="RemSearchBar"><DispLabel>Remove The Seach Bar (Contact list)</DispLabel><Default>false</Default></BoolVal>
            </Properties>
         </Skin>
    </Options>
    <MessengerSkin>

This will then generate a check box option that will enable/disable the registry setting for RemSearchBar

As I'm sure you'll notice, there are attributes in use
One defines the "Name" of the option, this will be what registry item is affected by the check box state.
The other is the description that is displayed alongside the check box in the Options Window.

So now we've told Plus what to modify in registry, we need to actually create the code for RemSearchBar to work

Editing Definitions for *PlusSkin* Options

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

• Press "Ctrl+F" to bring up the search box, search for idSearchContainer It should bring you to some lines that say:
code:
<Element layoutpos=bottom padding=rect(8,0,8,8) layout=filllayout() ID=Atom(ai217)>
<element id=atom(idSearchContainer) layout=filllayout() padding=rect(4,0,4,4)>


• To add a *PlusSkin* option to allow you to hide the Search Bar change "layoutpos=bottom" to "<*PlusSkin Conditions(RemSearchBar = false)*>layoutpos=bottom</*PlusSkin*> <*PlusSkin Conditions(RemSearchBar = true)*>layoutpos=none</*PlusSkin*>"

Here we've defined a true and false statement for the *PlusSkin* option to follow.

If the option is turned off (false) then layoutpos=bottom.
If the option is turned on (true) then layoutpos=none

So this will hide the Search Bar if the option is true, if not it will leave it alone.

RemSearchBar is the name I decided to give this option, notice it matches the same in the SkinInfo.xml, this is so the option in SkinInfo.xml affects the code we just written.

HINT: You can alter several elements with one option just use the same "Name" this could be useful for having an option to centre align all toolbars at once, or hide multiple elements all at once ;)

This method is the same for most Elements you may want to hide with the *PlusSkin* command.

And now you're done Editing the Definitions!!!

NOTE: 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 HideElement.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 be able to hide certain elements that you're restricted on adding an option for have no fear, I can help you do this one too!

We're going to to create a HideElement.reg file

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

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

• Add this code to the file.

code:
; Purpose: Enables a PlusSkin option via the registry.
; Created by aNILEator, 2007-12-06

[HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\GlobalSettings\Skins\Hide The Search Bar\Settings]
"RemSearchBar"=dword:00000001

Where Hide The Search Bar is the name of your skin as you set in SkinInfo.xml

• Save and exit

• Now if you run/merge HideElement.reg it should enable the RemSearchBar functions you defined as a *PlusSkin* option

HINT: You can define more values to be adjust by creating a new line for each item, like so

code:
[HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\GlobalSettings\Skins\Hide The Search Bar\Settings]
"RemSearchBar"=dword:00000001
"RemOtherItem"=dword:00000001
"RemAnotherItem"=dword:00000001

Now you can zip up the contents of your skin directory
Rename it from SkinNameHere.zip to SkinNameHere.plsk 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 (and another 3 hours+ editing it all over again :dodgy:) 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 :)
12-06-2007 09:04 PM
Profile PM Web Find Quote Report
riahc4
Veteran Member
*****


Posts: 1073
Reputation: -18
– / Male / Flag
Joined: Aug 2004
Status: Away
RE: [How To] - Hide Elements, Forced Hiding and Options
quote:
Originally posted by aNILEator

NOTE: Skins WILL NOT BE ACCEPTED on the forum or Official Skins Database if they force hide advertisements or have a visible option to hide the adverts from messenger

IMO this is unfair; Patchou should be the one that removes the code for a skin to remove the ads. Some great skins will problably come out and because of hiding the ad banner they wouldnt be in the database. IMO unfair but hey; Its Patchou's software.
12-16-2007 10:21 PM
Profile PM Find Quote Report
prashker
Veteran Member
*****


Posts: 5109
Reputation: 104
– / Male / –
Joined: Mar 2005
Status: Away
RE: [How To] - Hide Elements, Forced Hiding and Options
quote:
Originally posted by riahc4
quote:
Originally posted by aNILEator

NOTE: Skins WILL NOT BE ACCEPTED on the forum or Official Skins Database if they force hide advertisements or have a visible option to hide the adverts from messenger

IMO this is unfair; Patchou should be the one that removes the code for a skin to remove the ads. Some great skins will problably come out and because of hiding the ad banner they wouldnt be in the database. IMO unfair but hey; Its Patchou's software.

Uh. No. Just no.
12-16-2007 10:23 PM
Profile PM Find Quote Report
riahc4
Veteran Member
*****


Posts: 1073
Reputation: -18
– / Male / Flag
Joined: Aug 2004
Status: Away
RE: [How To] - Hide Elements, Forced Hiding and Options
quote:
Originally posted by SonicSam
quote:
Originally posted by riahc4
quote:
Originally posted by aNILEator

NOTE: Skins WILL NOT BE ACCEPTED on the forum or Official Skins Database if they force hide advertisements or have a visible option to hide the adverts from messenger

IMO this is unfair; Patchou should be the one that removes the code for a skin to remove the ads. Some great skins will problably come out and because of hiding the ad banner they wouldnt be in the database. IMO unfair but hey; Its Patchou's software.

Uh. No. Just no.
"Uh. No. Just no" what? That it is unfair and even though its Patchou's software he should allow it? :rolleyes:


If you rebutel someone's opinion, state the reasons. Other than that you just made yourself look like another "+1" poster.
12-17-2007 12:08 AM
Profile PM Find Quote Report
aNILEator
Skinning Contest Winner
*****

Avatar
...in the wake of the aNILEator

Posts: 3718
Reputation: 90
35 / Male / Flag
Joined: Oct 2003
Status: Away
O.P. RE: [How To] - Hide Elements, Forced Hiding and Options
quote:
Originally posted by riahc4
IMO this is unfair; Patchou should be the one that removes the code for a skin to remove the ads. Some great skins will problably come out and because of hiding the ad banner they wouldnt be in the database. IMO unfair but hey; Its Patchou's software.

There's a word called respect. It's flaunted around a lot these days but less people seem to actually use or believe in it.

You claim to have beta tested Messenger for Microsoft for 5 years now. Surely you have respect for them. Surely.

Why should you have respect for the Messenger Team?
They spend months and years creating software for the masses to freely communicate with each other.
The Ads are the main source of income for the Messenger team, same for Patchou.
A donation of all the money from clicked ads (at least for the American branch) goes towards charities (for more information research into the "I'm" emoticon)

It was Patchou's decision that Ad Removal shall not be permitted in the official skins Database out of respect for the Messenger team AND for the future of Messenger Plus!

He has stated that Microsoft could easily submit a cease and desist request or deliberately force lock out all add-ons

If you enjoy having free stable software you should respect the authors for taking their time to provide you with it. It's not a right to have software for free.

In recent times you have shown a lack of respect for software authors and this community, which saddens most of us, you need only see your reputation to see something isn't right here.

Personally I think you're stamping on thin ice recently, I suggest you think about how much effort and time people like you and I have put into creating software, tutorials, skins, scripts or anything and that it is not a right to expect compatibility and updates, the exception for this would be paid software where you sign into an agreement or contract. Even then there are exceptions and limitations.

So have some more respect for peoples opinions and wishes, and do some research into subjects before posting your own.

P.S I have a hell of a lot more respect for Sam, than I do for you riahc4, even though Sam can be the most annoying thing in the world ever, he's never rude or hurtful, I will always help him where needed (even if he keeps annoying me whilst completely re-coding his skin :P)

This post was edited on 12-17-2007 at 12:27 AM by aNILEator.
12-17-2007 12:18 AM
Profile PM Web Find Quote Report
stuartbennett
Senior Member
****

Avatar

Posts: 952
Reputation: 1
43 / Male / Flag
Joined: Nov 2003
RE: [How To] - Hide Elements, Forced Hiding and Options
it was a good tutorial i have learnt something from this, yesterday you refered me to this thread so i might learn how to fix my skin, i have learnt something from reading this but still am baffled on how to fix my skin.

anyways great tutorial.
12-18-2007 08:49 PM
Profile E-Mail PM Web Find Quote Report
piper
New Member
*


Posts: 5
Joined: Dec 2007
RE: [How To] - Hide Elements, Forced Hiding and Options
it doesn't work
the registry file won't merge

i opened notepad and saved the file as "HideElements.reg" and it showed a registry icon, but it won't merge

help!

and of course, the search bar is still there
12-19-2007 10:37 PM
Profile E-Mail PM Find Quote Report
aNILEator
Skinning Contest Winner
*****

Avatar
...in the wake of the aNILEator

Posts: 3718
Reputation: 90
35 / Male / Flag
Joined: Oct 2003
Status: Away
O.P. RE: [How To] - Hide Elements, Forced Hiding and Options
Piper I'm annoyed at you, you sent me a fairly polite PM but on here you're quite demanding and accusing.

I can assure you this works as it's mostly taken from Beaver and Steve Skin.

If my tutorial didn't work there would have been a lot more complaints by now too.

Please follow the instructions I sent via PM and report
12-20-2007 12:05 AM
Profile PM Web Find Quote Report
stuartbennett
Senior Member
****

Avatar

Posts: 952
Reputation: 1
43 / Male / Flag
Joined: Nov 2003
RE: [How To] - Hide Elements, Forced Hiding and Options
thanks AnilEator, after extensively looking through my skininfo file i realises that in the different resgroups where i declare multival what i had been doing was

quote:
<MultiVal Name="Bottom">Bottom</MultiVal>


instead of

quote:
<MultiVal Name="WordWheelLoc">Bottom</MultiVal>


as my multival option defined in the options section earlier in the file defined the properties name as WordWheelLoc thats what the resgroup had to read to know to use that property so my skin now works again.

my newest problem is i have followed the tutorial in thread, obviously i have done something wrong but not entirely sure as to what yet, in relation to my word wheel element which can be found on line 3 of the 1001 definitions file it originally had the following

quote:
<Element LayoutPos=Bottom Layout=BorderLayout() BorderThickness=rect(0,0,0,1) Padding=Rect(0,0,2,0) ID=Atom(ai641) Background=rgb(255,255,204)>


the problem is that in the above tutorial the example given only shows how to set one action for if that condition is true, i tried to be smart and though, well these options have only got spaces as a seperater between them in there normal layout so if i put background text next to the layout position text with only a space as a seperater then i can make it use one colour as a background if wordwheel is at top and another if its at the bottom, clearly i was wrong.

below is the code i tried to use, if there are special seperaters to be used in plusskin tags when modifying multiple settings could you please advise what they are?

quote:
<Element <*PlusSkin Conditions(WordWheelLoc = Bottom)*>LayoutPos=Bottom Background=rgb(255,255,204)</*PlusSkin*> <*PlusSkin Conditions(WordWheelLoc = Top)*>LayoutPos=Top Background=rgb(210,237,247)</*PlusSkin*>


i appreciate your a busy person, however as you suggested a few days ago i have used this tutorial to solve most of my problem and only have this minor query on syntax to be answered, the result of my actions interestingly enough is that the background behind the sort your contact & add contacts buttons remains white and the bar is permanantly affixed to the bottom regardless of whether the user selects top or bottom in the skin options.

i also added the remove searchbar option to y skin it works great by the way, i really appreciate it, i have added a positive point to your reputation as you really do deserve credit for all your hard work on this tutorial.

EDIT:

thanks anileator for helping me with this we must of spent like over an hour or so on messenger working on this, well mainly you working to be fair, anyways you know how in 8.5 we had to put the entire element tage in each pluskin tag for the word wheel i was forced to do the same with my searchbar option too just thought i should let you know.

This post was edited on 12-20-2007 at 09:12 PM by stuartbennett.
12-20-2007 01:37 PM
Profile E-Mail PM Web Find Quote Report
djdannyp
Elite Member
*****

Avatar
Danny <3 Sarah

Posts: 3546
Reputation: 31
38 / Male / Flag
Joined: Mar 2006
RE: [How To] - Hide Elements, Forced Hiding and Options
Kinda after an answer from Patchou here (as I couldn't PM :P).....

I'm just starting to prepare a release version of my skin (top secret until now!)

I have included a reg key to hide the adverts, however one feature of my skin is to put a picture in the space created by the removal of the contact list adverts

I know that explicit options to remove adverts aren't allowed for the official skins database......however would it be possible for me to put in an option to "Display third picture", which would, in turn, remove the adverts to display the third picture in the set.  This option could be set to false by default if you so wished

I understand if you don't want me to do this......it's just a rather key feature of the skin and otherwise i'd have to find some way of publicising the reg key (any ideas on that front?)

Any [constructive] answers welcome
[Image: 1ftt0hpk-signature.png]
AutoStatus Script || Facebook Status Script
5426 days, 9 hours, 59 minutes, 41 seconds ago
12-21-2007 02:09 AM
Profile E-Mail PM Find Quote Report
Pages: (3): « First [ 1 ] 2 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On