Showing posts with label website. Show all posts
Showing posts with label website. Show all posts

Saturday, 18 December 2010

UserCake Automatic Login

UserCake Automatic Login
I just finished a little code snippet for the Open Source User log in system 'Usercake'.
It automatically logs in a new user upon successful registration by redirecting the page, automatically posting the username and password using document.form.submit (but only if there's no errors AND email activation is turned off).


Insert this code on register.php just before the <!DOCTYPE bit at around line 90.

if(!empty($_POST) && count($errors) == 0 && !$emailActivation){

      echo "<html>/n";
      echo "<head><title>Logging you In...</title></head>/n";
      echo "<body onLoad="document.forms['login_form'].submit();">/n";
      echo "<center><h2>Please wait, you are being logged in</center>/n";
      echo "<form method="post" name="login_form" ";
      echo "action="login.php">/n";

      echo "<input type="hidden" name="username" value ="$username" />/n";
      echo "<input type="hidden" name="password" value ="$password" />/n";
      echo "<center><br/><br/>If you are not automatically logged in ";
      echo "within 5 seconds...<br/><br/>/n";
      echo "<input type="submit" value="Click Here"></center>/n";
      
      echo "</form>/n";
      echo "</body></html>/n";
   
 } else {



And of course remember to close with a curly bracket right and the VERY END of the page.


I used this to pass an additional $_POST variable telling UserCake that it was the first login.


Hope this helps you!

Monday, 15 November 2010

Browser Sizes

Just found this pretty neat feature from Google Labs - a web 'mask' showing usage percentages for browser window sizes.



http://browsersize.googlelabs.com/

Pretty useful tool for us website designers! I'd say it looks like optimising your website design for c. 1000x550px resolution is a happy medium (at the moment) of usability over design possibilities...  Although some would say you should make your site available to absolutely everyone!

There's also useful raw chronological browser stats including size, operating system, browser, from W3 Schools http://www.w3schools.com/browsers/browsers_display.asp

Wednesday, 10 November 2010

New Web Browsers

I've been test driving the new browser based on Firefox called 'Flock'.  It features a sidebar where you can load integrated social media (FaceBook, Twitter), RSS feeds, Email and much more.



Also excited to try 'Rock Melt' if/when I get an invite via their Facebook page...



Blogged with the Flock Browser

Tuesday, 28 September 2010

@font-face

Yay the @font-face css declaration is here!
Read more about it at the
I've looked into using custom fonts before, mainly for SEO and page-loading-time reasons; there were a few very ugly solutions out there, including one that generated a Flash swf showing the desired text and embedding the requested font - UGH!!
So can't wait to implement this on client sites and our own upgraded v.3 website in the making.

Saturday, 25 September 2010

HTML5

Wow just found this site for Google's Web project HTML5...
Thus concludes Google's takeover of the interweb...

http://www.html5rocks.com/

Monday, 16 August 2010

Thursday, 12 August 2010

Work

A spate of work just come in including some flash and website work for Paul Mackie Wedding Photography Aberdeen and loads of business cards printing jobs.