--- fast_gallery.module.org	2008-11-03 01:26:05.000000000 -0500
+++ fast_gallery.module	2008-11-13 23:33:40.000000000 -0500
@@ -6,17 +6,56 @@
  * Fast Gallery allows you to build galleries based on your file 
  * system with folders and subfolders.
  * 
- * This module is sponsored by Schär Webdesign.
+ * This module is sponsored by Schï¿½r Webdesign.
  * Visit www.schaerwebdesign.ch or the Drupal-related blog www.rapsli.ch.
  *
  * This version is a rewrite of the version 6.x code.
  * This version written by Nicholas C. Yang - www.nyanginator.com.
  *
- * Original version by Raphael Schär - www.schaerwebdesign.ch.
+ * Original version by Raphael Schï¿½r - www.schaerwebdesign.ch.
  *
- * @author Raphael Schär - www.schaerwebdesign.ch
+ * @author Raphael Schï¿½r - www.schaerwebdesign.ch
  * @author Nicholas C. Yang - www.nyanginator.com
  */
+# Implementation of hook_filter().
+function fast_gallery_filter($op, $delta = 0, $format = -1, $text = '') {
+  switch ($op) {
+    case 'no cache':
+      return true; # See http://drupal.org/node/194318#comment-640952
+
+    case 'list':
+      return array(0 => t('Fast Gallery Tag'));
+
+    case 'description':
+      return t('Substitutes a special Fast Gallery Tag with the actual gallery table.');
+
+    case 'prepare':
+      return $text;
+
+    case 'process':
+      # process it here........
+      $text = replace_fast_gallery_tags( $text );
+      return $text;
+  }
+}
+
+function replace_fast_gallery_tags($text) {
+  if (preg_match_all("/\[fg?:([^=\]]+)=?([^=\]]+)?=?([^\]]*)?\]/i", $text, $match)) {
+     foreach ($match[2] as $key => $value) {
+       $gallery = $match[1][$key];
+       $fulltag = $match[0][$key];
+     }
+    $fg_path = variable_get('fast_gallery_path_alias', 'fast_gallery');
+    $q = $_GET['q'];
+    $_GET['q'] = drupal_get_normal_path($fg_path .'/' . $gallery);
+    $output = menu_execute_active_handler();
+    $text = str_replace($fulltag, $output, $text);
+    $_GET['q'] = $q;
+  }
+
+  return $text;
+}
+
 
 function _fast_gallery_get_alias_count() {
   return count(explode('/', variable_get('fast_gallery_path_alias', 'fast_gallery')));
@@ -244,6 +283,7 @@ function fast_gallery_page() {
   drupal_add_css($path . '/fast_gallery.css', 'module', 'all', FALSE);
 
   $ar_path = arg();
+//print_r( $ar_path);
 
   // Handle base directory path
   if (count($ar_path) == _fast_gallery_get_alias_count()) {
@@ -618,7 +658,7 @@ function theme_fast_gallery($ar_pics, $a
       break;
     }
     else {
-      $breadcrumb .= l($value, $base_path .'/' . $path) . ' ' . htmlentities('»') . ' ';
+      $breadcrumb .= l($value, $base_path .'/' . $path) . ' ' . htmlentities('ï¿½') . ' ';
     }
     ++$i;
   }
