We have a new community site. It is based on Wordpress 3.0.1 and Budypress. What are the features:

1. We have community. Anyone can:
- register;
- share information to the website activity wall;
- write to his/her own blog;
- join groups by topic (SUMO, Thunderbird, Firefox, L10n, Development and others);
- join and create events;
- read the information from other members;
- use the usable control panel to manage an account and to connect with other mozillians.

2. We have a cute and simple design:

3. We are ready to extend with web 2.0 services like twitter and other (no Facebook sorry);
4. The platform (Wordpress and Budypress) is very easy to install and run a community website. If you want we can help you to create a Mozilla community website. We will do it together, just send us a note (and a beer).

The champagne will be open on your next community meeting. We have some improvements in our roadmap.


Help needed

We are searching for a good SUMO forum for our community. Any suggestions?

Idea
It will be very cool if we have a global Mozilla network, not only hundreds of community sites. Something like a profile in a server with OpenID or Oauth support. I would like to use our website like an interface to this service only and to be able to connect with a lot of mozillians, not only registered in my country.

1
2
3
4
5
function shortURL($long)
{
 $short=file_get_contents("http://is.gd/api.php?longurl=".$long);
 return $short;
}

Usage:

1
2
$short = shortURL("http://veryveryveryverylongurl.tld/something/verylong.php");
echo $short;

I know, I know. This is a blog about Open Technologies and Open Web and I am writing about Facebook. Shame on me :)
It’s a little bit tricky and I’ve lost 3 hours to resolve it and that’s the reason to post it here

Here is the solution.:

1. If you are reading this, probably you have Application setup-ed already in Facebook;
2. Add your application to your Page;
3. Run this link in your Browser. Please replace ~URL~ with your connect URL (Facebook Application dialog) and ~APPID~ with your application ID

https://graph.facebook.com/oauth/authorize?type=user_agent&client_id=~APPID~&redirect_uri=~URL~&scope=publish_stream,offline_access,manage_pages

4. This URL will return to you a URL parameter access_token.
5. Save the token somewhere;
6. Load This URL. Replace ~TOKEN~ with the token received from Facebook at point 4.;

https://graph.facebook.com/me/accounts?access_token=~TOKEN~

7. As a result you will get the json with all your pages and all access tokens. Save them somewhere;

{
         "name": "Electronic Frontier Bulgaria",
         "category": "Websites",
         "id": "29469045921",
         "access_token": "some secret string."
      },

8. Use FB js SDK to update your page. Replace ~PAGE_AUTH~ with access_token from the previous point. (some secret string)

var wallPost = {
    access_token: "~PAGE_AUTH~",
    message: 'Talkweb.eu is the best :)'
};
 
FB.api('/me/feed', 'post', wallPost, function(response) {
    if (!response || response.error) {
        alert('Error occurred');
    } else {
        alert('Success!');
    }
});

9. Check the page to see the result;
10. Bye me a beer or hire me :)

If you have any questions, please let me know!

In my last project I have to make to work together a vTiger instalation, a Wordpress form and an Imap account. The best decision was to create 2 SOAP services to handle 2 requests:

Show me the code
1. Setup the webforms.php. The good thing is – you can use this SOAP service to fill ALL of your custom fields:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require_once("config.php");
require_once('include/logging.php');
require_once('include/nusoap/nusoap.php');
 
$NAMESPACE = 'http://www.vtiger.com/vtigercrm/';
$server = new soap_server;
 
// declare all of your data here. Including all of your custom fields.
$server->configureWSDL('vtigersoap');
$server->register(
	'create_newlead',
	array(	'firstname'=>'xsd:string',
                'lastname'=>'xsd:string',
                'email'=>'xsd:string',
                'phone'=>'xsd:string',              
                'lp'=>'xsd:string',
                'tr'=>'xsd:string',
                'tp'=>'xsd:string',
                'ch'=>'xsd:string',
                'assigned_user_id'=>'xsd:string',
                'cs'=>'xsd:string',
                'pt'=>'xsd:string',
                'occ'=>'xsd:string',
                'pv'=>'xsd:string',
                'la'=>'xsd:string',
                'terms'=>'xsd:string',
                'dr'=>'xsd:string',
                'ratealert' => 'xsd:string'
	     ),
	array('return'=>'xsd:string'),
	$NAMESPACE);

1.1 Write a simple function to handle the requests and to save your vTiger LEAD.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// you have to give as arguments the same fields you declared previously
function create_newlead($firstname, $lastname, $email, $phone, $lp, $tr, $tp, $ch, $assigned_user_id, $cs, $pt, $occ, $pv, $la, $terms, $dr,$ratealert)
{
 
	require_once("modules/Leads/Leads.php");
	$focus = new Leads();
	$focus->column_fields['firstname'] = $firstname;
	$focus->column_fields['lastname'] = $lastname;
	$focus->column_fields['email'] = $email;
	$focus->column_fields['phone'] = $phone;
 
//here are my custom fields
	$focus->column_fields['cf_541'] = $lp;
	$focus->column_fields['cf_542'] = $cs;
	$focus->column_fields['cf_544'] = $occ;
	$focus->column_fields['cf_545'] = $pv;
	$focus->column_fields['assigned_user_id'] = 1; //admin
	$focus->column_fields['cf_546'] = $pt;
	$focus->column_fields['cf_547'] = $terms;
	$focus->column_fields['cf_548'] = $la;
	$focus->column_fields['cf_549'] = $tr;
	$focus->column_fields['cf_550'] = $tp;
	$focus->column_fields['cf_551'] = $ch;
        $focus->column_fields['cf_552'] = $dr;
 
	$focus->save("Leads");
 
	if($focus->id != '')
		$msg = "OK";
	else
		$msg = "Error";
 
	return $msg;
}

2. Upload the code to ’soap’ folder of your vTiger app.
3. Call the method from somwhere.

Important
If you have any questions or want to hire me for your Wordpress project, please see the information in the right sidebar.

I am looking at Twilio API right now for a project and I am surprised how easy is to handle voice and SMS messages. Here is an example, written by me:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
//get this from twillio website
require "twilio.php";
 
class Twillio_SMS
{
	var $ApiVersion;
	var $AccountSid;
	var $AuthToken;
	var $smsServer;
 
  function __construct()
{
	$this->ApiVersion = "2008-08-01";
	$this->AccountSid = "Axxxxxxxxxxxxxxxxxxxx"; //get your own after trial registration on Twilio.com
	$this->AuthToken = "axxxxxxxxxxxxxxxxxxxxx";
	$this->smsServer = new TwilioRestClient($this->AccountSid, $this->AuthToken);
}
 
function sendSMS($to, $from, $whattosend)
{
 
	$response = $this->smsServer->request("/$this->ApiVersion/Accounts/$this->AccountSid/SMS/Messages", 
			"POST", array(
			"To" => $to,
			"From" => $from,
			"Body" => $whattosend
		));
		if($response->IsError)
			echo "Error: {$response->ErrorMessage}";
		else
			echo "Done";
 
 
 
}
 
 
function __destruct()
{
 
	unset($this->ApiVersion);
	unset($this->AccountSid);
	unset($this->AuthToken); 
 
}
 
}
 
 
$s= new Twillio_SMS;
$s->sendSMS('4155992671','4155992671','this is a test');
 
?>

GitHub
If you are interested in this topic, or if you have some ideas, please join me at my test repo @ Github

#moz10

Wilhelmus van Nassouwe
Ben ik van Duitsen bloed,
Den vaderland getrouwe
Blijf ik tot in den dood.
Een Prinse van Oranje
Ben ik, vrij onverveerd,
Den Koning van Hispanje
Heb ik altijd geлerd.

hup
Hup Holland Hup!
Hup Holland hup
Laat de leeuw niet in zijn hempie staan
Hup Holland hup
Trek het beestje geen pantoffels aan
Hup Holland hup
Laat je uit het veld niet slaan
Want de leeuw op voetbalschoenen
Durft de hele wereld aan.

What is Cacert?

CAcert.org is a community-driven certificate authority that issues free public key certificates to the public. CAcert has nearly 150,000 verified users and has issued over 548,000 certificates as of January 2010

These certificates can be used to sign and encrypt email, authenticate and authorize users connecting to websites and secure data transmission over the Internet. Any application that supports the Secure Socket Layer (SSL) can make use of certificates signed by CAcert, as can any application that uses X.509 certificates, e.g. for encryption or code signing and document signatures.

How

To create higher-trust certificates, users can participate in a web of trust system whereby users physically meet and verify each other’s identities. CAcert maintains the number of assurance points for each account. Assurance points can be gained through various means, primarily by having one’s identity physically verified by users classified as “Assurers”.

Party

If you want to join this web of trust, bring your passport and one more id, join the website, print THIS form and come and let’s Rock.

Mozilla and Cacert

What’s up with Mozilla and Cacert? See this bug in Bugzilla.

I just finished my “share2″ WRT (Web Runtime Toolkit) widget. It allows me to post quick messages to my WordpPress blog or to any blog that uses MetaWeblog API.

Here are some key parts from the script:

Ajax function that sends the requests and gets the result

function ajExec(url, param, callback, isXML) {
    var req = new XMLHttpRequest();
    req.onreadystatechange = function() {
        if (req.readyState == 4 &amp;&amp; req.status == 200) {
            if(!isXML &amp;&amp; req.responseText != null)
                callback(req.responseText);
            else if(isXML &amp;&amp; req.responseXML != null)
                callback(req.responseXML);
            else
                callback(null);
        } else if (req.readyState == 4 &amp;&amp; req.status != 200) {
 
            var err = "Error: "+req.status;
            alert(err);
            callback(err);
        }
    }
        req.open("POST", url, true);
        req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        req.send(param);
 
}

Let’s click on Publish button

function sendButtonClicked(event) {
     saved_username = widget.preferenceForKey("username");
	 saved_pass = widget.preferenceForKey("pass_s");
	 saved_tags = widget.preferenceForKey("tag");
	 saved_server = widget.preferenceForKey("server");
	 pub = blogField.getText();
 
	ajExec(saved_server,'<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>metaWeblog.newPost</methodName><params><param><value><string>MyBlog</string></value></param><param><value><string>'+saved_username+'</string></value></param><param><value><string>'+saved_pass+'</string></value></param><value><struct><member><param><name>title</name><value><string>This is a post</string></value></param></member><member><param><name>description</name><value><string>'+pub+'</string></value></param></member></struct></value><param><value><boolean>1</boolean></value></param></params></methodCall>',showAnswer,1);
}
}

The milestone was to find correct XML structure for the query, because the examples from Wordpress website and other websites are all wrong. Please see the XML and it’s structure

Download this script

You can download the application and see how works from here..

Run it

The logo:

The Settings screen:

HOW?:
If you want to run it into your Symbian device – rename it to share2.wgz and upload it to your device. The Symbian will do the rest. Tested on Nokia N95.

If you need a lot of browsers, like me, to test some web stuff, this info can be useful for you.

Safari on Fedora

  • 1. You need Wine (yum install wine*)
  • 2. Download Safari from here (choose – Safari 5.0 for Windows XP, Vista or 7)
  • 3. Click on exe file to install.
  • 4. Done

IE on Fedora

I know, yes, I know. What a hell I need IE on Linux. Some of my clients still using this ‘most used browser’…

yum -y install wine*
yum -y install cabextract

Get the package and install it. But before that, read the legal stuff from here.  Yes, IE is FREE, but you still NEED a valid license for Windows to use it. WTF?!?

wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux

top