v3.8.2
----------------------------------------------------------------------
big bags

December 22, 2024 - modified the profile to match the new column 
                    names in accordance with the big bag change. 
                    Added new slot numbers to the item 
                    class. - MortimerGreenwald

v3.7.2
----------------------------------------------------------------------
fix typo 

September 5, 2024 - character.php was trying to read the spells_new
                    table from the wrong database. Moved it to the
                    content db. - Maudigan

v3.7.1
----------------------------------------------------------------------
fix EV and typos

September 5, 2024 - Don flags had typos needing fixed - FryGuy
                    EV's need prefix to distinguish from EV for other
                    tools - Akkadius C/O Maudigan
                    

v3.7
----------------------------------------------------------------------
Add buffs, fix barter window, add DoN flags, remove calculated stats

August 9, 2024 - The barter tables changed, updated the barter script
                 to match the new table changes.
                 The calculated stats and the tabs showing them have
                 been removed. The inventory stats are now displayed
                 from the calculated stats table.
                 Buffs have been added to the inventory view
                 Added DoN Norrath's Keepers and Dark Reign flags

v3.6.4
----------------------------------------------------------------------
Fix error, compatibility changes for docker

Febuary 11, 2024 - A spell not being found when creating the item
                     HTML would cause the entire page to die with
                     a message saying the spell couldn't be found.
                     That is kind of overkill that caused problems.
                     This was changed to just post "UNKNOWN" next to
                     the items effect when not found.
                  Added the ability to overwrite the config settings
                     by using environmental variables to make this
                     easier to integrate into docker container. The
                     following environment variables will overwrite
                     The values in the config file:
                     
                     DB_NAME overwrites $cb_db
                     DB_HOST overwrites $cb_host
                     DB_USER overwrites $cb_user
                     DB_PASSWORD overwrites $cb_pass
                     DB_PORT overwrites $cb_port

                     CONTENT_DB_NAME overwrites $cb_content_db
                     CONTENT_DB_HOST overwrites $cb_content_host
                     CONTENT_DB_USER overwrites $cb_content_user
                     CONTENT_DB_PASSWORD overwrites $cb_content_pass
                     CONTENT_DB_PORT overwrites $cb_content_port
                   
                    
v3.6.3
----------------------------------------------------------------------
added stats to search page

September 2, 2023 - we recently got the new character stats table
                    this is a first cursory pass at adding those
                    stats display as a leader board
               
v3.6.2
----------------------------------------------------------------------
added databucket key naming convention

Jun 14, 2023 - updated databuckets to work with two different
               key naming conventions. Originally just 
               <charid>-<key> worked, now <key>-<charid> works too
               
v3.6.1
----------------------------------------------------------------------
added class distribution with cutoff, code cleanup with flags

Jun 11, 2023 - Added a Classes of last 30 days to the server view

Jun 12, 2023 - Made functions that output flags to make the code
               more readable. Moved old and new flag functions
               and population queries to a new class.
               
v3.6.0
----------------------------------------------------------------------
php/mysql version compatibility, cleanup warnings and notices, new
error class, general cleanup, minor upgrades

Nov 23, 2022 - Altered the adventure board to use RANK() for newer
               versions of MySQL and variables for older versions

Jan 11, 2023 - removed too many warnings and notices to cover here
               gave classes a Charbrowser_ prefix for their name
               gave all private elements a _ prefix
               changed GetPermissions class to be a part of the
                  characters class
               make sure array and array keys exist prior to
                  referencing them
               repaired the leaderboard rankings. The query returned
                  different results based on DB vendor/version. it now
                  uses two different methods based on vender/version.
               removed direct access to $_GET, $_POST and $_REQUEST
                  and use a wrapper function preg_Get_Post() instead
                  which is written to ensure array keys exist and to
                  also use regex to validate all user input values
               Tested/Updated the software to work on PHP 5.6 up
                  to PHP 7.4
               When theres no bazaar search results, we now show
                  an empty bazaar window instead of a message box
               
               
              (maudigan)
              
v3.5.0
----------------------------------------------------------------------
LDON Leaderboard, Barter, Leadership AA, Corpse Detail, enhancements,
performance, bugfixes

Nov 1, 2022 - ENHANCEMENTS:
              Modified the Actions Menu (left hand menu) to be 
              resizeable and have a header.

              Added a Leadership AA window. Accessed with the 
              "Leader." button on the Action menu. This shows a 
              characters Guild and Raid Abilities.
              
              Added two versions of the Barter Window, one generic, 
              and one personalized one. The generic one is accessed 
              with the "Barter" link in the header. The personalized 
              one is accessed with the "Barter" button in the Actions 
              menu. The generic one just shows all the WTB items and 
              their price, with some basic search criteria. The 
              personalized one displays the current characters 
              inventory (like in game) and uses their inventory as a 
              filter for matching buyers. Searching with a "Seller" 
              name also cross referenecs a characters inventory.
              
              Added two versions of the LDON/Adventure Leaderboard. 
              The generic one is accessed with the "LDON" link in the 
              header, and the personalized on is viewed with the 
              "LDON" button in the Actions menu. Both versions show 
              100 characters max (by default). When viewing the 
              personalied one, your current characters row will show 
              up below the scroll box, in gold, displaying that 
              characters rank. The gold row will also show up in its 
              correct order in the scroll box results.
              
              Redesigned/beautified the corpses page. The corpses now 
              display as avatar tiles, showing the date and zone of 
              death. The avatar will show as gold and in-color if the 
              corpse NEEDS to be rezzed, and gray if already rezzed. 
              The avatar will be replaced by the Shadowhaven tombstone
              if the character has been buried. If there are items or 
              coin on the corpse a small bag icon will display by the 
              avatar. Hovering over the avatar or bag icon will 
              explain the meaning of the symbols.
              
              Added a detail corpse view. You access it by clicking 
              one of the avatar tiles on the corpses page. This new 
              detail view shows the corpses inventory, specific 
              details about where/when they died (unless moved), 
              rezzed status, burried status, all items and coin on the
              corpse, and links to the zone and a map of where the 
              corpse is.
              
              Enhanced the Bazaar. The window is resizeable and 
              scrollable now. The items now display a small item icon 
              next to the name.
              
              Added the "&nohead" GET variable. When appended to the 
              URL it hides the header completely, this is intended to 
              be used by server admins with the in-game web browser.
              
              PERFORMANCE:
              The item icons have been replaced with sheets of sprites
              that are 10x10, and some CSS to locate each item icon by
              its ID. This loads slightly slower at first for the 
              user, but in the longrun it caches quicker and improves 
              performance. It also greatly reduces the time taken to 
              unzip/transfer the charbrowser files since the 6,869 
              individual icon files are replaced with 108 icon sheets.              
              
              Reduced the number of queries on the bot page. Took all 
              the individual spell effect queries and consolidated them 
              to one big "IN" clause.
              
              The item and spell repository classes design still caused 
              some redundant queries. Those were redesigned causing some
              performance improvements. The bazaar page now only runs 
              3 queries instead of 2 plus 1 per spell effect on each 
              item. The changes were implemented into the profile 
              class, bot profile class, and the new corpse profile 
              class. This further reduced the number of queries 
              resulting in the character profile page loading about 
              20% faster. 
              
              Removed the alternate ability repository. During the 
              multi-tenancy change over the repository was quikckly 
              added to reduce the number of queries being done, but it
              replicated the table caching feature already present in 
              the profile class. It now uses that original system 
              instead.
              
              Did a general file cleanup of files that no longer 
              seemed necessary.
              
              Added a page-load timer to help monitor performance. 
              It's displayed above the database performance data, and 
              is enabled using the same DB_PERFORMANCE constant that 
              the database performance output uses.
              
              BUGFIX:
              Fixed a bug that would display the header twice in some 
              error cases.
              
              Fixed an oversight that let users see the advanced 
              faction data, even when it was disabled.
              
              (maudigan)

v3.4.3
----------------------------------------------------------------------
jscolor

Jun 6, 2022 - update the JS color selector
              (maudigan)

v3.4.2
----------------------------------------------------------------------
item type

Jan 28, 2020 - added item type to item displays and to the API
              (maudigan)

v3.4.1
----------------------------------------------------------------------
data buckets

Jan 28, 2020 - updated the vxed flags to read from data buckets
              (maudigan)


v3.4.0
----------------------------------------------------------------------
bazaar enhancement

July 28, 2020 - fixed an error that hid some rows on the bazaar 
                results
                added the ability to see/sort by stats in bazaar
                results
               (maudigan)

v3.3.3
----------------------------------------------------------------------
performance patch

May 17, 2020 - Added support functions to functions.php. One takes
               a mysql result array and the PK name, and returns a
               comma delimited list of the IDs; one takes two mysql
               result arrays, two column names and a type of join
               and returns a joined recordset (a php join); and one
               takes a mysql result array, a column name and a sort
               direction and returns a sorted recordset (a php sort)
               these are meant to replace query like features to
               support multi tenancy. The functions are kind of
               sloppy and need another once over once its clear
               what all is needed from them.
               
               Updated bazaar.php to use the new functions
               
               Updated factions.php to use the new functions
               
               Updated fetch_all in db.php to not return an extra
               blank row and made the db performance code count
               rows searched and rows returned
               
               modified profile.php constructor to take a char name
               or a char id instead of just the name
               
               Updated bots to use the new functions and to use the
               new ID constructor for the profile (removes 1 query)
               
               Updated keys.php to use the new functions
               (removes 1 query per key shown)

               modified corpse.php. It was doing 1 query for corpses
               and then 1 additional query for each corpse. That whole
               process has been replaced with an IN clause and a php
               join of the records (removes 1 query per corpse)
               
               updated search.php to use the new functions and
               optimized (removes 1 query)
              (maudigan)
              
v3.3.2
----------------------------------------------------------------------
bazaar patch

May 2, 2020 - fixed the bazaar sorting, filtering and pagination
              redesigned the querying to reduce db load
              (maudigan)
              
v3.3.1
----------------------------------------------------------------------
performance improvements

May 1, 2020 - added data preloading to improve load on the database
              delay jquery drag/resize to improve page load speed
              (akkadius)
                   
v3.3.0
----------------------------------------------------------------------
first pass of multi tenancy implementation, first pass of bots

April 25, 2020 - Setup the multi tenancy for every page except the
                   bazaar. If you're using it, you'll need to disable
                   the bazaar for now.
                 Did a first pass of displaying bots. There is a "bots"
                   button in the side menu now which will display
                   a gallery of a characters bots. You can click the 
                   bot to see their gear. The AC/HP/Mana/End/Atk are
                   not accurate right now. Will be addressed in the 
                   future.                    
                  
v3.2.1
----------------------------------------------------------------------
css tweaks, custom templates, code relocation

April 14, 2020 - Restructured the templates directory. The templates
                  are all in a /default subdirectory now. There is 
                  also a /custom directory. If you make custom changes
                  put them into the custom directory. The template
                  system will use that as the primary, and if not
                  present it will revert to the /default template.
                  This way your changes wont get overwritten when you
                  install updates.
                  You can also create a 3rd directory and change the
                  one you are using in congif.php. Using this you can
                  quickly (or programatically) swap between two custom
                  front ends.
                 Added a hover transparency and drop shadow to all of
                  the windows.  
                 Fixed an issue with code on global.php that should 
                  have been in common.php--was creating 2 template
                  classes                  

v3.2.0
----------------------------------------------------------------------
inventory restyle and avatars

April 11, 2020 - restyled the inventory window, added avatars
                
v3.1.1
----------------------------------------------------------------------
window/button upgrade

April 7, 2020 - Updated the button graphic to png and added a hover
                  and active graphic-instead of just lowering opacity
                Added a big button graphic and class for the profile
                  menu
                Added the circular corners to the non-fancy windows  
                Optimized the function that makes bags resize
                  
v3.1.0
----------------------------------------------------------------------
Resizeable windows, and checkmarks

April 6, 2020 - Converted bagslots to inline block, so all the
                  static numbers from those stylesheets are gone.
                Made bag windows resizeable, the slots will 
                  wrap automatically when you resize
                Made the max bag slots a constant in global.php
                  and applied it to the GetItem function
                Made item stat windows resizeable, if you go too small
                  it will turn on a scroll bar
                On the settings page, replaced the X's with checkmarks  


v3.0.1
----------------------------------------------------------------------
cap bag slots to 10

April 4, 2020 - cap bagslots to 10

v3.0.0
----------------------------------------------------------------------
finalized the 2.9.0 changes after testing/feedback

Aprile 4, 2020 - Dont show an AA if it has no first rank
                 Modified htaccess to hide template and other files
                 Added favicon and touch icons
                 Added commas to a bunch of displayed numbers
                 Can search bazaar by seller name (thanks croco)
                 Added a "Store" link to the side profile menu to see 
                   items the player sells
                 Hide the association between guild/player when they 
                   are anon
                 Add item/augment icons to the item inspect windows
                 Add stack sizes to item icons
                 Added a way to easily replace what's displayed on 
                   the main page (renamed home.template to home.php, 
                   then edit)
                 Removed error reporting for self registration
                 Added a view to the server page that shows activity 
                   in the last 30 days (can configure)
                 Fixed issue that caused dynamic images to not 
                   display on newer PHP versions
                 Added ZOrdering to popup windows, made it 
                   dynamically add the effect based on class


v2.9.0
----------------------------------------------------------------------
massive rewrite

Mar 31, 2020 - Made all windows drag
               new css/html revamp
               enhanced the title.php image and added server and client
                 caching of the image to speed it up
               added new guild page with class and level composition
               added new server page with class and level composition
               updated the ac/hp/mana/atk/endurance calculations
               added a tab to show those calculations
               added the shared bank slots/cash
               added some new window graphics--corner scrolls
               moved calculatestats to the profile
               moved the side menu into its own modular template file
               added an update notice to settings.php that'll check
                 github for updates and notify you of changes
               added tabs to the sigbuilder and skills page
               added mitigation ac to the inventory window
               removed autocorrect from all the search fields
               made search fields submit on pressing enter
               version stamps css and js files so users dont
                 cache and old version
               made cb_message_die output an error image for image
                 scripts
               normalized a lot of the html to make it more SEO
                and screen reader friendly
               
              
v2.8.2
----------------------------------------------------------------------
shared bank and shared bank coin

Mar 8, 2020 - added the display elements for the shared bank slots
                and the shared bank plat. There are new config file
                elements to support this. You can compare your
                existing config.php to the config.template to see
                but basically you need to add permissions for
                'sharedbank' and 'coinsharedbank'. If you don't
                add them they will default to ON since the
                permissions are exclusive. 
              (maudigan)
              
v2.8.1
----------------------------------------------------------------------
Inherit admin permissions when wrapped in site header/footer

Mar 8, 2020 - Added the ability to inherit site admin permissions 
              when you wrap charbrowser in your header/footer
              (maudigan)
              
v2.8
----------------------------------------------------------------------
Added soft delete, mouse cursor style, item popups, aa fix, stat calc
error and some other minor tweaks.

Mar 7, 2020 - implemented character soft delets. If a character
                 has their deleted_at set in the character_data table
                 they wont show up in magelo now. You can override
                 that and force them to display by setting 
                 $showsoftdelete = 1;. If you do so they will be 
                 marked "DELETED" when viewed/searched
              Made cursors show up as a pointer when over buttons
                 or interactive links
              If you click item icons or links, it will display a 
                 dragable popup with the items stats now.
              Bags are opened by clicking an arrow in the top left
                 corner of the bag icon now.
              Class AAs were showing the wrong classes abilities
                 that's been fixed
              replaced the deprecated ereg_replace
              fixed char stats to not include augments on inventory
                 and bank items
              (maudigan)
              
v2.7
----------------------------------------------------------------------
Added corruption, alt item stats display and maintenance

Sep 7, 2019 - Added corruption resist
              Added extra space for large character stats
              Added an alternative item stat display option, set 
                 $itemstatsdisplay to 1 to get a more readable list 
                 view on item stats
              Fixed some typos
              Added commas to numbers on char stats (Kinglykrab)
              

v2.6.6
----------------------------------------------------------------------
added uleats inventory changes

November 10,2018 - Reordered general slots from top to bottom
                   into left to right (Maudigan)
                   Fixed type on bagbuttonrow where 'px' was missing


v2.6.5
----------------------------------------------------------------------
added uleats inventory changes

November 10,2018 - Added uleats inventory changes (Maudigan): 
                      Ammo moved 21 to 22
                      Power source moved 9999 to 21 
                      Cursor moves 30 to 33
                      Bags moved 22-29 to 23-32 (+1 and two new slots)
                      Cursor bag contents moved 331-340 to 351-360
                      New bags contents are in 331-340 and 341-350

v2.6.4
----------------------------------------------------------------------
made the api so it can be turned off

Sep 23, 2018 - set $api_enabled = false in the config to disable
               the api.
               (Maudigan)

v2.6.3
----------------------------------------------------------------------
Added missing skills and worked on the wrapper functionality

Sep 23, 2018 - Added 2h piercing, tripple attack and remove traps.
               (Maudigan)
               Added a #charbrowser wrapper around all the content
               to prevent stylesheet naming collisions when you
               wrap the page in your forum header/footer
               (Maudigan)

v2.6.2
----------------------------------------------------------------------
Fixed charmover

Sep 6, 2018 - Removed an extra comma from the update statement.
              (Maudigan)

v2.6.1
----------------------------------------------------------------------
Fixed the bazaar, database performance, forum wrapping, and
database wrapper.

Jan 7, 2017 - Fixed a typo in the bazaar script that was preventing
              any results from showing up.
              (Maudigan)
              Fixed a reference to the template class in db.php that
              was preventing the database performane stats from
              dumping out.
              (Maudigan)
              Updated db.php wrappers for PHP7
              (Athrogate)
              Updated db wrapper to be an object so it wouldn't
              interfere with header/footer db object

v2.6
----------------------------------------------------------------------
Modified some of the code to allow you to embed charbrowser into
a forum header/footer.

Oct 21, 2017 - Between your forum headers include charbrowser
               index.php. Prior to the include turn the simple 
               headers on with:
               $charbrowser_simple_header = true;
               Tell charbrowser that it's being wrapped with:
               $charbrowser_wrapped = true;
               Lastly, you need to set the root path of charbrowser
               so it can correctly find the other images/stylesheets
               to include when the page renders:
               $charbrowser_root_url = "http://eg.com/charbrowser/";
               Those steps are only necessary if you want to wrap
               Charbrowser in your forums.
               The other changes are pretty widespread. A lot of 
               objects have been renamed to reduce the chance that it
               conflicts with your forum objects. Do a version
               compare to see what all changed.
               (Maudigan)

v2.52
----------------------------------------------------------------------
Added omens of war flags, moved $version out of the config.

May 17, 2017 - Added the OOW flags to language.php and flags.php
               (Maudigan)
               Some servers were keeping their old config file,
               which has the version stamp in it. This made it hard
               to identify what build a server was using. That value
               was moved to a stand alone version.php. The order the
               files are included means the variable in version.php
               should overwrite the old one in your config, however
               you should probably pull the new config.template or
               remove the $version variable from config.php.
               (Maudigan)

v2.51
----------------------------------------------------------------------
This release makes the item/spell links more customizable

October 3, 2016 - Added new customizable link templates to the confi
                  file. This is for servers that don't use the PEQ DB
                  so they don't want to link to mqemu's database.
                  (Maudigan)


v2.5
----------------------------------------------------------------------
This release fixes the aa and corpse pages, but it is mostly to clean
up the code and add features for developers who may want to alter or
extend the code.

September 30, 2014 - Added some new methods to the Template class that
                     let developers access the magelo data in a JSON
                     or XML format. The template values were never
                     meant to be output this way so it's not the
                     cleanest data. To see it, add a variable named
                     "api" to your GET, i.e.
                     corpse.php?char=Maudigan&api (Maudigan)
October 4, 2014 -    Fixed a call to the nonexistant mymessage_die 
                     in item.php. (Maudigan)
                     Moved DB connection stuff out of the config
                     file (Maudigan)
May 22, 2016 -       Cleaned up the way queries are templated.
                     Added wrappers on all the mysql functions which
                     is mostly so future modifications can be done quicker
                     when something changes. it also lets us gather
                     database performance stats (when enabled) without
                     having to run queries twice. It should also let
                     people swap to non mysql databases and only have to 
                     edit db.php instead of a whole mess of
                     different modules. (Maudigan)
                     The database performance code was rewritten to use
                     the normal templating system instead of writing its
                     own HTML. (Maudigan)
                     General code cleanup, replaced tabs with spaces (they're
                     better, so eat-it). Added some extra comments, removed 
                     some old ones. I didn't mark all of it so if youre 
                     curious you'll have to do a compare. (Maudigan)
May 24, 2016 -       Functionized the code that converts directories into
                     the list of options for the signature builder.
                     Made a default return value for profile.php->GetValue()
                     and set the value to 0 to fix the display of skills.php
May 30, 2016 -       Updated aa.php to implement the new aa storage method.
                     Updated corpse.php with the blob changes that I missed
                     on the last update.


v2.41
----------------------------------------------------------------------
September 28, 2014 - added a database stats gathering tool. Uncomment
                     the setting at the bottom of config.php and it will
                     cause every query, its runtime and an explanation
                     to be dumped at the bottom of each page. WARNING:
                     the dumped data is publicly viewable. (Maudigan)
                     Altered the profile class to have a constructor
                     that recieves the charname and populates the
                     basic character data. This permitted the removal
                     of an extra query on nearly every screen. (Maudigan)
September 29, 2014 - completed the character blob modifications.
                     this involved rewriting most of the profile.php
                     script and putting a bandaid on aa.php (Maudigan)
                     Added the missing AA tabs. (Maudigan)

v2.4 (beta)
----------------------------------------------------------------------
September 26, 2014 - Akkadius removed the character blob from the
                     database and triggered this update. All changes
                     are to accomodate the new storage method.
                     Rewrote profile.php, this involved removing old
                     comments; see old versions to view them.
                     Changed character_ table referenes to character_data
                     in multiple files.
                     Rewrote the code that grabbed a characters guild
                     name and rank as the the blob doesn't exist and the
                     new method doesnt track a character guild id. I used
                     this as an opportunity to swap from a WHERE join to
                     a standard JOIN. (Maudigan)


v2.3
----------------------------------------------------------------------
February 24, 2014 - Changed item icons to use PNG instead of GIF (Maudigan/Warmonger)
                    Added backstab damage to item display (Kinglykrab)
                    Corrected spelling errors (Kinglykrab)
                    Fixed syntax error in css (Kinglykrab)
February 25, 2014 - Added Heroic stats and aug types (Kinglykrab)
                    Added infinite charge text to items (Kinglykrab)
                    Added Drakkin/Powersource to bazaar (Kinglykrab)



v2.25 
----------------------------------------------------------------------
February 9, 2014 - Fixed charm item type getting set wrong (Maudigan)
February 12, 2014 - Added/Updated item icons 2588-4819. (Maudigan)



v1.0 - v2.24
----------------------------------------------------------------------
Visit Character Browser forum at http://mqemulator.net for details on
changes before v2.25.