Quantcast

Entries from November 2005 ↓

WebCal 101

I installed WebCalendar 1.0.1 today so I could check it out (the new beta Mozilla Sunbird deleted my calendars). And it’s a pretty cool little webapp. After a little while of playing around I realized I wanted to have images in my pop up descriptions. But that won’t work right if the image is big - the default width of the pop up is 300px.

image

So, my solution to the problem is a quick hack that will scale the image down when your viewing the event from the event tool tip pop ups.

image

When we’re done you’ll be able to enter an image into your event description using the BBCODE [img][/img] tags and the script will take care of everything else. The hack is very basic and only requires a small edit to two of the files - you should be looking in the base webcal directory. The first edit is in the file view_entry.php on line 443 insert this PHP code:

$description = str_replace("[img]“, “<img xsrc=\”$url”, $description);
$description = str_replace(”[/img]“, “\” alt=\”image\” />”, $description);

Now, in the file /includes/functions.php insert the following code at line 1185:

$description = str_replace("[img]“, “<img xsrc=\”$url”, $description);
$description = str_replace(”[/img]“, “\” width=\”250\” alt=\”image\” />”, $description);

And by insert I mean go to that line hit enter once or twice to move everything else down and then paste this code on that line.

And that’s it… Easy huh? What’s it do? Well, when the description is pulled from the database it replaces the BBCODE image tags with the proper html to display in your browser. However, in the short pop up description the width of the picture is limited to 250 pixels. This gives us a nice scaled image when looking at the pop up and keeps the full size image when looking at the full description.

And that’s all for now.

**edit: opps on the code not showing up - it’s fixed now.**

Xbox Advertising

Over at Aeropause they have a link to the best 360 ad EVER! Check it out! NOW! You probably won’t see this one on TV.

Join Now 1-9-06

image

Howard is on Letterman… Gotta love the ‘Join’ patch on the ‘1-9-06′ jacket.

Mikey and I will be in the city during the last K Rock show. w00t!

Aeon Flux Iso Released Kinda Sorta

I just noticed this over at Team Xecuter’s web site:

And we have seen this…..surely a hoax ? Aeon_Flux_USA_XBOX360-SLICE

Funny, ‘Aeon Flux’ isn’t coming out on 360 (as far as I know anyway)… So, I’m going with hoax.

roll your own del.icio.us (sort of)

For some reason the thought of using del.icio.us doesn’t appeal to me (maybe it’s my super secret pr0n links that I don’t want public lol) but I would like to be able to have access my links where ever I am. I’ve been on the road too many times, trying to get some work done, when I could have used a link or to. So, I thought I’d roll my own since I’ve got this web space and all.

The bookmarklet itself is very easy to understand:

javascript:location.href='http://www.shindakun.net/supaleethiddendir/
bookmarklet.php?url='+encodeURIComponent(location.href)+'&title='
+encodeURIComponent(document.title)+'&extended='
+escape(document.getSelection())

By setting that code as a link in Firefox I can add any link to my bookmarklet database. The database simply contains a link id number, the date the link was made, the page URL, the page title and if I highlight a bit of text on the page before clicking the bookmarklet - it will include that also.

[WARNING]As it is the code does no input checking - that is why the php is put into a ‘hidden’ directory. It’s possible someone could do some crafty SQL tricks. Remember to verify any data before inserting it into your database.[/WARNING]

I’m just lazy right now - and no one would ever find the script on my server so there. Anyway, on the server side the code for bookmarklet.php is where all of the ‘hard work’ takes place.

//bookmarklet.php - 11/15/05 - steve@shindakun.net

function dbconnect() {
global $sqlUsername, $sqlHostname, $sqlPassword, $sqlDatabase;

$dbcnx = @mysql_connect($sqlHostname, $sqlUsername, $sqlPassword);

if (!$dbcnx) {
echo( "Unable to connect to the database server at this time.

" );
exit();  }

if (! @mysql_select_db( $sqlDatabase ) ) {
echo( "

Unable to locate the database $string at this time.

" );
exit();  }
}

if (isset($_GET['url']) && isset($_GET['title'])){

dbconnect();

$url = $_GET['url'];
$title = $_GET['title'];
$extended = $_GET['extended'];
//no security - for shame!
$do_change  = mysql_query(”INSERT INTO bookmarklet SET
date=NOW(),url=’$url’,title=’$title’,extended=’$extended’”);

?>
<script language=”JavaScript”>
<!–//hiding it
history.back();
//end hiding it–>
</script>
<?
}

else {

?>
<script language=”JavaScript”>
<!–//hiding it
history.back();
//end hiding it–>
</script>
<?
}
?>

When loaded bookmarklet.php first checks to see if the URL and TITLE variables have been set. If they have the it connects to a MySQL database and inserts our bookmark. Once done it drops back to the you bookmarked. If the URL and TITLE variables aren’t set then it simply drops back to the page you bookmarked.

Maybe tomorrow I’ll go over how to display your new links. *yawn* G’dnight.

*edit* small opps on the code. It’s fixed.

King K-what?

Here’s my question for the day: Why in the world did they feel the need to name the new ‘King Kong’ game “Peter Jackson’s - King Kong - The Official Game of the Movie”? That’s the title of the Xbox, Xbox 360 and PC versions. The mobile version (I bet you can guess it) - “Peter Jackson’s - King Kong - The Official Mobile Game of the Movie” I wonder why we can’t just call it ‘King Kong’…

Circuit City Releases Pre - read nfo!

Looks like Circuit City is bucking the trend (and release dates) in order to get a jump on the holiday sales. According to Joystiq the electronics retailer will be selling the 360 starting this Friday at 2PM. Now, if only I had the coin to throw down on a 360 Platinum package all would be right with the world.

Xbox booting a 360 game.

Over at Kotaku there is a post which show someone trying to boot an Xbox off of an Xbox 360 game. There is more info over at Xbox-Scene. It seems that the screen is probably just a bit of DVD video.

Anyway, the countdown continues…

PSP2TV

IGN has posted a review of the PSP2TV mod ( http://gear.ign.com/articles/666/666034p1.html ) Team Xtender ( http://www.teamxtender.com/ ) released a couple of days ago. Maybe, I’ll pick up one of these…

The video quality is short of perfect, but for a direct-feed solution, it’s the best you’re going to get for a while, and it’s possible that it might get better in the future.

Then again maybe not.

More Sony Lawsuits

The lawsuits against Sony just keep rolling in. Sony BMG was sued the other day for their questionable copy protection software. Now, according to The Inquirer, ( http://www.theinquirer.net/ ) Sony is now also facing a suit by Microunity Systems Engineering ( http://www.microunity.com/ ) who claims both the PSP and Playstation 2 are infringed its patents.

Microunity claims that Sony infringed its patent by making, using and selling the Playsation Portable (PSP). It alleges that Sony is liable for infringement “except to the extent licensed as a customer of Intel products under licenses granted to Intel Corporation.”

Read on for more: http://www.theinquirer.net/?article=27603