Jump to content

Mahngiel

Newly Registered
  • Posts

    1,068
  • Joined

  • Last visited

Posts posted by Mahngiel

  1. What's the relationship between Java and JavaScript?

    Ooh, ooh! I know this one!

     

    They both start with the letter J!

     

    And come in a styrofoam cup with a cardboard hand warmer!

  2. Really? Perhaps that's when the buzzword "AJAX" came about, but MS first introduced the concept back in 1999. The "XMLHttpRequest" object as we know it today came from Mozilla a year later.

     

    Oh snap! Einstein's got skills!

     

    @OP. If you're going to try pulling off knowing all the development languages you claimed, i think it's most important to convey you know javascript isn't really named 'javascript'. that'll impress the boss!

  3. I like to use firebug with FF (chrome has other tools, like firebug lite) to do my styling in order to make sure everything is the way i want it to look.

     

    Adding a hidden overflow, and justifying the text, the maximum font size in px that fits your given width for that font is 81px. http://i.imm.io/z0nA.png

     

    To note on using EMs.  your constant constraints makes it almost pointless from what I understand on their usage.  Since your pages will be tightly controlled, scaling is going to be out of context here, as a regular page zoom will suffice.  Where EMs shine is when you have a fluid page where dimensions of the screen viewer come into play with the ratio of the body and text.

  4. still, 160px is far too damned large man. your body is limited to 800px of width.

     

    I just floated your header to escape the body constraints... it's 1575 pixels lol. that's nearly twice your body constraint!

  5. or add it to the redirect back to the login page

    that i don't understand

     

    use the session, it'll serve you best. plus, you can maintain the 'previous' entry to follow the user around (useful for analytics).

     

    based on your new post:

    consider path to file: /home/wwwdata/pages/groups.php

     

    user goes to:

    site.com/groups?id=3

     

    they aren't logged in, so redirect

    <?php
    if( !logged_in() ) {
       $_SESSION['previous'] = 'groups.php?' . $_GET;
       header('Location', 'login.php');
    }
    

     

    then they log in:

    header('Location', $_SESSION['previous'];

     

     

    Not tested, not escaped, not sanitized. learning purposes only

  6. $var = ($row['TC'] / (int)$row['DS']);

     

    $var is deprecating. 

    In order to maintain backward compatibility with PHP 4, PHP 5 will still accept the use of the keyword var in property declarations instead of (or in addition to) public, protected, or private. However, var is no longer required.

     

    If you declare a property using var instead of one of public, protected, or private, then PHP 5 will treat the property as if it had been declared as public.

  7. Could you write any code to help me out

    No. That's not what these forums are for. 

     

    I'm certain once a mod moves this to the proper home somebody will help you with that though.

  8. You're having a problem with scope.  Yes, you'll need to use AJAX.  There are tons of tutorials on this throughout the web.  When you get stuck, let us know. 

     

    Essentially,  You're going to need to send your edits through ajax to a script that will modify the user's information.  The "save" button on the popup is merely to initiate the ajax request with the updated fields.  You need to set up a response in the receiving script to tell the pop-up JS the edits were successful.  Upon this response, the window can close.  However, i do not believe that you'll be able to fire a new request from another pop-up window.  However, using modal boxes you will not lose scope.

  9. do you have root server access to change the time? is it a windows or linux based server? More importantly,  is changing the system time going to do what you want? No.

     

    User time is never reflected on the server.  If you post a newsblog at 5pm local time, and the server is in Romania, using PHP's date and time functions will store the server's time.  When you recall that time, all users will see the server's time.  To get around this, many developers  take a few steps:

     

    [*] Setting a "standard" time offset for the application.  If you live in the east coast and your readers are typically from the same area, this would be EST (-5) / EDT (-4)

    [*] Users set up their own preference to time zone which creates another offset

    [*] When saved to the database, the newsblog's time is created to GMT (+0)

    [*] When recalling the timestamp from the database, if there is a logged in user with offset preference, the math is applied accordingly

    [*] Else, the application's standard time is used (-5 in this instance)

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