Index: /extensions/Copyrights/batch_global.php
===================================================================
--- /extensions/Copyrights/batch_global.php	(revision 11438)
+++ /extensions/Copyrights/batch_global.php	(revision 11439)
@@ -16,34 +16,33 @@
 function copyrights_batch_global()
 {
-  global $template;
+	global $template;
 
-  load_language('plugin.lang', dirname(__FILE__).'/');					// Engels is voorlopig goed zat
+	load_language('plugin.lang', dirname(__FILE__).'/');
 
-  // Assign the template for batch management
-  $template->set_filename('batch_global', dirname(__FILE__).'/batch_global.tpl');
+	// Assign the template for batch management
+	$template->set_filename('batch_global', dirname(__FILE__).'/batch_global.tpl');
 
-  // Fetch all the copyrights and assign them to the template
-  $query = sprintf(
-    'SELECT `cr_id`,`name`
-    FROM %s
-    WHERE `visible`<>0
-    ;',
-    COPYRIGHTS_ADMIN);
-  $result = pwg_query($query);
-  $CRoptions = array();
-  while ($row = pwg_db_fetch_assoc($result)) {
-    $CRoptions[$row['cr_id']] = $row['name'];
-  }
-  $template->assign('CRoptions', $CRoptions);
+	// Fetch all the copyrights and assign them to the template
+	$query = sprintf(
+		'SELECT `cr_id`,`name`
+		FROM %s
+		WHERE `visible`<>0
+		;',
+	COPYRIGHTS_ADMIN);
+	$result = pwg_query($query);
+	$CRoptions = array();
+	while ($row = pwg_db_fetch_assoc($result)) {
+		$CRoptions[$row['cr_id']] = $row['name'];
+	}
+	$template->assign('CRoptions', $CRoptions);
 
-  
-  // Goed, ik weet dus echt niet waarom dit hieronder gedaan wordt...
-  // AHA!!!! - dit is er zodat de "choose action" optie deze plugin gebruikt....
-  $template->append('element_set_global_plugins_actions', array(
-    'ID' => 'copyrights',	// ID of the batch manager action
-    'NAME' => l10n('Edit copyright'), // Description of the batch manager action
-    'CONTENT' => $template->parse('batch_global', true)
-    )
-  );
+
+	// Add info on the "choose action" dropdown in the batch manager
+	$template->append('element_set_global_plugins_actions', array(
+		'ID' => 'copyrights',	// ID of the batch manager action
+		'NAME' => l10n('Edit copyright'), // Description of the batch manager action
+		'CONTENT' => $template->parse('batch_global', true)
+	)
+	);
 }
 
@@ -53,36 +52,37 @@
 function copyrights_batch_global_submit($action, $collection)
 {
-  if ($action == 'copyrights')
-  {
-	  $crID = pwg_db_real_escape_string($_POST['copyrightID']);
-    
-    if (count($collection) > 0) {
-      $query = sprintf(
-        'DELETE
-        FROM %s
-        WHERE media_id IN (%s)
-        ;',
-        COPYRIGHTS_MEDIA, implode(',', $collection));
-      pwg_query($query);
-    }
+	// If its our plugin that is called
+	if ($action == 'copyrights')
+	{
+		$crID = pwg_db_real_escape_string($_POST['copyrightID']);
 
-    $edits = array();
-    foreach ($collection as $image_id)
-    {
-      array_push(
-        $edits,
-        array(
-          'media_id' => $image_id,
-          'cr_id' => $crID,
-          )
-        );
-    }
+		if (count($collection) > 0) {
+		$query = sprintf(
+				'DELETE
+				FROM %s
+				WHERE media_id IN (%s)
+				;',
+			COPYRIGHTS_MEDIA, implode(',', $collection));
+			pwg_query($query);
+		}
 
-    mass_inserts(
-      COPYRIGHTS_MEDIA, // Table name
-      array_keys($edits[0]), //Columns
-      $edits // Data
-    );
-  }
+		$edits = array();
+		foreach ($collection as $image_id)
+		{
+			array_push(
+				$edits,
+				array(
+					'media_id' => $image_id,
+					'cr_id' => $crID,
+				)
+			);
+		}
+
+		mass_inserts(
+			COPYRIGHTS_MEDIA,		// Table name
+			array_keys($edits[0]),	//Columns
+			$edits					// Data
+		);
+	}
 }
 
Index: /extensions/Copyrights/batch_single.php
===================================================================
--- /extensions/Copyrights/batch_single.php	(revision 11438)
+++ /extensions/Copyrights/batch_single.php	(revision 11439)
@@ -10,8 +10,34 @@
 add_event_handler('loc_begin_admin', 'set_prefilter_batch_single', 55 );
 
+// Change the variables used by the function that changes the template
+//add_event_handler('loc_begin_admin', 'copyrights_add_bsm_vars_to_template');
+
 function set_prefilter_batch_single()
 {
+	//mail("matheiusb@gmail.com", "Content of $content", $content);
 	global $template;
-	$template->set_prefilter('picture', 'copyrights_batch_single');
+	$template->set_prefilter('batch_manager_unit', 'copyrights_batch_single');
+}
+
+function copyrights_batch_single($content, &$smarty)
+{
+	//mail("matheiusb@gmail.com", "Content of $content", $content);
+	//$content = $content.'<div>DWO TEST</div>';
+	return $content;
+}
+
+function copyrights_add_bsm_vars_to_template()
+{
+	//global $page, $template, $prefixeTable;
+
+	// Show block only on the photo page
+	//if ( !empty($page['image_id']) )   
+	//{
+		// Sending data to the template
+		//$template->assign(
+		//array	(
+		//'CR_TEST' => 'TEST'
+		//		));
+	//}
 }
 
Index: /extensions/Copyrights/image.php
===================================================================
--- /extensions/Copyrights/image.php	(revision 11438)
+++ /extensions/Copyrights/image.php	(revision 11439)
@@ -16,6 +16,8 @@
 add_event_handler('loc_begin_picture', 'copyrights_set_prefilter_add_to_pic_info', 55 );
 
-// Another function of which i cant see the use ;-)
+// Change the variables used by the function that changes the template
 add_event_handler('loc_begin_picture', 'copyrights_add_vars_to_template');
+
+// The big question is - WHY THIS WAY!!!
 
 function copyrights_set_prefilter_add_to_pic_info()
@@ -42,5 +44,4 @@
 	</tr>
 	<tr id="datecreate">';
-	// "Copyright" label is nog hardcoded - moet een @translate achter van de smarty, maar dat laat ik maar aan Johan over =P
 
 	return preg_replace($search, $replacement, $content);
@@ -49,12 +50,12 @@
 function copyrights_add_vars_to_template()
 {
-// For as far as i know i only need the $prefixtable, $page and $template
-//global $conf, $page, $template, $tab, $cit, $nbr, $prefixeTable;
-global $page, $template, $prefixeTable;
-//load_language('plugin.lang', ADDINFO_PATH);
-//load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) );
+	// For as far as i know i only need the $prefixtable, $page and $template
+	//global $conf, $page, $template, $tab, $cit, $nbr, $prefixeTable;
+	global $page, $template, $prefixeTable;
+	//load_language('plugin.lang', ADDINFO_PATH);
+	//load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) );
 
 	// Show block only on the photo page
-	if ( !empty($page['image_id']) )   
+	if ( !empty($page['image_id']) )
 	{
 		// Get the copyright name and url (FROM cr_admin) that belongs to the current media_item (FROM cr_media)
