some words from technology briefcase

Author Archive

WordPress: How to block Edit single post

by on apr.10, 2012, under are you curious?, Developers

Wordpress Hack!Hi guys,
Have you ever needed to Block the editing of a single post (or a group of they) for a single role or a single user?
I think that this little hack can help you…

You need to intercept this action: admin_head with the common function add_action and then write your redirect code like in this sample:

add_action(‘admin_head’, ‘BlockSomePost’,10 );

function BlockSomePost() {
	//Assuming that blockPostArray is and array that contains your locked post ID...
	global $blockPostArray;

    //get The Current user
	$cUser = wp_get_current_user();
	//Check the User Role:
	//assume that blockrole is your blocked Role...
	if(array_search('blockrole',$cUser->roles)!==FALSE) {

		if($_GET) {
			if(isset($_GET["post"]) && $_GET["action"]=='edit') {
				$currentPost = $_GET["post"];
				if(array_search($currentPost,$blockPostArray)!==FALSE) {
					//If the current edit post in into the array redirect to your wordpress homepage!
					header( 'Location: ' . get_settings('siteurl') );
					exit();
				}
			}
		}
	}
}

I hope that you appreciate this snippet…that is only a starting point to do something more complex, for example you can use the User_Meta fields to attach some post to the user or a database table to store the list of the blocked posts!!

Have a nice coding day!

Leave a Comment :, , , , , , , more...

Apple: Steve Jobs resigns as CEO

by on ago.25, 2011, under are you curious?, General

As you know Steve Jobs yesterday resigned as CEO of Apple..and now?

He, the amazing mind behind  ”new era devices ” such the iPhone and the Ipad, he that turned Apple  into one of the world’s most powerful and innovative companies, now maybe for unspecified medical condition leave the leading of Apple..and now? Now that the war has just bugin? What will happen?

Now that Google has bought Motorola Mobile and now that Nokia will use Wp7 in its mobile devices?Now that Apple has to show to the whole World his Lion teeth…The only thing can we can expect is a period in whitch the shares will be strange and they do some up and down…but now we just have to wait for the next move of Tim Cook (the new CEO of Apple)  and wait for recovery of the shares and the launch of the new devices…

What do you think about these facts?
Add comment or write to myself to increase the prediction of the new Apple era!

Leave a Comment :, , , , more...

Android Honeycomb Is Coming (3.0)

by on feb.07, 2011, under Android, are you curious?

Google officially announced Android 3.0, known as Honeycomb (Google tends to name their Android builds after sweet, delicious desserts).

this firmware born directly for combating the Apple iPad head-on, more and more Honeycomb-powered tablets are being leaked or revealed. (continue reading…)

1 Comment :, , , , more...

Mono for Android

by on gen.07, 2011, under Android, C#

Nice news for .net developer that want develop on Android…
The mono android frameworks reach the 2.0 edition in which some “strange” bugs are solved

http://monodroid.net/

Leave a Comment :, , , more...

Android 2.3 is out!

by on dic.07, 2010, under Android, Developers

Finally…only for developers, the Android 2.3 platform is available as a downloadable component for the Android SDK. The downloadable platform includes an Android library and system image, as well as a set of emulator skins and more. The downloadable platform includes no external libraries.

there are many new feature but the most interesting one (i think) is thise:

Near Field Communications (NFC)

Android 2.3 includes an NFC stack and framework API that lets developers read NDEF tags that are discovered as a user touches an NFC-enabled device to tag elements embedded in stickers, smart posters, and even other devices.

The platform provides the underlying NFC services that work with the device hardware to discover tags when they come into range. On discovering a tag, the platform notifies applications by broadcasting an Intent, appending the tag’s NDEF messages to the Intent as extras. Applications can create Intent filters to recognize and handle targeted tags and messages. For example, after receiving a tag by Intent, applications extract the NDEF messages, store them, alert the user, or handle them in other ways.

The NFC API is available in the android.nfc package. The key classes are:

  • NfcAdapter, which represents the NFC hardware on the device.
  • NdefMessage, which represents an NDEF data message, the standard format in which “records” carrying data are transmitted between devices and tags. Applications can receive these messages from ACTION_TAG_DISCOVERED Intents.
  • NdefRecord, delivered in an NdefMessage, which describes the type of data being shared and carries the data itself.

NFC communication relies on wireless technology in the device hardware, so support for the platform’s NFC features on specific devices is determined by their manufacturers. To determine the NFC support on the current device, applications can call isEnabled() to query theNfcAdapter. The NFC API is always present, however, regardless of underlying hardware support.

To use the NFC API, applications must request permission from the user by declaring <uses-permission android:name="android.permission.NFC"> in their manifest files.

Additionally, developers can request filtering on Android Market, such that their applications are not discoverable to users whose devices do not support NFC. To request filtering, add <uses-feature android:name="android.hardware.nfc" android:required="true">to the application’s manifest.

To look at a sample application that uses the NFC API, see NFCDemo.

for the full feature list take a look here: http://developer.android.com/sdk/android-2.3.html

1 Comment :, , , , more...

Android fly to London (DroidCon 2010)

by on ago.29, 2010, under are you curious?, gtug

DroidCon London 2010This year at October in London will be the first barcamp around android technologies and developing!
A two day barcamp and conference exploring all aspects of developing for Android mobile devices.
In these two days we will speak about Android consolidated technologies and about the new devices such eReader, Tablet and more regarding the new developing tools for Android like Ruby and more…
Follow us to learn more or visit the official website at http://www.droidcon.co.uk/

Leave a Comment :, , , , , more...

Finally Holidays…

by on lug.30, 2010, under are you curious?

Dear all,
we are happy to announciate that between  7th of August and  23th of August (included) the FLT.lab’s staff is in summer time!

If you have any trouble please write..we wiil reply to you as soon as possible!

Good Holidays

Leave a Comment :, , more...

AccordViaggi.com is now online!

by on lug.04, 2010, under are you curious?

Finally,
we are happy to show the last web site based on joack management system!
Speaking about the website, this is a marketing website to show fantastic places that there are in Sicily. There are many section and soon we will add a little Ecommerce.
But if you want to complete the overview you also need to go and see: www.accordviaggi.com.
Otherwise, speaking of the render engine, this is the last implementation of the joack management system,

(continue reading…)

Leave a Comment :, , , , , , , more...

Microsoft vs Google Phase 2

by on mag.18, 2010, under are you curious?

After Bing search engine, microsoft tells about Wave4 the new hotmail service with a lot a new features… watch this introducing video
http://www.youtube.com/watch?v=NHVQD6Sddtg”>

Leave a Comment :, , , , more...

Palermo’s Event: Google App Engine with Ikai Lan

by on mag.06, 2010, under gtug

This year on May 10 in Palermo, at the Institute “Vittorio Emanuele III”, for the first time in Palermo there will Ikai Lan (Google Advocate), who will talk about Google App Engine. Who is Ian ikai?Read his profile here.

This event is powered by GTUG Palermo in partnership with “Sviluppo Italia Sicilia“.
We thank the Incubator of Ideas of the “Vittorio Emanuele III” for logistical and organizational support.

Register at the event and read the day’s program!

Leave a Comment :, , , , , more...

dizi izle dizi izle dizi izle dizi izle dizi izle dizi izle dizi izle çizgi film izle bakugan izle dizi izle kayu izle caillou izle ben 10 izle ben ten izle