Tsunami
Members-
Content Count
172 -
Joined
-
Last visited
Everything posted by Tsunami
-
whens he gonna do that?
-
Can Anyone Load This Link? Try clicking please...
Tsunami replied to PlugComputers's topic in Websites and Web Designing
nope dont work for me either -
are you talking about a guest book and when you leave a comment it also adds it to a "shoutbox" type of thing on ur forums or do you actually want it to leave a "post" ?
-
@ beeseven...im saying that it would be fairly easy to do it for something simple but it would take a bit of thinking to make it do extremely complex ones... ya feels me?@spectre...Good work! i havent tested it out to see if it works or not but i have faith... i figured there was a way to do it but im just lazy :-p
-
Help With Some Website Coding Databases and saving form results
Tsunami replied to PlugComputers's topic in Programming
well you could do what i would do and is use php and put all the contents in a text file and then write ANOTHER form just for you so you can read the information nice and orderly... or you could do this to make it email to you.... change the opening form tag to this: <form action="formprocess.php" method="POST"> then create a php file called formprocess.php and put this in it: <?$myemail = "youremail@host.com";$numoffields = "2";//YOU MUST CHANGE THIS$formn[0] = "What form 1 is called";$form[0] = $_POST['fieldname'];//field name is found in <input name=FIELDNAME>$formn[1] = "What form 2 is called";$form2[1] = $_POST['fieldname'];$message ="";for($i = 0; $i < $numoffields; $i++)$message .= $formn[$i] . " --- " . $form[$i] . "<br>";mail($myemail,"FORM RESULTS",$message);?> its commented so you know what to do... just copy and paste this: $formn[0] = "What form 1 is called";$form[0] = $_POST['fieldname']; to where the other ones are and change the numbers accordingly -
ok i got bored... and i tried to make something similar to what they offer at cooltext.com... ok EXAMPLE: Tsunami's Cool Text More options are to come.. hopefully with more fonts and such... code will be posted upon request (because if someone wants the code i have to take out my table tags and such and im just a bit to lazy to do it right now if no one wants it >.< )
-
made you a quick little example of how to do it.. http://forums.xisto.com/no_longer_exists/ it creates a image "on the fly" from the given text... hope you like i can give you the code for a sig if you want >.< but im not sure if your just wanting an answer to your quesiton or if you actually want a dynamic sig
-
yea we went over that last night SM ... thats whta you said but i figured is post it here so that there could be some documentation that i cant receive pm's so no-one (ie administrator or mod) cant say i ignored their pms and what not >.< but yea i have 0 messages in any folders, no one on my block list either... with the making of a new account and what not i could deal with the loss of credits (ive only got 20 or so any way) and loss of posts but i dont wanna loose my hosting >.< lol... i suppose i could deal without it and instead put my email address in my sig so people can email me instead of pm me
-
I cant receive pm/messages on this site... its been like this since i joined because BuffaloHelp tried to pm me and i couldnt get it.... i have changed the settings so that i can and all seems to be in order but still no messages... anyone know what the problem could be?
-
im not sure what you said but i think you may be right. I wish there was just some way to put in their url and get their myspace name and a picture url but sadly there isnt >.< hopefully this will be a lil easier that what albus is doing right now... with the form and all... but for people using the preview... just go ahead and add some people and what not... i suggest using yesterday's date... cause that would mean that it would be the next one in line... or use tommorrows date and see if it will switch over tommorrow or not...
-
okie dokie! this one i suppose is the most complicated but i tried to make it simpler to install... Just so you know it automatically changes on the date that you assign and it only shows the ones that have been shown in the past and the current one in the archives NOT the ones to come... so you can do all the people for 20 years and it will show them 1 by 1 on the days that you assign them to! PREVIEW! MyspaceFan Main Add New Fan Form ok If you dont read the code at least READ THIS ENTIRE POST! so you dont mess up >.< ok... First everyone needs to create a TEXT file with a .txt extension called myfans.txt with this in it: 0 DO NOT PUT ANY LINE BREAKS OR CARRAIGE RETURNS IN THIS!!! its very important that you dont... now this is the last you will ever have to mess with this file if you do it right. ok... now if you are ALBUS DUMBLEDORE!!! make the file have this code in it instead: 3*|+*[+] Jurraietto [x]*|+|##|myspace.com/hp07gryffindor|%23#|My Name is julie|##|Since 5th grade|##|When my sister\'s best-friend, knows tht i like fantasy and magic, she told me tht i should read harry potter because she says tht it\'s very interesting and Magic, soo i went to Borders to buy it, and from therefore on i became a crazy harry Potter Fan ^^(tee-hee)|##|yes, i did.|##|my favorite book is Quidditch Through the Ages.|##|The Last Unicorn|##|I read The book and then i saw the Movie |##|Yes i\'m moore than glad, i\'m excited.|##|Daniel Radcliffe, because he does and Excelent Harry Potter Character, and i mean he got Harry\'s look the smile, the face, the surpise, the sad, the happy, the funny, the atituted, well except their favorite color the both have different favorite color.|##|All of Them!!|##|All of Them 2 ^^ i just love it and it\'s hard to choose which is which.|##|http://myspace-176.vo.llnwd.net/01192/67/17/1192087176_m.jpg|##|Because i Love harry potter and i Like the Fantasy and mysteries and it\'s Fun|##|3 Weeks, because i like to read nice and slowly not missing a word, and read every detail of it. ^^|##|1159142400*Jessica**taken**online*|##|http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=57603809|##|Jessica Reynolds|##|For about 5 years. Maybe 4 but i was in 8th grade and im graduated now; so i say 5 years|##|My little brother actually told me i should read them (my class did a book reading thing and whoever read the most got some extra points) when i couldn\'t find anything better to read. Then i borrowed The Sorcerer\'s Stone from the library|##|I have. More than once too.|##|I have to say Harry Potter and the Order of The Phoenix.|##|Definitly Harry Potter and the Prisoner of Azkaban|##|Read the book first.|##|I am.|##|It is a tie between Devon Murray and Tom Felton. I think they are both amazing actors and seem to be really cool guys. Plus, I think they are gorgeous.|##|Harry Potter and the Order of the Phoenix|##|Harry Potter and the Prisoner of Azkaban|##|http://myspace-255.vo.llnwd.net/01187/55/22/1187112255_m.jpg|##|I think it would be cool, i love Harry Potter and I want it to be known|##|It took me about 2 days off and on. i can\'t read the book in one sitting because of my brother and dogs. |##|1159747200WOAH!! its Molly|##|http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=59321138|##|Molly|##|umm...i think since i was 9|##|well when i first read the book i didn\'t really like it, b/c my parents made me read it, but then when i started reading the others for fun i really enjoyed them.|##|Yes|##|my favorite is Harry Potter and The Order of the Phoenix|##|Harry Potter and the Prisioner of Azkaban|##|well i saw the first couple movies before reading the book, but now i\'m ahead of the movies by two books|##|Yes|##|Dan Radcliffe, because he is very talented at portraying Harry Potter, and he\'s cute.|##|Harry Potter and the Order of the Phoenix|##|Harry Potter and the Prisoner of Azkaban|##|http://myspace-437.vo.llnwd.net/01258/73/47/1258317437_m.jpg|##|cause i love harry potter, and i just wanted to show how much of a fan i am!|##|A Day. |##|1160352000 Only Copy What is given make sure there are no stray carraige returns at the end. The reason i want you to use this is because it already has ur info for your ones already. Now for the main code... Create a PHP file with the .php extension called myspacefan.php with this code in it: foreach($fileh as $key => $val) $fan[$key] = explode("|##|", $val); $id = $fileh[0] + 1; if($fan[$id] && time() >= $fan[$id][16]) { $file2 = fopen('myfans.txt','w'); fwrite($file2, $id . "\r\n"); for($i = 1; $i < sizeof($fileh); $i++) { fwrite($file2,$fileh[$i]); } fclose($file2); } if($_GET['action'] == 'form') { ?> <script language="javascript"> function selectDate(mylink){ if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, 'getdate', 'width=308,height=235,scrollbars=no,menubar=no,resizable=no'); return false; } </script> <form action="<? echo $fileincluded; ?>?action=add" method="POST" name=myspacefan> <table width="300"><tr><td>Myspace Name linenums:0'><?$fileincluded = "myspacefan.php";$fileh = file('myfans.txt');foreach($fileh as $key => $val) $fan[$key] = explode("|##|", $val);$id = $fileh[0] + 1;if($fan[$id] && time() >= $fan[$id][16]){$file2 = fopen('myfans.txt','w');fwrite($file2, $id . "\r\n");for($i = 1; $i < sizeof($fileh); $i++){fwrite($file2,$fileh[$i]);}fclose($file2);}if($_GET['action'] == 'form'){?><script language="javascript">function selectDate(mylink){if (! window.focus)return true;var href;if (typeof(mylink) == 'string')href=mylink;elsehref=mylink.href;window.open(href, 'getdate', 'width=308,height=235,scrollbars=no,menubar=no,resizable=no');return false;}</script><form action="<? echo $fileincluded; ?>?action=add" method="POST" name=myspacefan><table width="300"><tr><td>Myspace Name:</td><td><input type=text name=mysname></td></tr><tr><td>Myspace URL:</td><td><input type=text name=url></td></tr><tr><td>Picture URL: </td><td><input type=text name=field11></td></tr><tr><td>Real Name: </td><td><input type=text name=rname></td></tr><tr><td>Why do you want to be listed here? </td><td><input type=text name=field12></td></tr><tr><td>How Long Have you Been a Fan? </td><td><input type=text name=field1></td></tr><tr><td>How did you First Pick it Up? </td><td><textarea rows=5 cols=15 name=field2></textarea></td></tr><tr><td>Have you read them all? </td><td><input type=text name=field3></td></tr><tr><td>Whats your favorite book? </td><td><input type=text name=field4></td></tr><tr><td>Whats your favorite movie? </td><td><input type=text name=field5></td></tr><tr><td>Did you see movie or book first?</td><td><input type=text name=field6></td></tr><tr><td>Glad We're your myspace friend? </td><td><input type=text name=field7></td></tr><tr><td>Fav. Actor in the movies & why? </td><td><textarea rows=5 cols=15 name=field8></textarea></td></tr><tr><td>Whats your favorite H.P book? </td><td><input type=text name=field9></td></tr><tr><td>Whats your favorite H.P movie? </td><td><input type=text name=field10></td></tr><tr><td>How long did it take to read H.P & the Half Blood Prince </td><td><textarea rows=5 cols=15 name=field13></textarea></td></tr><tr><td>Date when to show it? </td><td><input type=evtext name=date readonly><a href="myspacefan.php?action=datesel" onClick="return selectDate(this.href);">?</td></tr><tr><td colspan=2 align=center><input type=submit value=Add></td></tr></table></form><?}else if($_GET['action'] == "datesel"){?><html><head><title>Date Select</title><script language="JavaScript" type="text/javascript">var qsParm = new Array();function retrieveDATEFIELD() { var query = window.location.search.substring(1); var parms = query.split('&'); for (var i=0; i<parms.length; i++) { var pos = parms.indexOf('='); if (pos > 0) { var key = parms.substring(0,pos); var val = parms.substring(pos+1); qsParm[key] = val; } }}function insertDate(datedat) { var thedate = datedat; window.opener.myspacefan.date.value = thedate; window.close();}</script></head><BODY link="#6699ff" alink="#cc00cc" vlink="#cc00cc" text=white leftMargin=0 bottomMargin=0 topMargin=0 bgcolor="#000000" onLoad="retrieveDATEFIELD();"><?if(!isset($_REQUEST['date'])){ $date = mktime(0,0,0,date('m'), date('d'), date('Y')); } else { $date = $_REQUEST['date']; } $day = date('d', $date); $month = date('m', $date); $year = date('Y', $date); $month_start = mktime(0,0,0,$month, 1, $year); $month_name = date('F', $month_start); $daynumforside = date('j', $date);$daynameforside = date('l', $date);$month_start_day = date('D', $month_start); switch($month_start_day){ case "Sun": $offset = 0; break; case "Mon": $offset = 1; break; case "Tue": $offset = 2; break; case "Wed": $offset = 3; break; case "Thu": $offset = 4; break; case "Fri": $offset = 5; break; case "Sat": $offset = 6; break; } if($month == 1){ $num_days_last = cal_days_in_month(0, 12, ($year -1)); } else { $num_days_last = cal_days_in_month(0, ($month -1), $year); } $num_days_current = cal_days_in_month(0, $month, $year);for($i = 1; $i <= $num_days_current; $i++){ $num_days_array[] = $i; } for($i = 1; $i <= $num_days_last; $i++){ $num_days_last_array[] = $i; } if($offset > 0){ $offset_correction = array_slice($num_days_last_array, -$offset, $offset); $new_count = array_merge($offset_correction, $num_days_array); $offset_count = count($offset_correction); } else { $new_count = $num_days_array; } $current_num = count($new_count);if($current_num > 35){ $num_weeks = 6; $outset = (42 - $current_num); } elseif($current_num < 35){ $num_weeks = 5; $outset = (35 - $current_num); } if($current_num == 35){ $num_weeks = 5; $outset = 0; } // Outset Correction for($i = 1; $i <= $outset; $i++){ $new_count[] = $i; } $weeks = array_chunk($new_count, 7); $previous_link = "<a href=\"".$_SERVER['PHP_SELF']."?action=datesel&date="; if($month == 1){ $previous_link .= mktime(0,0,0,12,$day,($year -1)); } else { $previous_link .= mktime(0,0,0,($month -1),$day,$year); } $previous_link .= "\"><< Prev</a>"; $next_link = "<a href=\"".$_SERVER['PHP_SELF']."?action=datesel&date="; if($month == 12){ $next_link .= mktime(0,0,0,1,$day,($year + 1)); } else { $next_link .= mktime(0,0,0,($month +1),$day,$year); } $next_link .= "\">Next >></a>"; ?><table valign="top" align="center" width="300" border="1" class="outside" cellspacing="1" cellpadding="1" valing="top"><tr><td height="20" class="inside" valign="center"><h5 align="center"><?echo "<table width=300 align=\"center\">". "<tr>". "<td width=\"25%\" align=\"left\">$previous_link</td>\n". "<td width=\"50%\" align=\"center\">$month_name $year</td>\n". "<td width=\"25%\" align=\"right\">$next_link</td>\n". "</tr>\n". "</table>\n"; ?></h5></td></p></tr><tr><td valign="top"><p><?echo "<table border=\"1\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\" class=\"calendar\">\n". "<tr>\n". "<td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td>\n". "</tr>\n"; $i = 0; foreach($weeks AS $week){ echo "<tr>\n"; foreach($week as $d){ if($i < $offset_count){ $day_link = "<a href=\"".$_SERVER['PHP_SELF']."?pageid=calendar&date=" .mktime(0,0,0,$month -1,$d,$year)."\">$d</a>"; echo "<td class=\"nonmonthdays\">$day_link</td>\n"; } if(($i >= $offset_count) && ($i < ($num_weeks * 7) - $outset)){ if($date == mktime(0,0,0,$month,$d,$year)){ echo "<td class=\"today\">$d</td>\n"; } else { echo "<td class=\"days\"><a href=\"java script:insertDate(".mktime(0,0,0,$month,$d,$year).");\">$d</a></td>\n"; } } elseif($i >= ($num_weeks * 7) - $outset) { $day_link = "<a href=\"".$_SERVER['PHP_SELF']."?date=".mktime(0,0,0,$month +1,$d,$year)."\">$d</a>"; echo "<td class=\"nonmonthdays\">$day_link</td>\n"; } $i++; } echo "</tr>\n"; } echo '<tr><td colspan="7" class="days"> </td></tr>'; echo '</table>'; ?> </p> </td></tr></table><br><?}else if($_GET['action'] == 'add'){$fileh = fopen('myfans.txt','a');fwrite($fileh,"\r\n" . $_POST['mysname'] . "|##|" . $_POST['url'] . "|##|" . $_POST['rname'] . "|##|" . $_POST['field1'] . "|##|" . $_POST['field2'] . "|##|" . $_POST['field3'] . "|##|" . $_POST['field4'] . "|##|" . $_POST['field5'] . "|##|" . $_POST['field6'] . "|##|" . $_POST['field7'] . "|##|" . $_POST['field8'] . "|##|" . $_POST['field9'] . "|##|" . $_POST['field10'] . "|##|" . $_POST['field11'] . "|##|" . $_POST['field12'] . "|##|" . $_POST['field13'] . "|##|" . $_POST['date']);fclose($fileh);?><head><meta http-equiv='refresh' content='2; url=<? echo $fileincluded . "?action=archives"; ?>'/></head>This fan has been added and you are being redirected back to the Archives<?}else if($_GET['action'] == 'archives'){$fileh = file('myfans.txt');foreach($fileh as $key => $val) $fan[$key] = explode("|##|", $val);$thisone = $fileh[0];echo "<table width=300><tr><td><b>MYSPACE NAME</b></td><td><b>FAN DATE</b></td></tr>";for($i = 1; $i <= $thisone; $i++) { if($i == $thisone) echo "<tr><td><a href='" . $fileincluded . "?action=view'> <b>" . $fan[$i][0] . "</b></a></td><td><b>" . date("n/j",$fan[$i][16]) . "- " . date("n/j",$fan[$i][16] + 518400) . "</b></td></tr>";else echo "<tr><td> <a href='" . $fileincluded . "?action=view&id=" . $i . "'> " . $fan[$i][0] . "</a></td><td>" . date("n/j",$fan[$i][16]). "- " . date("n/j",$fan[$i][16] + 518400) . "</td></tr>"; }echo "</table>";}else if($_GET['action'] == 'view'){$fileh = file('myfans.txt');foreach($fileh as $key => $val) $fan[$key] = explode("|##|", $val);$thisone = $fileh[0];if ($_GET['id'])$id = $_GET['id'];else$id = $thisone + 1 - 1;echo "<center><b>Weekly Myspace Fan!</b><br><br>Click on their name or picture to go to their myspace page!<br><br><b><a href=" . $fan[$id][1] . ">" . $fan[$id][0] . "</b><br><br><img src='" . $fan[$id][13] . "'></a><br><br><b>First off, lets start with your name?</b><br>" . $fan[$id][2] . "<br><br><b>Why Do you want to be listed on hogwartsmagic.net?</b><br>". $fan[$id][14] ."<br><br><b>Now that we have that down, How long have you been a Harry Potter fan?</b><br>" . $fan[$id][4] . "<br><br><b>How did you first pick up a Harry Potter book?</b><br>" . $fan[$id][5] . "<br><br><b>Have You read all of the books?</b><br>" . $fan[$id][6] . "<br><br><b>What is your favorite Book?</b><br>" . $fan[$id][7] . "<br><br><b>What is your favorite movie?</b><br>" . $fan[$id][7] . "<br><br><b>Did you see the movie before you read the book or vice-versa?</b><br>" . $fan[$id][8] . "<br><br><b>Are you glad you added Hogwarts Magic as a friend on your myspace? </b><br>" . $fan[$id][9] . "<br><br><b>Who is your favorite actor in the Harry Potter movies and why? </b><Br>" . $fan[$id][10] . "<Br><br><b>What Harry Potter book is your favorite?</b><br>" . $fan[$id][11] . "<br><br><b>Which Harry Potter movie is your favorite? </b><br>" . $fan[$id][12] . "<br><br><b>How long did it take you to read Harry Potter and the Half Blood Prince? </b><br>" . $fan[$id][15] . "<br><br><a href='" . $fileincluded . "?action=archives'>View the Archives</a></center>";}else if(!$_GET['action']) { $fileh = file('myfans.txt');foreach($fileh as $key => $val) $fan[$key] = explode("|##|", $val);$id = $fileh[0] + 0;echo "<center><a href='" . $fileincluded . "?action=view'><b>Weekly Myspace Fan</b><br><img src='" . $fan[$id][13] . "' width='130' height='151'></a></center>";}?> SETUP INSTRUCTIONS: Ok... on your main php page where you want a picture of this weeks fan with a link on it... you need to put this code: <?include("myspacefan.php");?> Now you need to create a completely new php page, put your template and stuff on it and where you want the content to go put this code: <?include("myspacefan.php");?> wow... so different eh? NOW FOR THE HARD PART! in the main code on myspacefan.php you need to edit this edit the red text and make it the file name of the new php page you made that has the include script on it. Now the only thing you dont have a link for in that script is the add a person page... and the url for that is the red text is the same thing as the red text in the quote before... so just have fun with it! btw click the ? on the date field to select a date (built in calendar)
-
arent regular expressions just lovely ?
-
EDIT: Forgot the Preview link XD Tsunami's YouTube Directory ok... this script, for every one who doesnt know, is what bkag wanted but this wont be bkag's official code because i have to a lil tweaking to make it work for his site... but it will work for every one else... so DONT USE THIS CODE BKAG... OK! This script is a YouTube Directory for your site... It allows users to add a movie by adding the ID, Category, Title, and a Description. All information is stored in a TEXT FILE. It then allows the users to browse the movies by title by letting them click on letters that correspond to the first letter in the title. NEW FEATURES!!! --Only allow users to click letters with movies in them --Search Feature the only drawback to the search feature is that you can only search one word with no spaces... its a simple search but it does its job... ok... there are 2 files you will need... so lets get started: Create a TEXT FILE with the .txt extension and put this as the first line: //*TITLE |##| ID |##| DESCRIPTION |##| CATEGORY*// Save the text file as movielist.txt This doesnt really do any thing except act as a place holder for the first line.. i like to do this so that it can clarify things... it tells you exactly what is where... Now lets make the main file shall we: Create a PHP FILE with the .php extension and put this code in it and then Save as movies.php: <?if($_GET['action'] != 'view'){?><head><title> YouTube Movie Directory</title><script language="javascript">function popV(titl,vide){var href;href='movies.php?action=view&t=' + titl + '&v=' + vide;window.open(href, 'profile', 'width=425,height=350,scrollbars=no,menubar=no,resizable=no');}function filterLineBreaks (ta) { ta.value = ta.value.replace(/\r\n|\r|\n/g, '<br>');}</script></head><?}?><?if($_GET['action'] != 'view'){$letters[0] = 'A';$letters[1] = 'B';$letters[2] = 'C';$letters[3] = 'D';$letters[4] = 'E';$letters[5] = 'F';$letters[6] = 'G';$letters[7] = 'H';$letters[8] = 'I';$letters[9] = 'J';$letters[10] = 'K';$letters[11] = 'L';$letters[12] = 'M';$letters[13] = 'N';$letters[14] = 'O';$letters[15] = 'P';$letters[16] = 'Q';$letters[17] = 'R';$letters[18] = 'S';$letters[19] = 'T';$letters[20] = 'U';$letters[21] = 'V';$letters[22] = 'W';$letters[23] = 'X';$letters[24] = 'Y';$letters[25] = 'Z';?><table width="100%"><tr><td><?$fileh = file("movielist.txt");foreach($fileh as $key => $val)$movie[$key] = explode("|##|",$val);sort($movie);$isany=0;$isthere=0;for($i = 0; $i < sizeof($letters); $i++){for($j = 1; $j < sizeof($fileh) && $isthere == 0; $j++){ if(ereg("^" . strtolower($letters[$i]),strtolower($movie[$j][0]))) { $isthere = 1; }}if($isthere == 1){ echo "<a href='movies.php?letter=" . $letters[$i] . "'>" . $letters[$i] . "</a>";}else echo $letters[$i];$isthere=0;if($i != 25 ) echo " - ";}?></td><td align=right><a href=movies.php?action=make>Submit a Movie</a></td></tr><tr><td colspan=2 align=right><form action="movies.php?action=search" method="GET"><input type=hidden name=action value=search><input type=text name=query <? if($_GET['action'] == 'search') echo "value=" . $_GET['query']; ?>><input type=submit value=Search!></form></td></tr></table><hr><?}if(!$_GET['action']){if(!$_GET['letter'])$letter = 'a';else$letter = strtolower($_GET[letter]);for($i = 1; $i < sizeof($fileh); $i++){if(ereg("^" . strtolower($letter),strtolower($movie[$i][0]))){echo "<b><a href=\"java script: popV('" . $movie[$i][0] . "','" . $movie[$i][1] . "');\"> " . $movie[$i][0] . "</a></b> - <i>" . $movie[$i][3] . "</i><br><i>" . $movie[$i][2] . "</i><hr>";$isany=1;}}if(!$isany) echo "<center><i>None</i></center>";}if($_GET['action'] == "make"){?><center> <form action='movies.php?action=add' method="POST" onsubmit="filterLineBreaks(this.disc)"> <table width="300"><tr><td>Movie Name: </td><td><input type=text name=name></td></tr><tr><td>Category</td><td><input type=text name=cat></td></tr><tr><td colspan=2>Description</td></tr><tr><td colspan=2><textarea name=disc rows=10 cols=30></textarea></td></tr><tr><td>Movie ID<font color=red>*</font>: </td><td><input type=text name=url></td></tr><tr><td colspan=2><center><input type=submit value="Add"></center></td></tr></table></form> <br><center><font color=red>*</font>The ID for the movie is highlighted in red in the example below:<br> youtube.com/1YiOSKCMSe4/ </center></center><?}if($_GET['action'] == "add"){ echo "<head><meta http-equiv='refresh' content='2; url=movies.php'/></head> Your movie was posted"; $fileh = fopen("movielist.txt",'a'); fwrite($fileh,"\r\n" . $_POST['name'] . "|##|" . $_POST['url'] . "|##|" . $_POST['disc'] . "|##|" . $_POST['cat']); fclose($fileh);}if($_GET['action'] == "search"){$query = $_GET['query'];$isany = 0;for($i = 1; $i < sizeof($fileh); $i++){if(ereg(strtolower($query),strtolower($movie[$i][0])) || ereg(strtolower($query),strtolower($movie[$i][2])) || ereg(strtolower($query),strtolower($movie[$i][3]))){echo "<b><a href=\"java script: popV('" . $movie[$i][0] . "','" . $movie[$i][1] . "');\"> " . $movie[$i][0] . "</a></b> - <i>" . $movie[$i][3] . "</i><br><i>" . $movie[$i][2] . "</i><hr>";$isany=1;}}if(!$isany) echo "<center><i>None</i></center>";}if($_GET['action'] == "view"){ $title = $_GET['t']; $vid = $_GET['v']; echo "<head><title>Viewing " . $title . "</title></head><body topmargin=0 leftmargin=0>"; echo '<object width="425" height="350"><param name="movie" value="youtube.com/watch?v=&%2339; . $vid . '"></param><param name="wmode" value="transparent"></param><embed src="youtube.com/watch?v=&%2339; . $vid . '" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></body>';}?> b]Save as movies.php There you are... i know its a little lengthy but it works none the less... if you dont want a youtube directory and you want something similar and you know a lil somthin somthin about php you should easily be able to customize this to your liking :-p enjoy PS. Bkag.... email me when you get online and ill email you your code Notice from truefusion: Changed to CODEBOX to reduce scrolling
-
ill fiddle with it and i might make a simple one but there is absolutely no way ill do one that can do every possible chemical formula in the world >.<
-
i dont think i can do that today. cause i need information like the url to your site the fields you want when you join and things like that...
-
oh crap! i forgot about that ill do it right now and ill post the code here for any body that wants it :-p
-
the red part is the part that determines how many credits per word... the blue determines the number of words. It uses the same algorithm used when calculating GWAM. It takes the number of characters divided by 5 to give you the number of words (the average word is around five characters long) just change the red part to fit your needs... thats just a general number that give just over 1 credit for every one hundred words or so... so just play around with it, try it out, then change it again untill it is to your liking ^.^
-
Credits Page ok there is an example... i know its not the best in the world but it works :-p... ok, im not sure how smf works so i just left that part alone but here is the simple version of the script... you can just change the $post variable for the variable for the post and rather than echo credits just add it to a field in a mysql database or something... its totally up to you. if you dont save this as credits.php you need to change 'action' in the form tag to fit your page... ie "yourpage.php?action=check" <center><form action="credits.php?action=check" method="POST"><textarea name=mypost rows=20 cols=40></textarea><br><input type=submit value="Check Credit Value"></form><?if($_GET['action'] == 'check') { $post = $_POST['mypost']; $pattern = '/\[QUOTE\](.*?)\[\/QUOTE\]/is'; $pattern2 = '/\[quote\](.*?)\[\/quote\]/is'; preg_match($pattern, $post, $matches); preg_match($pattern2, $post, $matches2); $post2 = str_replace($matches,"",$post); $post2 = str_replace($matches2,"",$post2); $length = strlen($post2); // below is the algorithm to change the post into credits $credits = round(($length/5) * .0123, 2); echo "<br> This Post would be worth <b>" . $credits . "</b> credits"; } ?> </center>i would be more than happy to clarify anything or change the code if you want me to... but this is the BASIC code...
-
ok first at aggie: Email me the stuff and ill look it over.To the other ppls: Ok, ill try to make it and hopefully post what i have tommorrow... what you mean by SMF?the best i can hope to offer you is something that when they post it the thing and it calculates it. But if you delete or move the post you will have to modify the user's credits manually. Ill also try to make a converter to show you exactly how many credits the post is worth (copy and paste it into the text box basically) and ill make a form for you to click the user's name and then it will show you the credits with the option to change them.
-
Ok, i have this idea. I can make just about anything with php, so i would like to propose an offer: Since i have absolutely no idea what to make i figured i could just have you guys tell me what you would like and i could make it for you. That way we both win, i get to make something without having to figure out what to make, and you get the code that you want. Sounds pretty simple doesnt it? OK! Well there are a few rules: 1) Do not post your ideas if you feel that you do not want them to be used by anyone else. However lets say that you want a forum as an example, but you dont want invisionfree or something like that, that would be ok because it is a pretty vague idea. But lets say you come up with something all of your own, dont post it here because it will be open to the public. 2) Be as descriptive as possible. You cant just say " I want a Post Thingy " And possibly want me to come any where close to what you want can i? So dont be afraid to make your post descriptive. 3) The code that i will post will be open source code viewable to the public so dont think just because i made it because you asked me to doesnt mean i made it specifically for you. Other people are aloud to use it if they wish. 4) Be reasonable. Dont ask me to code your whole site... because thats kind of limited isnt it? Lets say you want a few different things on your site... ie a CMS (Content Management System), a Chat, a forum, and a login script... Dont be like ok can you make me a site with all this stuff on it. Politely ask for a CMS and when i post the script for that ask me for something else. I will work as fast as i can. 5) I dont expect you to link back to my site. But however if you have room anywhere on your site for a link or something it would be greatly appreciated. my site is http://forums.xisto.com/no_longer_exists/ ok i hope you like this idea. *NOTE: There will be instructions along with the code so dont think that your just going to have to go into it blind or anything
-
Rock is just as meaning full... Rather than just words that rhyme and a beat there is 2 guitarists a drummer and a bassist in most rock banksI my self prefer the darker side of rock and alternative metal ie: Avenged Sevenfold, Mudvayne and things in that Genre along with System of a down and coheed and cambriaMost people would say that it gives them a headache or it hurts their ears but it is what lulls me to sleep every night. Im not trying to put down rap or anything, b/c i do like certain songs and certain rappers but its not one of those things i dont like the 'genre' ... But any song, rhymes, and you could take any song and put it to the right beat and it would be a rap song...
-
License File Expired When Logging Into Cpanel
Tsunami replied to garbage's topic in Web Hosting Support
yupp i got the same thing.... i was worried it was just me XD im glad that its not just me but im sad that it happened to begin with... hopefully it will be fixed soon -
Trap17 Community Building Project! make your contribution...
Tsunami replied to cragllo's topic in General Discussion
lol after i posted the code i thought about that too... but the reason i thought of pagination was not to stop it from scrolling, but make it so that it doesnt scroll so much... i understand that with the pagination it doesnt seem like a real city block... but maby if we put some arrows instead of numbers it would seem more realistical in the sense that they would be moving to the left or to the right depending on their selection... or maby... like someone said (i cant remember who) filtering it into a flash movie... even though the movie wouldnt be all that big we could make it pause at the beginning so that it will give the first few time to load and while the user is looking at those it will load the others... then giving them the arrows to hover over to scroll more fluidly... i dunno.. i could try out a bunch of ideas and then just show you guys the ones that worked the best... -
Trap17 Community Building Project! make your contribution...
Tsunami replied to cragllo's topic in General Discussion
might i suggest some pagination to prevent a really big webpage? for example... <?php$path="../community";$narray=array();$dir_handle = @opendir($path) or die("Unable to open $path please notify the administrator. Thank you.");echo "Testing Community Project...<br /><br />\n";$i=0;//size of the 'one city block' *buildings in once city block*$block = 5;if($_GET['block']) $offset=($_GET['block']-1) * $block;else $offset=0;while($file = readdir($dir_handle)){ if($file != '.' && $file != '..' && $file !='index.php') { $narray[$i]=$file; $i++; }}echo "<body bgcolor='#f2f2f2'><table><tr>";for($i=$offset; $i< ($offset + $block); $i++){echo "<td valign='baseline'><img src=$narray[$i]></td>";}echo "</tr></table>";//closing the directoryclosedir($dir_handle);echo "<center>";for($j=1; $j <= ceil(sizeof($narray)/$block);$j++) { if($j == ($offset/$block)+1) echo $j; else echo "<a href='http://forums.xisto.com/no_longer_exists/; . $j ."'>" . $j . "</a>"; if($j < ceil(sizeof($narray)/$block)) echo " - "; }echo "</center>";?> What this will do is it allows you to define a set number of buildings for each "Block" and calculates the number of pages needed to display those blocks and create them as neccessary... however this is a very basic example in need of a lil expansion so that you can place a vacancy sign (of sorts) on the places on the last page so that there arent red [x]'s when it finishes with all the images... hope you like it btw i tested it on my site so i know it works