News: Sensation!!! Xanax dose Phentermine no credit card cod Generic viagra pill Dilaudid Viagra advertisement Phentermine side effects dangers Phentermine faqs Phentermine sales online Generic viagra overnight delivery Compare viagra price Exelon Buy generic online phentermine Cordarone Minocin Thiabendazole Tramadol information Norflex Xanax suicide Prednisone Buy viagra pill online Where to buy viagra on line Eulexin Mivial valve prolapse viagra Chlorprothixene Ditropan Generic purchase viagra Phentermine Chlorthalidone Kevin harvick viagra Fluvastatin Natural phentermine Drug screen xanax Permethrin Recreational viagra Tramadol hydrochloride tablet Order cialis uk Colestipol Lescol Cheap phentermine prescription Lipitor 5mg tablet Buy Hydrocodone Buy phentermine online without prescription Phentermine uk suppliers Phentermine no credit card required Milrinone No prescription cialis Trimetrexate Cardura Viagra online Brompheniramine Buy consultation free hydrocodone online tramadol Calan Cheap phentermine diet pills Guanfacine Donepezil Oxymorphone Dopamine Low cost phentermine Amlodipine Ambien sleeping pill Free pack sample viagra Mark martin viagra photo Ionamin Cozaar Phentermine message boards Piperacillin Metformin Tramadol ingredients Lamictal Comparison viagra cialis levivia Phentermine ups shipped Ambien Phenylpropanolamine Hydrocodone pharmacy Diflucan Cialis Viagra prescriptions Purchase hydrocodone Woman use viagra Effects of viagra on woman Lyrica Phentermine Try viagra for free Phentermine pharmacies Topamax Compare viagra cialis levivia Alendronate How long does xanax stay in your body Phentermine weight loss pills Phentermine prescribed online How to discontinue the use of phentermine Arava Metaraminol Actonel Buy cheap phentermine free fedex Will xanax help me sleep while on adderall Viagra women Non perscription viagra Buy Wellbutrin Ativan Oxyphenbutazone Avapro Cheap phentermine canada Methoxamine Buy cheap phentermine online Hydrocodone side effects vicodin Free phentermine Adapalene Women using viagra Epivir Viagra cialis generic Azithromycin Phentermine 90 day Alternative herbal review viagra Phentermine xenical Novobiocin Ranitidine Buy cialis generic Xanax online prescription Actos Buy Meridia Nicorette Filing income tax phentermine Phentermine wholesale Pentobarbital Pink oval pill 17 xanax identification Amide pharmaceutical phentermine Buy and purchase viagra online Vicodin health Arimidex Viagra canada prescription Cheap generic viagra substitutes Bactrim phentermine Fioricet info Gentamicin Accolate 5 mg no prescription Tramadol hcl 50 mg Soma side effects Labetalol Ambien 10mg Buy xanax cod Spironolactone Diet phentermine Dextromethorphan Tramadol cash on delivery Nitroglycerin and viagra Buying viagra in the uk Viagra patent expiration Xenical hgh phentermine quit smoking detox Dilantin Flomax Cialis prices Omnicef Maxzide Pediacare Methaqualone Tramadol hcl Cefaclor Cefoxitin Quinidine Where to buy viagra online Cialis dosages Miconazole Hydrocodone medication Vasopressin Elidel Viagra for women Paroxetine Laetrile Cialis sales uk Zantac Viagra canada No perscription generic viagra Cialis tablets 5 mg diet pills Buy domain onlinebigsitecitycom phentermine Toprol Enalapril Cialis dose Compare phentermine prices Locoid 5 mg free shipping Xanax canada Reliable same or next day phentermine purchase online Hydrocodone information Cod online tramadol Overnight shipping viagra Famvir Oxycontin xanax bars percasettes and lor tabs Keflex Phentermine forums Cialis comparison levitra viagra Liver problems from xanax Tramadol without perscription health risks Cialis Viagrafix corporation Cheap viagra Phentermine prescriptions online physiphen online Viagra pharmacy Chlortetracycline What does xanax look like Hydrocodone withdrawal Mesoridazine Cordarone Mirena Physican's desk reference phentermine Female viagra alternative Phentermine free delivery Xanax pics Haloperidol Buying viagra Chinese viagra dragon power Dexfenfluramine Ultracet Cialis generic Dangers of taking xanax and neurontin Buy cialis in canada Phentermine versus meridia Flucytosine Terbutaline Cheap discount phentermine Is phentermine addictive Indapamide Viagra cialis levivia comparison Viagra Phentermine on line without prescription Online doctors perscriptions xanax steroids Cyber pharmacy phentermine Vicodin cod Restoril Woman using viagra Mastercard phentermine Plendil Metyrosine Soma muscle Chlordiazepoxide Azithromycin Hydrocodone query Adderall skin allegra skin xanax skin Cheap phentermine online Picture of soma Non perscription generic cialis Ketamine Drug interaction xanax and holy basil M357 vicodin Hydrocodone bitartrate acetaminophen Benazepril Order viagra buying viagra uk 100 mg tramadol Buy tramadol cod Generica viagra Buy phentermine with no prescription Viagra by mail Iodipamide Effects of long term xanax use Phentermine side effects Cardizem Herbal alternative to viagra Alteplase Xanax withdrawel symptoms Viagra generic drug Phentermine in stock Ganciclovir Natural viagra type alternatives Clomiphene Ambien Metformin Best price on phentermine Ssri phentermine heart Natural over counter just like viagra stores Phentermine pill town Xanax without a prescription Phentermine picture Buy viagra internet Climara Buy online order viagra Pain medication tramadol Cheapest xanax online Carisoprodol Venlafaxine Cheapest free shipping phentermine Avelox Female viagra uk Drug testing and tramadol Viagra energy drink Overnight xanax Side effects of phentermine _cialis et levitra Buy tramadol cheap Viagra prescription uk Herbal viagra for women Xanax drug tests Viagra sales uk Online pharmacy phentermine xenical meridia Ambien eminem Low price phentermine 5 pdr Minocycline Nifedipine Dicumarol Menadione Amaryl Vicodin effects Phentermine pictures Viagra cialis levitra comparison How do i stop taking phentermine Viagra buy in uk online Danazol Phentermine forum Hydrocodone withdrawal symptom Viagra online cheap Buy generic phentermine Xanax shipped cod Diet online phentermine pill Benicar Bromodiphenhydramine Loss phentermine story success weight Xanax addiction Xanax lethal dose Eprosartan Buy Effexor Monopril Nonoxynol Neurontin Noroxin Hytrin Cod delivered phentermine Phenindione Ribavirin Phentermine online cod Online pharmacy tramadol Cialis price Effects phentermine side strong Iodamide Tretinoin Viagra use in women Pheniramine Misoprostol Cymbalta Viagra info Hydrocodone apap 5 500 Anileridine Phentermine with no prescription Generic cialis prices Cialis prescriptions Xanax without a perscription Viagra cialis levivia comparison dosages Tramadol online 5 online Generic meridia Buy ambien Guanadrel Phentermine not working Online tramadol Generic tramadol Buy cialis without prescription Ipratropium Generic vicodin Cheapest phentermine free shipping Mifepristone Mexiletine Tramadol avinza drug interaction Viagra testimony Phentermine Cialis erectile dysfunction Cialis overnight shipping Buy online tramadol Xanax 2mg Linkdomain buy online viagra info domain buy onlin Isocarboxazid Differin Generic viagra india Acitretin Fentanyl Cheapest price phentermine online pharmacy Meridia coupon Dulcolax Viagra interaction Flexeril Aciphex Piperacetazine Cialis forums Fluoxetine Does viagra work Moricizine Kaolin Methylphenidate Celebrex Cefprozil Cheap xanax Fioricet line Hydrocodone bitartate Diamox Moxifloxacin Viagra suppliers Tramadol overnight Opipramol Ambien cr effects side Meridia side effects Lodine Mercaptopurine Phentermine diet Buy viagra Accutane Phentermine mexico Cialis online discount Famotidine Low cost phentermine health insurance lead Order phentermine by for saturday delivery Order phentermine online and cod shipping Buy phentermine online without a prescription Viagra overdose Celiprolol Somatostatin Phentermine np Zuclopenthixol Difference between valium and xanax Phentermine with free shipping Atracurium Online pharmacy phentermine Chlortrimeton Vitamin b12 1000 mcg phentermine and panic attacks Sulfasalazine Viagra alternative uk Cheap tramadol Aminophylline Depakote Combivent Buy viagra uk Phentermine side affects Methotrexate Effexor Female use viagra Ambien dosage Cheap prescription viagra Propantheline Xanax weight gain Buy cheap domain online atspace com xanax Cheapest place buy viagra online Lowest cost phentermine Ketoprofen Anafranil Generic viagra in canada Oxyphencyclimine Cialis sample Soma san diego Ceftin Foscarnet Propranolol Alesse Phentermine online purchase Buy phentermine online no prescription Pharmacy phentermine sister Xanax no prescription needed Hydrocodone for ibs Bayer Ingredient phentermine Allopurinol Phentermine yellow Cyber pharmacy viagra Buy cheap no phentermine prescription Cialis immunity Trimethoprim Meridia diet pill Accupril Lowest phentermine prices Cefotetan Minocycline Invia nasal viagra Alka seltzer Phentermine without rx Generic viagra canada Estrace Ansaid Prozac interact xanax Terazosin Calcitriol Viagra premature Tramadol used for Nitroprusside Phentermine on line Thioridazine Prescription viagra Nasacort aciphex phentermine actos imitrex Viagra cost Canadian pharmacy viagra Cheap 37 5 phentermine Zoloft and xanax Natural supplement equivalent to xanax Viagra testimonial Buclizine Digitoxin Viagra and ischemic optic neuropathy Locoid Seroquel Cheap xanax no prescription Eldepryl Dolasetron Amaryl Prempro Pravachol Xanax addiction treatment L arginine natural viagra Xanax master card Buy Ambien American express phentermine Tramadol hcl acetaminotran par Kaopectate About xanax Diphemanil No perscription xanax Meridia better than phentermine Liqued viagra Viagra cialis levitra dose comparison Flovent Disulfiram Ambien cr dosage Viagra alternative and woman Discount vicodin Viagra alternatives Micronase Chlorpheniramine Letrozole Viagra lawsuits Biperiden Buy phentermine cod Herbal viagra Viagra free pill Buy phentermine without a prescription Meclizine Phentermine no fees Buy cheapest viagra Orlistat Albendazole Generic cialis online Xanax anxiety relief pills order here Herbal phentermine does it work Avandamet Foradil Compare cialis levitra viagra Cheap pharmacy viagra Cialis compare levitra viagra Viagra conviaindications Fioricet with codeine Voltaren Hydrocodone m367 Pargyline Cheap tramadol without prescription Discount priced viagra Xanax in urine Cheapest online pharmacy phentermine Cheapest phentermine online Norethynodrel Canadian viagra Generic prescription viagra without Erythromycin Cleocin Dexamethasone Cheap diet online phentermine pill Dibenzepin Butalbital Loxapine Viagra pill cutter Ritonavir Butaperazine Buy phentermine saturday delivery ohio Ecotrin Diet phentermine pill Cheap cialis generic Pharmacy phentermine affiliate Buy prescription tramadol without Discount viagra perscription drug Fioricet Xanax interaction with paxil Lexapro and xanax Phentermine and pregnancy Diazoxide Mirapex Order cialis online On line vicodin Diethylpropion Naltrexone Mevacor Oxazepam Bactrim Viagra from canada Alternative herbal viagra Tramadol effects Cash on delivery shipping of phentermine Amphetamine Methdilazine Viagra online sales Side effect of viagra Cheap soma Xanax tablets 5 mg sale Buy online prescription viagra Generic cialis overnight Tetracycline Xanax doses Buy phentermine epharmacist Cyclacillin Cialis in the uk How does viagra work Viagra sample Generic soft tab cialis Buy Zoloft Prevacid Viagra sales online Phentermine gynecomastia Alternative to viagra Digitalis Cialis generic canada Clomid Xanax no prescription overnight delivery Relafen 1 loss phentermine pill weight Phentermine free online consultation Side effects phentermine gynecomastia Coumadin Natural alternative viagra Clomipramine Trovafloxacin Tramadol hydrochloride capsules Phentermine pharmacy Mometasone Cycrimine Herbal phentermine forum Cheap phentermine with online consultation Lorazepam Meridia Phentermine us Fluconazole Best buy phentermine Avapro No prior perscription tramadol Nimodipine Lethal dose xanax Prevacid University rochester viagra pfizer Sulfonamides Cheap meridia Phentermine sites that ship cash on delivery Buy cheap cialis Nicardipine Diet information phentermine pill Luvox and xanax Flupenthixol Valium vicodin Online viagra Phentermine no prescription Blindness cialis Acetylcholine Tramadol prescription Alcohol hydrocodone Dicloxacillin Lotrimin Strattera Buy cod pay phentermine Xanax side effect Hydrocodone bitartrate Purchase tramadol online Lotrel Viagra results Free xanax Phentermine adipex diet pill prescription Cheap viagra in the uk Celexa phentermine Ergocalciferol Allowed cialis tag viagra xhtml Addiction recovery xanax Free sample viagra Pepcid Order xanax overnight Cheap cialis tablets Flutamide Amsterdam holland viagra Tramadol Uk online pharmacy phentermine Phentermine from the uk Cheep tramadol paris france Free prescription sample viagra Viagra sex Exelon Avandamet Where can i buy phentermine Cyclosporine Phentermine work Xanax sale Viagra users Viagra vs levivia Idoxuridine Drug phentermine testing Buy cheap domain onlineatspacecom xanax Phentermine weight loss medication Bromides 90 $89 mastercard Loracarbef Prednisone Phentermine testimonials Cycloserine Fill viagra prescription Tomorrow Phentermine caffeine Trimethobenzamide Xanax online without a prescription Xanax fedex overnight Phentermine diet pill Buy viagra now online Diflunisal Phentolamine Xanax overnight delivery Viagra pills Phentermine from a mexican pharmacy Buy discount cialis Does phentermine speed up metabolism Xanax effect Viagra 50 mg Phentermine tablets Ciclopirox Disopyramide Cheep phentermine Generic soma Bactrim Buy phentermine pay cod Ofloxacin Free generic viagra Maximum dosage of phentermine Coreg Adipexdrug addiction order phentermine online Buy generic xanax Viagra pictures Hydroxyurea Cialis generic viagra Atropine Primaquine Order phentermine diet pill Xanax effects Levivia and viagra Lexapro and phentermine Metronidazole Ciprofloxacin Augmentin Phentermine mexican pharmacies online Viagra online canada Phentermine snorting Ambien overnight Oxycontin xanax bars perclesept and lortab wha Glycerin Between difference levivia viagra Soma fm Herbal viagra reviews Mestranol No prescripton phentermine What does phentermine look like Generic phentermine Albuterol Feldene Buy Adderall Keflex Metrizamide Viagra online pharmacy Phentermine Weight loss oral hcg and phentermine Viagra herbal Generic money order viagra Perscription cialis Generic xanax xr 5 mg diet pill Viagra without a prescription Buy cialis viagra Lansoprazole Can woman take cialis Tapering off xanax Heparin Cialis doseage Tramadol 377 Indinavir Chantix Viagra erection Buy cialis Phentermine cheap Tramadol use in dogs
News Sensation! Cialis online ya.by furniture Phentermine online Evening dress Building materials Fashions Cigarette Green Card Information Medicine news Balans auto-moto Underwear Hydrocodone online Sportswear Vicodin online Tramadol online Ambien online Top auto-moto Medical tests Soma online Get ringtones online Best Ringtones Rington Credits Pills, Compare pills, Reviews pills Necklace FDA Approved Pharmacy Cheap pharmacy shop Autos Fioricet online Xanax online Cheap drugs online shop Chronometer Free Ringtones Ornaments Boats Trousers Cigarettes Ĺables Cars Credit Loan Online Rolex Replica Replica Rolex mp3 music for mobile Bracelets Online notebook shop Blog Search the Web Chairs Sale Auto Top casino Ear rings Tunings Adipex online Valium online Yachts

Archive for the 'Web development' Category

April 30th, 2007 by morning

I just stumbled upon this nice tool for all of the people who are not familiar with with html and css and are still interested in customizing their own WordPress theme and would like to change it a little bit and don’t want to use any of the existing. I must admit that I haven’t tested it completely, but it looks like it can be very handy. It even comes with widget support.

Check it out: WordPress Theme Generator.


March 11th, 2007 by morning

I already wrote short tutorial for beginners which covers installation and some common usage of smarty tags.

Modifiers are basically php functions (custom or predefined) which work with variables, custom functions and strings. That means, you can actually call php functions as modifiers. Applying a modifier is very easy, all you need to specify the value followed by pipe and the modifier name. Some of the modifiers can be called with additional parameters. For example:

PHP:
{"<span>This is just a string</span>"|strip_tags}
<!-- Or -->
{$description|truncate:40:"…"}

Even though Smarty covers lots of very useful modifiers, sometimes, you will have a need for new one.

Let’s write a simple modifier which will be applied to strings and will replace smilies shortcuts with actual images.

Create a file named: modifier.grins.php and place it within your Smarty dir in /libs/plugins/

If you open any existing modifier, you will see a phpdocumentor compatible comment which describes modifier. It is recommendable that you use the same when writing your own ones.

For replacing smilie shortcuts with actual images, I will use simple str_replace php function, so the result would be:

PHP:
<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */

/**
 * Smarty plugin
 *
 * Type:     modifier<br>
 * Name:     grins<br>
 * Date:     March 6, 2007
 * Purpose:  converts smilies to img tags
 * Input:<br>
 *         - string: input string to replace
 * Example:  {$text|grins}
 * @version  1.0
 * @author   Jelena Pavlovic <jelena@arraystudio.com>
 * @param string
 * @return string
 */

function smarty_modifier_grins($string)
{
   
    $url = "images/";

   
    $signs = array(':-)', ':-(', ';-)', ':-|', ':-S' ,':-P' ,':-$',':-O', ':-*', ':-D');
    $replace = array(
    '<img src="'.$url.'smiley_1.gif" alt=":-)" />',
    '<img src="'.$url.'smiley_2.gif" alt=":-(" />',
    '<img src="'.$url.'smiley_3.gif" alt=";-)" />',
    '<img src="'.$url.'smiley_4.gif" alt=":-|" />',
    '<img src="'.$url.'smiley_5.gif" alt=":-S" />',
    '<img src="'.$url.'smiley_6.gif" alt=":-P" />',
    '<img src="'.$url.'smiley_7.gif" alt=":-$" />',
    '<img src="'.$url.'smiley_8.gif" alt=":-O" />',
    '<img src="'.$url.'smiley_9.gif" alt=":-*" />',
    '<img src="'.$url.'smiley_10.gif" alt=":-D" />'
    );
    $string = str_replace($signs, $replace, $string);
    return $string;
}
?>

What you have probably noticed is function name, which has to follow the pattern of smarty(underscore)modifier(underscore)chosenName, where chosenName will be used to call your modifier.

To apply this modifier we can create example-smilies.php page with:

PHP:
<?php

    include "includes/config.php";

    $description = "This is one funny sentence. :-) <br />This is one sad sentence :-( ";

    $smarty->assign("description", $description);
    $smarty->display("example-smilies.tpl.htm");

?>

and example-smilies.tpl.htm page and place it in templates dir:

PHP:
{include file="header.tpl.htm"}

<h2>Description without grins modifier applied</h2>
<div>{$description}</div>

<h2>Description with grins modifier applied</h2>
<div>{$description|grins}</div>

{include file="footer.tpl.htm"}

Html code result will be:

HTML:
<html>
<head>
    <title></title>
</head>
<body>
<h2>Description without grins modifier applied</h2>
<div>This is one funny sentence. :-) <br />This is one sad sentence :-( </div>

<h2>Description with grins modifier applied</h2>
<div>This is one funny sentence. <img src="images/smiley_1.gif" alt=":-)" /> <br />This is one sad sentence <img src="images/smiley_2.gif" alt=":-(" /> </div>

</body>
</html>

Very simple.
I have updated .zip file which contains example from previous tutorial with those described here, so feel free to download it.


March 6th, 2007 by morning

I’ve read an interesting and funny article at drivl.com entitled "The Web Development Clients' 10 Commandments". Even though it’s funny, it’s very sad at the same moment, showing how clients can be hard people to deal with. The funniest commandment was: “Your website shall not: play music, have a (flash) intro, snow, or use the marquee tag.” It just made me laugh out hard, because it is soo true sometimes, even nowadays.

The rest of the commandments are equally funny, however, luckily those are not happening at our company anymore and are all behind us as a bad dream. We’ve learnt from our mistakes. With right project management, almost 100% of them can be avoided. Every business has its own problems and clients who can be very hard at some points. The same is with web development, with a small different that even today, people know so little about Internet, its possibilities and values.

Anyway, go read it and get yourself a good laugh.


February 24th, 2007 by morning

The time has come to learn Ruby on Rails. I’ve been delaying it for few months now, but my new SitePoint book, Build Your Own Ruby on Rails Web Applications just arrived and there are no more excuses left.

Installation
In the book, in second chapter author recommends installing Instant Rails for Windows users. As I already had that installed, I’ve decided to install Ruby and RubyGems separately. As being PHP developer, I got used to install Apache, PHP and MySQL all separately as I like to have complete control over them. Configuring Apache sometimes can be tricky if you forget few settings or if you’d like to keep your server files in different places. Same stands for MySQL. I like to keep all MySQL db files and web server files on D partition of my hard drive, just so I don’t need to think about it when formatting C.

Installation of Ruby, RubyGems and Rails is painfully easy. If you do decide to go with Ruby with Windows installer, installation is just few clicks away.
Installation of RubyGems is as easy. It requires from you just to run

CODE:
ruby setup.rb

Rails installation can be started with

CODE:
gem install rails --include-dependencies

All done!

Yes, it’s THAT easy. (more info (which is not really more info, because you don't need more!!!) can be found at http://rubyonrails.org)

I'm at 51st page of the book and all I did so far is installed everything I need to get started. I'm inpatient to start coding!!


February 11th, 2007 by morning

I love plugins and wordpress is pretty much well supported with various plagins. You name it and you’ll find it. Right now, I’m in a hunt for new plugins to try out, and this is the list of which I have active at the moment:

1. Ask me plugin – of course, Do I have to say more?
2. Exec-PHP – I wouldn’t use this one if Ask me plugin doesn’t require it. Hopefully, we should be able to disable it, one ask me is rewritten to not use it.
3. Get Recent Comments – This one does what it says - I use it for my second column in the footer.
4. Recent Posts – Same as above – I use it for my first column in footer.
5. Feedburner Feed Replacement – this one I use for forwarding all feed traffic to feedburner. This way you get a better picture of how much subscribers to your feed you have.
6. iG:Syntax Hiliter – One of the best syntax highlighter plugins I have seen. (Yesterday I realized that an online friend of an online friend has a friend who is the author of this plugin. That just proves how world is a small place.). One thing I noticed with this plugin is that its setting are restored to default each time you activate another plugin.
7. Secure and Accessible PHP Contact Form – This one I use for my Contact page. Very nice form with a spam protection. Like their authors say: A marriage of communication and peace-of-mind.
8. Custom Smileys – I love custom smilies. I guess you can tell from my posts.
9. Akismet – A spam protection for post comments. So far, it works great for me.
10. Tiger Style Administration - one more great plugin from orderedlist.com and Steve Smith. It gives you new design to your Wordpress administration.
11. Hello Dolly – I have no idea why I activated this plugin, but it’s kind of cool. It displays random lyrics from Louis Armstrong's song "Hello Dolly".

So far, this is it. If you have some cool plugins to recommend, please do, I will be happy to check them out.


January 28th, 2007 by morning


Ask-me plugin, which was released almost a month ago, requires Exec-PHP plugin to be installed (hopefully beta release will make plugin independent, and you won’t need exec-php anymore). However, in my last post, I wanted to show up some php code. Exec-php plugin allows you to put some php code within your post and execute it once the page is loaded. On the other hand, it doesn’t allow you to actually show your code. I went to authors page for the solution and he suggested that instead < and > in opening and closing php tags you use corresponding html entities (<?php ?> to &lt;?php ?&gt;). I tried that, but as I also have Gi:Hiliter plugin (which is very nice for syntax highlighting), it actually showed &lt;?php ?&gt; html entities preventing them to be interpreted.

I figured I should try to hack Exec-php to ignore that single post I wrote, and I did, but my friend Ed actually suggested that I put html comment inside each post which will contain php code which doesn't need to be executed and just change Exec-php the way when it finds out that comment, it will just return the content and not execute the code.

This is the function which I changed:

PHP:
function execphp_eval_php($content)
{
    global $post;

    //check if we should ignore post
    $pos = strpos($content, "<!-- exec_php_disabled -->");
    if($pos !== false)
        return $content;
    // check whether the post author is allowed to execute PHP code
    if (!isset($post) || !isset($post->post_author))
        return $content;
    $poster = new WP_User($post->post_author);
    if (!$poster->has_cap(EXECPHP_CAPABILITY))
        return $content;

    // to be compatible with older PHP4 installations
    // don't use fancy ob_XXX shortcut functions
    ob_start();
    eval(" ?> $content <?php ");
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}

Works perfectly! All you need to do is to place this:

HTML:
<!-- exec_php_disabled -->

on the beginning of your post if you'd like to show some php code to your visitors.


January 21st, 2007 by morning


Note: I started to write this article a year and a half ago. I finally decided to finish it and create series of posts which will cover some Smarty tips and tricks and writing plugins and modifiers.

THE PROBLEM: PHP and HTML-embedded PHP

As PHP is HTML-embedded scripting language you can easily nest php code inside html and get dynamically generated page. Great, isn’t it? Yes, as long as you know what you are doing. The trouble comes when programmers and designers start to work together on the same project. In that case programmers should try to ‘hide’ their code as much as possible from designer’s eyes, not only because designers doesn’t like to see bunch of weird signs between their HTML, but because they can easily remove a single semicolon and cause parse error in PHP. This result in arguments and blaming who erased what (for solving this you should also consider using code versioning: CVS or Subversion). Let’s see few examples. Continue reading Smarty templates for beginners


January 1st, 2007 by morning

We finally made it. So, what it is all about. If you have visited my "About" page, you probably noticed that it is not an ordinary page. It gives visitors an opportunity to ask blog owner a question and see all questions from other visitors. The idea and initial plugin came from my dear friend Sara who wrote it for her personal use. Once I started this blog, I talked her into giving me the script so I can have different About page. After some talking we decided to extend it a little bit and made it public for all people who are willing to have similar About page as we do, but are not able to write code themselves. This turned into hours of hard work and finally, you can see results of it.

So, here it is, first alpha release is now available for you to use it. However, I presume there are some bugs that we are still not aware of, but we do promise we'll keep this plugin evolve and become better.

Plugin should work on both Wordpress 1.5 and 2.0 versions, however there are some requirements for it to run on your blog. Exec-PHP plugin is required. You can download it here. Please make sure you activated it and configured it properly. Some other requirements are:

a. Disable the WYSIWYG rich editor within the user options (at the bottom of the page)
b. Disable "WordPress should correct invalidly nested XHTML automatically"

Make sure your permalink structure is name based rather than using the post id.

Here are the installation instructions:

1. Download plugin from here
2. Extract archive (you should see 2 files (askme.php and ask-me-readme.txt) on your local drive
3. Upload askme.php into your Wordpress plugin directory
4. Go to your admin control panel and activate the plugin.

Plugin should create a page "Ask me" for you which should be ready for usage. Under the Options/Ask me, you will find few settings you can configure by yourself.

I strongly suggest that you read ask-me-readme.txt

Give it a try, and leave us some feedback. We have more ideas for extending this plugin, but for now, we are hoping to fix all possible bugs we still haven't discovered, but which might be present.

Happy New Year, people! This is our gift for all of you.


December 26th, 2006 by morning

Again, Egor came to rescue me and we fixed all issues that are left and the result is that my blog looks all the same across following browsers: FireFox, IE6, IE7, Safari and Netscape. It was an extremely easy fix to bring back background image to the main wrap div. It seems that IE7 understands min-height property, while IE6 just ignores it but displays the background image anyway, so the result is:

CODE:
#wrap {
    margin: 0px;
    background: #FAF7EB url(images/wrap-top.gif) repeat-x;
    background-color: transparent;
    min-height: 36px;
}

As simple as that. Thanks again E!


December 25th, 2006 by morning

I installed Internet Explorer 7 yesterday and discovered that reading my blog in it was impossible. At least first post wasn't visible as footer was overlapping it. I presumed it has something to do with not clearing divs in a good manner, but I'm just CSS beginner and still haven't became efficient at debugging so I asked my friend Egor to help me out. Just after few minutes of looking into the code he found out what the problem was.

Basically, I have a wrap div which holds centered content between header and footer and it had images as a background. Actually is just has small image which shows gradient effect after the header (it's almost invisible, I know!) and for some strange reason I set height for it to 36px like this:

CODE:
#wrap {
    margin: 0px;
    background: #FAF7EB url(images/wrap-top.gif&