1. Post #1721
    Gold Member
    jaybuz's Avatar
    May 2006
    5,516 Posts
    Why use jQuery when you're only working with Chrome? Either use plain JavaScript or Zepto.js which is a jQuery clone for modern browsers only.
    Reply With Quote Edit / Delete United Kingdom Show Events

  2. Post #1722
    provides mlp plot free of charge
    Oicani Gonzales's Avatar
    February 2011
    18,076 Posts
    Can anyone link me to the stuff I'll need to learn?

    Also, I saw this, and thought I could work from its source: https://github.com/cramforce/streamie

    Should I?
    Reply With Quote Edit / Delete Windows 7 Brazil Show Events

  3. Post #1723
    Gold Member
    Dennab
    January 2012
    1,137 Posts
    Can anyone link me to the stuff I'll need to learn?

    Also, I saw this, and thought I could work from its source: https://github.com/cramforce/streamie

    Should I?
    That would require you to have a node.js server handy
    Reply With Quote Edit / Delete Mac United States Show Events

  4. Post #1724
    boxxyy's Avatar
    February 2012
    38 Posts
    fixed
    Reply With Quote Edit / Delete Windows XP United States Show Events

  5. Post #1725
    provides mlp plot free of charge
    Oicani Gonzales's Avatar
    February 2011
    18,076 Posts
    That would require you to have a node.js server handy
    And what's that?
    Reply With Quote Edit / Delete Windows 7 Brazil Show Events

  6. Post #1726
    Gold Member
    Dennab
    January 2012
    1,137 Posts
    Node.js is basically a server side implementation of JS
    Reply With Quote Edit / Delete Mac United States Show Events Useful Useful x 1 (list)

  7. Post #1727
    provides mlp plot free of charge
    Oicani Gonzales's Avatar
    February 2011
    18,076 Posts
    the more i look into making this thing makes it seem the more impossible, more and more stuff appear
    Reply With Quote Edit / Delete Windows 7 Brazil Show Events Friendly Friendly x 2 (list)

  8. Post #1728
    Gold Member
    jaybuz's Avatar
    May 2006
    5,516 Posts
    I'm planning on making a Twitter client for Chrome, but I don't know HTML, CSS or Javascript, which makes it a big challenge.
    Since Chrome's extensions are HTML pages, basically, I'm looking into making a basic HTML twitter reader / poster and styling it with CSS to make it look like my mockup.
    Does anyone have experience with this stuff? How should I approach this?
    Twitter JSON feed: https://twitter.com/status/user_time....json?count=10

    You'll need to learn JavaScript. Grab that URL with an Ajax request and then parse it with JSON.parse(), then it's as simple as data[1].user.name + ': ' + data[1].text to display a tweet.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1 (list)

  9. Post #1729
    Gold Member
    Dennab
    January 2012
    1,137 Posts
    Twitter JSON feed: https://twitter.com/status/user_time....json?count=10

    You'll need to learn JavaScript. Grab that URL with an Ajax request and then parse it with JSON.parse(), then it's as simple as data[1].user.name + ': ' + data[1].text to display a tweet.
    He'll need more than that, if he's making a full blown client he'll need to connect to twitter with oAuth and get more data than just a user timeline (DMs, @ Replies ETC)
    Reply With Quote Edit / Delete Mac United States Show Events

  10. Post #1730
    Gold Member
    toaster468's Avatar
    January 2010
    3,260 Posts
    Twitter JSON feed: https://twitter.com/status/user_time....json?count=10

    You'll need to learn JavaScript. Grab that URL with an Ajax request and then parse it with JSON.parse(), then it's as simple as data[1].user.name + ': ' + data[1].text to display a tweet.
    I didn't parse the JSON in other projects I've done. Most browser already put it in readable form for JS.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  11. Post #1731
    provides mlp plot free of charge
    Oicani Gonzales's Avatar
    February 2011
    18,076 Posts
    so basically i should just give up
    Reply With Quote Edit / Delete Windows 7 Brazil Show Events Disagree Disagree x 4Agree Agree x 1 (list)

  12. Post #1732
    jung3o's Avatar
    October 2011
    2,166 Posts
    so basically i should just give up
    how fast were you planning to make it anyway without any knowledge?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1 (list)

  13. Post #1733
    provides mlp plot free of charge
    Oicani Gonzales's Avatar
    February 2011
    18,076 Posts
    well i was planning on learning the fundamentals for starters
    even that seems to be too hard
    Reply With Quote Edit / Delete Windows 7 Brazil Show Events

  14. Post #1734
    Gold Member
    TheDecryptor's Avatar
    September 2006
    4,266 Posts
    It's not too hard, but it's also not really easy

    Try making a simple timeline viewer first, then move onto a full blown client. You'd only really need a small amount of JS for that (Pull down the data via XMLHTTPRequest and parse it via JSON or such.)
    Reply With Quote Edit / Delete Windows 7 Australia Show Events

  15. Post #1735
    WiP about GW2
    eternalflamez's Avatar
    November 2011
    4,789 Posts
    well i was planning on learning the fundamentals for starters
    even that seems to be too hard
    If you get stuck at anything while learning, please feel free to come here and ask us.
    Reply With Quote Edit / Delete Windows XP Netherlands Show Events Friendly Friendly x 1 (list)

  16. Post #1736
    Gibo990's Avatar
    January 2008
    281 Posts
    How would I go about populating a drop-down list using values from a database as well as values that I enter myself? This is the edit Delivery Address page where the fields are already filled in using the values from the database based on the customer who is logged in.

    Code:
    <select name="thirdCountryDropdown"> <!-- drop down box to ask for customers country -->
    <option value="<?= isset($_SESSION['country']) ? $_SESSION['country'] : ''  ?>"></option>
    </select>
    I want to be able to show the country from the database first in the list and then all other possible countries after it. In the table the country of the customer is United Kingdom. However if I use the example above there is nothing in the drop-down list.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  17. Post #1737
    WiP about GW2
    eternalflamez's Avatar
    November 2011
    4,789 Posts
    How would I go about populating a drop-down list using values from a database as well as values that I enter myself? This is the edit Delivery Address page where the fields are already filled in using the values from the database based on the customer who is logged in.

    Code:
    <select name="thirdCountryDropdown"> <!-- drop down box to ask for customers country -->
    <option value="<?= isset($_SESSION['country']) ? $_SESSION['country'] : ''  ?>"></option>
    </select>
    I want to be able to show the country from the database first in the list and then all other possible countries after it. In the table the country of the customer is United Kingdom. However if I use the example above there is nothing in the drop-down list.
    Well, first of all, you are using the <option> wrong.

    <option value="value you want after submitting">Text value</option>

    And to populate the rest of the <select> from a database you run a loop over the values.
    Ex:
    Code:
    $sql = "SELECT * FROM `name` WHERE ID='$id'";
    $query = mysql_query($sql);
    
    while($result = mysql_fetch_array($query)
    {
    echo "<option value='". $result['countryname']. "'>". $result['countryname']."</option>";
    }
    Edited:

    Basically you left the text value at "", so that's why it didn't show.

    Edit: if you look at the source of the page, it should have an <option> with a value in the <select> you created.

    Edit 2 (quite late, i know): For more security, scroll a few posts down.
    Reply With Quote Edit / Delete Windows XP Netherlands Show Events Friendly Friendly x 1Programming King Programming King x 1Agree Agree x 1 (list)

  18. Post #1738
    Gold Member
    parket's Avatar
    May 2011
    1,168 Posts
    Uh I need a little help with a problem of mine I'm having - I need to make one very long image scroll across the screen and loop. The problem is for a countryside + clouds moving gradually. There's a few possible solutions I've found but none work well on IE which is a must =/
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  19. Post #1739
    OZZY INTENSIFIES
    GastricTank's Avatar
    August 2009
    9,257 Posts
    Hey fellas, I never post in here, but I need some help.

    I need to make a Web Photo Gallery using Adobe Bridge and incorporate it into a website. However, my schools computers are shite, there are bugs in the system, the program won't run correctly in some instances (buttons don't work, other buttons are actually gone), and I lack the program itself on my computer. Also note that there are no trials available (as far as I know), which sucks.

    Is there some way that I can do this without Bridge? I've seen that you can do it with photoshop, but all of the instructions I've found were very minimal.

    It would be even better if there was pre-made gallerys that I could just use, but that's been highly wishful. I've checked.

    Nobody? :C
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  20. Post #1740
    Gold Member
    StinkyJoe's Avatar
    June 2006
    2,196 Posts
    Well, first of all, you are using the <option> wrong.

    <option value="value you want after submitting">Text value</option>

    And to populate the rest of the <select> from a database you run a loop over the values.
    Ex:
    Code:
    $sql = "SELECT * FROM `name` WHERE ID='$id'";
    $query = mysql_query($sql);
    
    while($result = mysql_fetch_array($query)
    {
    echo "<option value='". $result['countryname']. "'>". $result['countryname']."</option>";
    }
    Edited:

    Basically you left the text value at "", so that's why it didn't show.

    Edit: if you look at the source of the page, it should have an <option> with a value in the <select> you created.

    SQL injection ahoy.

    <?php
    
    $pdo   = new PDO('mysql:host=localhost;dbname=dbname', 'user', 'password');
    $query = $pdo->prepare('SELECT * FROM table_name WHERE id=?'); 
    
    if( !$query->execute(array($id)) )
        echo 'shit broke, yo';
    
    ?>
    
    ...
    
    <? foreach($query->fetchAll(PDO::FETCH_OBJ) as $country): ?>
        <option value="<?= $country->name ?>"><?= $country->name ?></option>
    <? endforeach ?>
    
    
    Reply With Quote Edit / Delete Windows 7 Portugal Show Events Useful Useful x 1 (list)

  21. Post #1741
    Gold Member
    AMD 32's Avatar
    February 2007
    648 Posts
    Why is Apache ignoring half my directives? I'm using a Debian 6.0 box with LAMP and I'm configuring the server via apache2.conf. It seems to ignore any .htaccess files I use, even if I use
    <Directory /var/www>
    AllowOverride All
    </Directory>

    I want to disable script execution in a particular directory, so I looked it up and people suggested using AddHandler cgi {extensions} and then Options -ExecCGI. I can't remember what exactly it was but it didn't work. I've tried everything to stop even just PHP from executing and it's totally ignored by the server. RemoveHandler, AddType text/html php and plenty of other things. This doesn't work in both apache2.conf and .htaccess.

    Why is Apache ignoring me?

    Edited:

    Turns out it's because I don't fully understand how the configuration system works. Last time I used Apache was a while back and I only had the option of editing httpd.conf. Looks like there's a "sites-enabled" folder with a configuration which overrides the prior one and already has directory options in it.

    Edited:

    .htaccess works now but I still can't disable script execution in this direction. None of the AddHandler tricks work.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  22. Post #1742
    WiP about GW2
    eternalflamez's Avatar
    November 2011
    4,789 Posts
    SQL injection ahoy.

    <?php
    
    $pdo   = new PDO('mysql:host=localhost;dbname=dbname', 'user', 'password');
    $query = $pdo->prepare('SELECT * FROM table_name WHERE id=?'); 
    
    if( !$query->execute(array($id)) )
        echo 'shit broke, yo';
    
    ?>
    
    ...
    
    <? foreach($query->fetchAll(PDO::FETCH_OBJ) as $country): ?>
        <option value="<?= $country->name ?>"><?= $country->name ?></option>
    <? endforeach ?>
    
    
    Thanks, that could come in handy some time.

    He couldn't get the code to work though, and is doing it manually...
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  23. Post #1743
    FKop_Dragon's Avatar
    September 2007
    1,178 Posts
    Completely retarded question, I feel like I'm overlooking something obvious. I'm just trying to change the look of links in my styles.css. Basically just make it so there's no underline, the text is black, and that it goes bold when you hover over it. This is what I have:
    Code:
    	a:link:
    	
    		color:#000;
    		background-color:#CCC;
    		text-decoration:none;
    		font-weight:none;
    	
    	a:visited:
    	 
    		color:#000;
    		background-color:#CCC;
    		text-decoration:none;
    		font-weight:none;
    		
    	a:hover: 
    	
    		color:#000;
    		background-color:#CCC;
    		text-decoration:none;
    		font-weight:bold; 
    		font-size:100%;
    	
    	a:active: 
    	
    		color:#000;
    		background-color:#CCC;
    		text-decoration:none;
    		font-weight:none;
    I need to know where exactly to place it in the CSS document, nothing seems to be working. I tried placing it in the specific id, under html, body, and even in desperation put it in *{ } brackets.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  24. Post #1744
    WiP about GW2
    eternalflamez's Avatar
    November 2011
    4,789 Posts
    Completely retarded question, I feel like I'm overlooking something obvious. I'm just trying to change the look of links in my styles.css. Basically just make it so there's no underline, the text is black, and that it goes bold when you hover over it. This is what I have:

    -code-

    I need to know where exactly to place it in the CSS document, nothing seems to be working. I tried placing it in the specific id, under html, body, and even in desperation put it in *{ } brackets.
    I didn't know you were allowed to specify stuff like that?

    I always thought it was something like
    Code:
    a:hover
    {
    color:#000;
    background-color:#CCC;
    }
    etc...
    Other than that, shouldn't you just give the standard properties to just "a" and then under that, the a:hover, where you put !important behind the "font-weight:bold" property, like so:

    Code:
    a
    {
    		color:#000;
    		background-color:#CCC;
    		text-decoration:none;
    		font-weight:none;
    }
    
    a:hover
    {
    	font-weight:bold !important; 
    }
    Correct me if I'm wrong though, guys.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  25. Post #1745
    rookwood101's Avatar
    September 2011
    256 Posts
    Code:
    	a:link {
    	
    		color:#000;
    		background-color:#CCC;
    		text-decoration:none;
    		font-weight:none;
    	}
    	a:visited{
    	 
    		color:#000;
    		background-color:#CCC;
    		text-decoration:none;
    		font-weight:none;
    		}
    	a:hover{
    	
    		color:#000;
    		background-color:#CCC;
    		text-decoration:none;
    		font-weight:bold; 
    		font-size:100%;
    	}
    	a:active{
    	
    		color:#000;
    		background-color:#CCC;
    		text-decoration:none;
    		font-weight:none;
    }
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  26. Post #1746
    Gold Member
    TheDecryptor's Avatar
    September 2006
    4,266 Posts
    Uh I need a little help with a problem of mine I'm having - I need to make one very long image scroll across the screen and loop. The problem is for a countryside + clouds moving gradually. There's a few possible solutions I've found but none work well on IE which is a must =/
    If you set both layers to be absolutely positioned within a container with overflow: hidden;, you could animate the left properties to slide them left or right.

    Looping is an issue, but you'd just have to have the last 100px or so just be copied from the start of the issue (The exact amount required would depend on the width of the browser window)
    Reply With Quote Edit / Delete Windows 7 Australia Show Events

  27. Post #1747
    PatG's Avatar
    December 2008
    22 Posts
    Is there any possible way to be able to pull a full list of the files that a client is going to download when connecting to a server in Gmod? (That the loading screen page can access, sv_loadingurl)
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Funny Funny x 1 (list)

  28. Post #1748
    Gold Member
    jaybuz's Avatar
    May 2006
    5,516 Posts
    If you set both layers to be absolutely positioned within a container with overflow: hidden;, you could animate the left properties to slide them left or right.

    Looping is an issue, but you'd just have to have the last 100px or so just be copied from the start of the issue (The exact amount required would depend on the width of the browser window)
    Another solution is to make a div with the class clouds position it at the top of the page with width: 100% then give it the cloud background with repeat set to repeat-x. Then all you need to do is increase the background position x and then there's no need to reset the loop.

    http://jsfiddle.net/5VC5w/
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 1 (list)

  29. Post #1749
    Gold Member
    TheDecryptor's Avatar
    September 2006
    4,266 Posts
    That'd work too.

    You could also use CSS Transforms to do it, that gives the benefit of being hardware accelerated in Firefox and Safari. And CSS Animation would give you the same result, without ever having to write any JS.

    Edit:

    Code:
    @-moz-keyframes clouds {
        from { background-position: 300px 0px; }
        to { background-position: 0px 0px; }
    }
    
    body {
        background: url('http://www.webweaver.nu/clipart/img/web/backgrounds/space-sky/cartoon-clouds.jpg') repeat-x;
        -moz-animation-duration: 3s;
        -moz-animation-name: clouds;
        -moz-animation-iteration-count: infinite;
        -moz-animation-timing-function: linear;
    }
    Obviously also use the -webkit- and unprefixed variants too, etc.
    Reply With Quote Edit / Delete Mac Australia Show Events Winner Winner x 1 (list)

  30. Post #1750
    Gold Member
    jaybuz's Avatar
    May 2006
    5,516 Posts
    Nice! I just noticed backgroundPositionX isn't available in Firefox so I've updated my method to work with backgroundPosition. Simple fix.

    http://jsfiddle.net/5VC5w/2/
    Reply With Quote Edit / Delete Mac United Kingdom Show Events

  31. Post #1751
    I paid $2 for this
    Miljaker's Avatar
    October 2010
    791 Posts
    How do I make sure a domain I purchased points to the website on my host.

    I always purchased domains at the same time as hosts and both at the same host and it all went pretty much automatically. Client wanted to have a .nl domain and lithium hosting doesn't offer that so I got it at domein-registreren.nl.

    Then I purchased shared hosting at lithium with the option "I will use my existing domain and update my nameservers".

    I then went to the controlpanel at domein-registreren.nl and changed the nameservers to the ones I got from the host.

    I know it takes some time before it works but I'm not sure I did everything I need to do. So did I miss something?
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  32. Post #1752
    Gold Member
    jaybuz's Avatar
    May 2006
    5,516 Posts
    That sounds about right. Make sure you add the domain name to your hosting CP so it sets up a folder for it and everything.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 1 (list)

  33. Post #1753
    I paid $2 for this
    Miljaker's Avatar
    October 2010
    791 Posts
    That sounds about right. Make sure you add the domain name to your hosting CP so it sets up a folder for it and everything.
    Isn't that automatically? I mean I access cpanel at mydomain.nl/cpanel it would only be logical if it did that.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  34. Post #1754
    Dragon Member
    Dragory's Avatar
    January 2006
    1,312 Posts
    What kind of a workflow would you suggest for large projects with a few developers? A local test environment for everyone, from which changes are committed to a repository, from which they are uploaded to the production environment?
    Reply With Quote Edit / Delete Windows 7 Finland Show Events

  35. Post #1755
    Get a github organization set up, have everyone work locally on their own forks and merge code to your main repo, have a staging server set up that pulls code from one branch on your main repo that everyone integrates their changes in to and have your production server pull code from a different branch. Set up the production server and staging server so that they are as identical as possible and test the fuck out of everything (preferably automatically) before you merge any changes in the staging branch in to the production branch.

    Bonus points if you completely automate your deployment process and your server setup/configuration.
    Reply With Quote Edit / Delete Mac United States Show Events Useful Useful x 1Winner Winner x 1Informative Informative x 1Agree Agree x 1 (list)

  36. Post #1756
    Gold Member
    loony383's Avatar
    June 2007
    738 Posts
    Get a github organization set up, have everyone work locally on their own forks and merge code to your main repo, have a staging server set up that pulls code from one branch on your main repo that everyone integrates their changes in to and have your production server pull code from a different branch. Set up the production server and staging server so that they are as identical as possible and test the fuck out of everything (preferably automatically) before you merge any changes in the staging branch in to the production branch.

    Bonus points if you completely automate your deployment process and your server setup/configuration.
    I'm tempted to do that just because a automated setup would be awesome, probablly useful for a couple of my projects too.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  37. Post #1757
    Gold Member
    parket's Avatar
    May 2011
    1,168 Posts
    Nice! I just noticed backgroundPositionX isn't available in Firefox so I've updated my method to work with backgroundPosition. Simple fix.

    http://jsfiddle.net/5VC5w/2/
    Thanks man, appreciated!
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  38. Post #1758
    Ninja101 is m̶y̶ ̶f̶a̶v̶o̶u̶r̶i̶t̶e̶ ̶m̶o̶d̶ a pancake face
    FreddiRox!'s Avatar
    January 2010
    5,166 Posts
    I used to try to make websites but that phase died a long time ago. Anyway, I was wondering if any of you know a template I could buy for a website which revolves around voting (Vote up entries, vote down, top 10...) and so on? Any ideas?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  39. Post #1759
    Gold Member
    Crhem van der B's Avatar
    January 2010
    1,692 Posts
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1 (list)

  40. Post #1760
    Ninja101 is m̶y̶ ̶f̶a̶v̶o̶u̶r̶i̶t̶e̶ ̶m̶o̶d̶ a pancake face
    FreddiRox!'s Avatar
    January 2010
    5,166 Posts
    I did, I searched vote and rate and I didn't get any things with a vote up/thumbs up system
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events