[V1.0.4] Guildbank Request Mod

Based on Categorized Guild Bank, this addon allows users to make requests for guild bank items

Moderator: Averen

[V1.0.4] Guildbank Request Mod

Postby zanix » Wed Feb 07, 2007 4:48 am

By the way shadydude,
At the time I posted, your signature had an error
I'm posting it (edited to remove sensitive info) just in case you fix it before you see this post

I'm almost considering using something like that as my signature now, lol
Attachments
shadysigerror.gif
shadydude sig error
shadysigerror.gif (1.91 KiB) Viewed 812 times
Last edited by zanix on Wed Feb 07, 2007 4:48 am, edited 1 time in total.
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: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

[V1.0.4] Guildbank Request Mod

Postby Averen » Wed Feb 07, 2007 12:24 pm

Thanks for the offer Zanix, that'd be great.
Sorry I haven't been around much, I've been busy with school and work but I've got some new features heading your way.
User avatar
Averen
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 152
Joined: Thu Jul 20, 2006 5:18 am

Re: [V1.0.4] Guildbank Request Mod

Postby Corbism » Wed Feb 07, 2007 2:17 pm

Can we get this mod added to the roster downloads section ?
User avatar
Corbism
WR.net Apprentice
WR.net Apprentice
 
Posts: 51
Joined: Fri Sep 29, 2006 10:48 pm
Location: Seattle, WA

[V1.0.4] Guildbank Request Mod

Postby edgeonline » Fri Feb 09, 2007 11:58 am

Kudos on the mod! We love it.
edgeonline
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Tue Dec 12, 2006 1:58 pm

Re: [V1.0.4] Guildbank Request Mod

Postby tuigii » Mon Feb 19, 2007 8:56 am

[This post handles the Guild Bank Add On with item request facilities]

Some item requests gave me a strange results :
Notice: Undefined variable: itemdata in /..... ..../roster/addons/guildbank/request.php on line 313
Réservation
Cet objet n'est pas dans la banque.

{usUS Error : [....]['gb_err_notinbank'] = "That item is not in the guild/bank."}
I'm using the frFR version. And please note that the line number can be somewhat different - I'm patching arround :cyclops:
I'm pretty sure that this isn't a localization related error.

What happens :
This line (in request.php) :
$query = "SELECT member.name as member_name, member.member_id as member_id, item.* FROM `".ROSTER_ITEMSTABLE."` as item LEFT JOIN `".ROSTER_MEMBERSTABLE."` as member ON item.member_id=member.member_id WHERE item.item_id LIKE '".$itemid.":%' AND member.".$roster_conf['banker_fieldname']." LIKE '%".$roster_conf['banker_rankname']."%' AND item.item_parent!='bags' AND item.item_parent!='equip' AND item.item_tooltip NOT LIKE '%".$wordings[$roster_conf['roster_lang']]['tooltip_soulbound']."%' ORDER BY item.item_name";

should be
$query = "SELECT member.name as member_name, member.member_id as member_id, item.* FROM `".ROSTER_ITEMSTABLE."` as item LEFT JOIN `".ROSTER_MEMBERSTABLE."` as member ON item.member_id=member.member_id WHERE item.item_id LIKE '".$itemid.":%' AND member.".$roster_conf['banker_fieldname']." LIKE '%".$roster_conf['banker_rankname']."%' AND item.item_parent!='bags' AND item.item_parent!='equip' AND (item.item_tooltip NOT LIKE '%".$wordings[$roster_conf['roster_lang']]['tooltip_soulbound']."%' OR item.item_tooltip LIKE '%".$wordings[$roster_conf['roster_lang']]['tooltip_boe']."%') ORDER BY item.item_name";

{this line has to be replaced twice...}

Didn't even have to type it : copied it right from de gbank.php file, where the same SQL SELECT can be found.

The final issue is : the SELECT has to exclude bank-items that are soulbound but not the ones that are soulbound when equiped.
Is is quit logic, one can't transfer a soulbound items anyway. They shoudn't be in the bank sacs of a bank character.

The SELECTing goes well now : no more errors when requesting an item by our membres.

It's solved for me ..

This is one hell of a Add On : Pleegwat : I also vote for a separte forum and Download Section.
Last edited by tuigii on Tue Mar 06, 2007 6:24 pm, edited 5 times in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

[V1.0.4] Guildbank Request Mod

Postby Malkom » Mon Feb 19, 2007 4:01 pm

Don't work for me...

And I don't see this line in the gbank.php file...
Image
User avatar
Malkom
WR.net Journeyman
WR.net Journeyman
 
Posts: 144
Joined: Tue Jan 09, 2007 11:02 am
Location: France - 91 - Longjumeau

Re: [V1.0.4] Guildbank Request Mod

Postby tuigii » Tue Feb 20, 2007 2:29 pm

Malkom wrote:And I don't see this line in the gbank.php file...

The 2 lines to changes are in request.php - as stated above.
gbank.php doesn't have any problem for me.

:scratch: this might be a language issue after all.
Last edited by tuigii on Wed Feb 21, 2007 1:07 pm, edited 1 time in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

Re: [V1.0.4] Guildbank Request Mod

Postby darthgus » Wed Feb 21, 2007 1:50 am

Just starting using this mod and it is really awesome!

I have a couple of feature requests, that might be specific to our guild, it might not, but ill give it a shot.. :)

We use the first come, first serve for the majority of items in the bank, but for epics, we force people to request it via our forums, so that if other members want to request it, they can also, then it goes to a roll off.

I guess im looking for one of the following;

1) For certain item color, make it so the request cant be done (so, say for epics, it can have a custom link to somewhere)

or

2) Make it so certain color items (selectable in admin or conf), that they stay on the bank list after one person has requested it, and allow multiple people to select it. This can happen until the bank has accepted the item to go out (and user if poss).


The other request is, we are always looking for ways to keep people updating their data onto the roster. It would be great to be able to have it so when people request stuff, if they havent updated their data within x days, they arent able to request the item.
Last edited by darthgus on Wed Feb 21, 2007 1:50 am, edited 1 time in total.
darthgus
WR.net Apprentice
WR.net Apprentice
 
Posts: 9
Joined: Wed Aug 23, 2006 12:26 pm

Re: [V1.0.4] Guildbank Request Mod

Postby tuigii » Wed Feb 21, 2007 6:11 am

darthgus wrote:The other request is, we are always looking for ways to keep people updating their data onto the roster. It would be great to be able to have it so when people request stuff, if they havent updated their data within x days, they arent able to request the item.

Agree with that one!
And I can handle that question !!

So, in the request.php file, change this function function createMemberlist($name)

Make it like this :
Code: Select all
function createMemberlist($name)
{
  global $wowdb, $addon_conf, $roster_conf, $phptimeformat;
   
  $list = "<SELECT name='accname'>\n";
  $currenttime = time();

  $query = "SELECT `members`.`member_id`, `members`.`name`, dateupdatedutc ";
  $query .= "FROM `".ROSTER_PLAYERSTABLE."` as members ";
  $query .= "LEFT JOIN `".ROSTER_MEMBERSTABLE."` AS players ON `members`.`member_id` = `players`.`member_id` ";
  $query .= "WHERE guild_rank <= ".$addon_conf['guildbank']['rank']." ORDER BY name";
 
  $result = $wowdb->query($query) or die_quietly($wowdb->error(),'Database Error',basename(__FILE__),__LINE__,$query);

  while( $rawlist = $wowdb->fetch_assoc($result) )
  {
    list($month,$day,$year,$hour,$minute,$second) = sscanf($rawlist['dateupdatedutc'],"%2d/%2d/%2d %2d:%2d:%2d");
    $localtime = mktime($hour+$roster_conf['localtimeoffset'] ,$minute, $second, $month, $day, $year, -1);
      
    if (($localtime + (7 * 24 * 60 * 60)) > $currenttime ) {
      if($rawlist['member_id'] === $name) {
        $list .= "\t<OPTION SELECTED value='".$rawlist['member_id']."'>".$rawlist['name']."</OPTION>\n";
        }
        else {
          $list .= "\t<OPTION value='".$rawlist['member_id']."'>".$rawlist['name']."</OPTION>\n";
            }
      }
    }

  $list .= "</SELECT>\n";

  return $list;
}


Of course, the 7 days limit is hard coded here (can you see it ?) - and should be more accesible, like setting it in the conf.php file of the gbank add on.

But, hey, I'm only coding SQL for a couple of days now :scratch:

I tried it : it just rocks !!
Last edited by tuigii on Sun Feb 25, 2007 4:54 pm, edited 5 times in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

[V1.0.4] Guildbank Request Mod

Postby Averen » Wed Feb 21, 2007 12:31 pm

Thanks for the fix and the mod tuigii.

Hopefully GB version 2 will be released shortly.
User avatar
Averen
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 152
Joined: Thu Jul 20, 2006 5:18 am

[V1.0.4] Guildbank Request Mod

Postby Malkom » Wed Feb 21, 2007 1:14 pm

OK tuigi I've found the second line in the request.php file ^^

So first line is 78 and second is 236.

Work fine now !!!

I'm so enjoy ^^
Last edited by Malkom on Thu Feb 22, 2007 4:12 pm, edited 2 times in total.
Image
User avatar
Malkom
WR.net Journeyman
WR.net Journeyman
 
Posts: 144
Joined: Tue Jan 09, 2007 11:02 am
Location: France - 91 - Longjumeau

[V1.0.4] Guildbank Request Mod

Postby Malkom » Thu Feb 22, 2007 4:21 pm

Averen, I've another little problem....

When I use your add, level filters don't work.... and when I install this fix on the CatGuildBank (http://www.wowroster.net/Forums/viewtopic/t=2588.html file on the sturmy's post), level filters work fine....

I've tried to mix the two files... but to hard for me :(

Can you do it please.... ?

Thank you in advance ^^
Last edited by Malkom on Thu Feb 22, 2007 4:22 pm, edited 1 time in total.
Image
User avatar
Malkom
WR.net Journeyman
WR.net Journeyman
 
Posts: 144
Joined: Tue Jan 09, 2007 11:02 am
Location: France - 91 - Longjumeau

Re: [V1.0.4] Guildbank Request Mod

Postby Malkom » Sat Feb 24, 2007 1:55 pm

Malkom wrote:Averen, I've another little problem....

When I use your add, level filters don't work.... and when I install this fix on the CatGuildBank (http://www.wowroster.net/Forums/viewtopic/t=2588.html file on the sturmy's post), level filters work fine....

I've tried to mix the two files... but to hard for me :(

Can you do it please.... ?

Thank you in advance ^^


Averen,

Nothing to do !! I have found the problem... (thx to DirtyHerri)


In the localization file, for the french translation, replace "Niveau requis" with "Niveau"

It's work fine ^^
Last edited by Malkom on Sat Feb 24, 2007 1:56 pm, edited 1 time in total.
Image
User avatar
Malkom
WR.net Journeyman
WR.net Journeyman
 
Posts: 144
Joined: Tue Jan 09, 2007 11:02 am
Location: France - 91 - Longjumeau

Re: [V1.0.4] Guildbank Request Mod

Postby tuigii » Sun Feb 25, 2007 6:21 am

Malkom wrote:In the localization file, for the french translation, replace "Niveau requis" with "Niveau"

It's work fine ^^

Yep, logic :thumright: 'cause the format is Niveaux xx requis so the match will not be made, there is a number in it.

But, better yet : try to filter for a 'Plan' and, i.e. "all items between 1 min and 25 max".
It will not work correctly. Items of more then 25 will be included in the found list... :scratch:
Have a look at the SQL request generated :scratch:
To make a long story short, I changed this part :
Code: Select all
$lvlItemQuery = ' AND `item_tooltip` REGEXP \''.$wordings[$roster_conf['roster_lang']]['reqlevel'].' (('.$min.')';
  for ($i = $min + 1;$i <= $max;$i++)
  {
     $lvlItemQuery .= '|('.$i.')';
  }

for this :
$lvlItemQuery = ' AND `item_tooltip` REGEXP \''.$wordings[$roster_conf['roster_lang']]['reqlevel'].' (( '.$min.')';
for ($i = $min + 1;$i <= $max;$i++)
{
if ($i<10)
{ $lvlItemQuery .= '|( '.$i.')';
} else
{ $lvlItemQuery .= '|('.$i.')'; }

The thing that did the work is the 'space' between the "(" and the "'" - can you see it ? (in the middle of the red zone).

Why ? test with the min=1 & max=1, the REGEXP will give a positive result for "Niveau 1x", x being anything / or nothing, so "Niveau 1" will do, but "Niveau 15" also. This is wrong.

Including a space in front of it (for numbers below 10) - and the search goes well...
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

Re: [V1.0.4] Guildbank Request Mod

Postby Eldarinwa » Sun Feb 25, 2007 2:58 pm

Averen wrote:1. Guild leader - YES
2. Officer - YES
3. Memer - YES
4. Initiate - NO


Hello,

nice addon :thumleft:

is it possible to add a new option for the reservation?

Code: Select all
1. Guild leader - YES
2. Officer - YES
3. Memer - YES (all members)
4. Player - YES (only members having updated their characters
5. Initiate - NO


this in order to give only to those which take part in the roster (option 4)

if that is realizable, I say "so thanks" :cheers:

regards
Eldarinwa
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Tue Jul 11, 2006 10:15 pm

PreviousNext

Return to Categorized Guild Bank Request

Who is online

Users browsing this forum: No registered users and 0 guests

cron