Jump to content

bcoffin

Members
  • Posts

    130
  • Joined

  • Last visited

Everything posted by bcoffin

  1. Here's an example. I published THIS to a form: A Chinese character, also known as a Han character (汉字 / 漢字; Hànzì), is a logogram used in writing Chinese (hanzi), Japanese (kanji), less frequently Korean (hanja), and formerly Vietnamese (hán tự), and other languages. and this is what i'm seeing in MySQL: A Chinese character, also known as a Han character (汉字 / 漢字; Hànzì), is a logogram used in writing Chinese (hanzi), Japanese (kanji), less frequ... and that's exactly how it's reading when returned from the database. Any help, appreciated.
  2. I have a facebook application that i'd like to extend to unicode. Does anybody have any suggestions on best practices for the form/recording/recalling to give all those other characters a fighting chance? Thanks.
  3. I'd love to do a dissolve IN and dissolve OUT slideshow. It would be TEXT only and (ideally pull from XML, but not entirely necessary). I could set the style of the text (globally is fine), including placement, color, font, size, margins, etc... the same as any other div, actually, either by placing the properties in the XML beside each item, or in the div where the slideshow is to be embedded. I know you can do some pretty cool stuff with scriptaculous, mooflow, jquery, etc. Anybody have a recommendation of where i can find a tool to do this? Thanks
  4. Why not use Flash? I can't access that link you provided. Yes, _root is the root.
  5. I'm using the file.upload feature of AS3 to show upload progress and it seems i'm creating a server side process that just grows and grows in memory demand. Uploading a 110MB file draws close to 720MB of memory at the time that i canceled the upload. Any suggestions? I've removed LOADS of peripheral functionality from this to simplify. But this is the meat+potatoes of the actionscript that's doing the upload (and spiking server memory): _root.onEnterFrame = function() { if (this.getBytesLoaded()/this.getBytesTotal()>0.99) { _root.onEnterFrame = function() { //trace ("onEnterFrame called"); }; } }; var m:MovieClip = this; var a:Boolean = false; import flash.net.FileReference; var selected_file = undefined; var filetype = undefined; //used later in case typing fails* var file_monitor = new Object(); setSelected = function (file) { selected_file = file; file_name.text = file.name; }; file_monitor.onSelect = function(file) { >>> buncha tests here removed } else if (file.name) { setSelected(file); } else { alert("Please select a file to upload."); } }; file_monitor.onOpen = function(file) { progress_bar.setStatus("Uploading..."); time_started = getTimer(); }; file_monitor.onProgress = function(file, bytesLoaded, bytesTotal) { progress_bar.setProgress(bytesLoaded,bytesTotal,getTimer()-time_started); }; var file = new flash.net.FileReference(); file.addListener(file_monitor); upload_btn.onRelease = function() { upload_file("upload.php?custom_flags=values"); }; upload_file = function (dst) { file.upload(dst); }; thanks for any suggestions/theories
  6. bcoffin

    WHICH?

    I could also buy and read every book to compare frameworks.
  7. bcoffin

    WHICH?

    woo that extjs looks like a huge timesaver. which is your preferred php framework? thanks.
  8. bcoffin

    WHICH?

    That's like saying "no sense learning HTML if you have dreamweaver".. Not sure i can get behind that argument, Mchl. I'm not saying i'm disputing it, but please provide a bit more compelling and supported response if you're going to register an opinion.
  9. My client would like to be able to sell products to the USA and to FRANCE. :$ I've got the following, which seems to function just fine for domestic orders (i'm in the US): <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.carrier-calculated-shipping-1.carrier-calculated-shipping-options.carrier-calculated-shipping-option-1.price" value="7.00" /> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.carrier-calculated-shipping-1.carrier-calculated-shipping-options.carrier-calculated-shipping-option-1.price.currency" value="USD"/> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.carrier-calculated-shipping-1.carrier-calculated-shipping-options.carrier-calculated-shipping-option-1.shipping-company" value="FedEx"/> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.carrier-calculated-shipping-1.carrier-calculated-shipping-options.carrier-calculated-shipping-option-1.carrier-pickup" value="REGULAR_PICKUP"/> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.carrier-calculated-shipping-1.carrier-calculated-shipping-options.carrier-calculated-shipping-option-1.shipping-type" value="Ground"/> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.carrier-calculated-shipping-1.shipping-packages.shipping-package-1.ship-from.id" value="_MY_STORE_NAME"/> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.carrier-calculated-shipping-1.shipping-packages.shipping-package-1.ship-from.city" value="New York"/> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.carrier-calculated-shipping-1.shipping-packages.shipping-package-1.ship-from.region" value="NY"/> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.carrier-calculated-shipping-1.shipping-packages.shipping-package-1.ship-from.country-code" value="US"/> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.carrier-calculated-shipping-1.shipping-packages.shipping-package-1.ship-from.postal-code" value="10001"/> I also have the following to handle taxing: <input type="hidden" name="tax_rate" value="0.0875"/> <input type="hidden" name="tax_us_state" value="NY"/> <input type="hidden" name="_charset_"/> I *think* i only need to add this for france's shipping option: <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-2.name" value="USPS"> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-2.price" value="12.50"> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-2.price.currency" value="USD"> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-2.shipping-restrictions.allowed-areas.postal-area-1.country-code" value="FR"> I think this is all i need for the taxing in france: <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.rate" value="[[TAX_RATE]]"/> <input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.tax-tables.default-tax-table.tax-rules.default-tax-rule-1.tax-area.postal-area.country-code" value="FR"/> ... yea i have to figure out what to charge for France goods duties. ?? But could anybody with immediate experience doing this sort of thing confirm that this is all i need? Or if there are other directives necessary to give GCO instruction how to handle orders shipped or originating in France (and other foreign countries) ? Thank you. Here is an article I've been following: http://checkout.google.com/support/sell/bin/answer.py?hl=en&answer=71391 B
  10. bcoffin

    WHICH?

    Hi All, I'm a self-taught PHP coder. I never really saw the purpose of a framework since writing OO PHP makes sense without one. Can somebody please provide the simplest argument in support of frameworks as well as which individual framework they believe has the highest potential for longevity and popularity? Thanks
  11. Well this is pretty simple and exactly what i need. I'm curious whether i can put image links in there or form elements and have it remain open. Thanks for the help, Nightslyr.. i'm going to mark this one solved. I appreciate your contribution, bigtime.
  12. a long while agao, ive tried putting a: #quicklinks { visibility:hidden; } #quicklinks:hover { visibility: visible; } to no avail I'm wondering how this is commonly done.
  13. I have a div that appears when a link is clicked: (<a href='javascript:void(0);' onclick='javascript:document.getElementById("quicklinks").style.display="block"; return false;'>Quicklinks</a>) the div is basically a box of links with different hover states. <div> <img /> <a></a> <a><img /></a> <a></a> </div> it looks nice as you roll over them because the links or images change color and src. i'd like to hide this div when the visitor completely rolls out of the div. i've tried to put a "this.style.display='none';' on rollout, but rolling over links or images acts as a rollout. any suggestions on how this can be accomplished easily?
  14. This script fails too in the file uploader: function cleanFileName($str) { $cleaner = array(); $cleaner[] = array('expression'=>"/[àáäãâª]/",'replace'=>"a"); $cleaner[] = array('expression'=>"/[èéêë]/",'replace'=>"e"); $cleaner[] = array('expression'=>"/[ìíîï]/",'replace'=>"i"); $cleaner[] = array('expression'=>"/[òóõôö]/",'replace'=>"o"); $cleaner[] = array('expression'=>"/[ùúûü]/",'replace'=>"u"); $cleaner[] = array('expression'=>"/[ñ]/",'replace'=>"n"); $cleaner[] = array('expression'=>"/[ç]/",'replace'=>"c"); $str = strtolower($str); $ext_point = strpos($str,"."); if ($ext_point===false) return false; $ext = substr($str,$ext_point,strlen($str)); $str = substr($str,0,$ext_point); foreach($cleaner as $cv) { $str = preg_replace($cv["expression"],$cv["replace"],$str); } return preg_replace("/[^a-z0-9-]/","_",$str).$ext; }
  15. Hmmmf.. no. It might be something i'm mucking up somewhere else, but the file uploader i'm using gives me the following SUPPLIED NAME (original file name) and NAME (after cleaning): [name] => Grossstadtgeflster - Ich muss gar nix.mp3 [type] => application/octet-stream [tmp_name] => /tmp/phpa7yhqo [error] => 0 => 5705353 [supplied_name] => Grossstadtgeflüster - Ich muss gar nix.mp3
  16. I'm using the following function to clean accented characters to their non-accented equivilents. I'm finding, however, that the replacement is failing and the accented characters are just being nixed in the preg_replace (catchall) at the end of the script. Any ideas? function cleanFileName($str) { $accent_array = array( 'e' => array('é','è','ê','ë'), 'E' => array('É','È','Ê','Ë'), 'a' => array('á','à','â','ä','å','ª'), 'A' => array('Á','À','Â','Ä','Å'), 'i' => array('ì','í','î','ï'), 'o' => array('ò','ó','õ','ô','ö'), 'u' => array('ù','ú','û','ü'), 'n' => array('ñ'), 'c' => array('ç'), 'ae' => array('æ'), 'oe' => array('œ'), 'y' => array('ÿ') ); foreach($accent_array as $acc_key => $acc_val_array) { $reg_exp_accent = ''; for($m=0;$m<count($acc_val_array);$m++) { $reg_exp_accent .= $acc_val_array[$m].'|'; } $reg_exp_accent = substr_replace($reg_exp_accent,"",-1); $str = ereg_replace($reg_exp_accent,$acc_key,$str); } return str_replace(" ","_",preg_replace("/[^A-Za-z0-9.\-\ ]/",'',$str)); }
  17. I guess doing something like this is the easiest: ... AND assets.id IN (2,4,5,6,7, AND assets.id IN (1,3,5,6,7, ... where each row is a delimited array of assets.id(s) found for each unique option. this can be very easily scalable. nm
  18. Table: Assets {id, asset_name} Table: Attributes {id, option} Table: Assets_Attributes {asset_id, option_id} Assets_Attributes might look like 1, 1 1, 2 2, 1 3, 1 4, 1 4, 2 4, 3 I get how to select asset_name where an option is found (ex: option_id 2 would yield asset_name for asset_id 1,4) But how about if i want the ability to provide multiple option_id(s)? (ex: option_id 1 would yield asset_name for asset_id 1,2,3,4) (ex: option_id 1,2 would yield asset_name for asset_id 1,4) (ex: option_id 1,2,3 would yield asset_name for asset_id 4) Thanks
  19. I'm sorry folks.. I was probably doing something silly, but this EXACT script works just fine.
  20. I have an authentication system in place for my site. I need to have it automatically log users into a phpbb installation (release 3). Found this code: <?php define('IN_PHPBB', true); $phpbb_root_path = './'; //Path to forum $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup('ucp'); if($user->data['is_registered']) { echo "Welcome " . $user->data['username']; //User is already logged in } else if(isset($_POST['login'])) { $username = request_var('username', '', true); $password = request_var('password', '', true); $autologin = (!empty($_POST['autologin'])) ? true : false; $result = $auth->login($username, $password, $autologin); if ($result['status'] == LOGIN_SUCCESS) { //User was successfully logged into phpBB $redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx"); // append/replace SID $redirect = reapply_sid($redirect); meta_refresh(1, $redirect); trigger_error('LOGIN_REDIRECT'); } else { echo 'Bad Login'; //User's login failed } } else { echo '<form action="index.php" method="post"> <label for="username">Username:</label><input type="text" name="username" /><br /> <label for="password">Password:</label><input type="password" name="password" /><br /> <input type="hidden" name="redirect" value="index.php" /> <label for="autologin">Automatic login:</label><input type="checkbox" name="autologin" id="autologin" class="checkbox" /> <input type="submit" value="login" name="login" /> </form>'; } ?> At this link: http://www.phpbb.com/community/viewtopic.php?f=71&t=983935 And when I test it, the PHPBB auth system return SUCCESS, then redirects to a forum page. That forum page shows the user as not-logged-in. Any help appreciated.
  21. heard good things about www.hostrocket.com
  22. both running windows vista home premium. but i don't own the accesspoint .. usually whatever insecure network is available that day.
  23. I'd like to connect two laptops together (either via crossover or ad-hoc network). Then have one of those laptops connect to an available accesspoint via wireless net connection, and share the connection between the two. Is this possible? Also, put Apache on one and have both browse that webserver.
×
×
  • 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.