From: Andreas Unterkircher Date: Sat, 14 Jul 2007 06:33:18 +0000 (+0000) Subject: issue41, remove any trace of the javascript bubble X-Git-Tag: phpfspot-1.2~139 X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a365bbcf0ccc18cc5cee9e5cc697725279b02e53;p=phpfspot.git issue41, remove any trace of the javascript bubble git-svn-id: file:///var/lib/svn/phpfspot/trunk@196 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- diff --git a/bubble.js b/bubble.js deleted file mode 100644 index d44780e..0000000 --- a/bubble.js +++ /dev/null @@ -1,334 +0,0 @@ -/* - WebSnapr - Preview Bubble Javascript - Written by Juan Xavier Larrea - http://www.websnapr.com - xavier@websnapr.com - -*/ - -// Point this variable to the correct location of the bg.png file -var bubbleImageUp = 'resources/bubble_up.png'; -var bubbleImageDown = 'resources/bubble_down.png'; - -if(typeof Array.prototype.push!="function"){ - Array.prototype.push=ArrayPush; - - function ArrayPush(_1){ - this[this.length]=_1; - } -} - -function WSR_getElementsByClassName(oElm, strTagName, oClassNames){ - var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName); - var arrReturnElements = new Array(); - var arrRegExpClassNames = new Array(); - if(typeof oClassNames == "object"){ - for(var i=0; i= get_page_height()) { - var _f=findPos(_c)[1]-363; - bubbleImage = bubbleImageUp; - } - else { - var _f=findPos(_c)[1]+17; - bubbleImage = bubbleImageDown; - } - } - else { - var _e=findPos(_c)[0]+5; - var _f=findPos(_c)[1]+129; - bubbleImage = bubbleImageDown; - } - if (BrowserDetect.browser == 'Explorer') { - _10.style.width="275px"; - _10.style.height="275px"; - _10.style.position="absolute"; - _10.style.top=_f; - _10.style.zIndex=99999; - _10.style.left=_e; - _10.style.textAlign="left"; - _10.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + bubbleImage + "',sizingMethod='image')"; - } else if (BrowserDetect.browser == 'Safari' || BrowserDetect.browser == 'Konqueror' ) { - _10.setAttribute("style","text-align: center; z-index: 99999; position: absolute; top: "+ _f +"px ; left: "+ _e +"px ; background: url("+ bubbleImage +") no-repeat; width: 275px; height: 275px; padding: 0; margin: 0;"); - } else { - _10.setAttribute("style","text-align: center; z-index: 99999; position: absolute; top: "+_f+"px ; left: "+ _e +"px ; background: url("+ bubbleImage +") no-repeat; width: 275px; height: 275px; padding: 0; margin: 0;"); - } - - if(cur_height >= get_page_height()) - showBubbleDetails(_10, _c.id, 'up'); - else - showBubbleDetails(_10, _c.id, 'down'); - -} - -function detachBubble(_12){ - lbActions=WSR_getElementsByClassName(document,"div","bubble"); - for(i=0;i \"" + value + "\"\n"; - } - } - } else { //Stings/Chars/Numbers etc. - dumped_text = "===>"+arr+"<===("+typeof(arr)+")"; - } - return dumped_text; - -}//end function var_dump - -function get_page_height() -{ - var myHeight = 0; - if( typeof( window.innerHeight ) == 'number' ) { - //Non-IE - myHeight = window.innerHeight; - } else if( document.documentElement && document.documentElement.clientHeight ) { - //IE 6+ in 'standards compliant mode' - myHeight = document.documentElement.clientHeight; - } else if( document.body && document.body.clientHeight ) { - //IE 4 compatible - myHeight = document.body.clientHeight; - } - - return myHeight; -} - -function get_scroll_position() -{ - if (typeof window.pageYOffset != 'undefined') { - return window.pageYOffset; - } - else { - if (typeof document.compatMode != 'undefined' && - document.compatMode != 'BackCompat' && - typeof window.scrollTop != 'undefined') - return window.scrollTop; - else { - if(typeof document.documentElement.scrollTop != 'undefined') - return document.documentElement.scrollTop; - else { - if (typeof document.body.scrollTop != 'undefined') - return document.body.scrollTop; - } - } - } - - return 0; - -} - -BrowserDetect.init(); diff --git a/phpfspot.class.php b/phpfspot.class.php index 5e25f21..8fe0f77 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -635,43 +635,6 @@ class PHPFSPOT { } // showPhotoIndex() - public function showBubbleDetails($photo, $direction) - { - if($direction == "up") - $direction = "bubbleimg_up"; - else - $direction = "bubbleimg_down"; - - $details = $this->get_photo_details($photo); - $orig_path = $this->translate_path($details['directory_path']) ."/". $details['name']; - - $image_url = "phpfspot_img.php?idx=". $photo ."&width=". $this->cfg->bubble_width; - - $filesize = filesize($orig_path); - $filesize = rand($filesize/1024, 2); - - if(!file_exists($orig_path)) { - $this->_warning("Photo ". $orig_path ." does not exist!
\n"); - return; - } - - if(!is_readable($orig_path)) { - $this->_warning("Photo ". $orig_path ." is not readable for user ". get_current_user() ."
\n"); - return; - } - - $img = getimagesize($orig_path); - - $this->tmpl->assign('file_size', $filesize); - $this->tmpl->assign('width', $img[0]); - $this->tmpl->assign('height', $img[1]); - $this->tmpl->assign('file_name', $details['name']); - $this->tmpl->assign('image_id', $direction); - $this->tmpl->assign('image_url', $image_url); - $this->tmpl->show("bubble_details.tpl"); - - } // showBubbleDetails() - public function showCredits() { $this->tmpl->assign('version', $this->cfg->version); @@ -849,7 +812,6 @@ class PHPFSPOT { $resolutions = Array( $this->cfg->thumb_width, - $this->cfg->bubble_width, $this->cfg->photo_width, $this->cfg->mini_width, ); diff --git a/phpfspot.js b/phpfspot.js index 9204f32..be15455 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -66,11 +66,6 @@ function showPhotoIndex(begin_with) HTML_AJAX.replace(document.getElementById("content"), encodeURI('rpc.php?action=show_photo_index&begin_with=' + begin_with)); } -function showBubbleDetails(object, id, direction) -{ - HTML_AJAX.replace(object, encodeURI('rpc.php?action=showbubbledetails&id=' + id + '&direction=" + direction')); -} - // if photo index is currently shown, refresh it function refreshPhotoIndex() { diff --git a/resources/bubble_down.png b/resources/bubble_down.png deleted file mode 100644 index a6b0082..0000000 Binary files a/resources/bubble_down.png and /dev/null differ diff --git a/resources/bubble_up.png b/resources/bubble_up.png deleted file mode 100644 index c1799df..0000000 Binary files a/resources/bubble_up.png and /dev/null differ diff --git a/rpc.php b/rpc.php index 4bbf4d5..49d1930 100644 --- a/rpc.php +++ b/rpc.php @@ -84,11 +84,6 @@ class PHPFSPOT_RPC { $fspot->showPhotoIndex(); break; - case 'showbubbledetails': - - $fspot->showBubbleDetails($_GET['id'], $_GET['direction']); - break; - case 'showcredits': $fspot->showCredits(); diff --git a/stylesheet.css b/stylesheet.css index 0f09bdc..0fe527e 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -60,34 +60,6 @@ img { img.thumb { } -img.bubbleimg_up { - padding-top: 0; - padding-left: 0; - padding-right: 0; - padding-bottom: 0; - margin-top: 39px; - margin-left: 36px; - margin-bottom: 0; - margin-right: 0; - border: 0; - width: 202px; - height: 152px; -} - -img.bubbleimg_down { - padding-top: 0; - padding-left: 0; - padding-right: 0; - padding-bottom: 0; - margin-top: 34px; - margin-left: 36px; - margin-bottom: 0; - margin-right: 0; - border: 0; - width: 202px; - height: 152px; -} - a { font-size: 14px; color: #008200; diff --git a/templates/bubble_details.tpl b/templates/bubble_details.tpl deleted file mode 100644 index 53cd168..0000000 --- a/templates/bubble_details.tpl +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - -
- -
- {$file_name}
- {$file_size}kb, {$width}x{$height} -
diff --git a/templates/credits.tpl b/templates/credits.tpl index b15127e..44c4800 100644 --- a/templates/credits.tpl +++ b/templates/credits.tpl @@ -14,8 +14,6 @@ by Andreas Unterkircher
{mailto address="unki@netshadow.at"}
- Bubble base JavaScript by WebSnapr -
HTML_AJAX
PHP tag-cloud code by Jenny Ferenc. diff --git a/templates/header.tpl b/templates/header.tpl index caac87c..acef8eb 100644 --- a/templates/header.tpl +++ b/templates/header.tpl @@ -6,7 +6,6 @@ -