Richard Castera - Explorations in Software Development
Richard Castera - Explorations in Software Development
Browsing Category
Archive
Resources Scripts

Magento – Get the current theme folder

May 8, 2009 No Comments

If you ever needed to retrieve the path to your theme folder, you can easily do this by calling this function:

PHP
1
<?php echo $this->getSkinUrl(''); ?>

The code above will return something similar to: http://www.yoursite.com/skin/frontend/default/default/

Continue reading
Reading time: 1 min
Share:
Written by: rcastera
Resources Scripts

Magento – Retrieving Base URL Path

May 8, 2009 14 Comments

Anyone needing to retrieve the base URL path from Magento, just place this one line of code and there you have it! Hope this helps someone.

PHP
1
<?php echo Mage::getBaseUrl(); ?>
Continue reading
Reading time: 1 min
Share:
Written by: rcastera
Resources Scripts

Creating a TinyURL with the TinyURL API

May 8, 2009 22 Comments

The popular URL shortening service TinyURL provides a quick API that creates TinyURL’s on the fly. Here’s how you can access that API.

PHP
1
2
3
4
5
6
<?php
function createTinyUrl($strURL) {
    $tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url=" . $strURL);
    return $tinyurl;
}
?>

Make a call to our function above, and it outputs a new tinyURL.

PHP
1
<?php echo(createTinyUrl('https://www.richardcastera.com/2009/05/09/creating-a-tinyurl-with-tinyurl-api/')); ?>
Continue reading
Reading time: 1 min
Share:
Written by: rcastera

About me

Hello, my name is Richard Castera. I have more than 12 years of experience architecting, implementing, leading and launching large scale, high performance software products in a fast-paced agile environment.

Popular Posts

Magento – Display new products on the home page

May 20, 2009

How to Fix “Internet Explorer Cannot Open the Internet Site- Operation Aborted” Error

May 9, 2009

PHP – Convert Array to Object with stdClass

July 5, 2009

Categories

  • Home Automation
  • Resources
  • Scripts
  • SEO
  • Thoughts
  • Web Server

Tags

Apache Apple Bash CSS Drupal Free home automation htaccess Java Javascript Magento PHP raspberry pi SEO SQL thoughts Wordpress

© 2019 copyright Richard Castera // All rights reserved