|
From: <dj...@us...> - 2012-03-07 03:53:21
|
Revision: 9103
http://xoops.svn.sourceforge.net/xoops/?rev=9103&view=rev
Author: djculex
Date: 2012-03-07 03:53:13 +0000 (Wed, 07 Mar 2012)
Log Message:
-----------
- Bugfix: Crossdomain problem in ajax. Fixed by assigning var to function replaced Xoops_IRl based on request url.
- Bugfix: preloads are multible loaded.
- Bugfix: Merging a few css files into smallworld.css
- Bugfix: Correction language/danish/js/bookmark.js
- Bugfix: Calculating age in profile was (-1 year) when month == this month. Now only if day < this day
- Bugfix: added some return false; or e.preventDefault; to js functions
- Change: Preparing test for adding js / css to templates via function based on request page
Modified Paths:
--------------
XoopsModules/smallworld/trunk/smallworld/Get_Count.php
XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css
XoopsModules/smallworld/trunk/smallworld/css/smallworld.css
XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt
XoopsModules/smallworld/trunk/smallworld/editprofile.php
XoopsModules/smallworld/trunk/smallworld/galleryshow.php
XoopsModules/smallworld/trunk/smallworld/include/functions.php
XoopsModules/smallworld/trunk/smallworld/index.php
XoopsModules/smallworld/trunk/smallworld/js/smallworld.js
XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.ui.datepicker-language.js
XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js
XoopsModules/smallworld/trunk/smallworld/preloads/core.php
XoopsModules/smallworld/trunk/smallworld/register.php
XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html
XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html
XoopsModules/smallworld/trunk/smallworld/templates/getmore.html
XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html
XoopsModules/smallworld/trunk/smallworld/userprofile.php
Modified: XoopsModules/smallworld/trunk/smallworld/Get_Count.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/Get_Count.php 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/Get_Count.php 2012-03-07 03:53:13 UTC (rev 9103)
@@ -23,8 +23,9 @@
include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php");
include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php");
-global $xoopsUser, $xoopsLogger, $xoopsDB;
-$xoopsLogger->activated = false;
+global $xoopsUser, $xoopsLogger, $xoopsDB, $xoopsTpl;
+$xoopsLogger->activated = true;
+$xoopsTpl->caching = 0;
$_COOKIE[session_name()] = session_id();
if ($xoopsUser) {
if($_GET['SmallworldGetUserMsgCount']) {
Modified: XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css 2012-03-07 03:53:13 UTC (rev 9103)
@@ -214,3 +214,116 @@
clear: both;
padding-bottom: 20px;
}
+
+html, body {
+}
+body{
+}
+a{
+
+}
+a:focus, a:hover, a:active {
+}
+p, li {
+}
+h1, h2 {
+}
+h1 {
+}
+h2 {
+}
+pre {
+ font-size: 1.2em;
+ line-height: 1.2em;
+ overflow-x: auto;
+}
+div#page {
+ width: 900px;
+ background-color: #fff;
+ margin: 0 auto;
+ text-align: left;
+ border-color: #ddd;
+ border-style: none solid solid;
+ border-width: medium 1px 1px;
+}
+div#container {
+ padding: 20px;
+}
+div#ads {
+ clear: both;
+ padding: 12px 0 12px 66px;
+}
+div#footer {
+ clear: both;
+ color: #777;
+ margin: 0 auto;
+ padding: 20px 0 40px;
+ text-align: center;
+}
+#body{
+
+}
+a{
+
+}
+h2 {
+
+}
+div#page {
+
+}
+div#footer {
+
+}
+div.caption-container {
+
+}
+div.image-title {
+ font-weight: bold;
+ font-size: 1.4em;
+}
+div.image-desc {
+ border-style: solid;
+ border-width: 1px;
+ font-size: 1em;
+ height: 300px;
+ line-height: 1.3em;
+ padding-bottom: 12px;
+ padding-left: 15px;
+ padding-top: 12px;
+ overflow-x:none;
+ overflow-y:scroll;
+}
+
+div.download {
+ margin-top: 8px;
+ font-size:1.0em;
+ margin-left: 33%;
+}
+div.photo-index {
+
+ font-size:1.1em;
+}
+div.navigation a.prev {
+ background-image: url('../images/prevPageArrow.gif');
+}
+div.navigation a.next {
+ background-image: url('../images/nextPageArrow.gif');
+}
+div.loader {
+ background-image: url('../images/loader.gif');
+}
+div.slideshow img {
+
+}
+ul.thumbs li.selected a.thumb {
+
+}
+div.pagination a:hover {
+
+ font-size:1.0em;
+}
+div.pagination span.current {
+
+ font-size:1.0em;
+}
\ No newline at end of file
Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-03-07 03:53:13 UTC (rev 9103)
@@ -1296,4 +1296,136 @@
display: block;
}
-/* ------------ Tooltips ---------- */
+/* ------------ Aprice ---------- */
+.appriseOverlay
+ {
+ position:fixed;
+ top:0;
+ left:0;
+ background:rgba(0, 0, 0, 0.3);
+ display:none;
+ }
+.appriseOuter
+ {
+ background:#eee;
+ border:1px solid #fff;
+ box-shadow:0px 3px 7px #333;
+ -moz-box-shadow:0px 3px 7px #333;
+ -webkit-box-shadow:0px 3px 7px #333;
+ -moz-border-radius:4px;
+ -webkit-border-radius:4px;
+ border-radius:4px;
+ -khtml-border-radius:4px;
+ position:absolute;
+ z-index:99999999;
+ min-width:200px;
+ min-height:50px;
+ max-width:75%;
+ position:fixed;
+ display:none;
+ }
+.appriseInner
+ {
+ padding:20px;
+ color:#333;
+ text-shadow:0px 1px 0px #fff;
+ }
+.appriseInner button
+ {
+ border:1px solid #bbb;
+ -moz-border-radius:3px;
+ -webkit-border-radius:3px;
+ border-radius:3px;
+ -khtml-border-radius:3px;
+ background: -moz-linear-gradient(100% 100% 90deg, #eee, #d5d5d5);
+ background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#eee), to(#d5d5d5));
+ background: -webkit-linear-gradient(#eee, #d5d5d5);
+ background: -o-linear-gradient(#eee, #d5d5d5);
+ color:#232d3d;
+ font-size:12px;
+ font-weight:bold;
+ padding:4px 10px;
+ margin:0 3px;
+ text-shadow:0px 1px 0px #fff;
+ cursor:pointer;
+ box-shadow:0px 1px 2px #ccc;
+ -moz-box-shadow:0px 1px 2px #ccc;
+ -webkit-box-shadow:0px 1px 2px #ccc;
+ }
+.appriseInner button:hover
+ {
+ color:#d85054;
+ }
+.aButtons, .aInput
+ {
+ margin:20px 10px 0px 10px;
+ text-align:center;
+ }
+.aTextbox
+ {
+ border:1px solid #aaa;
+ -moz-border-radius:4px;
+ -webkit-border-radius:4px;
+ border-radius:4px;
+ -khtml-border-radius:4px;
+ box-shadow:0px 1px 0px #fff;
+ -moz-box-shadow:0px 1px 0px #fff;
+ -webkit-box-shadow:0px 1px 0px #fff;
+ width:180px;
+ font-size:12px;
+ font-weight:bold;
+ padding:5px 10px;
+ }
+
+/* ------------------ Colorbox ---------------- */
+/*
+ ColorBox Core Style:
+ The following CSS is consistent between example themes and should not be altered.
+*/
+#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
+#cboxOverlay{position:fixed; width:100%; height:100%;}
+#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
+#cboxContent{position:relative;}
+#cboxLoadedContent{overflow:auto;}
+#cboxTitle{margin:0;}
+#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
+#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
+.cboxPhoto{float:left; margin:auto; border:0; display:block;}
+.cboxIframe{width:100%; height:100%; display:block; border:0;}
+
+/*
+ User Style:
+ Change the following styles to modify the appearance of ColorBox. They are
+ ordered & tabbed in a way that represents the nesting of the generated HTML.
+*/
+#cboxOverlay{background:#000;}
+#colorbox{}
+ #cboxTopLeft{width:14px; height:14px; background:url(../images/controls.png) no-repeat 0 0;}
+ #cboxTopCenter{height:14px; background:url(../images/bordercb.png) repeat-x top left;}
+ #cboxTopRight{width:14px; height:14px; background:url(../images/controlscb.png) no-repeat -36px 0;}
+ #cboxBottomLeft{width:14px; height:43px; background:url(../images/controlscb.png) no-repeat 0 -32px;}
+ #cboxBottomCenter{height:43px; background:url(../images/bordercb.png) repeat-x bottom left;}
+ #cboxBottomRight{width:14px; height:43px; background:url(../images/controlscb.png) no-repeat -36px -32px;}
+ #cboxMiddleLeft{width:14px; background:url(../images/controlscb.png) repeat-y -175px 0;}
+ #cboxMiddleRight{width:14px; background:url(../images/controlscb.png) repeat-y -211px 0;}
+ #cboxContent{background:#fff; overflow:visible;}
+ .cboxIframe{background:#fff;}
+ #cboxError{padding:50px; border:1px solid #ccc;}
+ #cboxLoadedContent{margin-bottom:5px;}
+ #cboxLoadingOverlay{background:url(../images/loading_backgroundcb.png) no-repeat center center;}
+ #cboxLoadingGraphic{background:url(../images/loadingcb.gif) no-repeat center center;}
+ #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;}
+ #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}
+
+ #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(../images/controlscb.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
+ #cboxPrevious{left:0px; background-position: -51px -25px;}
+ #cboxPrevious:hover{background-position:-51px 0px;}
+ #cboxNext{left:27px; background-position:-75px -25px;}
+ #cboxNext:hover{background-position:-75px 0px;}
+ #cboxClose{right:0; background-position:-100px -25px;}
+ #cboxClose:hover{background-position:-100px 0px;}
+
+ .cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;}
+ .cboxSlideshow_on #cboxSlideshow:hover{background-position:-150px 0px;}
+ .cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;}
+ .cboxSlideshow_off #cboxSlideshow:hover{background-position:-125px 0px;}
Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-07 03:53:13 UTC (rev 9103)
@@ -14,6 +14,15 @@
- Bugfix: Rankimages isset even if not existing giving error
- Bugfix: el not defined in ajaxupload. Fixed by returning false if not defined
+07 Marts 2012
+- Bugfix: Crossdomain problem in ajax. Fixed by assigning var to function replaced Xoops_IRl based on request url.
+- Bugfix: preloads are multible loaded.
+- Bugfix: Merging a few css files into smallworld.css
+- Bugfix: Correction language/danish/js/bookmark.js
+- Bugfix: Calculating age in profile was (-1 year) when month == this month. Now only if day < this day
+- Bugfix: added some return false; or e.preventDefault; to js functions
+- Change: Preparing test for adding js / css to templates via function based on request page
+
------------------------------
Changelog v.1.11 RC 3
------------------------------
Modified: XoopsModules/smallworld/trunk/smallworld/editprofile.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-03-07 03:53:13 UTC (rev 9103)
@@ -318,7 +318,7 @@
$xoopsTpl->assign('smallworld_user_website',$r['website']);
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js');
- $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css');
}
} else {
redirect_header("register.php", 1);
Modified: XoopsModules/smallworld/trunk/smallworld/galleryshow.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-03-07 03:53:13 UTC (rev 9103)
@@ -27,15 +27,12 @@
if ($xoopsUser) {
$xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/galleriffic-5.css');
- $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/basic.css');
- $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/black.css');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.galleriffic.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.history.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.opacityrollover.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/gallery_mod.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js');
- $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js');
- $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js');
$id = $xoopsUser->getVar('uid');
$check = new SmallWorldUser;
Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-07 03:53:13 UTC (rev 9103)
@@ -145,9 +145,14 @@
$yearDiff = date("Y") - $year;
$monthDiff = date("m") - $month;
$dayDiff = date("d") - $day;
- if ($dayDiff < 0 || $monthDiff < 0) {
- $yearDiff--;
+ if ($MonthDiff == 0){
+ if($DayDiff < 0) {
+ $YearDiff--;
+ }
}
+ if ($MonthDiff < 0){
+ $YearDiff--;
+ }
return $yearDiff;
}
@@ -853,4 +858,211 @@
} else {
return false;
}
- }
\ No newline at end of file
+ }
+
+ /**
+ * @Set css and js includes in pages based on $p = page
+ * @param string $p
+ * @returns void
+ */
+ function smallworld_includeHeader($p='')
+ {
+ global $xoTheme,$xoopsUser,$xoopsConfig;
+ if ($xoopsUser) {
+ $module_handler =& xoops_gethandler('module');
+ $module = $module_handler->getByDirname('smallworld');
+ $config_handler =& xoops_gethandler('config');
+ if ($module) {
+ $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
+ }
+ //Check Language
+ $lang = $xoopsConfig['language'];
+ // check geolocation style
+ if(isset($moduleConfig['geolocate'])) {
+ $geolocate = $moduleConfig['geolocate'];
+ }
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/base/jquery.ui.all.css');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css');
+
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.7.1.min.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js');
+
+ $xoops_url= XOOPS_URL;
+ $myid = $xoopsUser->getVar('uid');
+ // GET various variables from language folder
+ if (file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/'.$lang.'/js/variables.js')) {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/variables.js');
+ } else {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/variables.js');
+ }
+
+ // Check if USER is smallworld-registered user
+ $chkUser = new SmallWorldUser;
+ $ChkProf = $chkUser->CheckIfProfile($myid);
+
+ // Check if there are requests pending
+ $count_invit = count($chkUser->getRequests($myid));
+
+ // Get module config for validation and place in javascript
+ $validate = $moduleConfig['validationstrenght'];
+
+ // Check to see if smallworld should use username links to point to default xoops or smallworld
+ $takeoverlinks = $moduleConfig['takeoveruserlinks'];
+ $fieldstoshow = array_flip(smallworld_GetModuleOption('smallworldusethesefields', $repmodule='smallworld'));
+ $useverification = smallworld_GetModuleOption('smallworldmandatoryfields', $repmodule='smallworld');
+ $smallworldUV = implode(',', $useverification);
+
+ // Get users messages count based on users followerArray
+ $getUserMsgNum = smallworld_getCountFriendMessagesEtc ();
+
+
+ // Set javascript vars but only if not already defined.
+ // Check prevents multible loads
+ $script = "if (myID === undefined) {"."\n";
+ $script .= "var smallworld_url = '" . $xoops_url . "/modules/smallworld/" . "';\n";
+ $script .= "var smallworld_uploaddir = '" . $xoops_url . "/uploads/avatars/" . "';\n";
+ $script .= "var xoops_smallworld = jQuery.noConflict();\n";
+ $script .= "var myID = " . $myid . ";\n";
+ $script .= "var userHasProfile = " . $ChkProf . ";\n";
+ $script .= "var smallworldTakeOverLinks = " . $takeoverlinks . ";\n";
+ $script .= "var geoL = " . $geolocate . ";\n";
+ $script .= "var geocomplete = '';\n";
+ $script .= "var smallworldVerString = '" . $smallworldUV . "';\n";
+ $script .= "var smallworlduseverification = new Array();\n";
+ $script .= "smallworlduseverification = smallworldVerString.split(',');\n";
+ $script .= "var hasmessages = " . $count_invit . ";\n";
+ $script .= "var smallworldvalidationstrenght = " . $validate . ";\n";
+ $script .= "var smallworld_getFriendsMsgComCount = " . $getUserMsgNum . ";\n";
+ $script .= "var $ = jQuery();\n";
+ $script .= "} else {"."\n";
+ $script .= "\n";
+ $script .= "}"."\n";
+ $xoTheme->addScript('','',$script);
+
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/smallworld.js');
+
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.countdown.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css');
+
+
+ if ($p == 'register' || $p == 'editprofile') {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validate.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validation.functions.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.stepy.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js');
+ // Include geolocate styling
+ if ($geolocate != 1) {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname_now.js');
+ } else {
+ $xoTheme->addScript("http://maps.google.com/maps/api/js?sensor=false&language="._LANGCODE);
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete_now.js');
+ }
+ if (file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/'
+ . $lang . '/js/jquery.ui.datepicker-language.js')
+ ) {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'
+ . $lang.'/js/jquery.ui.datepicker-language.js'
+ );
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'
+ . $lang.'/js/jquery.countdown.js'
+ );
+ } else {
+ $xoTheme->addScript(XOOPS_URL
+ . '/modules/smallworld/language/english/js/jquery.ui.datepicker-language.js'
+ );
+ $xoTheme->addScript(XOOPS_URL
+ . '/modules/smallworld/language/english/js/jquery.countdown.js'
+ );
+ }
+ }
+ if ($p == 'index') {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ajaxupload.3.5.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js');
+ // Include geolocate styling
+ if ($geolocate != 1) {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname_now.js');
+ } else {
+ $xoTheme->addScript("http://maps.google.com/maps/api/js?sensor=false&language="._LANGCODE);
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete_now.js');
+ }
+
+ }
+ if ($p == 'gallery') {
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/galleriffic-5.css');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/basic.css');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/black.css');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.galleriffic.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.history.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.opacityrollover.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/gallery_mod.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js');
+ }
+
+ if ($p == 'imageupload') {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-uix.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-ui.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/upload_application.js');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/jquery.fileupload-ui.css');
+ }
+
+ if ($p == 'userprofile' || $p == 'friends') {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/apprise-1.5.full.js');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/jquery.fileupload-ui.css');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ajaxupload.3.5.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js');
+ // Include geolocate styling
+ if ($geolocate != 1) {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname_now.js');
+ } else {
+ $xoTheme->addScript("http://maps.google.com/maps/api/js?sensor=false&language="._LANGCODE);
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete_now.js');
+ }
+
+ }
+
+ if ($p == 'perma' || $p == 'share') {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js');
+ }
+
+ }//end if user
+}
+
+ /**
+ * @Get url of smallworld
+ * @returns string
+ */
+ function smallworld_getHostRequest()
+ {
+ $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https';
+ $host = $_SERVER['HTTP_HOST'];
+ $script = $_SERVER['SCRIPT_NAME'];
+ $params = $_SERVER['QUERY_STRING'];
+ $currentUrl = $protocol . '://' . $host;
+ return $currentUrl;
+ }
\ No newline at end of file
Modified: XoopsModules/smallworld/trunk/smallworld/index.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/index.php 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-03-07 03:53:13 UTC (rev 9103)
@@ -143,7 +143,7 @@
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js');
$xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js');
- $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css');
} else {
redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
}
Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-07 03:53:13 UTC (rev 9103)
@@ -196,7 +196,8 @@
// Steps for registration and submitbutton name using
// formToWizzard.js
- xoops_smallworld(function() {
+ if (xoops_smallworld("#smallworld_profileform").length > 0) {
+ xoops_smallworld(function() {
xoops_smallworld('#smallworld_profileform').stepy({
backLabel: SmallworldValidationBackButton,
block: true,
@@ -207,22 +208,37 @@
titleClick: false
});
});
+ }
// Attach geolocate autocomplete to forms
- if (geoL === 1) {
- xoops_smallworld('#birthplace').geo_autocomplete();
- xoops_smallworld('#present_city').geo_autocomplete_now();
- } else {
- // do something or not
- }
+ xoops_smallworld(function() {
+ if (geoL === 1) {
+ if (xoops_smallworld("#birthplace").length > 0) {
+ xoops_smallworld('#birthplace').geo_autocomplete();
+ }
+ if (xoops_smallworld("#present_city").length > 0){
+ xoops_smallworld('#present_city').geo_autocomplete_now();
+ }
+ } else {
+ // do something or not
+ }
+ });
+
// Make Textareas elastic
- xoops_smallworld(function() {
- xoops_smallworld('.favourites, .smallworld_comment, #smallworld_update, #smallworld_update_profile').elastic();
- xoops_smallworld('.smallworld_comment').css('max-width', xoops_smallworld('.smallworld_stcommentbody').outerWidth() - 90 + 'px');
- xoops_smallworld('#smallworld_update').css('max-width', xoops_smallworld('#smallworld_wall_container').outerWidth() - 30 + 'px');
+ if (xoops_smallworld(".favourites").length > 0 ||
+ xoops_smallworld(".smallworld_comment").length > 0 ||
+ xoops_smallworld("#smallworld_update").length > 0 ||
+ xoops_smallworld("#smallworld_update_profile").length > 0
+ )
+ {
+ xoops_smallworld(function() {
+ xoops_smallworld('.favourites, .smallworld_comment, #smallworld_update, #smallworld_update_profile').elastic();
+ xoops_smallworld('.smallworld_comment').css('max-width', xoops_smallworld('.smallworld_stcommentbody').outerWidth() - 90 + 'px');
+ xoops_smallworld('#smallworld_update').css('max-width', xoops_smallworld('#smallworld_wall_container').outerWidth() - 30 + 'px');
- });
+ });
+ }
// Toggle the form 'partner' if choosen status is married, in relationship, complicated
xoops_smallworld(function() {
@@ -564,8 +580,8 @@
// Sharing bookmarks defines
xoops_smallworld(function () {
- xoops_smallworld('.share').live('click',function() {
- // e.preventDefault();
+ xoops_smallworld('.share').live('click',function(e) {
+ e.preventDefault();
var id = xoops_smallworld(this).attr('id');
var ref = xoops_smallworld('span[name="' + id + '"]').attr('rel');
var desc = xoops_smallworld('span[name="' + id + '"]').attr('rel1');
@@ -900,6 +916,7 @@
xoops_smallworld('#smallworld_profileform-next-0').show();
xoops_smallworld('#smallworld_profileform-next-1').show();
}
+ return false;
}
function attachAvatarOpen () {
@@ -931,4 +948,5 @@
};
}); //close click
});
+ return false;
}
\ No newline at end of file
Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.ui.datepicker-language.js
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.ui.datepicker-language.js 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.ui.datepicker-language.js 2012-03-07 03:53:13 UTC (rev 9103)
@@ -1,29 +1,24 @@
/* http://keith-wood.name/datepick.html
Danish localisation for jQuery Datepicker.
- Written by Jan Christensen ( del...@gm...). */
-(function($) {
- $.datepick.regional['da'] = {
- monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
+ Written by Culex <cu...@cu...> */
+jQuery(function(xoops_smallworld){
+ xoops_smallworld.datepicker.regional['da-DK'] = {
+ closeText: 'Luk', closeStatus: 'Luk uden ændringer',
+ prevText: '<Forrige', prevStatus: 'Vis forrige måned',
+ prevJumpText: '<<', prevJumpStatus: '',
+ currentText: 'Idag', currentStatus: 'Vis aktuel måned',
+ monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
'Juli','August','September','Oktober','November','December'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
'Jul','Aug','Sep','Okt','Nov','Dec'],
dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
- dateFormat: 'dd-mm-yyyy', firstDay: 0,
- renderer: $.datepick.defaultRenderer,
- prevText: '<Forrige', prevStatus: 'Vis forrige måned',
- prevJumpText: '<<', prevJumpStatus: '',
- nextText: 'Næste>', nextStatus: 'Vis næste måned',
- nextJumpText: '>>', nextJumpStatus: '',
- currentText: 'Idag', currentStatus: 'Vis aktuel måned',
- todayText: 'Idag', todayStatus: 'Vis aktuel måned',
- clearText: 'Nulstil', clearStatus: 'Nulstil den aktuelle dato',
- closeText: 'Luk', closeStatus: 'Luk uden ændringer',
- yearStatus: 'Vis et andet år', monthStatus: 'Vis en anden måned',
- weekText: 'Uge', weekStatus: 'Årets uge',
- dayStatus: 'Vælg D, M d', defaultStatus: 'Vælg en dato',
- isRTL: false
- };
- $.datepick.setDefaults($.datepick.regional['da']);
-})(jQuery);
\ No newline at end of file
+ weekHeader: 'Ug',
+ dateFormat: 'dd-mm-yyyy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ xoops_smallworld.datepicker.setDefaults(xoops_smallworld.datepicker.regional['da-DK']);
+});
Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js 2012-03-07 03:53:13 UTC (rev 9103)
@@ -10,6 +10,9 @@
var _smallworldCancel = "Afbryd";
var _smallworldClose = "Luk";
+var _smallworldCommentsMoreMore = "..Vis mere";
+var _smallworldCommentsMoreLess = "..vis mindre";
+
var SmallworldGenderError = "Vælg dit køn";
var SmallworldBirthdayError = "Vælg din fødselsdag";
var SmallworldEmailError = "Skriv venligst mindst eén email";
Modified: XoopsModules/smallworld/trunk/smallworld/preloads/core.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-03-07 03:53:13 UTC (rev 9103)
@@ -43,17 +43,15 @@
}
$xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/base/jquery.ui.all.css');
- $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css');
- $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.7.1.min.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js');
- $xoops_url= XOOPS_URL;
$myid = $xoopsUser->getVar('uid');
// GET various variables from language folder
- if (file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/js/'.$lang.'/variables.js')) {
- $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/variables.js');
+ if (file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/variables.js')) {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/variables.js');
} else {
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/variables.js');
}
@@ -77,9 +75,16 @@
// Get users messages count based on users followerArray
$getUserMsgNum = smallworld_getCountFriendMessagesEtc ();
-
+ // Check if request url is with www or without
+ $urltest = smallworld_getHostRequest();
+ $xoops_url = XOOPS_URL;
+ if (!strstr($urltest, 'www.')) {
+ $xoops_url = str_replace( 'www.', '', $xoops_url );
+ }
+
// Set javascript vars but only if not already defined.
- // Check prevents multible loads
+ // Check prevents multible loads
+
$script = "if (myID === undefined) {"."\n";
$script .= "var smallworld_url = '" . $xoops_url . "/modules/smallworld/" . "';\n";
$script .= "var smallworld_uploaddir = '" . $xoops_url . "/uploads/avatars/" . "';\n";
@@ -106,13 +111,14 @@
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validation.functions.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.stepy.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.countdown.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js');
- if ( file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/js/'.$lang.'/jquery.ui.datepicker-language.js')) {
- $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/jquery.ui.datepicker-language.js');
- $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/jquery.countdown.js');
+ if ( file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/jquery.ui.datepicker-language.js')) {
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/jquery.ui.datepicker-language.js');
+ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/jquery.countdown.js');
} else {
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/jquery.ui.datepicker-language.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/jquery.countdown.js');
Modified: XoopsModules/smallworld/trunk/smallworld/register.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/register.php 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/register.php 2012-03-07 03:53:13 UTC (rev 9103)
@@ -289,7 +289,7 @@
$xoopsTpl->assign('smallworld_save',_SMALLWORLD_SUBMIT);
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js');
- $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css');
}
} else {
redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-03-07 03:53:13 UTC (rev 9103)
@@ -38,7 +38,7 @@
</div>
<{/section}>
<script type="text/javascript">
-xoops_smallworld(document).ready(function() {
+xoops_smallworld(document).ready(function(){
smallworldCheckNumDivs();
attachAvatarOpen();
});
Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-03-07 03:53:13 UTC (rev 9103)
@@ -121,7 +121,7 @@
<br><br>
<{/foreach}>
<script type="text/javascript">
-xoops_smallworld(document).ready(function() {
+xoops_smallworld(document).ready(function(){
smallworldCheckNumDivs();
attachAvatarOpen();
});
Modified: XoopsModules/smallworld/trunk/smallworld/templates/getmore.html
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-03-07 03:53:13 UTC (rev 9103)
@@ -115,7 +115,7 @@
<a href="javascript:void(0)" class="smallworld_msg_counter" rel="<{$pagename}>" id="<{$post.msg_id}>">MORE</a>
<br><br>
<script type="text/javascript">
-xoops_smallworld(document).ready(function() {
+xoops_smallworld(document).ready(function(){
smallworldCheckNumDivs();
attachAvatarOpen();
});
Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-03-07 03:53:13 UTC (rev 9103)
@@ -292,7 +292,9 @@
<div id="smallworld_inspection_desc"><{$smarty.const._SMALLWORLD_INSPEC_DESC}>
<p id = "clock-<{$ownerofpage}>"></p>
<script type='text/javascript'>
- xoops_smallworld('#clock-<{$ownerofpage}>').countdown({onExpiry:smallworldRefresh,until: +<{$inspecttime}>});
+ xoops_smallworld(document).ready(function(){
+ xoops_smallworld('#clock-<{$ownerofpage}>').countdown({onExpiry:smallworldRefresh,until: +<{$inspecttime}>});
+ });
</script>
</div>
</div>
Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-03-06 17:45:59 UTC (rev 9102)
+++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-03-07 03:53:13 UTC (rev 9103)
@@ -220,7 +220,7 @@
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js');
$xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js');
- $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css');
+ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css');
//Check Language
$lang = $xoopsConfig['language'];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|