diff --git a/themes/3nids/3nids/css/fix-ie.css b/themes/3nids/3nids/css/fix-ie.css new file mode 100755 index 00000000..eee88c15 --- /dev/null +++ b/themes/3nids/3nids/css/fix-ie.css @@ -0,0 +1,37 @@ +/** + * Fix display in IE 6, 7 + */ + +#gBanner, +.gBreadcrumbs, +#gAlbumGrid, +#gPager, +#gViewMenu { + zoom: 1; +} + +#gBanner { + z-index: 2; +} + +input.submit { + clear: none !important; + display: inline !important; +} + +#gAddTagForm input.textbox { + width: 110px; +} + +#gDialog a.gCancel { + display: inline-block !important; + float: none !important; +} + +.gPager .txtright { + width: 29%; +} + +.gPager .ui-icon-right { + width: 60px; +} diff --git a/themes/3nids/3nids/css/jquery.fancybox.css b/themes/3nids/3nids/css/jquery.fancybox.css new file mode 100755 index 00000000..f2056332 --- /dev/null +++ b/themes/3nids/3nids/css/jquery.fancybox.css @@ -0,0 +1,673 @@ +html, body { + height: 100%; +} + +div#fancy_overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: black; + display: none; + z-index: 30; +} + +* html div#fancy_overlay { + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +div#fancy_wrap { + text-align: middle; +} + +div#fancy_loading { + position: absolute; + height: 40px; + width: 40px; + cursor: pointer; + display: none; + overflow: hidden; + background: transparent; + z-index: 100; +} + +div#fancy_loading div { + position: absolute; + top: 0; + left: 0; + width: 40px; + height: 480px; + background: transparent url('../images/fancy_progress.png') no-repeat; +} + +div#fancy_loading_overlay { + position: absolute; + background-color: #FFF; + z-index: 30; +} + +div#fancy_loading_icon { + position: absolute; + background: url('../images/fancy_loading.gif') no-repeat; + z-index: 35; + width: 16px; + height: 16px; +} + +div#fancy_outer { + position: absolute; + top: 0; + left: 0; + z-index: 90; + padding: 18px 18px 20px 0px; + margin: 0; + overflow: hidden; + background: transparent; + display: none; +} + +div#fancy_inner { + position: relative; + width:100%; + height:100%; + border: 1px solid #BBB; + background: #FFF; +} + +div#fancy_content { + margin: 0; + z-index: 100; + position: absolute; +} + +div#fancy_div { + background: #000; + color: #FFF; + height: 100%; + width: 100%; + z-index: 100; +} + +img#fancy_img { + position: absolute; + top: 0; + left: 0; + border:0; + padding: 0; + margin: 0; + z-index: 100; + width: 100%; + height: 100%; +} + +div#fancy_close { + position: absolute; + top: -12px; + right: -15px; + height: 30px; + width: 30px; + background: url('../images/fancy_closebox.png') top left no-repeat; + cursor: pointer; + z-index: 181; + display: none; +} + +#fancy_frame { + position: relative; + width: 100%; + height: 100%; + display: none; +} + +#fancy_ajax { + width: 100%; + height: 100%; + overflow: auto; +} + +a#fancy_left, a#fancy_right { + position: absolute; + bottom: 0px; + height: 100%; + width: 35%; + cursor: pointer; + z-index: 111; + display: none; + background-image: url(data:image/gif;base64,AAAA); + outline: none; +} + +a#fancy_left { + left: 0px; +} + +a#fancy_right { + right: 0px; +} + +span.fancy_ico { + position: absolute; + top: 50%; + margin-top: -15px; + width: 30px; + height: 30px; + z-index: 112; + cursor: pointer; + display: block; +} + +span#fancy_left_ico { + left: -9999px; + background: transparent url('../images/fancy_left.png') no-repeat; +} + +span#fancy_right_ico { + right: -9999px; + background: transparent url('../images/fancy_right.png') no-repeat; +} + +a#fancy_left:hover { + visibility: visible; +} + +a#fancy_right:hover { + visibility: visible; +} + +a#fancy_left:hover span { + left: 20px; +} + +a#fancy_right:hover span { + right: 20px; +} + +.fancy_bigIframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: transparent; +} + +div#fancy_bg { + position: absolute; + top: 0; left: 0; + width: 100%; + height: 100%; + z-index: 70; + border: 0; + padding: 0; + margin: 0; +} + +div.fancy_bg { + position: absolute; + display: block; + z-index: 70; + border: 0; + padding: 0; + margin: 0; +} + +div.fancy_bg_n { + top: -18px; + width: 100%; + height: 18px; + background: transparent url('../images/fancy_shadow_n.png') repeat-x; +} + +div.fancy_bg_ne { + top: -18px; + right: -13px; + width: 13px; + height: 18px; + background: transparent url('../images/fancy_shadow_ne.png') no-repeat; +} + +div.fancy_bg_e { + right: -13px; + height: 100%; + width: 13px; + background: transparent url('../images/fancy_shadow_e.png') repeat-y; +} + +div.fancy_bg_se { + bottom: -18px; + right: -13px; + width: 13px; + height: 18px; + background: transparent url('../images/fancy_shadow_se.png') no-repeat; +} + +div.fancy_bg_s { + bottom: -18px; + width: 100%; + height: 18px; + background: transparent url('../images/fancy_shadow_s.png') repeat-x; +} + +div.fancy_bg_sw { + bottom: -18px; + left: -13px; + width: 13px; + height: 18px; + background: transparent url('../images/fancy_shadow_sw.png') no-repeat; +} + +div.fancy_bg_w { + left: -13px; + height: 100%; + width: 13px; + background: transparent url('../images/fancy_shadow_w.png') repeat-y; +} + +div.fancy_bg_nw { + top: -18px; + left: -13px; + width: 13px; + height: 18px; + background: transparent url('../images/fancy_shadow_nw.png') no-repeat; +} + +div#fancy_title { + position: absolute; + bottom: -20px; + left: 0; + z-index: 100; + display: none; +} + +div#fancy_title div { + color: #FFF; + font: bold 10px Arial; + padding-bottom: 3px; +} + +div#fancy_title table { + margin: 0 auto; +} + +div#fancy_title table td { + padding: 0; + vertical-align: middle; +} + +td#fancy_title_left { + height: 32px; + width: 15px; + background: transparent url('../images/fancy_title_left.png') repeat-x; +} + +td#fancy_title_main { + height: 32px; + background: transparent url('../images/fancy_title_main.png') repeat-x; +} + +td#fancy_title_right { + height: 32px; + width: 15px; + background: transparent url('../images/fancy_title_right.png') repeat-x; +} + +div#fancy_modules { + position: absolute; + bottom: -20px; + right: 0px; + z-index: 100; + display: none; +} +div#fancy_modules div { + color: #FFF; + font: bold 10px Arial; + padding-bottom: 3px; +} + +div#fancy_modules table { + margin: 0 auto; +} + +div#fancy_modules table td { + padding: 0; + vertical-align: middle; +} + +td#fancy_modules_left { + border-color: #333333; + height: 32px; + width: 15px; + background: transparent url('../images/fancy_title_left.png') repeat-x; +} + +td#fancy_modules_main { + border-color: #333333; + height: 32px; + background: transparent url('../images/fancy_title_main.png') repeat-x; +} + +td#fancy_modules_right { + border-color: #333333; + height: 32px; + width: 15px; + background: transparent url('../images/fancy_title_right.png') repeat-x; +} + +/* ************************************************* */ +/* ************************************************* */ +/* ************************************************* */ +/* ************************************************* */ + +div#mod_overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: black; + display: none; + z-index: 1030; +} + +* html div#mod_overlay { + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +div#mod_wrap { + text-align: middle; +} + +div#mod_loading { + position: absolute; + height: 40px; + width: 40px; + cursor: pointer; + display: none; + overflow: hidden; + background: transparent; + z-index: 10100; +} + +div#mod_loading div { + position: absolute; + top: 0; + left: 0; + width: 40px; + height: 480px; + background: transparent url('../images/fancy_progress.png') no-repeat; +} + +div#mod_loading_overlay { + position: absolute; + background-color: #FFF; + z-index: 1030; +} + +div#mod_loading_icon { + position: absolute; + background: url('../images/fancy_loading.gif') no-repeat; + z-index: 1035; + width: 16px; + height: 16px; +} + +div#mod_outer { + position: absolute; + top: 0; + left: 0; + z-index: 1090; + padding: 18px 18px 20px 0px; + margin: 0; + overflow: hidden; + background: transparent; + display: none; +} + +div#mod_inner { + position: relative; + width:100%; + height:100%; + border: 1px solid #BBB; + background: #FFF; +} + +div#mod_content { + margin: 0; + z-index: 10100; + position: absolute; +} + +div#mod_div { + background: #000; + color: #FFF; + height: 100%; + width: 100%; + z-index: 10100; +} + +img#mod_img { + position: absolute; + top: 0; + left: 0; + border:0; + padding: 0; + margin: 0; + z-index: 10100; + width: 100%; + height: 100%; +} + +div#mod_close { + position: absolute; + top: -12px; + right: -15px; + height: 30px; + width: 30px; + background: url('../images/fancy_closebox.png') top left no-repeat; + cursor: pointer; + z-index: 10181; + display: none; +} + +#mod_frame { + position: relative; + width: 100%; + height: 100%; + display: none; +} + +#mod_ajax { + width: 100%; + height: 100%; + overflow: auto; +} + +a#mod_left, a#mod_right { + position: absolute; + bottom: 0px; + height: 100%; + width: 35%; + cursor: pointer; + z-index: 10111; + display: none; + background-image: url(data:image/gif;base64,AAAA); + outline: none; +} + +a#mod_left { + left: 0px; +} + +a#mod_right { + right: 0px; +} + +span.mod_ico { + position: absolute; + top: 50%; + margin-top: -15px; + width: 30px; + height: 30px; + z-index: 10112; + cursor: pointer; + display: block; +} + +span#mod_left_ico { + left: -9999px; + background: transparent url('../images/fancy_left.png') no-repeat; +} + +span#mod_right_ico { + right: -9999px; + background: transparent url('../images/fancy_right.png') no-repeat; +} + +a#mod_left:hover { + visibility: visible; +} + +a#mod_right:hover { + visibility: visible; +} + +a#mod_left:hover span { + left: 20px; +} + +a#mod_right:hover span { + right: 20px; +} + +.mod_bigIframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: transparent; +} + +div#mod_bg { + position: absolute; + top: 0; left: 0; + width: 100%; + height: 100%; + z-index: 1070; + border: 0; + padding: 0; + margin: 0; +} + +div.mod_bg { + position: absolute; + display: block; + z-index: 1070; + border: 0; + padding: 0; + margin: 0; +} + +div.mod_bg_n { + top: -18px; + width: 100%; + height: 18px; + background: transparent url('../images/fancy_shadow_n.png') repeat-x; +} + +div.mod_bg_ne { + top: -18px; + right: -13px; + width: 13px; + height: 18px; + background: transparent url('../images/fancy_shadow_ne.png') no-repeat; +} + +div.mod_bg_e { + right: -13px; + height: 100%; + width: 13px; + background: transparent url('../images/fancy_shadow_e.png') repeat-y; +} + +div.mod_bg_se { + bottom: -18px; + right: -13px; + width: 13px; + height: 18px; + background: transparent url('../images/fancy_shadow_se.png') no-repeat; +} + +div.mod_bg_s { + bottom: -18px; + width: 100%; + height: 18px; + background: transparent url('../images/fancy_shadow_s.png') repeat-x; +} + +div.mod_bg_sw { + bottom: -18px; + left: -13px; + width: 13px; + height: 18px; + background: transparent url('../images/fancy_shadow_sw.png') no-repeat; +} + +div.mod_bg_w { + left: -13px; + height: 100%; + width: 13px; + background: transparent url('../images/fancy_shadow_w.png') repeat-y; +} + +div.mod_bg_nw { + top: -18px; + left: -13px; + width: 13px; + height: 18px; + background: transparent url('../images/fancy_shadow_nw.png') no-repeat; +} + +div#mod_title { + position: absolute; + bottom: -20px; + left: 0; + z-index: 10100; + display: none; +} + +div#mod_title div { + color: #FFF; + font: bold 10px Arial; + padding-bottom: 3px; +} + +div#mod_title table { + margin: 0 auto; +} + +div#mod_title table td { + padding: 0; + vertical-align: middle; +} + +td#mod_title_left { + height: 32px; + width: 15px; + background: transparent url('../images/fancy_title_left.png') repeat-x; +} + +td#mod_title_main { + height: 32px; + background: transparent url('../images/fancy_title_main.png') repeat-x; +} + +td#mod_title_right { + height: 32px; + width: 15px; + background: transparent url('../images/fancy_title_right.png') repeat-x; +} + diff --git a/themes/3nids/3nids/css/screen.css b/themes/3nids/3nids/css/screen.css new file mode 100755 index 00000000..ecfd03f7 --- /dev/null +++ b/themes/3nids/3nids/css/screen.css @@ -0,0 +1,1167 @@ +/** + * Gallery 3 Default Theme Screen Styles + * + * @requires YUI reset, font, grids CSS + * + * Sheet organization: + * 1) Basic HTML elements + * 2) Reusable classes + * 3) Reusable content blocks + * 4) Page layout containers + * 5) Content blocks in specific layout containers + * 6) Navigation and menus + * 7) Browser hacks + * 8) jQuery and jQuery UI + * 9) Right-to-left language styles + */ + +/* 3nids specific */ +.gHeadMap img { + display: block; + margin: 3px; +} + +.gHeadMap a { + float: right; +} + + +/** ******************************************************************* + * 1) Basic HTML elements + **********************************************************************/ + +body, html { + background-color: #ccc; + font-family: 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; + color: #e8e8e8; +} + +.modcontent{ + background-color: #333333; +} + +#mod_frame{ + background-color: #333333; + } + +p { + margin-bottom: 1em; +} + +em { + font-style: oblique; +} + +h1, h2, h3, h4, h5, strong, th { + font-weight: bold; +} + +h1 { + font-size: 1.5em; +} + +#gSearchResults h1 { + margin-bottom: 1em; +} + +#gProgress h1 { + font-size: 1.1em; +} + +h2 { + font-size: 1.2em; +} + +#gSidebar .gBlock h2 { + font-size: 1.2em; +} + +#gSidebar .gBlock li { + margin-bottom: .6em; +} + +h3 { + font-size: 1.2em; +} +h4 { + font-size: 0.9em; +} + + +/* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +a, +.gMenu a, +#gDialog a, +.gButtonLink, +.gButtonLink:hover, +.gButtonLink:active, +a.ui-state-hover, +input.ui-state-hover, +button.ui-state-hover { + color: #ffffcc !important; + cursor: pointer !important; + text-decoration: none; + -moz-outline-style: none; +} + +a:hover, +#gDialog a:hover { + text-decoration: underline; +} + +.gMenu a:hover { + text-decoration: none; +} + +#gDialog .gCancel { + clear: none; + float: left; + margin: .3em 1em; +} + +#gForgotPasswordLink { + float: right; + font-size: .9em; +} + +#gDialog .gCancel { + float: left; +} + +#gDialog #gMessage li { + width: 400px; + white-space: normal; + padding-left: 32px; +} + +/* Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +table { + width: 100%; +} + +#gContent table { + margin: 1em 0; +} + +caption, +th { + text-align: left; +} + +th, +td { + border: none; + border-bottom: 1px solid #ccc; + padding: .5em; + vertical-align: top; +} + +/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +fieldset { + border: 1px solid #ccc; + padding-bottom: .8em; +} + +#gBanner fieldset, +#gSidebar fieldset, +.gShortForm fieldset { + border: none; +} + +legend { + font-weight: bold; + margin-left: 1em; + color: #e8e8e8; +} + +#gBanner legend, +#gSidebar legend, +#gContent #gSearchForm legend, +input[type="hidden"], +.gShortForm label { + display: none; +} + +label { + cursor: help; +} + +input[type="text"], +input[type="password"] { + width: 50%; +} + +input[type="text"], +input[type="password"], +textarea { + border: 1px solid #e8e8e8; + border-top-color: #ccc; + border-left-color: #ccc; + color: #333; +} + +textarea { + width: 90%; + height: 12em; +} + +input:focus, +textarea:focus, +option:focus { + background-color: #ffc; + color: #000; +} + +/* Form layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +form li { + margin: 0 !important; + padding: .3em 1.5em .3em 1em; +} + +form ul ul { + clear: both; +} + +form ul ul li { + float: left; +} + +input, +select, +textarea { + display: block; + clear: both; + padding: .2em; +} + +input[type="submit"], +input[type="reset"] { + display: inline; + clear: none; + float: left; +} + +/* Form validation ~~~~~~~~~~~~~~~~~~~~~~~ */ + +.gValidationRule { + font-size: 80%; + margin-top: .5em; +} + +form.gError input[type="text"], +li.gError input[type="text"], +form.gError input[type="password"], +li.gError input[type="password"], +form.gError input[type="checkbox"], +li.gError input[type="checkbox"], +form.gError input[type="radio"], +li.gError input[type="radio"], +form.gError textarea, +li.gError textarea, +form.gError select, +li.gError select { + border: 2px solid red; +} + +/** ******************************************************************* + * 2) Reusable generic classes + *********************************************************************/ + +.inactive, .understate { + color: #ccc; + font-weight: normal; +} + +.left { + float: left; + margin: 1em 1em 1em 0; +} + +.right { + float: right; + margin: 1em 0 1em 1em; +} + +.txtright { + text-align: right; +} + +/** ******************************************************************* + * 3) Reusable content blocks + *********************************************************************/ + +.gBlock { + clear: both; + margin-bottom: 2.5em; +} + +.gBlock h2 { + background-color: #333333; + padding: .3em .8em; +} + +.gBlockContent { + margin-top: 1em; +} + +/* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ + +#gMessage { + width: 100%; +} + +#gSiteStatus li, +#gMessage li, +.gModuleStatus { + border: 1px solid #ccc; + margin-bottom: .4em; +} + +#gSiteStatus li { + margin-bottom: 0; + border: none; + border-bottom: 1px solid #ccc; +} + +.gModuleStatus { + clear: both; + margin-bottom: 1em; +} + +.gError, +.gInfo, +.gSuccess, +.gWarning { + background-position: .4em 50%; + background-repeat: no-repeat; + padding: .4em .5em .4em 30px; +} + +.gError { + background-color: #f6cbca; + background-image: url('../images/ico-error.png'); +} + +.gInfo { + background-color: #e8e8e8; + background-image: url('../images/ico-info.png'); +} + +.gSuccess { + background-color: #d9efc2; + background-image: url('../images/ico-success.png'); +} + +.gWarning { + background-color: #fcf9ce; + background-image: url('../images/ico-warning.png'); +} + +form .gError, +.gPager .gInfo { + background-color: #333333 !important; +} + +.gPager .gInfo { + background-image: none !important; + padding: 0 !important; +} + +/* Inline layout (forms, lists) ~~~~~~~~~~ */ + +.gShortForm li { + float: left; + padding: .4em 0; +} + +.gShortForm input[type="text"] { + color: #666; + padding: .3em .6em; + width: 11em; +} + +/*** ****************************************************************** + * 4) Page layout containers + *********************************************************************/ + +/* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.gView { + background-color: #333333; + border: 1px solid #e8e8e8; + border-bottom: none; +} + +/* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */ + +#gHeader { + margin-bottom: 1em; + background-color: #484848; + border-bottom: 1px solid #e8e8e8; +} + +#gBanner { + background-color: #333333; + border-bottom: 1px solid #e8e8e8; + font-size: .8em; + min-height: 5em; + padding: 1em 20px; + position: relative; +} + +#gContent { + font-size: 1.0em; + padding-left: 20px; + position: relative; + width: 600px; +} + +#gSidebar { + background-color: #333333; + font-size: .9em; + padding: 0 20px; + width: 220px; +} + +#gFooter { + background-color: #484848; + border-top: 1px solid #ccc; + font-size: .8em; + margin-top: 20px; + padding: 10px 20px; +} + +/** ******************************************************************* + * 5) Content blocks in specific layout containers + *********************************************************************/ + +/* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#gBanner #gLogo img { + margin: 0; +} + +#gBanner #gQuickSearchForm { + clear: right; + float: right; + margin-top: 1em; +} + +#gBanner #gQuickSearchForm input[type='text'] { + width: 17em; +} + +#gContent .gBlock h2 { + background-color: transparent; + padding-left: 0; +} + +#gSidebar .gBlockContent { + padding-left: 1em; +} + +/* Album content ~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#gContent #gAlbumGrid { + margin: 1em 0; + position: relative; + z-index: 1; +} + +#gContent #gAlbumGrid .gItem { + background-color: #484848; + border: 1px solid #e8e8e8; + float: left; + font-size: .7em; + height: 220px; + overflow: hidden; + padding: .6em 8px; + position: relative; + text-align: center; + width: 180px; + z-index: 1; +} + +#gContent #gAlbumGrid .gItem h2 { + margin: 5px 0; +} + +#gContent .gPhoto h2, +#gContent .gItem .gMetadata { + display: none; +} + +#gContent #gAlbumGrid .gAlbum { + background-color: #484848; +} + +.gImageBlock .gParentAlbum h4 span { + background: transparent url('../images/ico-album.png') no-repeat top left; + display: inline-block; + height: 16px; + margin-right: 5px; + width: 16px; +} + +#gContent #gAlbumGrid .gAlbum h2 span { + background: transparent url('../images/ico-album.png') no-repeat top left; + display: inline-block; + height: 16px; + margin-right: 5px; + width: 16px; +} + +#gContent #gAlbumGrid .gHoverItem { + background-color: #000; + border: 1px solid #f9bd01; +} + +#gContent .gHoverItem h2, +#gContent .gHoverItem .gMetadata { + display: block; +} + +/* Individual photo content ~~~~~~~~~~~~~~ */ + +#gContent #gItem { + position: relative; + width: 99%; +} + +#gContent #gPhoto { + position: relative; +} + +#gContent #gItem .gFullSizeLink img { + display: block; + margin: 1em auto !important; +} + + .gCommentBox { + border-bottom: 1px solid #555; +} + .gComment { + margin-left: 2em; + margin-top: .3em; + margin-bottom: .5em; +} + + #gCommentDetail { + width: 360px; + height: 100%; + background-color: #333333; + padding: 10px; + text-align: left; + margin-top: 30px; +} + #gComments { + margin-top: 2em; + position: relative; +} + + #gComments ul li { + margin: 1em 0; +} + + #gComments ul li div { + padding: 0 8px 8px 43px; +} + + #gComments ul li #gRecaptcha { + padding: 0; +} + + #gComments ul li #gRecaptcha div { + padding: 0; +} + +#gAddCommentButton { + position: absolute; + right: 0; + top: 2px; +} + + #gAddCommentForm { + margin-top: 2em; +} + +/* Footer content ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#gBanner #gLoginMenu li, +#gFooter #gCredits li { + display: inline; +} + +#gBanner #gLoginMenu li { + padding-left: 1.2em; +} + +#gFooter #gCredits li { + padding-right: 1.2em; +} + +#gContent #gSearchResults { + margin-top: 1em; + padding-top: 1em; +} + +/** ******************************************************************* + * 5) Navigation and menus + *********************************************************************/ + +#gSiteMenu, +#gTagCloud ul { + font-size: 1.2em; +} + +/* Login menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#gBanner #gLoginMenu { + color: #999; + float: right; +} + +/* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#gSiteMenu { + bottom: 0; + display: none; + left: 140px; + position: absolute; +} + +#gSiteMenu ul { + margin-bottom: 0 !important; +} + +/* Context Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.gContextMenu { + position: absolute; + bottom: 0; + left: 0; +} + +.gItem .gContextMenu { + display: none; + margin-top: 2em; + width: 100%; +} + +#gItem .gContextMenu { + font-size: .7em; +} + +#gItem .gContextMenu ul { + display: none; +} + +.gContextMenu li { + border-left: none; + border-right: none; + border-bottom: none; +} + +.gContextMenu li a { + display: block; + line-height: 1.6em; +} + +.gHoverItem .gContextMenu { + display: block; +} + +.gHoverItem .gContextMenu li { + text-align: left; +} + +.gHoverItem .gContextMenu a:hover { + text-decoration: none; +} + +/* View Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#gViewMenu { + margin-bottom: 1em; +} + +#gViewMenu a { + background-repeat: no-repeat; + background-position: 50% 50%; + height: 28px !important; + width: 43px !important; +} + +#gViewMenu #gHybridLink { + background-image: url('../images/ico-view-hybrid.png'); +} + +#gViewMenu #gSlideshowLink { + background-image: url('../images/ico-view-slideshow.png'); +} + +#gViewMenu .gFullSizeLink { + background-image: url('../images/ico-view-fullsize.png'); +} + +#gViewMenu #gCommentsLink { + background-image: url('../images/ico-view-comments.png'); +} + +#gViewMenu #gDigibugLink { + background-image: url('../images/ico-print.png'); +} + +/* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +.gBreadcrumbs { + padding: 0 20px; +} + +.gBreadcrumbs li { + background: transparent url('../images/ico-separator.gif') no-repeat scroll left center; + float: left; + padding: 10px 6px 10px 16px !important; +} + +.gBreadcrumbs li.root { + background: transparent; +} + +.gBreadcrumbs li a, +.gBreadcrumbs li span { + display: block; +} + +.gBreadcrumbs li.active, +.gBreadcrumbs li.active span { + font-weight: bold; +} + +#gDialog ul.gBreadcrumbs { + clear: both; + margin-left: 0; + padding-left: 0; +} + +#gDialog .gBreadcrumbs li { + font-size: .9em; +} + +/* Tags and cloud ~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#gTagCloud ul { + text-align: justify; +} + +#gTagCloud ul li { + display: inline; + line-height: 1.5em; + text-align: justify; +} + +#gTagCloud ul li a { + text-decoration: none; +} + +#gTagCloud ul li span { + display: none; +} + +#gTagCloud ul li.size1 a { + color: #9cf; + font-size: 80%; + font-weight: 100; +} + +#gTagCloud ul li.size2 a { + color: #69f; + font-size: 90%; + font-weight: 300; +} + +#gTagCloud ul li.size3 a { + color: #69c; + font-size: 100%; + font-weight: 500; +} + +#gTagCloud ul li.size4 a { + color: #369; + font-size: 110%; + font-weight: 700; +} + +#gTagCloud ul li.size5 a { + color: #0e2b52; + font-size: 120%; + font-weight: 900; +} + +#gTagCloud ul li.size6 a { + color: #0e2b52; + font-size: 130%; + font-weight: 900; +} + +#gTagCloud ul li.size7 a { + color: #0e2b52; + font-size: 140%; + font-weight: 900; +} + +#gTagCloud ul li a:hover { + color: #f30; + text-decoration: underline; +} + +#gWelcomeMessage p { + padding-bottom: 1em; +} + +/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.gPager { + clear: both; + margin: 0; + padding: 5px 0 !important; + width: 100%; +} + +.gPager li { + float: left; + margin: 0; + width: 30%; +} + +.gPager .gInfo { + text-align: center; + width: 40%; +} + +/** ******************************************************************* + * 6) Browser hacks + *********************************************************************/ + +#gHeader:after, +#gAlbumGrid:after, +.gPager:after, +#gViewMenu:after { + clear: both; + content: "."; + display: block; + height: 0; + visibility: hidden; +} + +/** ******************************************************************* + * 7) jQuery and jQuery UI + *********************************************************************/ + +/* Superfish menu overrides ~~~~~~~~~~~~~~ */ + +.sf-menu li li, .sf-menu li li ul li { + background-color: #bdd2ff; +} + +.sf-menu li:hover { + background-color: #dfe9ff; +} + +/* Ajax loading indicator ~~~~~~~~~~~~~~~~ */ + +.gLoadingLarge { + background: #e8e8e8 url('../../../lib/images/loading-large.gif') no-repeat center center; + font-size: 0; +} + +.gDialogLoadingLarge { + background: url('../../../lib/images/loading-large.gif') no-repeat center center !important; + font-size: 0; +} + +.gLoadingSmall { + background: #e8e8e8 url('../../../lib/images/loading-small.gif') no-repeat center center; + font-size: 0; +} + +.gDraggable { + cursor: move; +} + +.gDropTarget { + background-color: #cfdeff; + border: 1px dotted #999; + height: 100px; + margin: 1em 0; +} + +/* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */ + +.ui-widget-overlay { + background: #000; + opacity: .7; +} + +#gDialog { + text-align: left; +} + +#gDialog li { + padding-left: 0; +} + +#gDialog form input[type="text"], +#gDialog form input[type="password"] { + width: 100%; +} + +#gDialog #gLoginForm, +#gDialog #gAddUserForm, +#gDialog #gAddGroupForm { + margin: 0 auto; + width: 270px; +} + +#gDialog fieldset { + border: none; +} + +#gDialog legend { + display: none; +} + +#gDialog p { + margin: 0; +} + +/* jQuery UI ThemeRoller buttons */ + +.gButtonLink { + display: inline-block; + margin: 0 4px 0 0; + padding: .2em .4em; + outline: 0; +} + +.gButtonSet { + padding-left: 1px; +} + +.gButtonSet li { + float: left; +} + +.gButtonSet .gButtonLink { + margin: 0; +} + +.ui-icon-left .ui-icon { + float: left; + margin-right: .2em; +} + +.ui-icon-right .ui-icon { + float: right; + margin-left: .2em; +} + +.ui-icon-rotate-ccw { + background-position: -192px -64px; +} + +.ui-icon-rotate-cw { + background-position: -208px -64px; +} + +/* STUFF THAT NEEDS A HOME */ + +#gMove ul { + padding-left: 1em; +} + +#gMove .selected { + background: #999; +} + +/* Server Add */ + +#gServerAdd button { + margin-bottom: .5em; +} + +#gServerAddTree { + cursor: pointer; + padding-left: 4px; + width: 95%; +} + +#gServerAddTree li { + padding: 0; + float: none; +} + +#gServerAddTree span.selected { + background: #ddd; +} + +#gServerAddTree { + border: 1px solid #ccc; + height: 20em; + overflow: auto; + margin-bottom: .5em; + padding: .5em; +} + +#gServerAdd ul ul li { + padding-left: 1.2em; +} + +/* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#gEditPermissionForm { + clear: both; +} +#gEditPermissionForm fieldset { + border: 1px solid #cccccc; + padding: 0; +} + +#gPermissions .gDenied, +#gPermissions .gAllowed { + text-align: center; + vertical-align: middle; +} +#gPermissions .gDenied { + background-color: #fcc; +} +#gPermissions .gAllowed { + background-color: #cfc; +} + +/*************** STUFF THAT NEEDS A HOME ****************/ + +.gProgressBar { + height: 1em; + width: 100%; + margin-top: .5em; + display: inline-block; +} + +#gAddPhotos span { + clear: both; + display: block; +} + +#gAddPhotosCanvas { + height: 325px; + width: 450px; + overflow: auto; +} + +#gAddPhotosQueue .progressbar { + height: 4px; +} + +#gAddPhotosQueue .title { + font-size: 1.25em; +} + +#gAddPhotosQueue .status { + font-size: .75em; +} + +#gAddPhotosQueue .box { + margin-bottom: 8px; + padding: 4px; +} + +#gAddPhotosQueue .pending { + background-color: #e8e8e8; + border: 1px solid #d7d7d7; +} + +#gAddPhotosQueue .error { + background-color: #fcc; + border: 1px solid #ebb; +} + +#gAddPhotosQueue .uploading { + background-color: #ff9; + border: 1px solid #ee8; +} + +#gAddPhotosQueue .complete { + background-color: #cfc; + border: 1px solid #beb; +} + +#gAdminG2ImportNotes { + padding-bottom: 20px; +} + +#gAdminG2ImportDetails { + padding-top: 20px; +} + +#gAdminG2ImportDetails .gWarning { + margin-top: 4px; +} + +#gAdminG2ImportDetails .gInfo { + padding: 2px; + border: 1px solid #999; + margin-bottom: 10px; +} + +#gAdminG2ImportNotes p, +#gAdminG2ImportDetails .gInfo p { + padding: 0; + margin: 0; +} + +#gAdminG2ImportNotes ul li, +#gAdminG2Import .gInfo ul li { + padding-left: 0; + margin-left: 20px; + list-style-type: disc; +} + +/* Right to left styles ~~~~~~~~~~~~~~~~~~~~ */ + +.rtl { + direction: rtl; +} + +.rtl caption, +.rtl th, +.rtl #gDialog { + text-align: right; +} + +.rtl #gHeader #gQuickSearchForm, +.rtl #gForgotPasswordLink, +.rtl #gHeader #gLoginMenu, +.rtl .ui-icon-right .ui-icon { + clear: left; + float: left; +} + +.rtl #gDialog .gCancel, +.rtl form ul ul li, +.rtl input[type="submit"], +.rtl input[type="reset"], +.rtl .gShortForm li, +.rtl #gHeader #gLogo img, +.rtl #gContent #gAlbumGrid .gItem, +.rtl #gSiteMenu, +.rtl .gBreadcrumbs li, +.rtl .gPager li, +.rtl .gButtonSet li, +.rtl .ui-icon-left .ui-icon { + float: right; +} + diff --git a/themes/3nids/3nids/images/avatar.jpg b/themes/3nids/3nids/images/avatar.jpg new file mode 100755 index 00000000..d08724fc Binary files /dev/null and b/themes/3nids/3nids/images/avatar.jpg differ diff --git a/themes/3nids/3nids/images/fancy_closebox.png b/themes/3nids/3nids/images/fancy_closebox.png new file mode 100755 index 00000000..4de4396d Binary files /dev/null and b/themes/3nids/3nids/images/fancy_closebox.png differ diff --git a/themes/3nids/3nids/images/fancy_left.png b/themes/3nids/3nids/images/fancy_left.png new file mode 100755 index 00000000..61494e63 Binary files /dev/null and b/themes/3nids/3nids/images/fancy_left.png differ diff --git a/themes/3nids/3nids/images/fancy_progress.png b/themes/3nids/3nids/images/fancy_progress.png new file mode 100755 index 00000000..06b7c89a Binary files /dev/null and b/themes/3nids/3nids/images/fancy_progress.png differ diff --git a/themes/3nids/3nids/images/fancy_right.png b/themes/3nids/3nids/images/fancy_right.png new file mode 100755 index 00000000..0a56042f Binary files /dev/null and b/themes/3nids/3nids/images/fancy_right.png differ diff --git a/themes/3nids/3nids/images/fancy_shadow_e.png b/themes/3nids/3nids/images/fancy_shadow_e.png new file mode 100755 index 00000000..5db7b2b8 Binary files /dev/null and b/themes/3nids/3nids/images/fancy_shadow_e.png differ diff --git a/themes/3nids/3nids/images/fancy_shadow_n.png b/themes/3nids/3nids/images/fancy_shadow_n.png new file mode 100755 index 00000000..4e20abbe Binary files /dev/null and b/themes/3nids/3nids/images/fancy_shadow_n.png differ diff --git a/themes/3nids/3nids/images/fancy_shadow_ne.png b/themes/3nids/3nids/images/fancy_shadow_ne.png new file mode 100755 index 00000000..64ef7225 Binary files /dev/null and b/themes/3nids/3nids/images/fancy_shadow_ne.png differ diff --git a/themes/3nids/3nids/images/fancy_shadow_nw.png b/themes/3nids/3nids/images/fancy_shadow_nw.png new file mode 100755 index 00000000..9ef03377 Binary files /dev/null and b/themes/3nids/3nids/images/fancy_shadow_nw.png differ diff --git a/themes/3nids/3nids/images/fancy_shadow_s.png b/themes/3nids/3nids/images/fancy_shadow_s.png new file mode 100755 index 00000000..bf52bd61 Binary files /dev/null and b/themes/3nids/3nids/images/fancy_shadow_s.png differ diff --git a/themes/3nids/3nids/images/fancy_shadow_se.png b/themes/3nids/3nids/images/fancy_shadow_se.png new file mode 100755 index 00000000..12311ed3 Binary files /dev/null and b/themes/3nids/3nids/images/fancy_shadow_se.png differ diff --git a/themes/3nids/3nids/images/fancy_shadow_sw.png b/themes/3nids/3nids/images/fancy_shadow_sw.png new file mode 100755 index 00000000..923a8b50 Binary files /dev/null and b/themes/3nids/3nids/images/fancy_shadow_sw.png differ diff --git a/themes/3nids/3nids/images/fancy_shadow_w.png b/themes/3nids/3nids/images/fancy_shadow_w.png new file mode 100755 index 00000000..6f808d3e Binary files /dev/null and b/themes/3nids/3nids/images/fancy_shadow_w.png differ diff --git a/themes/3nids/3nids/images/fancy_title_left.png b/themes/3nids/3nids/images/fancy_title_left.png new file mode 100755 index 00000000..1e82b6da Binary files /dev/null and b/themes/3nids/3nids/images/fancy_title_left.png differ diff --git a/themes/3nids/3nids/images/fancy_title_main.png b/themes/3nids/3nids/images/fancy_title_main.png new file mode 100755 index 00000000..5f505b00 Binary files /dev/null and b/themes/3nids/3nids/images/fancy_title_main.png differ diff --git a/themes/3nids/3nids/images/fancy_title_right.png b/themes/3nids/3nids/images/fancy_title_right.png new file mode 100755 index 00000000..ef0dc201 Binary files /dev/null and b/themes/3nids/3nids/images/fancy_title_right.png differ diff --git a/themes/3nids/3nids/images/ico-album.png b/themes/3nids/3nids/images/ico-album.png new file mode 100755 index 00000000..e3bb4fc5 Binary files /dev/null and b/themes/3nids/3nids/images/ico-album.png differ diff --git a/themes/3nids/3nids/images/ico-denied-gray.png b/themes/3nids/3nids/images/ico-denied-gray.png new file mode 100755 index 00000000..56db3ff5 Binary files /dev/null and b/themes/3nids/3nids/images/ico-denied-gray.png differ diff --git a/themes/3nids/3nids/images/ico-denied-pale.png b/themes/3nids/3nids/images/ico-denied-pale.png new file mode 100755 index 00000000..1e992230 Binary files /dev/null and b/themes/3nids/3nids/images/ico-denied-pale.png differ diff --git a/themes/3nids/3nids/images/ico-denied.png b/themes/3nids/3nids/images/ico-denied.png new file mode 100755 index 00000000..08f24936 Binary files /dev/null and b/themes/3nids/3nids/images/ico-denied.png differ diff --git a/themes/3nids/3nids/images/ico-error.png b/themes/3nids/3nids/images/ico-error.png new file mode 100755 index 00000000..c37bd062 Binary files /dev/null and b/themes/3nids/3nids/images/ico-error.png differ diff --git a/themes/3nids/3nids/images/ico-help.png b/themes/3nids/3nids/images/ico-help.png new file mode 100755 index 00000000..5c870176 Binary files /dev/null and b/themes/3nids/3nids/images/ico-help.png differ diff --git a/themes/3nids/3nids/images/ico-info.png b/themes/3nids/3nids/images/ico-info.png new file mode 100755 index 00000000..12cd1aef Binary files /dev/null and b/themes/3nids/3nids/images/ico-info.png differ diff --git a/themes/3nids/3nids/images/ico-lock.png b/themes/3nids/3nids/images/ico-lock.png new file mode 100755 index 00000000..2ebc4f6f Binary files /dev/null and b/themes/3nids/3nids/images/ico-lock.png differ diff --git a/themes/3nids/3nids/images/ico-print.png b/themes/3nids/3nids/images/ico-print.png new file mode 100755 index 00000000..b82a8e1e Binary files /dev/null and b/themes/3nids/3nids/images/ico-print.png differ diff --git a/themes/3nids/3nids/images/ico-separator.gif b/themes/3nids/3nids/images/ico-separator.gif new file mode 100755 index 00000000..3de2d0d3 Binary files /dev/null and b/themes/3nids/3nids/images/ico-separator.gif differ diff --git a/themes/3nids/3nids/images/ico-success-gray.png b/themes/3nids/3nids/images/ico-success-gray.png new file mode 100755 index 00000000..74b2032f Binary files /dev/null and b/themes/3nids/3nids/images/ico-success-gray.png differ diff --git a/themes/3nids/3nids/images/ico-success-pale.png b/themes/3nids/3nids/images/ico-success-pale.png new file mode 100755 index 00000000..dc8d1ded Binary files /dev/null and b/themes/3nids/3nids/images/ico-success-pale.png differ diff --git a/themes/3nids/3nids/images/ico-success.png b/themes/3nids/3nids/images/ico-success.png new file mode 100755 index 00000000..a9925a06 Binary files /dev/null and b/themes/3nids/3nids/images/ico-success.png differ diff --git a/themes/3nids/3nids/images/ico-view-comments.png b/themes/3nids/3nids/images/ico-view-comments.png new file mode 100755 index 00000000..e5d3630f Binary files /dev/null and b/themes/3nids/3nids/images/ico-view-comments.png differ diff --git a/themes/3nids/3nids/images/ico-view-fullsize.png b/themes/3nids/3nids/images/ico-view-fullsize.png new file mode 100755 index 00000000..0be23e9b Binary files /dev/null and b/themes/3nids/3nids/images/ico-view-fullsize.png differ diff --git a/themes/3nids/3nids/images/ico-view-hybrid.png b/themes/3nids/3nids/images/ico-view-hybrid.png new file mode 100755 index 00000000..ee902e55 Binary files /dev/null and b/themes/3nids/3nids/images/ico-view-hybrid.png differ diff --git a/themes/3nids/3nids/images/ico-view-slideshow.png b/themes/3nids/3nids/images/ico-view-slideshow.png new file mode 100755 index 00000000..82f61f63 Binary files /dev/null and b/themes/3nids/3nids/images/ico-view-slideshow.png differ diff --git a/themes/3nids/3nids/images/ico-warning.png b/themes/3nids/3nids/images/ico-warning.png new file mode 100755 index 00000000..628cf2da Binary files /dev/null and b/themes/3nids/3nids/images/ico-warning.png differ diff --git a/themes/3nids/3nids/images/map.png b/themes/3nids/3nids/images/map.png new file mode 100755 index 00000000..1df93fb5 Binary files /dev/null and b/themes/3nids/3nids/images/map.png differ diff --git a/themes/3nids/3nids/images/select-photos-backg.png b/themes/3nids/3nids/images/select-photos-backg.png new file mode 100755 index 00000000..81c2d616 Binary files /dev/null and b/themes/3nids/3nids/images/select-photos-backg.png differ diff --git a/themes/3nids/3nids/js/jquery.easing.js b/themes/3nids/3nids/js/jquery.easing.js new file mode 100755 index 00000000..d65948d3 --- /dev/null +++ b/themes/3nids/3nids/js/jquery.easing.js @@ -0,0 +1,205 @@ +/* + * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ + * + * Uses the built in easing capabilities added In jQuery 1.1 + * to offer multiple easing options + * + * TERMS OF USE - jQuery Easing + * + * Open source under the BSD License. + * + * Copyright © 2008 George McGinley Smith + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * +*/ + +// t: current time, b: begInnIng value, c: change In value, d: duration +jQuery.easing['jswing'] = jQuery.easing['swing']; + +jQuery.extend( jQuery.easing, +{ + def: 'easeOutQuad', + swing: function (x, t, b, c, d) { + //alert(jQuery.easing.default); + return jQuery.easing[jQuery.easing.def](x, t, b, c, d); + }, + easeInQuad: function (x, t, b, c, d) { + return c*(t/=d)*t + b; + }, + easeOutQuad: function (x, t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + easeInOutQuad: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t + b; + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + easeInCubic: function (x, t, b, c, d) { + return c*(t/=d)*t*t + b; + }, + easeOutCubic: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; + }, + easeInOutCubic: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; + }, + easeInQuart: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + easeOutQuart: function (x, t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + easeInOutQuart: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t + b; + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + easeInQuint: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t*t + b; + }, + easeOutQuint: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t*t*t + 1) + b; + }, + easeInOutQuint: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; + return c/2*((t-=2)*t*t*t*t + 2) + b; + }, + easeInSine: function (x, t, b, c, d) { + return -c * Math.cos(t/d * (Math.PI/2)) + c + b; + }, + easeOutSine: function (x, t, b, c, d) { + return c * Math.sin(t/d * (Math.PI/2)) + b; + }, + easeInOutSine: function (x, t, b, c, d) { + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; + }, + easeInExpo: function (x, t, b, c, d) { + return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; + }, + easeOutExpo: function (x, t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; + }, + easeInOutExpo: function (x, t, b, c, d) { + if (t==0) return b; + if (t==d) return b+c; + if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; + return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; + }, + easeInCirc: function (x, t, b, c, d) { + return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; + }, + easeOutCirc: function (x, t, b, c, d) { + return c * Math.sqrt(1 - (t=t/d-1)*t) + b; + }, + easeInOutCirc: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; + return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; + }, + easeInElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + easeOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + easeInOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + easeInBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + easeOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + easeInOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + easeInBounce: function (x, t, b, c, d) { + return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; + }, + easeOutBounce: function (x, t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } + }, + easeInOutBounce: function (x, t, b, c, d) { + if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; + return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}); + +/* + * + * TERMS OF USE - EASING EQUATIONS + * + * Open source under the BSD License. + * + * Copyright © 2001 Robert Penner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ \ No newline at end of file diff --git a/themes/3nids/3nids/js/jquery.fancybox.js b/themes/3nids/3nids/js/jquery.fancybox.js new file mode 100755 index 00000000..d4a4a480 --- /dev/null +++ b/themes/3nids/3nids/js/jquery.fancybox.js @@ -0,0 +1,1104 @@ +/* + * FancyBox - simple and fancy jQuery plugin + * Examples and documentation at: http://fancy.klade.lv/ + * Version: 1.2.1 (13/03/2009) + * Copyright (c) 2009 Janis Skarnelis + * Licensed under the MIT License: http://en.wikipedia.org/wiki/MIT_License + * Requires: jQuery v1.3+ +*/ +;(function($) { + + $.fn.fixPNG = function() { + return this.each(function () { + var image = $(this).css('backgroundImage'); + + if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) { + image = RegExp.$1; + $(this).css({ + 'backgroundImage': 'none', + 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=" + ($(this).css('backgroundRepeat') == 'no-repeat' ? 'crop' : 'scale') + ", src='" + image + "')" + }).each(function () { + var position = $(this).css('position'); + if (position != 'absolute' && position != 'relative') + $(this).css('position', 'relative'); + }); + } + }); + }; + + var elem, opts, busy = false, imagePreloader = new Image, loadingTimer, loadingFrame = 1, imageRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i; + var isIE = ($.browser.msie && parseInt($.browser.version.substr(0,1)) < 8); + + $.fn.fancybox = function(settings) { + settings = $.extend({}, $.fn.fancybox.defaults, settings); + + var matchedGroup = this; + + function _initialize() { + elem = this; + opts = settings; + + _start(); + + return false; + }; + + function _start() { + if (busy) return; + + if ($.isFunction(opts.callbackOnStart)) { + opts.callbackOnStart(); + } + + opts.itemArray = []; + opts.itemCurrent = 0; + + if (settings.itemArray.length > 0) { + opts.itemArray = settings.itemArray; + + } else { + var item = {}; + + if (!elem.rel || elem.rel == '') { + var item = {href: elem.href, title: elem.title, modules: elem.name}; + + if ($(elem).children("img:first").length) { + item.orig = $(elem).children("img:first"); + } + + opts.itemArray.push( item ); + + } else { + + var subGroup = $(matchedGroup).filter("a[rel=" + elem.rel + "]"); + + var item = {}; + + for (var i = 0; i < subGroup.length; i++) { + item = {href: subGroup[i].href, title: subGroup[i].title, modules: subGroup[i].name}; + + if ($(subGroup[i]).children("img:first").length) { + item.orig = $(subGroup[i]).children("img:first"); + } + + opts.itemArray.push( item ); + } + + while ( opts.itemArray[ opts.itemCurrent ].href != elem.href ) { + opts.itemCurrent++; + } + } + } + + if (opts.overlayShow) { + if (isIE) { + $('embed, object, select').css('visibility', 'hidden'); + } + + $("#fancy_overlay").css('opacity', opts.overlayOpacity).show(); + } + + _change_item(); + }; + + function _change_item() { + $("#fancy_right, #fancy_left, #fancy_close, #fancy_title, #fancy_modules").hide(); + + var href = opts.itemArray[ opts.itemCurrent ].href; + + if (href.match(/#/)) { + var target = window.location.href.split('#')[0]; target = href.replace(target, ''); target = target.substr(target.indexOf('#')); + + _set_content('
' + $(target).html() + '
', opts.frameWidth, opts.frameHeight); + + } else if (href.match(imageRegExp)) { + imagePreloader = new Image; imagePreloader.src = href; + + if (imagePreloader.complete) { + _proceed_image(); + + } else { + $.fn.fancybox.showLoading(); + + $(imagePreloader).unbind().bind('load', function() { + $(".fancy_loading").hide(); + + _proceed_image(); + }); + } + + } else if (href.match("iframe") || elem.className.indexOf("iframe") >= 0) { + _set_content('', opts.frameWidth, opts.frameHeight); + + } else { + $.get(href, function(data) { + _set_content( '
' + data + '
', opts.frameWidth, opts.frameHeight ); + }); + } + }; + + function _proceed_image() { + if (opts.imageScale) { + var w = $.fn.fancybox.getViewport(); + + var r = Math.min(Math.min(w[0] - 36, imagePreloader.width) / imagePreloader.width, Math.min(w[1] - 60, imagePreloader.height) / imagePreloader.height); + + var width = Math.round(r * imagePreloader.width); + var height = Math.round(r * imagePreloader.height); + + } else { + var width = imagePreloader.width; + var height = imagePreloader.height; + } + + _set_content('', width, height); + }; + + function _preload_neighbor_images() { + if ((opts.itemArray.length -1) > opts.itemCurrent) { + var href = opts.itemArray[opts.itemCurrent + 1].href; + + if (href.match(imageRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + + if (opts.itemCurrent > 0) { + var href = opts.itemArray[opts.itemCurrent -1].href; + + if (href.match(imageRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + }; + + function _set_content(value, width, height) { + busy = true; + + var pad = opts.padding; + + if (isIE) { + $("#fancy_content")[0].style.removeExpression("height"); + $("#fancy_content")[0].style.removeExpression("width"); + } + + if (pad > 0) { + width += pad * 2; + height += pad * 2; + + $("#fancy_content").css({ + 'top' : pad + 'px', + 'right' : pad + 'px', + 'bottom' : pad + 'px', + 'left' : pad + 'px', + 'width' : 'auto', + 'height' : 'auto' + }); + + if (isIE) { + $("#fancy_content")[0].style.setExpression('height', '(this.parentNode.clientHeight - 20)'); + $("#fancy_content")[0].style.setExpression('width', '(this.parentNode.clientWidth - 20)'); + } + + } else { + $("#fancy_content").css({ + 'top' : 0, + 'right' : 0, + 'bottom' : 0, + 'left' : 0, + 'width' : '100%', + 'height' : '100%' + }); + } + + if ($("#fancy_outer").is(":visible") && width == $("#fancy_outer").width() && height == $("#fancy_outer").height()) { + $("#fancy_content").fadeOut("fast", function() { + $("#fancy_content").empty().append($(value)).fadeIn("normal", function() { + _finish(); + }); + }); + + return; + } + + var w = $.fn.fancybox.getViewport(); + + var itemLeft = (width + 36) > w[0] ? w[2] : (w[2] + Math.round((w[0] - width - 36) / 2)); + var itemTop = (height + 50) > w[1] ? w[3] : (w[3] + Math.round((w[1] - height - 50) / 2)); + + var itemOpts = { + 'left': itemLeft, + 'top': itemTop, + 'width': width + 'px', + 'height': height + 'px' + }; + + if ($("#fancy_outer").is(":visible")) { + $("#fancy_content").fadeOut("normal", function() { + $("#fancy_content").empty(); + $("#fancy_outer").animate(itemOpts, opts.zoomSpeedChange, opts.easingChange, function() { + $("#fancy_content").append($(value)).fadeIn("normal", function() { + _finish(); + }); + }); + }); + + } else { + + if (opts.zoomSpeedIn > 0 && opts.itemArray[opts.itemCurrent].orig !== undefined) { + $("#fancy_content").empty().append($(value)); + + var orig_item = opts.itemArray[opts.itemCurrent].orig; + var orig_pos = $.fn.fancybox.getPosition(orig_item); + + $("#fancy_outer").css({ + 'left': (orig_pos.left - 18) + 'px', + 'top': (orig_pos.top - 18) + 'px', + 'width': $(orig_item).width(), + 'height': $(orig_item).height() + }); + + if (opts.zoomOpacity) { + itemOpts.opacity = 'show'; + } + + $("#fancy_outer").animate(itemOpts, opts.zoomSpeedIn, opts.easingIn, function() { + _finish(); + }); + + } else { + + $("#fancy_content").hide().empty().append($(value)).show(); + $("#fancy_outer").css(itemOpts).fadeIn("normal", function() { + _finish(); + }); + } + } + }; + + function _set_navigation() { + if (opts.itemCurrent != 0) { + $("#fancy_left, #fancy_left_ico").unbind().bind("click", function(e) { + e.stopPropagation(); + + opts.itemCurrent--; + _change_item(); + + return false; + }); + + $("#fancy_left").show(); + } + + if (opts.itemCurrent != ( opts.itemArray.length -1)) { + $("#fancy_right, #fancy_right_ico").unbind().bind("click", function(e) { + e.stopPropagation(); + + opts.itemCurrent++; + _change_item(); + + return false; + }); + + $("#fancy_right").show(); + } + }; + + function _finish() { + _set_navigation(); + + _preload_neighbor_images(); + + $(document).keydown(function(e) { + if (e.keyCode == 27) { + $.fn.fancybox.close(); + $(document).unbind("keydown"); + + } else if(e.keyCode == 37 && opts.itemCurrent != 0) { + opts.itemCurrent--; + _change_item(); + $(document).unbind("keydown"); + + } else if(e.keyCode == 39 && opts.itemCurrent != (opts.itemArray.length - 1)) { + opts.itemCurrent++; + _change_item(); + $(document).unbind("keydown"); + } + }); + + if (opts.centerOnScroll) { + $(window).bind("resize scroll", $.fn.fancybox.scrollBox); + } else { + $("div#fancy_outer").css("position", "absolute"); + } + + if (opts.hideOnContentClick) { + $("#fancy_wrap").click($.fn.fancybox.close); + } + + $("#fancy_overlay, #fancy_close").bind("click", $.fn.fancybox.close); + + $("#fancy_close").show(); + + if (opts.itemArray[ opts.itemCurrent ].title !== undefined && opts.itemArray[ opts.itemCurrent ].title.length > 0) { + $('#fancy_title div').html(opts.itemArray[ opts.itemCurrent ].title); + $('#fancy_title').show(); + } + + if (opts.itemArray[ opts.itemCurrent ].modules !== undefined && opts.itemArray[ opts.itemCurrent ].modules.length > 0) { + $('#fancy_modules').hide(); + $('#fancy_title').hide(); + var modules = opts.itemArray[ opts.itemCurrent ].modules; + var modtxt = '|'; + var pex = modules.search('exif::'); + if (pex != -1){ + var exifsrc = modules.substring(pex+6); + var exifsrc = exifsrc.split(';;',1); + modtxt += " EXIF |"; + } + var pco = modules.search('comment::'); + if (pco != -1){ + var commentsrc = modules.substring(pco+9); + var commentsrc = commentsrc.split(';;',1); + var commentcount = modules.substring(modules.search('comment_count::')+15); + var commentcount = commentcount.split(';;',1); + modtxt += " Comments (" + commentcount + ") |"; + } + if (modtxt != '|'){ + $('#fancy_modules div').html(modtxt); + $('#fancy_modules').show(); + $(document).ready(function() { $(".modclass").modbox(); }); + } + $('#fancy_title').show(); + } + + if (opts.overlayShow && isIE) { + $('embed, object, select', $('#fancy_content')).css('visibility', 'visible'); + } + + if ($.isFunction(opts.callbackOnShow)) { + opts.callbackOnShow(); + } + + busy = false; + }; + + return this.unbind('click').click(_initialize); + }; + + $.fn.fancybox.scrollBox = function() { + var pos = $.fn.fancybox.getViewport(); + + $("#fancy_outer").css('left', (($("#fancy_outer").width() + 36) > pos[0] ? pos[2] : pos[2] + Math.round((pos[0] - $("#fancy_outer").width() - 36) / 2))); + $("#fancy_outer").css('top', (($("#fancy_outer").height() + 50) > pos[1] ? pos[3] : pos[3] + Math.round((pos[1] - $("#fancy_outer").height() - 50) / 2))); + }; + + $.fn.fancybox.getNumeric = function(el, prop) { + return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0; + }; + + $.fn.fancybox.getPosition = function(el) { + var pos = el.offset(); + + pos.top += $.fn.fancybox.getNumeric(el, 'paddingTop'); + pos.top += $.fn.fancybox.getNumeric(el, 'borderTopWidth'); + + pos.left += $.fn.fancybox.getNumeric(el, 'paddingLeft'); + pos.left += $.fn.fancybox.getNumeric(el, 'borderLeftWidth'); + + return pos; + }; + + $.fn.fancybox.showIframe = function() { + $(".fancy_loading").hide(); + $("#fancy_frame").show(); + }; + + $.fn.fancybox.getViewport = function() { + return [$(window).width(), $(window).height(), $(document).scrollLeft(), $(document).scrollTop() ]; + }; + + $.fn.fancybox.animateLoading = function() { + if (!$("#fancy_loading").is(':visible')){ + clearInterval(loadingTimer); + return; + } + + $("#fancy_loading > div").css('top', (loadingFrame * -40) + 'px'); + + loadingFrame = (loadingFrame + 1) % 12; + }; + + $.fn.fancybox.showLoading = function() { + clearInterval(loadingTimer); + + var pos = $.fn.fancybox.getViewport(); + + $("#fancy_loading").css({'left': ((pos[0] - 40) / 2 + pos[2]), 'top': ((pos[1] - 40) / 2 + pos[3])}).show(); + $("#fancy_loading").bind('click', $.fn.fancybox.close); + + loadingTimer = setInterval($.fn.fancybox.animateLoading, 66); + }; + + $.fn.fancybox.close = function() { + busy = true; + + $(imagePreloader).unbind(); + + $("#fancy_overlay, #fancy_close").unbind(); + + if (opts.hideOnContentClick) { + $("#fancy_wrap").unbind(); + } + + $("#fancy_close, .fancy_loading, #fancy_left, #fancy_right, #fancy_title, #fancy_modules").hide(); + + if (opts.centerOnScroll) { + $(window).unbind("resize scroll"); + } + + __cleanup = function() { + $("#fancy_overlay, #fancy_outer").hide(); + + if (opts.centerOnScroll) { + $(window).unbind("resize scroll"); + } + + if (isIE) { + $('embed, object, select').css('visibility', 'visible'); + } + + if ($.isFunction(opts.callbackOnClose)) { + opts.callbackOnClose(); + } + + busy = false; + }; + + if ($("#fancy_outer").is(":visible") !== false) { + if (opts.zoomSpeedOut > 0 && opts.itemArray[opts.itemCurrent].orig !== undefined) { + var orig_item = opts.itemArray[opts.itemCurrent].orig; + var orig_pos = $.fn.fancybox.getPosition(orig_item); + + var itemOpts = { + 'left': (orig_pos.left - 18) + 'px', + 'top': (orig_pos.top - 18) + 'px', + 'width': $(orig_item).width(), + 'height': $(orig_item).height() + }; + + if (opts.zoomOpacity) { + itemOpts.opacity = 'hide'; + } + + $("#fancy_outer").stop(false, true).animate(itemOpts, opts.zoomSpeedOut, opts.easingOut, __cleanup); + + } else { + $("#fancy_outer").stop(false, true).fadeOut("fast", __cleanup); + } + + } else { + __cleanup(); + } + + return false; + }; + + $.fn.fancybox.build = function() { + var html = ''; + + html += '
'; + + html += '
'; + + html += '
'; + + html += '
'; + + html += '
'; + + html += '
'; + + html += '
'; + + html += ''; + + html += '
'; + + html += '
'; + html += '
'; + + html += '
'; + + html += '
'; + + html += '
'; + + $(html).appendTo("body"); + + $('
').appendTo('#fancy_title'); + $('
').appendTo('#fancy_modules'); + + if (isIE) { + $("#fancy_inner").prepend(''); + $("#fancy_close, .fancy_bg, .fancy_title, .fancy_modules, .fancy_ico").fixPNG(); + } + }; + + $.fn.fancybox.defaults = { + padding : 10, + imageScale : true, + zoomOpacity : false, + zoomSpeedIn : 0, + zoomSpeedOut : 0, + zoomSpeedChange : 300, + easingIn : 'swing', + easingOut : 'swing', + easingChange : 'swing', + frameWidth : 425, + frameHeight : 355, + overlayShow : true, + overlayOpacity : 0.8, + hideOnContentClick : false, + centerOnScroll : true, + itemArray : [], + callbackOnStart : null, + callbackOnShow : null, + callbackOnClose : null + }; + + $(document).ready(function() { + $.fn.fancybox.build(); + }); + +// ************************************************************************************************************************************* +// ************************************************************************************************************************************* +// ************************************************************************************************************************************* +// ************************************************************************************************************************************* +// ************************************************************************************************************************************* +// ************************************************************************************************************************************* +// ************************************************************************************************************************************* +// ************************************************************************************************************************************* +// ************************************************************************************************************************************* +// ************************************************************************************************************************************* + + var modelem, modopts, modbusy = false, imagePreloader = new Image, loadingTimer, loadingFrame = 1, imageRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i; + + $.fn.modbox = function(settings) { + settings = $.extend({}, $.fn.modbox.defaults, settings); + + var matchedGroup = this; + + function _initialize() { + modelem = this; + modopts = settings; + + _start(); + + return false; + }; + + function _start() { + if (modbusy) return; + + if ($.isFunction(modopts.callbackOnStart)) { + modopts.callbackOnStart(); + } + + modopts.itemArray = []; + modopts.itemCurrent = 0; + + if (settings.itemArray.length > 0) { + modopts.itemArray = settings.itemArray; + + } else { + var item = {}; + + if (!modelem.rel || modelem.rel == '') { + var item = {href: modelem.href, title: modelem.title}; + + if ($(modelem).children("img:first").length) { + item.orig = $(modelem).children("img:first"); + } + + modopts.itemArray.push( item ); + + } else { + + var subGroup = $(matchedGroup).filter("a[rel=" + modelem.rel + "]"); + + var item = {}; + + for (var i = 0; i < subGroup.length; i++) { + item = {href: subGroup[i].href, title: subGroup[i].title}; + + if ($(subGroup[i]).children("img:first").length) { + item.orig = $(subGroup[i]).children("img:first"); + } + + modopts.itemArray.push( item ); + } + + while ( modopts.itemArray[ modopts.itemCurrent ].href != modelem.href ) { + modopts.itemCurrent++; + } + } + } + + if (modopts.overlayShow) { + if (isIE) { + $('embed, object, select').css('visibility', 'hidden'); + } + + $("#mod_overlay").css('opacity', modopts.overlayOpacity).show(); + } + + _change_item(); + }; + + function _change_item() { + $("#mod_right, #mod_left, #mod_close, #mod_title").hide(); + + var href = modopts.itemArray[ modopts.itemCurrent ].href; + + if (href.match(/#/)) { + var target = window.location.href.split('#')[0]; target = href.replace(target, ''); target = target.substr(target.indexOf('#')); + + _set_content('
' + $(target).html() + '
', modopts.frameWidth, modopts.frameHeight); + + } else if (href.match(imageRegExp)) { + imagePreloader = new Image; imagePreloader.src = href; + + if (imagePreloader.complete) { + _proceed_image(); + + } else { + $.fn.modbox.showLoading(); + + $(imagePreloader).unbind().bind('load', function() { + $(".mod_loading").hide(); + + _proceed_image(); + }); + } + + } else if (href.match("iframe") || modelem.className.indexOf("iframe") >= 0) { + _set_content('', modopts.frameWidth, modopts.frameHeight); + + } else { + $.get(href, function(data) { + _set_content( '
' + data + '
', modopts.frameWidth, modopts.frameHeight ); + }); + } + }; + + function _proceed_image() { + if (modopts.imageScale) { + var w = $.fn.modbox.getViewport(); + + var r = Math.min(Math.min(w[0] - 36, imagePreloader.width) / imagePreloader.width, Math.min(w[1] - 60, imagePreloader.height) / imagePreloader.height); + + var width = Math.round(r * imagePreloader.width); + var height = Math.round(r * imagePreloader.height); + + } else { + var width = imagePreloader.width; + var height = imagePreloader.height; + } + + _set_content('', width, height); + }; + + function _preload_neighbor_images() { + if ((modopts.itemArray.length -1) > modopts.itemCurrent) { + var href = modopts.itemArray[modopts.itemCurrent + 1].href; + + if (href.match(imageRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + + if (modopts.itemCurrent > 0) { + var href = modopts.itemArray[modopts.itemCurrent -1].href; + + if (href.match(imageRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + }; + + function _set_content(value, width, height) { + modbusy = true; + + var pad = modopts.padding; + + if (isIE) { + $("#mod_content")[0].style.removeExpression("height"); + $("#mod_content")[0].style.removeExpression("width"); + } + + if (pad > 0) { + width += pad * 2; + height += pad * 2; + + $("#mod_content").css({ + 'top' : pad + 'px', + 'right' : pad + 'px', + 'bottom' : pad + 'px', + 'left' : pad + 'px', + 'width' : 'auto', + 'height' : 'auto' + }); + + if (isIE) { + $("#mod_content")[0].style.setExpression('height', '(this.parentNode.clientHeight - 20)'); + $("#mod_content")[0].style.setExpression('width', '(this.parentNode.clientWidth - 20)'); + } + + } else { + $("#mod_content").css({ + 'top' : 0, + 'right' : 0, + 'bottom' : 0, + 'left' : 0, + 'width' : '100%', + 'height' : '100%' + }); + } + + if ($("#mod_outer").is(":visible") && width == $("#mod_outer").width() && height == $("#mod_outer").height()) { + $("#mod_content").fadeOut("fast", function() { + $("#mod_content").empty().append($(value)).fadeIn("normal", function() { + _finish(); + }); + }); + + return; + } + + var w = $.fn.modbox.getViewport(); + + var itemLeft = (width + 36) > w[0] ? w[2] : (w[2] + Math.round((w[0] - width - 36) / 2)); + var itemTop = (height + 50) > w[1] ? w[3] : (w[3] + Math.round((w[1] - height - 50) / 2)); + + var itemOpts = { + 'left': itemLeft, + 'top': itemTop, + 'width': width + 'px', + 'height': height + 'px' + }; + + if ($("#mod_outer").is(":visible")) { + $("#mod_content").fadeOut("normal", function() { + $("#mod_content").empty(); + $("#mod_outer").animate(itemOpts, modopts.zoomSpeedChange, modopts.easingChange, function() { + $("#mod_content").append($(value)).fadeIn("normal", function() { + _finish(); + }); + }); + }); + + } else { + + if (modopts.zoomSpeedIn > 0 && modopts.itemArray[modopts.itemCurrent].orig !== undefined) { + $("#mod_content").empty().append($(value)); + + var orig_item = modopts.itemArray[modopts.itemCurrent].orig; + var orig_pos = $.fn.modbox.getPosition(orig_item); + + $("#mod_outer").css({ + 'left': (orig_pos.left - 18) + 'px', + 'top': (orig_pos.top - 18) + 'px', + 'width': $(orig_item).width(), + 'height': $(orig_item).height() + }); + + if (modopts.zoomOpacity) { + itemOpts.opacity = 'show'; + } + + $("#mod_outer").animate(itemOpts, modopts.zoomSpeedIn, modopts.easingIn, function() { + _finish(); + }); + + } else { + + $("#mod_content").hide().empty().append($(value)).show(); + $("#mod_outer").css(itemOpts).fadeIn("normal", function() { + _finish(); + }); + } + } + }; + + function _set_navigation() { + if (modopts.itemCurrent != 0) { + $("#mod_left, #mod_left_ico").unbind().bind("click", function(e) { + e.stopPropagation(); + + modopts.itemCurrent--; + _change_item(); + + return false; + }); + + $("#mod_left").show(); + } + + if (modopts.itemCurrent != ( modopts.itemArray.length -1)) { + $("#mod_right, #mod_right_ico").unbind().bind("click", function(e) { + e.stopPropagation(); + + modopts.itemCurrent++; + _change_item(); + + return false; + }); + + $("#mod_right").show(); + } + }; + + function _finish() { + _set_navigation(); + + _preload_neighbor_images(); + + $(document).keydown(function(e) { + if (e.keyCode == 27) { + $.fn.modbox.close(); + $(document).unbind("keydown"); + + } else if(e.keyCode == 37 && modopts.itemCurrent != 0) { + modopts.itemCurrent--; + _change_item(); + $(document).unbind("keydown"); + + } else if(e.keyCode == 39 && modopts.itemCurrent != (modopts.itemArray.length - 1)) { + modopts.itemCurrent++; + _change_item(); + $(document).unbind("keydown"); + } + }); + + if (modopts.centerOnScroll) { + $(window).bind("resize scroll", $.fn.modbox.scrollBox); + } else { + $("div#mod_outer").css("position", "absolute"); + } + + if (modopts.hideOnContentClick) { + $("#mod_wrap").click($.fn.modbox.close); + } + + $("#mod_overlay, #mod_close").bind("click", $.fn.modbox.close); + + $("#mod_close").show(); + + if (modopts.itemArray[ modopts.itemCurrent ].title !== undefined && modopts.itemArray[ modopts.itemCurrent ].title.length > 0) { + $('#mod_title div').html(modopts.itemArray[ modopts.itemCurrent ].title); + $('#mod_title').show(); + } + + if (modopts.overlayShow && isIE) { + $('embed, object, select', $('#mod_content')).css('visibility', 'visible'); + } + + if ($.isFunction(modopts.callbackOnShow)) { + modopts.callbackOnShow(); + } + + modbusy = false; + }; + + return this.unbind('click').click(_initialize); + }; + + $.fn.modbox.scrollBox = function() { + var pos = $.fn.modbox.getViewport(); + + $("#mod_outer").css('left', (($("#mod_outer").width() + 36) > pos[0] ? pos[2] : pos[2] + Math.round((pos[0] - $("#mod_outer").width() - 36) / 2))); + $("#mod_outer").css('top', (($("#mod_outer").height() + 50) > pos[1] ? pos[3] : pos[3] + Math.round((pos[1] - $("#mod_outer").height() - 50) / 2))); + }; + + $.fn.modbox.getNumeric = function(el, prop) { + return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0; + }; + + $.fn.modbox.getPosition = function(el) { + var pos = el.offset(); + + pos.top += $.fn.modbox.getNumeric(el, 'paddingTop'); + pos.top += $.fn.modbox.getNumeric(el, 'borderTopWidth'); + + pos.left += $.fn.modbox.getNumeric(el, 'paddingLeft'); + pos.left += $.fn.modbox.getNumeric(el, 'borderLeftWidth'); + + return pos; + }; + + $.fn.modbox.showIframe = function() { + $(".mod_loading").hide(); + $("#mod_frame").show(); + }; + + $.fn.modbox.getViewport = function() { + return [$(window).width(), $(window).height(), $(document).scrollLeft(), $(document).scrollTop() ]; + }; + + $.fn.modbox.animateLoading = function() { + if (!$("#mod_loading").is(':visible')){ + clearInterval(loadingTimer); + return; + } + + $("#mod_loading > div").css('top', (loadingFrame * -40) + 'px'); + + loadingFrame = (loadingFrame + 1) % 12; + }; + + $.fn.modbox.showLoading = function() { + clearInterval(loadingTimer); + + var pos = $.fn.modbox.getViewport(); + + $("#mod_loading").css({'left': ((pos[0] - 40) / 2 + pos[2]), 'top': ((pos[1] - 40) / 2 + pos[3])}).show(); + $("#mod_loading").bind('click', $.fn.modbox.close); + + loadingTimer = setInterval($.fn.modbox.animateLoading, 66); + }; + + $.fn.modbox.close = function() { + modbusy = true; + + $(imagePreloader).unbind(); + + $("#mod_overlay, #mod_close").unbind(); + + if (modopts.hideOnContentClick) { + $("#mod_wrap").unbind(); + } + + $("#mod_close, .mod_loading, #mod_left, #mod_right, #mod_title").hide(); + + if (modopts.centerOnScroll) { + $(window).unbind("resize scroll"); + } + + __cleanup = function() { + $("#mod_overlay, #mod_outer").hide(); + + if (modopts.centerOnScroll) { + $(window).unbind("resize scroll"); + } + + if (isIE) { + $('embed, object, select').css('visibility', 'visible'); + } + + if ($.isFunction(modopts.callbackOnClose)) { + modopts.callbackOnClose(); + } + + modbusy = false; + }; + + if ($("#mod_outer").is(":visible") !== false) { + if (modopts.zoomSpeedOut > 0 && modopts.itemArray[modopts.itemCurrent].orig !== undefined) { + var orig_item = modopts.itemArray[modopts.itemCurrent].orig; + var orig_pos = $.fn.modbox.getPosition(orig_item); + + var itemOpts = { + 'left': (orig_pos.left - 18) + 'px', + 'top': (orig_pos.top - 18) + 'px', + 'width': $(orig_item).width(), + 'height': $(orig_item).height() + }; + + if (modopts.zoomOpacity) { + itemOpts.opacity = 'hide'; + } + + $("#mod_outer").stop(false, true).animate(itemOpts, modopts.zoomSpeedOut, modopts.easingOut, __cleanup); + + } else { + $("#mod_outer").stop(false, true).fadeOut("fast", __cleanup); + } + + } else { + __cleanup(); + } + + return false; + }; + + $.fn.modbox.build = function() { + var html = ''; + + html += '
'; + + html += '
'; + + html += '
'; + + html += '
'; + + html += '
'; + + html += '
'; + + html += '
'; + + html += ''; + + html += '
'; + + html += '
'; + + html += '
'; + + html += '
'; + + html += '
'; + + $(html).appendTo("body"); + + $('
').appendTo('#mod_title'); + + if (isIE) { + $("#mod_inner").prepend(''); + $("#mod_close, .mod_bg, .mod_title, .mod_ico").fixPNG(); + } + }; + + $.fn.modbox.defaults = { + padding : 10, + imageScale : true, + zoomOpacity : false, + zoomSpeedIn : 0, + zoomSpeedOut : 0, + zoomSpeedChange : 300, + easingIn : 'swing', + easingOut : 'swing', + easingChange : 'swing', + frameWidth : 400, + frameHeight : 400, + overlayShow : true, + overlayOpacity : 0.3, + hideOnContentClick : false, + centerOnScroll : true, + itemArray : [], + callbackOnStart : null, + callbackOnShow : null, + callbackOnClose : null + }; + + $(document).ready(function() { + $.fn.modbox.build(); + }); + +})(jQuery); \ No newline at end of file diff --git a/themes/3nids/3nids/js/ui.init.js b/themes/3nids/3nids/js/ui.init.js new file mode 100755 index 00000000..5a3b7122 --- /dev/null +++ b/themes/3nids/3nids/js/ui.init.js @@ -0,0 +1,139 @@ +/** + * Initialize jQuery UI and Gallery Plugin elements + */ + +var short_forms = new Array( + "#gQuickSearchForm", + "#gAddTagForm", + "#gSearchForm" +); + +$(document).ready(function() { + $(".fancyclass").fancybox(); + + // Initialize Superfish menus + $("ul.gMenu").addClass("sf-menu"); + $('ul.sf-menu').superfish({ + delay: 500, + animation: { + opacity:'show', + height:'show' + }, + speed: 'fast' + }); + $("#gSiteMenu").css("display", "block"); + + // Initialize status message effects + $("#gMessage li").gallery_show_message(); + + // Initialize dialogs + $("#gLoginLink").addClass("gDialogLink"); + $(".gDialogLink").gallery_dialog(); + + // Initialize view menu + if ($("#gViewMenu").length) { + $("#gViewMenu ul").removeClass("gMenu").removeClass("sf-menu"); + $("#gViewMenu a").addClass("ui-icon"); + } + + // Initialize short forms + for (var i in short_forms) { + short_form_init(short_forms[i]); + $(short_forms[i]).addClass("gShortForm"); + } + $(".gShortForm input[type=text]").addClass("ui-corner-left"); + $(".gShortForm input[type=submit]").addClass("ui-state-default ui-corner-right"); + + // Apply jQuery UI button css to submit inputs + $("input[type=submit]:not(.gShortForm input)").addClass("ui-state-default ui-corner-all"); + + // Apply styles and icon classes to gContextMenu + if ($(".gContextMenu").length) { + $(".gContextMenu li").addClass("ui-state-default"); + $(".gContextMenu a").addClass("gButtonLink ui-icon-left"); + $(".gContextMenu a").prepend(""); + $(".gContextMenu a span").each(function() { + var iconClass = $(this).parent().attr("class").match(/ui-icon-.[^\s]+/).toString(); + $(this).addClass(iconClass); + }); + } + + // Album view only + if ($("#gAlbumGrid").length) { + // Vertical align thumbnails/metadata in album grid + $(".gItem").gallery_valign(); + + // Initialize context menus + $(".gItem").hover( + function(){ + // Insert invisible placeholder to hold the item's position in the grid + var placeHolder = $(this).clone(); + $(placeHolder).attr("id", "gPlaceHolder"); + $(placeHolder).css("visibility", "hidden"); + $(this).after($(placeHolder)); + // Style and position the item + $(this).addClass("gHoverItem"); + var position = $(this).position(); + $(this).css("position", "absolute"); + $(this).css("top", position.top); + $(this).css("left", position.left); + $(this).css("z-index", "1000"); + // Initialize the contextual menu + $(this).gallery_context_menu(); + // Set height based on height of descendents + var title = $(this).find("h2"); + var meta = $(this).find(".gMetadata"); + var context_label = $(this).find(".gContextMenu li:first"); + var item_ht = $(this).height(); + var title_ht = $(title).gallery_height(); + var meta_ht = $(meta).gallery_height(); + var context_label_ht = $(context_label).gallery_height(); + $(this).height(item_ht + title_ht + meta_ht + context_label_ht); + $(".fancyclass").fancybox(); + }, + function() { + // Reset item height, position, and z-index +if ($(this).next().height()) { + var sib_height = $(this).next().height(); + } else { + var sib_height = $(this).prev().height(); + } + if ($.browser.msie && $.browser.version >= 8) { + sib_height = sib_height + 1; + } + $(this).css("height", sib_height); + $(this).css("position", "relative"); + $(this).css("top", null); + $(this).css("left", null); + $(this).css("z-index", 1); + // Remove the placeholder and hover class from the item + $("#gPlaceHolder").remove(); + $(this).removeClass("gHoverItem"); + $(".fancyclass").fancybox(); + } + ); + } + + // Photo/Item item view + if ($("#gItem").length) { + // Ensure the resized image fits within its container + $("#gItem").gallery_fit_photo(); + + // Initialize context menus + var resize = $("#gItem").gallery_get_photo(); + $(resize).hover(function(){ + $(this).gallery_context_menu(); + }); + + // Add scroll effect for links to named anchors + $.localScroll({ + queue: true, + duration: 1000, + hash: true + }); + } + + // Initialize button hover effect + $.fn.gallery_hover_init(); + +}); diff --git a/themes/3nids/3nids/theme.info b/themes/3nids/3nids/theme.info new file mode 100755 index 00000000..3acf7b7a --- /dev/null +++ b/themes/3nids/3nids/theme.info @@ -0,0 +1,6 @@ +name = "3nids theme" +description = "Default theme modified using jquery lightbox slideshow." +version = 1 +author = "3nids" +site = 1 +admin = 0 diff --git a/themes/3nids/3nids/thumbnail.png b/themes/3nids/3nids/thumbnail.png new file mode 100755 index 00000000..e1018daf Binary files /dev/null and b/themes/3nids/3nids/thumbnail.png differ diff --git a/themes/3nids/3nids/views/album.html.php b/themes/3nids/3nids/views/album.html.php new file mode 100755 index 00000000..aee42554 --- /dev/null +++ b/themes/3nids/3nids/views/album.html.php @@ -0,0 +1,70 @@ + + +
+ album_top() ?> +

title) ?>

+
description)) ?>
+
+viewable()->children(); + $theme->pagination = new Pagination(); + $theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count,"items_per_page" => $page_size,"style" => "classic")); + $children_offset = ($theme->pagination->current_page -1) * $page_size ; ?> + +album_bottom() ?> + +pager() ?> diff --git a/themes/3nids/3nids/views/block.html.php b/themes/3nids/3nids/views/block.html.php new file mode 100755 index 00000000..e8cff833 --- /dev/null +++ b/themes/3nids/3nids/views/block.html.php @@ -0,0 +1,10 @@ + + + + +
+

+
+ +
+
diff --git a/themes/3nids/3nids/views/comments.html.php b/themes/3nids/3nids/views/comments.html.php new file mode 100755 index 00000000..854ea65c --- /dev/null +++ b/themes/3nids/3nids/views/comments.html.php @@ -0,0 +1,56 @@ + + + + + + + css("yui/reset-fonts-grids.css") ?> + css("superfish/css/superfish.css") ?> + css("themeroller/ui.base.css") ?> + css("screen.css") ?> + script("jquery.js") ?> + script("jquery.form.js") ?> + script("jquery-ui.js") ?> + script("gallery.common.js") ?> + + + script("gallery.ajax.js") ?> + script("gallery.dialog.js") ?> + script("gallery.form.js") ?> + script("superfish/js/superfish.js") ?> + script("jquery.localscroll.js") ?> + script("jquery.easing.js") ?> + script("jquery.fancybox.js") ?> + script("ui.init.js") ?> +head() ?> + + + " id="gAddCommentButton" + class="gButtonLink ui-corner-all ui-icon-left ui-state-default right"> + + + +
+ count()): ?> +

+ +

+ + +
+ + diff --git a/themes/3nids/3nids/views/dynamic.html.php b/themes/3nids/3nids/views/dynamic.html.php new file mode 100755 index 00000000..977227ce --- /dev/null +++ b/themes/3nids/3nids/views/dynamic.html.php @@ -0,0 +1,72 @@ + +
+
+ dynamic_top() ?> +
+

+
+items(); + $theme->pagination = new Pagination(); + $theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count,"items_per_page" => $page_size,"style" => "classic")); + $children_offset = ($theme->pagination->current_page -1) * $page_size ; ?> + + +dynamic_bottom() ?> + +pager() ?> diff --git a/themes/3nids/3nids/views/exif_dialog.html.php b/themes/3nids/3nids/views/exif_dialog.html.php new file mode 100755 index 00000000..da681bb2 --- /dev/null +++ b/themes/3nids/3nids/views/exif_dialog.html.php @@ -0,0 +1,44 @@ + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+ + + + + + + +
+
+
+ + diff --git a/themes/3nids/3nids/views/image_block_block.html.php b/themes/3nids/3nids/views/image_block_block.html.php new file mode 100755 index 00000000..3aa09d4a --- /dev/null +++ b/themes/3nids/3nids/views/image_block_block.html.php @@ -0,0 +1,16 @@ + + + +id}") . ";;";} ?> +id}") . ";;comment_count::" . comment_3nids::count($item) . ";;" ;} ?> + +
+ + thumb_img(array("class" => "gThumbnail")) ?> + + + +
+

parent()->title ?>

+
+
diff --git a/themes/3nids/3nids/views/movie.html.php b/themes/3nids/3nids/views/movie.html.php new file mode 100755 index 00000000..def4b0cf --- /dev/null +++ b/themes/3nids/3nids/views/movie.html.php @@ -0,0 +1,37 @@ + +
+ photo_top() ?> + + +
  • + + + + + + + +
  • +
  • $position, "total" => $sibling_count)) ?>
  • +
  • + + + + + + + +
  • + +*/ ?> + + movie_img(array("class" => "gMovie", "id" => "gMovieId-{$item->id}")) ?> + +
    +

    title) ?>

    +
    description)) ?>
    +
    + + context_menu($item, "#gMovieId-{$item->id}") ?> +
    diff --git a/themes/3nids/3nids/views/page.html.php b/themes/3nids/3nids/views/page.html.php new file mode 100755 index 00000000..a7ad8ddb --- /dev/null +++ b/themes/3nids/3nids/views/page.html.php @@ -0,0 +1,171 @@ + + + + + + + + <? if ($page_title): ?> + <?= $page_title ?> + <? else: ?> + <? if ($theme->item()): ?> + <? if ($theme->item()->is_album()): ?> + <?= t("Gallery :: %album_title", array("album_title" => $theme->item()->title)) ?> + <? elseif ($theme->item()->is_photo()): ?> + <?= t("Gallery :: %photo_title", array("photo_title" => $theme->item()->title)) ?> + <? else: ?> + <?= t("Gallery :: %movie_title", array("movie_title" => $theme->item()->title)) ?> + <? endif ?> + <? elseif ($theme->tag()): ?> + <?= t("Gallery Tag :: %tag_title", array("tag_title" => $theme->tag()->name)) ?> + <? else: /* Not an item, not a tag, no page_title specified. Help! */ ?> + <?= t("Gallery") ?> + <? endif ?> + <? endif ?> + + " type="image/x-icon" /> + css("yui/reset-fonts-grids.css") ?> + css("superfish/css/superfish.css") ?> + css("themeroller/ui.base.css") ?> + css("screen.css") ?> + css("jquery.fancybox.css") ?> + + page_type == 'album'): ?> + + + + + + + script("jquery.js") ?> + script("jquery.form.js") ?> + script("jquery-ui.js") ?> + script("gallery.common.js") ?> + + + script("gallery.ajax.js") ?> + script("gallery.dialog.js") ?> + script("gallery.form.js") ?> + script("superfish/js/superfish.js") ?> + script("jquery.localscroll.js") ?> + script("jquery.easing.js") ?> + script("jquery.fancybox.js") ?> + script("ui.init.js") ?> + + head() they get combined */ ?> + page_type == "photo"): ?> + script("jquery.scrollTo.js") ?> + script("gallery.show_full_size.js") ?> + page_type == "movie"): ?> + script("flowplayer.js") ?> + + + head() ?> + + + body_attributes() ?>> + page_top() ?> +
    + site_status() ?> +
    +
    + header_top() ?> + + + + + +
    + admin): ?> + site_menu() ?> + +
    + header_bottom() ?> +
    + + + + tag()): ?> + + + + + + + + +
    +
    +
    +
    +
    + messages() ?> + +
    +
    +
    +
    + page_type != "login"): ?> + + +
    +
    +
    + footer() ?> + + + + + + + +
    +
    + page_bottom() ?> + + diff --git a/themes/3nids/3nids/views/pager.html.php b/themes/3nids/3nids/views/pager.html.php new file mode 100755 index 00000000..69db1dfa --- /dev/null +++ b/themes/3nids/3nids/views/pager.html.php @@ -0,0 +1,43 @@ + + + diff --git a/themes/3nids/3nids/views/photo.html.php b/themes/3nids/3nids/views/photo.html.php new file mode 100755 index 00000000..d387e3ce --- /dev/null +++ b/themes/3nids/3nids/views/photo.html.php @@ -0,0 +1,57 @@ + + +item())): ?> + + + +
    + photo_top() ?> + + + +
    + resize_top($item) ?> + + for_html_attr() ?>"> + + resize_img(array("id" => "gPhotoId-{$item->id}", "class" => "gResize")) ?> + + + + resize_bottom($item) ?> + context_menu($item, "#gPhotoId-{$item->id}") ?> +
    + +
    +

    title) ?>

    +
    description)) ?>
    +
    + +
    diff --git a/themes/3nids/3nids/views/search.html.php b/themes/3nids/3nids/views/search.html.php new file mode 100755 index 00000000..ea91f93e --- /dev/null +++ b/themes/3nids/3nids/views/search.html.php @@ -0,0 +1,75 @@ + + + +pagination = new Pagination(); + $theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count_true,"items_per_page" => $page_size,"style" => "classic")); + $children_offset = ($theme->pagination->current_page -1) * $page_size ; ?> + +
    +

    %term", array("term" => $q)) ?>

    + + + + pager() ?> + + +

    + %term", array("term" => $q)) ?> +

    + + +
    diff --git a/themes/3nids/3nids/views/sidebar.html.php b/themes/3nids/3nids/views/sidebar.html.php new file mode 100755 index 00000000..928ecb93 --- /dev/null +++ b/themes/3nids/3nids/views/sidebar.html.php @@ -0,0 +1,16 @@ + +sidebar_top() ?> +
    +
    + + album_menu() ?> + + photo_menu() ?> + + tag_menu() ?> + +
    +
    + +sidebar_blocks() ?> +sidebar_bottom() ?> diff --git a/themes/3nids/README b/themes/3nids/README new file mode 100755 index 00000000..216b0c3d --- /dev/null +++ b/themes/3nids/README @@ -0,0 +1,34 @@ +This is a theme for gallery3. +It uses jquery lightbox slideshow (fancybox) to display images, and includes a tagsmap module (originally from rWatcher). + +This theme has been made by someone who do not really master php, so things are not coded very well. +It has been modified from default theme for my own purpose only so some modules may not be usable for the moment. + +********* +Demo @ http://gallery.3nids.ch + +********* +Requirements: +- Gallery 3 last experimental version @ http://github.com/gallery/gallery3 +- Tag module activated (if want to use tagsmap) +- Comment and Comments for 3nids themes modules activated (if you want to use comments) + +********* +Installation: + +1. Copy the theme folder (3nids) into gallery3/themes directory. +2. Copy lib folder into gallery3 directory (it changes the themeroller). +3. Copy modules folder into gallery3 directory. + It includes tagsmap module and some modifications into gallery and tag modules. + For tag and gallery module, some readme files briefly discribe what has been modified. + The tagsmap module and the comments for 3nids theme need to be activated in the admin page. + +********* +Use: +This theme displays full size images. So be carefull to upload not too large images! +The theme uses the tagsmap module which has been enhanced. If you want to separate geotag from others, name those with the "map." prefix. Hence, they will not be shown in the tag cloud sidebare (the "map." prefix will not be displayed on the map). + +********* +Upgrade: +if you upgrade your gallery, the core modifications will be erased, so you will have to modify these again. readme files will help you. +However, the theme will still work but the geotag distinction will not be made anymore and some small modifications like ordering tags items by date. \ No newline at end of file diff --git a/themes/3nids/lib/themeroller/images/ui-bg_flat_0_333333_40x100.png b/themes/3nids/lib/themeroller/images/ui-bg_flat_0_333333_40x100.png new file mode 100755 index 00000000..2f2c7a45 Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-bg_flat_0_333333_40x100.png differ diff --git a/themes/3nids/lib/themeroller/images/ui-bg_flat_0_484848_40x100.png b/themes/3nids/lib/themeroller/images/ui-bg_flat_0_484848_40x100.png new file mode 100755 index 00000000..37979abe Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-bg_flat_0_484848_40x100.png differ diff --git a/themes/3nids/lib/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png b/themes/3nids/lib/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100755 index 00000000..5b5dab2a Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/themes/3nids/lib/themeroller/images/ui-bg_flat_100_000000_40x100.png b/themes/3nids/lib/themeroller/images/ui-bg_flat_100_000000_40x100.png new file mode 100755 index 00000000..abdc0108 Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-bg_flat_100_000000_40x100.png differ diff --git a/themes/3nids/lib/themeroller/images/ui-bg_flat_100_333333_40x100.png b/themes/3nids/lib/themeroller/images/ui-bg_flat_100_333333_40x100.png new file mode 100755 index 00000000..2f2c7a45 Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-bg_flat_100_333333_40x100.png differ diff --git a/themes/3nids/lib/themeroller/images/ui-bg_flat_100_484848_40x100.png b/themes/3nids/lib/themeroller/images/ui-bg_flat_100_484848_40x100.png new file mode 100755 index 00000000..37979abe Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-bg_flat_100_484848_40x100.png differ diff --git a/themes/3nids/lib/themeroller/images/ui-bg_flat_100_b30000_40x100.png b/themes/3nids/lib/themeroller/images/ui-bg_flat_100_b30000_40x100.png new file mode 100755 index 00000000..121651a0 Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-bg_flat_100_b30000_40x100.png differ diff --git a/themes/3nids/lib/themeroller/images/ui-bg_flat_55_fbec88_40x100.png b/themes/3nids/lib/themeroller/images/ui-bg_flat_55_fbec88_40x100.png new file mode 100755 index 00000000..47acaadd Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-bg_flat_55_fbec88_40x100.png differ diff --git a/themes/3nids/lib/themeroller/images/ui-bg_highlight-hard_100_333333_1x100.png b/themes/3nids/lib/themeroller/images/ui-bg_highlight-hard_100_333333_1x100.png new file mode 100755 index 00000000..254bb228 Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-bg_highlight-hard_100_333333_1x100.png differ diff --git a/themes/3nids/lib/themeroller/images/ui-icons_333333_256x240.png b/themes/3nids/lib/themeroller/images/ui-icons_333333_256x240.png new file mode 100755 index 00000000..379a4064 Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-icons_333333_256x240.png differ diff --git a/themes/3nids/lib/themeroller/images/ui-icons_f9bd01_256x240.png b/themes/3nids/lib/themeroller/images/ui-icons_f9bd01_256x240.png new file mode 100755 index 00000000..1619b868 Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-icons_f9bd01_256x240.png differ diff --git a/themes/3nids/lib/themeroller/images/ui-icons_f9db01_256x240.png b/themes/3nids/lib/themeroller/images/ui-icons_f9db01_256x240.png new file mode 100755 index 00000000..af18dccc Binary files /dev/null and b/themes/3nids/lib/themeroller/images/ui-icons_f9db01_256x240.png differ diff --git a/themes/3nids/lib/themeroller/ui.theme.css b/themes/3nids/lib/themeroller/ui.theme.css new file mode 100755 index 00000000..e48cfd1e --- /dev/null +++ b/themes/3nids/lib/themeroller/ui.theme.css @@ -0,0 +1,406 @@ +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +*/ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + + +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&bgColorDefault=333333&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=484848&bgTextureHeader=01_flat.png&bgImgOpacityHeader=100&borderColorHeader=e8e8e8&fcHeader=e8e8e8&iconColorHeader=f9bd01&bgColorContent=333333&bgTextureContent=01_flat.png&bgImgOpacityContent=100&borderColorContent=e8e8e8&fcContent=e8e8e8&iconColorContent=f9db01&bgColorDefault=333333&bgTextureDefault=01_flat.png&bgImgOpacityDefault=100&borderColorDefault=f9db01&fcDefault=FFFFCC&iconColorDefault=f9db01&bgColorHover=000000&bgTextureHover=01_flat.png&bgImgOpacityHover=100&borderColorHover=f9db01&fcHover=e8e8e8&iconColorHover=f9db01&bgColorActive=333333&bgTextureActive=04_highlight_hard.png&bgImgOpacityActive=100&borderColorActive=e8e8e8&fcActive=e8e8e8&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=333333&fcHighlight=333333&iconColorHighlight=333333&bgColorError=b30000&bgTextureError=01_flat.png&bgImgOpacityError=100&borderColorError=f9db01&fcError=f9db01&iconColorError=f9db01&bgColorOverlay=484848&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=100&bgColorShadow=333333&bgTextureShadow=01_flat.png&bgImgOpacityShadow=100&opacityShadow=50&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +*/ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #e8e8e8; background: #333333 url(images/ui-bg_flat_100_333333_40x100.png) 50% 50% repeat-x; color: #e8e8e8; } +.ui-widget-content a { color: #e8e8e8; } +.ui-widget-header { border: 1px solid #e8e8e8; background: #484848 url(images/ui-bg_flat_100_484848_40x100.png) 50% 50% repeat-x; color: #e8e8e8; font-weight: bold; } +.ui-widget-header a { color: #e8e8e8; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #f9db01; background: #333333 url(images/ui-bg_flat_100_333333_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #FFFFCC; outline: none; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #FFFFCC; text-decoration: none; outline: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #f9db01; background: #000000 url(images/ui-bg_flat_100_000000_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #e8e8e8; outline: none; } +.ui-state-hover a, .ui-state-hover a:hover { color: #e8e8e8; text-decoration: none; outline: none; } +.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #e8e8e8; background: #333333 url(images/ui-bg_highlight-hard_100_333333_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #e8e8e8; outline: none; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #e8e8e8; outline: none; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #333333; background: #fbec88 url(images/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x; color: #333333; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #333333; } +.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #f9db01; background: #b30000 url(images/ui-bg_flat_100_b30000_40x100.png) 50% 50% repeat-x; color: #f9db01; } +.ui-state-error a, .ui-widget-content .ui-state-error a { color: #f9db01; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #f9db01; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_f9db01_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_f9db01_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_f9db01_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_f9db01_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_f9bd01_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_333333_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_f9db01_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; } +.ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; } +.ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; } +.ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; } +.ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; } +.ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; } +.ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; } + +/* Overlays */ +.ui-widget-overlay { background: #484848 url(images/ui-bg_flat_0_484848_40x100.png) 50% 50% repeat-x; opacity: 100;filter:Alpha(Opacity=100); } +.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #333333 url(images/ui-bg_flat_100_333333_40x100.png) 50% 50% repeat-x; opacity: .50;filter:Alpha(Opacity=50); -moz-border-radius: 8px; -webkit-border-radius: 8px; }/* Accordion +----------------------------------*/ +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } +.ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker +----------------------------------*/ +.ui-datepicker { width: 17em; padding: .2em .2em 0; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* Dialog +----------------------------------*/ +.ui-dialog { position: relative; padding: .2em; width: 300px; } +.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* Progressbar +----------------------------------*/ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable +----------------------------------*/ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider +----------------------------------*/ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs +----------------------------------*/ +.ui-tabs { padding: .2em; zoom: 1; } +.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } +.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/themes/3nids/modules/comment_3nids/controllers/comments_3nids.php b/themes/3nids/modules/comment_3nids/controllers/comments_3nids.php new file mode 100755 index 00000000..ab6955e7 --- /dev/null +++ b/themes/3nids/modules/comment_3nids/controllers/comments_3nids.php @@ -0,0 +1,191 @@ +input->get('item_id'); + $item = ORM::factory("item", $item_id); + access::required("view", $item); + + $comments = ORM::factory("comment") + ->where("item_id", $item->id) + ->where("state", "published") + ->orderby("created", "ASC") + ->find_all(); + + switch (rest::output_format()) { + case "json": + foreach ($comments as $comment) { + $data[] = array( + "id" => $comment->id, + "author_name" => html::clean($comment->author_name()), + "created" => $comment->created, + "text" => nl2br(html::purify($comment->text))); + } + print json_encode($data); + break; + + case "html": + $view = new Theme_View("comments.html", "page"); + $view->comments = $comments; + $view->item_id = $item_id; + print $view; + break; + } + } + + /** + * Add a new comment to the collection. + * @see REST_Controller::_create($resource) + */ + public function _create($comment) { + $item = ORM::factory("item", $this->input->post("item_id")); + access::required("view", $item); + + $form = comment_3nids::get_add_form($item); + $valid = $form->validate(); + if ($valid) { + if (user::active()->guest && !$form->add_comment->inputs["name"]->value) { + $form->add_comment->inputs["name"]->add_error("missing", 1); + $valid = false; + } + + if (!$form->add_comment->text->value) { + $form->add_comment->text->add_error("missing", 1); + $valid = false; + } + } + + if ($valid) { + $comment = comment::create( + $item, user::active(), + $form->add_comment->text->value, + $form->add_comment->inputs["name"]->value, + $form->add_comment->email->value, + $form->add_comment->url->value); + + $active = user::active(); + if ($active->guest) { + $form->add_comment->inputs["name"]->value(""); + $form->add_comment->email->value(""); + $form->add_comment->url->value(""); + } else { + $form->add_comment->inputs["name"]->value($active->full_name); + $form->add_comment->email->value($active->email); + $form->add_comment->url->value($active->url); + } + } + url::redirect(url::site("comments_3nids?item_id=".$item->id)); +} + /** + * Display an existing comment. + * @todo Set proper Content-Type in a central place (REST_Controller::dispatch?). + * @see REST_Controller::_show($resource) + */ + public function _show($comment) { + $item = ORM::factory("item", $comment->item_id); + access::required("view", $item); + if ($comment->state != "published") { + return; + } + + if (rest::output_format() == "json") { + print json_encode( + array("result" => "success", + "data" => array( + "id" => $comment->id, + "author_name" => html::clean($comment->author_name()), + "created" => $comment->created, + "text" => nl2br(html::purify($comment->text))))); + } else { + $view = new Theme_View("comment.html", "fragment"); + $view->comment = $comment; + print $view; + } + } + + /** + * Change an existing comment. + * @see REST_Controller::_update($resource) + */ + public function _update($comment) { + $item = ORM::factory("item", $comment->item_id); + access::required("view", $item); + access::required("edit", $item); + + $form = comment_3nids::get_edit_form($comment); + if ($form->validate()) { + $comment->guest_name = $form->edit_comment->inputs["name"]->value; + $comment->guest_email = $form->edit_comment->email->value; + $comment->url = $form->edit_comment->url->value; + $comment->text = $form->edit_comment->text->value; + $comment->save(); + + print json_encode( + array("result" => "success", + "resource" => url::site("comments/{$comment->id}"))); + } else { + print json_encode( + array("result" => "error", + "html" => $form->__toString())); + } + } + + /** + * Delete existing comment. + * @see REST_Controller::_delete($resource) + */ + public function _delete($comment) { + $item = ORM::factory("item", $comment->item_id); + access::required("view", $item); + access::required("edit", $item); + + $comment->delete(); + print json_encode(array("result" => "success")); + } + + /** + * Present a form for adding a new comment to this item or editing an existing comment. + * @see REST_Controller::form_add($resource) + */ + public function _form_add($item_id) { + $item = ORM::factory("item", $item_id); + access::required("view", $item); + + print comment_3nids::get_add_form($item); + } + + /** + * Present a form for editing an existing comment. + * @see REST_Controller::form_edit($resource) + */ + public function _form_edit($comment) { + if (!user::active()->admin) { + access::forbidden(); + } + print comment_3nids::get_edit_form($comment); + } +} diff --git a/themes/3nids/modules/comment_3nids/helpers/comment_3nids.php b/themes/3nids/modules/comment_3nids/helpers/comment_3nids.php new file mode 100755 index 00000000..b093cb43 --- /dev/null +++ b/themes/3nids/modules/comment_3nids/helpers/comment_3nids.php @@ -0,0 +1,128 @@ +where("item_id", $item->id) + ->where("state", "published") + ->orderby("created", "DESC") + ->find_all(); + + return $comments->count(); + } + + /** + * Create a new comment. + * @param Item_MOdel $item the parent item + * @param User_Model $author the author User_Model + * @param string $text comment body + * @param string $guest_name guest's name (if the author is a guest user, default empty) + * @param string $guest_email guest's email (if the author is a guest user, default empty) + * @param string $guest_url guest's url (if the author is a guest user, default empty) + * @return Comment_Model + */ + static function create($item, $author, $text, $guest_name=null, + $guest_email=null, $guest_url=null) { + $comment = ORM::factory("comment"); + $comment->author_id = $author->id; + $comment->guest_email = $guest_email; + $comment->guest_name = $guest_name; + $comment->guest_url = $guest_url; + $comment->item_id = $item->id; + $comment->text = $text; + $comment->state = "published"; + + // These values are useful for spam fighting, so save them with the comment. + $input = Input::instance(); + $comment->server_http_accept = substr($input->server("HTTP_ACCEPT"), 0, 128); + $comment->server_http_accept_charset = substr($input->server("HTTP_ACCEPT_CHARSET"), 0, 64); + $comment->server_http_accept_encoding = substr($input->server("HTTP_ACCEPT_ENCODING"), 0, 64); + $comment->server_http_accept_language = substr($input->server("HTTP_ACCEPT_LANGUAGE"), 0, 64); + $comment->server_http_connection = substr($input->server("HTTP_CONNECTION"), 0, 64); + $comment->server_http_host = substr($input->server("HTTP_HOST"), 0, 64); + $comment->server_http_referer = substr($input->server("HTTP_REFERER"), 0, 255); + $comment->server_http_user_agent = substr($input->server("HTTP_USER_AGENT"), 0, 128); + $comment->server_query_string = substr($input->server("QUERY_STRING"), 0, 64); + $comment->server_remote_addr = substr($input->server("REMOTE_ADDR"), 0, 32); + $comment->server_remote_host = substr($input->server("REMOTE_HOST"), 0, 64); + $comment->server_remote_port = substr($input->server("REMOTE_PORT"), 0, 16); + $comment->save(); + + return $comment; + } + + static function get_add_form($item) { + $form = new Forge("comments_3nids?item_id=".$item->id, "", "post", array("id" => "gAddCommentForm")); + $group = $form->group("add_comment")->label(t("Add comment")); + $group->input("name") ->label(t("Name")) ->id("gAuthor"); + $group->input("email") ->label(t("Email (hidden)")) ->id("gEmail"); + $group->input("url") ->label(t("Website (hidden)"))->id("gUrl"); + $group->textarea("text")->label(t("Comment")) ->id("gText"); + $group->hidden("item_id")->value($item->id); + module::event("comment_add_form", $form); + $group->submit("")->value(t("Add")) ->class("gButtonLink ui-corner-all ui-icon-left ui-state-default"); + + $active = user::active(); + if (!$active->guest) { + $group->inputs["name"]->value($active->full_name)->disabled("disabled"); + $group->email->value($active->email)->disabled("disabled"); + $group->url->value($active->url)->disabled("disabled"); + } else { + $group->inputs["name"]->error_messages("missing", t("You must provide a name")); + } + $group->text->error_messages("missing", t("You must provide a comment")); + + return $form; + } + + static function get_edit_form($comment) { + $form = new Forge("comments/{$comment->id}?_method=put", "", "post", + array("id" => "gEditCommentForm")); + $group = $form->group("edit_comment")->label(t("Edit comment")); + $group->input("name") ->label(t("Author")) ->id("gAuthor"); + $group->input("email") ->label(t("Email (hidden)")) ->id("gEmail"); + $group->input("url") ->label(t("Website (hidden)"))->id("gUrl"); + $group->textarea("text")->label(t("Comment")) ->id("gText"); + $group->submit("")->value(t("Edit")); + + $group->text = $comment->text; + $author = $comment->author(); + if ($author->guest) { + $group->inputs["name"]->value = $comment->guest_name; + $group->email = $comment->guest_email; + $group->url = $comment->guest_url; + } else { + $group->inputs["name"]->value($author->full_name)->disabled("disabled"); + $group->email->value($author->email)->disabled("disabled"); + $group->url->value($author->url)->disabled("disabled"); + } + return $form; + } +} + diff --git a/themes/3nids/modules/comment_3nids/module.info b/themes/3nids/modules/comment_3nids/module.info new file mode 100755 index 00000000..5d51edfc --- /dev/null +++ b/themes/3nids/modules/comment_3nids/module.info @@ -0,0 +1,3 @@ +name = "Comments for 3nids theme" +description = "Allows the use of comments within 3nids theme" +version = 1 diff --git a/themes/3nids/modules/tag/helpers/readme.txt b/themes/3nids/modules/tag/helpers/readme.txt new file mode 100755 index 00000000..e8e309e2 --- /dev/null +++ b/themes/3nids/modules/tag/helpers/readme.txt @@ -0,0 +1,5 @@ +Do not display tags beginning with "map." into tag cloud sidebar + +static function popular_tags($count) { + +->notregex("name","map\.") diff --git a/themes/3nids/modules/tag/helpers/tag.php b/themes/3nids/modules/tag/helpers/tag.php new file mode 100755 index 00000000..56e25fec --- /dev/null +++ b/themes/3nids/modules/tag/helpers/tag.php @@ -0,0 +1,150 @@ +id}") + */ + static function add($item, $tag_name) { + if (empty($tag_name)) { + throw new exception("@todo MISSING_TAG_NAME"); + } + + $tag = ORM::factory("tag")->where("name", $tag_name)->find(); + if (!$tag->loaded) { + $tag->name = $tag_name; + $tag->count = 0; + $tag->save(); + } + + if (!$tag->has($item)) { + if (!$tag->add($item, $tag)) { + throw new Exception("@todo {$tag->name} WAS_NOT_ADDED_TO {$item->id}"); + } + $tag->count++; + $tag->save(); + } + return $tag; + } + + /** + * Return the N most popular tags. + * + * @return ORM_Iterator of Tag_Model in descending tag count order + */ + static function popular_tags($count) { + return ORM::factory("tag") + ->orderby("count", "DESC") + ->notregex("name","map\.") + ->limit($count) + ->find_all(); + } + + /** + * Return a rendering of the cloud for the N most popular tags. + * + * @param integer $count the number of tags + * @return View + */ + static function cloud($count) { + $tags = tag::popular_tags($count)->as_array(); + if ($tags) { + $cloud = new View("tag_cloud.html"); + $cloud->max_count = $tags[0]->count; + usort($tags, array("tag_theme", "sort_by_name")); + $cloud->tags = $tags; + return $cloud; + } + } + + + /** + * Return all the tags for a given item. + * @return array + */ + static function item_tags($item) { + $tags = array(); + foreach (Database::instance() + ->select("name") + ->from("tags") + ->join("items_tags", "tags.id", "items_tags.tag_id", "left") + ->where("items_tags.item_id", $item->id) + ->get() as $row) { + $tags[] = $row->name; + } + return $tags; + } + + static function get_add_form($item) { + $form = new Forge("tags", "", "post", array("id" => "gAddTagForm")); + $label = $item->is_album() ? + t("Add tag to album") : + ($item->is_photo() ? t("Add tag to photo") : t("Add tag to movie")); + + $group = $form->group("add_tag")->label("Add Tag"); + $group->input("name")->label($label)->rules("required"); + $group->hidden("item_id")->value($item->id); + $group->submit("")->value(t("Add Tag")); + return $form; + } + + static function get_rename_form($tag) { + $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "gRenameTagForm")); + $group = $form->group("rename_tag")->label(t("Rename Tag")); + $group->input("name")->label(t("Tag name"))->value($tag->name)->rules("required|length[1,64]"); + $group->inputs["name"]->error_messages("in_use", t("There is already a tag with that name")); + $group->submit("")->value(t("Save")); + return $form; + } + + static function get_delete_form($tag) { + $form = new Forge("admin/tags/delete/$tag->id", "", "post", array("id" => "gDeleteTagForm")); + $group = $form->group("delete_tag") + ->label(t("Really delete tag %tag_name?", array("tag_name" => $tag->name))); + $group->submit("")->value(t("Delete Tag")); + return $form; + } + + /** + * Delete all tags associated with an item + */ + static function clear_all($item) { + $db = Database::instance(); + $db->query("UPDATE {tags} SET `count` = `count` - 1 WHERE `count` > 0 " . + "AND `id` IN (SELECT `tag_id` from {items_tags} WHERE `item_id` = $item->id)"); + $db->delete("items_tags", array("item_id" => "$item->id")); + } + + /** + * Get rid of any tags that have no associated items. + */ + static function compact() { + // @todo There's a potential race condition here which we can solve by adding a lock around + // this and all the cases where we create/update tags. I'm loathe to do that since it's an + // extremely rare case. + Database::instance() ->delete("tags", array("count" => 0)); + } +} \ No newline at end of file diff --git a/themes/3nids/modules/tag/models/readme.txt b/themes/3nids/modules/tag/models/readme.txt new file mode 100755 index 00000000..fb88a601 --- /dev/null +++ b/themes/3nids/modules/tag/models/readme.txt @@ -0,0 +1,3 @@ +order tag items by date + $model->orderby("items.captured", "DESC"); +http://gallery.menalto.com/node/90247 \ No newline at end of file diff --git a/themes/3nids/modules/tag/models/tag.php b/themes/3nids/modules/tag/models/tag.php new file mode 100755 index 00000000..85e46533 --- /dev/null +++ b/themes/3nids/modules/tag/models/tag.php @@ -0,0 +1,106 @@ +viewable() + ->join("items_tags", "items.id", "items_tags.item_id") + ->where("items_tags.tag_id", $this->id); + if ($type) { + $model->where("items.type", $type); + } + $model->orderby("items.captured", "DESC"); + return $model->find_all($limit, $offset); + } + + /** + * Return the count of all viewable items associated with this tag. + * @param string $type the type of item (album, photo) + * @return integer + */ + public function items_count($type=null) { + $model = ORM::factory("item") + ->viewable() + ->join("items_tags", "items.id", "items_tags.item_id") + ->where("items_tags.tag_id", $this->id); + + if ($type) { + $model->where("items.type", $type); + } + return $model->count_all(); + } + + /** + * Overload ORM::save() to trigger an item_related_update event for all items that are related + * to this tag. Since items can be added or removed as part of the save, we need to trigger an + * event for the union of all related items before and after the save. + */ + public function save() { + $db = Database::instance(); + $related_item_ids = array(); + foreach ($db->getwhere("items_tags", array("tag_id" => $this->id)) as $row) { + $related_item_ids[$row->item_id] = 1; + } + + $result = parent::save(); + + foreach ($db->getwhere("items_tags", array("tag_id" => $this->id)) as $row) { + $related_item_ids[$row->item_id] = 1; + } + + if ($related_item_ids) { + foreach (ORM::factory("item")->in("id", array_keys($related_item_ids))->find_all() as $item) { + module::event("item_related_update", $item); + } + } + + return $result; + } + + /** + * Overload ORM::delete() to trigger an item_related_update event for all items that are + * related to this tag. + */ + public function delete() { + $related_item_ids = array(); + $db = Database::Instance(); + foreach ($db->getwhere("items_tags", array("tag_id" => $this->id)) as $row) { + $related_item_ids[$row->item_id] = 1; + } + + $result = parent::delete(); + + if ($related_item_ids) { + foreach (ORM::factory("item")->in("id", array_keys($related_item_ids))->find_all() as $item) { + module::event("item_related_update", $item); + } + } + return $result; + } +} \ No newline at end of file diff --git a/themes/3nids/modules/tagsmap/controllers/admin_tagsmap.php b/themes/3nids/modules/tagsmap/controllers/admin_tagsmap.php new file mode 100755 index 00000000..34ccf7bc --- /dev/null +++ b/themes/3nids/modules/tagsmap/controllers/admin_tagsmap.php @@ -0,0 +1,238 @@ +content = new View("admin_tagsmap.html"); + + // Generate a form for Google Maps Settings. + $view->content->googlemaps_form = $this->_get_googlemaps_form(); + + // Generate a list of tags to display. + $query = ORM::factory("tag"); + $view->content->tags = $query->orderby("name", "ASC")->find_all(); + + // Display the page. + print $view; + } + + public function edit_gps($tag_id) { + // Generate a new admin page to edit gps data for the tag specified by $tag_id. + + // Determine the name of the tag. + $tagName = ORM::factory("tag") + ->where("id", $tag_id) + ->find_all(); + + // Set up the admin page. + $view = new Admin_View("admin.html"); + $view->content = new View("admin_tagsmap_edit.html"); + $view->content->tagsmapedit_form = $this->_get_tagsgpsedit_form($tag_id); + $view->content->tag_name = $tagName[0]->name; + print $view; + } + + public function orphaned_tags() { + // Locate and delete any orphaned GPS data. + $int_deleted_records = 0; + + // Generate a list of all tags with GPS data. + $existingGPS = ORM::factory("tags_gps") + ->find_all(); + + // Loop through each record and see if a corresponding tag exists. + foreach ($existingGPS as $oneGPS) { + $oneTag = ORM::factory("tag") + ->where("id", $oneGPS->tag_id) + ->find_all(); + + // If the tag no longer exists then delete the record. + if (count($oneTag) == 0) { + // Delete the record. + ORM::factory("tags_gps") + ->where("tag_id", $oneGPS->tag_id) + ->delete_all(); + $int_deleted_records++; + } + } + + // Redirect back to the main screen and display a "success" message. + message::success($int_deleted_records . t(" Orphaned Record(s) have been deleted.")); + url::redirect("admin/tagsmap"); + } + + public function confirm_delete_gps($tag_id) { + // Make sure the user meant to hit the delete button. + $view = new Admin_View("admin.html"); + $view->content = new View("admin_tagsmap_delete.html"); + $view->content->tag_id = $tag_id; + + // Determine the name of the tag. + $tagName = ORM::factory("tag") + ->where("id", $tag_id) + ->find_all(); + $view->content->tag_name = $tagName[0]->name; + + print $view; + } + + public function delete_gps($tag_id) { + // Delete the GSP data associated with a tag. + + // Delete the record. + ORM::factory("tags_gps") + ->where("tag_id", $tag_id) + ->delete_all(); + + // Redirect back to the main screen and display a "success" message. + message::success(t("Your Settings Have Been Saved.")); + url::redirect("admin/tagsmap"); + } + + private function _get_tagsgpsedit_form($tag_id) { + // Make a new form for editing GPS data associated with a tag ($tag_id). + $form = new Forge("admin/tagsmap/savegps", "", "post", + array("id" => "gTagsMapAdminForm")); + + // Add a few input boxes for GPS and Description + $tagsgps_group = $form->group("TagsMapGPS"); + $tagsgps_group->hidden("tag_id")->value($tag_id); + + // Check and see if this ID already has GPS data, then create + // input boxes to either update it or enter in new information. + $existingGPS = ORM::factory("tags_gps") + ->where("tag_id", $tag_id) + ->find_all(); + if (count($existingGPS) == 0) { + $tagsgps_group->input("gps_latitude")->label(t("Latitude"))->value(); + $tagsgps_group->input("gps_longitude")->label(t("Longitude"))->value(); + $tagsgps_group->textarea("gps_description")->label(t("Description"))->value(); + } else { + $tagsgps_group->input("gps_latitude")->label(t("Latitude"))->value($existingGPS[0]->latitude); + $tagsgps_group->input("gps_longitude")->label(t("Longitude"))->value($existingGPS[0]->longitude); + $tagsgps_group->textarea("gps_description")->label(t("Description"))->value($existingGPS[0]->description); + } + + // Add a save button to the form. + $tagsgps_group->submit("SaveGPS")->value(t("Save")); + + // Return the newly generated form. + return $form; + } + + public function savegps() { + // Save the GPS coordinates to the database. + + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + // Figure out the values of the text boxes + $str_tagid = Input::instance()->post("tag_id"); + $str_latitude = Input::instance()->post("gps_latitude"); + $str_longitude = Input::instance()->post("gps_longitude"); + $str_description = Input::instance()->post("gps_description"); + + // Save to database. + // Check and see if this ID already has GPS data, + // Update it if it does, create a new record if it doesn't. + $existingGPS = ORM::factory("tags_gps") + ->where("tag_id", $str_tagid) + ->find_all(); + if (count($existingGPS) == 0) { + $newgps = ORM::factory("tags_gps"); + $newgps->tag_id = $str_tagid; + $newgps->latitude = $str_latitude; + $newgps->longitude = $str_longitude; + $newgps->description = $str_description; + $newgps->save(); + } else { + $updatedGPS = ORM::factory("tags_gps", $existingGPS[0]->id); + $updatedGPS->tag_id = $str_tagid; + $updatedGPS->latitude = $str_latitude; + $updatedGPS->longitude = $str_longitude; + $updatedGPS->description = $str_description; + $updatedGPS->save(); + } + + // Redirect back to the main screen and display a "success" message. + message::success(t("Your Settings Have Been Saved.")); + url::redirect("admin/tagsmap"); + } + + private function _get_googlemaps_form() { + // Make a new form for inputing information associated with google maps. + $form = new Forge("admin/tagsmap/savemapprefs", "", "post", + array("id" => "gTagsMapAdminForm")); + + // Input box for the Maps API Key + $googlemap_group = $form->group("GoogleMapsKey"); + $googlemap_group->input("google_api_key") + ->label(t("Google Maps API Key")) + ->value(module::get_var("tagsmap", "googlemap_api_key")); + + // Input boxes for the Maps starting location map type and zoom. + $startingmap_group = $form->group("GoogleMapsPos"); + $startingmap_group->input("google_starting_latitude") + ->label(t("Starting Latitude")) + ->value(module::get_var("tagsmap", "googlemap_latitude")); + $startingmap_group->input("google_starting_longitude") + ->label(t("Starting Longitude")) + ->value(module::get_var("tagsmap", "googlemap_longitude")); + $startingmap_group->input("google_default_zoom") + ->label(t("Default Zoom Level")) + ->value(module::get_var("tagsmap", "googlemap_zoom")); + $startingmap_group->input("google_default_type") + ->label(t("Default Map Type") . " (G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, G_PHYSICAL_MAP, G_SATELLITE_3D_MAP)") + ->value(module::get_var("tagsmap", "googlemap_type")); + + // Add a save button to the form. + $form->submit("SaveSettings")->value(t("Save")); + + // Return the newly generated form. + return $form; + } + + public function savemapprefs() { + // Save information associated with Google Maps to the database. + + // Prevent Cross Site Request Forgery + access::verify_csrf(); + + // Figure out the values of the text boxes + $str_googlekey = Input::instance()->post("google_api_key"); + $str_googlelatitude = Input::instance()->post("google_starting_latitude"); + $str_googlelongitude = Input::instance()->post("google_starting_longitude"); + $str_googlezoom = Input::instance()->post("google_default_zoom"); + $str_googlemaptype = Input::instance()->post("google_default_type"); + + // Save Settings. + module::set_var("tagsmap", "googlemap_api_key", $str_googlekey); + module::set_var("tagsmap", "googlemap_latitude", $str_googlelatitude); + module::set_var("tagsmap", "googlemap_longitude", $str_googlelongitude); + module::set_var("tagsmap", "googlemap_zoom", $str_googlezoom); + module::set_var("tagsmap", "googlemap_type", $str_googlemaptype); + + // Display a success message and redirect back to the TagsMap admin page. + message::success(t("Your Settings Have Been Saved.")); + url::redirect("admin/tagsmap"); + } +} \ No newline at end of file diff --git a/themes/3nids/modules/tagsmap/controllers/tagsmap.php b/themes/3nids/modules/tagsmap/controllers/tagsmap.php new file mode 100755 index 00000000..d7985667 --- /dev/null +++ b/themes/3nids/modules/tagsmap/controllers/tagsmap.php @@ -0,0 +1,62 @@ +find_all(); + + // Set up and display the actual page. + // If fullsize is true, allow the map to take up the entire browser window, + // if not, then display the map in the gallery theme. + if ($fullsize == true) { + $view = new View("tagsmap_googlemap.html"); + $view->map_fullsize = true; + + // Load in module preferences. + $view->tags_gps = $tagsGPS; + $view->google_map_key = module::get_var("tagsmap", "googlemap_api_key"); + $view->google_map_latitude = module::get_var("tagsmap", "googlemap_latitude"); + $view->google_map_longitude = module::get_var("tagsmap", "googlemap_longitude"); + $view->google_map_zoom = module::get_var("tagsmap", "googlemap_zoom"); + $view->google_map_type = module::get_var("tagsmap", "googlemap_type"); + + print $view; + } else { + $template = new Theme_View("page.html", "Contact"); + //$template->body_attributes("onload=\"GLoad\" onunload=\"Gunload\""); + $template->page_title = t("Gallery :: map"); + $template->content = new View("tagsmap_googlemap.html"); + + // Load in module preferences. + $template->content->tags_gps = $tagsGPS; + $template->content->google_map_key = module::get_var("tagsmap", "googlemap_api_key"); + $template->content->google_map_latitude = module::get_var("tagsmap", "googlemap_latitude"); + $template->content->google_map_longitude = module::get_var("tagsmap", "googlemap_longitude"); + $template->content->google_map_zoom = module::get_var("tagsmap", "googlemap_zoom"); + $template->content->google_map_type = module::get_var("tagsmap", "googlemap_type"); + + print $template; + } + } + + +} diff --git a/themes/3nids/modules/tagsmap/css/tagsmap.css b/themes/3nids/modules/tagsmap/css/tagsmap.css new file mode 100755 index 00000000..6938a5c9 --- /dev/null +++ b/themes/3nids/modules/tagsmap/css/tagsmap.css @@ -0,0 +1,96 @@ +.tooltip{ + position: absolute; + left: 10px; + top: 10px; + width: 150px; + background-color: #777; + color: #ffffcc; + border: 1px solid #f9db01; + font: bold 13px "Trebuchet MS", Verdana, Arial, sans-serif; + padding: 4px; + z-index: 20; + -moz-border-radius: 10px; + -moz-opacity: .87; + filter:alpha(opacity=87); + opacity:.87; +} + +.gMapThumbTable{ + width:200px; + height: 80px; + font-size: 0.9em; + font-style: normal; + color: #FFFFCC; +} +.gMapThumbImg{ + overflow:auto; + position: relative; + height:125px; +} +.gMapThumbLink{ + height: 15px; +} +.gMapThumbTd{ + padding: 0; + text-align: center; +} +.gMapThumbnail{ + height: 80px; +} +#gmInfo{ + width: 230px; +} +#gmInfo_contents{ + background: #3d3d3d; +} +#gmInfo_contents div{ + font-style: italic; + vertical-align: middle; + margin: 0 10px; +} +#gmInfo_tl{ + width: 14px; + height: 14px; + background: url('../images/gmInfo_tl.png') top left no-repeat transparent; +} +#gmInfo_t{ + background: url('../images/gmInfo_t.png') top left repeat-x transparent; +} +#gmInfo_tr{ + width: 14px; + height: 14px; + background: url('../images/gmInfo_tr.png') top left no-repeat transparent; +} +#gmInfo_l{ + width: 14px; + background: url('../images/gmInfo_l.png') top left repeat-y transparent; +} +#gmInfo_r{ + width: 14px; + background: url('../images/gmInfo_r.png') top right repeat-y transparent; +} +#gmInfo_bl{ + width: 14px; + height: 14px; + background: url('../images/gmInfo_bl.png') top left no-repeat transparent; +} +#gmInfo_b{ + background: url('../images/gmInfo_b.png') top left repeat-x transparent; +} +#gmInfo_br{ + width: 14px; + height: 14px; + background: url('../images/gmInfo_br.png') top left no-repeat transparent; +} +#gmInfo_close{ + width: 30px; + height: 30px; + background: url('../images/gmInfo_close.png') top left no-repeat transparent; + margin: -10px 0 0 10px; + cursor: pointer; +} +#gmInfo_beak{ + width: 27px; + height: 33px; + background: url('../images/gmInfo_beak.png') top left no-repeat transparent; +} diff --git a/themes/3nids/modules/tagsmap/helpers/tagsmap_event.php b/themes/3nids/modules/tagsmap/helpers/tagsmap_event.php new file mode 100755 index 00000000..27b47ca6 --- /dev/null +++ b/themes/3nids/modules/tagsmap/helpers/tagsmap_event.php @@ -0,0 +1,43 @@ +deactivate)) { + site_status::warning( + t("The TagsMap module requires the Tags module. " . + "Activate the Tags module now", + array("url" => url::site("admin/modules"))), + "tagsmap_needs_tag"); + } else { + site_status::clear("tagsmap_needs_tag"); + } + } + + static function admin_menu($menu, $theme) { + // Add a link to the TagsMap admin page to the Content menu. + $menu->get("content_menu") + ->append(Menu::factory("link") + ->id("tagsmap") + ->label(t("TagsMap Settings")) + ->url(url::site("admin/tagsmap"))); + } +} \ No newline at end of file diff --git a/themes/3nids/modules/tagsmap/helpers/tagsmap_installer.php b/themes/3nids/modules/tagsmap/helpers/tagsmap_installer.php new file mode 100755 index 00000000..5fd7b754 --- /dev/null +++ b/themes/3nids/modules/tagsmap/helpers/tagsmap_installer.php @@ -0,0 +1,48 @@ +query("CREATE TABLE IF NOT EXISTS {tags_gpses} ( + `id` int(9) NOT NULL auto_increment, + `tag_id` int(9) NOT NULL, + `latitude` varchar(128) NOT NULL, + `longitude` varchar(128) NOT NULL, + `description` varchar(2048) default NULL, + PRIMARY KEY (`id`), + KEY(`tag_id`, `id`)) + ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + + // Set the module's version number. + module::set_version("tagsmap", 1); + } + + static function deactivate() { + site_status::clear("tagsmap_needs_tag"); + } + + static function uninstall() { + // Delete the GPS table before uninstalling. + $db = Database::instance(); + $db->query("DROP TABLE IF EXISTS {tags_gpses};"); + module::delete("tagsmap"); + } +} diff --git a/themes/3nids/modules/tagsmap/helpers/tagsmap_theme.php b/themes/3nids/modules/tagsmap/helpers/tagsmap_theme.php new file mode 100755 index 00000000..4ba9191f --- /dev/null +++ b/themes/3nids/modules/tagsmap/helpers/tagsmap_theme.php @@ -0,0 +1,24 @@ +css("tagsmap.css"); + } +} diff --git a/themes/3nids/modules/tagsmap/images/gmInfo_b.png b/themes/3nids/modules/tagsmap/images/gmInfo_b.png new file mode 100755 index 00000000..92aee80b Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/gmInfo_b.png differ diff --git a/themes/3nids/modules/tagsmap/images/gmInfo_beak.png b/themes/3nids/modules/tagsmap/images/gmInfo_beak.png new file mode 100755 index 00000000..240b6501 Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/gmInfo_beak.png differ diff --git a/themes/3nids/modules/tagsmap/images/gmInfo_bl.png b/themes/3nids/modules/tagsmap/images/gmInfo_bl.png new file mode 100755 index 00000000..8f7ecf0f Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/gmInfo_bl.png differ diff --git a/themes/3nids/modules/tagsmap/images/gmInfo_br.png b/themes/3nids/modules/tagsmap/images/gmInfo_br.png new file mode 100755 index 00000000..919727f1 Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/gmInfo_br.png differ diff --git a/themes/3nids/modules/tagsmap/images/gmInfo_close.png b/themes/3nids/modules/tagsmap/images/gmInfo_close.png new file mode 100755 index 00000000..3dda09b9 Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/gmInfo_close.png differ diff --git a/themes/3nids/modules/tagsmap/images/gmInfo_l.png b/themes/3nids/modules/tagsmap/images/gmInfo_l.png new file mode 100755 index 00000000..16ffebba Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/gmInfo_l.png differ diff --git a/themes/3nids/modules/tagsmap/images/gmInfo_r.png b/themes/3nids/modules/tagsmap/images/gmInfo_r.png new file mode 100755 index 00000000..b0e42b11 Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/gmInfo_r.png differ diff --git a/themes/3nids/modules/tagsmap/images/gmInfo_t.png b/themes/3nids/modules/tagsmap/images/gmInfo_t.png new file mode 100755 index 00000000..66eeda45 Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/gmInfo_t.png differ diff --git a/themes/3nids/modules/tagsmap/images/gmInfo_tl.png b/themes/3nids/modules/tagsmap/images/gmInfo_tl.png new file mode 100755 index 00000000..955cffbe Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/gmInfo_tl.png differ diff --git a/themes/3nids/modules/tagsmap/images/gmInfo_tr.png b/themes/3nids/modules/tagsmap/images/gmInfo_tr.png new file mode 100755 index 00000000..44a2e07b Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/gmInfo_tr.png differ diff --git a/themes/3nids/modules/tagsmap/images/landscape16.png b/themes/3nids/modules/tagsmap/images/landscape16.png new file mode 100755 index 00000000..7004faaa Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/landscape16.png differ diff --git a/themes/3nids/modules/tagsmap/images/marker_shadow.png b/themes/3nids/modules/tagsmap/images/marker_shadow.png new file mode 100755 index 00000000..3a89759f Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/marker_shadow.png differ diff --git a/themes/3nids/modules/tagsmap/images/markero.png b/themes/3nids/modules/tagsmap/images/markero.png new file mode 100755 index 00000000..37780950 Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/markero.png differ diff --git a/themes/3nids/modules/tagsmap/images/markery.png b/themes/3nids/modules/tagsmap/images/markery.png new file mode 100755 index 00000000..25aaebbe Binary files /dev/null and b/themes/3nids/modules/tagsmap/images/markery.png differ diff --git a/themes/3nids/modules/tagsmap/js/extinfowindow.js b/themes/3nids/modules/tagsmap/js/extinfowindow.js new file mode 100755 index 00000000..79249423 --- /dev/null +++ b/themes/3nids/modules/tagsmap/js/extinfowindow.js @@ -0,0 +1,610 @@ +/* +* ExtInfoWindow Class, v1.0 +* Copyright (c) 2007, Joe Monahan (http://www.seejoecode.com) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* This class lets you add an info window to the map which mimics GInfoWindow +* and allows for users to skin it via CSS. Additionally it has options to +* pull in HTML content from an ajax request, triggered when a user clicks on +* the associated marker. +*/ + + +/** + * Creates a new ExtInfoWindow that will initialize by reading styles from css + * + * @constructor + * @param {GMarker} marker The marker associated with the info window + * @param {String} windowId The DOM Id we will use to reference the info window + * @param {String} html The HTML contents + * @param {Object} opt_opts A contianer for optional arguments: + * {String} ajaxUrl The Url to hit on the server to request some contents + * {Number} paddingX The padding size in pixels that the info window will leave on + * the left and right sides of the map when panning is involved. + * {Number} paddingY The padding size in pixels that the info window will leave on + * the top and bottom sides of the map when panning is involved. + * {Number} beakOffset The repositioning offset for when aligning the beak element. + * This is used to make sure the beak lines up correcting if the + * info window styling containers a border. + */ +function ExtInfoWindow(marker, windowId, html, opt_opts) { + this.html_ = html; + this.marker_ = marker; + this.infoWindowId_ = windowId; + + this.options_ = opt_opts == null ? {} : opt_opts; + this.ajaxUrl_ = this.options_.ajaxUrl == null ? null : this.options_.ajaxUrl; + this.callback_ = this.options_.ajaxCallback == null ? null : this.options_.ajaxCallback; + + this.borderSize_ = this.options_.beakOffset == null ? 0 : this.options_.beakOffset; + this.paddingX_ = this.options_.paddingX == null ? 0 + this.borderSize_ : this.options_.paddingX + this.borderSize_; + this.paddingY_ = this.options_.paddingY == null ? 0 + this.borderSize_ : this.options_.paddingY + this.borderSize_; + + this.map_ = null; + + this.container_ = document.createElement('div'); + this.container_.style.position = 'relative'; + this.container_.style.display = 'none'; + + this.contentDiv_ = document.createElement('div'); + this.contentDiv_.id = this.infoWindowId_ + '_contents'; + this.contentDiv_.innerHTML = this.html_; + this.contentDiv_.style.display = 'block'; + this.contentDiv_.style.visibility = 'hidden'; + + this.wrapperDiv_ = document.createElement('div'); +}; + +//use the GOverlay class +ExtInfoWindow.prototype = new GOverlay(); + +/** + * Called by GMap2's addOverlay method. Creates the wrapping div for our info window and adds + * it to the relevant map pane. Also binds mousedown event to a private function so that they + * are not passed to the underlying map. Finally, performs ajax request if set up to use ajax + * in the constructor. + * @param {GMap2} map The map that has had this extInfoWindow is added to it. + */ +ExtInfoWindow.prototype.initialize = function(map) { + this.map_ = map; + + this.defaultStyles = { + containerWidth: this.map_.getSize().width / 2, + borderSize: 1 + }; + + this.wrapperParts = { + tl:{t:0, l:0, w:0, h:0, domElement: null}, + t:{t:0, l:0, w:0, h:0, domElement: null}, + tr:{t:0, l:0, w:0, h:0, domElement: null}, + l:{t:0, l:0, w:0, h:0, domElement: null}, + r:{t:0, l:0, w:0, h:0, domElement: null}, + bl:{t:0, l:0, w:0, h:0, domElement: null}, + b:{t:0, l:0, w:0, h:0, domElement: null}, + br:{t:0, l:0, w:0, h:0, domElement: null}, + beak:{t:0, l:0, w:0, h:0, domElement: null}, + close:{t:0, l:0, w:0, h:0, domElement: null} + }; + + for (var i in this.wrapperParts ) { + var tempElement = document.createElement('div'); + tempElement.id = this.infoWindowId_ + '_' + i; + tempElement.style.visibility = 'hidden'; + document.body.appendChild(tempElement); + tempElement = document.getElementById(this.infoWindowId_ + '_' + i); + var tempWrapperPart = eval('this.wrapperParts.' + i); + tempWrapperPart.w = parseInt(this.getStyle_(tempElement, 'width')); + tempWrapperPart.h = parseInt(this.getStyle_(tempElement, 'height')); + document.body.removeChild(tempElement); + } + for (var i in this.wrapperParts) { + if (i == 'close' ) { + //first append the content so the close button is layered above it + this.wrapperDiv_.appendChild(this.contentDiv_); + } + var wrapperPartsDiv = null; + if (this.wrapperParts[i].domElement == null) { + wrapperPartsDiv = document.createElement('div'); + this.wrapperDiv_.appendChild(wrapperPartsDiv); + } else { + wrapperPartsDiv = this.wrapperParts[i].domElement; + } + wrapperPartsDiv.id = this.infoWindowId_ + '_' + i; + wrapperPartsDiv.style.position = 'absolute'; + wrapperPartsDiv.style.width = this.wrapperParts[i].w + 'px'; + wrapperPartsDiv.style.height = this.wrapperParts[i].h + 'px'; + wrapperPartsDiv.style.top = this.wrapperParts[i].t + 'px'; + wrapperPartsDiv.style.left = this.wrapperParts[i].l + 'px'; + this.wrapperParts[i].domElement = wrapperPartsDiv; + } + + this.map_.getPane(G_MAP_FLOAT_PANE).appendChild(this.container_); + this.container_.id = this.infoWindowId_; + var containerWidth = this.getStyle_(document.getElementById(this.infoWindowId_), 'width'); + this.container_.style.width = (containerWidth == null ? this.defaultStyles.containerWidth : containerWidth); + + this.map_.getContainer().appendChild(this.contentDiv_); + this.contentWidth = this.getDimensions_(this.container_).width; + this.contentDiv_.style.width = this.contentWidth + 'px'; + this.contentDiv_.style.position = 'absolute'; + + this.container_.appendChild(this.wrapperDiv_); + + GEvent.bindDom(this.container_, 'mousedown', this,this.onClick_); + GEvent.bindDom(this.container_, 'dblclick', this,this.onClick_); + GEvent.bindDom(this.container_, 'DOMMouseScroll', this, this.onClick_); + + + GEvent.trigger(this.map_, 'extinfowindowopen'); + if (this.ajaxUrl_ != null ) { + this.ajaxRequest_(this.ajaxUrl_); + } +}; + +/** + * Private function to steal mouse click events to prevent it from returning to the map. + * Without this links in the ExtInfoWindow would not work, and you could click to zoom or drag + * the map behind it. + * @private + * @param {MouseEvent} e The mouse event caught by this function + */ +ExtInfoWindow.prototype.onClick_ = function(e) { + if(navigator.userAgent.toLowerCase().indexOf('msie') != -1 && document.all) { + window.event.cancelBubble = true; + window.event.returnValue = false; + } else { + //e.preventDefault(); + e.stopPropagation(); + } +}; + +/** + * Remove the extInfoWindow container from the map pane. + */ +ExtInfoWindow.prototype.remove = function() { + if (this.map_.getExtInfoWindow() != null) { + GEvent.trigger(this.map_, 'extinfowindowbeforeclose'); + + GEvent.clearInstanceListeners(this.container_); + if (this.container_.outerHTML) { + this.container_.outerHTML = ''; //prevent pseudo-leak in IE + } + if (this.container_.parentNode) { + this.container_.parentNode.removeChild(this.container_); + } + this.container_ = null; + GEvent.trigger(this.map_, 'extinfowindowclose'); + this.map_.setExtInfoWindow_(null); + } +}; + +/** + * Return a copy of this overlay, for the parent Map to duplicate itself in full. This + * is part of the Overlay interface and is used, for example, to copy everything in the + * main view into the mini-map. + * @return {GOverlay} + */ +ExtInfoWindow.prototype.copy = function() { + return new ExtInfoWindow(this.marker_, this.infoWindowId_, this.html_, this.options_); +}; + +/** + * Draw extInfoWindow and wrapping decorators onto the map. Resize and reposition + * the map as necessary. + * @param {Boolean} force Will be true when pixel coordinates need to be recomputed. + */ +ExtInfoWindow.prototype.redraw = function(force) { + if (!force || this.container_ == null) return; + + //set the content section's height, needed so browser font resizing does not affect the window's dimensions + var contentHeight = this.contentDiv_.offsetHeight; + this.contentDiv_.style.height = contentHeight + 'px'; + + //reposition contents depending on wrapper parts. + //this is necessary for content that is pulled in via ajax + this.contentDiv_.style.left = this.wrapperParts.l.w + 'px'; + this.contentDiv_.style.top = this.wrapperParts.tl.h + 'px'; + this.contentDiv_.style.visibility = 'visible'; + + //Finish configuring wrapper parts that were not set in initialization + this.wrapperParts.tl.t = 0; + this.wrapperParts.tl.l = 0; + this.wrapperParts.t.l = this.wrapperParts.tl.w; + this.wrapperParts.t.w = (this.wrapperParts.l.w + this.contentWidth + this.wrapperParts.r.w) - this.wrapperParts.tl.w - this.wrapperParts.tr.w; + this.wrapperParts.t.h = this.wrapperParts.tl.h; + this.wrapperParts.tr.l = this.wrapperParts.t.w + this.wrapperParts.tl.w; + this.wrapperParts.l.t = this.wrapperParts.tl.h; + this.wrapperParts.l.h = contentHeight; + this.wrapperParts.r.l = this.contentWidth + this.wrapperParts.l.w; + this.wrapperParts.r.t = this.wrapperParts.tr.h; + this.wrapperParts.r.h = contentHeight; + this.wrapperParts.bl.t = contentHeight + this.wrapperParts.tl.h; + this.wrapperParts.b.l = this.wrapperParts.bl.w; + this.wrapperParts.b.t = contentHeight + this.wrapperParts.tl.h; + this.wrapperParts.b.w = (this.wrapperParts.l.w + this.contentWidth + this.wrapperParts.r.w) - this.wrapperParts.bl.w - this.wrapperParts.br.w; + this.wrapperParts.b.h = this.wrapperParts.bl.h; + this.wrapperParts.br.l = this.wrapperParts.b.w + this.wrapperParts.bl.w; + this.wrapperParts.br.t = contentHeight + this.wrapperParts.tr.h; + this.wrapperParts.close.l = this.wrapperParts.tr.l +this.wrapperParts.tr.w - this.wrapperParts.close.w - this.borderSize_; + this.wrapperParts.close.t = this.borderSize_; + this.wrapperParts.beak.l = this.borderSize_ + (this.contentWidth / 2) - (this.wrapperParts.beak.w / 2); + this.wrapperParts.beak.t = this.wrapperParts.bl.t + this.wrapperParts.bl.h - this.borderSize_; + + //create the decoration wrapper DOM objects + //append the styled info window to the container + for (var i in this.wrapperParts) { + if (i == 'close' ) { + //first append the content so the close button is layered above it + this.wrapperDiv_.insertBefore(this.contentDiv_, this.wrapperParts[i].domElement); + } + var wrapperPartsDiv = null; + if (this.wrapperParts[i].domElement == null) { + wrapperPartsDiv = document.createElement('div'); + this.wrapperDiv_.appendChild(wrapperPartsDiv); + } else { + wrapperPartsDiv = this.wrapperParts[i].domElement; + } + wrapperPartsDiv.id = this.infoWindowId_ + '_' + i; + wrapperPartsDiv.style.position='absolute'; + wrapperPartsDiv.style.width = this.wrapperParts[i].w + 'px'; + wrapperPartsDiv.style.height = this.wrapperParts[i].h + 'px'; + wrapperPartsDiv.style.top = this.wrapperParts[i].t + 'px'; + wrapperPartsDiv.style.left = this.wrapperParts[i].l + 'px'; + this.wrapperParts[i].domElement = wrapperPartsDiv; + } + + //add event handler for the close box + var currentMarker = this.marker_; + var thisMap = this.map_; + GEvent.addDomListener(this.wrapperParts.close.domElement, 'click', + function() { + thisMap.closeExtInfoWindow(); + } + ); + + //position the container on the map, over the marker + var pixelLocation = this.map_.fromLatLngToDivPixel(this.marker_.getPoint()); + this.container_.style.position = 'absolute'; + var markerIcon = this.marker_.getIcon(); + this.container_.style.left = (pixelLocation.x + - (this.contentWidth / 2) + - markerIcon.iconAnchor.x + + markerIcon.infoWindowAnchor.x + ) + 'px'; + + this.container_.style.top = (pixelLocation.y + - this.wrapperParts.bl.h + - contentHeight + - this.wrapperParts.tl.h + - this.wrapperParts.beak.h + - markerIcon.iconAnchor.y + + markerIcon.infoWindowAnchor.y + + this.borderSize_ + ) + 'px'; + + this.container_.style.display = 'block'; + + if(this.map_.getExtInfoWindow() != null) { + this.repositionMap_(); + } +}; + +/** + * Determine the dimensions of the contents to recalculate and reposition the + * wrapping decorator elements accordingly. + */ +ExtInfoWindow.prototype.resize = function(){ + + //Create temporary DOM node for new contents to get new height + //This is done because if you manipulate this.contentDiv_ directly it causes visual errors in IE6 + var tempElement = this.contentDiv_.cloneNode(true); + tempElement.id = this.infoWindowId_ + '_tempContents'; + tempElement.style.visibility = 'hidden'; + tempElement.style.height = 'auto'; + document.body.appendChild(tempElement); + tempElement = document.getElementById(this.infoWindowId_ + '_tempContents'); + var contentHeight = tempElement.offsetHeight; + document.body.removeChild(tempElement); + + //Set the new height to eliminate visual defects that can be caused by font resizing in browser + this.contentDiv_.style.height = contentHeight + 'px'; + + var contentWidth = this.contentDiv_.offsetWidth; + var pixelLocation = this.map_.fromLatLngToDivPixel(this.marker_.getPoint()); + + var oldWindowHeight = this.wrapperParts.t.domElement.offsetHeight + this.wrapperParts.l.domElement.offsetHeight + this.wrapperParts.b.domElement.offsetHeight; + var oldWindowPosTop = this.wrapperParts.t.domElement.offsetTop; + + //resize info window to look correct for new height + this.wrapperParts.l.domElement.style.height = contentHeight + 'px'; + this.wrapperParts.r.domElement.style.height = contentHeight + 'px'; + var newPosTop = this.wrapperParts.b.domElement.offsetTop - contentHeight; + this.wrapperParts.l.domElement.style.top = newPosTop + 'px'; + this.wrapperParts.r.domElement.style.top = newPosTop + 'px'; + this.contentDiv_.style.top = newPosTop + 'px'; + windowTHeight = parseInt(this.wrapperParts.t.domElement.style.height); + newPosTop -= windowTHeight; + this.wrapperParts.close.domElement.style.top = newPosTop + this.borderSize_ + 'px'; + this.wrapperParts.tl.domElement.style.top = newPosTop + 'px'; + this.wrapperParts.t.domElement.style.top = newPosTop + 'px'; + this.wrapperParts.tr.domElement.style.top = newPosTop + 'px'; + + this.repositionMap_(); +}; + +/** + * Check to see if the displayed extInfoWindow is positioned off the viewable + * map region and by how much. Use that information to pan the map so that + * the extInfoWindow is completely displayed. + * @private + */ +ExtInfoWindow.prototype.repositionMap_ = function(){ + //pan if necessary so it shows on the screen + var mapNE = this.map_.fromLatLngToDivPixel( + this.map_.getBounds().getNorthEast() + ); + var mapSW = this.map_.fromLatLngToDivPixel( + this.map_.getBounds().getSouthWest() + ); + var markerPosition = this.map_.fromLatLngToDivPixel( + this.marker_.getPoint() + ); + + var panX = 0; + var panY = 0; + var paddingX = this.paddingX_; + var paddingY = this.paddingY_; + var infoWindowAnchor = this.marker_.getIcon().infoWindowAnchor; + var iconAnchor = this.marker_.getIcon().iconAnchor; + + //test top of screen + var windowT = this.wrapperParts.t.domElement; + var windowL = this.wrapperParts.l.domElement; + var windowB = this.wrapperParts.b.domElement; + var windowR = this.wrapperParts.r.domElement; + var windowBeak = this.wrapperParts.beak.domElement; + + var offsetTop = markerPosition.y - ( -infoWindowAnchor.y + iconAnchor.y + this.getDimensions_(windowBeak).height + this.getDimensions_(windowB).height + this.getDimensions_(windowL).height + this.getDimensions_(windowT).height + this.paddingY_); + if (offsetTop < mapNE.y) { + panY = mapNE.y - offsetTop; + } else { + //test bottom of screen + var offsetBottom = markerPosition.y + this.paddingY_; + if (offsetBottom >= mapSW.y) { + panY = -(offsetBottom - mapSW.y); + } + } + + //test right of screen + var offsetRight = Math.round(markerPosition.x + this.getDimensions_(this.container_).width/2 + this.getDimensions_(windowR).width + this.paddingX_ + infoWindowAnchor.x - iconAnchor.x); + if (offsetRight > mapNE.x) { + panX = -( offsetRight - mapNE.x); + } else { + //test left of screen + var offsetLeft = - (Math.round( (this.getDimensions_(this.container_).width/2 - this.marker_.getIcon().iconSize.width/2) + this.getDimensions_(windowL).width + this.borderSize_ + this.paddingX_) - markerPosition.x - infoWindowAnchor.x + iconAnchor.x); + if( offsetLeft < mapSW.x) { + panX = mapSW.x - offsetLeft; + } + } + + if (panX != 0 || panY != 0 && this.map_.getExtInfoWindow() != null ) { + this.map_.panBy(new GSize(panX,panY)); + } +}; + +/** + * Private function that handles performing an ajax request to the server. The response + * information is assumed to be HTML and is placed inside this extInfoWindow's contents region. + * Last, check to see if the height has changed, and resize the extInfoWindow accordingly. + * @private + * @param {String} url The Url of where to make the ajax request on the server + */ +ExtInfoWindow.prototype.ajaxRequest_ = function(url){ + var thisMap = this.map_; + var thisCallback = this.callback_; + GDownloadUrl(url, function(response, status){ + var infoWindow = document.getElementById(thisMap.getExtInfoWindow().infoWindowId_ + '_contents'); + if (response == null || status == -1 ) { + infoWindow.innerHTML = 'ERROR: The Ajax request failed to get HTML content from "' + url + '"'; + } else { + infoWindow.innerHTML = response; + } + if (thisCallback != null ) { + thisCallback(); + } + thisMap.getExtInfoWindow().resize(); + GEvent.trigger(thisMap, 'extinfowindowupdate'); + }); +}; + +/** + * Private function derived from Prototype.js to get a given element's + * height and width + * @private + * @param {Object} element The DOM element that will have height and + * width will be calculated for it. + * @return {Object} Object with keys: width, height + */ +ExtInfoWindow.prototype.getDimensions_ = function(element) { + var display = this.getStyle_(element, 'display'); + if (display != 'none' && display != null) { // Safari bug + return {width: element.offsetWidth, height: element.offsetHeight}; + } + + // All *Width and *Height properties give 0 on elements with display none, + // so enable the element temporarily + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + var originalDisplay = els.display; + els.visibility = 'hidden'; + els.position = 'absolute'; + els.display = 'block'; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = originalDisplay; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; +}; + +/** + * Private function derived from Prototype.js to get a given element's + * value that is associated with the passed style + * @private + * @param {Object} element The DOM element that will be checked. + * @param {String} style The style name that will be have it's value returned. + * @return {Object} + */ +ExtInfoWindow.prototype.getStyle_ = function(element, style) { + var found = false; + style = this.camelize_(style); + var value = element.style[style]; + if (!value) { + if (document.defaultView && document.defaultView.getComputedStyle) { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css[style] : null; + } else if (element.currentStyle) { + value = element.currentStyle[style]; + } + } + if((value == 'auto') && (style == 'width' || style == 'height') && (this.getStyle_(element, 'display') != 'none')) { + if( style == 'width' ) { + value = element.offsetWidth; + }else { + value = element.offsetHeight; + } + } + return (value == 'auto') ? null : value; +}; + +/** + * Private function pulled from Prototype.js that will change a hyphened + * style name into camel case. + * @private + * @param {String} element The string that will be parsed and made into camel case + * @return {String} + */ +ExtInfoWindow.prototype.camelize_ = function(element) { + var parts = element.split('-'), len = parts.length; + if (len == 1) return parts[0]; + var camelized = element.charAt(0) == '-' + ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) + : parts[0]; + + for (var i = 1; i < len; i++) { + camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); + } + return camelized; +}; + +GMap.prototype.ExtInfoWindowInstance_ = null; +GMap.prototype.ClickListener_ = null; +GMap.prototype.InfoWindowListener_ = null; + +/** + * Creates a new instance of ExtInfoWindow for the GMarker. Register the newly created + * instance with the map, ensuring only one window is open at a time. If this is the first + * ExtInfoWindow ever opened, add event listeners to the map to close the ExtInfoWindow on + * zoom and click, to mimic the default GInfoWindow behavior. + * + * @param {GMap} map The GMap2 object where the ExtInfoWindow will open + * @param {String} cssId The id we will use to reference the info window + * @param {String} html The HTML contents + * @param {Object} opt_opts A contianer for optional arguments: + * {String} ajaxUrl The Url to hit on the server to request some contents + * {Number} paddingX The padding size in pixels that the info window will leave on + * the left and right sides of the map when panning is involved. + * {Number} paddingX The padding size in pixels that the info window will leave on + * the top and bottom sides of the map when panning is involved. + * {Number} beakOffset The repositioning offset for when aligning the beak element. + * This is used to make sure the beak lines up correcting if the + * info window styling containers a border. + */ +GMarker.prototype.openExtInfoWindow = function(map, cssId, html, opt_opts) { + if (map == null) { + throw 'Error in GMarker.openExtInfoWindow: map cannot be null'; + return false; + } + if (cssId == null || cssId == '') { + throw 'Error in GMarker.openExtInfoWindow: must specify a cssId'; + return false; + } + + map.closeInfoWindow(); + if (map.getExtInfoWindow() != null) { + map.closeExtInfoWindow(); + } + if (map.getExtInfoWindow() == null) { + map.setExtInfoWindow_( new ExtInfoWindow( + this, + cssId, + html, + opt_opts + ) ); + if (map.ClickListener_ == null) { + //listen for map click, close ExtInfoWindow if open + map.ClickListener_ = GEvent.addListener(map, 'click', + function(event) { + if( !event && map.getExtInfoWindow() != null ){ + map.closeExtInfoWindow(); + } + } + ); + } + if (map.InfoWindowListener_ == null) { + //listen for default info window open, close ExtInfoWindow if open + map.InfoWindowListener_ = GEvent.addListener(map, 'infowindowopen', + function(event) { + if (map.getExtInfoWindow() != null) { + map.closeExtInfoWindow(); + } + } + ); + } + map.addOverlay(map.getExtInfoWindow()); + } +}; + +/** + * Remove the ExtInfoWindow instance + * @param {GMap2} map The map where the GMarker and ExtInfoWindow exist + */ +GMarker.prototype.closeExtInfoWindow = function(map) { + if( map.getExtInfWindow() != null ){ + map.closeExtInfoWindow(); + } +}; + +/** + * Get the ExtInfoWindow instance from the map + */ +GMap2.prototype.getExtInfoWindow = function(){ + return this.ExtInfoWindowInstance_; +}; +/** + * Set the ExtInfoWindow instance for the map + * @private + */ +GMap2.prototype.setExtInfoWindow_ = function( extInfoWindow ){ + this.ExtInfoWindowInstance_ = extInfoWindow; +} +/** + * Remove the ExtInfoWindow from the map + */ +GMap2.prototype.closeExtInfoWindow = function(){ + if( this.getExtInfoWindow() != null ){ + this.ExtInfoWindowInstance_.remove(); + } +}; diff --git a/themes/3nids/modules/tagsmap/models/tags_gps.php b/themes/3nids/modules/tagsmap/models/tags_gps.php new file mode 100755 index 00000000..c9fda760 --- /dev/null +++ b/themes/3nids/modules/tagsmap/models/tags_gps.php @@ -0,0 +1,21 @@ + +

    + +

    +
    +

    + +

    +
    You may sign up for a Google Maps API key here.

    + +
    + +
    +

    + +

    + count()/5 ?> + + + + + + + + +
    + count()) ?> +
    + $tag): ?> + name, 0, 1)) ?> + + + +
      + + $tags_per_column): /* new column */ ?> +
    + + + + + +
      + + +
    • + where("tag_id", $tag->id) + ->find_all(); + ?> + + + + name) ?> + (count ?>) + + id") ?>"> + + 0) { ?> + | id") ?>"> + + + + +
    • + + + + +
    +
    +
    + +
    +

    + +

    + + +
    + "> + + +
    +
    diff --git a/themes/3nids/modules/tagsmap/views/admin_tagsmap_delete.html.php b/themes/3nids/modules/tagsmap/views/admin_tagsmap_delete.html.php new file mode 100755 index 00000000..b85641e5 --- /dev/null +++ b/themes/3nids/modules/tagsmap/views/admin_tagsmap_delete.html.php @@ -0,0 +1,9 @@ + +
    +

    +

    +">Delete +">Cancel + +
    + diff --git a/themes/3nids/modules/tagsmap/views/admin_tagsmap_edit.html.php b/themes/3nids/modules/tagsmap/views/admin_tagsmap_edit.html.php new file mode 100755 index 00000000..66795291 --- /dev/null +++ b/themes/3nids/modules/tagsmap/views/admin_tagsmap_edit.html.php @@ -0,0 +1,56 @@ + +
    +

    + +
    + + +
    + diff --git a/themes/3nids/modules/tagsmap/views/tagsmap_googlemap.html.php b/themes/3nids/modules/tagsmap/views/tagsmap_googlemap.html.php new file mode 100755 index 00000000..6776dde9 --- /dev/null +++ b/themes/3nids/modules/tagsmap/views/tagsmap_googlemap.html.php @@ -0,0 +1,148 @@ + + + + + + + <?= t("Gallery :: Map") ?> + + + + + + + + + + +
    + + +

    + +