Articles Tagged 'Ajax'


Very short snippet: how to identify the Ajax calls in PHP

When building an Ajax Gateway, ie a file that is invoked by the object XmlHTTPRequest JavaScript, you can inadvertently create a tunnel to unwanted intrusion. Being in fact a file like the others, located on our server is reachable from the address bar of your browser.

Continued ...

Shadowbox 3.0 beta

It was released right now (thanks to alert the author Michael JI Jackson ) release 3.0 beta Shadowbox.js . In addition to the new site design here is the most important changes prior to this release:

Continued ...

Overloading

Overloading is a very useful feature of some programming languages ​​to objects. However tuti OO languages ​​do not support it, and some of the "implementing" or limited to or different. In general, functions or methods, overloading allows you to create two or more functions / methods that have the same name but accept different parameters, for example:

Continued ...

Very short trick: proxy RSS with SimplePie

If you use Flash or Ajax to read RSS feeds from other domains, you need to equip yourself with a proxy (tunneling) because of the protections imposed by both technologies (see tunneling and proxy servers for Ajax and beyond ). If your site or blog is already SimplePie , you can write a simple proxy like this:

Continued ...

WordPress: step by step how to create their own login

In this tutorial we will see how to create a personal login procedure, also using Ajax functionality via jQuery . ). There are several ways to customize the login of WordPress, for example by the use of hooks and filters ( add_action() , add_filter() ). Here we will use a lower-level procedure, although there still interfaces to the kernel of WordPress. In addition we will attempt to validate a user through the dupla email / password.

Why create their own login?

  • In some contexts can return uitle have maximum control on the login page, to propose a custom layout to our registered users. You can also enhance the page with useful information, a logo from the classic "Lost Password?"
  • To allow access via the email (as in the example discussed here) instead of user_login standard WordPress
  • To be able to enter a login panel in the sidebar of our blog
  • And finally, to have a skeleton - and an idea - a great Plugin : D

Environment

In our example / tutorial we will work on the root of a folder inside of WordPress mylogin . . We create two php files within this folder: index.php and logon.php . The first will contain our login interface with all functions JavaScript / jQuery we need. The second file, logon.php , will contain the code for user validation. e una cartella images . Then create a folder css and within this file layout.css and folder images . Inside the images folder insert a classic Ajax loader: create it online AjaxLoad.info . At the end you should have:

  • mylogin
  • index.php
  • logon.php
  • Feed
  • Layout.css
  • images
  • ajax-loader.gif

Continued ...

Google AJAX Language API tutorial on the operation

I respond with this post, at the request of Andrea on how to insert the translator of Google in your web. There are several ways to take advantage of machine translation services available from Google and beyond. We can use plugins written by others, a simple JavaScript script from Google itself or mixed learning to use the API, ie a set of callable functions - as we shall see - in various ways.

Plugins

I will not dwell on this solution, as I think is not really relevant to the request of Andrew , if I understood well. Furthermore, it is essentially a solution valid only for the blog and not to use custom and generic. I can only point out to users by WordPress , Global Translator , perhaps the most simple, practical and popular plugins of this type.

Pre script by Google

The easiest way to translate your website or your blog is to add a simple JavaScript script provided by Google. Just go to the site translate.google.com tab and click on 'Tools'. From this page you can preset the translation functions or leave the default. The script is very simple:

1

and as a result we obtain:

Google Translate

Continued ...

2.0 Snipplr code: fragments (Snippe) of useful code

Snipplr It was a long time that I wanted to report this useful service dedicated to programming world. Snipplr (code 2.0) is a true aggregator or repository of code snippets useful. You can register for free and send portions of their code and, above all, enjoy the many Snippe already on site. I have treated many languages ​​(Actionscript, ASP, C #, MatLab, PHP, Rails, SVN, etc ...), all well-sorted and cataloged. You can also install a handy WordPress plugin can display on our blog a Snippe-code through its unique id.

Continued ...

The Free Adobe AIR for JavaScript Pocketguide

image AIR written directly by the team, this guide is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License In short it is freely accessible! Despite its simplicity, it contains a lot of interesting (and correct, as is the team to write AIR) for the development of AIR applications with JavaScript, HTML and CSS. Thanks to Ajaxian, you can download the text in PDF format, clicking here , or - if you prefer - you can order it on Amazon . At Adobe Labs, you find other useful information.

Continued ...

Shadowbox assetURL: set the image path

When Shadowbox opens his window to show content (images, iframes, Movie, etc ...), displays, waiting, an animated gif that comes in the package. If the page is using Shadowbox is at the same level of the images folder, everything works fine. By default, in fact, look for the animated gif below Shadowbox images / loading.gif - or images / loading-light.gif if you chose light styles (shadowbox-light.css). Otherwise, there is a risk and often not even accorgesene, if we are in a different tree, it generates a nice code 404 - page not girder, in our case file not found!

To resolve this problem sufficient to initialize Shadowbox with an appropriate parameter which indicates the absolute path of your images folder: undolog.com of, for example, I placed the animated gif of loading directly into the images folder present in root (like a billion others sites :) . To make this folder accessible to Shadowbox, regardless of the path, I put semplicemenete:

1
2
/ / Init assetURL shadowbox with parameter
assetURL : 'http://www.undolog.com/' } ) ; Shadowbox. Init ({assetURL: 'http://www.undolog.com/'});

Continued ...

All Lightbox clones in a dynamic array

Planetozh has created a beautiful scenery of the dynamic tool that can list all of the Javascript libraries like Lightbox.

image

image Using a panel (see picture on left) with a series of "ticks" (checkbox), which indicate the various features of the libraries, you can run a filter, obtaining the list of one or more libraries that do the job. We hope that the author maintains updated this great page, very useful in extricating one of the numerous and powerful libraries of this type.

Continued ...



Stop SOPA