Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
PHPAuction Info on Forumhome Details »»
PHPAuction Info on Forumhome
Version: 1.00, by FASherman FASherman is offline
Developer Last Online: May 2011 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-04-2002 Last Update: Never Installs: 1
 
No support by the author.

This is far from integrating the two products, but at least it makes your auctions visible on forumhome.

Sample can be seen at http://www.fasherman.com/forums

Simply, the auction table gives a link to the auctions, tells how many are active and what the newest auction is. The lightbulb is turned on if there are active auctions.

You'll need to edit index.php and create a new template. The instructions are below. Follow them exactly since you will be momentarily switching from your vBulletin database to your phpauction database and then back again.

in index.php, find:

PHP Code:
require('./global.php'); 
Above it add:

PHP Code:
    $phpauction_host="your-db-host";
    
$phpauction_user="your-db-user";
    
$phpauction_passwd="your-db-password";
    
$phpauction_db="your-phpauction-db"
still in index.php, find:

PHP Code:
eval("dooutput(\"".gettemplate('forumhome')."\");"); 
Above it, add:

PHP Code:
//PHPAUCTION HACK
    
$link mysql_connect($phpauction_host,$phpauction_user,$phpauction_passwd);
    
mysql_select_db($phpauction_db);

    
/* Performing SQL query */
    
$query "SELECT * FROM PHPAUCTION_auctions where closed=0";
    
$result mysql_query($query);
    
$num_auctions=mysql_num_rows($result);
    while (
$row mysql_fetch_array($resultMYSQL_NUM)) {
            
$newest=stripslashes($row[2]);
            
$num_category=$row[6];
    }
    
$query "SELECT * FROM PHPAUCTION_categories where cat_id=$num_category";
    
$result mysql_query($query);
    while (
$row mysql_fetch_array($resultMYSQL_NUM)) {
            
$category=$row[2];
    }
if (
$num_auctions !=0) {
  
$auctiononoff="on.gif";
} else {
  
$auctiononoff="off.gif";
}

mysql_select_db($dbname);
eval(
"\$auctiondisplay = \"".gettemplate('auctiondisplay')."\";");

//PHPAUCTION HACK END 
Now, add a template called auctiondisplay:
<table cellSpacing="0" cellPadding="0" width="100%" align="center" bgColor="#1D6AA0" border="0">
<tr>
<td>
<table cellSpacing="1" cellPadding="4" width="100%" border="0">
<tr id="cat">
<td bgColor="#336D95" background="https://vborg.vbsupport.ru/images/catagory_backing.gif" colSpan="2">
<b>Web Auction</b></td>
</tr>
<tr align="middle">
<td vAlign="top" bgColor="#1C5780" width="15">
<img alt src="images/$auctiononoff" border="0" width="15" height="15"></td>
<td align="left" bgColor="#13486D">
<normalfont>
<img alt src="images/forum-icons/gavel.gif" border="0" width="32" height="32"><b>
<a style="color: #000020" href="../phpauction">Forum Web Auction</a> - </b>
<smallfont>lets you buy or sell items in an auction format<br>
<b>Number of active auctions</b>: $num_auctions<br>
<b>Newest Auction</b>: $category: $newest</td>
</tr>
</table>
</td>
</tr>
</table>
<br>

Thats it.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-05-2002, 04:53 AM
mewgood mewgood is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you need to fix the auction link
It has a extra "."
Reply With Quote
  #3  
Old 09-05-2002, 04:56 AM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, thats correct. Dot relative addressing works like this:

. - current address
.. - parent address.

The phpauction directory is at the same level as forums with a common parent. Therefore, the dot relative addressing of a file in phpauction from the forum directory is ../file-name
Reply With Quote
  #4  
Old 09-05-2002, 11:58 AM
FFMania FFMania is offline
 
Join Date: Mar 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got 404 error when clicking on the auction thing....the dot is...extra?
Reply With Quote
  #5  
Old 09-05-2002, 02:49 PM
FlyingDutchman's Avatar
FlyingDutchman FlyingDutchman is offline
 
Join Date: Nov 2001
Location: The Netherlands
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the dot(s) is used like this:

./phpauction.php (the file phpauction.php in the current dir)
../phpauction.php (the file phpauction.php in the parent dir)

DO NOT put it AFTER the filename/dirname!, d0h
Reply With Quote
  #6  
Old 09-05-2002, 07:49 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by mewgood
you need to fix the auction link
It has a extra "."
I was wrong and you were right. I didn't see that you were referencing the ending dot. Missed it entirely and looked like a fool.

To answer the other question...

<a style="color: #000020" href="../phpauction">Forum Web Auction</a> - </b>

Is a link to your auction directory. Edit the path accordingly. If you want to be even more formal about it, make it a link to index.php in your phpauction directory.

Mea Culpa
Reply With Quote
  #7  
Old 09-06-2002, 03:48 PM
Limpkinw Limpkinw is offline
 
Join Date: Feb 2002
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack..made a booboo on install
Reply With Quote
  #8  
Old 09-06-2002, 08:52 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have got tp be kidding, right?
Reply With Quote
  #9  
Old 09-06-2002, 09:51 PM
Limpkinw Limpkinw is offline
 
Join Date: Feb 2002
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

obviously i "skipped" a step and didnt put in my database info (Dumb me) Fixed now. lol
Reply With Quote
  #10  
Old 09-06-2002, 10:30 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check out my newest phpauction hack. I think you'll like it even better.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:26 AM.


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.07201 seconds
  • Memory Usage 2,305KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete