-
Posts
1,731 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Events
Everything posted by Spudinski
-
Re: Sql error help with fixing please? * Topic Moved * Please post in the correct place next time.
-
Re: mysql neeeeeeeeeed help plz pro's * Topic Moved * Please post in the correct place next time. Use "localhost" in that field, you seem so oblivious to the simple solution.
-
Re: Need Item SQL * Topic Moved * Please post in the correct place next time.
-
Re: Help! * Topic Moved * Please post in the correct section next time.
-
A modification I have been eager to release, taken me well over a few weeks to complete and fixing bugs. This modification has some very useful features, but not only that, it makes use of the newest methods that modern galleries have. This is now FREE! I didn't want to show screen shots of the modification, simply because it would not show exactly how things work. I also didn't want to make a demo somewhere, because of the risk that the concept or source might be fragmented, features are programmed with javascript as well. So I have decided on a video approach, you can watch the video that shows this script in action. Video can be watched here: http://www.spudinski.com/modifications/gallery.html, or downloaded here: http://media.spudinski.com/gallery_mod.avi (16MB). Front-end feature list: User menu View user's gallery View and Search for others galleries Browse and search all images Modify images Deletion of images Sharing links for images Multiple uploads Statistics viewing for moderators Additional browser support Alternative upload method Configuration viewer with detailed descriptions Configuration editor Style sheet editor The feature list of the back-end will be given out on request only, so PM me if you want it. The price for this is actually *very* low priced, but taking in consideration everyone I couldn't make the price what it actually should be worth. New version 2.0 released! The price is $20(twenty US dollars) for this current, that includes the following files: gallery.php gallery.html(installation file) galleries.sql galleries, original and thumbnails folders no_thumb.png configuration.php style.css complete arrow set for pagination It alos comes with full support, if anything gives you a problem you can contact me an I will respond with a suitible sollution a.s.a.p. To purchase this, please PM me or alternatively email me at spudinski[at]gmail.com. Copies will be granted on each purchase, until I feel a need to suspend purchases.
-
Re: Another Question... The debug_backtrace function is very useful to point out exactly where the error occurred. I myself also have a little "gizmo" to point out the error, it might now be perfect, but it does the job. I think I still found the base of this on php.net, one of the many comments. <?php // the following line is required to declare another error handler set_exception_handler('handle_error'); function handle_error($errno, $errstr, $errfile, $errline) { $errno = $errno & error_reporting(); if($errno == 0) return; if(!defined('E_STRICT')) define('E_STRICT', 2048); if(!defined('E_RECOVERABLE_ERROR')) define('E_RECOVERABLE_ERROR', 4096); $error_string = '[b]'; switch($errno){ case E_ERROR: $error_string .= 'Error'; break; case E_WARNING: $error_string .= 'Warning'; break; case E_PARSE: $error_string .= 'Parse Error'; break; case E_NOTICE: $error_string .= 'Notice'; break; case E_CORE_ERROR: $error_string .= 'Core Error'; break; case E_CORE_WARNING: $error_string .= 'Core Warning'; break; case E_COMPILE_ERROR: $error_string .= 'Compile Error'; break; case E_COMPILE_WARNING: $error_string .= 'Compile Warning'; break; case E_USER_ERROR: $error_string .= 'User Error'; break; case E_USER_WARNING: $error_string .= 'User Warning'; break; case E_USER_NOTICE: $error_string .= 'User Notice'; break; case E_STRICT: $error_string .= 'Strict Notice'; break; case E_RECOVERABLE_ERROR: $error_string .= 'Recoverable Error'; break; default: $error_string .= 'Unknown error (' . $errno . ')'; break; } $error_string .= ':[/b] [i]' . $errstr . '[/i] in [b]' . $errfile . '[/b] on line [b]' . $errline . '[/b]'; if(function_exists('debug_backtrace')){ $backtrace = debug_backtrace(); array_shift($backtrace); foreach($backtrace as $i=>$l){ $error_add .= ' [' . $i . '] in function [b]' . $l['class'] . $l['type'] . $l['function'] . '[/b]'; if($l['file']) $error_add .= ' in [b]' . $l['file'] . '[/b]'; if($l['line']) $error_add .= ' on line [b]' . $l['line'] . '[/b]'; } } else { $error_add .= 'None'; } if(isset($GLOBALS['error_fatal']) && $GLOBALS['error_fatal'] & $errno) exit('fatal'); echo '<div class="error" id="error"> [b]An Error Has Occured[/b] ' . nl2br($error_string). ' Additional Information about this error: Trace: '.nl2br($error_add).' </div>'; return false; } ?> Just giving another way to do this...
-
Re: v3 game engine Luckily not by everyone. Some websites would require tremendous effort to be "hacked", I can name quite a few of that websites.
-
Re: McCode Help * Topic Moved * So let me ask you this, mccode/dbscode > DBS Support wasn't more suitable? Anyways, please post in the correct section next time.
-
Re: Counting (nr game) 1896
-
Re: One Big Code! echo 'Spudinski agrees...'; exit; // this ends the script ?>
-
Re: Coding Tutorials Now why would a webdev site have C++ tutorials... :-P The best source of learning is books, run down to your local book store and get a PHP & MySQL 101.
-
Re: Counting (nr game) 1890
-
Re: 3 Word Game and he looked
-
Re: [FAQ] How to populate HTML elements with PHP Tested with: <?php $array = array(); $init_time = array(); $endtime = array(); for($i=1;$i<=50000;$i++) $array[] = array('id' => $i, 'name' => 'name' . $i); $init_time[0] = microtime(); echo '<select name="flowers" onchange="document.forms[0].post()">'; $query = $array; echo '<option disabled="disabled">' . mysql_num_rows($sql_txt) . ' Flowers</option>'; foreach($array as $flower) { echo '<option value="' . $flower['id'] . '">' . $flower['name'] . '</option>'; } echo '</select>'; $endtime[0] = microtime(); //vs. $init_time[1] = microtime(); ?> <select name="flowers" onchange="document.forms[0].post()"> <?php $query = $array; echo '<option disabled="disabled">' . mysql_num_rows($sql_txt) . ' Flowers</option>'; foreach($array as $flower) { echo '<option value="' . $flower['id'] . '">' . $flower['name'] . '</option>'; } ?> </select> <?php $endtime[1] = microtime(); $init_time[3] = explode(' ', $init_time[0]); $init_time[3] = $init_time[3][0]; $endtime[3] = explode(' ', $endtime[0]); $endtime[3] = $endtime[3][0]; $endtime[3] = $endtime[3] - $init_time[3]; $init_time[4] = explode(' ', $init_time[0]); $init_time[4] = $init_time[4][0]; $endtime[4] = explode(' ', $endtime[0]); $endtime[4] = $endtime[4][0]; $endtime[4] = $endtime[4] - $init_time[4]; echo 'Spudinski\'s method: ' . $endtime[3] . ' seconds' . "\n" . 'threeZ\'s method: ' . $endtime[4] . 'seconds.'; ?> There is "no" difference in performance from what I can see. Spudinski's method: 0.397759 seconds. threeZ's method: 0.397759 seconds. Now this is anotehr thing we can lay to rest.
-
Re: [FAQ] Email Validation in PHP We are also just expressing our opinions, this is a freedom of speech community. A partial solution is to connect to the mail server and request confirmation, still not completely everything, but a script also can't be 100% secure. If you have active 15,000 accounts, you would most likely already have your own server to run things. I'm quite sure that that would result in more of a "load" than just checking the MX record at the beginning. Not everyone account will do that, and also, inactive accounts.
-
Re: [FAQ] Email Validation in PHP If you were talking about the "small user"'s, then there should be no "load" on the server. I've seen PHP-Games that has very big account databases, it isn't impossible, so what if you are sending something as simple as a newsletter. Take Nyna's example, you would validate first, and if validation succeeds, then you would send a mail. This is because a large percentage of the "php-game"'s accounts have invalid email addresses. But as you said threeZ, email accounts are assumed to be checked in the sign-up process, and then marked valid, but by the time a "php-game" reaches "15,000" accounts, some email addresses might have changed. Edit: reading mdshare's post now.
-
Re: [FAQ] How to populate HTML elements with PHP Actually, that style of programming is not correct under PEAR coding standards. You should only use opening - and closing - php tags for large blocks of HTML markup, for single lines echo(or print) is effective enough. My way gives the script a "clean" and simple look.
-
Re: Users Online Now just to go into a bit more depth of what happened here(a common mistake), and to help others experiencing this problem... What happened there is a simple programming error, something was in the while loop that wasn't meant to, thus the output was not what we intended for the script. The column headings(th elements), were included within the loop, and was repeated each time the loop executed, but we only want the table cells to be repeated with different(dynamic) values each time. Here is a quicker example of what happened here: <?php echo '<table>'; while(condition) { echo '<tr> <th>Heading 1</th> <th>Heading 2</th> </tr> <tr> <td>Cell 1</td> <td>Cell 2</td> </tr>'; } echo '</table>'; ?> To correct this, you need to remove the table headings(th elements) from the loop. This will stop from the table headings being repeated again. <?php echo '<table> <tr> <th>Heading 1</th> <th>Heading 2</th> </tr>'; while(condition) { echo '<tr> <td>Cell 1</td> <td>Cell 2</td> </tr>'; } echo '</table>'; ?>
-
Re: v3 game engine With any new release of just about anything, some parts will be fixed, and it will be better than the last release. It might just be another change of the template, or it might be everything, who knows?
-
Re: Major Problems - Please Help! Try this as a sample: <?php $interval = (5 * 60); // run every 5 minutes if (!file_exists('cron_test.txt')) { $fp = fopen('cron_test.txt', 'w'); if (flock($fp, LOCK_EX)) { fwrite($fp, time()); flock($fp, LOCK_UN); } else { exit; } } else { $time = time(); // cache it $data = file_get_contents('cron_test.txt'); $sum = ($time - $data); if ($data == 'SUCCESS' || $data == 'FAIL') { exit; } elseif ($sum >= $interval) { $status = 'FAIL'; } else { $status = 'SUCCESS'; } $fp = fopen('cron_test.txt', 'w'); if (flock($fp, LOCK_EX)) { fwrite($fp, $status); flock($fp, LOCK_UN); } else { exit; } } ?> Createa file called "cron_test.txt" in the same directory as this file, and set its permissions to 777. Also setup a cron to execute this file every five minutes, and then after about a hour, check the contents of the file. If it is empty, contact your host and tell then that the crontabs are not working, if it says "FAIL" or gives a few numbers, the system time might be incorrect, or the crontabs are faulty. But if it says "SUCCESS", everything seems to be working.
-
Re: Counting (nr game) 1885
-
Re: MCcodes Needs Protection how can people have "legal" copies as such when there is no copyright protection... It makes people feel better about them selfs, I wouldn't feel good if I'm using something that is stolen, would you? It also helps you get better(special) support, with most services/items it is this way, but MCcode doesn't have "premium support".