Feature Request: Password

Categorizes items in your guildbank(s)

Moderator: Mathos

Feature Request: Password

Postby sagron » Wed Dec 06, 2006 3:13 am

Not sure how hard this would be to do but I would like the option to password protect just the bank portion of roster (with a different password than the admin pass) so that only guild-members can see what's in the bank.
sagron
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Mon Nov 27, 2006 2:42 am

Feature Request: Password

Postby yojimbo2k » Thu Jan 04, 2007 6:25 am

Hi,
Plz, add option password Guildbank.
User avatar
yojimbo2k
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Thu Dec 07, 2006 3:54 pm

Re: Feature Request: Password

Postby Zulon » Thu Jan 04, 2007 1:09 pm

Ya, not a bad idea.
Zulon
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Mon Aug 28, 2006 7:25 pm

Re: Feature Request: Password

Postby yojimbo2k » Wed Jan 10, 2007 7:14 pm

little UP :thumleft:
User avatar
yojimbo2k
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Thu Dec 07, 2006 3:54 pm

Feature Request: Password

Postby zanix » Wed Jan 10, 2007 11:17 pm

It's very easy to add password support using the Roster Admin login

As for using a different password, you would have to duplicate the code in lib/login.php for cat. guildbank
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Feature Request: Password

Postby Mica » Sat Jan 13, 2007 7:43 am

zanix,

I dont get at all what you mean by your reply.

This is exactly what I'm looking for so I do not need to get yet another addon.

What would be 'perfect' is a password protection ability when you click on guild bank. Rather than having all the world seeing what's in your guild banks. Only allowing who you choose to do so. Giving your guild, etc, the privacy that many guilds wish. Now from what I gather from your post, you said that this is not hard. Then you went on to say about duplication in another area, which is not that easy versus using roster admin login. Which is NOT what is wanted.

Can this be done easily or not? If not, any suggestions that you would have on what would be the best way to go from here please?

Many thanks and excellent work!!!


-M
Mica
WR.net Apprentice
WR.net Apprentice
 
Posts: 3
Joined: Fri Jan 12, 2007 10:11 am

Feature Request: Password

Postby zanix » Sat Jan 13, 2007 6:28 pm

Well, making a login for cat guildbank that uses the roster admin password is as easy as inserting some code in gbank.php

Open
addons/guildbank/gbank.php

Find
Code: Select all
// Check if we already assigned something to $content, if not, Declare it
if (!isset($content))
{
   $content = '';
}


Add after
Code: Select all
// ----[ Check log-in ]-------------------------------------
require_once(ROSTER_LIB.'login.php');
$roster_login = new RosterLogin($script_filename);

if( !$roster_login->getAuthorized() )
{
   print
   '<span class="title_text">Categorized GuildBank</span><br />'.
   $roster_login->getMessage().
   $roster_login->getLoginForm();

   return;
}
else
{
   print
   '<span class="title_text">Categorized GuildBank</span><br />'.
   $roster_login->getMessage();
}
// ----[ End Check log-in ]---------------------------------


Save and Close
addons/guildbank/gbank.php




But if you want to use a different password you are going to have to do quite a few things

FIRST, IGNORE the edit above
You will need to insert different code into gbank.php

Adding our password to config
Open
addons/guildbank/conf.php

Find
Code: Select all
if ( !defined('ROSTER_INSTALLED') )
{
    exit('Detected invalid access to this file!');
}

Add after
Code: Select all
/**
 * Guildbank password
 */
$gbankpass = "SomePassword";


// DO NOT CHANGE THIS ONE
$gbankpass = md5($gbankpass);


Save and Close
addons/guildbank/conf.php

Giving cat guildbank it's own, separate login functionality
We are using Roster's login.php for this and just changing some minor things so we can use it here

Copy the file lib/login.php over to the cat guildbank addon directory and edit it

Open
addons/guildbank/login.php

Find
Code: Select all
class RosterLogin


Change to
Code: Select all
class GbankLogin


Find
Code: Select all
function RosterLogin($script_filename)


Change to
Code: Select all
function GbankLogin($script_filename)


Find
Code: Select all
global $roster_conf;


Change to
Code: Select all
global $gbankpass;


Find All
Code: Select all
roster_pass


Change to
Code: Select all
gbank_pass


Find All
Code: Select all
$roster_conf['roster_upd_pw']


Change to
Code: Select all
$gbankpass


Save and Close
addons/guildbank/login.php

Inserting the login block into cat guildank
Open
addons/guildbank/gbank.php

Find
Code: Select all
// Check if we already assigned something to $content, if not, Declare it
if (!isset($content))
{
   $content = '';
}


Add after
Code: Select all
// ----[ Check log-in ]-------------------------------------
require_once($addonDir.'login.php');
$gbank_login = new GbankLogin($script_filename);

if( !$gbank_login->getAuthorized() )
{
   print
   '<span class="title_text">Categorized GuildBank</span><br />'.
   $gbank_login->getMessage().
   $gbank_login->getLoginForm();

   return;
}
else
{
   print
   '<span class="title_text">Categorized GuildBank</span><br />'.
   $gbank_login->getMessage();
}
// ----[ End Check log-in ]---------------------------------


Save and Close
addons/guildbank/gbank.php
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to Categorized Guild Bank

Who is online

Users browsing this forum: No registered users and 1 guest

cron