Saturday, August 27, 2011

[Gd] Rich signatures for your domain using the Email Settings and the Profiles APIs

| More

Google Apps Developer Blog: Rich signatures for your domain using the Email Settings and the Profiles APIs



A recent addition to the Email Settings API allows domain administrators to use HTML-encoded strings when configuring the default signature for their users.



Updating all signatures to make them adopt the same visually appealing style sounds like a perfect task to automate, however we’d still need to collect various pieces of information for each user, such as phone number or job title, and the Email Settings API has no knowledge of them.



The Google Apps Profiles API provides exactly what we are looking for and in the rest of this article we’ll see how to have the two APIs interact to reach our goal.



Let’s assume we want our signatures to look like the one in the screenshot below, with a bold name, italic job title and clickable link for the email address. Of course you can edit the style as you like with a bit of HTML skills:





Python is the programming language of our choice for this small script and we use the Google Data APIs Python Client Library to send requests to the Email Settings and Profiles APIs.



The first few lines of the script import the required libraries and set the values of the credentials that will be used to authorize our requests. You can find the consumer key and secret for your domain in your Control Panel, under Advanced Tools - Manage OAuth domain key. Remember to replace the dummy values in the script below with yours before running it:

import gdata.apps.emailsettings.client

import gdata.contacts.client

# replace these values with yours



CONSUMER_KEY = 'mydomain.com'

CONSUMER_SECRET = 'my_consumer_secret'

company_name = 'ACME Inc.'

admin_username = 'admin'


We’ll use 2-legged OAuth as the authorization mechanism and set the administrator’s email address as the value of the xoauth_requestor_id parameter, identifying the user we are sending the requests on behalf of.



The consumer key and secret plus the requestor id are the only parameters needed to create an OAuth token that we can pass to the Email Settings and Profiles clients:

# request a 2-legged OAuth token

requestor_id = admin_username + '@' + CONSUMER_KEY

two_legged_oauth_token = gdata.gauth.TwoLeggedOAuthHmacToken(

CONSUMER_KEY, CONSUMER_SECRET, requestor_id)



# Email Settings API client

email_settings_client = gdata.apps.emailsettings.client.EmailSettingsClient(

domain=CONSUMER_KEY)

email_settings_client.auth_token = two_legged_oauth_token



# User Profiles API client

profiles_client = gdata.contacts.client.ContactsClient(

domain=CONSUMER_KEY)

profiles_client.auth_token = two_legged_oauth_token


Let’s define a class that generates the signatures for our users on the basis of a set of optional attributes (occupation, phone number, email, etc). This is the class you need to edit or extend if you want to change the style of the signatures for your domain. In the example below, the HtmlSignature() method simply concatenates some strings with hard-coded styling, but you may want to use a more elaborate templating system instead:

# helper class used to build signatures

class SignatureBuilder(object):

def HtmlSignature(self):

signature = '%s' % self.name

if self.occupation:

signature += '%s' % self.occupation

if self.company:

signature += '%s' % self.company

signature += 'Email: <a href=\'mailto:%s\'>%s</a> - Phone: %s' % (

self.email, self.email, self.phone_number)

return signature



def __init__(

self, name, company='', occupation='', email='', phone_number=''):

self.name = name

self.company = company

self.occupation = occupation

self.email = email

self.phone_number = phone_number


Let’s use profiles_client to retrieve a feed containing all profiles for the domain. Each call to GetProfilesFeed() only returns a page of users, so we need to follow the next links until we get all users:

# get all user profiles for the domain

profiles = []

feed_uri = profiles_client.GetFeedUri('profiles')

while feed_uri:

feed = profiles_client.GetProfilesFeed(uri=feed_uri)

profiles.extend(feed.entry)

feed_uri = feed.FindNextLink()



At this point profiles will contain the list of users we want to process. For each of them, we instantiate a SignatureBuilder object and set its properties name, company, occupation, email and phone_number with the data for that user.

A call to the HtmlSignature() method of the SignatureBuilder instance will provide us with a properly formatted HTML-encoded signature.

# extract relevant pieces of data for each profile

for entry in profiles:

builder = SignatureBuilder(entry.name.full_name.text)

builder.company = company_name

if entry.occupation:

builder.occupation = entry.occupation.text

for email in entry.email:

if email.primary and email.primary == 'true':

builder.email = email.address

for number in entry.phone_number:

if number.primary and number.primary == 'true':

builder.phone_number = number.text



# build the signature

signature = builder.HtmlSignature()


The Email Settings API client exposes a method called UpdateSignature to set the signature for a target user. This methods accepts two parameters, the username of the user to be affected and a string containing the signature. We just built the latter, so we only need the retrieve the unique username that identifies each user and that can be easily inferred from the entry identifier returned by the Profiles API, as described in the code and the comment below.



It is worth mentioning that you can also retrieve usernames with the Provisioning API, but for the sake of simplicity we’ll rely on this small hack:

# entry.id has the following structure:

# http://www.google.com/m8/feeds/profiles/domain/DOMAIN_NAME/full/USERNAME

# the username is the string that follows the last /

username = entry.id.text[entry.id.text.rfind('/')+1:]


It’s time to send the requests to the Email Settings API and update the signature:

# set the user's signature using the Email Settings API

email_settings_client.UpdateSignature(username=username, signature=signature)


For further details on what can be accomplished with the Google Apps APIs, please check our documentation and don’t hesitate to reach out to us on our forums if you have any questions.







Claudio Cherubino profile | twitter | blog



Claudio is a Developer Programs Engineer working on Google Apps APIs and the Google Apps Marketplace. Prior to Google, he worked as software developer, technology evangelist, community manager, consultant, technical translator and has contributed to many open-source projects, including MySQL, PHP, Wordpress, Songbird and Project Voldemort.


URL: http://googleappsdeveloper.blogspot.com/2011/08/rich-signatures-for-your-domain-using.html

[Gd] List of OpenSocial Containers

| More

OpenSocial API Blog: List of OpenSocial Containers

Recently there was a thread going around the OpenSocial and Gadgets Specification discussion board about providing an updated list of OpenSocial containers, both at the open and enterprise levels.



From this discussion, we have put together a living document to provide a list of those OpenSocial containers and implementers that we are aware of, including links to their associated information pages or developer networks. You can view the list here.


We Need Your Help

Since this is a living document, the content will always be changing as new containers surface or if we have left something off of the list. For everyone working with different container implementations, we ask that you review the list and help update the content if something is incorrect or missing. We really need the help from container implementers, users and those of you with an extensive OpenSocial container knowledge base to help out.



Thank you everyone.



Jonathan LeBlanc
Jonathan LeBlanc (@jcleblanc)

Jonathan LeBlanc is a principal developer evangelist with X.commerce. Jonathan has been a member of the OpenSocial community for over three years and is the author of O'Reilly's "Programming Social Applications".
URL: http://blog.opensocial.org/2011/08/list-of-opensocial-containers.html

Friday, August 26, 2011

[Gd] Getting your app discovered in the Chrome Web Store with new promotional assets.

| More

Chromium Blog: Getting your app discovered in the Chrome Web Store with new promotional assets.

Yesterday we made a small change in Chrome Web Store’s app upload flow: when you upload new apps and extensions to the Chrome Web Store, or edit one of your existing items, you'll be prompted to provide us with new promotional image assets. We are asking you for these assets so that we can highlight your apps and extensions in a brand new store layout that our team is working on.





What's new:

  • (Required) You’ll need to provide us with a large rectangular image to identify your app, in addition to assets you already provide - your app icon and at least one screenshot.
  • (Optional) You can provide us with an even larger rectangular image format as well.


What's different

  • The screenshot dimensions have grown larger with a wider aspect ratio.
  • The (optional) marquee image dimensions have also grown larger.


What's the same

  • The specification and dimensions for the icon file


To make things easier, we only require screenshots in the new dimensions going forward -- we'll automatically scale them as needed to make them visible in the current store layout. You can read the details about the new requirements on our image guidelines page. If you have any questions on these changes, feel free to reach us at our discussion group.



Posted by Shannon Guymon, Product Manager
URL: http://blog.chromium.org/2011/08/getting-your-app-discovered-in-chrome.html

[Gd] Register now for New Game, the conference for HTML5 game developers

| More

Chromium Blog: Register now for New Game, the conference for HTML5 game developers

Cross posted at the Google Code blog



This post almost wasn’t written.



I’ve been a bit too busy playing and testing new browser-based games such as Monster Dash, Angry Birds, and the newly released SONAR. Bigger and better games are coming to the browser rapidly (and just wait until Native Client with 3D lands in Chrome), and it’s hard to keep up with the technology and scene. So what better way to bring everyone together to share stories and keep up to date than to hold a conference dedicated to HTML5 game development?



New Game, the first North American conference for HTML5 game developers, is now open for registration. You are invited to join hundreds of HTML5 game developers for two days of technical sessions and case studies from developers and publishers who brought their games to the open web platform. The event will take place November 1-2, 2011 at the beautiful Yerba Buena Center for the Arts in San Francisco, CA.



This year, New Game looks at what is possible in the browser today. Sessions will focus on the technologies that have elevated the browser-based gaming experience, such as WebGL, Canvas, and JavaScript performance techniques. In addition, the conference will feature sessions exploring and analyzing lessons-learned from recent HTML5 game launches.



New Game is honored to have Rich Hilleman, EA’s Chief Creative Officer, keynote the event. The schedule also includes sessions from Mozilla, Spil, Opera, Google, Bocoup, GameSalad, Moblyng, and others. After the first day, we’ll network with our colleagues and share high scores at the New Game party, open to all registered attendees.



For more information on New Game, including session and speaker details, please visit www.newgameconf.com and follow @newgameconf for the latest news. Google, the premier sponsor, and conference director Bocoup invite you to take advantage of early bird registration pricing, available for a limited time.



The future of gaming is in your browser, so I’ll see you at New Game! Now if you’ll excuse me, it’s time to get back to my SONAR tab.



Posted by Seth Ladd, Developer Advocate
URL: http://blog.chromium.org/2011/08/register-now-for-new-game-conference.html

[Gd] Google News now crawling with Googlebot

| More

Official Google Webmaster Central Blog: Google News now crawling with Googlebot

Webmaster Level: intermediate

(Cross-posted on the Google News Blog)

Google News recently updated our infrastructure to crawl with Google’s primary user-agent, Googlebot. What does this mean? Very little to most publishers. Any news organizations that wish to opt out of Google News can continue to do so: Google News will still respect the robots.txt entry for Googlebot-News, our former user-agent, if it is more restrictive than the robots.txt entry for Googlebot.

Our Help Center provides detailed guidance on using the robots exclusion protocol for Google News, and publishers can contact the Google News Support Team if they have any questions, but we wanted to first clarify the following:
  • Although you’ll now only see the Googlebot user-agent in your site’s logs, no need to worry: the appearance of Googlebot instead of Googlebot-News is independent of our inclusion policies. (You can always check whether your site is included in Google News by searching with the “site:” operator. For instance, enter “site:yournewssite.com” in the search field for Google News, and if you see results then we are currently indexing your news site.)

  • Your analytics tool will still be able to differentiate user traffic coming to your website from Google Search and traffic coming from Google News, so you should see no changes there. The main difference is that you will no longer see occasional automated visits to your site from the Googlebot-news crawler.

  • If you’re currently respecting our guidelines for Googlebot, you will not need to make any code changes to your site. Sites that have implemented subscriptions using a metered model or who have implemented First Click Free will not experience any changes. For sites which require registration, payment or login prior to reading any full article, Google News will only be able to crawl and index the title and snippet that you show all users who visit your page. Our Webmaster Guidelines provide additional information about “cloaking” (i.e., showing a bot a different version than what users experience). Learn more about Google News and subscription publishers in this Help Center article.

  • Rest assured, your Sitemap will still be crawled. This change does not affect how we crawl News Sitemaps. If you are a News publisher who hasn’t yet set up a News Sitemap and are interested in getting started, please follow this link.

  • For any publishers that wish to opt out of Google News and stay in Google Search, you can simply disallow Googlebot-news and allow Googlebot. For more information on how to do this, consult our Help Center.


As with any website, from time to time we need to make updates to our infrastructure. At the same time, we want to continue to provide as much control as possible to news web sites. We hope we have answered any questions you might have about this update. If you have additional questions, please check out our Help Center.

Posted by David Smydra, Google News Product Specialist
URL: http://googlewebmastercentral.blogspot.com/2011/08/google-news-now-crawling-with-googlebot.html

[Gd] Auth Tokens & Unlinked YouTube Accounts

| More

YouTube API Blog: Auth Tokens & Unlinked YouTube Accounts


Dedicated readers of this blog will remember our post from a few months back entitled “ClientLogin #FAIL”. In it, we laid out a number of scenarios in which attempts to use ClientLogin authentication would result in an error (and urged developers to move off of ClientLogin in general). The first failure scenario involved users whose YouTube account is not linked to a Google Account. Fortunately, the number of YouTube accounts in that unlinked state has decreased greatly over the past few months, so failures of that sort with ClientLogin are not as common now.

There’s another related failure scenario that we want to bring to everyone’s attention, this time involving both AuthSub and OAuth (collectively referred to here as “auth”) tokens. Starting on Wednesday, August 31, if your code attempts to use an auth token that was generated for an unlinked YouTube account, your request will fail with an HTTP 401 response code indicating that the token is invalid.

It’s important to note that what determines when the token is invalid is whether the YouTube account was linked at the time the initial auth token was generated. For example, if your code generated the auth token for an unlinked YouTube account on March 1, and then the user linked their YouTube and Google accounts on March 2, the auth token will still be considered invalid.

On March 31 we started to enforce the need to have a linked Google Account as part of the AuthSub and OAuth login flow, meaning that it was impossible to generate an auth token for an unlinked YouTube account after that date. So this change can only affect auth tokens generated before March 31 of this year.

While auth tokens normally don’t expire, users have the option of manually revoking them. If your code uses a revoked token, you’ll also get back an HTTP 401 response. If you’re using a client library, it will generate an exception to indicate the failure. It’s a best practice to make sure that your code handles invalid token errors by asking your user to go through the AuthSub or OAuth login flow again, storing the new token value and discarding the old one in the process.

If you have any questions about YouTube API authentication, please let us know in our developer forum.

Cheers,
—Jeff Posnick, YouTube API Team
URL: http://apiblog.youtube.com/2011/08/auth-tokens-unlinked-youtube-accounts.html

Thursday, August 25, 2011

[Gd] Register now for New Game, the conference for HTML5 game developers

| More

The official Google Code blog: Register now for New Game, the conference for HTML5 game developers


By Seth Ladd, Chrome Team

This post almost wasn’t written.

I’ve been a bit too busy playing and testing new browser-based games such as Monster Dash, Angry Birds, and the newly released SONAR. Bigger and better games are coming to the browser rapidly (and just wait until Native Client with 3D lands in Chrome), and it’s hard to keep up with the technology and scene. So what better way to bring everyone together to share stories and keep up to date than to hold a conference dedicated to HTML5 game development?

New Game, the first North American conference for HTML5 game developers, is now open for registration. You are invited to join hundreds of HTML5 game developers for two days of technical sessions and case studies from developers and publishers who brought their games to the open web platform. The event will take place November 1-2, 2011 at the beautiful Yerba Buena Center for the Arts in San Francisco, CA.

This year, New Game looks at what is possible in the browser today. Sessions will focus on the technologies that have elevated the browser-based gaming experience, such as WebGL, Canvas, and JavaScript performance techniques. In addition, the conference will feature sessions exploring and analyzing lessons-learned from recent HTML5 game launches.

New Game is honored to have Rich Hilleman, EA’s Chief Creative Officer, keynote the event. The schedule also includes sessions from Mozilla, Spil, Opera, Google, Bocoup, GameSalad, Moblyng, and others. After the first day, we’ll network with our colleagues and share high scores at the New Game party, open to all registered attendees.

For more information on New Game, including session and speaker details, please visit www.newgameconf.com and follow @newgameconf for the latest news. Google, the premier sponsor, and conference director Bocoup invite you to take advantage of early bird registration pricing, available for a limited time.

The future of gaming is in your browser, so I’ll see you at New Game! Now if you’ll excuse me, it’s time to get back to my SONAR tab.

Seth Ladd is a Developer Advocate with the Chrome Team. Seth focuses on browser-based games as a sneaky way to play games at work. He realizes his manager might be reading this, in which case he focuses on cyber-synergizing e-paradigms.

Posted by Scott Knaster, Editor
URL: http://googlecode.blogspot.com/2011/08/register-now-for-new-game-conference.html

[Gd] GWT Spotlight: Buxus (Chile)

| More

Google Web Toolkit Blog: GWT Spotlight: Buxus (Chile)

Next on our tour of companies building with GWT we head to Latin America, where there has been a lot of recent interest. Based in Santiago, Chile, Buxus is a new personal finance Web app with 20k lines of GWT code and counting.







Chief engineer Andres Arellano cites five major reasons for choosing GWT:



App-oriented


At Buxus, we are building a web based personal finance manager. This kind of application has traditionally been desktop based, but GWT allows us to bring the same responsiveness and ease of use to a web application. GWT RPC allows us to write both front-end and back-end code in the same language and even allows us to code Buxus as if we were coding a desktop application. It also integrates well with standard components like Hibernate.



Optimized code


Every web designer knows that the world of Web browsers is a jungle. With GWT, we can be sure that for every browser, optimal JS code will be generated. Also, advanced features like code splitting and aggressive caching using ClientBundle allow us to ensure that users will enjoy both fast loading times and a snappy UI.



Templates


UI designers don’t want to write Java code to test new UI concepts. Thanks to UiBinder, designers can work with tools that are familiar to them, and programmers can easily bind design templates to their Java code.



Open source


Our workflow is based mostly on open source tools, and GWT’s Apache licensing is definitely a winner for us. Even more important than eliminating license fees, diagnosing bugs in GWT is easier, and providing fixes or adding new features is possible, greatly reducing the risk of getting stuck in our development because of a framework issue. It also means that if the documentation is not clear enough on a certain point, we can dive into the code and figure out what we want.



Active community


Since GWT is a widely used framework, it comes with a whole ecosystem of side projects. We’re happy users of GWTP, GWTQuery, and HighCharts-gxt. Reducing code duplication and getting the work done faster--what else could we hope for?



To learn more about Buxus, visit http://buxus.cl or meet in person at the upcoming StarTechConf in Santiago, Chile, where Buxus will be presenting on their experience with GWT.



To learn about more companies using GWT, also see the Developer Tools Sandbox from this year's Google I/O.


URL: http://googlewebtoolkit.blogspot.com/2011/08/gwt-spotlight-buxus-chile.html

[Gd] Dev Channel Update

| More

Google Chrome Releases: Dev Channel Update


The Dev channel has been updated to 15.0.861.0 for Windows, Mac, Linux, and Chrome Frame.

All
  • Updated V8 3.5.7.0
  • Fixes a blank popup issue for extensions (Issue: 92669).
Windows
  • Fixed many of the common crashes.
Mac
  • Fixed many of the common crashes.
  • Workaround put in place for crashes in Chrome’s GPU process with some NVIDIA hardware (Issue: 89557).
Linux
  • Fixes being unable to close tabs by clicking the ‘x’ button on the tab (Issue: 92771).
Known Issues
  • Print Preview is not working. The fix is coming in the next update (Issue: 94121).
Full details about what changes are in this build are available in the SVN revision log.  Interested in switching to the Beta or Stable channels?  Find out how.  If you find a new issue, please let us know by filing a bug.

Dharani Govindan
Google Chrome
URL: http://googlechromereleases.blogspot.com/2011/08/dev-channel-update_24.html

[Gd] Beta Channel Update for Chromebooks

| More

Google Chrome Releases: Beta Channel Update for Chromebooks

The Beta Channel has been updated to 14.0.835.110 for Chromebooks: Acer AC700 (Platform version: 811.61), Samsung Series 5 (Platform version: 811.62) , and Cr-48 (Platform version: 811.61) .



Release highlights:
  • A number of stability issues along with other bugs.
  • Fixed regression bugs for new korean IME.
  • Updated String translations
If you find new issues, please let us know by visiting our help site or filing a bug. Interested in switching channels? Find out how. You can submit feedback using ‘Report an issue’ under the wrench menu.


Orit Mazor

Google Chrome
URL: http://googlechromereleases.blogspot.com/2011/08/beta-channel-update-for-chromebooks_23.html

[Gd] Making the most of improvements to the +1 button

| More

Official Google Webmaster Central Blog: Making the most of improvements to the +1 button

Webmaster level: All



For the past few months, you might have used +1 buttons to help visitors recommend your content on Google Search and on their Google Profiles. We’ve just announced a few changes that make +1 even more useful.



First, the +1 button now lets visitors share links to your pages on Google+. If someone wants to start a conversation about your content, it’s easy for them to do so. Second, you can use +Snippets to customize the name, image and description that appear when your content is shared. Finally, new inline annotations help increase engagement after users see a friend’s recommendation right on your page.



Here are a couple of tips to help you take full advantage of these improvements:



+Snippets

The +1 button opens up your site to a valuable new source of traffic with sharing on Google+. +Snippets let you put your best face forward by customizing exactly what appears when your content is shared.



For example, if you’re running a movie review site, you might want visitors to share posts containing the title, movie poster, and a brief synopsis:







You may already be using this markup to build rich annotations for your pages on Google Search. If not, marking up your pages is simple. Just add the correct schema.org attributes to the data already present on your pages. You’ll set a name, image, and description in your code:



<body itemscope itemtype="http://schema.org/Article">

<h1 itemprop="name">This is the article name</h1>

<img itemprop="image" src="thumbnail.jpg" />

<p itemprop="description">This is the description of the article.</p>

</body>
Example code containing each of the +Snippet attributes




For more details on alternate markup types, please see our technical documentation.



Inline annotations

Now, when a person visits a page that someone they know has +1’d, they can see a name and face reminding them to pay special attention to your content. Here’s how it looks:





Inline annotations let people see which of their friends +1’d your content




To add inline annotations, you need to update your +1 button code. Visit the configuration tool, select ‘inline’ from the ‘Annotation’ menu, and grab a new snippet of code.



Both sharing from +1 and inline annotations are rolling out fully over the next few days. To test these improvements right now, join our Platform Preview group.



Update later the same day, August 24, 2011: If you have any thoughts or feedback you'd like to share, continue the conversation on Google+.



Posted by Daniel Dulitz, Group Product Manager
URL: http://googlewebmastercentral.blogspot.com/2011/08/making-most-of-improvements-to-1-button.html

[Gd] Paid version of Google Translate API now open for business

| More

The official Google Code blog: Paid version of Google Translate API now open for business


By Jeff Chin, Product Manager

Back in May, we announced the deprecation of the free Translate API v1. Today, we’re introducing a paid version of the Google Translate API for businesses and commercial software developers. The Google Translate API provides a programmatic interface to access Google’s latest machine translation technology. This API supports translations between 50+ languages (more than 2500 language pairs) and is made possible by Google’s cloud infrastructure and large scale machine learning algorithms.

The paid version of Translate API removes many of the usage restrictions of previous versions and can now be used in commercial products. Translation costs $20 per million (M) characters of text translated (or approximately $0.05/page, assuming 500 words/page). You can sign up online via the APIs console for usage up to 50 M chars/month.

Developers who created projects in the API Console and started using the Translate API V2 prior to today will continue to receive a courtesy limit of 100K chars/day until December 1, 2011 or until they enable billing for their projects.

For academic users, we will continue to offer free access to the Google Translate Research API through our University Research Program for Google Translate. For website translations, we encourage you to use the Google Website Translator gadget which will continue to be free for use on all web sites. In addition, Google Translate, Translator Toolkit, the mobile translate apps for iPhone and Android, and translation features within Chrome, Gmail, etc. will continue to be available to all users at no charge.

Jeff Chin is the Product Manager for Google Translate. Whenever he travels, Jeff enjoys learning and trying to speak the local language, and finding good local restaurants and food to eat.

Posted by Scott Knaster, Editor


URL: http://googlecode.blogspot.com/2011/08/paid-version-of-google-translate-api.html

Wednesday, August 24, 2011

[Gd] Beta Channel Update

| More

Google Chrome Releases: Beta Channel Update

The Beta channel has been updated to 14.0.835.109 for Windows, Mac, Linux, and Chrome Frame.  This release contains fixes for a number of stability issues along with other bugs.  Full details about what changes are in this build are available in the SVN revision log.  Interested in switching to the Beta channel?  Find out how.  If you find a new issue, please let us know by filing a bug.

Jason Kersey
Google Chrome
URL: http://googlechromereleases.blogspot.com/2011/08/beta-channel-update_23.html

[Gd] The New CodeIgniter PHP Client Library

| More

YouTube API Blog: The New CodeIgniter PHP Client Library


While the YouTube Data API’s RESTful nature means that talking to YouTube is as easy as making an HTTP request, using a client library is a great way to improve your YouTube Data API productivity and write code using your preferred language’s native features. PHP developers using the Zend framework have had access to a client library for a while now, and that library continues to be a supported way of using the YouTube API. But if you’re a PHP developer using the CodeIgniter framework, you’ll be happy to hear that there’s now an alternative client library available just for you.

A third-party developer, Jim Saunders, has developed a YouTube Data API library specifically for the CodeIgniter framework. You download the library on GitHub, and read the article he’s written to find out how to get started with some sample code.

While Jim wrote and still maintains the library, please feel free to ask any questions about the YouTube API in general in our developer forum!

Cheers,
—Jeff Posnick, YouTube API Team
URL: http://apiblog.youtube.com/2011/08/new-codeigniter-php-client-library.html

Tuesday, August 23, 2011

[Gd] Horizontal View Swiping with ViewPager

| More

Android Developers Blog: Horizontal View Swiping with ViewPager

[This post is by Rich “geekyouup” Hyndman, inspired by the fact that life just got that little bit easier — Tim Bray]

Whether you have just started out in Android app development or are a veteran of the craft, it probably won’t be too long before you’ll need to implement horizontally scrolling sets of views. Many existing Android apps already use this UI pattern, such as the new Android Market, Google Docs and Google+. ViewPager standardizes the implementation.

ViewPager was released as part of the Compatibility Package revision 3 and works with Android 1.6 upwards. After following the instructions to obtain the package you can right-click on your Android project in Eclipse, choose ‘Android Tools’ and ‘Add Compatibility Library’, making the new classes available.

ViewPager is a ViewGroup and works in a similar manner to AdapterViews (like ListView and Gallery) so it shouldn’t feel too foreign. Note that if you use ViewPager in an xml layout, be sure to use the full class reference, e.g.

 <android.support.v4.view.ViewPager
android:layout_width="match_parent"
android:layout_height="match_parent"
… />

ViewPagers source their views from PagerAdapters which give you have full control over the reuse and recycling of the views. A PagerAdapter implementation called FragmentPagerAdapter is provided to facilitate the use of Fragments in a ViewPager; This is immensely powerful and as simple as implementing getCount() and getItem(). There is a sample called Fragment Pager Support provided in the Support Demos to illustrate this.

    public static class MyAdapter extends FragmentPagerAdapter {
public MyAdapter(FragmentManager fm) {
super(fm);
}

@Override
public int getCount() {
return NUM_ITEMS;
}

@Override
public Fragment getItem(int position) {
return ArrayListFragment.newInstance(position);
}
}

FragmentPagerAdapter will detach each fragment as you swipe through the list, but keep them in memory so they can simply be reattached when the user swipes back. If you have a larger number of Fragments, the FragmentStatePagerAdapter is worth considering as it will remove them, with the downside being they need to be rebuilt as the user swipes back to them. So, if you have fewer, more complex fragments the FragmentPagerAdapter makes sense, but consider FragmentStatePagerAdapter for larger sets.

On the more simplistic side I recently wrote a ViewPager/PagerAdapter example that serves up simple TextViews. One thing to note is that if you are implementing your own PagerAdapter it is up to you, the developer, to add and remove your views to and from the ViewGroup. To facilitate this the ViewPager is passed into the PagerAdapter methods instantiateItem() and destroyItem().

    @Override
public Object instantiateItem(View collection, int position) {
View v = layoutInflater.inflate(...);
...
((ViewPager) collection).addView(v,0);
return tv;
}

@Override
public void destroyItem(View collection, int position, Object view) {
((ViewPager) collection).removeView((TextView) view);
}

The source code for ViewPager is also included and available in <android-sdk>/extras/android/compatibility/v4/src. It is worth checking as you can generate the reference documentation from it using Javadoc. In the reference docs / source you’ll find other useful methods, for example setOnPageChangeListener(), which enables your application to track which View is currently visible.

If you are launching an app onto Android Market that uses ViewPager then please ping me on Google+ or Twitter, I’d love to see how widely it is being used and the innovative scenarios in which it appears.


URL: http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html

[Gd] Help us improve Google Search

| More

Official Google Webmaster Central Blog: Help us improve Google Search

Webmaster level: Advanced



Yes, we're looking for help improving Google search—but this time we're not asking you to submit more spam reports. Although we still appreciate receiving quality spam reports, today we've got a different opportunity for you to improve Google Search: how about YOU join our team and do the webspam fighting yourself?



Interested? Here's what we're looking for: open-minded academic graduates willing to work in a multinational environment in our Dublin office. Looking at a site's source code should not scare you. You should be excited about search engines and the Internet. It’s also essential that you share our aversion to webspam and the drive to make high-quality content accessible. PlayStation or foosball skills are a plus.





This is an actual work environment photo taken at the Dublin Google office.





If you'd like to know more about the positions available, here's the full list of requirements and responsibilities. Great candidates should be able to email the recruiter directly.



Posted by , Search Quality
URL: http://googlewebmastercentral.blogspot.com/2011/08/help-us-improve-google-search.html

[Gd] Stable Channel Update for Chromebooks

| More

Google Chrome Releases: Stable Channel Update for Chromebooks

The Google Chrome team is happy to announce the release of Chrome 13.0.782.216 (Platform version: 587.126) on the Stable Channel for Chromebooks (Acer AC700, Samsung Series 5, and Cr-48).



Highlights:
  • Several Chrome security fixes. See blog post for details.
If you find new issues, please let us know by visiting our help site or filing a bug. You can also submit feedback using "Report an issue" under the wrench icon.



Danielle Drew
Google Chrome
URL: http://googlechromereleases.blogspot.com/2011/08/stable-channel-update-for-chromebooks.html

[Gd] Stable Channel Update

| More

Google Chrome Releases: Stable Channel Update


The Chrome Stable channel has been updated to 13.0.782.215 for all platforms.  This release contains the following security fixes.


Security fixes and rewards:
Please see the Chromium security page for more detail. Note that the referenced bugs may be kept private until a majority of our users are up to date with the fix.

  • [$1000] [Windows only] [72492] Medium CVE-2011-2822: URL parsing confusion on the command line. Credit to Vladimir Vorontsov, ONsec company.
  • [82552] High CVE-2011-2823: Use-after-free in line box handling. Credit to Google Chrome Security Team (SkyLined) and independent later discovery by miaubiz.
  • [$1000] [88216] High CVE-2011-2824: Use-after-free with counter nodes. Credit to miaubiz.
  • [88670] High CVE-2011-2825: Use-after-free with custom fonts. Credit to wushi of team509 reported through ZDI (ZDI-CAN-1283), plus indepdendent later discovery by miaubiz.
  • [$1000] [89402] High CVE-2011-2821: Double free in libxml XPath handling. Credit to Yang Dingning from NCNIPC, Graduate University of Chinese Academy of Sciences.
  • [$1000] [87453] High CVE-2011-2826: Cross-origin violation with empty origins. Credit to Sergey Glazunov.
  • [$1337] [Windows only] [89836] Critical CVE-2011-2806: Memory corruption in vertex handing. Credit to Michael Braithwaite of Turbulenz Limited.
  • [$1000] [90668] High CVE-2011-2827: Use-after-free in text searching. Credit to miaubiz.
  • [91517] High CVE-2011-2828: Out-of-bounds write in v8. Credit to Google Chrome Security Team (SkyLined).
  • [$1500] [32-bit only] [91598] High CVE-2011-2829: Integer overflow in uniform arrays. Credit to Sergey Glazunov.
  • [$1000] [Linux only] [91665] High CVE-2011-2839: Buggy memset() in PDF. Credit to Aki Helin of OUSPG.
The full list of changes is available in the SVN revision log.  Interested in switching to another?  Find out how.  If you find a new issue, please let us know by filing a bug.

Anthony Laforge
Google Chrome

URL: http://googlechromereleases.blogspot.com/2011/08/stable-channel-update_22.html