<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>WordPress DK Forum Tag: plug-in omkodning nextGEN gallery - Recent Topics</title>
		<link>http://wp-danmark.dk/forum/tags/plug-in-omkodning-nextgen-gallery</link>
		<description>WordPress DK Forum Tag: plug-in omkodning nextGEN gallery - Recent Topics</description>
		<language>da-DK</language>
		<pubDate>Sat, 01 Aug 2026 10:10:50 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Søg]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://wp-danmark.dk/forum/search.php</link>
		</textInput>
		<atom:link href="http://wp-danmark.dk/forum/rss/tags/plug-in-omkodning-nextgen-gallery/topics" rel="self" type="application/rss+xml" />

		<item>
			<title>longkyle om "Hjælp! omkodning."</title>
			<link>http://wp-danmark.dk/forum/topic/hj%c3%a6lp-omkodning#post-4453</link>
			<pubDate>man, 07 jan 2008 00:01:18 +0000</pubDate>
			<dc:creator>longkyle</dc:creator>
			<guid isPermaLink="false">4453@http://wp-danmark.dk/forum/</guid>
			<description>&#60;p&#62;Jeg har et spørgsmål vedrørende hvorhenne jeg retter i koden, så jeg ikke får et link til &#34;full size&#34; (vist på billedeksemplet med en rød ring) Jeg vil gerne have man skal blive på siden og ikke få vist billedet i et nyt vindue.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://Billedeupload.dk/showpic-181.jpg&#34; rel=&#34;lightbox4453&#34;&#62;&#60;img src=&#34;http://wp-danmark.dk/forum/tumbs/tumb_2a7adb7c83738841765f013c42a54b19_showpic-181.jpg&#34; /&#62;&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;ex. nedenfor:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://Billedeupload.dk/showpic-181.jpg&#34; rel=&#34;nofollow&#34;&#62;http://Billedeupload.dk/showpic-181.jpg&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Jeg bruger et plug-in der hedder &#34;nextGEN gallery&#34;. Er ellers fuldt ud tilfreds med det.&#60;br /&#62;
Lægger hermed nggallery.php med så en forhåbentlig en venlig sjæl kan sige mig hvor jeg skal rette henne og evt. til hvad.&#60;/p&#62;
&#60;p&#62;&#38;lt;?php&#60;br /&#62;
/*&#60;br /&#62;
Plugin Name: NextGEN Gallery&#60;br /&#62;
Plugin URI: &#60;a href=&#34;http://alexrabe.boelinger.com/?page_id=80&#34; rel=&#34;nofollow&#34;&#62;http://alexrabe.boelinger.com/?page_id=80&#60;/a&#62;&#60;br /&#62;
Description: A NextGENeration Photo gallery for the WEB2.0(beta).&#60;br /&#62;
Author: NextGEN DEV-Team&#60;br /&#62;
Version: 0.74&#60;/p&#62;
&#60;p&#62;Author URI: &#60;a href=&#34;http://alexrabe.boelinger.com/&#34; rel=&#34;nofollow&#34;&#62;http://alexrabe.boelinger.com/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Copyright 2007 by Alex Rabe &#38;#38; NextGEN DEV-Team&#60;/p&#62;
&#60;p&#62;The NextGEN button is taken from the Silk set of FamFamFam. See more at&#60;br /&#62;
&#60;a href=&#34;http://www.famfamfam.com/lab/icons/silk/&#34; rel=&#34;nofollow&#34;&#62;http://www.famfamfam.com/lab/icons/silk/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;This program is free software; you can redistribute it and/or modify&#60;br /&#62;
it under the terms of the GNU General Public License as published by&#60;br /&#62;
the Free Software Foundation; either version 2 of the License, or&#60;br /&#62;
(at your option) any later version.&#60;/p&#62;
&#60;p&#62;This program is distributed in the hope that it will be useful,&#60;br /&#62;
but WITHOUT ANY WARRANTY; without even the implied warranty of&#60;br /&#62;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&#60;br /&#62;
GNU General Public License for more details.&#60;/p&#62;
&#60;p&#62;You should have received a copy of the GNU General Public License&#60;br /&#62;
along with this program; if not, write to the Free Software&#60;br /&#62;
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA&#60;/p&#62;
&#60;p&#62;*/ &#60;/p&#62;
&#60;p&#62;//#################################################################&#60;br /&#62;
// Stop direct call&#60;br /&#62;
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }&#60;/p&#62;
&#60;p&#62;//#################################################################&#60;br /&#62;
// Let's Go&#60;/p&#62;
&#60;p&#62;global $wpdb, $wp_version;&#60;/p&#62;
&#60;p&#62;// ini_set('display_errors', '1');&#60;br /&#62;
// ini_set('error_reporting', E_ALL);&#60;/p&#62;
&#60;p&#62;//This works only in WP2.1 or higher&#60;br /&#62;
if (version_compare($wp_version, '2.1', '&#38;gt;=')) {&#60;/p&#62;
&#60;p&#62;// Permission settings ############################################&#60;br /&#62;
define('NGGFOLDER_PERMISSION', 0777);&#60;br /&#62;
define('NGGFILE_PERMISSION', 0666);&#60;br /&#62;
// ################################################################&#60;/p&#62;
&#60;p&#62;// Version and path to check version&#60;br /&#62;
define('NGGVERSION', &#34;0.74&#34;);&#60;br /&#62;
define('NGGURL', &#34;http://nextgen.boelinger.com/version.php&#34;);&#60;/p&#62;
&#60;p&#62;// define URL&#60;br /&#62;
$myabspath = str_replace(&#34;\\&#34;,&#34;/&#34;,ABSPATH);  // required for Windows &#38;#38; XAMPP&#60;br /&#62;
define('WINABSPATH', $myabspath);&#60;br /&#62;
define('NGGFOLDER', dirname(plugin_basename(__FILE__)));&#60;br /&#62;
define('NGGALLERY_ABSPATH', $myabspath.'wp-content/plugins/' . NGGFOLDER .'/');&#60;br /&#62;
define('NGGALLERY_URLPATH', get_option('siteurl').'/wp-content/plugins/' . NGGFOLDER.'/');&#60;/p&#62;
&#60;p&#62;// look for imagerotator&#60;br /&#62;
define('NGGALLERY_IREXIST', file_exists(NGGALLERY_ABSPATH.'imagerotator.swf'));&#60;/p&#62;
&#60;p&#62;// get value for safe mode&#60;br /&#62;
if ((gettype(ini_get('safe_mode')) == 'string')) {&#60;br /&#62;
	// if sever did in in a other way&#60;br /&#62;
	if (ini_get('safe_mode') == 'off') define('SAFE_MODE', FALSE);&#60;br /&#62;
	else define('SAFE_MODE', ini_get('safe_mode'));&#60;br /&#62;
} else&#60;br /&#62;
define('SAFE_MODE', ini_get('safe_mode'));&#60;/p&#62;
&#60;p&#62;//read the options&#60;br /&#62;
$ngg_options = get_option('ngg_options');&#60;/p&#62;
&#60;p&#62;// add database pointer&#60;br /&#62;
$wpdb-&#38;gt;nggpictures					= $wpdb-&#38;gt;prefix . 'ngg_pictures';&#60;br /&#62;
$wpdb-&#38;gt;nggallery					= $wpdb-&#38;gt;prefix . 'ngg_gallery';&#60;br /&#62;
$wpdb-&#38;gt;nggalbum						= $wpdb-&#38;gt;prefix . 'ngg_album';&#60;br /&#62;
$wpdb-&#38;gt;nggtags						= $wpdb-&#38;gt;prefix . 'ngg_tags';&#60;br /&#62;
$wpdb-&#38;gt;nggpic2tags					= $wpdb-&#38;gt;prefix . 'ngg_pic2tags';&#60;/p&#62;
&#60;p&#62;// Load language&#60;br /&#62;
function nggallery_init ()&#60;br /&#62;
{&#60;br /&#62;
	load_plugin_textdomain('nggallery','wp-content/plugins/' . NGGFOLDER.'/lang');&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// Load admin panel&#60;br /&#62;
include_once (dirname (__FILE__).&#34;/ngginstall.php&#34;);&#60;br /&#62;
include_once (dirname (__FILE__).&#34;/nggfunctions.php&#34;);&#60;br /&#62;
include_once (dirname (__FILE__).&#34;/admin/admin.php&#34;);&#60;/p&#62;
&#60;p&#62;// load gallery class&#60;br /&#62;
require_once (dirname (__FILE__).'/lib/nggallery.lib.php');&#60;br /&#62;
$nggallery = new nggallery();&#60;/p&#62;
&#60;p&#62;// add javascript to header&#60;br /&#62;
add_action('wp_head', 'ngg_addjs', 1);&#60;br /&#62;
function ngg_addjs() {&#60;br /&#62;
    global $wp_version, $ngg_options;&#60;/p&#62;
&#60;p&#62;	echo &#34;&#38;lt;meta name='NextGEN' content='&#34;.NGGVERSION.&#34;' /&#38;gt;\n&#34;;&#60;br /&#62;
	if ($ngg_options['activateCSS'])&#60;br /&#62;
		echo &#34;\n&#34;.'&#38;lt;style type=&#34;text/css&#34; media=&#34;screen&#34;&#38;gt;@import &#34;'.NGGALLERY_URLPATH.'css/'.$ngg_options[CSSfile].'&#34;;&#38;lt;/style&#38;gt;';&#60;br /&#62;
	if ($ngg_options['thumbEffect'] == &#34;thickbox&#34;) {&#60;br /&#62;
		echo &#34;\n&#34;.'&#38;lt;script type=&#34;text/javascript&#34;&#38;gt; var tb_pathToImage = &#34;'.NGGALLERY_URLPATH.'thickbox/'.$ngg_options[thickboxImage].'&#34;;&#38;lt;/script&#38;gt;';&#60;br /&#62;
		echo &#34;\n&#34;.'&#38;lt;style type=&#34;text/css&#34; media=&#34;screen&#34;&#38;gt;@import &#34;'.NGGALLERY_URLPATH.'thickbox/thickbox.css&#34;;&#38;lt;/style&#38;gt;'.&#34;\n&#34;;&#60;br /&#62;
	    if ($wp_version &#38;lt; &#34;2.3&#34;) {&#60;br /&#62;
	    	if ($wp_version &#38;gt; &#34;2.1.3&#34;) wp_deregister_script('jquery');&#60;br /&#62;
	    	wp_enqueue_script('jquery', NGGALLERY_URLPATH .'admin/js/jquery.js', FALSE, '1.1.3.1');&#60;br /&#62;
		}&#60;br /&#62;
	    	wp_enqueue_script('thickbox', NGGALLERY_URLPATH .'thickbox/thickbox-pack.js', array('jquery'), '3.1.1');&#60;/p&#62;
&#60;p&#62;    	// add NextGEN jQuery Plugin&#60;br /&#62;
		if ($ngg_options['galUsejQuery'])&#60;br /&#62;
			wp_enqueue_script('nextgen', NGGALLERY_URLPATH .'admin/js/jquery.nextgen.pack.js', array('jquery'), '0.5');&#60;br /&#62;
			//TODO: NEW AJAX Version&#60;br /&#62;
			// wp_enqueue_script('nextgen-ajax', NGGALLERY_URLPATH .'admin/js/jquery.nextgen.ajax.js', array('jquery'), '0.1');&#60;br /&#62;
			// wp_enqueue_script('blockui', NGGALLERY_URLPATH .'admin/js/jquery.blockUI.js', array('jquery'), '0.1');&#60;br /&#62;
	    }&#60;/p&#62;
&#60;p&#62;	// test for wordTube function&#60;br /&#62;
	if (!function_exists('integrate_swfobject')) {&#60;br /&#62;
		wp_enqueue_script('swfobject', NGGALLERY_URLPATH .'js/swfobject.js', FALSE, '1.5');&#60;br /&#62;
	}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// load language file&#60;br /&#62;
add_action('init', 'nggallery_init');&#60;/p&#62;
&#60;p&#62;add_action('activate_' . NGGFOLDER.'/nggallery.php', 'ngg_install');&#60;br /&#62;
// init tables in wp-database if plugin is activated&#60;br /&#62;
function ngg_install() {&#60;br /&#62;
	nggallery_install();&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// Action calls for all functions&#60;br /&#62;
add_filter('the_content', 'searchnggallerytags');&#60;br /&#62;
add_filter('the_excerpt', 'searchnggallerytags');&#60;/p&#62;
&#60;p&#62;//#################################################################&#60;br /&#62;
// add action/filter for the upload tab&#60;br /&#62;
add_action('upload_files_ngg_gallery', 'ngg_action_upload_Tab');&#60;br /&#62;
add_filter('wp_upload_tabs', 'ngg_wp_upload_tabs');&#60;/p&#62;
&#60;p&#62;function ngg_action_upload_Tab() {&#60;br /&#62;
	// execute when click on the tab&#60;br /&#62;
	global $style;&#60;br /&#62;
	if ( 'inline' == $style )&#60;br /&#62;
		wp_enqueue_script('nggadmintab', NGGALLERY_URLPATH .'js/nggadmintab-js.php', array('prototype'), '0.6');&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;function ngg_wp_upload_tabs ($array) {&#60;/p&#62;
&#60;p&#62;	global $wpdb;&#60;/p&#62;
&#60;p&#62;    /*&#60;br /&#62;
    0 =&#38;gt; tab display name,&#60;br /&#62;
    1 =&#38;gt; required cap / role,&#60;br /&#62;
    2 =&#38;gt; function that produces tab content,&#60;br /&#62;
    3 =&#38;gt; total number objects OR array(total, objects per page),&#60;br /&#62;
    4 =&#38;gt; add_query_args&#60;br /&#62;
	*/&#60;br /&#62;
	include_once (dirname (__FILE__).&#34;/nggadmintab.php&#34;);&#60;/p&#62;
&#60;p&#62;	// Create navigation&#60;br /&#62;
	$total = 1;&#60;br /&#62;
	if ($_GET['select_gal']){&#60;br /&#62;
		$galleryID = $_GET['select_gal'];&#60;br /&#62;
		$total = $wpdb-&#38;gt;get_var(&#34;SELECT COUNT(*) FROM $wpdb-&#38;gt;nggpictures WHERE galleryid = '$galleryID'&#34;);&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	$tab = array(&#60;br /&#62;
            'ngg_gallery' =&#38;gt; array(__('Gallery','nggallery'), 'NextGEN Use TinyMCE', 'ngg_upload_tab_content', array($total, 10))&#60;br /&#62;
    );&#60;/p&#62;
&#60;p&#62;    return array_merge($array,$tab);&#60;br /&#62;
}&#60;br /&#62;
//#################################################################&#60;br /&#62;
// TinyMCE Button Integration&#60;/p&#62;
&#60;p&#62;// Load the Script for the Button&#60;br /&#62;
function insert_nextgen_script() {	&#60;/p&#62;
&#60;p&#62; 	//TODO: Do with WP2.1 Script Loader&#60;br /&#62;
 	// Thanks for this idea to &#60;a href=&#34;http://www.jovelstefan.de&#34; rel=&#34;nofollow&#34;&#62;http://www.jovelstefan.de&#60;/a&#62;&#60;br /&#62;
	echo &#34;\n&#34;.&#34;&#60;br /&#62;
	&#38;lt;script type='text/javascript'&#38;gt;&#60;br /&#62;
		function ngg_buttonscript()	{&#60;br /&#62;
		if(window.tinyMCE) {&#60;/p&#62;
&#60;p&#62;			var template = new Array();&#60;/p&#62;
&#60;p&#62;			template['file'] = '&#34;.NGGALLERY_URLPATH.&#34;nggbutton.php';&#60;br /&#62;
			template['width'] = 360;&#60;br /&#62;
			template['height'] = 210;&#60;/p&#62;
&#60;p&#62;			args = {&#60;br /&#62;
				resizable : 'no',&#60;br /&#62;
				scrollbars : 'no',&#60;br /&#62;
				inline : 'yes'&#60;br /&#62;
			};&#60;/p&#62;
&#60;p&#62;			tinyMCE.openWindow(template, args);&#60;br /&#62;
			return true;&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;br /&#62;
	&#38;lt;/script&#38;gt;&#34;;&#60;br /&#62;
	return;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;function ngg_addbuttons() {&#60;/p&#62;
&#60;p&#62;	global $wp_db_version;&#60;/p&#62;
&#60;p&#62;	// Don't bother doing this stuff if the current user lacks permissions&#60;br /&#62;
	if ( !current_user_can('edit_posts') &#38;#38;&#38;#38; !current_user_can('edit_pages') ) return;&#60;/p&#62;
&#60;p&#62;	// Check for NextGEN capability&#60;br /&#62;
	if ( !current_user_can('NextGEN Use TinyMCE') ) return;&#60;/p&#62;
&#60;p&#62;	// Add only in Rich Editor mode&#60;br /&#62;
	if ( get_user_option('rich_editing') == 'true') {&#60;/p&#62;
&#60;p&#62;	// add the button for wp21 in a new way&#60;br /&#62;
		add_filter(&#34;mce_plugins&#34;, &#34;nextgen_button_plugin&#34;, 5);&#60;br /&#62;
		add_filter('mce_buttons', 'nextgen_button', 5);&#60;br /&#62;
		add_action('tinymce_before_init','nextgen_button_script');&#60;br /&#62;
		}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// used to insert button in wordpress 2.1x editor&#60;br /&#62;
function nextgen_button($buttons) {&#60;/p&#62;
&#60;p&#62;	array_push($buttons, &#34;separator&#34;, &#34;NextGEN&#34;);&#60;br /&#62;
	return $buttons;&#60;/p&#62;
&#60;p&#62;}&#60;/p&#62;
&#60;p&#62;// Tell TinyMCE that there is a plugin (wp2.1)&#60;br /&#62;
function nextgen_button_plugin($plugins) {    &#60;/p&#62;
&#60;p&#62;	array_push($plugins, &#34;-NextGEN&#34;);&#60;br /&#62;
	return $plugins;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// Load the TinyMCE plugin : editor_plugin.js (wp2.1)&#60;br /&#62;
function nextgen_button_script() {	&#60;/p&#62;
&#60;p&#62; 	$pluginURL =  NGGALLERY_URLPATH.'js/';&#60;br /&#62;
	echo 'tinyMCE.loadPlugin(&#34;NextGEN&#34;, &#34;'.$pluginURL.'&#34;);' . &#34;\n&#34;;&#60;br /&#62;
	return;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// init process for button control&#60;br /&#62;
add_action('init', 'ngg_addbuttons');&#60;br /&#62;
add_action('edit_page_form', 'insert_nextgen_script');&#60;br /&#62;
add_action('edit_form_advanced', 'insert_nextgen_script');&#60;/p&#62;
&#60;p&#62;//#################################################################&#60;/p&#62;
&#60;p&#62;} else {&#60;br /&#62;
	add_action('admin_notices', create_function('', 'echo \'&#38;lt;div id=&#34;message&#34; class=&#34;error fade&#34;&#38;gt;&#38;lt;p&#38;gt;&#60;strong&#62;' . __('Sorry, NextGEN Gallery works only under WordPress 2.1 or higher',&#34;nggallery&#34;) . '&#60;/strong&#62;&#38;lt;/p&#38;gt;&#38;lt;/div&#38;gt;\';'));&#60;br /&#62;
}// End Check for WP 2.1&#60;br /&#62;
?&#38;gt;&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Der er også en widget-del... den kommer hermed her, hvis det er her jeg skal rette noget:&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;&#38;lt;?php&#60;br /&#62;
/*&#60;br /&#62;
Plugin Name: NextGEN Gallery Widget&#60;br /&#62;
Description: Adds a sidebar widget support to your NextGEN Gallery&#60;br /&#62;
Author: KeViN&#60;br /&#62;
Version: 1.12&#60;br /&#62;
Author URI: &#60;a href=&#34;http://www.kev.hu&#34; rel=&#34;nofollow&#34;&#62;http://www.kev.hu&#60;/a&#62;&#60;br /&#62;
Plugin URI: &#60;a href=&#34;http://www.kev.hu&#34; rel=&#34;nofollow&#34;&#62;http://www.kev.hu&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;This program is free software; you can redistribute it and/or modify&#60;br /&#62;
it under the terms of the GNU General Public License as published by&#60;br /&#62;
the Free Software Foundation; either version 2 of the License, or&#60;br /&#62;
(at your option) any later version.&#60;/p&#62;
&#60;p&#62;This program is distributed in the hope that it will be useful,&#60;br /&#62;
but WITHOUT ANY WARRANTY; without even the implied warranty of&#60;br /&#62;
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&#60;br /&#62;
GNU General Public License for more details.&#60;/p&#62;
&#60;p&#62;You should have received a copy of the GNU General Public License&#60;br /&#62;
along with this program; if not, write to the Free Software&#60;br /&#62;
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA&#60;/p&#62;
&#60;p&#62;*/ &#60;/p&#62;
&#60;p&#62;function nggGetCSVValues($string,$separator=&#34;,&#34;)&#60;br /&#62;
{&#60;br /&#62;
    $string = str_replace('&#34;&#34;', &#34;'&#34;, $string);&#60;br /&#62;
    // split the string at double quotes &#34;&#60;br /&#62;
    $bits = explode('&#34;',$string);&#60;br /&#62;
    $elements = array();&#60;br /&#62;
    for ( $i=0; $i &#38;lt; count($bits) ; $i++ ) {&#60;br /&#62;
        /*&#60;br /&#62;
        odd numbered elements would have been&#60;br /&#62;
        enclosed by double quotes&#60;br /&#62;
        even numbered elements would not have been&#60;br /&#62;
        */&#60;br /&#62;
        if (($i%2) == 1) {&#60;br /&#62;
            /* if the element number is odd add the&#60;br /&#62;
            whole string  to the output array */&#60;br /&#62;
            $elements[] = $bits[$i];&#60;br /&#62;
        } else&#60;br /&#62;
        {&#60;br /&#62;
            /* otherwise split the unquoted stuff at commas&#60;br /&#62;
            and add the elements to the array */&#60;br /&#62;
            $rest = $bits[$i];&#60;br /&#62;
            $rest = preg_replace(&#34;/^&#34;.$separator.&#34;/&#34;,&#34;&#34;,$rest);&#60;br /&#62;
            $rest = preg_replace(&#34;/&#34;.$separator.&#34;$/&#34;,&#34;&#34;,$rest);&#60;br /&#62;
            $elements = array_merge($elements,explode($separator,$rest));&#60;br /&#62;
        }&#60;br /&#62;
    }&#60;br /&#62;
    return $elements;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**********************************************************/&#60;br /&#62;
/* Slidehow widget function&#60;br /&#62;
/**********************************************************/&#60;br /&#62;
function nggSlideshowWidget($galleryID,$irWidth,$irHeight) {&#60;/p&#62;
&#60;p&#62;	// Check for NextGEN Gallery&#60;br /&#62;
	if ( !function_exists('nggShowSlideshow') )&#60;br /&#62;
		return;	&#60;/p&#62;
&#60;p&#62;	global $wpdb;&#60;br /&#62;
	$ngg_options = get_option('ngg_options');&#60;/p&#62;
&#60;p&#62;	if (empty($irWidth) ) $irWidth = $ngg_options[irWidth];&#60;br /&#62;
	if (empty($irHeight)) $irHeight = $ngg_options[irHeight];&#60;/p&#62;
&#60;p&#62;	$replace .= &#34;\n&#34;.'&#38;lt;div class=&#34;ngg-widget-slideshow&#34; id=&#34;ngg_widget_slideshow'.$galleryID.'&#34;&#38;gt;';&#60;br /&#62;
	$replace .= '&#60;a href=&#34;http://www.macromedia.com/go/getflashplayer&#34;&#62;Get the Flash Player&#60;/a&#62; to see the slideshow.&#38;lt;/div&#38;gt;';&#60;br /&#62;
    $replace .= &#34;\n\t&#34;.'&#38;lt;script type=&#34;text/javascript&#34; defer=&#34;defer&#34;&#38;gt;';&#60;br /&#62;
    $replace .= &#34;\n\t&#34;.'&#38;lt;!--';&#60;br /&#62;
	$replace .= &#34;\n\t&#34;.'//&#38;lt;![CDATA[';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'var so = new SWFObject(&#34;'.NGGALLERY_URLPATH.'imagerotator.swf&#34;, &#34;ngg_slideshow'.$galleryID.'&#34;, &#34;'.$irWidth.'&#34;, &#34;'.$irHeight.'&#34;, &#34;7&#34;, &#34;#'.$ngg_options[irBackcolor].'&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'so.addParam(&#34;wmode&#34;, &#34;opaque&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;file&#34;, &#34;'.NGGALLERY_URLPATH.'nggextractXML.php?gid='.$galleryID.'&#34;);';&#60;br /&#62;
	if (!$ngg_options[irShuffle]) $replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;shuffle&#34;, &#34;false&#34;);';&#60;br /&#62;
//	if ($ngg_options[irLinkfromdisplay]) $replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;linkfromdisplay&#34;, &#34;false&#34;);';&#60;br /&#62;
//	if ($ngg_options[irShownavigation]) $replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;shownavigation&#34;, &#34;true&#34;);';&#60;br /&#62;
	if ($ngg_options[irShowicons]) $replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;showicons&#34;, &#34;true&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;overstretch&#34;, &#34;'.$ngg_options[irOverstretch].'&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;backcolor&#34;, &#34;0x'.$ngg_options[irBackcolor].'&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;frontcolor&#34;, &#34;0x'.$ngg_options[irFrontcolor].'&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;lightcolor&#34;, &#34;0x'.$ngg_options[irLightcolor].'&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;rotatetime&#34;, &#34;'.$ngg_options[irRotatetime].'&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;transition&#34;, &#34;'.$ngg_options[irTransition].'&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;width&#34;, &#34;'.$irWidth.'&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'so.addVariable(&#34;height&#34;, &#34;'.$irHeight.'&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t\t&#34;.'so.write(&#34;ngg_widget_slideshow'.$galleryID.'&#34;);';&#60;br /&#62;
	$replace .= &#34;\n\t&#34;.'//]]&#38;gt;';&#60;br /&#62;
	$replace .= &#34;\n\t&#34;.'--&#38;gt;';&#60;br /&#62;
	$replace .= &#34;\n\t&#34;.'&#38;lt;/script&#38;gt;';&#60;/p&#62;
&#60;p&#62;	echo $replace;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**********************************************************/&#60;br /&#62;
/* Slidehow widget control&#60;br /&#62;
/**********************************************************/&#60;br /&#62;
function widget_ngg_slideshow() {&#60;/p&#62;
&#60;p&#62; 	// Check for the required plugin functions.&#60;br /&#62;
	if ( !function_exists('register_sidebar_widget') )&#60;br /&#62;
		return;&#60;/p&#62;
&#60;p&#62;	// Check for NextGEN Gallery&#60;br /&#62;
	if ( !function_exists('nggShowSlideshow') )&#60;br /&#62;
		return;	&#60;/p&#62;
&#60;p&#62;	function widget_show_ngg_slideshow($args) {&#60;/p&#62;
&#60;p&#62;	    extract($args);&#60;/p&#62;
&#60;p&#62;    	// Each widget can store its own options. We keep strings here.&#60;br /&#62;
		$options = get_option('widget_nggslideshow');&#60;/p&#62;
&#60;p&#62;		// These lines generate our output.&#60;br /&#62;
		echo $before_widget . $before_title . $options['title'] . $after_title;&#60;br /&#62;
		$url_parts = parse_url(get_bloginfo('home'));&#60;br /&#62;
		nggSlideshowWidget($options['galleryid'] , $options['width'] , $options['height']);&#60;br /&#62;
		echo $after_widget;&#60;/p&#62;
&#60;p&#62;	}	&#60;/p&#62;
&#60;p&#62;	// Admin section&#60;br /&#62;
	function widget_control_ngg_slideshow() {&#60;br /&#62;
	 	global $wpdb;&#60;br /&#62;
	 	$options = get_option('widget_nggslideshow');&#60;br /&#62;
	 	if ( !is_array($options) )&#60;br /&#62;
			$options = array('title'=&#38;gt;'Slideshow', 'galleryid'=&#38;gt;'0','height'=&#38;gt;'120','width'=&#38;gt;'160',);&#60;/p&#62;
&#60;p&#62;		if ( $_POST['ngg-submit'] ) {&#60;/p&#62;
&#60;p&#62;			$options['title'] = strip_tags(stripslashes($_POST['ngg-title']));&#60;br /&#62;
			$options['galleryid'] = $_POST['ngg-galleryid'];&#60;br /&#62;
			$options['height'] = $_POST['ngg-height'];&#60;br /&#62;
			$options['width'] = $_POST['ngg-width'];&#60;br /&#62;
			update_option('widget_nggslideshow', $options);&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		$title = htmlspecialchars($options['title'], ENT_QUOTES);&#60;br /&#62;
		$height = $options['height'];&#60;br /&#62;
		$width = $options['width'];&#60;/p&#62;
&#60;p&#62;		// The Box content&#60;br /&#62;
		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;ngg-title&#34;&#38;gt;' . __('Title:', 'nggallery') . ' &#38;lt;input style=&#34;width: 200px;&#34; id=&#34;ngg-title&#34; name=&#34;ngg-title&#34; type=&#34;text&#34; value=&#34;'.$title.'&#34; /&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;br /&#62;
		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;ngg-galleryid&#34;&#38;gt;' . __('Select Gallery:', 'nggallery'). ' &#38;lt;/label&#38;gt;';&#60;br /&#62;
		echo '&#38;lt;select size=&#34;1&#34; name=&#34;ngg-galleryid&#34; id=&#34;ngg-galleryid&#34;&#38;gt;';&#60;br /&#62;
			echo '&#38;lt;option value=&#34;0&#34; ';&#60;br /&#62;
			if ($table-&#38;gt;gid == $options['galleryid']) echo &#34;selected='selected' &#34;;&#60;br /&#62;
			echo '&#38;gt;'.__('All images', 'nggallery').'&#38;lt;/option&#38;gt;'.&#34;\n\t&#34;;&#60;br /&#62;
			$tables = $wpdb-&#38;gt;get_results(&#34;SELECT * FROM $wpdb-&#38;gt;nggallery ORDER BY 'name' ASC &#34;);&#60;br /&#62;
			if($tables) {&#60;br /&#62;
				foreach($tables as $table) {&#60;br /&#62;
				echo '&#38;lt;option value=&#34;'.$table-&#38;gt;gid.'&#34; ';&#60;br /&#62;
				if ($table-&#38;gt;gid == $options['galleryid']) echo &#34;selected='selected' &#34;;&#60;br /&#62;
				echo '&#38;gt;'.$table-&#38;gt;name.'&#38;lt;/option&#38;gt;'.&#34;\n\t&#34;;&#60;br /&#62;
				}&#60;br /&#62;
			}&#60;br /&#62;
		echo '&#38;lt;/select&#38;gt;&#38;lt;/p&#38;gt;';&#60;br /&#62;
		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;ngg-height&#34;&#38;gt;' . __('Height:', 'nggallery') . ' &#38;lt;input style=&#34;width: 50px;&#34; id=&#34;ngg-height&#34; name=&#34;ngg-height&#34; type=&#34;text&#34; value=&#34;'.$height.'&#34; /&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;br /&#62;
		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;ngg-width&#34;&#38;gt;' . __('Width:', 'nggallery') . ' &#38;lt;input style=&#34;width: 50px;&#34; id=&#34;ngg-width&#34; name=&#34;ngg-width&#34; type=&#34;text&#34; value=&#34;'.$width.'&#34; /&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;br /&#62;
		echo '&#38;lt;input type=&#34;hidden&#34; id=&#34;ngg-submit&#34; name=&#34;ngg-submit&#34; value=&#34;1&#34; /&#38;gt;';&#60;/p&#62;
&#60;p&#62;	}&#60;/p&#62;
&#60;p&#62;	register_sidebar_widget(array('NextGEN Slideshow', 'widgets'), 'widget_show_ngg_slideshow');&#60;br /&#62;
	register_widget_control(array('NextGEN Slideshow', 'widgets'), 'widget_control_ngg_slideshow', 300, 200);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/*******************************************************/&#60;br /&#62;
/* DISPLAY FUNCTION TO THE RECENT &#38;#38; RANDOM IMAGES&#60;br /&#62;
/*******************************************************/&#60;br /&#62;
function nggDisplayImagesWidget($thumb,$number,$sizeX,$sizeY,$mode,$imgtype) {&#60;/p&#62;
&#60;p&#62;	// Check for NextGEN Gallery&#60;br /&#62;
	if ( !class_exists('nggallery') )&#60;br /&#62;
		return;&#60;/p&#62;
&#60;p&#62;	global $wpdb;&#60;/p&#62;
&#60;p&#62;	//get ngg options&#60;br /&#62;
	$ngg_options = get_option('ngg_options');&#60;/p&#62;
&#60;p&#62;	// get the effect code&#60;br /&#62;
	$thumbcode = nggallery::get_thumbcode(&#34;sidebar_&#34;.$imgtype);&#60;/p&#62;
&#60;p&#62;	$count = $wpdb-&#38;gt;get_var(&#34;SELECT COUNT(*) FROM $wpdb-&#38;gt;nggpictures WHERE exclude != 1 &#34;);&#60;br /&#62;
	if ($count &#38;lt; $number)&#60;br /&#62;
		$number = $count;&#60;/p&#62;
&#60;p&#62;	if ($imgtype == &#34;random&#34;)&#60;br /&#62;
		$imageList = $wpdb-&#38;gt;get_results(&#34;SELECT * FROM $wpdb-&#38;gt;nggpictures WHERE exclude != 1 ORDER by rand() limit $number&#34;);&#60;br /&#62;
	else&#60;br /&#62;
		$imageList = $wpdb-&#38;gt;get_results(&#34;SELECT * FROM $wpdb-&#38;gt;nggpictures WHERE exclude != 1 ORDER by pid DESC limit 0,$number&#34;);&#60;/p&#62;
&#60;p&#62;	if (is_array($imageList)){&#60;br /&#62;
		foreach($imageList as $image) {&#60;/p&#62;
&#60;p&#62;			//TODO:Insert title&#60;br /&#62;
			$out = '&#60;a&#62;pid).'&#34; title=&#34;'.stripslashes($image-&#38;gt;description).'&#34; '.$thumbcode.'&#38;gt;';&#60;br /&#62;
			$addmode = ($mode == 'web20') ? &#34;&#38;amp;mode=web20&#34; : &#34;&#34; ;&#60;br /&#62;
			if ( $thumb == &#34;false&#34; )&#60;br /&#62;
				$out .= '&#60;img&#62;pid.'&#38;amp;width='.$sizeX.'&#38;amp;height='.$sizeY.$addmode.'&#34; title=&#34;'.$image-&#38;gt;alttext.'&#34; alt=&#34;'.$image-&#38;gt;alttext.'&#34; /&#38;gt;';&#60;br /&#62;
			else&#60;br /&#62;
				$out .= '&#60;img&#62;pid).'&#34; style=&#34;width:'.$sizeX.'px;height:'.$sizeY.'px;&#34; title=&#34;'.$image-&#38;gt;alttext.'&#34; alt=&#34;'.$image-&#38;gt;alttext.'&#34; /&#38;gt;';			&#60;/p&#62;
&#60;p&#62;			echo $out . '&#60;/a&#62;'.&#34;\n&#34;;&#60;/p&#62;
&#60;p&#62;		}&#60;br /&#62;
	}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**********************************************************/&#60;br /&#62;
/* SIMPLE INSERT TAGS&#60;br /&#62;
/**********************************************************/&#60;/p&#62;
&#60;p&#62;function nggDisplayRandomImages($number,$width,$height) {&#60;br /&#62;
	echo &#34;\n&#34;.'&#38;lt;div class=&#34;ngg-widget&#34;&#38;gt;'.&#34;\n&#34;;&#60;br /&#62;
	nggDisplayImagesWidget(&#34;true&#34;,$number,$width,$height,&#34;&#34;,&#34;random&#34;);&#60;br /&#62;
	echo '&#38;lt;/div&#38;gt;'.&#34;\n&#34;;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;function nggDisplayRecentImages($number,$width,$height) {&#60;br /&#62;
	echo &#34;\n&#34;.'&#38;lt;div class=&#34;ngg-widget&#34;&#38;gt;'.&#34;\n&#34;;&#60;br /&#62;
	nggDisplayImagesWidget(&#34;true&#34;,$number,$width,$height,&#34;&#34;,&#34;recent&#34;);&#60;br /&#62;
	echo '&#38;lt;/div&#38;gt;'.&#34;\n&#34;;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**********************************************************/&#60;br /&#62;
/* Recent widget&#60;br /&#62;
/**********************************************************/&#60;br /&#62;
function widget_ngg_recentimage() {&#60;/p&#62;
&#60;p&#62;	// Check for the required plugin functions. This will prevent fatal&#60;br /&#62;
	// errors occurring when you deactivate the dynamic-sidebar plugin.&#60;br /&#62;
	if ( !function_exists('register_sidebar_widget') )&#60;br /&#62;
		return;&#60;/p&#62;
&#60;p&#62;	// Check for NextGEN Gallery&#60;br /&#62;
	if ( !class_exists('nggallery') )&#60;br /&#62;
		return;&#60;/p&#62;
&#60;p&#62;	function widget_nextgenrecentimage($args) {&#60;/p&#62;
&#60;p&#62;		extract($args);&#60;/p&#62;
&#60;p&#62;		// Each widget can store its own options. We keep strings here.&#60;br /&#62;
		$options = get_option('widget_NextGenrecentimage');&#60;/p&#62;
&#60;p&#62;		$title	= $options['title'];&#60;br /&#62;
	    $thumb	= $options['thumb'];&#60;br /&#62;
		$number	= $options['number'];&#60;br /&#62;
		$sizeX	= $options['sizeX'];&#60;br /&#62;
		$sizeY	= $options['sizeY'];&#60;br /&#62;
		$mode	= $options['mode'];&#60;/p&#62;
&#60;p&#62;		$showinhome		= htmlspecialchars($options['showinhome'], ENT_QUOTES);&#60;br /&#62;
		$showcategory	= htmlspecialchars($options['showcategory'], ENT_QUOTES);&#60;br /&#62;
		$categorylist	= htmlspecialchars($options['categorylist'], ENT_QUOTES);&#60;/p&#62;
&#60;p&#62;		$imgtype = &#34;recent&#34;;&#60;/p&#62;
&#60;p&#62;		$show_widget = false;									// checking display status (category or home)&#60;br /&#62;
		$categorieslist = nggGetCSVValues($categorylist,','); 	// Make array for checking the categories&#60;/p&#62;
&#60;p&#62;		if (($showcategory == &#34;denied&#34;)) {						// Denied list -&#38;gt; enable everywhere and make false if found!&#60;br /&#62;
			$show_widget = true;&#60;br /&#62;
			foreach((get_the_category()) as $cat)&#60;br /&#62;
				{ if ((in_array($cat-&#38;gt;cat_ID , $categorieslist)))&#60;br /&#62;
					$show_widget = false;&#60;br /&#62;
				}&#60;br /&#62;
			}&#60;/p&#62;
&#60;p&#62;		if (($showcategory == &#34;allow&#34;))						// Allow list -&#38;gt; false is the default -&#38;gt; enable if found&#60;br /&#62;
		foreach((get_the_category()) as $cat)&#60;br /&#62;
			{ if ((in_array($cat-&#38;gt;cat_ID , $categorieslist)))&#60;br /&#62;
				$show_widget = true;&#60;br /&#62;
			}&#60;/p&#62;
&#60;p&#62;		if (($showcategory == &#34;all&#34;))						// All categories -&#38;gt; if it's not the home -&#38;gt; enable&#60;br /&#62;
			if ((is_home() != true))&#60;br /&#62;
				$show_widget = true;&#60;/p&#62;
&#60;p&#62;		if (($showinhome == &#34;yes&#34;)) 						// Home page -&#38;gt; If yes -&#38;gt; enable&#60;br /&#62;
			if ((is_home()))&#60;br /&#62;
				$show_widget = true;&#60;/p&#62;
&#60;p&#62;		$url_parts = parse_url(get_bloginfo('home'));&#60;/p&#62;
&#60;p&#62;		// Null parameters check&#60;br /&#62;
		if ( ($number == '') ) $number = 1;&#60;br /&#62;
		if ( ($sizeX == '') ) $sizeX = 190;&#60;br /&#62;
		if ( ($sizeY == '') ) $sizeY = 190;&#60;/p&#62;
&#60;p&#62;		if ($show_widget) { &#60;/p&#62;
&#60;p&#62;			echo $before_widget . $before_title . $title . $after_title;&#60;br /&#62;
			echo &#34;\n&#34;.'&#38;lt;div class=&#34;ngg-widget&#34;&#38;gt;'.&#34;\n&#34;;&#60;/p&#62;
&#60;p&#62;			nggDisplayImagesWidget($thumb,$number,$sizeX,$sizeY,$mode,$imgtype);&#60;/p&#62;
&#60;p&#62;			echo '&#38;lt;/div&#38;gt;'.&#34;\n&#34;;&#60;br /&#62;
			echo $after_widget;&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	/**&#60;br /&#62;
	* @desc Output of plugin�s editform in the adminarea&#60;br /&#62;
	* @author KeViN&#60;br /&#62;
	*/&#60;/p&#62;
&#60;p&#62;	function widget_nextgenrecentimage_control($number=1) {&#60;/p&#62;
&#60;p&#62;	$options = get_option('widget_NextGenrecentimage');&#60;/p&#62;
&#60;p&#62;	if ( !is_array($options) )&#60;br /&#62;
			$options = array('title'=&#38;gt;'Recent Images', 'buttontext'=&#38;gt;__('NextGEN Recent Image','nggallery'));&#60;/p&#62;
&#60;p&#62;		if ( $_POST['nextgen-recentsubmit'] ) {&#60;br /&#62;
			// Remember to sanitize and format use input appropriately.&#60;br /&#62;
			$options = &#34;&#34;;&#60;br /&#62;
			$options['title']		= strip_tags(stripslashes($_POST['nextgen-recenttitle']));&#60;br /&#62;
			$options['thumb']		= strip_tags(stripslashes($_POST['nextgen-recentthumb']));&#60;br /&#62;
			$options['number']		= strip_tags(stripslashes($_POST['nextgen-recentnumber']));&#60;br /&#62;
			$options['sizeX']		= strip_tags(stripslashes($_POST['nextgen-recentsizeX']));&#60;br /&#62;
			$options['sizeY']		= strip_tags(stripslashes($_POST['nextgen-recentsizeY']));&#60;/p&#62;
&#60;p&#62;			// [0.80] [new functiions and newvariables] -&#38;gt; Category controll&#60;br /&#62;
			$options['showinhome'] 	= strip_tags(stripslashes($_POST['nextgen-recentshowinhome']));&#60;br /&#62;
			$options['showcategory']= strip_tags(stripslashes($_POST['nextgen-recentshowcategory']));&#60;br /&#62;
			$options['categorylist']= strip_tags(stripslashes($_POST['nextgen-recentcategorylist']));&#60;/p&#62;
&#60;p&#62;			// [0.95] [new variable] -&#38;gt; (random / recent)&#60;br /&#62;
			$options['imgtype'] 	= strip_tags(stripslashes($_POST['nextgen-recentimgtype']));&#60;/p&#62;
&#60;p&#62;			update_option('widget_NextGenrecentimage', $options);&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		// Be sure you format your options to be valid HTML attributes.&#60;br /&#62;
			$title = htmlspecialchars($options['title'], ENT_QUOTES);&#60;br /&#62;
			$thumb = htmlspecialchars($options['thumb'], ENT_QUOTES);&#60;br /&#62;
			$number = htmlspecialchars($options['number'], ENT_QUOTES);&#60;br /&#62;
			$sizeX = htmlspecialchars($options['sizeX'], ENT_QUOTES);&#60;br /&#62;
			$sizeY = htmlspecialchars($options['sizeY'], ENT_QUOTES);&#60;br /&#62;
			$mode = htmlspecialchars($options['mode'], ENT_QUOTES);		&#60;/p&#62;
&#60;p&#62;			//  [0.80] [new functiions and newvariables] -&#38;gt; Category controll&#60;br /&#62;
			$showinhome = htmlspecialchars($options['showinhome'], ENT_QUOTES);&#60;br /&#62;
			$showcategory = htmlspecialchars($options['showcategory'], ENT_QUOTES);&#60;br /&#62;
			$categorylist = htmlspecialchars($options['categorylist'], ENT_QUOTES);&#60;/p&#62;
&#60;p&#62;			// [0.95] [new variable] -&#38;gt; (random / recent)&#60;br /&#62;
			$mode = htmlspecialchars($options['imgtype'], ENT_QUOTES);		&#60;/p&#62;
&#60;p&#62;		// Here comes the form&#60;/p&#62;
&#60;p&#62;		echo'&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-recenttitle&#34;&#38;gt;' . __('Title','nggallery') . ': &#38;lt;input style=&#34;width: 150px;&#34; id=&#34;nextgen-recenttitle&#34; name=&#34;nextgen-recenttitle&#34; type=&#34;text&#34; value=&#34;'.$title.'&#34; /&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-recentthumb&#34;&#38;gt;' . __('Display type','nggallery').':';&#60;br /&#62;
		echo ' &#38;lt;select name=&#34;nextgen-recentthumb&#34; size=&#34;1&#34;&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;1&#34; ';if (($thumb == &#34;true&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;true&#34;&#38;gt;' . __('Thumbnail','nggallery') . '&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;2&#34; ';if (($thumb == &#34;false&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;false&#34;&#38;gt;' . __('Orginal','nggallery') . '&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo ' &#38;lt;/select&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-recentnumber&#34;&#38;gt;' . __('Number of pics','nggallery').':';&#60;br /&#62;
		echo ' &#38;lt;select name=&#34;nextgen-recentnumber&#34; size=&#34;1&#34;&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;1&#34; ';if (($number == 1)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;1&#34;&#38;gt;1&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;2&#34; ';if (($number == 2)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;2&#34;&#38;gt;2&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;3&#34; ';if (($number == 3)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;3&#34;&#38;gt;3&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;4&#34; ';if (($number == 4)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;4&#34;&#38;gt;4&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;6&#34; ';if (($number == 6)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;6&#34;&#38;gt;6&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;8&#34; ';if (($number == 8)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;8&#34;&#38;gt;8&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;10&#34; ';if (($number == 10)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;10&#34;&#38;gt;10&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo ' &#38;lt;/select&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-recentsizeX&#34;&#38;gt;' . __('Width (px)','nggallery') . ': &#38;lt;input style=&#34;width: 50px;&#34; id=&#34;nextgen-recentsizeX&#34; name=&#34;nextgen-recentsizeX&#34; type=&#34;text&#34; value=&#34;'.$sizeX.'&#34; /&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-recentsizeY&#34;&#38;gt;' . __('Height (px)','nggallery') . ': &#38;lt;input style=&#34;width: 50px;&#34; id=&#34;nextgen-recentsizeY&#34; name=&#34;nextgen-recentsizeY&#34; type=&#34;text&#34; value=&#34;'.$sizeY.'&#34; /&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-recentnumber&#34;&#38;gt;' . __('Mode','nggallery').':';&#60;br /&#62;
		echo ' &#38;lt;select name=&#34;nextgen-recentmode&#34; size=&#34;1&#34;&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;none&#34; ';if (($mode == &#34;&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;&#34;&#38;gt;'. __('none','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;web20&#34; ';if (($mode == &#34;web20&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;web20&#34;&#38;gt;'. __('web2.0','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo ' &#38;lt;/select&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-recentshowinhome&#34;&#38;gt;' . __('Show in the main page','nggallery').':';&#60;br /&#62;
		echo ' &#38;lt;select name=&#34;nextgen-recentshowinhome&#34; size=&#34;1&#34;&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;1&#34; ';if ($showinhome == &#34;yes&#34;) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;yes&#34; &#38;gt;'. __('yes','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;2&#34; ';if ($showinhome == &#34;no&#34;) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;no&#34; &#38;gt;'. __('no','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo ' &#38;lt;/select&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-recentshowcategory&#34;&#38;gt;' . __('Show in','nggallery').':';&#60;br /&#62;
		echo ' &#38;lt;select name=&#34;nextgen-recentshowcategory&#34; size=&#34;1&#34;&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;1&#34; ';if (($showcategory == &#34;all&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;all&#34; &#38;gt;'. __('All categories','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;2&#34; ';if (($showcategory == &#34;denied&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;denied&#34; &#38;gt;'. __('Only which are not listed','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;3&#34; ';if (($showcategory == &#34;allow&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;allow&#34; &#38;gt;'. __('Only which are listed','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo ' &#38;lt;/select&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-recentcategorylist&#34;&#38;gt;' . __('Categories (id (use , to seperate)','nggallery') . ': &#38;lt;input style=&#34;width: 150px;&#34; id=&#34;nextgen-recentcategorylist&#34; name=&#34;nextgen-recentcategorylist&#34; type=&#34;text&#34; value=&#34;'.$categorylist.'&#34; /&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;input type=&#34;hidden&#34; id=&#34;nextgen-recentsubmit&#34; name=&#34;nextgen-recentsubmit&#34; value=&#34;1&#34; /&#38;gt;';&#60;br /&#62;
	  }&#60;/p&#62;
&#60;p&#62;	// This registers our widget so it appears with the other available&#60;br /&#62;
	// widgets and can be dragged and dropped into any active sidebars.&#60;br /&#62;
	register_sidebar_widget(array('NextGEN Recent Image', 'widgets'), 'widget_nextgenrecentimage');&#60;br /&#62;
    register_widget_control(array('NextGEN Recent Image', 'widgets'), 'widget_nextgenrecentimage_control', 300, 400);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/**********************************************************/&#60;br /&#62;
/* Random widget&#60;br /&#62;
/**********************************************************/&#60;br /&#62;
function widget_ngg_randomimage() {&#60;/p&#62;
&#60;p&#62;	// Check for the required plugin functions. This will prevent fatal&#60;br /&#62;
	// errors occurring when you deactivate the dynamic-sidebar plugin.&#60;br /&#62;
	if ( !function_exists('register_sidebar_widget') )&#60;br /&#62;
		return;&#60;/p&#62;
&#60;p&#62;	// Check for NextGEN Gallery&#60;br /&#62;
	if ( !class_exists('nggallery') )&#60;br /&#62;
		return;&#60;/p&#62;
&#60;p&#62;	function widget_nextgenimage($args) {&#60;/p&#62;
&#60;p&#62;		extract($args);&#60;/p&#62;
&#60;p&#62;		// Each widget can store its own options. We keep strings here.&#60;br /&#62;
		$options = get_option('widget_NextGenimage');&#60;/p&#62;
&#60;p&#62;		$title	= $options['title'];&#60;br /&#62;
	    $thumb	= $options['thumb'];&#60;br /&#62;
		$number	= $options['number'];&#60;br /&#62;
		$sizeX	= $options['sizeX'];&#60;br /&#62;
		$sizeY	= $options['sizeY'];&#60;br /&#62;
		$mode	= $options['mode'];&#60;/p&#62;
&#60;p&#62;		$showinhome		= htmlspecialchars($options['showinhome'], ENT_QUOTES);&#60;br /&#62;
		$showcategory	= htmlspecialchars($options['showcategory'], ENT_QUOTES);&#60;br /&#62;
		$categorylist	= htmlspecialchars($options['categorylist'], ENT_QUOTES);&#60;/p&#62;
&#60;p&#62;		$imgtype = &#34;random&#34;;&#60;/p&#62;
&#60;p&#62;		//origy ngg options&#60;br /&#62;
		$ngg_options = get_option('ngg_options');&#60;/p&#62;
&#60;p&#62;		// get the effect code&#60;br /&#62;
		$thumbcode = nggallery::get_thumbcode(&#34;sidebar&#34;);&#60;/p&#62;
&#60;p&#62;		$show_widget = false;								// checking display status (category or home)&#60;br /&#62;
		$categorieslist = nggGetCSVValues($categorylist,','); 	// Make array for checking the categories&#60;/p&#62;
&#60;p&#62;		if (($showcategory == &#34;denied&#34;)) {					// Denied list -&#38;gt; enable everywhere and make false if found!&#60;br /&#62;
			$show_widget = true;&#60;br /&#62;
			foreach((get_the_category()) as $cat)&#60;br /&#62;
				{ if ((in_array($cat-&#38;gt;cat_ID , $categorieslist)))&#60;br /&#62;
					$show_widget = false;&#60;br /&#62;
				}&#60;br /&#62;
			}&#60;/p&#62;
&#60;p&#62;		if (($showcategory == &#34;allow&#34;))						// Allow list -&#38;gt; false is the default -&#38;gt; enable if found&#60;br /&#62;
		foreach((get_the_category()) as $cat)&#60;br /&#62;
			{ if ((in_array($cat-&#38;gt;cat_ID , $categorieslist)))&#60;br /&#62;
				$show_widget = true;&#60;br /&#62;
			}&#60;/p&#62;
&#60;p&#62;		if (($showcategory == &#34;all&#34;))						// All categories -&#38;gt; if it's not the home -&#38;gt; enable&#60;br /&#62;
			if ((is_home() != true))&#60;br /&#62;
				$show_widget = true;&#60;/p&#62;
&#60;p&#62;		if (($showinhome == &#34;yes&#34;)) 						// Home page -&#38;gt; If yes -&#38;gt; enable&#60;br /&#62;
			if ((is_home()))&#60;br /&#62;
				$show_widget = true;&#60;/p&#62;
&#60;p&#62;		$url_parts = parse_url(get_bloginfo('home'));&#60;/p&#62;
&#60;p&#62;		// Null parameters check&#60;br /&#62;
		if ( ($number == '') ) $number = 1;&#60;br /&#62;
		if ( ($sizeX == '') ) $sizeX = 190;&#60;br /&#62;
		if ( ($sizeY == '') ) $sizeY = 190;&#60;/p&#62;
&#60;p&#62;		if ($show_widget) { &#60;/p&#62;
&#60;p&#62;			echo $before_widget . $before_title . $title . $after_title;&#60;br /&#62;
			echo &#34;\n&#34;.'&#38;lt;div class=&#34;ngg-widget&#34;&#38;gt;'.&#34;\n&#34;;&#60;/p&#62;
&#60;p&#62;			nggDisplayImagesWidget($thumb,$number,$sizeX,$sizeY,$mode,$imgtype,$thumbcode);&#60;/p&#62;
&#60;p&#62;			echo '&#38;lt;/div&#38;gt;'.&#34;\n&#34;;&#60;br /&#62;
			echo $after_widget;&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	/**&#60;br /&#62;
	* @desc Output of plugin�s editform in the adminarea&#60;br /&#62;
	* @author KeViN&#60;br /&#62;
	*/&#60;/p&#62;
&#60;p&#62;	function widget_nextgenimage_control($number=1) {&#60;/p&#62;
&#60;p&#62;	$options = get_option('widget_NextGenimage');&#60;/p&#62;
&#60;p&#62;	if ( !is_array($options) )&#60;br /&#62;
			$options = array('title'=&#38;gt;'', 'buttontext'=&#38;gt;__('NextGEN Random Image','nggallery'));&#60;/p&#62;
&#60;p&#62;		if ( $_POST['nextgen-submit'] ) {&#60;br /&#62;
			// Remember to sanitize and format use input appropriately.&#60;br /&#62;
			$options = &#34;&#34;;&#60;br /&#62;
			$options['title']		= strip_tags(stripslashes($_POST['nextgen-title']));&#60;br /&#62;
			$options['thumb']		= strip_tags(stripslashes($_POST['nextgen-thumb']));&#60;br /&#62;
			$options['number']		= strip_tags(stripslashes($_POST['nextgen-number']));&#60;br /&#62;
			$options['sizeX']		= strip_tags(stripslashes($_POST['nextgen-sizeX']));&#60;br /&#62;
			$options['sizeY']		= strip_tags(stripslashes($_POST['nextgen-sizeY']));&#60;br /&#62;
			$options['mode']		= strip_tags(stripslashes($_POST['nextgen-mode']));&#60;/p&#62;
&#60;p&#62;			// [0.80] [new functiions and newvariables] -&#38;gt; Category controll&#60;br /&#62;
			$options['showinhome'] 	= strip_tags(stripslashes($_POST['nextgen-showinhome']));&#60;br /&#62;
			$options['showcategory']= strip_tags(stripslashes($_POST['nextgen-showcategory']));&#60;br /&#62;
			$options['categorylist']= strip_tags(stripslashes($_POST['nextgen-categorylist']));&#60;/p&#62;
&#60;p&#62;			// [0.95] [new variable] -&#38;gt; (random / recent)&#60;br /&#62;
			$options['imgtype'] 	= strip_tags(stripslashes($_POST['nextgen-imgtype']));&#60;/p&#62;
&#60;p&#62;			update_option('widget_NextGenimage', $options);&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		// Be sure you format your options to be valid HTML attributes.&#60;br /&#62;
			$title = htmlspecialchars($options['title'], ENT_QUOTES);&#60;br /&#62;
			$thumb = htmlspecialchars($options['thumb'], ENT_QUOTES);&#60;br /&#62;
			$number = htmlspecialchars($options['number'], ENT_QUOTES);&#60;br /&#62;
			$sizeX = htmlspecialchars($options['sizeX'], ENT_QUOTES);&#60;br /&#62;
			$sizeY = htmlspecialchars($options['sizeY'], ENT_QUOTES);&#60;br /&#62;
			//$mode = htmlspecialchars($options['mode'], ENT_QUOTES);		&#60;/p&#62;
&#60;p&#62;			$showinhome = htmlspecialchars($options['showinhome'], ENT_QUOTES);&#60;br /&#62;
			$showcategory = htmlspecialchars($options['showcategory'], ENT_QUOTES);&#60;br /&#62;
			$categorylist = htmlspecialchars($options['categorylist'], ENT_QUOTES);&#60;/p&#62;
&#60;p&#62;			$mode = htmlspecialchars($options['imgtype'], ENT_QUOTES);		&#60;/p&#62;
&#60;p&#62;		// Here comes the form&#60;br /&#62;
		echo'&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-title&#34;&#38;gt;' . __('Title','nggallery') . ': &#38;lt;input style=&#34;width: 150px;&#34; id=&#34;nextgen-title&#34; name=&#34;nextgen-title&#34; type=&#34;text&#34; value=&#34;'.$title.'&#34; /&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-thumb&#34;&#38;gt;' . __('Display type','nggallery').':';&#60;br /&#62;
		echo ' &#38;lt;select name=&#34;nextgen-thumb&#34; size=&#34;1&#34;&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;1&#34; ';if (($thumb == &#34;true&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;true&#34;&#38;gt;' . __('Thumbnail','nggallery') . '&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;2&#34; ';if (($thumb == &#34;false&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;false&#34;&#38;gt;' . __('Orginal','nggallery') . '&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo ' &#38;lt;/select&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-number&#34;&#38;gt;' . __('Number of pics','nggallery').':';&#60;br /&#62;
		echo ' &#38;lt;select name=&#34;nextgen-number&#34; size=&#34;1&#34;&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;1&#34; ';if (($number == 1)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;1&#34;&#38;gt;1&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;2&#34; ';if (($number == 2)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;2&#34;&#38;gt;2&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;3&#34; ';if (($number == 3)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;3&#34;&#38;gt;3&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;4&#34; ';if (($number == 4)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;4&#34;&#38;gt;4&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;6&#34; ';if (($number == 6)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;6&#34;&#38;gt;6&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;8&#34; ';if (($number == 8)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;8&#34;&#38;gt;8&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;10&#34; ';if (($number == 10)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;10&#34;&#38;gt;10&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo ' &#38;lt;/select&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-sizeX&#34;&#38;gt;' . __('Width (px)','nggallery') . ': &#38;lt;input style=&#34;width: 50px;&#34; id=&#34;nextgen-sizeX&#34; name=&#34;nextgen-sizeX&#34; type=&#34;text&#34; value=&#34;'.$sizeX.'&#34; /&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-sizeY&#34;&#38;gt;' . __('Height (px)','nggallery') . ': &#38;lt;input style=&#34;width: 50px;&#34; id=&#34;nextgen-sizeY&#34; name=&#34;nextgen-sizeY&#34; type=&#34;text&#34; value=&#34;'.$sizeY.'&#34; /&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-number&#34;&#38;gt;' . __('Mode','nggallery').':';&#60;br /&#62;
		echo ' &#38;lt;select name=&#34;nextgen-mode&#34; size=&#34;1&#34;&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;none&#34; ';if (($mode == &#34;&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;&#34;&#38;gt;'. __('none','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;web20&#34; ';if (($mode == &#34;web20&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;web20&#34;&#38;gt;'. __('web2.0','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo ' &#38;lt;/select&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-showinhome&#34;&#38;gt;' . __('Show in the main page','nggallery').':';&#60;br /&#62;
		echo ' &#38;lt;select name=&#34;nextgen-showinhome&#34; size=&#34;1&#34;&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;1&#34; ';if ($showinhome == &#34;yes&#34;) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;yes&#34; &#38;gt;'. __('yes','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;2&#34; ';if ($showinhome == &#34;no&#34;) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;no&#34; &#38;gt;'. __('no','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo ' &#38;lt;/select&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-showcategory&#34;&#38;gt;' . __('Show in','nggallery').':';&#60;br /&#62;
		echo ' &#38;lt;select name=&#34;nextgen-showcategory&#34; size=&#34;1&#34;&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;1&#34; ';if (($showcategory == &#34;all&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;all&#34; &#38;gt;'. __('All categories','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;2&#34; ';if (($showcategory == &#34;denied&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;denied&#34; &#38;gt;'. __('Only which are not listed','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo '   &#38;lt;option id=&#34;3&#34; ';if (($showcategory == &#34;allow&#34;)) echo 'selected=&#34;selected&#34;'; echo ' value=&#34;allow&#34; &#38;gt;'. __('Only which are listed','nggallery').'&#38;lt;/option&#38;gt;';&#60;br /&#62;
		echo ' &#38;lt;/select&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;p style=&#34;text-align:right;&#34;&#38;gt;&#38;lt;label for=&#34;nextgen-categorylist&#34;&#38;gt;' . __('Categories (id (use , to seperate)','nggallery') . ': &#38;lt;input style=&#34;width: 150px;&#34; id=&#34;nextgen-categorylist&#34; name=&#34;nextgen-categorylist&#34; type=&#34;text&#34; value=&#34;'.$categorylist.'&#34; /&#38;gt;&#38;lt;/label&#38;gt;&#38;lt;/p&#38;gt;';&#60;/p&#62;
&#60;p&#62;		echo '&#38;lt;input type=&#34;hidden&#34; id=&#34;nextgen-submit&#34; name=&#34;nextgen-submit&#34; value=&#34;1&#34; /&#38;gt;';&#60;br /&#62;
	  }&#60;/p&#62;
&#60;p&#62;	// This registers our widget so it appears with the other available&#60;br /&#62;
	// widgets and can be dragged and dropped into any active sidebars.&#60;br /&#62;
	register_sidebar_widget(array('NextGEN Random Image', 'widgets'), 'widget_nextgenimage');&#60;br /&#62;
    register_widget_control(array('NextGEN Random Image', 'widgets'), 'widget_nextgenimage_control', 300, 400);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// Run our code later in case this loads prior to any required plugins.&#60;br /&#62;
add_action('widgets_init', 'widget_ngg_randomimage');&#60;br /&#62;
add_action('widgets_init', 'widget_ngg_slideshow');&#60;br /&#62;
add_action('widgets_init', 'widget_ngg_recentimage');&#60;br /&#62;
?&#38;gt;&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;med mange venlige hilsner Longkyle&#60;/strong&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
