--- brilliant_gallery.module.original	2008-02-02 15:24:24.000000000 +0200
+++ brilliant_gallery.module	2008-02-02 15:24:23.000000000 +0200
@@ -214,7 +214,7 @@ function brilliant_gallery_menu() {
   return $items;
 }
 
-function render_brilliant_gallery( $thisfolder = '', $colcountoverride = '', $widthoverride = '', $sortoverride = '', $maximumnumbertoshow = '', $colouroverride = '' ) {
+function render_brilliant_gallery( $thisfolder = '', $colcountoverride = '', $widthoverride = '', $sortoverride = '', $maximumnumbertoshow = '', $colouroverride = '',  $name_override = '') {
          # First some household cleaning. Delete expired cache files at 11:11 (if someone calls this script, of course!)
            if ( date( 'h' ) == '11' and date( 'i' ) == '11' ) {
            #if ( date( 'h' ) == '12' ) {
@@ -289,7 +289,7 @@ function render_brilliant_gallery( $this
 
         $column_count = 0;
         #$pocetobr = 0;
-        $setname = mt_rand( 1, 9999999 );
+        $setname = ($name_override == '') ? mt_rand( 1, 9999999 ) : $name_override;
         $result .= '<!-- Brilliant Gallery Table Beginning --><table border="0" rules="none" frame="box" cellpadding="0" cellspacing="0" bgcolor="' . $bgcolour . '"';
         #if ( $thisfolder <> '' ) {
              #$result .= ' align="center"';
@@ -444,7 +444,7 @@ function replace_brilliant_gallery_tags(
                    $orig_match[] = $match;
                    $match = substr( $match, 1, ( strlen( $match ) - 2 ) );
                    $match = explode( "|", $match );
-                   $matchlink[] = render_brilliant_gallery( $match[1], $match[2], $match[3], $match[4], $match[5], $match[6] );
+                   $matchlink[] = render_brilliant_gallery( $match[1], $match[2], $match[3], $match[4], $match[5], $match[6], $match[7] );
                  }
          $str = str_replace( $orig_match, $matchlink, $str );
          return $str;
