View Single Post
  #438  
Old 05-28-2007, 04:38 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01117 seconds
  • Memory Usage 1,783KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete