# nes_nerd_videos.php # written for James Rolfe by Jason Hills (jasonhills@gmail.com) # Changelog: # 4/6/08 - First version # next version - include auotmatic image resizing # - this script expects to find a text file (the database) named nes_nerd_videos.txt # - the file should have the following format with fields serarated by a pipe character | # # video name tag|video date|runtime|youtube v code OR screwattack .html file name OR gametrailers video number OR full URL if exception to the rules # to do a coming soon on the last line you use three text fields # # Example: # simon|May, 2004|9:25|V4we8iFk-fY # Wii_Salute|Nov 19, 2006|4:58|WiiSalute.html # 2006_top10|Jan 1, 2007|4:08|top10.html # ducktales|Feb 10, 2007|1:53|http://one.revver.com/watch/161983 # AVGN-Captain-S|Aug 5, 2007|15:52|http://screwattack.com/Flash%20HTML/CaptainS/unite.html # DOUBLE-VISION PART 2|(ColecoVision)|COMING April 9th # #### Configuration #### #Grid Width - how many cells wide should the table be? $gridwidth = 7; ### !!DO NOT EDIT THE PHP CODE BELOW THIS LINE!! #### ?>

NEWS | VIDEOS | MYSPACE | YOUTUBE | LINKS | GALLERY | FAQ | MAIN | FORUM
WARNING: VIDEOS CONTAIN VULGAR LANGUAGE. MATURE AUDIENCES ONLY. ## Populate array of video values ## //open text file $handle = @fopen("nes_nerd_videos.txt", "r"); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle); $filelines[] = $buffer; } fclose($handle); } ?>
| "; else { $line = explode('|',array_shift($filelines)); if ( count($line) == 3 ) { $name = trim($line[0]); $subtitle = trim($line[1]); $coming = trim($line[2]); ?> | echo $name; ?> echo $subtitle; ?>
|
}
else
{
//name date runtime linkid
$name = trim($line[0]);
$date = trim($line[1]);
$runtime = trim($line[2]);
$x = trim($line[3]);
?>
echo $date; ?> if ( strpos($href, "gametrailers") ) { ?> } //end if ?>Run time: echo $runtime; ?> |
} //end else
} //end else
} //end for
?>
NEWS | VIDEOS | MYSPACE | YOUTUBE | LINKS | GALLERY | FAQ | MAIN | FORUM
© echo date('Y'); ?>, The Angry Video Game Nerd, The Cinemassacre Productions (James Rolfe)