Kubuntu Feedback
Richard JOHNSON
nixternal at ubuntu.com
Fri Jun 19 07:24:49 BST 2009
Just put up what I would consider Alpha 2. Here is what changed:
Created a PHP script that will run on a server. This script will be
contacted by the plasmoid which leverages lsb_release to figure out if it
is a stable or development release.
lsb_release -d
If it is a stable release, output will look like the following:
Description: Ubuntu 9.04
If it is a development release, output will look like the following:
Description: Ubuntu karmic (development branch)
So, if it is a stable release, then the plasmoid would send a url similar
to the following:
http://static.nixternal.com/feedback.php?ver=9.04
If it is a development release, then the url will look like the following:
http://static.nixternal.com/feedback.php?ver=karmic
Once the PHP script on the server gets that, it will check to see if $ver
== a string or a float. If it is a float, then we know it is a stable
release, if it is a string then we know it is a development release.
The PHP script will then do different things depending on $ver.
First, the PHP script will parse the page that lists the public surveys. In
the current development I am using http://static.nixternal.com/feedback/.
It will go through and match regular expressions providing me 2 things. The
first thing is what is referred to as the SID. This is the ID that is used
at the end of the URL for a particular survey. If there are more than one
survey, then $sid will be an array. The second is the name of the survey.
With this, we need to make sure that we use the same naming scheme all of
the time, no variations unless we want to hack on the PHP script and what
not. So I have named 2 public surveys right now:
* Kubuntu Karmic Alpha 2
* Kubuntu Karmic Alpha 3
If $ver is a development release, then what happens is it checks the end of
the string array $survey to see if it contains some parsing I did from
http://cdimage.ubuntu.com/kubuntu/releases/$ver.
So, without confusing you all or myself any further, that's what it does.
The PHP script redirects the plasmoid to the correct survey. Woohoo!
So, if you want to look at the code or test out the plasmoid, head on over
to http://bazaar.launchpad.net/~nixternal/+junk/kubuntu-qa-feedback/files.
If you are a PHP hacker, do not cringe at my PHP code. I am a straight PHP
noobie and proud to be, as I absolute hate that language, but at the same
time I love it :)
Feedback and ideas is welcome!
--
Name| Richard JOHNSON
Title| Developer
WWW| http://www.ubuntu.com
Email| nixternal at ubuntu.com
GnuPG| 3578 0981 A21D D662 2A96 7623 F4C1 838C D8C4 4738
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/kubuntu-devel/attachments/20090619/541c0c38/attachment.pgp
More information about the kubuntu-devel
mailing list