Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-03-2003, 12:20 PM
sweet22 sweet22 is offline
 
Join Date: Jul 2003
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default gallery project need some help

ok im doing good so far with my gallery for vb but i need help with creating multiple galleries from just one php page. kinda like vb with displaying multiple forums but only using one php file.
Reply With Quote
  #2  
Old 11-03-2003, 03:24 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you offering to pay? If not then it should be in "Help Me Finish" forum. If so it should be in "Service Requests" forum. Let me know and i'll move it to the appropriate forum for you
Reply With Quote
  #3  
Old 11-03-2003, 03:37 PM
sweet22 sweet22 is offline
 
Join Date: Jul 2003
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im not paying, lol i was just wondering how i would use if($id==1){
stuff like vb does but im confused, so move it to help me finish forum(even though im not close to finishing)

also how would i retrieve certain values from mysql without getting all the values from a field
Reply With Quote
  #4  
Old 11-04-2003, 12:38 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What you have is something like this

A url like gallery.php?id=1

Then the php would be something like this:

PHP Code:
if(isset($id))
{
intval($id);
$query $DB_site->query("SELECT * FROM gallery WHERE id=$id");

while(
$iteminfo $DB_site->fetch_array($query))
{
// call your templates and stuff here
}

Reply With Quote
  #5  
Old 11-04-2003, 02:04 PM
sweet22 sweet22 is offline
 
Join Date: Jul 2003
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm im confused how that works, cause im not using the vb way of connecting. should i use that way? cause im putting this gallery on another dbase so it doesnt slow down my vb.
Reply With Quote
  #6  
Old 11-04-2003, 02:25 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you're looking for vb intigration you're best coding it to vBulletin style standards Using the built in database class is nice and easy
Reply With Quote
  #7  
Old 11-04-2003, 02:31 PM
sweet22 sweet22 is offline
 
Join Date: Jul 2003
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

heres wut ive done so far:
PHP Code:
$connectionmysql_connect("$server","$dbuser","$userpass") or die("Connection to Data Base not successful,please try again.");
//* for $db type in the name of the database your going to be using
$db="anima823_gallery";
//*do not edit mysql_select_db
mysql_select_db("$db");
//*total views do not edit!//////////////////////////////////////////
$galleryviewsmysql_query("SELECT gal_views FROM gallery_index");
$vrowmysql_fetch_assoc($galleryviews);
$views=$vrow[gal_views];
$tviews=++$views;
//*views update do not edit!///
//mysql_query("UPDATE gallery_index SET gal_views='$tviews'");
/////////////////////////////////////////////////////////////

//$grab_id= mysql_query("SELECT gal_id FROM gallery_idex");
//$id= mysql_fetch_object($grab_id)
if($id==1){
print 
"hi";
mysql_query("UPDATE gallery_index SET gal_views='$tviews' WHERE gal_name='test'");
}
if(
$id==2){
print 
"hi_#2";
mysql_query("UPDATE gallery_index SET gal_views='$tviews' WHERE gal_name='Character/Character Design'");
}
?> 
so far ive made it so that each time you visit a specific gallery it will update the # of views for the gallery.
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 09:51 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.04382 seconds
  • Memory Usage 2,222KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete