The Modified Version of phoogle WordPress plugin - Eliminating the needs of Exec-PHP
Posted by Daniel - 407 Views
This is the modified version of phoogle plugin for WordPress. phoogle is a WordPress plugin to display Google Map within your post. The Original version requires the installation of Exec-PHP, another wordpress plugin to allow the execution of php script on your post.
I don’t have Exec-PHP installed and I have no intention to install it, so here it is the result of my modification on the original phoogle. Now it doesn’t require Exec-PHP and I am glad I had it done. Usage Example can be found here.
If you are wondering what kind of modifications I did so phoogle can display the Google Map without the Exec-PHP, here is the explanation:
Lets talk about the spec first. I want to insert a tag inside the post that will look like this:
or
and then I want the phoogle parses that tag to get the latitude and the longitude then it will render the Map inside the post right on the position of the tag.
To do that I had modified the addGeoPoint() function and addAddress() function then created another function that will parse the tag and then returns the post content with the map rendering code inserted.
This is the modified addGeoPoint() function:
The addAddress() function is too long to be placed here (I don’t like long post). If you’re interested you can just check the sourcecode, it’s all there.
This is the function to parse the tag and the one that will trigger the appropriate function:
$content = preg_replace(‘#\[gm point="(.*?):(.*?):(.*?)"\]#sie’, ‘addGeoPoint(\’\\1\’, \’\\2\’, \’\\3\’);’, $content);
$content = preg_replace(‘#\[gm address="(.*?):(.*?)"\]#sie’, ‘addAddress(\’\\1\’, \’\\2\’);’, $content);
return $content;
}
Last step, I put the GetPointThenParseIt($content) function as a filter on the_content section. Don’t forget to check my other post explaining the usage example of phoogle plugin.
Get modifed phoogle plugin (8 KB)
__________________________
The following posts are programmatically considered as related to the current post by YARPP Plugin:
- The Code Snippet Plugin, my favourite syntax highlighter plugin for WordPress
- SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni’s Smart Image Resizer
- Installing Apache, PHP, MySQL and Wordpress on Windows Platform - Part 1
- Installing Apache, PHP, MySQL and Wordpress on Windows Platform - Part 2
- ContuttoPDF (Wordpress Plugin to convert your Content to PDF)
Related posts brought to you by Yet Another Related Posts Plugin.
Latest from Programming
- Microsoft Excel Import External Data Problem: When Microsoft Query doesn’t recognize some of your parameters
- SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni’s Smart Image Resizer
- Resize Image or Crop Image with Joe Lencioni’s Smart Image Resizer, WordPress Setup
- Free Softwares to help you learn Regular Expression or to enhance your RegEx skill
- ConsoleProgressBar - Simple Progress Bar Function for your VB.Net Console Application
Leave a Reply
Latest Blog Entries
- Microsoft Excel Import External Data Problem: When Microsoft Query doesn’t recognize some of your parameters
- The Lack of Chances is the Source of Poverty, Can we make a different?
- SmartFTP Client is no longer Free. What would be the best replacement for it?
- Kantaris Media Player, The most suitable Free Media Player on my Audio Environment
- TCPView for Windows, Tool to check TCP and UDP Connections on your system
- SmartImageResizer Plugin, WordPress plugin based on Joe Lencioni’s Smart Image Resizer
- Resize Image or Crop Image with Joe Lencioni’s Smart Image Resizer, WordPress Setup
Categories
Neighbours and Friends
Login Here
Comments - Thanks Guys :)
Coarveadvexon: As the call, so the echo :D Coarveadvexon’s last blog post: Ford Kuga 2.5 Turbo
Chat: nice thank you very much for this article.
a_suliman: thanx for every thing
Miss Lunatic: Jaja, it’s a yolk. Thanks for the compliment ;) Miss Lunatic’s last blog post: Pitas y guacamole
Miss Lunatic: Thank you! Your style css is awesome. I’m going to start customizing with it. Thank you :D Miss Lunatic’s last blog...
Most Popular Entries
- Passing arguments to your VB.NET console application
- ASCII To PDU Converter (Convert ASCII to PDU and vice versa)
- An example: Using CPort Delphi Component to read data from your cellphone
- ConsoleProgressBar - Simple Progress Bar Function for your VB.Net Console Application
- Replacing and filtering text with regular expression using Delphi, Visual Basic and ASP
Software Collections
- SmartFTP Client is no longer Free. What would be the best replacement for it?
- Kantaris Media Player, The most suitable Free Media Player on my Audio Environment
- TCPView for Windows, Tool to check TCP and UDP Connections on your system
- The Code Snippet Plugin, my favourite syntax highlighter plugin for WordPress
- ContuttoPDF (Wordpress Plugin to convert your Content to PDF)
Blogging Related Stuff
- Change the WordPress permalink structure to the best format, and yes it’s a little bit scary :D
- Something is wrong, the Google Search Result from my blog looks bad, don’t laugh please :D
- Several tips to reduce Blog Noise, especially when your blog covers more than one niche
- How to remove your indexed pages or even your entire site from Google and Yahoo!

















