summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-content/smarty-plugins/function.googleit.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-inst/wp-content/smarty-plugins/function.googleit.php')
-rw-r--r--wp-inst/wp-content/smarty-plugins/function.googleit.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/wp-inst/wp-content/smarty-plugins/function.googleit.php b/wp-inst/wp-content/smarty-plugins/function.googleit.php
new file mode 100644
index 0000000..1b896e1
--- /dev/null
+++ b/wp-inst/wp-content/smarty-plugins/function.googleit.php
@@ -0,0 +1,38 @@
+<?php
+
+/* $Id: function.googleit.php,v 1.1.1.1 2004/10/14 12:07:23 donncha Exp $ */
+
+/*
+ Smarty plugin
+ -------------------------------------------------------------
+ File: function.googleit.php
+ Type: function
+ Name: googleit
+ Purpose: Return google search for string.
+ -------------------------------------------------------------
+
+ COPYRIGHT Donncha O Caoimh.
+
+ $Id: function.googleit.php,v 1.1.1.1 2004/10/14 12:07:23 donncha Exp $
+*/
+
+function smarty_function_googleit($params, &$smarty)
+{
+ extract( $params );
+ if( $search != '' )
+ {
+ $search1 = str_replace( " ", "+", $search );
+ echo '<a href="http://www.google.com/search?q=' . strip_tags( $search1 ).'" title="Search for '. strip_tags( $search ).'">';
+ if( $link != '' )
+ {
+ echo $link;
+ }
+ else
+ {
+ echo "Search";
+ }
+ echo '</a>';
+ }
+
+}
+?>