Mail Notification v6

by Mottie

Description

This mod opens a popup to notify you if you have a new mail message. It was written for users who wish to hide their top menu bar (state bar/log in bar). Or if you just want a bigger message telling you that you have mail. I've set it up to open either a growl window (timed popup) or a facebox (popup you have to close).

For more information on the custom variables, please see this post.
To style the growl window (pictured above), use the "Growl Window Styling" Mod or refer to this post.
To style the Facebox popup window, please refer to this post.

So, after doing the Category tree via XML, I was rather bugged that I could not use that for non-paying sites so I put myself to try and get a way to make it work for those.See my post about doing this very same thing with XML<here>

After trying different ways of getting to load a Third party-hosted file, I had to settle down to using a JSON formatted file.

While JSON is very good for machine to machine interaction, I personally dislike it for manual edits, as I think its far too easy to make a syntax mistake that's going to be hard to find. Nevertheless, the ability to load cross-domain data is invaluable.

So, hoping this may be useful for somebody.. here it is..

I was having some trouble this time getting everything into a single post, so I have split into multiple parts. See below.

Step 2- Tweak the Data File to your own needs, by adding, deleting, renaming categories, adding links etc. Use the Category Template and Link template included.Keep in mind the following things:-Be VERY careful with opening and closing brackets.- A category has a name and a cItems collection; each cItems collection is enclosed by []- A link has a name and an URL.- a cItems collection can contain categories, links, or a mix of both- Each item (category or link) in itself is enclosed by {}- you can have empty collections. in this case, a single row item will be generated with the text 'This category has no items yet"- Be VERY careful with commas after each item. The LAST item in a collection does NOT have accoma after it.

Save this updated data file (keep the.js extension) and upload it to your 3rd paty host. Lets say the link is now "http://your.host.com/myJsonTreeData.js"

Additional customizations:There are a couple additional things you can do with this:

A- More than 1 Category Tree in the same page:- Rename the variable var jsonCatTreeSample in the data file and in the script calljsonCatTreeToHTMLList('CatTreeName',jsonCatTreeSample)to two different things (Tree1 and tree2, or whatever), -rename the CatTreeName in the script call jsonCatTreeToHTMLList('CatTreeName',jsonCatTreeSample) to TreeName1 and TreeName2, or whatever - (this is required to uniquely identify all items in the tree)- Rename the root list <ul id="CategoryTree" > and the root list call $('#CategoryTree') to something else (CatTree1 and CatTree2, or whatever)

B- Modify the click actionSee the linestrHTML+=" href=\""+itemsArray [ i ].lUrl //Customize this line for additional functionalityin the main script? You can customize this to do other things onclick/onhover etc instead of just opening a link (need to know a little bit of javaScript thou).

B.1- Use an Iframe to show content in the right side->For example, you can combine this with Mottie's excellent'Embedded page Selection' script to produce an embedded selection of external links, with a categorized Tree.You can see this particular tweak at my test site <here>I can't guarantee I'lll keep that permanently, as I poke around a lot, but I'll try to keep it for some time.

B.2-replace and inject the content if a <div> section in the right side->Or, you can do it with internal links, say, to your forums, and useRansim's Right content script, as seen <in this post>

B.3-Mix Inject code for local links with open new page for external links-> You can use ransim's code as above for local links, and force open new page for external links. You can seee this particular tweak in my main site's 'Shadowpedia' <here>

-> Or, you can add a rel="facebox" to the anchors, and generate a facebox-style Image gallery....

If you're doing the B.3-Mix Inject code for local links with open new page for external links in a 'right side box' tweak as described above, I have found that the jQuery.load method reacts differently in IE and FF, and occasionally generates a 'permission denied' error, even when loading pages that are in the same domain. I really haven't been able to understand 'why' it does it, but IE being IE....

If you find this same problem when applying the code above, the following fix should work:

In the 'right side box', remove the jQquery code and leave ONLY the DIV that you will be using for displaying the results, as such:

<div id="LinkContent">Click on a Link at the left...</div>then, modify the script you use in the Gallery tree in the left side, and use the following version (either included in a tag, or saved to a file and loaded) - I prefer to save it, as i reuse the same script in other parts of the site as well:

This should correct the problem with IE and work both in IE and FF, by using the jQuery get methond instead of load, and pre-checking for the "guildportal.com" domain so it will show it at the right side, or will open a new window if it is an external link, therefore avoiding the cross-domain security problem.

GuildPortal™ Axiom Shift, LLC. All Rights Reserved. All game-related trademarks are properties of their respective owners. Several adorable monkeys were harmed during the creation of this site, and for that, we are wholly unapologetic.