[pmwiki-users] Include URL markup

Patrick R. Michaud pmichaud at pobox.com
Fri May 6 10:53:15 CDT 2005


On Thu, May 05, 2005 at 02:50:21PM -0400, zgrauer at earthlink.net wrote:
> Ok, so I want to add a google ad to my footer. The ad is like the following text box in the link, below.
> http://www.freechem.org/google.html
> 
> And there is a page on IncludeURL in the cookbook, which tells me to add the following code:
> 
> Markup('includeurl', 'directives',
>       "/\\(:includeurl\\s+(http:[^$UrlExcludeChars]*?)\\s*:\\)/e",
>       "Keep(implode('',file(str_replace('&','&','$1'))))");
> 
> And then type (:includeurl http://www.freechem.org/google.html :)

Here's another approach:

    Markup('adsense', 'directives',
      "/\\(:adsense:\\)/",
      Keep("
        <script type="text/javascript"><!--
         google_ad_client = "pub-9906382443560085";
         google_ad_width = 180;
         google_ad_height = 150;
         google_ad_format = "180x150_as";
         google_ad_channel ="";
         google_ad_type = "text";
         //--></script>"));

Then use the markup "(:adsense:)" wherever you'd like the
ad to be placed.

Actually, I think I'll add this as a recipe to the Cookbook.
Then we can all get rich.  Or maybe not -- I've only received
a few dolars from my AdSense copy.  Of course, I haven't really
done much with it anyway.  (Hmm, I wonder what would happen if
I stuck an ad on Strawberry Pop-Tart Blow-Torches...)

Pm



More information about the pmwiki-users mailing list