Jump to content

joquius

Members
  • Posts

    319
  • Joined

  • Last visited

Everything posted by joquius

  1. I have a flash player I made a long time ago, with a long standing issue. The player loads an xml file from the server with song names and mp3s file locations. The problem is that in Chrome (and not in FF for instance), the song names just don't appear in the song list. I remember trying to change the font at the time but nothing seemed to help. The xml is loaded because the songs play, and the list is populated, but you just can't see the names (you can click where they are supposed to be). I'm not sure where the problem is, but I thought this is one of those type of things that you spend hours looking for and can be solved in a minute and yet someone out there must have the answer! Thanks in advance for any suggestions
  2. Frankly google will find the answer for you much faster: http://blogs.sitepoint.com/generate-pdfs-php/ http://www.pdflib.com/
  3. I'm trying to understand what "code" you're referring to, because obviously PHP is preprocessed so the client won't see it.
  4. SELECT DISTINCT(`PRODUCT_ID`) FROM `table`; ?
  5. First of all you may need a number of different tables for the different data types, such as two different tables for regions and places. Secondly what experience do you have in PHP? Not exactly sure what your intention is with the PHP code, but not only does it not really check out syntax wise, (you need to use a period instead of comma for concatenate) your html will also appear with a </select> tag after every option, meaning no drop down will appear. Basically, please outline what experience you have, what you are trying to do, and the specific code which is not working. If you are trying to create a very complex application with very limited experience you may want to try something more simple to start off.
  6. Just wanted to see if anyone has an opinion regarding the use of UILoader in site intros. I have some simple 3-4 image slideshow that runs when you open each page of certain site. In the beginning I used UILoader to load the images in the slide so that the files wouldn't load together and stall the page, but I found that if I didn't reckon the load time of each image correctly some users might miss some of the images appearing or find the duration of the slideshow (which is only about 3-4s) too long. At the moment I've gone back to simply putting all the images into the SWF file.
  7. Don't use Flash to check the progress. I recently made some file upload application similar to flickr's but avoided using Flash. I used Javascript to get the progress via uploadprogress_get_info(). Here's something with an explanation: http://www.clipclip.org/yaoweizhen/clips/email/20556/pecl-uploadprogress-example-%C2%BB-harper-reed-tech-phones-yo-yoing-and-death-metal By the way, are you setting up _root manually? This is AS3 right?
  8. I think the main virtue of PHP5 is that you can integrate the best of both worlds. I think it's better to have a parser object than a "text_functions.php" file. I also think it's pointless to start creating classes for every data type, and try to avoid languages like Ruby that take this to the extreme. But that's just my opinion; that's how I like to work.
  9. I like whitespace so I try to use the first with extra whitespace inside the parenthesis. Though sometimes I prefer python style in this situation: if ( $dave->isNotHere ( ) ) return false; else return true;
  10. I know it's not really a question of code, but if you're a web developer browser choice can be a big thing. Personally I moved to Chrome the day it was released because I'm just about sick of Firefox 3 crashing all my open work. Obviously there are some things that don't really work yet like Java, but you can still use a different browser for that stuff. So what does everyone else think? P.S: I understand that this question is only for Windows users, but just pretend you can run Chrome, and emulate your thoughts in that situation .
  11. Why do you need to setup php for each virtual host? As long as you setup a handler for .php files in httpd.conf it will work for all your virtual hosts. All you need to do is setup a document root for each virtual host: <VirtualHost ServerIP:Port> ServerName domainname.com ServerAlias www.domainname.com DocumentRoot /path/to/docroot </VirtualHost>
  12. Uhh preg_match_all ('/(:?.+?(?:=\".+?\")?)(?:\/|$)/s', $str, $matches); $str = 'about/:title="/"'; array(2) { [0]=> array(2) { [0]=> string(6) "about/" [1]=> string(10) ":title="/"" } [1]=> array(2) { [0]=> string(5) "about" [1]=> string(10) ":title="/"" } }
  13. Uhh what does this mean: I need to split the string by '/', unless '/' is found inside the ="" section. and what do you want to get out of this: [1] = :id="/^\d/"; the string inside the double quotes? This kind of thing can be done really easily with preg_match I just need to know what you want to do.
  14. You can use the same table and do a join to the same table. lets say `id`, `parent`, `name` SELECT t1.name as guest_name,t2.name as parent_name FROM table as t1 LEFT JOIN table as t2 ON t1.parent = t2.id WHERE t1.id = 'guests_id' sorry I can't follow up I'm off good luck...
  15. how about just parsing php as php-source in one "source" directory?
  16. Either you keep track of guests in a by giving your table a `guest_of` or `parent` field (whichever is more semantically pleasing for you), or if you only want the guests to exist for each person just add a guests field with comma separated names of the guests (guest1,guest2,guest3).
  17. I've got a feeling you might want to install some merchant tools software..
  18. You need to store the data in a database such as MySQL. Try reading some tutorials on MySQL usage with PHP.
  19. I'm writing a very very simple URL handler and MediaWiki wrapper in PHP. Although most my code runs on MediaWiki, I would rather the wrapper be independent of MediaWiki and it's DB table. The question is whether I should bother messing with a flat DB to store the URL data (which is basically class names and arguments) or just use MySQL. Example: URLObjectArgs /search/$1Searchlang=en I don't want to store the data in a static settings file because that's what I'm doing at the moment.
  20. This is a repost man. Stop using [/url]. if (isset ($_GET['id']) && is_numeric ($_GET['id'])) { $id = mysql_real_escape_string ($_GET['id']); // paranoia $sql = "SELECT * FROM album WHERE id=".mysql_real_escape_string ($id); } Dunno if this is what you need.
  21. $_POST['student'] should equal "on" if it's selected. You could do the following: $fields = array ("student", "family", "work"); $add_to_db = array (); foreach ($fields as $field) { if (isset ($_POST[$field]) && $_POST[$field] == "on") { $add_to_db[] = $field; } } $fields_to_add_to_db = implode (",", $add_to_db); or something like that...not very elegant
  22. I usually put in '0' for auto-incremental fields, some versions of MySQL don't like ''.
  23. I'm saving my aspirin for a rainy day, so for the moment, for the sake of clarity, give your variables better names. For instance: <?php $getthreads = "Select * from forumtutorial_posts where parentid='0' and forum = '$forum' ORDER BY important DESC, lastrepliedto DESC $max"; $getthreads2 = mysql_query($getthreads) or die("Could not get threads"); while ($getthreads3 = mysql_fetch_array($getthreads2)) ?> becomes <?php $sql = "SELECT * FROM forumtutorial_posts WHERE `parentid` = '0' AND `forum` = '$forum' ORDER BY `important` DESC, `lastrepliedto` DESC LIMIT $max"; $res = mysql_query( $sql ) or die( "Could not get threads" ); while ( $data = mysql_fetch_array( $res ) ) ?>
  24. First of all you might want to change that [/url] to </a>...^^ Apart from that, be more specific about want you want. What is your goal?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.