This might be the funniest HTML joke I?ve ever seen. Of course you know the i tag has been deprecated in XHTML.
repost from http://joeschmitt.tumblr.com/post/391725635/via-blueyesbrunet-this-might-be-the-funniest
This might be the funniest HTML joke I?ve ever seen. Of course you know the i tag has been deprecated in XHTML.
repost from http://joeschmitt.tumblr.com/post/391725635/via-blueyesbrunet-this-might-be-the-funniest
I have been trying off and on for about a week to get a connection made to Magento’s API via a PHP script.
Magento gives the following code snippet on their site, but I could not get it to work – souring the message boards didn’t really help either. I am not sure if something was off with my installation instance or what.
After a bunch of trial and error – scouring the web etc – i was finally able to make a connection with the following script
<?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
define("XMLRPC_DEBUG", 1);
require_once('../app/Mage.php');
$client = new Zend_XmlRpc_Client('http://www.domain.com/api/xmlrpc');
// If somestuff requires api authentification, we should get session token
$session = $client->call('login', array('user', 'key'));
echo "<pre>";
print_r($session);
echo "</pre>";
// If you don't need the session anymore
$client->call('endSession', array($session));
?>
one strange thing to note is the path to the API – with a trailing slash, i could not get this to work…’
I hope that this helps someone else out.
recently after installing a plugin i got an error from WordPress that looked something like this.
Warning: mysql_error(): X is not a valid MySQL-Link resource in (path) on line Y
(Warning: mysql_error(): 9 is not a valid MySQL-Link resource in /var/www/vhosts/XXX/httpdocs/wp-includes/wp-db.php on line 282)
i found the solution here and thought that i might post the fix
http://scripts.indisguise.org/2007/04/05/using-non-plugin-third-party-scripts-with-wordpress-212/
For quite a while now I have been using the following script to show sub navigation on WordPress Sidebars. It utilizes the built in wp_list_pages function to show parent and child relationships on a sidebar (or where ever you choose to use it for that matter).
<?php
if($post->post_parent)
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?> <ul> <?php echo $children; ?> </ul> <?php } ?>
I like that it is simple, and that it can be re-written to show items only if they are child pages of a specific parent, ie:
<?php
// find out what the top level page is
global $post;
if($post->post_parent) $parentPG = $post->post_parent; // page is a child
else $parentPG = $post->ID; // page has children
?>
<?php
// marketing
if($parentPG==7){
// show items if the parent id is 7
}elseif($parentPG==8){
// show items if the parent id is 8
}
?>
This works great when you only need to make it work with parent and child pages. Recently, however, I had the need to utilize this type of functionality on a project that required pages 3 levels deep (grandchildren?). After a bit of Googling, and searching through the WordPress Codex I realized that I was going to have to “roll my own” on this one. So here you go – there are probably better ways of doing this. If you know of one please let me know, but maybe this will help someone else searching for “wordpress list grandchildren”
<?php
// find out what the top level page is
global $post;
if($post->post_parent){
$parentPG = $post->post_parent; // page is a child
// check for grand children
$sql = "SELECT * FROM `".$wpdb->prefix."posts` WHERE ID=$parentPG";
$data = $wpdb->get_results($sql,ARRAY_A);
if(!empty($data[0][post_parent])) $parentPG=$data[0][post_parent];
}
else $parentPG = $post->ID; // page has children
?>
<?php
// marketing
if($parentPG==7){
// show stuff for parent 7
}elseif($parentPG==8){
// show stuff for parent 8
}
?>
well it finally happened after what seems like a rather long wait, WordPress 2.5 with its completely re-designed admin system is hot off the presses and ready to install. I have done the upgrade on a handful of blogs and sites so far and it’s been seamless. I am very impressed with the new admin – all in all it’s taken a product that I think is great and only made it better.
Great Job!
So i installed WordPress 2.5 release candidate 1 on this site so that i can familiarize myself with the new features, and I have to say, my first reaction is WOW! The new admin is a much cleaner look and feel. The new functionality is amazing. There is integrated support for video, all I can say is I can’t wait until this is available as a full release. It’s going to knock people’s socks off!
Way to go WordPress.
http://wordpress.org/development/2008/03/25-sneak-peek/
sounds cool – i can hardly wait.
At Invisible Window we have been hosting our client sites in addition to our own with Media Temple for quite some time. Media Temple’s service and support has been top-notch. There are a few things that we’ve had to figure out along the way and I hope that these links help someone else out there.
The blogsphere buzz surrounding the release of WordPress 2.5 has indicated that it will be released today…but as of yet, nothing. I am looking forward to this release as it has made significant upgrades to the admin system, and I am curious how all of the various themes and plugins jive with it. My plugin curiosity especially surrounds Google Mapper, a plugin we wrote at Invisible Window.
So stay tuned…i will let you know when 2.5 decides to grace us with its presence.