View Single Post
  #1  
Old 01-30-2003, 12:16 PM
nsglazer nsglazer is offline
 
Join Date: Jan 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help with custom coding problem please :-)

Hello,

Would someone please help me with some PHP coding? I am trying to add a little customization to the page, but apparently my code is messing up one of the variables that vbulletin is using, or something. When the changes below are made the search engine on my site doesnt work. It gives the following error message:

"The search term you specified (*) is under the minimum word length (4) and therefore will not be found. Please make this term longer."

Do you know what I can do to correct this? Need any other info?

Thanks so much!!!

Neil

------------

What I added to header:

$leftcolumn

------------

What I added to PHP Include:

ob_start();
include( "$DOCUMENT_ROOT/column_left_special2.inc" );
$leftcolumn = ob_get_contents();
ob_end_clean();

------------

What Makes up $DOCUMENT_ROOT/column_left_special2.inc

<?php
$query = "SELECT * FROM store_items WHERE display = '1' AND image != ''";
$result = mysql_query( $query );
$n = mysql_numrows( $result );

if( $n > 1 )
{
// seed the random index generator
srand( ( double )microtime()*1000000 );
// generate random numbers
$j = rand( 0, ($n-1) );
}
else
{
$i=0;
}

if( $n > 0 )
{
$price = mysql_result( $result, $j, "price" );
$image = mysql_result( $result, $j, "image" );
$storeItem_id = mysql_result( $result, $j, "storeItem_id" );
$code = mysql_result( $result, $j, "code" );
$display = mysql_result( $result, $j, "display" );
$storeSubcat_fk = mysql_result( $result, $randval[$j], "storeSubcat_fk" );
$storeCat_fk = mysql_result( $result, $randval[$j], "storeCat_fk" );
$productName = mysql_result( $result, $j, "productName" );
$unadvertised = mysql_result( $result, $j, "unadvertised" );

if( $unadvertised == 0 )
{
$price = "click for price";
}
else
{
$price = "$" . $price;
}
}

$size = GetImageSize( "http://www.pilotmall.com/store/graphics/00000001/" . $image );

// size[0] is the width, size[1] is the height
if( $size[0] > 100 )
{
$width = " WIDTH=\"100\"";
}

?>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100" BORDER="0">
<TR>
<TD ALIGN="center" CLASS="small">
<B>Shop PilotMall.com</B>:
<A HREF="http://www.pilotmall.com/store/agent.mv?AG=studentpilot&SC=PROD&S=1&P=<?php print $code ?>"><IMG SRC="http://www.pilotmall.com/store/graphics/00000001/<?php print $image ?>" <?php print $width ?> ALT="" BORDER="0"></A>
<A HREF="http://www.pilotmall.com/store/agent.mv?AG=studentpilot&SC=PROD&S=1&P=<?php print $code ?>" CLASS="small"><?php print $productName; ?></A>
</TD>
</TR>
</TABLE>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01091 seconds
  • Memory Usage 1,766KB
  • 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
  • (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