Your IP : 216.73.216.61


Current Path : /home/w/u/e/wuectly/www/03cbe/
Upload File :
Current File : /home/w/u/e/wuectly/www/03cbe/mod_hd-bgselector.tar

mod_hd-bgselector.xml000060400000013513152455721170010657 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="2.5.0" client="site" method="upgrade">
	<name>HD-Background Selector</name>
	<author>Hyde-Design</author>
	<creationDate>February 2013</creationDate>
	<copyright>2012</copyright>
	<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
	<authorEmail>sales@hyde-design.co.uk</authorEmail>
	<authorUrl>www.hyde-design.co.uk</authorUrl>
	<version>1.3</version>
	<description>A simple module to apply a background style to a specific page. Set the module to appear on the page of your choice at any module position.</description>

	<files>
		<filename module="mod_hd-bgselector">mod_hd-bgselector.php</filename>
		<filename module="mod_hd-bgselector">index.html</filename>
	</files>
	
	<config>
        <fields name="params">
        <fieldset name="basic">
		<field name="bgid" type="text" default="body" label="ID" description="The CSS element ID. Leave as 'body' if unsure. Can also be applied to divs. eg.'#left' to apply as a background to the left column div." ></field>
		<field name="imagebg" type="media" label="Background Image" description="Select the background image." />
   		<field name="imageposition" type="list" default="center top" label="Position" description="Image Position">
		  <option value="left top">Left Top</option>
		  <option value="left center">Left Center</option>
		  <option value="left bottom">Left Bottom</option>
		  <option value="right top">Right Top</option>
		  <option value="right center">Right Center</option>
		  <option value="right bottom">Right Bottom</option>
		  <option value="center top">Center Top</option>
		  <option value="center center">Center Center</option>
		  <option value="center bottom">Center Bottom</option>
		</field>
			
		<field name="imageattachment" type="list" default="scroll" label="Attachment" description="Scroll or fix the background image.">
		  <option value="scroll">Scroll</option>
		  <option value="fixed">Fixed</option>
		</field>
			
		<field name="imagerepeat" type="list" default="repeat" label="Repeat" description="Repeating pattern of background.">
		  <option value="repeat">Repeat All</option>
		  <option value="repeat-x">Repeat Horizontally</option>
		  <option value="repeat-y">Repeat Vertically</option>
		  <option value="no-repeat">No Repeat</option>
		</field>
		
		<field name="bgcolor" type="text" default="transparent" label="Background Colour" description="The background colour as either a predifined name (eg. blue), a hexidecimal value (eg. #ff0000) or an RGB value (eg. rgb(0,0,255)). Background colours are always applied behind a background image." ></field>
		
		<field name="importance" type="list" default="No" label="Stress Importance?" description="This will add the !important postfix to overide existing similar CSS.">
		  <option value=" ">No</option>
		  <option value="!important">Yes</option>
		</field>
		
		<field name="customcss" type="textarea" default="" label="Additional CSS" description="Replace with your additional inline custom CSS." rows="10" cols="45"></field>
		
	    </fieldset>
	    <fieldset name="advanced">
	    	<field name="bgtype" type="list" default="standard" label="Type" description="Select the multiple image display type.">
		  <option value="standard">Standard</option>
		  <option value="overlay">Overlay Images (overlays more than one image)</option>
		  <option value="random">Random Images (displays an image at random)</option>
		  <option value="daily">Daily Images (displays one image per day in order)</option>
		  <option value="gradient">Gradient (displays a gradient between two colours)</option>
		</field>
	    
	      <field name="imagebgtwo" type="media" label="Background Image Two" description="Select the second background image."></field>
	      <field name="imagebgthree" type="media" label="Background Image Three" description="Select the third background image."></field>
	      <field name="imagebgfour" type="media" label="Background Image Four" description="Select the fourth background image."></field>
	      <field name="imagebgfive" type="media" label="Background Image Five" description="Select the fifth background image."></field>
	      <field name="imagebgsix" type="media" label="Background Image Six" description="Select the sixth background image."></field>
	      <field name="imagebgseven" type="media" label="Background Image Seven" description="Select the seventh background image."></field>
	      <field name="gradtop" type="text" default="000000" label="Gradient Top Colour" description="The top colour of the gradient. Please enter a 6 figure hex value without the #." ></field>
		  <field name="gradbottom" type="text" default="ffffff" label="Gradient Bottom Colour" description="The top colour of the gradient. Please enter a 6 figure hex value without the #." ></field>
		
	      <field type="spacer" name="myspacer-break" hr="true" />
	            
		<field name="urlsniffer" type="text" filter="raw" default="" label="URL Sniffer" description="Add an element of a URL here if you only wish the module to render on a page whose URL contains this element."></field>
		<field name="browsersniffer" type="list" default="all" label="Browser Sniffer" description="Select if you wish your module to be rendered on a specific browser only.">
             <option value="all">All Browsers</option>
             <option value="msie">Internet Explorer</option>
             <option value="firefox">FireFox</option>
             <option value="safari">Safari</option>
             <option value="chrome">Chrome</option>
             <option value="opera">Opera</option>
             <option value="iphone">iPhone</option>
             <option value="ipad">iPad</option>
             <option value="android">Android</option>
             <option value="mobile">All mobile devices</option>
             </field>
	    </fieldset>
                       
        </fields>
	</config>
	
</extension>index.html000060400000000010152455721170006535 0ustar00<p> </p>mod_hd-bgselector.php000060400000016162152455721170010651 0ustar00<?php
# HD-Background Selector          	          	          	              
# Copyright (C) 2012 by Hyde-Design  	   	   	   	   
# Homepage   : www.hyde-design.co.uk		   	   	   
# Author     : Hyde-Design    		   	   	   	   
# Email      : rich@hyde-design.co.uk 	   	   	   
# Version    : 1.3                        	   	    	
# License    : http://www.gnu.org/copyleft/gpl.html GNU/GPL    

// no direct access
defined('_JEXEC') or die('Restricted access');

//get the params

$hdbg_id    	   = $params->get("bgid", "body");
$hdbg_image    	   = $params->get("imagebg", "");
$hdbg_image_two    = $params->get("imagebgtwo", "");
$hdbg_image_three  = $params->get("imagebgthree", "");
$hdbg_image_four   = $params->get("imagebgfour", "");
$hdbg_image_five   = $params->get("imagebgfive", "");
$hdbg_image_six    = $params->get("imagebgsix", "");
$hdbg_image_seven  = $params->get("imagebgseven", "");
$hdbg_gradtop      = $params->get("gradtop", "");
$hdbg_gradbottom   = $params->get("gradbottom", "");
$hdbg_position 	   = $params->get("imageposition", "");
$hdbg_attachment   = $params->get("imageattachment", "");
$hdbg_repeat       = $params->get("imagerepeat", "");
$hdbg_color        = $params->get("bgcolor", "");
$hdbg_customcss    = $params->get("customcss", "");
$hdbg_importance   = $params->get("importance", "");
$hdbg_type         = $params->get("bgtype", "");
$spitout           = "";

$urlsniffer     = $params->get("urlsniffer", "");
$browsersniffer = $params->get("browsersniffer", "all");
$browser        = strtolower($_SERVER['HTTP_USER_AGENT']);
$current_domain = JURI::base();
$current_url    = $_SERVER['REQUEST_URI'];
$this_url       = $current_domain.$current_url;

// Change this value if you do not wish to use 'images/' as the root image folder.
$root_image        = "";

global $mainframe;

// Standard background image display
if ($hdbg_type=="standard") {$spitout = '<style type="text/css">
'.$hdbg_id.' {background-image: url("'.JURI::base().$root_image.$hdbg_image.'")'.$hdbg_importance.'; background-attachment:'.$hdbg_attachment.''.$hdbg_importance.'; background-position:'.$hdbg_position.''.$hdbg_importance.'; background-repeat:'.$hdbg_repeat.''.$hdbg_importance.'; background-color:'.$hdbg_color.''.$hdbg_importance.';}
'.$hdbg_customcss.'</style>'; }

// Multiple background image overlay display
 elseif ($hdbg_type=="overlay") {
$hdbg_one = ''; $hdbg_two = ''; $hdbg_three = ''; $hdbg_four = ''; $hdbg_five = ''; $hdbg_six = ''; $hdbg_seven = '';
$hdbg_one = 'url("'.JURI::base().$root_image.$hdbg_image.'") ';
if (!empty($hdbg_image_two)) {$hdbg_two = ', url("'.JURI::base().$root_image.$hdbg_image_two.'") ';};
if (!empty($hdbg_image_three)) {$hdbg_three = ', url("'.JURI::base().$root_image.$hdbg_image_three.'") ';};
if (!empty($hdbg_image_four)) {$hdbg_four = ', url("'.JURI::base().$root_image.$hdbg_image_four.'") ';};
if (!empty($hdbg_image_five)) {$hdbg_five = ', url("'.JURI::base().$root_image.$hdbg_image_five.'") ';};
if (!empty($hdbg_image_six)) {$hdbg_six = ', url("'.JURI::base().$root_image.$hdbg_image_six.'") ';}; 
if (!empty($hdbg_image_seven)) {$hdbg_seven = ', url("'.JURI::base().$root_image.$hdbg_image_seven.'")';};
$spitout = '<style type="text/css">'.$hdbg_id.' {background-image: '.$hdbg_one.$hdbg_two.$hdbg_three.$hdbg_four.$hdbg_five.$hdbg_six.$hdbg_seven.'; background-attachment: '.$hdbg_attachment.''.$hdbg_importance.'; background-position:'.$hdbg_position.''.$hdbg_importance.'; background-repeat:'.$hdbg_repeat.''.$hdbg_importance.'; background-color:'.$hdbg_color.''.$hdbg_importance.';}
'.$hdbg_customcss.'
</style>';}

// Random background image display
 elseif ($hdbg_type=="random") {
$randimage = '';
$randfigure = '7';
if ($hdbg_image_seven == '') {$randfigure = '6';}
if ($hdbg_image_six == '') {$randfigure = '5';}
if ($hdbg_image_five == '') {$randfigure = '4';}
if ($hdbg_image_four == '') {$randfigure = '3';}
if ($hdbg_image_three == '') {$randfigure = '2';}
if ($hdbg_image_two == '') {$randfigure = '1';}
$randbg = rand(1, $randfigure);
if ($randbg == 1) {$randimage = JURI::base().$root_image.$hdbg_image;};
if ($randbg == 2) {$randimage = JURI::base().$root_image.$hdbg_image_two;};
if ($randbg == 3) {$randimage = JURI::base().$root_image.$hdbg_image_three;};
if ($randbg == 4) {$randimage = JURI::base().$root_image.$hdbg_image_four;};
if ($randbg == 5) {$randimage = JURI::base().$root_image.$hdbg_image_five;};
if ($randbg == 6) {$randimage = JURI::base().$root_image.$hdbg_image_six;};
if ($randbg == 7) {$randimage = JURI::base().$root_image.$hdbg_image_seven;};
$spitout = '<style type="text/css">'.$hdbg_id.' {background-image: url("'.$randimage.'") '.$hdbg_importance.'; background-attachment: '.$hdbg_attachment.''.$hdbg_importance.'; background-position:'.$hdbg_position.''.$hdbg_importance.'; background-repeat:'.$hdbg_repeat.''.$hdbg_importance.'; background-color:'.$hdbg_color.''.$hdbg_importance.';}
'.$hdbg_customcss.'
</style>';
}

// Daily background image display
 elseif ($hdbg_type=="daily") {
 $todayimage = ''; $todaybg = date("w");
if ($todaybg == 0) {$todayimage = JURI::base().$root_image.$hdbg_image;};
if ($todaybg == 1) {$todayimage = JURI::base().$root_image.$hdbg_image_two;};
if ($todaybg == 2) {$todayimage = JURI::base().$root_image.$hdbg_image_three;};
if ($todaybg == 3) {$todayimage = JURI::base().$root_image.$hdbg_image_four;};
if ($todaybg == 4) {$todayimage = JURI::base().$root_image.$hdbg_image_five;};
if ($todaybg == 5) {$todayimage = JURI::base().$root_image.$hdbg_image_six;};
if ($todaybg == 6) {$todayimage = JURI::base().$root_image.$hdbg_image_seven;};
$spitout = '<style type="text/css">'.$hdbg_id.' {background-image: url("'.$todayimage.'") '.$hdbg_importance.'; background-attachment: '.$hdbg_attachment.''.$hdbg_importance.'; background-position:'.$hdbg_position.''.$hdbg_importance.'; background-repeat:'.$hdbg_repeat.''.$hdbg_importance.'; background-color:'.$hdbg_color.''.$hdbg_importance.';}
'.$hdbg_customcss.'
</style>';
}

// Gradient
 elseif ($hdbg_type=="gradient") {
$spitout = '<style type="text/css">'.$hdbg_id.' { background-color: #'.$hdbg_gradtop.'; background-color: #'.$hdbg_gradbottom.'; background-image: -moz-linear-gradient(top, #'.$hdbg_gradtop.', #'.$hdbg_gradbottom.'); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#'.$hdbg_gradtop.'), to(#'.$hdbg_gradbottom.')); background-image: -webkit-linear-gradient(top, #'.$hdbg_gradtop.', #'.$hdbg_gradbottom.');  background-image: -o-linear-gradient(top, #'.$hdbg_gradtop.', #'.$hdbg_gradbottom.'); background-image: linear-gradient(to bottom, #'.$hdbg_gradtop.', #'.$hdbg_gradbottom.');  background-repeat: repeat-x;   filter: progid:dximagetransform.microsoft.gradient(startColorstr=\'#ff'.$hdbg_gradtop.'\', endColorstr=\'#ff'.$hdbg_gradbottom.'\', GradientType=0);} </style>';
}

else {;};
 
// Render to screen

if ($urlsniffer=="")             
   { if ($browsersniffer=="all") { echo $spitout; } 
                                       elseif (ereg($browsersniffer, $browser)) { echo $spitout; };}
elseif (strstr($this_url, $urlsniffer)) 
   { if ($browsersniffer=="all") { echo $spitout; } 
                                       elseif (ereg($browsersniffer, $browser)) { echo $spitout; }; };