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,
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.