Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-14-2000 Last Update: Never Installs: 0
 
No support by the author.

Ok I am almost there

I am working with code that I think started as Evas active topics and changing it for another purpose.

I have created a hidden forum and it will be available for use by one person.

Then using the following code to throw the data from that forum out on a page on the actuall web site - this is sort of what it will look like, sort of, when finished

http://tuffsports.com/NBA/TheWayItis.php3

ok the code


<?php
require("admin/config.php3");

$num_active = 5;
$num_chars = 9999999;

$db=mysql_connect($servername,$dbusername,$dbpassw ord);
mysql_select_db($dbname);

$querylatest="select * from thread where forumid='20' order by lastpost desc limit
$num_active";

$resultlatest = mysql_query($querylatest,$db);

print("<center><table width=\"100%%\" cellspacing=\"0\" cellpadding=\"2\">");

while ($latest_array = mysql_fetch_array($resultlatest)) {

// Get Forum Infomation
$query_forum = "select * from forum where forumid='$latest_array[forumid]'";
$result_forum = mysql_query($query_forum,$db);
$forum_info_array = mysql_fetch_array($result_forum);

printf("<br><br><center><b><font color=\"#000080\" size=\"4\" face=\"Verdana, Arial, Helvetica,
sans-serif\">%s</font></b></center><br>",$latest_array["title"]);

// split the date up a bit
$datestr1 = substr($latest_array["dateline"],0,10);
$datetime = substr($latest_array["dateline"],11,8);
printf ("<font face=\"Verdana, Arial, Helvetica, sans-serif\"
size=\"1\"><b>%s</b><br></font>", $datetime);

$querythread="select * from post where threadid='$latest_array[threadid]' order by
dateline asc limit 1";

$result_thread_text= mysql_query($querythread,$db);

$result_thread_array = mysql_fetch_array($result_thread_text);
printf ("%s",$result_thread_array["pagetext"]);
?>

(so it looks ugly - I am still working with it, or its working me over - one of the two)

Ok the problem is, and you can see it if you go the web page and look at the bottom is getting a parse error in line 42 or something like that - its the very last line

?>

I have no spaces anywhere or anything like that, I have checked. I am lost. Everything works like a charm except the ugly parse error at the very end.


my main page will be http://tuffsports.com/basketballmainpage.php3 and am still doing a little work on that (thanks all for the help on questions and code to make that work)

One other question - if you look at the mainpage on the right you will see a box with articles and updates - the next thing I am going to do is attempt to work on code to have that automaticaly spit out. How would I have it call off the title of a post from selected forums, then link to that post not at vbulletin, but link to it on the actual web page? Just wondering what a snippet of code would have to look like, I want to do it but I havnt programmed since Visual Basic first came out. I figure it would be some if else statements, but not sure, and not sure what they would have to look like.


Ok thanks again for the previous help and *hopefully* future help. Dont worry I am picking this up quick and already have a couple of hacks in the thought process, and should have enough knowledge within a month to start working on them.

Show Your Support

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

Comments
  #2  
Old 10-15-2000, 12:05 AM
Guest
 
Posts: n/a
Default

You forgot to close your while loop.
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:11 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.03489 seconds
  • Memory Usage 2,196KB
  • Queries Executed 15 (?)
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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)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
  • 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