vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - VBay! Transform your vbulletin into an auctionhouse! (https://vborg.vbsupport.ru/showthread.php?t=132544)

Rowen 05-24-2007 07:37 PM

Please update this component... It's too good of an idea to let go.

pictureboarduk 05-25-2007 03:28 PM

Negative time / closure issue here aswell ....

axi 05-25-2007 05:44 PM

awesome hack il install it when it is past beta developments

Mike Bucy 05-27-2007 04:33 AM

See www.vbclassified.com

You'll like this product. Good support and is prompt at answering questions.

Dermo-MIO 05-27-2007 02:55 PM

where does the "vbay" appear i have made the new usergroup uploaded all the files giving myself the new usergroup as my 2nd usergroup but dont seem to see a new forum nor do i see any new options in making a new thread, can any1 help ?

chrisbeau 05-27-2007 11:49 PM

Quote:

Originally Posted by Dermo-MIO (Post 1255565)
where does the "vbay" appear i have made the new usergroup uploaded all the files giving myself the new usergroup as my 2nd usergroup but dont seem to see a new forum nor do i see any new options in making a new thread, can any1 help ?

yourdomain.com/forum/vbay.php

dartho 05-28-2007 04:38 AM

I've been getting ready to move form 3.5.x to 3.6.7 and decided to start tweaking vbay from scratch - I've made a notes of the basic changes I needed to make to get vbay functioning well enough to use. As you can see, most of them are small changes - I have not included any aesthetic changes - but hopefully they will help!

This change the look of vbay a little, but I haven't dug into it much yet, and it doesn't really bother me. If anyone can spot any mistakes here - please let me/us know! Thanks

Create a New template called vbay_cat_closed_end
Code:

</table>

edit the vbay.php file and re-upload it to your server
find:
Code:

                                eval('$vbayleft .= "' . fetch_template('vbay_cat_closed_row') . '";');
                        }
                }

replace with:
Code:

                                eval('$vbayleft .= "' . fetch_template('vbay_cat_closed_row') . '";');
                        }
                }
                eval('$vbayleft .= "' . fetch_template('vbay_cat_closed_end') . '";');

That should fix up the display of closed auctions




Edit "vbay_shop_row" template
find:
Code:

<td class='alt2' align='center'>{$days}D {$hours}H {$minutes}M {$rest}S</td>
replace with:
Code:

<if condition="$difference > 1">
        <td class='alt2' align='center'>{$days}D {$hours}H {$minutes}M {$rest}S</td>
<else />
        <td class='alt2' align='center'>Auction Complete</td>
</if>

That should show auctions as closed immediately



Edit "vbay_view_info" template
find:
Code:

<if condition="$item[completed]==1"> 
This auction has been completed!
</if>
<if condition="$item[completed]!==1">
{$days}D {$hours}H {$minutes}M {$rest}S
</if>

replace with:
Code:

<if condition="$difference < 1">
This auction has been completed!
<else />
{$days}D {$hours}H {$minutes}M {$rest}S
</if>

That should show auctions as closed immediately



edit "vbay_view_desc" template
find:
Code:

<if condition="$item[completed]!==1">
replace with:
Code:

<if condition="$difference > 1">
That should show auctions as closed immediately



edit "vbay_cat_closed_row" template
find:
Code:

<tr>
                                                                                        <td class='alt2' align='center'><b><a href='?do?=cat&showcat={$thecats['catid']}'>{$thecats['catname']}</a></b></td>
                                                                                        </tr>

replace with:
Code:

<tr>
                                                                                        <td class='alt2' align='center'><b><a href='?do=closed&showcat={$thecats['catid']}'>{$thecats['catname']}</a></b></td>
                                                                                        </tr>

Fixes a typo

Although the template mods above make the close auctions a little redundant when viewing the auctions, it is still required to move the auctions to the "Closed Auctions" section and the cron job also notifies sellers buyers via PM - you could change this to only happen every 15 or 20 minutes rather than 10 if you wanted. I had to manually add it as for some reason it wasn't added automatically:

In AdminCP, check the Scheduled Task Manager to see if the "closeauctions" cron job is there, if not manually add it - "Add New Scheduled Task"

varname:closeauctions
title: CLose vBay Auctions
Minute: 0, 10, 20, 30, 40, 50
Filename: ./includes/cron/closeauctions.php
Product: vbay

I've found I also need to make a few changes to the MySQL database to get the vbay to allow fractional dollar values. To do this I changed the price, inc and reserve fields in the vbay_items table from "int" to "decimal(11,2)"

the following SQL Query should do that for you:
Code:

ALTER TABLE `vbay_items` CHANGE `price` `price` DECIMAL( 11, 2 ) NOT NULL DEFAULT '0',
CHANGE `inc` `inc` DECIMAL( 11, 2 ) NOT NULL DEFAULT '1',
CHANGE `reserve` `reserve` DECIMAL( 11, 2 ) NOT NULL DEFAULT '0'


dartho 05-30-2007 02:35 AM

I've also modified the "vbay.php" to send a PM to a bidder if/when they get outbid if anyone is interested...

mikeylikesitz 06-02-2007 12:30 PM

i am interested

dartho 06-02-2007 12:59 PM

When a new bid is placed on an item, this modification to the vbay.php file will send a PM to the old highest bidder from the new highest bidder
in vbay.php search for:

search for:
Code:

  require_once('./includes/class_bbcode.php');
add the following immediatelt below
Code:

  require_once('./includes/functions_vbay.php');
Search for:
Code:

        if ($_REQUEST['do'] == 'bid') {
            $check = $db->query("select * from " . TABLE_PREFIX . "vbay_items where id='{$_REQUEST['dobid']}'");
              $item = $db->fetch_array($check);
                if ($item['owner'] == $vbulletin->userinfo['userid']){
                        eval(standard_error(fetch_error('vbay_auction_own')));
                }
                if ($item['completetime'] < time()) {
                        eval(standard_error(fetch_error('vbay_auction_ended')));
              } else {
                      if ($item['price'] + $item['inc'] > $_POST['bid']) {
                              eval(standard_error(fetch_error('vbay_bid_higher')));
                      }

and add the following immediately below:
Code:

// send a PM to old high bidder
if ($item['bids'] > 0) {
        $pmhigh_bidder = $vbulletin->db->query("select * from " . TABLE_PREFIX . "user where userid='{$item['highbidder']}'");
        $pmbidder = $vbulletin->db->fetch_array($pmhigh_bidder); 
        $title = "You have been outbid: {$item['name']}";
        $message = "Hello, I have just outbid you on this auction!  This is an automated system message.";
        send_pm($vbulletin->userinfo['username'],$vbulletin->userinfo['userid'],$pmbidder['username'],$title,$message);
        }


Another modification I've made is that if a bid is placed in the last 10 minutes of teh auction, teh auction end time is automatically extended to 10 minutes. I do this to stop sniping, and to also make it somewhat more like a 'real' auction as opposed to ebay.

To do this, edit vbay.php and find:
Code:

$db->query("update " . TABLE_PREFIX . "vbay_items set highbidder = " . $vbulletin->userinfo['userid'] . " where id='{$_REQUEST['dobid']}'");
and add the following ABOVE it:
Code:

// Increase end auction time by ten miniutes if bid in last 10 minutes - stops sniping!
                        $timeremaining = $item['completetime']-time();
                        if ($timeremaining < 600){
                                $endstamp = 600 + time();
                                $db->query("update " . TABLE_PREFIX . "vbay_items set completetime = '{$endstamp}' where id='{$_REQUEST['dobid']}'");



I've also added logging of bids to a simple text file - this is just in my forum root as I don't feel the need to hide it. To add it, edit vbay.php search for
Code:

$vbulletin->url = "vbay.php?do=item&viewitem=" . $_REQUEST['dobid'] . $vbulletin->session->vars['sessionurl'] ."";
and add the following immediately ABOVE it

Code:

$logentry = date('Ymd') . ' ' . strftime('%T') . ' Auction: ' . $_REQUEST['dobid'] . ', Amount: ' . $bid . ', User: ' . $vbulletin->userinfo['username'];
$vbaylog = fopen('./vbaylog.txt','a') or die("can't open vbaylog: $php_errormsg");
fwrite($vbaylog, $logentry . "\r\n");
fflush($vbaylog);
fclose($vbaylog) or die ($php_errormsg);

To view the log, just open vbalog.txt in your browser (http://yourforum.com/forums/vbaylog.txt) I guess you could create it in the admincp dir if you wanted to hide it - there are no doubt better ways to do most of the above, but it works for me.


All times are GMT. The time now is 03:54 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02291 seconds
  • Memory Usage 1,766KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (20)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete