-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
Oh yeah? Is the Samsung Note range any good? We have a Tab 10.1 for testing here at work and it's possibly the worst piece of crap I've ever used.
-
As far as I'm aware, you can't create custom builds of the core. Only the UI extension allows you to do that.
-
Hmm, what? All three of those are jQuery. In-fact, the last two are short-cuts for jQuery.ajax.
-
You need to look into AJAX.
-
How Would I Dynamically Change Meta Tag Information?
Adam replied to scm22ri's topic in PHP Coding Help
I'm guessing you have a shared "header.php" type file you include across each page? Just define a default config array within your header file, and allow each page to override it: header.php $defaultConfig = array( 'title' => 'Your Site', 'description' => 'Your site description', 'keywords' => 'your, site, keywords' ); $config = array_merge($defaultConfig, isset($config) ? $config : array()); about.php $config = array( 'title' => 'About page' // Default description and keywords will be used as we omitted them here ); include 'header.php'; Keeps it nice and simple, and avoids a huge switch statement. -
Don't know CI much, but ordinarily you would assign it to the view from within the controller. An nope that's not the correct syntax; print_r is a function. Check the manual for some examples.
-
910823 - How To Implement Sessions In Web Services?
Adam replied to hamidi's topic in Application Design
You've essentially just described how sessions are retained normally. Cookies are sent in the request as a header: Cookie: foo=bar; baz=quz One of the key=value pairs is the session cookie, generally a hash, which refers back to a session file on the server containing a bunch of serialised data. You could simulate this through a different header, or as normal through the Cookie header if you want. I've never actually used "NuSoap", but it just looks like a wrapper for SOAP. Personally I would keep the authentication process within the realm of the API implementation, not the server listening for the API requests. I'm not sure if this actually happens, but it's perfectly possible you might not send SOAP requests over HTTP. Much like a session cookie though, you could have a session/authentication hash passed back and forth between requests. -
Arghh.. You make good points. Going to get Blops! Not switching to the Xbox though
-
If I understand what you're asking, you want to take a PHP variable (defined within news_load1.php) and use it within the success handler? If so, it really depends what news_load1.php already outputs?
-
Your .header and .container elements specify a percentage width, so no matter how large the screen they'll take up a combined 42% of the screen: .container { overflow:auto; margin-left: 21%; margin-right: 21%; } You can either specify a pixel/em value for the left and right margins, or you can set them to "auto", and specify the width of the .container and .header elements.
-
Have you taken a look at the documentation for the Date object? You can provide a date string (from the server) to base the date on.
-
Unless that was moved to the end of the <body> tag (or at least to a point after the elements are defined in the HTML) this wouldn't change anything. Did you mean pass an anonymous function to jQuery..? $(function() { .. });
-
Removing A Select Drop Down Onchange And/or Onblur
Adam replied to akphidelt2007's topic in Javascript Help
Hmm not sure I see the problem? You can register a separate callback to each event and do what you need to? -
The psuedo ":checkbox" selector is jQuery specific, which would mean internally jQuery can't use CSS3 selectors. If radio inputs are a problem then it would better to specify the type attribute: $('#items input[type=checkbox]:checked').removeAttr('checked');
-
You can actually make this a little more efficient by making use of CSS3 selectors (jQuery will use them where possible) to only match input's that are checked in th first place: http://jsfiddle.net/mx5Nr/
-
Nope. It's better to use CSS where possible, and fall back to Javascript when not. Assuming you're willing to implement it twice that is. I haven't worried about putting comments in for a long time now.
-
Works for me: > php -a Interactive shell php > $data = '<a class="blog_name" href="/blog/matchme">'; php > preg_match_all('/href="\/blog\/(.*)">/', $data, $matches); php > print_r($matches); Array ( [0] => Array ( [0] => href="/blog/matchme"> ) [1] => Array ( [0] => matchme ) ) .. Which suggests it's the way you're using it. Can you post all the relevant code?
-
As mentioned CSS3 gives you transformations, which are (with a few caveats) hardware accelerated. That means they'll out perform any JS-based animation. So yeah, in the future, JS animations will become obsolete. Right now though it's the same old story; not enough browsers support them to drop the legacy way completely. What do you mean you can't control them? It's perfectly possible to control them.
-
Penny Auction Bid Website Theory / Coding Help
Adam replied to simboski19's topic in Application Design
There's no need to continually update a 'time left' column; you can infer the time remaining based on when the auction ends. A simple JS countdown timer can tick down in real time. Periodically you can poll the server for bid updates using an XHR request. Or better yet, use WebSockets to keep a connection open while data is continually fed back from the server. WebSockets aren't fully supported yet, so you could use "long polling" instead. Personally I would adopt WebSockets now though, and fall-back to periodic requests for browsers that don't support them. Long polling is a bit hacky. As for the PHP side, whenever someone creates a bid just insert it into a 'bid' table. Don't delete their bids after an auction has ended or when someone else bids though, that data will provide nice statistics for you and allow users to look through their own bid history. With the right indexes you won't need to worry about performance, even if the table grows very large. -
Afternoon guys! Has anybody here used a PS Vita? If so, any good? Would you say they're worth it? I'm going to pop to the shop at the weekend and try one, but thought I'd ask here upfront too. If I decide to get one though I'm going to trade in my PS3 towards the cost, because I don't really go on it right now. Having said that though, Black Ops 2 is out next week so I'm a little unsure which to go for. What do you reckon? Edit Forgot to add, I'm travelling on a train nearly two hours a day right now, which is why I'm thinking of getting the Vita instead. I do have my laptop for the ride, but can be a bit annoying having to cart it around all the time.
-
You know I think we're related? My birthday soon too
-
Could You Give Me A Review Of A Site That I Am Working On
Adam replied to mdmartiny's topic in Website Critique
You can extract most of the information you ask for from their user agent, found in $_SERVER. The browser size, or "resolution", you can get using Javascript, and infer whether it's a desktop or mobile based on that. Anyway looking at the design side, I'm not keen on the logo, the font looks stretched and out of place. None of the fonts really work that well together to be honest. There's no consistent colour scheme or design, it just seems a little random; like the spacing between the left and right column on the home page, compared with the spacing between the header and footer. Consistency goes a long way. Also a minor thing, but when a hover/click effect jerks around the rest of the page, it doesn't work! It's not a bad start, but I think you've fallen into the common traps; big round corners, blocky shadows, random fonts, etc. I would try and be more subtle, keep things consistent, give the content a bit of room to breathe, etc. -
Ah, I never realised that.
-
You could also just use: header('Location: /');
-
Can you please post your code in tags in future, makes it much easier to read. Okay anyway. You're redeclaring the function unnecessarily, you should be reusing the function instead. Though that shouldn't be the cause of the issue. Is it when you call the function for the second time, or one of the specific links?
- 6 replies
-
- popup
- windowname
-
(and 1 more)
Tagged with: