diff --git a/app.js b/app.js index 70d9baa41e..db4c306d66 100644 --- a/app.js +++ b/app.js @@ -105,7 +105,8 @@ function start() { winston.info('Time: ' + new Date()); winston.info('Initializing NodeBB v' + pkg.version); winston.info('* using configuration stored in: ' + configFile); - winston.info('* using ' + nconf.get('database') +' store at ' + nconf.get(nconf.get('database') + ':host') + ':' + nconf.get(nconf.get('database') + ':port')); + var host = nconf.get(nconf.get('database') + ':host'); + winston.info('* using ' + nconf.get('database') +' store at ' + host + (host.indexOf('/') === -1 ? ':' + nconf.get(nconf.get('database') + ':port') : '')); winston.info('* using themes stored in: ' + nconf.get('themes_path')); if (process.env.NODE_ENV === 'development') { diff --git a/package.json b/package.json index b3e7350f72..083db7f7a0 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "rss": "~0.2.0", "prompt": "~0.2.11", "uglify-js": "~2.4.0", - "validator": "~3.2.1", + "validator": "^3.4.0", "cron": "~1.0.1", "semver": "~2.2.1", "string": "~1.7.0", diff --git a/public/language/en_GB/reset_password.json b/public/language/en_GB/reset_password.json index 468bfb0254..27537ffdf2 100644 --- a/public/language/en_GB/reset_password.json +++ b/public/language/en_GB/reset_password.json @@ -8,6 +8,7 @@ "new_password": "New Password", "repeat_password": "Confirm Password", "enter_email": "Please enter your email address and we will send you an email with instructions on how to reset your account.", + "enter_email_address": "Enter Email Address", "password_reset_sent": "Password Reset Sent", "invalid_email": "Invalid Email / Email does not exist!" } diff --git a/public/language/nl/global.json b/public/language/nl/global.json index cf6a683825..d44cdf7098 100644 --- a/public/language/nl/global.json +++ b/public/language/nl/global.json @@ -10,16 +10,16 @@ "500.message": "Oeps! Het lijkt erop dat iets is fout gegaan!", "register": "Registeren", "login": "Inloggen", - "please_log_in": "Please Log In", - "posting_restriction_info": "Posting is currently restricted to registered members only, click here to log in.", - "welcome_back": "Welcome Back ", - "you_have_successfully_logged_in": "You have successfully logged in", + "please_log_in": "Log a.u.b. In", + "posting_restriction_info": "Reageren is momenteel beperkt tot geregistreerde leden, klik hier om in te loggen.", + "welcome_back": "Welkom Terug!", + "you_have_successfully_logged_in": "Je bent succesvol ingelogd", "logout": "Uitloggen", "logout.title": "Je bent nu uitgelogd.", "logout.message": "Je bent met succes uitgelogd van NodeBB", "save_changes": "Aanpassingen Opslaan", "close": "Sluiten", - "pagination": "Pagination", + "pagination": "Paginering", "header.admin": "Admin", "header.recent": "Recent", "header.unread": "Ongelezen", @@ -49,7 +49,7 @@ "posted": "geplaatst", "in": "in", "recentposts": "Recente Berichten", - "recentips": "Recently Logged In IPs", + "recentips": "Recente Ingelogde IPs", "online": "Online", "away": "Afwezig", "dnd": "Niet Storen", diff --git a/public/language/nl/notifications.json b/public/language/nl/notifications.json index 1b1b4bbf8c..6be3973ba7 100644 --- a/public/language/nl/notifications.json +++ b/public/language/nl/notifications.json @@ -1,6 +1,6 @@ { "title": "Notificaties", - "no_notifs": "You have no new notifications", + "no_notifs": "Je hebt geen nieuwe notificaties", "see_all": "Bekijk alle Notificaties", "back_to_home": "Terug naar NodeBB", "outgoing_link": "Uitgaande Link", diff --git a/public/language/nl/pages.json b/public/language/nl/pages.json index 15deb0556f..70897ad6f4 100644 --- a/public/language/nl/pages.json +++ b/public/language/nl/pages.json @@ -1,14 +1,14 @@ { "home": "Home", "unread": "Ongelezen Onderwerpen", - "popular": "Popular Topics", + "popular": "Populaire Onderwerpen", "recent": "Recente Onderwerpen", "users": "Geregistreerde Gebruikers", "notifications": "Notificaties", "user.edit": "\"%1\" aanpassen", "user.following": "Mensen %1 Volgt", "user.followers": "Mensen die %1 Volgen", - "user.posts": "Posts made by %1", + "user.posts": "Berichten geplaatst door %1", "user.favourites": "%1's Favoriete Berichten", "user.settings": "Gebruikersinstellingen" } \ No newline at end of file diff --git a/public/language/nl/topic.json b/public/language/nl/topic.json index 3331b7fcf1..033ac94a11 100644 --- a/public/language/nl/topic.json +++ b/public/language/nl/topic.json @@ -11,7 +11,7 @@ "reply": "Reageren", "edit": "Aanpassen", "delete": "Verwijderen", - "restore": "Restore", + "restore": "Herstellen", "move": "Verplaatsen", "fork": "Fork", "banned": "verbannen", @@ -19,17 +19,17 @@ "share": "Delen", "tools": "Gereedschap", "flag": "Markeren", - "bookmark_instructions": "Click here to return to your last position or close to discard.", + "bookmark_instructions": "Klik hier om terug te gaan naar je laatste positie of sluiten om te annuleren.", "flag_title": "Dit bericht markeren voor moderatie", "deleted_message": "Dit onderwerp is verwijderd. Alleen gebruikers met onderwerp management privileges kunnen dit onderwerp zien.", - "following_topic.title": "Following Topic", - "following_topic.message": "You will now be receiving notifications when somebody posts to this topic.", - "not_following_topic.title": "Not Following Topic", - "not_following_topic.message": "You will no longer receive notifications from this topic.", - "login_to_subscribe": "Please register or log in in order to subscribe to this topic.", - "markAsUnreadForAll.success": "Topic marked as unread for all.", - "watch": "Watch", - "share_this_post": "Share this Post", + "following_topic.title": "Volg Onderwerp", + "following_topic.message": "Je zult nu notificaties ontvangen wanneer iemand reageert op dit onderwerp.", + "not_following_topic.title": "Volgt Onderwerp Niet", + "not_following_topic.message": "Je zult niet langer notificaties ontvangen van dit onderwerp.", + "login_to_subscribe": "Log a.u.b. in om op dit onderwerp te abonneren.", + "markAsUnreadForAll.success": "Onderwerp gemarkeerd als gelezen voor iedereen.", + "watch": "Volgen", + "share_this_post": "Deel dit Bericht", "thread_tools.title": "Thread Gereedschap", "thread_tools.markAsUnreadForAll": "Ongelezen Markeren", "thread_tools.pin": "Onderwerp Vastmaken", @@ -71,12 +71,12 @@ "composer.submit": "Opslaan", "composer.replying_to": "Reageren op", "composer.new_topic": "Nieuw Onderwerp", - "composer.uploading": "uploading...", - "composer.thumb_url_label": "Paste a topic thumbnail URL", - "composer.thumb_title": "Add a thumbnail to this topic", + "composer.uploading": "uploaden...", + "composer.thumb_url_label": "Plak een onderwerp thumbnail URL", + "composer.thumb_title": "Voeg een thumbnail toe aan dit onderwerp", "composer.thumb_url_placeholder": "http://example.com/thumb.png", - "composer.thumb_file_label": "Or upload a file", - "composer.thumb_remove": "Clear fields", - "composer.drag_and_drop_images": "Drag and Drop Images Here", - "composer.upload_instructions": "Upload images by dragging & dropping them." + "composer.thumb_file_label": "Of upload een bestand", + "composer.thumb_remove": "Velden leegmaken", + "composer.drag_and_drop_images": "Sleep en Zet Afbeeldingen Hier", + "composer.upload_instructions": "Upload afbeeldingen door ze te slepen." } \ No newline at end of file diff --git a/public/language/nl/user.json b/public/language/nl/user.json index ec931aee06..05e0c6f67c 100644 --- a/public/language/nl/user.json +++ b/public/language/nl/user.json @@ -20,19 +20,19 @@ "gravatar": "Gravatar", "birthday": "Verjaardag", "chat": "Chat", - "follow": "Follow", - "unfollow": "Unfollow", + "follow": "Volgen", + "unfollow": "Ontvolgen", "change_picture": "Afbeelding Aanpassen", "edit": "Aanpassen", "uploaded_picture": "Afbeelding Uploaden", "upload_new_picture": "Nieuwe Afbeelding Uploaden", - "current_password": "Current Password", + "current_password": "Huidige Wachtwoord", "change_password": "Wachtwoord Aanpassen", "confirm_password": "Bevestig Wachtwoord", "password": "Wachtwoord", "upload_picture": "Afbeelding Uploaden", "upload_a_picture": "Upload een afbeelding", - "image_spec": "You may only upload PNG, JPG, or GIF files", + "image_spec": "Je mag alleen PNG, JPG, of GIF bestanden uploaden.", "max": "max.", "settings": "Instellingen", "show_email": "Laat Mijn Email Zien", @@ -41,7 +41,7 @@ "has_no_posts": "Deze gebruiker heeft nog geen berichten geplaatst", "email_hidden": "Email Verborgen", "hidden": "verborgen", - "paginate_description": "Paginate topics and posts instead of using infinite scroll.", - "topics_per_page": "Topics per Page", - "posts_per_page": "Posts per Page" + "paginate_description": "Blader door onderwerpen en berichten in plaats van oneindig scrollen.", + "topics_per_page": "Onderwerpen per Pagina", + "posts_per_page": "Berichten per Pagina" } \ No newline at end of file diff --git a/public/src/forum/admin/categories.js b/public/src/forum/admin/categories.js index 2bcc541cd8..144adfd26a 100644 --- a/public/src/forum/admin/categories.js +++ b/public/src/forum/admin/categories.js @@ -252,6 +252,7 @@ define(['uploader'], function(uploader) { var numResults = results.length, resultObj; + resultsEl.html(''); for(var x = 0; x < numResults; x++) { resultObj = results[x]; liEl = $('
  • ') @@ -303,7 +304,9 @@ define(['uploader'], function(uploader) { } var numResults = results.length, trEl, - resultObj; + resultObj; + + groupsResultsEl.empty(); for(var x = 0; x < numResults; x++) { resultObj = results[x]; @@ -346,12 +349,14 @@ define(['uploader'], function(uploader) { readMembers = modalEl.find('#category-permissions-read'), writeMembers = modalEl.find('#category-permissions-write'), moderatorsEl = modalEl.find('#category-permissions-mods'); + socket.emit('admin.categories.getPrivilegeSettings', cid, function(err, privilegeList) { var readLength = privilegeList['+r'].length, writeLength = privilegeList['+w'].length, modLength = privilegeList['mods'].length, liEl, x, userObj; + readMembers.html(''); if (readLength > 0) { for(x = 0; x < readLength; x++) { userObj = privilegeList['+r'][x]; @@ -363,10 +368,11 @@ define(['uploader'], function(uploader) { readMembers.append(liEl); } + writeMembers.html(''); if (writeLength > 0) { for(x=0;x').attr('data-uid', userObj.uid).html(''); + liEl = $('
  • ').attr('data-uid', userObj.uid).html(''); writeMembers.append(liEl); } } else { @@ -374,6 +380,7 @@ define(['uploader'], function(uploader) { writeMembers.append(liEl); } + moderatorsEl.html(''); if (modLength > 0) { for(x = 0;x < modLength; x++) { userObj = privilegeList['mods'][x]; @@ -382,7 +389,7 @@ define(['uploader'], function(uploader) { } } else { liEl = $('
  • ').addClass('empty').html('No moderators'); - moderatorsEl.appendChild(liEl); + moderatorsEl.append(liEl); } }); }; diff --git a/public/src/forum/admin/groups.js b/public/src/forum/admin/groups.js index 970822fa73..811bc3c17b 100644 --- a/public/src/forum/admin/groups.js +++ b/public/src/forum/admin/groups.js @@ -24,9 +24,9 @@ define(function() { createSubmitBtn.on('click', function() { var submitObj = { - name: createNameEl.val(), - description: $('#create-group-desc').val() - }, + name: createNameEl.val(), + description: $('#create-group-desc').val() + }, errorEl = $('#create-modal-error'), errorText; @@ -91,8 +91,9 @@ define(function() { groupMembersEl.empty(); for (x = 0; x < numMembers; x++) { var memberIcon = $('
  • ') + .attr('data-uid', groupObj.members[x].uid) .append($('').attr('src', groupObj.members[x].picture)) - .append($('').attr('data-uid', groupObj.members[x].uid).html(groupObj.members[x].username)); + .append($('').html(groupObj.members[x].username)); groupMembersEl.append(memberIcon); } } @@ -152,7 +153,7 @@ define(function() { uid: uid }, function(err, data) { if (!err) { - groupMembersEl.append(userLabel.cloneNode(true)); + groupMembersEl.append(userLabel.clone(true)); } }); } @@ -164,10 +165,6 @@ define(function() { socket.emit('admin.groups.get', gid, function(err, groupObj){ if (!err){ - if (groupObj.name == 'Administrators' && uid == yourid){ - bootbox.alert('You cannot remove yourself from the Administrator Group'); - return; - } bootbox.confirm('Are you sure you want to remove this user?', function(confirm) { if (confirm){ socket.emit('admin.groups.leave', { diff --git a/public/src/forum/search.js b/public/src/forum/search.js index 71ed19b69f..3d3c72389e 100644 --- a/public/src/forum/search.js +++ b/public/src/forum/search.js @@ -3,14 +3,14 @@ define(function() { Search.init = function() { var searchQuery = $('#topic-results').attr('data-search-query'); - $('.search-result-text').children().each(function() { - var text = $(this).text(); + + $('.search-result-text').each(function() { + var text = $(this).html(); var regex = new RegExp(searchQuery, 'gi'); text = text.replace(regex, '' + searchQuery + ''); $(this).html(text); }); - $('#search-form input').val(searchQuery); $('#mobile-search-form').off('submit').on('submit', function() { diff --git a/public/src/forum/unread.js b/public/src/forum/unread.js index 9829ca7a25..ac9b275a68 100644 --- a/public/src/forum/unread.js +++ b/public/src/forum/unread.js @@ -12,8 +12,17 @@ define(['forum/recent'], function(recent) { recent.watchForNewPosts(); $('#mark-allread-btn').on('click', function() { + function getUnreadTids() { + var tids = []; + $('#topics-container .category-item[data-tid]').each(function() { + tids.push($(this).attr('data-tid')); + }); + return tids; + } + var btn = $(this); - socket.emit('topics.markAllRead', function(err) { + + socket.emit('topics.markAllRead', getUnreadTids(), function(err) { if(err) { return app.alertError('There was an error marking topics read!'); } diff --git a/public/templates/admin/index.tpl b/public/templates/admin/index.tpl index 3fac2b0917..21e1578cd3 100644 --- a/public/templates/admin/index.tpl +++ b/public/templates/admin/index.tpl @@ -1,4 +1,5 @@
    +
    Welcome to NodeBB
    @@ -11,32 +12,19 @@

    -
    -
    +
    -
    Updates
    +
    Notices
    -
    -

    You are running NodeBB v{version}.

    +
    + Emailer Installed +
    +
    + Search Plugin Installed
    -

    - Always make sure that your NodeBB is up to date for the latest security patches and bug fixes. -

    -

    - -

    -
    -
    -
    -
    -
    -
    Active Users socket connections
    -
    -
    -
    -
    +
    Unique Visitors
    @@ -60,5 +48,32 @@
    + +
    + + +
    +
    +
    Updates
    +
    +
    +

    You are running NodeBB v{version}.

    +
    +

    + Always make sure that your NodeBB is up to date for the latest security patches and bug fixes. +

    +

    + +

    +
    +
    + +
    +
    Active Users socket connections
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/public/templates/reset.tpl b/public/templates/reset.tpl index bcc4d4d931..c7107315f0 100644 --- a/public/templates/reset.tpl +++ b/public/templates/reset.tpl @@ -8,7 +8,7 @@
    - [[reset_password:reset_password:enter_email]] + [[reset_password:enter_email]]
    @@ -21,7 +21,7 @@ [[reset_password:invalid_email]]
    - +
    diff --git a/public/templates/reset_code.tpl b/public/templates/reset_code.tpl index c3590746d4..19bce3ad1c 100644 --- a/public/templates/reset_code.tpl +++ b/public/templates/reset_code.tpl @@ -27,9 +27,9 @@ -
    +
    -
    +
    diff --git a/public/templates/search.tpl b/public/templates/search.tpl index 55a3b57443..393a6d7e04 100644 --- a/public/templates/search.tpl +++ b/public/templates/search.tpl @@ -13,7 +13,7 @@ -