Adding Roster shortcut to UU app & UA site

Support and feedback for UniUploader
UniUploader requires microsoft .net runtimes!

Adding Roster shortcut to UU app & UA site

Postby Calystos » Thu Dec 04, 2008 10:47 pm

NOTE: Please be aware this covers BOTH the UniUploader AND the UniAdmin systems, the first part of the instructions below are for the UniUploader, then below that it'll explain how to update the UniAdmin site to include the new ROSTERURL ability!

Okay, in order to add the Guild Roster shortcut to the right-click submenu along with Guild HomePage and Guild Forum, do the following.

In the MainForm.cs file

Find:
Code: Select all
                        case "HOMEURL":
                            doHomeURL(settingSplit[1]);
                            break;
                        case "FORUMURL":
                            doForumURL(settingSplit[1]);
                            break;

Change to:
Code: Select all
                        case "HOMEURL":
                            doHomeURL(settingSplit[1]);
                            break;
                        case "FORUMURL":
                            doForumURL(settingSplit[1]);
                            break;
                        case "ROSTERURL":
                            doRosterURL(settingSplit[1]);
                            break;


Find the "private void doForumURL(string URL)" and where it finishes add below (or find "private void setSVlist(string delimitedSettings)" and add above):
Code: Select all
        private void doRosterURL(string URL)
        {
            string text = "Guild Roster";
            MenuItem homeMI = new MenuItem(text);
            homeMI.Tag = URL;
            homeMI.Click += new EventHandler(rosterMI_Click);

            int i = -1;
            foreach (MenuItem mi in contextMenu1.MenuItems)
            {
                if (mi.Text == text)
                {
                    i = mi.Index;
                }
            }
            if (i != -1)
            {
                contextMenu1.MenuItems.RemoveAt(i);
                contextMenu1.MenuItems.Add(homeMI);
            }
            else
            {
                contextMenu1.MenuItems.Add(homeMI);
            }
         // Put the Exit option at the BOTTOM of the list!
         doContextMenuMoveToBottom("Exit");
        }

        void rosterMI_Click(object sender, EventArgs e)
        {
            string url = (string)((MenuItem)sender).Tag;
            System.Diagnostics.Process.Start(url);
        }


Thats it for the UniUploader updates, :D

Now onto the UniAdmin tweak updates to incorporate the new RosterURL feature, :-)

First off the SQL update, you need to add to the mysql_data.sql (for any future re-installs)
Find:
Code: Select all
   ('HOMEURL', 'http://yourdomain.com', '0', 'options', 'text{250|50'),
   ('FORUMURL', 'http://yourdomain.com/forum', '0', 'options', 'text{250|50'),

Change to:
Code: Select all
   ('HOMEURL', 'http://yourdomain.com', '0', 'options', 'text{250|50'),
   ('FORUMURL', 'http://yourdomain.com/forum', '0', 'options', 'text{250|50'),
   ('ROSTERURL', 'http://yourdomain.com/roster', '0', 'options', 'text{250|50'),

You may also wish to append the data to a upgrade.sql file or something just incase.
If you do that then you'd probably want the following code command instead (or if
your wishing to simply do an SQL call to add it direct via whatever controls you
use to access and edit your sql database):
Code: Select all
### Settings
INSERT INTO `uniadmin_settings` (`set_name`, `set_value`, `enabled`, `section`, `form_type`) VALUES
   ('ROSTERURL', 'http://yourdomain.com/roster', '0', 'options', 'text{250|50');


And of course in the various language files (EG: language/english.php) find:
Code: Select all
$lang['HOMEURL'] = 'URL location for homepage';
$lang['FORUMURL'] = 'URL location for forums';

And appened to:
Code: Select all
$lang['HOMEURL'] = 'URL location for homepage';
$lang['FORUMURL'] = 'URL location for forums';
$lang['ROSTERURL'] = 'URL location for roster';


If wished you can also do all the above for the UniAdmin URL too or any other shortcut links you wish to add.

Also find attached the image required for the UniAdmin options for the above URL references in the Settings page, :) Simply upload it to the UniAdmin/images directory. (I've also attached a slightly updated version of the FORUMURL image file, to make its background color match the HOMEURL one and now this ROSTERURL one)

NOTE: Remember to make sure that the files are full UPPERCASE (cept for the extension) IE: ROSTERURL.jpg or FORUMURL.jpg.
Attachments
forumurl.jpg
Slightly updated, just made to match homeurl.jpg file and new rosterurl.jpg file.
forumurl.jpg (7.02 KiB) Viewed 1034 times
rosterurl.jpg
rosterurl.jpg (5.82 KiB) Viewed 1034 times
Last edited by Calystos on Thu Dec 04, 2008 10:53 pm, edited 3 times in total.
User avatar
Calystos
UA/UU Developer
UA/UU Developer
 
Posts: 140
Joined: Tue Mar 04, 2008 10:57 am
Location: Earth

Return to UniUploader

Who is online

Users browsing this forum: No registered users and 1 guest

cron