From 918d1b31fbfe8c510da9725516fbd47d38529b75 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Mon, 23 May 2016 14:12:03 +0100 Subject: [PATCH 01/12] Enter to submit now works with maths input field --- mod_shoutbox/tmpl/default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod_shoutbox/tmpl/default.php b/mod_shoutbox/tmpl/default.php index 3158d3c..aee58d0 100644 --- a/mod_shoutbox/tmpl/default.php +++ b/mod_shoutbox/tmpl/default.php @@ -369,7 +369,7 @@ class="" } else { - JJ_instance.on('keydown', '#jj_message', function(e) { + JJ_instance.on('keydown', '#jj_message, #math_output', function(e) { if (e.which === 13) { e.preventDefault(); From b2b6acb59f5a854cbca40817539b713312c2f260 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Mon, 23 May 2016 14:13:36 +0100 Subject: [PATCH 02/12] updated changelog --- changelog.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changelog.php b/changelog.php index 34c36ba..edf3bc8 100644 --- a/changelog.php +++ b/changelog.php @@ -14,6 +14,9 @@ - -> Removed ! -> Note +### WIP +^ Enter to submit now works on maths question input + Version 8.0.1 # Fixed PHP error when showing the shout date From 44f28e56e6655b0278e244f6d59d8bc1a9236629 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Mon, 23 May 2016 14:37:03 +0100 Subject: [PATCH 03/12] Move checks from layout to helper --- changelog.php | 1 + mod_shoutbox/helper.php | 36 ++++++++++++++++++---- mod_shoutbox/layouts/message.php | 51 ++++---------------------------- 3 files changed, 38 insertions(+), 50 deletions(-) diff --git a/changelog.php b/changelog.php index edf3bc8..9d1ba72 100644 --- a/changelog.php +++ b/changelog.php @@ -16,6 +16,7 @@ ### WIP ^ Enter to submit now works on maths question input +^ Move checks from layout to helper Version 8.0.1 # Fixed PHP error when showing the shout date diff --git a/mod_shoutbox/helper.php b/mod_shoutbox/helper.php index 4fde4d2..7a03bde 100644 --- a/mod_shoutbox/helper.php +++ b/mod_shoutbox/helper.php @@ -1125,18 +1125,23 @@ public function preRender($shout) $shout->when = JHtml::_('date', $shout->when['date'], $show_date . $show_time, true); } - $profile_link = $this->linkUser($this->params->get('profile'), $shout->name, $shout->user_id); + $profile = $this->params->get('profile'); + $shout->name = $this->linkUser($profile, $shout->name, $shout->user_id); + + // Strip from the username + if (in_array($profile, array(1, 2, 3, 4))) + { + $shout->name = strip_tags($shout->name); + } // Perform Smiley and BBCode filtering if required if ($bbcode == 1) { - $shout->msg = $this->bbcodeFilter($shout->msg); - $shout->name = $this->bbcodeFilter($profile_link); + $shout->msg = $this->bbcodeFilter($shout->msg); } else { - $shout->msg = nl2br($shout->msg); - $shout->name = $profile_link; + $shout->msg = nl2br($shout->msg); } return $shout; @@ -1158,12 +1163,33 @@ public function renderPost($shout, $layout = 'message') $shout = $this->preRender($shout); + // Create object for icons + $framework = $this->params->get('framework', 'bootstrap'); + $icon = new stdClass(); + + if ($framework == 'uikit') + { + $icon->edit = 'uk-icon-pencil-square-o'; + $icon->remove = 'uk-icon-times'; + } + else if ($framework == 'bootstrap3') + { + $icon->edit = 'glyphicon glyphicon-pencil'; + $icon->remove = 'glyphicon glyphicon-remove'; + } + else + { + $icon->edit = 'icon-pencil'; + $icon->remove = 'icon-remove'; + } + // Assemble the data together $data = array( 'post' => $shout, 'user' => $user, 'title' => $this->shouttitle($user, $shout->ip), 'avatar' => $this->getAvatar($this->params->get('avatar', 'none'), $shout->user_id), + 'icon' => $icon, 'params' => $this->params, ); diff --git a/mod_shoutbox/layouts/message.php b/mod_shoutbox/layouts/message.php index f846083..12b9725 100644 --- a/mod_shoutbox/layouts/message.php +++ b/mod_shoutbox/layouts/message.php @@ -17,59 +17,20 @@ * - title : (string) The string containing the IP Address of the user who submitted the post (only available to admins) * - avatar : (string) The string containing the avatar (if available). Empty string if no avatar. */ - -$user = JFactory::getUser(); -$userName = ''; - -if ($params->get('loginname', 'user') == 'user') -{ - $userName = $user->username; -} -else if ($params->get('loginname', 'user') == 'real') -{ - $userName = $user->name; -} - -// Strip from the username -if (in_array($params->get('profile'), array(1, 2, 3, 4))) -{ - $postName = strip_tags($post->name); -} -else -{ - $postName = $post->name; -} - -if ($params->get('framework', 'bootstrap') == 'uikit') -{ - $iconEdit = 'uk-icon-pencil-square-o'; - $iconRemove = 'uk-icon-times'; -} -else if ($params->get('framework', 'bootstrap') == 'bootstrap3') -{ - $iconEdit = 'glyphicon glyphicon-pencil'; - $iconRemove = 'glyphicon glyphicon-remove'; -} -else -{ - $iconEdit = 'icon-pencil'; - $iconRemove = 'icon-remove'; -} ?> -
-
> +
> name; ?> - when; ?>
- get('editown', 1) == 1) && $postName == $userName) : ?> - + get('editown', 1) == 1) && $user->id == $post->user_id) : ?> + - authorise('core.delete') || ($postName == $userName && $params->get('deleteown') == 1)) : ?> + authorise('core.delete') || ($user->id == $post->user_id && $params->get('deleteown') == 1)) : ?>
- + - +
From e3a2da040d8e10085dfd014cc1e60399ec18a285 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Mon, 23 May 2016 14:41:30 +0100 Subject: [PATCH 04/12] Update changelog --- changelog.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog.php b/changelog.php index 9d1ba72..93fdac0 100644 --- a/changelog.php +++ b/changelog.php @@ -17,6 +17,8 @@ ### WIP ^ Enter to submit now works on maths question input ^ Move checks from layout to helper +# Fixed not being able to edit a shout if "User Input" is enabled +# Fixed error when submitting a smiley in the name input Version 8.0.1 # Fixed PHP error when showing the shout date From e9ebf027b0ca9ad7dddc5188c3b73bdabd0763f5 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Mon, 23 May 2016 15:59:23 +0100 Subject: [PATCH 05/12] Switch edit/remove icons to SVG --- changelog.php | 1 + mod_shoutbox/helper.php | 21 --------------------- mod_shoutbox/layouts/message.php | 6 +++--- mod_shoutbox/media/css/mod_shoutbox.css | 16 ++-------------- mod_shoutbox/media/images/edit.svg | 9 +++++++++ mod_shoutbox/media/images/remove.svg | 4 ++++ 6 files changed, 19 insertions(+), 38 deletions(-) create mode 100644 mod_shoutbox/media/images/edit.svg create mode 100644 mod_shoutbox/media/images/remove.svg diff --git a/changelog.php b/changelog.php index 93fdac0..3be6381 100644 --- a/changelog.php +++ b/changelog.php @@ -17,6 +17,7 @@ ### WIP ^ Enter to submit now works on maths question input ^ Move checks from layout to helper +^ Now using our own SVG edit/remove icons # Fixed not being able to edit a shout if "User Input" is enabled # Fixed error when submitting a smiley in the name input diff --git a/mod_shoutbox/helper.php b/mod_shoutbox/helper.php index 7a03bde..8847dda 100644 --- a/mod_shoutbox/helper.php +++ b/mod_shoutbox/helper.php @@ -1163,33 +1163,12 @@ public function renderPost($shout, $layout = 'message') $shout = $this->preRender($shout); - // Create object for icons - $framework = $this->params->get('framework', 'bootstrap'); - $icon = new stdClass(); - - if ($framework == 'uikit') - { - $icon->edit = 'uk-icon-pencil-square-o'; - $icon->remove = 'uk-icon-times'; - } - else if ($framework == 'bootstrap3') - { - $icon->edit = 'glyphicon glyphicon-pencil'; - $icon->remove = 'glyphicon glyphicon-remove'; - } - else - { - $icon->edit = 'icon-pencil'; - $icon->remove = 'icon-remove'; - } - // Assemble the data together $data = array( 'post' => $shout, 'user' => $user, 'title' => $this->shouttitle($user, $shout->ip), 'avatar' => $this->getAvatar($this->params->get('avatar', 'none'), $shout->user_id), - 'icon' => $icon, 'params' => $this->params, ); diff --git a/mod_shoutbox/layouts/message.php b/mod_shoutbox/layouts/message.php index 12b9725..b86e8a2 100644 --- a/mod_shoutbox/layouts/message.php +++ b/mod_shoutbox/layouts/message.php @@ -24,11 +24,11 @@ name; ?> - when; ?>
get('editown', 1) == 1) && $user->id == $post->user_id) : ?> - + authorise('core.delete') || ($user->id == $post->user_id && $params->get('deleteown') == 1)) : ?> -
- + + diff --git a/mod_shoutbox/media/css/mod_shoutbox.css b/mod_shoutbox/media/css/mod_shoutbox.css index f168f68..d60c872 100644 --- a/mod_shoutbox/media/css/mod_shoutbox.css +++ b/mod_shoutbox/media/css/mod_shoutbox.css @@ -65,33 +65,21 @@ .jjshoutboxoutput .shout-actions { position: absolute; top: 0; - right: 5px; + right: 3px; } .shout-actions .jj-shout-edit { text-decoration: none; - font-size: 12px; margin: 0; - width: 12px; - vertical-align: top; - padding-top: 3px; } .shout-actions .shout-remove { background: none; border: 0; - font-size: 10px; - width: 10px; - line-height: 14px; + line-height: 13px; margin: 0; padding: 3px 0 0; vertical-align: top; cursor: pointer; } -.shout-actions .jj-shout-edit.uk-icon-pencil-square-o { - font-size: 13px; -} -.shout-actions .shout-remove.uk-icon-times { - font-size: 14px; -} .jjshoutboxoutput .shout-header { font-family: inherit; font-size: 12px; diff --git a/mod_shoutbox/media/images/edit.svg b/mod_shoutbox/media/images/edit.svg new file mode 100644 index 0000000..3f92a75 --- /dev/null +++ b/mod_shoutbox/media/images/edit.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/mod_shoutbox/media/images/remove.svg b/mod_shoutbox/media/images/remove.svg new file mode 100644 index 0000000..7b7c395 --- /dev/null +++ b/mod_shoutbox/media/images/remove.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From 0c7cde132e34fcfce1e35c43a5a7923c14b204e7 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Tue, 24 May 2016 09:24:01 +0100 Subject: [PATCH 06/12] Updated Dutch language file --- .../language/nl-NL/nl-NL.mod_shoutbox.ini | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/mod_shoutbox/language/nl-NL/nl-NL.mod_shoutbox.ini b/mod_shoutbox/language/nl-NL/nl-NL.mod_shoutbox.ini index 1538219..7e88263 100644 --- a/mod_shoutbox/language/nl-NL/nl-NL.mod_shoutbox.ini +++ b/mod_shoutbox/language/nl-NL/nl-NL.mod_shoutbox.ini @@ -7,7 +7,7 @@ JJSHOUTBOX_DESCRIPTION="

JJ Shoutbox

Copyright © JoomJunk

Vrijgegeven onder GNU/GPL 3.0 Licentie

" SHOUT_ADMIN_OPTIONS="Admin Options" -SHOUT_AJAX_ERROR="There was an error completing the request. Please try again. If you see this error multiple times, please contact the administrator of the site." +SHOUT_AJAX_ERROR="Er is een fout opgetreden bij het voltooien van de aanvraag. Probeer het opnieuw. Als u deze fout meerdere malen ziet, neem contact op met de beheerder van de site." SHOUT_ALERTDESC="Het aantal overgebleven tekens zal veranderen naar oranje wanneer dit aantal tekens over is" SHOUT_ALERTLABEL="Waarschuwing bij aantal tekens" SHOUT_ANSWER_INCORRECT="Beveiligings-antwoord in niet juist. Probeer het opnieuw" @@ -18,14 +18,14 @@ SHOUT_AVATAR_DESC="Kies waar je de gebruikers avatar vandaan wil halen." SHOUT_BBCODEDESC="Selecteer of je BBCode wil kunnen gebruiken" SHOUT_BBCODELABEL="BBCode" SHOUT_BBCODE_BOLD="B" -SHOUT_BBCODE_CANCEL="Cancel" +SHOUT_BBCODE_CANCEL="Herstel" SHOUT_BBCODE_IMG="Img" -SHOUT_BBCODE_INSERT="Insert" -SHOUT_BBCODE_INSERT_IMG="Insert Image" -SHOUT_BBCODE_INSERT_URL="Insert Link" +SHOUT_BBCODE_INSERT="Voeg in" +SHOUT_BBCODE_INSERT_IMG="Voeg een plaatje in" +SHOUT_BBCODE_INSERT_URL="Voeg een link in" SHOUT_BBCODE_ITALIC="I" SHOUT_BBCODE_LINK="Link" -SHOUT_BBCODE_TEXT="Text" +SHOUT_BBCODE_TEXT="Tekst" SHOUT_BBCODE_UNDERLINE="U" SHOUT_BBCODE_URL="URL" SHOUT_BOOTSTRAP2="Bootstrap 2" @@ -47,23 +47,23 @@ SHOUT_DATE_ENGLAND_BACKSLASH="31/01/2016" SHOUT_DATE_REVERSED="2016/01/311" SHOUT_DATE_SPACE="Zat 01 2016" SHOUT_DATE_SPACE_OPTION_TWO="Zat 31 Jan" -SHOUT_DELETE_THE_LATEST_X_POSTS="Delete the %s %s posts" +SHOUT_DELETE_THE_LATEST_X_POSTS="Verwijder de %s %s berichten" SHOUT_DELETEDESC="Selecteer de kleur van de Verwijderknop" SHOUT_DELETELABEL="Verwijderknop Kleur" SHOUT_DELETEOWN="Kan eigen berichten verwijderen?" SHOUT_DELETEOWNDESC="Selecteer of een gebruiker zijn eigen bericht kan verwijderen" SHOUT_DONT_SHOW="Verberg" SHOUT_EASY_PROFILE_USERS="Easy Profile" -SHOUT_EDITOWN="Can edit own shout?" -SHOUT_EDITOWN_DESC="Select whether the user will be allowed to edit their own shout" -SHOUT_EDITOWN_TIMELIMIT="Time limit" -SHOUT_EDITOWN_TIMELIMIT_DESC="Set the time limit (in minutes) after the shout has been posted for the user to be able to edit their post" -SHOUT_EDITOWN_TOO_LATE="Time limit exceeded. It's too late to edit your shout" -SHOUT_EDIT_COLOUR="Edit Button Colour" -SHOUT_EDIT_COLOUR_DESC="Select the colour of the edit button" +SHOUT_EDITOWN="Kan eigen shout bewerken?" +SHOUT_EDITOWN_DESC="Geef aan of de gebruikers hun eigen shout kunnen bewerken." +SHOUT_EDITOWN_TIMELIMIT="Tijd limiet" +SHOUT_EDITOWN_TIMELIMIT_DESC="Stel de tijdlimiet in (in minuten) nadat de shout is gepost voordat de gebruikers hun post kunnen bewerken." +SHOUT_EDITOWN_TOO_LATE="De tijdlimiet is overschreden. Het is te laat om uw shout te bewerken" +SHOUT_EDIT_COLOUR="Bewerk kleur van de knop" +SHOUT_EDIT_COLOUR_DESC="Selecteer de kleur van de knop of bewerk deze" SHOUT_EMPTY="Er zijn geen berichten in de Shoutbox" -SHOUT_ENTERTOSUBMIT="Enter om te versturen" -SHOUT_ENTERTOSUBMITDESC="Zet op aan als je berichten wil kunnen versturen doormiddel van de enter knop" +SHOUT_ENTERTOSUBMIT="Gebruik ENTER toets om te versturen" +SHOUT_ENTERTOSUBMITDESC="Zet op AAN als je berichten wil kunnen versturen doormiddel van de ENTER knop" SHOUT_ERRORMESSAGE="Er is een fout opgetreden - Probeer het later nog eens" SHOUT_FRAMEWORK="UI Framework intergratie" SHOUT_FRAMEWORK_DESC="Selecteer of je styling intergratie wil met UIKit of Bootstrap" @@ -75,19 +75,19 @@ SHOUT_GUESTDESC="Selecteer welke gebruikersgroepen toegestaan zijn om berichten SHOUT_GUESTLABEL="Gebruikersgroepen toegestaan om berichten te plaatsen" SHOUT_HEADERDESC="Selecteer de kleur van de bovenkant van de shoutbox" SHOUT_HEADERLABEL="Bovenkant Kleur" -SHOUT_HEADER_TEXT_COLOUR="Header Text Colour" -SHOUT_HEADER_TEXT_COLOUR_DESC="Select the colour for the header text" -SHOUT_INVALID_AJAX_PARAMS="The submitted data was invalid" -SHOUT_OUTOUTBOX_COLOUR="Ouput box colour" -SHOUT_OUTOUTBOX_COLOUR_DESC="Select the colour for the output box that contains the shouts" -SHOUT_TEXT_COLOUR="Shout Text Colour" -SHOUT_TEXT_COLOUR_DESC="Select the colour for the shout post text" -SHOUT_HISTORY="Shoutbox History" -SHOUT_HISTORY_BUTTON="History" -SHOUT_HISTORY_DESC="Select whether or not you'd like to be able to view the shoutbox history" -SHOUT_HISTORY_LOAD_MORE="Load more" -SHOUT_HTML5_NOTIFICATION_DESC="Select whether or not you'd like to use HTML5 notifications when a new shout has been posted. Please note this will not work in Internet Explorer, Edge and some mobile browsers." -SHOUT_HTML5_NOTIFICATION_LABEL="HTML5 Notifications" +SHOUT_HEADER_TEXT_COLOUR="Koptekst Kleur" +SHOUT_HEADER_TEXT_COLOUR_DESC="Selecteer de kleur voor de koptekst" +SHOUT_INVALID_AJAX_PARAMS="De ingevoerde gegevens zijn niet geldig" +SHOUT_OUTOUTBOX_COLOUR="Kleur Output gedeelte" +SHOUT_OUTOUTBOX_COLOUR_DESC="Selecteer de kleur voor het uitvoergedelte waarin de shouts staan" +SHOUT_TEXT_COLOUR="Shout Tekst Kleur" +SHOUT_TEXT_COLOUR_DESC="Selecter de kleur voor de shout post tekst." +SHOUT_HISTORY="Shout geschiedenis" +SHOUT_HISTORY_BUTTON="Geschiedenis" +SHOUT_HISTORY_DESC="Selecter of u de shoutbox geschiedenis wilt zien of niet." +SHOUT_HISTORY_LOAD_MORE="Laad meer" +SHOUT_HTML5_NOTIFICATION_DESC="Geef aan of u gebruik wil maken van HTML5 meldingen wanneer een nieuwe shout is gepost. Let op: dit werkt niet in Internet Explorer, Edge en sommige mobiele browsers." +SHOUT_HTML5_NOTIFICATION_LABEL="HTML5 Meldingen" SHOUT_JOM_SOCIAL_NOT_INSTALLED="JomSocial is niet geïnstalleerd. De gebruiker links kunnen niet gemaakt worden" SHOUT_JOM_SOCIAL_USERS="JomSocial" SHOUT_K2_BLOG_USERS="K2 - Blog" @@ -102,7 +102,7 @@ SHOUT_MASS_DELETE="Bulk verwijdering" SHOUT_MASS_DELETE_OPTION="Bulk verwijderingsknop" SHOUT_MASS_DELETE_OPTION_DESC="Selecteer of de Bulk Verwijderingsknop functie ingeschakeld moet worden (alleen administrators kunnen dit zien)" SHOUT_MATHS_QUESTION="Reken vragen" -SHOUT_MATHS_QUESTION_INVALID="Maths Question Data was Invalid" +SHOUT_MATHS_QUESTION_INVALID="Rekenvraag niet goed opgelost" SHOUT_MAXIMUMDESC="Geef het maximaal aantal berichten op, dat je wilt laten zien in de module." SHOUT_MAXIMUMLABEL="Maximaal aantal berichten" SHOUT_MESSAGEDESC="Hoeveel tekens moeten ingesteld worden als een maximum voor het bericht? Houdt in gedachten dat er een limiet van 250 karakters is in de SQL database" @@ -112,18 +112,18 @@ SHOUT_NAME="Naam" SHOUT_NAME_EMPTY="Voer een naam in!" SHOUT_NAME_REQUIRED="Naam verplicht" SHOUT_NAME_REQUIRED_DESC="Selecteer of een naam verplicht is bij het versturen van een bericht" -SHOUT_NEW_SHOUT_ALERT="New Shout!" -SHOUT_NEWEST_POSTS="Newest" +SHOUT_NEW_SHOUT_ALERT="Nieuwe Shout!" +SHOUT_NEWEST_POSTS="Nieuwste" SHOUT_NONE="Geen" SHOUT_NONMEMBER="De shoutbox is niet beschikbaar voor gasten" SHOUT_NOSCRIPT_CHARS_LIMIT="tekens limiet" SHOUT_NOSCRIPT_THERE_IS_A="Er is een" -SHOUT_NOTIFICATIONS="Notifications" +SHOUT_NOTIFICATIONS="Meldingen" SHOUT_NOT_INT="Je moet een aantal berichten verwijderen" SHOUT_NO_USERS="Geen" -SHOUT_OLDEST_POSTS="Oldest" -SHOUT_OUTPUT_HEIGHT="Output height (px)" -SHOUT_OUTPUT_HEIGHT_DESC="Set the height (px) for the box that display the shouts" +SHOUT_OLDEST_POSTS="Oudste" +SHOUT_OUTPUT_HEIGHT="Output hoogte (px)" +SHOUT_OUTPUT_HEIGHT_DESC="Stel de hoogte in (px) voor het gedeelte dat de shouts laat zien." SHOUT_REAL="Echte naam" SHOUT_RECAPTCHA="ReCaptcha" SHOUT_RECAPTCHA_IP_ERROR="Om veiligheidsredenen moet je de remote ip doorgeven aan reCaptcha" @@ -137,15 +137,15 @@ SHOUT_RECAPTCHA_THEME_LABEL="ReCaptcha Theme" SHOUT_RECAPTCHA_THEME_LIGHT="Light" SHOUT_RECAPTURE_CORRECT="Je hebt 'm!" SHOUT_REMAINING="tekens over" -SHOUT_SECURITY_HIDE="Hide for registered users" -SHOUT_SECURITY_HIDE_DESC="Select if you would like to hide the security question, so that it's only visible to the public" +SHOUT_SECURITY_HIDE="Verberg voor geregistreerde gebruikers" +SHOUT_SECURITY_HIDE_DESC="Selecteer als u de veiligheidsvraag wilt verbergen, zodat het is alleen zichtbaar zal zijn voor het publiek" SHOUT_SECURITY_TYPE="Beveiligins methode" SHOUT_SECURITY_TYPE_DESC="Selecteer of je ReCaptcha of een simpele reken vraag wilt gebruiken" SHOUT_SHOW_DATE="Toon datum" SHOUT_SHOW_DATEDESC="Selecteer of de datum moet worden weergegeven in de shoutbox" SHOUT_SMILE_CODE="Code" -SHOUT_SMILE_IMAGE="Image" -SHOUT_SMILE_LABEL="Smilies List" +SHOUT_SMILE_IMAGE="Plaatje" +SHOUT_SMILE_LABEL="Smilies Lijst" SHOUT_SMILE_UPLOAD_LABEL="Upload Smilies" SHOUT_SOUNDDESC="Selecteer of je een geluids notificatie wilt bij een nieuw bericht" SHOUT_SOUNDLABEL="Geluid notificatie" @@ -155,34 +155,34 @@ SHOUT_SWEARDESC="Wanneer geselecteerd zal de gebruiker een maximum aantal vloeke SHOUT_SWEARLABEL="Maximum vloeken" SHOUT_SWEARNUMDESC="Wat is het maximale aantal vloeken die voor een gebruiker zijn toegestaan om te posten (vergeet bovenstaande instelling niet aan te zetten)" SHOUT_SWEARNUMLABEL="Maximum aantal vloeken" -SHOUT_SWEAR_WORDS="Swear words" -SHOUT_SWEAR_WORDS_WORD="Word" -SHOUT_TAG_USER="User Tagging (Beta Feature)" -SHOUT_TAG_USER_LABEL="Tag a User" -SHOUT_TAG_USER_DESC="When enabled, you can tag a user in a shout by type '@', followed by the username. A dropdown will appear with a list of suggested usernames (max 5). Enabling this feature loads a list of ALL usernames, so if you have more than 1000 users, this may be resource heavy. We plan to improve the performance of this in the future." -SHOUT_TEXTAREA_HEIGHT="Textarea height (px)" -SHOUT_TEXTAREA_HEIGHT_DESC="Set the height (px) for the textarea" -SHOUT_TIME_AGO="ago" -SHOUT_TIME_DAY="day" -SHOUT_TIME_DAYS="days" -SHOUT_TIME_HOUR="hour" -SHOUT_TIME_HOURS="hours" -SHOUT_TIME_JUST_NOW="just now" -SHOUT_TIME_MINUTE="minute" -SHOUT_TIME_MINUTES="minutes" -SHOUT_TIME_MONTH="month" +SHOUT_SWEAR_WORDS="Scheldwoorden" +SHOUT_SWEAR_WORDS_WORD="Woord" +SHOUT_TAG_USER="Gebruiker Taggen (Beta Toekomst)" +SHOUT_TAG_USER_LABEL="Tag een Gebruiker" +SHOUT_TAG_USER_DESC="Wanneer ingeschakeld, kunt u een gebruiker in een shout taggen ' @', gevolgd door de gebruikersnaam. Een vervolgkeuzelijst wordt weergegeven met een lijst met voorgestelde gebruikersnamen (max 5). Inschakelen van deze functie laadt een lijst met alle gebruikersnamen, hebt u meer dan 1000 gebruikers, kan dit een zware belasting zijn. We zijn van plan om de prestaties van dit in de toekomst te verbeteren." +SHOUT_TEXTAREA_HEIGHT="Hoogte tekstgedeelte (px)" +SHOUT_TEXTAREA_HEIGHT_DESC="Stel de hoogte in (px) voor het tekstgedeelte" +SHOUT_TIME_AGO="geleden" +SHOUT_TIME_DAY="dag" +SHOUT_TIME_DAYS="dagen" +SHOUT_TIME_HOUR="uur" +SHOUT_TIME_HOURS="ueren" +SHOUT_TIME_JUST_NOW="direct" +SHOUT_TIME_MINUTE="minuut" +SHOUT_TIME_MINUTES="minuten" +SHOUT_TIME_MONTH="maand" SHOUT_TIME_MONTHS="months" -SHOUT_TIME_SECOND="second" -SHOUT_TIME_SECONDS="seconds" +SHOUT_TIME_SECOND="seconde" +SHOUT_TIME_SECONDS="seconden" SHOUT_TIME_WEEK="week" -SHOUT_TIME_WEEKS="weeks" -SHOUT_TIME_YEAR="year" -SHOUT_TIME_YEARS="years" +SHOUT_TIME_WEEKS="weken" +SHOUT_TIME_YEAR="jaar" +SHOUT_TIME_YEARS="jaren" SHOUT_TIMEZONEDESC="Selecteer de tijdzone van de shoutbox" SHOUT_TIMEZONELABEL="Tijdzone" SHOUT_UIKIT="UIKit" SHOUT_UPDATE="Update" SHOUT_USER="Gebruikersnaam" -SHOUT_USER_OPTIONS="User Options" +SHOUT_USER_OPTIONS="Gebruikers Opties" SHOUT_WARNDESC="Het aantal overgebleven tekens zal veranderen naar rood wanneer dit aantal tekens over is" SHOUT_WARNLABEL="Waarschuwing bij aantal tekens" From 988355f2988056e15a8725a5ada16c4af6df7bbe Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Tue, 24 May 2016 09:24:49 +0100 Subject: [PATCH 07/12] update changelog --- changelog.php | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.php b/changelog.php index 3be6381..a760211 100644 --- a/changelog.php +++ b/changelog.php @@ -20,6 +20,7 @@ ^ Now using our own SVG edit/remove icons # Fixed not being able to edit a shout if "User Input" is enabled # Fixed error when submitting a smiley in the name input +$ Updated Ducth language file (thanks Kees) Version 8.0.1 # Fixed PHP error when showing the shout date From cb08b5d87c9dc66b3c0d161ca7ea4b2c8e5d3b6b Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Tue, 24 May 2016 10:37:32 +0100 Subject: [PATCH 08/12] Improved styling on Non-Bootstrap templates --- mod_shoutbox/media/css/mod_shoutbox.css | 8 +- mod_shoutbox/media/css/mod_shoutbox_bs.css | 747 +++++++++++++++------ 2 files changed, 529 insertions(+), 226 deletions(-) diff --git a/mod_shoutbox/media/css/mod_shoutbox.css b/mod_shoutbox/media/css/mod_shoutbox.css index d60c872..e24b58c 100644 --- a/mod_shoutbox/media/css/mod_shoutbox.css +++ b/mod_shoutbox/media/css/mod_shoutbox.css @@ -161,10 +161,10 @@ .jjshoutbox-audio { display: none; } -.edit-cancel, -.edit-cancel.btn, +a.edit-cancel, +a.edit-cancel.btn, .uk-button.edit-cancel { - display: none !important; + display: none; width: 100%; margin-top: 5px; min-height: 30px; @@ -238,7 +238,7 @@ Shoutbox history } #jj-shout-history .shout-header { font-weight: bold; - color: 000; + color: #000; background: none; } diff --git a/mod_shoutbox/media/css/mod_shoutbox_bs.css b/mod_shoutbox/media/css/mod_shoutbox_bs.css index a837d57..181e34b 100644 --- a/mod_shoutbox/media/css/mod_shoutbox_bs.css +++ b/mod_shoutbox/media/css/mod_shoutbox_bs.css @@ -4,242 +4,545 @@ * @license GPL v3.0 or later http://www.gnu.org/licenses/gpl-3.0.html */ -/** Button **/ -.jj_fallback .btn { - display: inline-block; - padding: 4px 12px; - margin-bottom: 0; - font-size: 13px; - line-height: 18px; - text-align: center; - vertical-align: middle; - cursor: pointer; - color: #333; - text-shadow: 0 1px 1px rgba(255,255,255,0.75); - background-color: #f5f5f5; - background-image: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6)); - background-image: -moz-linear-gradient(top,#fff,#e6e6e6); - background-image: linear-gradient(to bottom,#fff,#e6e6e6); - background-repeat: repeat-x; - border-color: #e6e6e6 #e6e6e6 #bfbfbf; - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - border: 1px solid #bbb; - border-bottom-color: #a2a2a2; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); - -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); - box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); -} -.jj_fallback .btn:hover, -.jj_fallback .btn:focus, -.jj_fallback .btn:active, -.jj_fallback .btn[disabled] { - color: #333; - background-color: #e6e6e6; -} -.jj_fallback .btn-small { - padding: 2px 10px; - font-size: 12px; - border-radius: 3px; -} -.jj_fallback .btn-group > .btn-small { - font-size: 12px; -} -.jj_fallback .btn-group { - position: relative; - display: inline-block; - font-size: 0; - vertical-align: middle; - white-space: nowrap; -} -.jj_fallback .btn-group + .btn-group { - margin-left: 5px; -} -.jj_fallback .edit-cancel.btn { - display: none; - width: 100%; - margin-top: 5px; - min-height: 30px; - box-sizing: border-box; -} - - -/** Modal **/ -.jj_fallback .hide { - display: none; -} -.jj_fallback .fade.in { - opacity: 1; - display: block; +.art-block .jjshoutboxform ul > li::before { + display: none; } +.jjshoutboxform textarea { + margin-top: 7px; +} + +/*! + * Bootstrap v2.3.2 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} +.clearfix:after { + clear: both; +} + + +.dropdown { + position: relative; +} +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 20px; + color: #333333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { + color: #ffffff; + text-decoration: none; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #ffffff; + text-decoration: none; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + outline: 0; +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999999; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; + background-image: none; +} +.open > .dropdown-menu { + display: block; +} +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} + + +.typeahead { + z-index: 1051; + margin-top: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + + +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + transition: height 0.35s ease; +} +.collapse.in { + height: auto; +} + + +.btn { + display: inline-block; + padding: 4px 12px; + margin-bottom: 0; + font-size: 14px; + line-height: 20px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + cursor: pointer; + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + border: 1px solid #cccccc; + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + border-bottom-color: #b3b3b3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} +.btn:hover, +.btn:focus, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; +} + +.btn:active, +.btn.active { + background-color: #cccccc \9; +} +.btn:hover, +.btn:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn.active, +.btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-small { + padding: 2px 10px; + font-size: 11.9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} +.btn-group { + position: relative; + display: inline-block; + font-size: 0; + white-space: nowrap; + vertical-align: middle; +} +.btn-group + .btn-group { + margin-left: 5px; +} +.btn-toolbar { + margin-top: 10px; + margin-bottom: 10px; + font-size: 0; +} +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { + margin-left: 5px; +} +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group > .btn + .btn { + margin-left: -1px; +} +.btn-group > .btn, +.btn-group > .dropdown-menu { + font-size: 14px; +} +.btn-group > .btn-small { + font-size: 11.9px; +} +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-right: 8px; + padding-left: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} +.btn-group > .btn-mini + .dropdown-toggle { + padding-right: 5px; + padding-left: 5px; +} +.btn-group > .btn-large + .dropdown-toggle { + padding-right: 12px; + padding-left: 12px; +} +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} +.btn .caret { + margin-top: 8px; + margin-left: 0; +} +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} +.btn-danger { + color: #ffffff !important; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #da4f49; + background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); + background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); + background-repeat: repeat-x; + border-color: #bd362f #bd362f #802420; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #bd362f; + text-decoration: none !important; +} +.btn-danger:active, +.btn-danger.active { + background-color: #942a25 \9; +} + + +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 20px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.alert, +.alert h4 { + color: #c09853; +} +.alert h4 { + margin: 0; +} + +.alert-danger, +.alert-error { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} + .modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; } .modal-backdrop.fade { - opacity: 0; + opacity: 0; } .modal-backdrop, .modal-backdrop.fade.in { - opacity: 0.8; - filter: alpha(opacity=80); + opacity: 0.8; +} +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: 1050; + width: 560px; + margin-left: -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + outline: none; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} +.modal.fade { + top: -25%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out; +} +.modal.fade.in { + top: 10%; +} +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} +.modal-header .close { + position: static; + margin-top: 2px; + float: right; + font-size: 20px; + font-weight: bold; + line-height: 20px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +.modal-header .close:hover, +.modal-header .close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; +} +.modal-header h3 { + margin: 0; + line-height: 30px; +} +.modal-body { + position: relative; + max-height: 400px; + padding: 15px; + overflow-y: auto; } -.jj_fallback .modal-header { - padding: 9px 15px; - border-bottom: 1px solid #eee; + + +.pull-right { + float: right; } -.jj_fallback .modal-header .close { - margin-top: 2px; +.pull-left { + float: left; } -.jj_fallback .modal-header h3 { - margin: 0; - line-height: 30px; +.hide { + display: none; } -.jj_fallback .modal-body { - width: 98%; - position: relative; - max-height: 400px; - padding: 1%; +.show { + display: block; } -@media (max-width: 480px) { - .jj_fallback .modal-header .close { - padding: 10px; - margin: -10px; - } -} -body.modal { - padding-top: 0; -} -.jj_fallback .modal { - position: fixed; - top: 5%; - left: 50%; - z-index: 1050; - width: 80%; - margin-left: -40%; - background-color: #fff; - border: 1px solid #999; - border: 1px solid rgba(0,0,0,0.3); - border-radius: 6px; - -webkit-box-shadow: 0 3px 7px rgba(0,0,0,0.3); - -moz-box-shadow: 0 3px 7px rgba(0,0,0,0.3); - box-shadow: 0 3px 7px rgba(0,0,0,0.3); - -webkit-background-clip: padding-box; - -moz-background-clip: padding-box; - background-clip: padding-box; - outline: none; -} -.jj_fallback .modal.fade { - -webkit-transition: opacity .3s linear, top .3s ease-out; - -moz-transition: opacity .3s linear, top .3s ease-out; - transition: opacity .3s linear, top .3s ease-out; - top: 20%; -} -.jj_fallback .modal.fade.in { - top: 5%; -} -.jj_fallback .modal-batch { - overflow-y: visible; +.invisible { + visibility: hidden; } + + @media (max-width: 767px) { - .jj_fallback .modal { - position: fixed; - top: 20px; - left: 20px; - right: 20px; - width: auto; - margin: 0; - } - .jj_fallback .modal.fade { - top: -100px; - } - .jj_fallback .modal.fade.in { - top: 20px; - } + .modal { + position: fixed; + top: 20px; + right: 20px; + left: 20px; + width: auto; + margin: 0; + } + .modal.fade { + top: -100px; + } + .modal.fade.in { + top: 20px; + } } @media (max-width: 480px) { - .jj_fallback .modal { - top: 10px; - left: 10px; - right: 10px; - } -} -@media (max-width: 768px) { - .jj_fallback .modal.fade { - top: -100%; - } -} -body.modal-open { - overflow: hidden; - -ms-overflow-style: none; -} -.jj_fallback .close { - float: right; - font-size: 20px; - font-weight: bold; - line-height: 18px; - color: #000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); -} -.jj_fallback .close:hover, -.jj_fallback .close:focus { - color: #000; - text-decoration: none; - cursor: pointer; - opacity: 0.4; - filter: alpha(opacity=40); -} -.jj_fallback .button.close { - padding: 3; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} - - -/** Dropdown **/ -.jj_fallback .dropdown { - position: relative; -} -.jj_fallback .dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - background-color: #fff; - border: 1px solid #ccc; - border: 1px solid rgba(0,0,0,0.2); - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0,0,0,0.2); - -moz-box-shadow: 0 5px 10px rgba(0,0,0,0.2); - box-shadow: 0 5px 10px rgba(0,0,0,0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} -.jj_fallback .dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 18px; - color: #333; - white-space: nowrap; -} -.jj_fallback .open > .dropdown-menu { - display: block; + .modal { + top: 10px; + right: 10px; + left: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } } \ No newline at end of file From 200b12bef3fa33e98ce6fa878a59ee8c77ad0c8e Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Wed, 25 May 2016 10:17:59 +0100 Subject: [PATCH 09/12] Fixed PHP error in history modal when date is enabled --- changelog.php | 1 + mod_shoutbox/helper.php | 11 +++++------ mod_shoutbox/tmpl/default.php | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/changelog.php b/changelog.php index a760211..27ee1ca 100644 --- a/changelog.php +++ b/changelog.php @@ -20,6 +20,7 @@ ^ Now using our own SVG edit/remove icons # Fixed not being able to edit a shout if "User Input" is enabled # Fixed error when submitting a smiley in the name input +# Fixed PHP error in history modal when date is enabled $ Updated Ducth language file (thanks Kees) Version 8.0.1 diff --git a/mod_shoutbox/helper.php b/mod_shoutbox/helper.php index 8847dda..b45d05c 100644 --- a/mod_shoutbox/helper.php +++ b/mod_shoutbox/helper.php @@ -1077,11 +1077,12 @@ public function timeElapsed($datetime, $full = false) */ public function preRender($shout) { - // Grab the bbcode and smiley params + // params $bbcode = $this->params->get('bbcode', 1); + $date = $this->params->get('date'); // Get the date format - switch ($this->params->get('date')) + switch ($date) { case 0: $show_date = 'd/m/Y - '; @@ -1114,15 +1115,13 @@ public function preRender($shout) } // Convert to "time elapsed" format. Else convert date when to the logged in user's timezone - if ($this->params->get('date') == 6) + if ($date == 6) { $shout->when = $this->timeElapsed($shout->when); } else { - // Not sure why, but this needs to be converted to an array to access the 'date' value - $shout->when = (array) $shout->when; - $shout->when = JHtml::_('date', $shout->when['date'], $show_date . $show_time, true); + $shout->when = JHtml::_('date', $shout->when, $show_date . $show_time, true); } $profile = $this->params->get('profile'); diff --git a/mod_shoutbox/tmpl/default.php b/mod_shoutbox/tmpl/default.php index aee58d0..8ecb092 100644 --- a/mod_shoutbox/tmpl/default.php +++ b/mod_shoutbox/tmpl/default.php @@ -103,7 +103,7 @@ { echo '

' . JText::_('SHOUT_EMPTY') . '

'; } - else + else { foreach ($shouts as $shout) { @@ -116,7 +116,7 @@ ?>
-
+
@@ -331,7 +331,7 @@ class="" if ($history == 1) { - echo $helper->renderHistoryModal($shouts, $modal, $title); + echo $helper->renderHistoryModal($helper->getShouts(0, $number, $dataerror), $modal, $title); } ?> @@ -392,7 +392,7 @@ class="" { guest) : ?> var JJ_name = ''; - + var JJ_name = 'JJ_None'; } From f1714e268fa231e68f3280ffe7bea0c82bf317f9 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Wed, 25 May 2016 10:34:22 +0100 Subject: [PATCH 10/12] Reduce function arguments by using an object --- changelog.php | 1 + mod_shoutbox/media/js/mod_shoutbox.js | 48 ++++++++++++++++----------- mod_shoutbox/tmpl/default.php | 14 ++++++-- 3 files changed, 40 insertions(+), 23 deletions(-) diff --git a/changelog.php b/changelog.php index 27ee1ca..9266679 100644 --- a/changelog.php +++ b/changelog.php @@ -18,6 +18,7 @@ ^ Enter to submit now works on maths question input ^ Move checks from layout to helper ^ Now using our own SVG edit/remove icons +^ Some Javascript improvements # Fixed not being able to edit a shout if "User Input" is enabled # Fixed error when submitting a smiley in the name input # Fixed PHP error in history modal when date is enabled diff --git a/mod_shoutbox/media/js/mod_shoutbox.js b/mod_shoutbox/media/js/mod_shoutbox.js index 3c0ef7c..f0e62d8 100644 --- a/mod_shoutbox/media/js/mod_shoutbox.js +++ b/mod_shoutbox/media/js/mod_shoutbox.js @@ -517,9 +517,19 @@ jQuery(document).ready(function($) { .attr('data-shout-id', ''); $('#edit-cancel').css('display', 'none'); + + var JJ_ShoutGetParams = { + title : params.title, + sound : false, + notifications : false, + Itemid : params.itemId, + instance : params.instance, + loggedInUser : params.name, + history : params.history, + }; // Refresh the output - JJShoutbox.getPosts(params.title, false, false, params.itemId, params.instance, params.name, params.history) + JJShoutbox.getPosts(JJ_ShoutGetParams); } else { @@ -560,21 +570,21 @@ jQuery(document).ready(function($) { * Get the latest shouts * Play a sound notification if new shouts are shown */ - JJShoutbox.getPosts = function(title, sound, notifications, Itemid, instance, loggedInUser, history) + JJShoutbox.getPosts = function(params) { // Get the ID of the last shout - var lastID = JJShoutbox.getLastID(instance); - var lastName = JJShoutbox.getLastAuthor(instance); + var lastID = JJShoutbox.getLastID(params.instance); + var lastName = JJShoutbox.getLastAuthor(params.instance); // Assemble variables to submit var request = { - 'jjshout[title]' : title, + 'jjshout[title]' : params.title, }; // If there is an active menu item then we need to add it to the request. - if (Itemid !== null) + if (params.Itemid !== null) { - request['Itemid'] = Itemid; + request['Itemid'] = params.Itemid; } // AJAX request @@ -585,47 +595,45 @@ jQuery(document).ready(function($) { success: function(response){ if (response.success) { - instance.find('#jjshoutboxoutput').empty().prepend($('
')); + params.instance.find('#jjshoutboxoutput').empty().prepend($('
')); var historyButton = ''; - if (history === 1) + if (params.history === 1) { historyButton = ''; } // Grab the html output and append it to the shoutbox message - instance.find('.jj-shout-new').after(response.data.html + historyButton); + params.instance.find('.jj-shout-new').after(response.data.html + historyButton); // Get the ID of the last shout after the output has been updated - var newLastID = JJShoutbox.getLastID(instance); + var newLastID = JJShoutbox.getLastID(params.instance); // Post ID and name checks - if (newLastID > lastID && (loggedInUser !== lastName)) + if (newLastID > lastID && (params.loggedInUser !== lastName)) { - console.log(document.hasFocus()); - - JJTitleBlink(Joomla.JText._('SHOUT_NEW_SHOUT_ALERT')); + JJTitleBlink(Joomla.JText._('SHOUT_NEW_SHOUT_ALERT')); // Show HTML5 Notification if enabled - if (notifications == 1) + if (params.notifications == 1) { JJShoutbox.createNotification(Joomla.JText._('SHOUT_NEW_SHOUT_ALERT')); } // Play notification sound if enabled - if (sound === 1) + if (params.sound === 1) { - instance.find('.jjshoutbox-audio').get(0).play(); + params.instance.find('.jjshoutbox-audio').get(0).play(); } } } else { - JJShoutbox.showError(response.message, instance); + JJShoutbox.showError(response.message, params.instance); } }, error: function(){ - JJShoutbox.showError(Joomla.JText._('SHOUT_AJAX_ERROR'), instance); + JJShoutbox.showError(Joomla.JText._('SHOUT_AJAX_ERROR'), params.instance); } }); diff --git a/mod_shoutbox/tmpl/default.php b/mod_shoutbox/tmpl/default.php index 8ecb092..609d1b1 100644 --- a/mod_shoutbox/tmpl/default.php +++ b/mod_shoutbox/tmpl/default.php @@ -474,9 +474,17 @@ class="" // Refresh the shoutbox posts every X seconds guest): ?> setInterval(function(){ - var JJ_itemId = ''; - var JJ_insertName = 'username : $user->name; ?>'; - JJShoutbox.getPosts('', , , JJ_itemId, JJ_instance, JJ_insertName, JJ_history); + var JJ_ShoutGetParams = { + title : '', + sound : , + notifications : , + Itemid : '', + instance : JJ_instance, + loggedInUser : 'username : $user->name; ?>', + history : JJ_history, + }; + + JJShoutbox.getPosts(JJ_ShoutGetParams); }, ); }); From a33199ca6fd946223e8ea406a74ef7d772db6474 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Wed, 25 May 2016 11:05:30 +0100 Subject: [PATCH 11/12] Fixed empty name field on shout edit --- changelog.php | 1 + mod_shoutbox/media/js/mod_shoutbox.js | 1 + 2 files changed, 2 insertions(+) diff --git a/changelog.php b/changelog.php index 9266679..5267b3c 100644 --- a/changelog.php +++ b/changelog.php @@ -22,6 +22,7 @@ # Fixed not being able to edit a shout if "User Input" is enabled # Fixed error when submitting a smiley in the name input # Fixed PHP error in history modal when date is enabled +# Fixed empty name field on shout edit with "User Input" enabled $ Updated Ducth language file (thanks Kees) Version 8.0.1 diff --git a/mod_shoutbox/media/js/mod_shoutbox.js b/mod_shoutbox/media/js/mod_shoutbox.js index f0e62d8..2c960e8 100644 --- a/mod_shoutbox/media/js/mod_shoutbox.js +++ b/mod_shoutbox/media/js/mod_shoutbox.js @@ -437,6 +437,7 @@ jQuery(document).ready(function($) { var json = $.parseJSON(response); $('#jj_message').val(json[0].msg); + $('#shoutbox-name').val(json[0].name); $('#edit-cancel').css('display', 'block'); From 395886768af7cb6184cfbafd420ad2548324a1fa Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Wed, 25 May 2016 11:32:05 +0100 Subject: [PATCH 12/12] Update to v8.1.0 --- changelog.php | 2 +- mod_shoutbox/mod_shoutbox.xml | 2 +- mod_shoutbox/sql/mysql/updates/8.1.0.sql | 1 + mod_shoutbox/sql/postgresql/updates/8.1.0.sql | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 mod_shoutbox/sql/mysql/updates/8.1.0.sql create mode 100644 mod_shoutbox/sql/postgresql/updates/8.1.0.sql diff --git a/changelog.php b/changelog.php index 5267b3c..a808f28 100644 --- a/changelog.php +++ b/changelog.php @@ -14,7 +14,7 @@ - -> Removed ! -> Note -### WIP +Version 8.1.0 ^ Enter to submit now works on maths question input ^ Move checks from layout to helper ^ Now using our own SVG edit/remove icons diff --git a/mod_shoutbox/mod_shoutbox.xml b/mod_shoutbox/mod_shoutbox.xml index 5003524..728c53f 100644 --- a/mod_shoutbox/mod_shoutbox.xml +++ b/mod_shoutbox/mod_shoutbox.xml @@ -7,7 +7,7 @@ http://www.gnu.org/licenses/gpl-3.0.html admin@joomjunk.co.uk http://www.joomjunk.co.uk - 8.0.1 + 8.1.0 JJSHOUTBOX_DESCRIPTION diff --git a/mod_shoutbox/sql/mysql/updates/8.1.0.sql b/mod_shoutbox/sql/mysql/updates/8.1.0.sql new file mode 100644 index 0000000..dc82ffa --- /dev/null +++ b/mod_shoutbox/sql/mysql/updates/8.1.0.sql @@ -0,0 +1 @@ +# Placeholder file for database changes for version 8.1.0 \ No newline at end of file diff --git a/mod_shoutbox/sql/postgresql/updates/8.1.0.sql b/mod_shoutbox/sql/postgresql/updates/8.1.0.sql new file mode 100644 index 0000000..dc82ffa --- /dev/null +++ b/mod_shoutbox/sql/postgresql/updates/8.1.0.sql @@ -0,0 +1 @@ +# Placeholder file for database changes for version 8.1.0 \ No newline at end of file