diff --git a/cms/config/db_settings.conf.php b/cms/config/db_settings.conf.php index dd850dc..a90a771 100644 --- a/cms/config/db_settings.conf.php +++ b/cms/config/db_settings.conf.php @@ -19,26 +19,25 @@ $db_settings['db_userdata_file'] = 'cms/data/userdata.sqlite'; $db_settings['userdata_table'] = 'phpsqlitecms_userdata'; /* - // PostgreSQL: -$db_settings['type'] = 'postgresql'; +$db_settings['type'] = 'postgresql'; -$db_settings['host'] = 'localhost'; -$db_settings['port'] = 5432; -$db_settings['user'] = 'user'; -$db_settings['password'] = 'password'; -$db_settings['database'] = 'phpsqlitecms'; +$db_settings['host'] = 'localhost'; +$db_settings['port'] = 5432; +$db_settings['user'] = 'user'; +$db_settings['password'] = 'password'; +$db_settings['database'] = 'phpsqlitecms'; -$db_settings['settings_table'] = 'phpsqlitecms_settings'; -$db_settings['pages_table'] = 'phpsqlitecms_pages'; -$db_settings['menu_table'] = 'phpsqlitecms_menus'; -$db_settings['gcb_table'] = 'phpsqlitecms_gcb'; -$db_settings['news_table'] = 'phpsqlitecms_news'; -$db_settings['news_table'] = 'phpsqlitecms_news'; -$db_settings['notes_table'] = 'phpsqlitecms_notes'; -$db_settings['photo_table'] = 'phpsqlitecms_photos'; -$db_settings['banlists_table'] = 'phpsqlitecms_banlists'; -$db_settings['comment_table'] = 'phpsqlitecms_comments'; -$db_settings['userdata_table'] = 'phpsqlitecms_userdata'; +$db_settings['settings_table'] = 'phpsqlitecms_settings'; +$db_settings['pages_table'] = 'phpsqlitecms_pages'; +$db_settings['menu_table'] = 'phpsqlitecms_menus'; +$db_settings['gcb_table'] = 'phpsqlitecms_gcb'; +$db_settings['news_table'] = 'phpsqlitecms_news'; +$db_settings['news_table'] = 'phpsqlitecms_news'; +$db_settings['notes_table'] = 'phpsqlitecms_notes'; +$db_settings['photo_table'] = 'phpsqlitecms_photos'; +$db_settings['banlists_table'] = 'phpsqlitecms_banlists'; +$db_settings['comment_table'] = 'phpsqlitecms_comments'; +$db_settings['userdata_table'] = 'phpsqlitecms_userdata'; */ ?> diff --git a/cms/data/content.sqlite b/cms/data/content.sqlite index ea94131..a4b26a4 100644 Binary files a/cms/data/content.sqlite and b/cms/data/content.sqlite differ diff --git a/cms/data/entries.sqlite b/cms/data/entries.sqlite index 380a721..bdd18ff 100644 Binary files a/cms/data/entries.sqlite and b/cms/data/entries.sqlite differ diff --git a/cms/data/userdata.sqlite b/cms/data/userdata.sqlite index b1397bb..5db3599 100644 Binary files a/cms/data/userdata.sqlite and b/cms/data/userdata.sqlite differ diff --git a/cms/includes/functions.inc.php b/cms/includes/functions.inc.php index 01bafad..212b94c 100644 --- a/cms/includes/functions.inc.php +++ b/cms/includes/functions.inc.php @@ -5,7 +5,6 @@ function __autoload($class_name) require_once(BASE_PATH.'cms/includes/classes/'.$class_name.'.class.php'); } -/* if(get_magic_quotes_gpc()) { function stripslashes_deep($value) @@ -18,7 +17,6 @@ if(get_magic_quotes_gpc()) $_COOKIE = array_map('stripslashes_deep', $_COOKIE); $_REQUEST = array_map('stripslashes_deep', $_REQUEST); } -*/ function showme($what) { diff --git a/cms/templates/admin/main.tpl b/cms/templates/admin/main.tpl index d6a2509..5ecd8af 100644 --- a/cms/templates/admin/main.tpl +++ b/cms/templates/admin/main.tpl @@ -5,7 +5,7 @@ <?php echo $settings['website_title']; ?> - <?php echo $lang['administration']; if(isset($subtitle)) echo ' - ' . $subtitle; ?> - + @@ -45,7 +45,7 @@ - + diff --git a/cms/templates/admin/subtemplates/edit.inc.tpl b/cms/templates/admin/subtemplates/edit.inc.tpl index aef508f..73956bb 100644 --- a/cms/templates/admin/subtemplates/edit.inc.tpl +++ b/cms/templates/admin/subtemplates/edit.inc.tpl @@ -81,9 +81,9 @@
- - - + + +
@@ -407,7 +407,7 @@
- +
@@ -449,8 +449,27 @@ - - - - - + + + + diff --git a/cms/templates/admin/subtemplates/galleries_edit.inc.tpl b/cms/templates/admin/subtemplates/galleries_edit.inc.tpl index 710a0c1..c54d3c8 100644 --- a/cms/templates/admin/subtemplates/galleries_edit.inc.tpl +++ b/cms/templates/admin/subtemplates/galleries_edit.inc.tpl @@ -27,7 +27,7 @@ - <?php echo $item['title']; ?> + <?php echo htmlspecialchars($item['title']); ?> diff --git a/cms/templates/admin/subtemplates/galleries_edit_photo.inc.tpl b/cms/templates/admin/subtemplates/galleries_edit_photo.inc.tpl index 340af77..697f83e 100644 --- a/cms/templates/admin/subtemplates/galleries_edit_photo.inc.tpl +++ b/cms/templates/admin/subtemplates/galleries_edit_photo.inc.tpl @@ -30,7 +30,7 @@
- +
@@ -43,7 +43,7 @@
- +
@@ -89,5 +89,9 @@ - - + diff --git a/cms/templates/admin/subtemplates/modal_insert_gallery.tpl b/cms/templates/admin/subtemplates/modal_insert_gallery.tpl index b7f71b1..b99bfed 100644 --- a/cms/templates/admin/subtemplates/modal_insert_gallery.tpl +++ b/cms/templates/admin/subtemplates/modal_insert_gallery.tpl @@ -1,5 +1,3 @@ - diff --git a/cms/templates/admin/subtemplates/modal_insert_raw_image.tpl b/cms/templates/admin/subtemplates/modal_insert_raw_image.tpl index cc34f79..9a9a2b4 100644 --- a/cms/templates/admin/subtemplates/modal_insert_raw_image.tpl +++ b/cms/templates/admin/subtemplates/modal_insert_raw_image.tpl @@ -1,5 +1,3 @@ - diff --git a/cms/templates/default.tpl b/cms/templates/default.tpl index 9a48908..0cfbd24 100644 --- a/cms/templates/default.tpl +++ b/cms/templates/default.tpl @@ -7,7 +7,7 @@ - + @@ -46,7 +46,7 @@
  • -
  • +
  • @@ -99,7 +99,7 @@ - + @@ -107,8 +107,5 @@ - - - diff --git a/static/css/style.css b/static/css/style.css index cdc8c58..e5a2eaa 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -106,8 +106,8 @@ a.pdf { padding-left:23px; background-image:url(../img/p #mylightbox-title { position:absolute; top:3px; left:10px; width:90%; margin:0; padding:0; font-weight:bold; } #mylightbox-controls { position:absolute; top:5px; right:10px; width:14px; margin:0; padding:0; } #mylightbox #photo { margin:0; padding:0; } -#mylightbox-subtitle { font-size:14px; line-height:150%; margin:0; padding:3px 0 0 0; font-style:italic; color:#808080; } -#mylightbox-description { font-size:14px; line-height:150%; margin:0; padding:5px 0 8px 0; } +#mylightbox-subtitle { font-size:13px; line-height:150%; margin:5px 0 0 0; font-style:italic; color:#808080; } +#mylightbox-description { font-size:14px; line-height:150%; margin:5px 0 10px 0; } #mylightbox-author { color:#808080; font-size:13px; margin:-8px 0 0 0; padding:0 0 8px 0; } #mylightbox-throbber { width:32px; height:32px; margin:0 auto 0 auto; padding:100px 0; background:url(../img/throbber.gif) no-repeat center; } #mylightbox-photo { position:relative; } @@ -116,4 +116,4 @@ a.pdf { padding-left:23px; background-image:url(../img/p #mylightbox-next { width:25%; position:absolute; top:0; right:0; bottom:0; background:url(../img/next.png) no-repeat 1000px 0; z-index:10000; text-indent:-999em; outline:none; } #mylightbox-next:hover { background:url(../img/next.png) no-repeat 90% center, linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.2)); } #mylightbox-close { width:16px; height:16px; display:inline-block; text-indent:-999em; background:url(../img/close_button.png) no-repeat 0 0; outline:none; opacity:0.7; } -#mylightbox-close:hover { opacity:1; } +#mylightbox-close:hover { opacity:1; } diff --git a/static/css/style_admin.css b/static/css/style_admin.css index 612b7df..0ea0fa1 100644 --- a/static/css/style_admin.css +++ b/static/css/style_admin.css @@ -23,7 +23,6 @@ body { padding-top:70px; padding-bottom:50px; } textarea.html { font-family:monospace; } .nowrap { white-space:nowrap; } -.nomargin { margin:0; } .table th a { color:#000; text-decoration:none; white-space:nowrap; } .table th a .glyphicon { font-size:11px; padding-left:3px; } @@ -39,22 +38,20 @@ td.options { text-align:right; white-space:nowrap; } .sortable-handle { cursor:move; } #mylightbox-background { display:none; position:fixed; height:100%; width:100%; top:0; left:0; background:#000; border:1px solid #cecece; z-index:2000; } -#mylightbox { width:400px; display:none; position:absolute; background:#fff; z-index:2000; padding:3px 10px 0 10px; font-size:13px; border:1px solid #cecece; border-radius:5px; max-width:90%; height:auto; box-shadow:7px 7px 10px #333; } +#mylightbox { width:400px; display:none; position:absolute; background:#fff; z-index:2000; padding:3px 10px 0 10px; font-size:13px; border:1px solid #cecece; border-radius:5px; max-width:90%; height:auto; box-shadow:5px 5px 20px #000; } #mylightbox img { max-width:100%; height:auto; } -#mylightbox-header { height:20px; font-size:13px; line-height:20px; padding:0 0 3px 0; } -#mylightbox-title { position:absolute; top:2px; left:10px; width:40%; margin:0; padding:0; font-weight:bold; } -#mylightbox-nav { position:absolute; top:2px; left:40%; width:20%; margin:0; padding:0; text-align:center; float:left; white-space:nowrap; } -#mylightbox-controls { position:absolute; top:4px; right:10px; width:14px; margin:0; padding:0; } +#mylightbox-header { height:25px; font-size:13px; line-height:20px; padding:0 0 10px 0; } +#mylightbox-title { position:absolute; top:3px; left:10px; width:90%; margin:0; padding:0; font-weight:bold; } +#mylightbox-controls { position:absolute; top:5px; right:10px; width:14px; margin:0; padding:0; } #mylightbox #photo { margin:0; padding:0; } -#mylightbox-subtitle { font-size:14px; line-height:150%; margin:0; padding:3px 0 0 0; font-style:italic; color:#808080; } -#mylightbox-description { font-size:14px; line-height:150%; margin:0; padding:3px 0 8px 0; } +#mylightbox-subtitle { font-size:13px; line-height:150%; margin:5px 0 0 0; font-style:italic; color:#808080; } +#mylightbox-description { font-size:14px; line-height:150%; margin:5px 0 10px 0; } +#mylightbox-author { color:#808080; font-size:13px; margin:-8px 0 0 0; padding:0 0 8px 0; } #mylightbox-throbber { width:32px; height:32px; margin:0 auto 0 auto; padding:100px 0; background:url(../img/throbber.gif) no-repeat center; } -#mylightbox-prev { vertical-align:text-top; display:inline-block; width:16px; height:16px; margin:0; padding:0; background:url(../img/previous.png) no-repeat 0 0; } -#mylightbox-prev:hover { opacity:0.75; } -#mylightbox-next { vertical-align:text-top; display:inline-block; width:16px; height:16px; margin:0; padding:0; background:url(../img/next.png) no-repeat 0 0; } -#mylightbox-next:hover { opacity:0.75; } -#mylightbox-prev span, -#mylightbox-next span { display:none; } -#mylightbox-close { width:14px; height:14px; display:inline-block; text-indent:-999em; background:url(../img/close_button.png) no-repeat 0 0; outline:none; } -#mylightbox-close:hover { width:14px; height:14px; display:inline-block; text-indent:-999em; background:url(../img/close_button.png) no-repeat 0 -14px; outline:none; } - +#mylightbox-photo { position:relative; } +#mylightbox-prev { width:25%; position:absolute; top:0; left:0; bottom:0; background:url(../img/prev.png) no-repeat -1000px 0; z-index:10000; text-indent:-999em; outline:none; } +#mylightbox-prev:hover { background:url(../img/prev.png) no-repeat 10% center, linear-gradient(to left, rgba(0,0,0,0), rgba(0,0,0,0.2)); } +#mylightbox-next { width:25%; position:absolute; top:0; right:0; bottom:0; background:url(../img/next.png) no-repeat 1000px 0; z-index:10000; text-indent:-999em; outline:none; } +#mylightbox-next:hover { background:url(../img/next.png) no-repeat 90% center, linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.2)); } +#mylightbox-close { width:16px; height:16px; display:inline-block; text-indent:-999em; background:url(../img/close_button.png) no-repeat 0 0; outline:none; opacity:0.7; } +#mylightbox-close:hover { opacity:1; } diff --git a/static/js/admin_backend.js b/static/js/admin_backend.js index 4ea44a0..4dd26e9 100644 --- a/static/js/admin_backend.js +++ b/static/js/admin_backend.js @@ -16,9 +16,6 @@ obj.scrollTop = scrollTop; $(function() { - - - $("a[data-delete-confirm]").click(function(e) { e.preventDefault(); message = $(this).data('delete-confirm') ? decodeURIComponent($(this).data('delete-confirm')) : 'Delete?'; $(this).parents("tr").addClass('danger'); @@ -31,7 +28,6 @@ $("a[data-delete-confirm]").click(function(e) { e.preventDefault(); $("*[data-toggle-checkboxes]").click(function(e) { e.preventDefault(); var checkboxClass = $(this).data('toggle-checkboxes'); - //alert(checkboxClass); $('.'+checkboxClass).trigger('click'); }); @@ -50,6 +46,9 @@ $("*[data-sortable]").sortable({ start : function(e, ui) { ui.item.addClass("war -$('.modal-invoker').click(function(e) { insertTarget = $(this).data('input'); }); +$('.modal').on('show.bs.modal', function (e) { + $insertField = $(e.relatedTarget).data('insert'); +}); + }); diff --git a/static/js/main.js b/static/js/main.js index 01140b5..3bce4ff 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1,6 +1,5 @@ $(function() { -$('#carousel').carousel({ interval:8000 }); -$("#menu-toggle-handle").click(function(e) { $('#nav').slideToggle('fast', function() { /*$('#edit_page_image_box .handle').toggleClass('handle_active', $(this).is(':visible'));*/ } ); }); +$("#menu-toggle-handle").click(function(e) { $('#nav').slideToggle('fast'); }); }); diff --git a/static/js/mylightbox.js b/static/js/mylightbox.js index f790f74..444dee4 100644 --- a/static/js/mylightbox.js +++ b/static/js/mylightbox.js @@ -15,6 +15,7 @@ myLightboxSettings['html_box'] = '
    \
    '+myLightboxSettings['close_link']+'
    \
    \
    \ +

    \

    \

    \ '; @@ -121,6 +122,7 @@ function doit(e,t) var myLightboxLinks = new Array(); var srcs = new Array(); var titles = new Array(); + var subtitles = new Array(); var descriptions = new Array(); var authors = new Array(); @@ -131,6 +133,7 @@ function doit(e,t) myLightboxLinks.push($(this)); srcs.push($(this).attr('href')); titles.push($(this).find('img').attr('title')); + subtitles.push($(this).find('img').attr('data-subtitle')); descriptions.push($(this).find('img').attr('data-description')); authors.push($(this).find('img').attr('data-author')); }); @@ -138,6 +141,7 @@ function doit(e,t) var numberOfImages = myLightboxLinks.length; var src = srcs[mylightboxCurrent]; var title = titles[mylightboxCurrent]; + var subtitle = subtitles[mylightboxCurrent]; var description = descriptions[mylightboxCurrent]; var author = authors[mylightboxCurrent]; @@ -210,8 +214,28 @@ function doit(e,t) //$("#mylightbox-next").remove(); } + if(subtitle) + { + $("#mylightbox-subtitle").html(subtitle); + $("#mylightbox-subtitle").show(); + } + else + { + $("#mylightbox-subtitle").hide(); + } + $("#mylightbox-description").html(description); - $("#mylightbox-author").html(author); + + if(author) + { + $("#mylightbox-author").html(author); + $("#mylightbox-author").show(); + } + else + { + $("#mylightbox-author").hide(); + } + $("#mylightbox-photo").fadeIn("fast"); myLightboxCurrentWidth = objImagePreloader.width;