|
haywire posted:Client side anything is not secure. Are you saying the authentication status is stored in the client's memory? Baad. Sorry, I might have over-complicated what I meant. It's not stored in client memory because it's not written yet . I'm just wondering how other 'secure' sites do it, eg GMail - I can boot my PC, start a new browser session and go to GMail and it will log in without prompts. Clearly this is stored in a cookie (as a server-side session wouldn't exist at that point), I'm just wondering what the secure way of doing this is? haywire posted:I suppose you COULD buffer all done operations, and then when they're sent every 10 seconds or so, check that all of the operations done are legit, but it seems kind of pointless. What if someone saves something then quits, the operation would not be sent! I was just trying to cut down on server load, it would be far easier to process each event individually! I might just go with that method anyway though, it's probably not going to be used by many people.
|
# ? Nov 5, 2009 20:05 |
|
|
# ? Jun 4, 2024 09:48 |
|
SFrost007 posted:I was just trying to cut down on server load, it would be far easier to process each event individually! I might just go with that method anyway though, it's probably not going to be used by many people. You could easily queue up the events in Javascript and send them in batches on a timer or after the queue fills. Then you'd only have to check the login status of the user once per batch. It would just take some effort to package them on the client and unpack them on the server, but both the server and client should still be able to re-use almost all of the code you already have written (assuming you have any written yet).
|
# ? Nov 5, 2009 20:46 |
|
Could anyone point me towards the best method for posting a facebook status from a remote website using php?
|
# ? Nov 5, 2009 23:28 |
|
KracKiwi posted:Could anyone point me towards the best method for posting a facebook status from a remote website using php? http://developers.facebook.com/ You'll need to register your site with them before you can do anything.
|
# ? Nov 6, 2009 01:52 |
|
I can't seem to get the Daylight Savings date parameter working (capital I). It's supposed to return a 1 if it is daylight savings, and 0 if it isn't. I've tested several different dates converted from Etc/GMT+1 to EST. For example: php:<? $dateSrc ="2009-11-06 06:51:21"; $timeZone = 'Etc/GMT+1'; $dateTime = new DateTime($dateSrc, new DateTimeZone('EST')); $dateTime->setTimeZone(new DateTimeZone($timeZone)); echo $dateTime->format('n/j/y e I'); //echos "11/6/09 Etc/GMT+1 0" $dateSrc ="2009-2-06 06:51:21"; $timeZone = 'Etc/GMT+1'; $dateTime = new DateTime($dateSrc, new DateTimeZone('EST')); $dateTime->setTimeZone(new DateTimeZone($timeZone)); echo $dateTime->format('n/j/y e I'); //echos "2/6/09 Etc/GMT+1 0" ?>
|
# ? Nov 6, 2009 16:36 |
|
GMT doesn't have daylight savings time, so it will always be 0.
|
# ? Nov 6, 2009 16:45 |
|
Munkeymon posted:GMT doesn't have daylight savings time, so it will always be 0. Even if I establish a new timezone, EST, like in that example? The problem is that it's returning time's an hour ahead. I was thinking that I could get the value of "I" and just add that on if needed. I'm surprised that converting to EST doesn't compensate for the daylight savings in the first place. edit: I guess another question would be, why is "e" returning Etc/GMT+1? Shouldn't it be EST now that it was converted? LP0 ON FIRE fucked around with this message at 16:53 on Nov 6, 2009 |
# ? Nov 6, 2009 16:51 |
|
awdio posted:Even if I establish a new timezone, EST, like in that example? The problem is that it's returning time's an hour ahead. I was thinking that I could get the value of "I" and just add that on if needed. I'm surprised that converting to EST doesn't compensate for the daylight savings in the first place. But you're converting from EST, which does have daylight savings time to an offset of GMT, which doesn't have DST. php:<? $dateSrc = '2009-06-06 06:51:21'; $timeZone = 'Etc/GMT+1'; $dateTime = new DateTime($dateSrc, new DateTimeZone($timeZone)); //new date is in GMT+1 $dateTime->setTimeZone(new DateTimeZone('EST')); //convert to EST echo $dateTime->format('n/j/y e I'); //6/6/09 America/New_York 1 //(because php's date/time library loves those stupid loving location-based 'zones') ?>
|
# ? Nov 6, 2009 16:58 |
|
SFrost007 posted:I was just trying to cut down on server load, it would be far easier to process each event individually! I might just go with that method anyway though, it's probably not going to be used by many people. Is it truly a lot of server load though? I can't imagine that an authentication database query would add a lot of overhead.
|
# ? Nov 6, 2009 17:25 |
|
Thanks for all your help, Munkeymon. It's giving me back the correct daylight savings numbers but now the time is 7 hours earlier. I'm sure I can probably figure this out.
|
# ? Nov 6, 2009 17:29 |
|
Begby posted:Is it truly a lot of server load though? I can't imagine that an authentication database query would add a lot of overhead. Maybe not, load wise. I was just thinking that in an 'active' period, sending all the events individually would mean one user could spawn maybe 20-30 requests a minute (completely plucked out of the air figure, could be more than that). But as I say, I've just gone ahead and implemented it this way for now as there probably won't be many users at all.
|
# ? Nov 6, 2009 18:00 |
|
I've pretty much never used PHP before today and I don't seem to get the point of Interfaces.php:<? interface Clusterable { public function distanceTo($other); } class Does implements Clusterable { public function distanceTo($other) { return 1.0; } } class Doesnt { public function distanceTo($other) { return 2.0; } } function check($thing) { return $thing->distanceTo($thing); } $one = new Does(); $two = new Doesnt(); echo check($one); echo check($two); ?>
|
# ? Nov 9, 2009 23:37 |
|
Contero posted:I've pretty much never used PHP before today and I don't seem to get the point of Interfaces. php:<? function check(Clusterable $thing) { return $thing->distanceTo($thing); } ?> supster fucked around with this message at 00:05 on Nov 10, 2009 |
# ? Nov 10, 2009 00:03 |
|
Contero posted:Since php is dynamically typed, what's the point of creating something that doesn't serve as anything other than a type? Is it just to verify that you're not retarded and implemented a list of methods? I'd like to point out that you didn't actually use the interface as a type in your example and you could come up with something about as contrived in many languages. Just off the top of my head if($something instanceof Something) is pretty easy compared to checking for the existence of each method in the interface.
|
# ? Nov 10, 2009 00:08 |
|
supster posted:Yes, basically. Dynamically typed and strongly typed are not mutually exclusive. You can get PHP to act that way (kinda-sorta) with something called type hinting (implemented in PHP 5.1): That's what I was looking for. Thanks.
|
# ? Nov 10, 2009 00:30 |
|
In response to my previous post about __autoload.. it seems the general consensus is that having more than one class in per file is frowned upon. I am putting together a very basic framework, for my 'model' class, I have a collection of tiny classes for the different 'field' types. I like it this way, as if I want to expand on a particular field type, I can obviously do it very easily. It seems very wasteful to have these tiny classes in separate files, and there could be a fair few of them depending on how many field types I end up using. In this situation, is housing these classes inside my model.class.php file acceptable? Also, I am aware of libraries such as Doctrine. I just wanted to code this myself in order to keep it very simple. Opinions very much appreciated!
|
# ? Nov 11, 2009 19:21 |
|
Hanpan posted:In response to my previous post about __autoload.. it seems the general consensus is that having more than one class in per file is frowned upon. I am putting together a very basic framework, for my 'model' class, I have a collection of tiny classes for the different 'field' types. I like it this way, as if I want to expand on a particular field type, I can obviously do it very easily. Don't over optimize or optimize too early. The one thing that you don't want to waste is programming time. IMO programmer time is way more valuable than CPU cycles because often it is less expensive to buy more hardware than it is to pay for more labor, and it really hardly ever comes down to that. So code for maintainability above all else where possible. Splitting classes up into files will make your code easier to edit and maintain, and make it especially easier for others to maintain. Its pretty making GBS threads going through someone's code and having to look through a dozen files and some crazy twisted mess of file includes to find the class you need to edit. Its also popular to sort it into a directory structure such as LibraryName_Entity_Class_SubClass i.e. if your model project is called Weasel then you might have a class called Weasel_Model_Field_VarChar This indicates that Field is part of Model, and VarChar inherits from Weasel_Model_Field. Your varchar class would then be stored in the following folder Library/Weasel/Model/Field/VarChar.php Then Weasel_Model_Field would be stored in Library/Weasel/Model/Field.php - and so on and so forth. Now your class is really easy for people to find, and really easy for your autoloader to find. Yeah, the long rear end class names are gay, but wasting time trying to find some class you wrote 6 years ago is even gayer. Of course there are a million ways to skin a cat, the way above is not how you HAVE to do it, and I am sure there are plenty of arguments about why this method might suck, nothing is perfect in PHP. Do whatever works best for you. Don't over think it though, and don't over optimize. After your site is getting so many hits that it makes sense to try to cut down on file includes, then go ahead and start optimizing.
|
# ? Nov 11, 2009 20:54 |
|
Why does getimagesize sometimes not return both an image height and width, even if the image exists? Is there a better way to get an image width and height?
|
# ? Nov 11, 2009 20:57 |
|
Begby posted:Do whatever works best for you. Don't over think it though, and don't over optimize. After your site is getting so many hits that it makes sense to try to cut down on file includes, then go ahead and start optimizing. I appreciate the response, but optimizing is what I enjoy most about coding PHP. This is more of a hobby project more than anything, so I want to make sure I am doing things in the best possible ways so I know how things should be done.
|
# ? Nov 11, 2009 21:04 |
|
Hanpan posted:I appreciate the response, but optimizing is what I enjoy most about coding PHP. This is more of a hobby project more than anything, so I want to make sure I am doing things in the best possible ways so I know how things should be done. The way things should be done
|
# ? Nov 11, 2009 21:36 |
|
Hanpan posted:I appreciate the response, but optimizing is what I enjoy most about coding PHP. This is more of a hobby project more than anything, so I want to make sure I am doing things in the best possible ways so I know how things should be done. Well the best possible way is to get it done, make it maintainable, then worry about speed only when its an issue as rt4 indicated in his post. So there, now you have your answer.
|
# ? Nov 11, 2009 22:57 |
|
As Begby said; optimising is more than just "make faster". You can optimise for speed, for memory footprint, or for rapid development. The normal mantra I go by is; Write a specification. (if you are going to "optimise" then the spec should include timing for operations) Design the interface Make something with the right interface. (make anything; but the right shape!) (at this point you can make a test suites and watch it fail all the tests!) do { Make it work! Run test suite } while(failed_tests > 0) (don't forget to test that it fails in the way you expect when you feed it poo poo instead of input!) If your spec included timings and you can't meet them: Make it fast enough. (optimise!!!) Walk away. (writing maintainable code is something you should be doing at all stages of the process, its not something you go back and add at the end - mainly as your optimisation will usually involve some compromise of style - but also because you...won't go back and make it maintainable)
|
# ? Nov 12, 2009 13:29 |
|
Test driven development is a great way to develop things if you don't care when they get done, if you know the program code is going to be updated very frequently, or if you're not really sure what you're coding and want to take a step back and analyze the program via tests. In most cases I've run into, programs are needed ASAP and the code will never be seriously looked at again once the initial bugs are worked out.
yatagan fucked around with this message at 14:30 on Nov 12, 2009 |
# ? Nov 12, 2009 14:26 |
|
awdio posted:Why does getimagesize sometimes not return both an image height and width, even if the image exists? Is there a better way to get an image width and height? getimagesize() downloads the entire image, so if it's remote and huge, it might be timing out before it finishes. check the man page on php.net, there are a bunch of functions there you can use to get height and width from the image header using curl, fread, etc
|
# ? Nov 12, 2009 20:36 |
|
I'm slowly learning some PHP right now, and I'm working on a SimpleMachines forum. I've got a custom template and what I'm trying to do is add a div element that pops up when you hover over top of a username. When I say I'm slowly learning PHP, I mean it - I can do some basic stuff but I don't know how to exactly approach this problem. There are two main parts of the SMF template I'm customizing. The first, shows the Username on posts: php:<? // Show information about the poster of this message. echo ' <div class="floatleft poster"> <h4 class="username">', $message['member']['link'] , ($message['member']['id'] == $context['topic_starter_id']) ? '<img src="'.$settings['images_url'].'/topic_starter.gif" height="16" width="16" alt="'.$txt['TopicStarter_txt'].'" title="'.$txt['TopicStarter_txt'].'" style="vertical-align:bottom; padding-left:5px;" />' : '' , '</h4> <ul class="smalltext" id="msg_', $message['id'], '_extra_info">'; ?> php:<? // This shows the popular messaging icons. if ($message['member']['can_view_profile']) echo '<div class="hambuttonwrapper"><a class="buttontooltip" href="#"><span class="hambutton"></span><span class="buttontooltip"> <li class="margintop"> <ul class="nolist"> ', !isset($context['disabled_fields']['xfire']) && !empty($message['member']['xfire']['link']) ? '<li>' . $message['member']['xfire']['link'] . '</li>' : '', ' ', !isset($context['disabled_fields']['xfire']) && !empty($message['member']['steam']['link']) ? '<li>' . $message['member']['steam']['link'] . '</li>' : '', ' ', !isset($context['disabled_fields']['gamertag']) && !empty($message['member']['gamertag']['link']) ? '<li>' . $message['member']['gamertag']['link'] . '</li>' : '', ' ', !isset($context['disabled_fields']['psn']) && !empty($message['member']['psn']['link']) ? '<li>' . $message['member']['psn']['link'] . '</li>' : '', ' ', !isset($context['disabled_fields']['lastfm']) && !empty($message['member']['lastfm']['link']) ? '<li>' . $message['member']['lastfm']['link'] . '</li>' : '', ' ', !isset($context['disabled_fields']['fah']) && !empty($message['member']['fah']['link']) ? '<li>' . $message['member']['fah']['link'] . '</li>' : '', ' ', !isset($context['disabled_fields']['icq']) && !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', ' ', !isset($context['disabled_fields']['msn']) && !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', ' ', !isset($context['disabled_fields']['aim']) && !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', ' ', !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', ' </ul> </li>'; ?> code:
Gyshall fucked around with this message at 23:16 on Nov 16, 2009 |
# ? Nov 16, 2009 22:01 |
|
I don't know if I've understood what you want correctly, but can't you just assign the messaging stuff to a variable and echo it along with the other stuff in the first bit of code? Like the following: NB. The following is a total mess because I'm neither familiar nor happy with two stylistic choices that the authors of the original code seem to use extensively: 1) the use of "echo x_1, x_2, x_3, ..., x_n" instead of "echo x_1; echo x_2; echo x_3; ... echo x_n;" and 2) the use of "x ? y : z" instead of "if ( x ) { y; } else { z; }". I've butchered it into a style I'm more comfortable with, without much attention to niceties in the formatting. If I was concerned with elegance I wouldn't substitute in what I've written here, but it may meet your needs. Anyway, I've typed the poo poo now, so I may as well post it. php:<? // This shows the popular messaging icons. if ($message['member']['can_view_profile']) { $MyVariable = '<div class="hambuttonwrapper"><a class="buttontooltip" href="#"><span class="hambutton"></span><span class="buttontooltip"> <li class="margintop"> <ul class="nolist"> '; if ( !isset($context['disabled_fields']['xfire']) && !empty($message['member']['xfire']['link']) ) { $MyVariable .= '<li>' . $message['member']['xfire']['link'] . '</li>'; } $MyVariable .= ' '; if ( !isset($context['disabled_fields']['xfire']) && !empty($message['member']['steam']['link']) ) { $MyVariable .= '<li>' . $message['member']['steam']['link'] . '</li>'; } $MyVariable .= ' '; if ( !isset($context['disabled_fields']['gamertag']) && !empty($message['member']['gamertag']['link']) ) { $MyVariable .= '<li>' . $message['member']['gamertag']['link'] . '</li>'; } $MyVariable .= ' '; if ( !isset($context['disabled_fields']['psn']) && !empty($message['member']['psn']['link']) ) { $MyVariable .= '<li>' . $message['member']['psn']['link'] . '</li>'; } $MyVariable .= ' '; if ( !isset($context['disabled_fields']['lastfm']) && !empty($message['member']['lastfm']['link']) ) { $MyVariable .= '<li>' . $message['member']['lastfm']['link'] . '</li>'; } $MyVariable .= ' '; if ( !isset($context['disabled_fields']['fah']) && !empty($message['member']['fah']['link']) ) { $MyVariable .= '<li>' . $message['member']['fah']['link'] . '</li>'; } $MyVariable .= ' '; if ( !isset($context['disabled_fields']['icq']) && !empty($message['member']['icq']['link']) ) { $MyVariable .= '<li>' . $message['member']['icq']['link'] . '</li>'; } $MyVariable .= ' '; if ( !isset($context['disabled_fields']['msn']) && !empty($message['member']['msn']['link']) ) { $MyVariable .= '<li>' . $message['member']['msn']['link'] . '</li>'; } $MyVariable .= ' '; if ( !isset($context['disabled_fields']['aim']) && !empty($message['member']['aim']['link']) ) { $MyVariable .= '<li>' . $message['member']['aim']['link'] . '</li>'; } $MyVariable .= ' '; if ( !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ) { $MyVariable .= '<li>' . $message['member']['yim']['link'] . '</li>'; } $MyVariable .= ' </ul> </li>'; } ?> php:<? // Show information about the poster of this message. echo ' <div class="floatleft poster"> <h4 class="username">', $message['member']['link'] , ($message['member']['id'] == $context['topic_starter_id']) ? '<img src="'.$settings['images_url'].'/topic_starter.gif" height="16" width="16" alt="'.$txt['TopicStarter_txt'].'" title="'.$txt['TopicStarter_txt'].'" style="vertical-align:bottom; padding-left:5px;" />' : '' , $MyVariable , '</h4> <ul class="smalltext" id="msg_', $message['id'], '_extra_info">'; ?>
|
# ? Nov 17, 2009 00:37 |
|
That is exactly what I needed. Thanks! e: One more question. I'm trying to get this PHP within the same span, but it looks like it follows different rules than the first code I posted (checks to see if the user is logged in or if he has permissions to view a profile or not, as well as checking if they filled in the fields or not). These buttons show up in the same area the first couple do, but again, because of the other variables they call it won't parse correctly. Thanks again, I'm really oblivious to this poo poo right now. php:<? // Show the profile, website, email address, and personal message buttons. if ($settings['show_profile_buttons']) { echo ' <li class="margintop"> <ul class="nolist">'; // Don't show the profile button if you're not allowed to view the profile. if ($message['member']['can_view_profile']) echo ' <li><a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt['view_profile'] . '" title="' . $txt['view_profile'] . '" border="0" />' : $txt['view_profile']), '</a></li>'; // Don't show an icon if they haven't specified a website. if ($message['member']['website']['url'] != '' && !isset($context['disabled_fields']['website'])) echo ' <li><a href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank" class="new_win">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/www_sm.gif" alt="' . $txt['www'] . '" border="0" />' : $txt['www']), '</a></li>'; // Don't show the email address if they want it hidden. if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum'))) echo ' <li><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>'; // Since we know this person isn't a guest, you *can* message them. if ($context['can_send_pm']) echo ' <li><a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" border="0" />' : ($message['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>'; echo ' </ul> </li>'; } ?> Gyshall fucked around with this message at 02:44 on Nov 17, 2009 |
# ? Nov 17, 2009 01:33 |
|
It occurred to me that I slipped up - at the end of that first block of code I modified, instead of just a closing brace } it should say code:
Gyshall posted:That is exactly what I needed. Thanks! I don't really know what you mean. You want that stuff to also appear within the <h4> block where we added $MyVariable?
|
# ? Nov 17, 2009 15:47 |
|
Hammerite posted:I don't really know what you mean. You want that stuff to also appear within the <h4> block where we added $MyVariable? Yeah. I'm gathering that tinkering with SMF isn't the best spot to start with learning PHP as I go, eh? e: To elaborate, the other stuff (// Show the profile, website, email address, and personal message button) ideally should show up with other buttons in the H4 span part, so yeah. Gyshall fucked around with this message at 21:44 on Nov 17, 2009 |
# ? Nov 17, 2009 21:31 |
|
Gyshall posted:Yeah. I'm gathering that tinkering with SMF isn't the best spot to start with learning PHP as I go, eh? OK. Let the block of code you posted in your second post - the one starting if ($settings['show_profile_buttons']) - be B (for ease of reference). Modify the <h4> block so that instead of reading as follows code:
code:
|
# ? Nov 17, 2009 22:36 |
|
Thanks. I owe you a beer!
|
# ? Nov 17, 2009 23:02 |
|
Hopefully this doesn't need it's own thread. Here's my situation: I just started a website using Word Press (http://www.intensivepurposes.net). At the top of the page you'll notice I have a text banner. I'd like to change that into a .jpg graphic banner, but I can't seem to figure out how to do it. Everything on the right side of the page (from the Twitter brid down) is controlled by sidebar.php. There is a topbanner.php, but all it contains is code:
1) What the dimensions of a graphic banner would be (to me it looks around 600x200) 2) Where I would insert the <img src=> HTML. If it matters, I'm using the Modern Style Theme, which you can view/download at http://flexithemes.com Thanks in advance! Xarthor fucked around with this message at 19:10 on Nov 18, 2009 |
# ? Nov 18, 2009 19:08 |
|
Xarthor posted:Hopefully this doesn't need it's own thread. The fine folks in the Wordpress Thread could probably help you out better than us slobs.
|
# ? Nov 18, 2009 19:33 |
|
Lumpy posted:The fine folks in the Wordpress Thread could probably help you out better than us slobs. Woops! Totally missed that. Thanks. Xarthor fucked around with this message at 20:13 on Nov 18, 2009 |
# ? Nov 18, 2009 19:53 |
|
Hammerite posted:I don't know if I've understood what you want correctly, but can't you just assign the messaging stuff to a variable and echo it along with the other stuff in the first bit of code? Like the following: Whoa, that is a hell-load of redundant code. Surely you should just have an array of the fields you want to test and then do a foreach loop?
|
# ? Nov 23, 2009 16:49 |
|
haywire posted:Whoa, that is a hell-load of redundant code. Yeah, that would be a lot better.
|
# ? Nov 23, 2009 18:34 |
|
Anyone have any ideas for making an image scroll in the background slower than the rest of the page? I'm trying to make a neat 3D effect where instead of just having a static background and a foreground that scrolls normally, I want the foreground to scroll normally and the background to scroll slowly and in relation to the length of the page. The idea is that the page is made up of a header, 3 columns, and a footer. The left column is navigation and it looks like a tree, the right column is just a sliver of another tree, and the center column is where the content goes. It has a big 1000px by 2400x px canopy picture as it's background. This canopy picture is currently just static, with only the top 1000-1200px showing. I want this image to slowly scroll while the two left columns and the content ontop of the canopy (in semi-transparent background divs) scroll normally. By the bottom of the page, the bottom 1000-1200px would be showing and the top of it would be hidden. It would also have a minimum scroll setting so that it wouldn't scroll too fast on shorter pages. I'll post up a diagram of what I mean when I get home. I don't even know where to start with this, I'm new to php so I don't know if it even has the capabilities to do something like this, maybe Java? I just don't know. Could someone point me in the right direction?
|
# ? Nov 23, 2009 18:55 |
|
PHP doesn't interact with the browser; people just use PHP to generate HTML. If you want to do something to change the behavior of the page, use HTML, CSS, and JavaScript. You'll want to head over to the JavaScript thread and ask there, but I'll say right now that I doubt it's possible outside of Flash (which is a poison to the web).
|
# ? Nov 23, 2009 18:59 |
|
Soks posted:this is called parallax scrolling and there are several CSS tutorials and even a jquery plugin to accomplish this
|
# ? Nov 23, 2009 19:56 |
|
|
# ? Jun 4, 2024 09:48 |
|
er0k posted:this is called parallax scrolling and there are several CSS tutorials and even a jquery plugin to accomplish this Holy poo poo, thank you so much! My work place uses IE 6.0, so I can't see the drat effect, but there seems to be a lot of sites that implement it and several tutorials... Looking at the code, it looks very simple. Thanks, wow. Edit: This one even works on IE 6.0, amazing. I actually know my way around Java code decently, just never used it for anything web based, so I'm pretty confident I can get the code here to do exactly what I want... with only a little help. Soks fucked around with this message at 21:48 on Nov 23, 2009 |
# ? Nov 23, 2009 20:33 |