Monthly Archiv: April, 2009

Large Data One Query

<?php
// include the database
include ‘db.php’;
$query = ‘INSERT INTO `table_name` (`ownerID`, `favorites`) VALUES ‘;
// This foreach we will pretend that we passed an array of
// checkboxs,

Watermark An Image

<?php
function watermark($file, $watermark, $pos = null, $x = 0, $y = 0){
$details = getimagesize($file);
$wDetails = getimagesize($watermark);
if(!is_null($pos)){
switch($pos){
case TOP

Get Inserted ID Number

<?php
// Insert into database
mysql_query("INSERT INTO my_table (`column1`, `column2`) VALUES (‘one’, ‘two’)");
// Next Get what the auto incremented number was that was inserted
$id = mysql_inser

HTML/XHTML and XML Writer

Package:
HTML/XHTML and XML Writer
Summary:
Generate HTML and XML programatically
Groups:
Databases, HTML
Author:
Fatih Kadir AKIN
Description:
This class can be used to Generate HTML and XML documents programatically.

It can add arbitrary text and tags to a document. The tags may have optional attributes.

The class can also provide support to generate common HTML for form inputs with data retrieve from submitted inputs or database queries, listing pagination links, list menus, etc..

The class generates XML or XHTML compliant HTML.


simple BBCode

Package:
simple BBCode
Summary:
Convert BBCode formatted text to HTML
Groups:
HTML, Text processing
Author:
Piotr
Description:
This class can be used convert BBCode formatted text to HTML.

It can find and replace BBcode tags and replace it by HTML.

The class provides support to some predefined tags but also allows adding new custom tags that can be either single tags or open and close tags that delimit sections.


[Free] New Free Web Host with Domain Hosting and No Advertisements

In the wake of the closure of the venerable free web host Geocities, I've added another free web host, DSD Host, to the Free Web Hosts with No Advertisements page. This one not only has no ads, but it also lets you host your own domain name, a crucial thing if you want to set up websites. Other features include PHP, a Cpanel control panel, the Fantastico script installer (to speed up the installation of stuff like WordPress and other scripts), and so on. Read more about what the package offers or just sign up.

(Note: if you don't know why it's crucual to have your own domain name, read the article Is it Possible to Create a Website Without Buying a Domain Name? The High Price of "Free".)

Y!Weather

Package:
Y!Weather
Summary:
Retrieve weather forecasts from Yahoo
Groups:
Geography, PHP 5, Web services
Author:
Kevin
Description:
This class can be used to retrieve weather forecasts from Yahoo.

It accesses Yahoo Weather Web services API server and retrieves a XML document with the weather forecast for a given location.

The class parses the forecast definition and extracts the details into class variable values.


DBConnect by Easanka

Package:
DBConnect by Easanka
Summary:
MySQL database access wrapper
Groups:
Databases, PHP 5
Author:
asasnka silva
Description:
This class implements a MySQL database access wrapper. It can:

– Establish database connections to a MySQL database server host
– Execute SQL queries and retrieve the number of result rows
– Manage transactions
– Call stored procedures


Design Tweaks: Who?s In? (An idea in three acts)

ACT I

Jane: It is a thorn in my side that the blog name header is above the “dashboard” nav section in the admin, since in MU installations and with plugins (like stats), things in the Dashboard section span multiple blogs. Makes more sense for the header to head only the per-blog content area.

Mark: I agree about the header. “This is the menu, this is the content.”

All: Yep.

Five minutes later…

Mark: What do you guys this of this quick mockup I just did, playing with the admin header?
Mark Jaquith's mockup

Jane: I like it that the nav is not under the header. Might need some styling help. I was also thinking maybe the favorites menu should drop down into the white h2 area by screen options/help tabs.

Ryan: Menu color to the top with blog title pushed over and favorites next to screen options sounds quite nice.

Jane: I’ll ask Matt Thomas if he could style it [ed. note: Matt Thomas created the visual style for 2.7], and we can see what people think, maybe post on wpdevel for feedback.

Ryan: If it’s quick, maybe we could even get it into 2.8.

ACT II

Matt T: Here are some comps based on what you told me.

Jane: Cool, but where are Screen Options and Help tabs?

Matt T: Still working on that.

Jane: Hm. Wonder if there’s time to open this up to community designers? I know we’re in freeze, and it’s no notice, but you didn’t get any notice either when we dropped this styling request on your lap a few hours ago. That’s the way open software development works: sometimes the best ideas come at the last minute!

Matt T: I’m all for letting the community take a stab at it. Especially if they come up with something brilliant to do with the Screen Options and Help tabs.

Jane: I’ll ask Ryan about release date and see if there’s time. I know they wanted your style recommendations today.

Act III

Ryan: Tuesday is probably doable, no later than that for final delivery of style and any gradient graphics, etc.

Jane: Awesome! People will hate me for the short notice after the has-patch marathon, but since it’s a small project and over the weekend, and wasn’t even something anyone was planning until a few hours ago, I’m *really hoping* people will take this for what it is, an attempt to give more people input into an upcoming visual change in the interface, even if it’s not a huge one.

Ryan: Would have the benefit of warning people that header and menu will be changed a bit.

Jane: And we can have a vote. If I can get all the materials together and post in the morning, that would give 2 days of design time for submissions on Monday, and if we do a day of voting Tuesday, that’s 3 days notice for the vote. I’ll make sure to post to all the lists, etc.

Ryan: Will we announce with comps from Matt T as examples of what we’re thinking?

Jane: I’ll write up the UX reasons for considering the change, and Matt T can provide some style guidelines and his original comps so no one will have to waste time mocking up the basic screen layout.

Ryan: That would help set the scope. We just want tweaks here and there, given the timing.

Jane: Woot!

On Your Mark, Get Set…
Okay, so here’s the deal. Modifying the nav/header to be a little nicer is was a last-minute design idea, and if it can’t be worked out in the time we have left before 2.8 (which is very little), we’ll just wait until 2.9 to work on it. But! If someone comes up with something the community really likes and it doesn’t break any of the design guidelines for the rest of WordPress, we could sneak it in.

UX and design guidelines for this mini-project are posted here (so as not to clog up anyone’s feed reader with big graphics). Read through the UX stuff, check out the comps Matt Thomas mocked up last night (with absolutely no notice, for the record). Use the .psd as your base, and when it’s time to submit your ideas, make a .jpg or .png and post a link to it in the comments on this post. (Note: Only comments containing a link to a design submission using this format will be approved. For general discussion about this design challenge or any of the submissions, please head into the #wordpress-dev IRC channel.)

Submit the link to your comps by 1am Tuesday, April 28 UTC (7pm Monday, April 27, New York time). If you have questions or want early feedback, we’ll be in and out of the #wordpress-dev IRC channel between now and then.

Once we’ve received the submissions, we’ll post a voting survey (much simpler than the icon survey; this one will be more of poll, just choose the one you like best) as soon as possible, and will post the link to it here as soon as it’s online. We’ll only keep voting open for one day because of the 2.8 deadline, so put it on your calendar if you think you’ll forget. Voting will close at 2am Wednesday, April 29 UTC (8pm Tuesday, April 28, New York time). Results will be announced the following day.

Go!

* Chats above are a conglomeration of actual chats.

Reminder: Only comments containing a link to a design submission will be published here. All other comments will be deleted.

If you want to leave a public comment about this contest, the design, etc., I’ve created a thread in the forums that you can use. Please discuss these things there. If you leave a regular comment here on this blog, no one will be able to reply to you, because only actual links to design submissions will be posted in the comments here.

Powered by Gewgley