Sunday, September 28, 2008

PHP on Blogger

Hi all...

It occurred to me that since Blogger was a CMS and probably powered by PHP, it would be possible to use PHP code on Blogger. One way to find out. So from here we go to the "Edit Html" tab and write some code.

See ya soon...



$multiply = 12*12;


echo '

';
echo $multiply;
echo '

';


And maybe they're even in their own paragraph. Cool. The only way to test it is to publish it as just navigating to the "Compose" tab tells us nothing of any value.

Fingers crossed. NB: I didn't include the php tags as I figured that Blogger would've already included them. Let's find out. We should have the number 144 included on the page if it works.

===============================

OK OK. Didn't run any PHP code and to make matters worse Blogger strips out the paragraph tags (but it runs them as html tags) ... try again>>>>

===============================

Blahh!

This time with the php tags.

';
echo $multiply;
echo '

';

?>

Well it didn't strip out the php tags, it just didn't process the variable.

';
echo $multiply;
echo '

';

?>
Blogger gets uselesser and uselesser.

Whadda 'bouta simple one...


===========================

Seems to leave in the closing php tag so why not leave it out and see if anything useful happens. Next we'll google it if nothing exciting happens.

How do I use Blogger to process php


===============================

Well that CSS worked, even included the line-height of 45px necessary due to making the h1 40px in height ... otherwise they're all scrunched up, however, the PHP doesn't work, perhaps the Blogger software is saving the pages as html which won't run PHP, worth a think about ... let's go to Google and see what we can find out (notice the capital G that time. That's because this time Google is a noun and last time google was a verb).

===============================

OK nothing of any consequence at first glance. Either I am useless or Blogger is useless, I prefer the latter, not so hard to live with.
I did find something interesting though at http://www.xml.com/pub/r/940. Actually only half of something interesting about using Blogger to create XML websites, hmm, might have to buy that book.
I read the first bit then clicked the link to http://www.hit-or-miss.org/ and found a whole lot of lesbian dating sites. Not much use to me since I'm a male ... and a male one at that.

However...



I am due at a friend's place to do some Sunday arvi gardening. Better go>>>>

Oh by the way.... Up the mighty Hawks. Good one boys. What's Tasmania got to do with it? Easy to see that I am not actually a Hawthorn fan. The Adeliade Crows are our team and always will be even when things are not so good for them, but all the same AFL is THE game no matter what the Pommies (in their deluded mental chaos) might think (I'm sure some of them must think).

So bearing a look of chagrin regarding not getting PHP to run nicely (er, at all), the intrepid designer from Tweed Web Design bids you farewell. Later on we'll try some ... wait for it .... JavaScript, maybe even AJAX. Maybe we ought to just waste this much time playing with Joomla ... probably get better results.

Bless all souls
cha
terrence

No comments: