Quote:
Originally Posted by TheMayhem
As far as the user title changes you applied, I'm very unsure of that... The user title bug issues is one of three bugs I haven't fixed and want to before the next version so I will look into what you suggested and see if I can come up with a better way of doing it then I currently have so that the usernames & usertitles can still be purchased with the items I currently offer without having to do template edits. Having no template edits is a very important part of this product that I refuse to ever change.
|
That's why I had to move the location of the hook to postbit_display_complete, and set the execution order as high as it will go. If it was left where it was, it simply became URL encoded by other mods (namely VBSEO and another one I couldn't bother hunting down). It doesn't seem to cause any issues by changing the location and order.
Also; the only template edit we did, was to let us quickly add/remove colors for the color purchases. There are some colors we want off-limits for usernames. (It's simply 'appending' colors to the selection box, if it's not the username color item)
As for the actual template edits, we needed to add/remove some colors due to our skin, as some are very very hard to read on our style, so we didn't want our members to have the ability to purchase them at all. (Thus, saving us the headache of having to manually change their color)
The changes for that are as follows:
PHP Code:
$templater = vB_Template::create('market_itembuy');
$templater->register('market_gift_list', $market_gift_list);
$templater->register('name', $itembuy[name]);
$templater->register('item_id', $itembuy[marketid]);
$templater->register('item_type', $item_type);
$templater->register('amount', $item_amount);
$templater->register('new_amount', number_format($item_new_amount, 2, '.', ','));
$templater->register('current_points', $current_points);
$templater->register('discount_percentage', number_format($discount_percentage, 2, '.', ''));
$templater->register('remaining', $remaining);
$templater->register('image', $image);
$templater->register('disabled', $disabled);
$templater->register('maxchar', $maxchar);
$templater->register('instructions', $instructions);
$templater->register('gift_minimum', $permissions['market_gift_minimum']);
$templater->register('gift_maximum', $permissions['market_gift_maximum']);
if ($itembuy[type] == 4) {
$templater->register('max_donate', $max_donate);
}
/** Begin Custom Color Selection **/
// Check if this is a colorized template we need to use
if ($itembuy['type'] == 3)
{
// These are the username colors. Which we can effectively exclude.
if ($itembuy['parentid'] != 12)
{
// market_item_buy_color_posttitle simply has a bunch of extra <option="#COLOR">COLOR</option>
// lines defined, to allow more color options. extra_color_selections is defined right before the
// closing </selection> tag in the market_item_buy template.
$templater->register('extra_color_selections', vB_Template::create('market_item_buy_color_posttitle')->render());
}
}
/** End Custom Color Selection **/
$market_itembuy .= $templater->render();
Quote:
Originally Posted by TheMayhem
Now as far as the final thing about manually editing the database for items. As I've previously stated if you ever plan on applying any upgrades of this product never ever-ever-ever start adding new items to the market_items table in the database. With how I have it coded it just won't work. Instead use one of the predefined market items I have included in the 2.0.1 series or one of the predefined categories that have no functionality but are available for custom coding and modify the coding with how you wish. Just don't insert anything new on the table. The reason I did that is so I can still have some control over the reported bugs and errors without having much 3rd party issues coming into play on why things don't work. I'm not saying I won't change that in the future but it all depends on how popular this mod becomes.
|
They're easily removed for updates, and can be added back in afterwards.
Since you're still working on bugs; there are quite a few ways to 'force' buying items without having to pay for them. (You can open multiple tabs at the actual purchase screen for different items, and purchase an item in each tab. You'll only be deducted points for certain items.)
The gambling stuff has a nasty bug that doesn't even check if you have enough points to play the games at all. You can effectively buy 10 million lotto tickets, nearly making your chances of winning 100%. (You go into the far negatives for points, but you can still win the Lotto and make all your points back, plus whatever else was in the pot)
And lastly; we had to add a small little onclick handler to disable the 'Purchase' button after clicking it once, or you could accidentally buy more than 1 of the same item (if applicable).