Thread: My First Import
View Single Post
  #1  
Old 12-29-2010, 04:19 AM
MatiasCandy MatiasCandy is offline
 
Join Date: May 2008
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default My First Import

So I finally got some programming for my forums. the down side is it really was not written for vBulletin and the few people who have it working on their website have never taken the time to make it a true product / plugin.

I am not a programmer by any means but I am very interested in programming. I know the basics and I can follow directions pretty well. So I thought I would make one new thread to get me through my project.

First I created a page outside vBulletin in a folder we will call "log"
My first page was named index.php and I created a template with simple conditions.
I followed Lynnes post https://vborg.vbsupport.ru/showthread.php?t=228112

Since that was pretty easy I am sure I can figure all this out by getting help from as many programmers that want to respond to my thread. All *positive* comments are welcome.


So here are my first questions:

I have this in my php file (this was already written as part of a script I am trying to import into vb

Code:
$DB_Query;
$rime5 = mysql_query("SELECT * FROM " . $mysql_prefix ."table");
$list4 = mysql_num_rows($rime5);
1. what is the right syntax for vbulletin, I tried this and now I get database error:

Code:
$rime5 = $db->query_read("SELECT field FROM " . TABLE_PREFIX . "table");
$list4 = mysql_num_rows($rime5);


2. How can I get my template to call this so it shows up on the page?

right now I have this to work with
Code:
Total Number of Test Logs: $list4<br /><br />
--------------- Added [DATE]1293672196[/DATE] at [TIME]1293672196[/TIME] ---------------

Where is everyone?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01165 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
  • (3)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