Eve For Enterprise    Eve Support Community    Forums  Hop To Forum Categories  Eve Community  Hop To Forums  Customization Ideas    Howto: Add items to the right menu on the portal page
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Groupee VIP
Posted
"Right menu on the portal page," you're asking? Don't know what I'm talking about? Head on over to the Groupee Nation portal page. See the island in the upper right corner of the page body? My Space, Forums, Chat, Member Directory, etc?

Ever wanted to add new menu items there? I'm sure you have. I did... and I couldn't figure out any easy way, so I just did it myself. At the request of many, I'm posting this here for your enjoyment.

Note: This involves altering your site styles, and playing around with some Javascript. This might not be for the faint of heart and/or those that aren't technically minded.

Note 2: While a Groupee employee is posting this trick, please don't take it to mean that we support doing this officially. This trick may break in a future release, as it relies quite a bit on the current structure of the page.

Note 3: I'm using DOM functions here without any sort of browser check. The script is known to work in MSIE6, Firefox, Opera 7.5, and Safari 1.2.



First, grab the zip file I'm attaching to this post. It contains a text file, with a bit of Javascript. Pop that file open in Notepad.

Visit your Groupee Community control panel, and choose Groupee Community -> Display -> Settings from the left menu.

From the list of style sets, pick the style set currently used for your portal page. If you don't know which one you're using, choose Display -> Assignments instead. It's the very first dropdown, next to the "Platform [Module-Wide]" wording.

In the style editor, choose the Custom HTML option on the left.

In the "Insert into HEAD Tag (JS/CSS Meta tags Only)" textarea, copy and paste the contents of the attached file. If you already have things there, just paste the contents of the file before what's already there.

Submit the style, then go visit your community. When you view the source of your portal page, you should see the Javascript you just inserted within the first fifty lines or so. If you don't, you aren't editing the right style. I made this mistake so, so many times.

Next, head back to the Custom HTML editor for the style. Scroll down to the "Insert in Body OnLoad (JS Only)" textarea at the bottom.

Here is where you'll insert the call to the Javascript you just inserted into your header.

As an example, here's how to add a link with the name "Test Link", and the URL http://www.groupee.com/ :

cc_insert_menu_link("Test Link", "http://www.groupee.com/", 3);


The link will be added after the third link in the island - the Forums link. Play around with the number in the third argument to place the link in different locations within the island. Lower numbers are higher on the list, while higher numbers are lower on the list. Excessively high numbers may cause problems. Keep in mind that not everyone can see every link there, including the link to the Control Panel.

You can add multiple links this way. For example:

cc_insert_menu_link("Three", "http://www.groupee.com/?3", 3);
cc_insert_menu_link("Two", "http://www.groupee.com/?2", 3);
cc_insert_menu_link("One", "http://www.groupee.com/?1", 3);


These items would appear as "One", "Two", and "Three" on the menu, in that order - you have to place then in reverse order in the box.

You can see the script in action by viewing my own site and checking out the menu on the right. Caution: Game geek content within. Smile

For my next trick... I'm determined to find a way to safely and sanely add items to the Go menu. Wish me luck!

(For the curious, yes, we're using eqdkp there... and no, there's currently no integration with Groupee Community. I'm fixing that. Wink)


--
Charles Capps


Zip/GZ archivecc_insert_menu_link_js.zip (621 Bytes, 11 downloads) The javascript file, zipped for your saftey
 
Posts: 29316 | Location: Lynnwood, WA | Registered: October 11, 2001Reply With QuoteEdit or Delete MessageReport This Post
Groupee
Posted Hide Post
Nice work Charles!

If you can find a way to stuff something into the Go menu, you will make a lot of friends here.
 
Posts: 3880 | Location: Seattle, WA | Registered: January 01, 2000Reply With QuoteEdit or Delete MessageReport This Post
Eve Developer
Aspiring Monkey
Posted Hide Post
I think he is working on that next... Not to put any pressure on Charles or anything. Big Grin


Jonmark Weber
Developer
Groupee, Inc.
 
Posts: 1887 | Location: Seattle | Registered: November 10, 2000Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Posted Hide Post
Thanks for the tip. This is working great on my site.

I'm looking forward to the day when we can add link to the "Go" menu. Smile


Sandman
OakhurstArea.com
 
Posts: 80 | Location: Oakhurst, CA | Registered: November 14, 2002Reply With QuoteEdit or Delete MessageReport This Post
Groupee
Posted Hide Post
 
Posts: 3880 | Location: Seattle, WA | Registered: January 01, 2000Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Posted Hide Post
hey Charles and all.

Charles, i followed your instructions perfectly (i think) but when i wen to my portal page (http://spaintalk.multimadrid.org/eve) to see if it worked, no "test link" showed.

in my "Insert in Body OnLoad (JS Only)" window i had a image preload script as follows ...

MM_preloadImages('http://spaintalk.multimadrid.org/custom_eve/serv_buts/accomm_on.gif',
'http://spaintalk.multimadrid.org/custom_eve/serv_buts/cellrent_on.gif',
'http://spaintalk.multimadrid.org/custom_eve/serv_buts/serv_buts/sim_on.gif',
'http://spaintalk.multimadrid.org/custom_eve/serv_buts/wifi_on.gif',
'http://spaintalk.multimadrid.org/custom_eve/serv_buts/callcards_on.gif',
'http://spaintalk.multimadrid.org/custom_eve/serv_buts/walks_on.gif')

... since i use mousover images on my portal page.

i added the "cc_insert_menu_link("Test Link", "http://www.groupee.com/", 3);" as you suggested but just plopped it in before the preload script so not sure if that is the prob.

also tried with it after the preload script and alone (removed the preload script) but no go.

any ideas?

saludos,
jez...

This message has been edited. Last edited by: Steven Benitez,
 
Posts: 94 | Location: madrid, spain | Registered: April 06, 2005Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Posted Hide Post
oh and sorry for screwing up the look of this thread by pasting that loooong preload line Frown

feel free to edit it.

saludos,
jez...
 
Posts: 94 | Location: madrid, spain | Registered: April 06, 2005Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Posted Hide Post
anyone?

does Charles still participate here?

any help? still not working on my site.

jez...
 
Posts: 94 | Location: madrid, spain | Registered: April 06, 2005Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Posted Hide Post
heloooooooooo? Confused

saludos,
jer...
 
Posts: 94 | Location: madrid, spain | Registered: April 06, 2005Reply With QuoteEdit or Delete MessageReport This Post
Eve Developer
Aspiring Monkey
Posted Hide Post
Hey,

I have email a friend'ed this thread to Charles, hopefully he will get a chance to respond soon.


Jonmark Weber
Developer
Groupee, Inc.
 
Posts: 1887 | Location: Seattle | Registered: November 10, 2000Reply With QuoteEdit or Delete MessageReport This Post
Groupee VIP
Posted Hide Post
Whoops, sorry about that! I forgot to subscribe to my own topic. Red Face

It looks like you might be missing a semicolon between the MM_preloadImages() call and the cc_insert_menu_link() call from your copy & paste above. Just put a semicolon and a space between the two. i.e:

cc_insert_menu_link(...); MM_preloadImages(...);


--
Charles Capps
 
Posts: 29316 | Location: Lynnwood, WA | Registered: October 11, 2001Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Posted Hide Post
Big Grin you da man! Smile

that did it.

saludos,
jer...
 
Posts: 94 | Location: madrid, spain | Registered: April 06, 2005Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

Eve For Enterprise    Eve Support Community    Forums  Hop To Forum Categories  Eve Community  Hop To Forums  Customization Ideas    Howto: Add items to the right menu on the portal page