Jump to content

optikalefx

Members
  • Posts

    363
  • Joined

  • Last visited

    Never

Posts posted by optikalefx

  1. Ok so this problem ONLY happens on the iPad.  It won't show ANY image links on my site.  For every sing one it says

     

    XML self-closing tag syntax used on <a> The tag will not be closed.

    And because of this the site looks HORRIBLE.  It looks fine on iPhone, mac, windows, every browser.  Just iPad it F&*ks up on.

     

    Here is the Doctype and stuff, and it DOES validate with w3c.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html dir="ltr" lang="en" xmlns="http://www.w3.org/1999/xhtml">

    <head>

     

     

    So this is a vbulletin site.  So i let the site load, copied the source, and made a webpage with just that, and that worked fine.  So the browsers are fixing some error when they render that I can't find.  Is there any kind of tool, or a way to catch the HMTL content without a browser changing the HTML first?

     

    Thanks!!

  2. this one is tricky.  I am doing a lot DOM manipulation with js and jquery.  After some time i get a lot of these

     

    Great blog
    <span style="font-weight: bold;"> 
    post
    <span style="font-weight: bold;"> 
    	from the Ba
    </span>
    ltimo
    </span>
    team
    

     

    Think anyone can come up with a function that starts at the body, and traverses the entire DOM and cleans this kind of stuff up? Its ok if it takes a while.

     

    the above code should be cleaned to this

    <span style="font-weight:bold">Great Blog Post from the Baltimore team</span>

     

    of course you have to worry about not combing elements if they don't have the same style, and you can't just compare siblings, because sometimes children need to combined up to their parents.

     

    so 2 sub functions to make this happen would be like

     

    combineParentWithChild

     

    and then CombineSiblings

     

    i think.

     

    thanks!

     

     

  3. im making a script for downloading files that have been purchased.

    On the download page...

     

    call a php file passing the transaction id

    download.php?file=2234234982374982734892739842

     

    in download.php

    go though the db, select that transaction

     

    check that the session[userid] matches the id of the userid who made that transaction

     

    if it does, serve the zip file to the user

     

    Using this method, it requires the user to be logged in to be able to click his download link.  So he can't just pass the link around.  Also, he can log in and re download the file as many times as he wants, because he is logged in.

     

    Anyone find any holes in this method?

     

  4. your just not echoing out. 

     

    <?php if ($site = "www.agcooponline.com") { ?>

    <link href="../templates/tsgcalpha/css/harvestauction.css" rel="stylesheet" type="text/css" media="all" />

    <?php } ?>

     

    should be

     

    <?php if ($site = "www.agcooponline.com") { ?>

    echo "<link href='../templates/tsgcalpha/css/harvestauction.css' rel='stylesheet' type='text/css' media='all'>" />

    <?php } ?>

     

     

    But please don't do this, re write it, your code is very very messy.

  5. do you want lastInsertID?

     

    <?php
    $link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
    if (!$link) {
        die('Could not connect: ' . mysql_error());
    }
    mysql_select_db('mydb');
    
    mysql_query("INSERT INTO mytable (product) values ('kossu')");
    printf("Last inserted record has id %d\n", mysql_insert_id());
    ?>
    

     

    or if you need it more advanced, check out mysql triggers

    here is a video i made 

  6. you mean subdomains?

     

    like site1.mysite.com?

     

    I've never seen site1/mysite.com

     

    If that is the case, you need to look into htaccess 301 redirects for certain users to redirect to certain sub domains.  However as the server admin you need to make those subdomains point to the right places in apache.

  7. Any one can offer some help on this?  I even tried curl and it still has the same problem.  The upload is successful but the ftp_put returns false.

     

    when i use curl the upload is successful but curl_errno($ch); returns an error.

     

    I have all the my php.ini settings up high,  i can't figure out what to do.  Is there another way to get large files onto an FTP server on the web?

  8. use this line when u are uploading

    i mean in the form..

    <td><input type="hidden" name="MAX_FILE_SIZE" value="100000000" /></td><tr></tr>

     

    There is no problem with the form processing.  I have that value increased in the php.ini file.  It has something to do with the size of the file in ftp_put

     

    Try using ftp_put with a 90m file and see what it returns.

  9. Anyone had any success using FTP to upload a file say 90m?

     

    im using ftp_put and it returns false.  BUT the file DOES upload just fine.  I even downloaded and tested it, its the full file.  But ftp_put still returns false.  Now with a 20m file it returns true.

     

    I have all my php.ini vars for time and size set up really really high, and same problem.  I still feel like its a timeout problem but it shouldn't be anymore...

     

    i have these set

    default_socket_timeout = 1000

    upload_max_filesize = 1024M

    post_max_size = 1024M

    max_execution_time = 1000

    max_input_time = 1000

    memory_limit = 1024M

     

    The file is 91m and takes about 6 minutes.

     

     

    I'm using ajax to do the ftp, and im using another ajax function to check the size against the ftp size, after it reaches 100% it takes about 1 minute to return false from the ajax call.  Thats why it feels like it's timing out.  I don't know.

     

    Thanks

     

     

  10. Hmm, this is a common task, are you putting the values in an array just for this?  If so, don't do that. Just check in your loop.

     

    If you already have an array, then you can use

     

    Array.prototype.inArray = function (value) {
    var i;
    for (i=0; i < this.length; i++) {
    	if (this[i] === value) {
    		return true;
    	}
    }
    return false;
    };
    

     

    now just do array.inArray("value to find");

×
×
  • 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.