Skip to content

Commit

Permalink
Merge branch 'release/2.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
iMattPro committed Feb 7, 2020
2 parents 9689a0a + ea09f13 commit 52ee900
Show file tree
Hide file tree
Showing 20 changed files with 247 additions and 73 deletions.
34 changes: 16 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
language: php
sudo: required
dist: xenial

matrix:
include:
- php: 5.5
- php: 7.1
env: DB=none;NOTESTS=1
- php: 5.4
env: DB=mysqli #myisam
- php: 5.4
env: DB=mysql
- php: 5.4
- php: 7.1
env: DB=mariadb
- php: 5.4
- php: 7.1
env: DB=postgres
- php: 5.4
- php: 7.1
env: DB=sqlite3
- php: 5.5
env: DB=mysqli
- php: 5.6
env: DB=mysqli
- php: 7.0
env: DB=mysqli
- php: 7.1
env: DB=mysqli
env: DB=mysqli # MyISAM
- php: 7.2
env: DB=mysqli
- php: 7.3
env: DB=mysqli
- php: 7.4snapshot
env: DB=mysqli
- php: nightly
env: DB=mysqli
allow_failures:
Expand All @@ -39,7 +33,7 @@ env:
- IMAGE_ICC="1" # Should we run icc profile sniffer on your images?
- EPV="1" # Should we run EPV (Extension Pre Validator) on your code?
- COVERAGE="1" # Should we send code coverage?
- PHPBB_BRANCH="3.2.x"
- PHPBB_BRANCH="3.3.x"

branches:
only:
Expand All @@ -48,8 +42,12 @@ branches:
- /^develop-.*$/
- /^\d+(\.\d+)?\.x$/

services:
- postgresql
- mysql

install:
- travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
- travis/prepare-phpbb.sh $PHPBB_BRANCH
- cd ../../phpBB3
- travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 2.3.2 - 2020-01-10

- Fixed potential javascript issues in phpBB 3.3.x by removing deprecated code.
- Miscellaneous minor code improvements.

## 2.3.1 - 2019-03-30

- Switched to a pure CSS "No Avatar" image instead of the no-avatar.gif that was not always available in some 3rd-party styles.
Expand Down
2 changes: 1 addition & 1 deletion acp/topic_preview_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function main()

$this->tpl_name = 'acp_topic_preview';

$this->page_title = $phpbb_container->get('user')
$this->page_title = $phpbb_container->get('language')
->lang('TOPIC_PREVIEW');

$phpbb_container->get('vse.topicpreview.acp.controller')
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "phpbb-extension",
"description": "A phpBB extension that displays a short excerpt of text from the first post in a tooltip while the mouse hovers over a topic’s title.",
"homepage": "https://github.com/VSEphpbb/topicpreview",
"version": "2.3.1",
"version": "2.3.2",
"keywords": ["phpbb", "extension", "topic", "preview"],
"license": "GPL-2.0-only",
"authors": [
Expand All @@ -15,7 +15,6 @@
],
"require": {
"php": ">=5.4",
"phpbb/phpbb": "~3.2.0",
"composer/installers": "~1.0"
},
"extra": {
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ class ext extends \phpbb\extension\base

/**
* Enable extension if phpBB minimum version requirement is met
* (check database and filesystem)
*
* @return bool
*/
public function is_enableable()
{
$config = $this->container->get('config');
return phpbb_version_compare($config['version'], self::PHPBB_MIN_VERSION, '>=');
return phpbb_version_compare($config['version'], self::PHPBB_MIN_VERSION, '>=') &&
phpbb_version_compare(PHPBB_VERSION, self::PHPBB_MIN_VERSION, '>=');
}
}
39 changes: 39 additions & 0 deletions language/pt_br/info_acp_topic_preview.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
*
* Topic Preview [Pt-BR]
*
* @copyright (c) 2013 Matt Friedman
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
exit;
}

if (empty($lang) || !is_array($lang))
{
$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

$lang = array_merge($lang, array(
'TOPIC_PREVIEW' => 'Preview dos Tópicos',
'TOPIC_PREVIEW_SETTINGS' => 'Configurações',
));
38 changes: 38 additions & 0 deletions language/pt_br/topic_preview.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
*
* Topic Preview [Pt-BR]
*
* @copyright (c) 2013 Matt Friedman
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
exit;
}

if (empty($lang) || !is_array($lang))
{
$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

$lang = array_merge($lang, array(
'FIRST_POST' => 'Primeira Postagem',
));
57 changes: 57 additions & 0 deletions language/pt_br/topic_preview_acp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php
/**
*
* Topic Preview [Pt-BR]
*
* @copyright (c) 2013 Matt Friedman
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
exit;
}

if (empty($lang) || !is_array($lang))
{
$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

$lang = array_merge($lang, array(
'TOPIC_PREVIEW' => 'Preview dos Tópicos',
'TOPIC_PREVIEW_EXPLAIN' => 'Mostra uma pré visualização do tópico como um balão de dicas do Windows.',
'TOPIC_PREVIEW_SETTINGS' => 'Configurações',
'TOPIC_PREVIEW_LENGTH' => 'Largura do Texto',
'TOPIC_PREVIEW_LENGTH_EXPLAIN' => 'Informe o número padrão de caracteres (default é 150). Configure como 0 para desabilitar.',
'TOPIC_PREVIEW_STRIP' => 'Esconder BBCodes nos previews',
'TOPIC_PREVIEW_STRIP_EXPLAIN' => 'Listar BBCodes que devem ser removidos do preview. Separados por | , exemplo: spoiler|hide|code',
'TOPIC_PREVIEW_AVATARS' => 'Exibir Avatares',
'TOPIC_PREVIEW_LAST_POST' => 'Mostrar “Última Postagem”',
'CHARS' => 'Caracteres',

'TOPIC_PREVIEW_STYLE_SETTINGS' => 'Estilo',
'TOPIC_PREVIEW_WIDTH' => 'Largura das visualizações do tópico (em pixels)',
'TOPIC_PREVIEW_DELAY' => 'Delay (em milisegundos)',
'TOPIC_PREVIEW_DRIFT' => 'Efeito animado (em pixels)',
'TOPIC_PREVIEW_DRIFT_EXPLAIN' => 'Duração da animação',
'TOPIC_PREVIEW_THEME' => 'Tema para %s',
'TOPIC_PREVIEW_THEME_EXPLAIN' => 'Selecione um tema para %s.',
'THEME' => 'informado',
'MILLISECOND' => 'ms',
));
38 changes: 38 additions & 0 deletions language/pt_br/topic_preview_ucp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
*
* Topic Preview [Pt-BR]
*
* @copyright (c) 2013 Matt Friedman
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
exit;
}

if (empty($lang) || !is_array($lang))
{
$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

$lang = array_merge($lang, array(
'TOPIC_PREVIEW_DISPLAY' => 'Habilitar Preview das Postagens',
));
6 changes: 1 addition & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
verbose="true"
bootstrap="../../../../tests/bootstrap.php"
>
Expand All @@ -18,14 +17,11 @@
<exclude>./tests/functional</exclude>
</testsuite>
<testsuite name="Extension Functional Tests">
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">./tests/functional/</directory>
<directory suffix="_test.php">./tests/functional/</directory>
</testsuite>
</testsuites>

<filter>
<blacklist>
<directory>./tests/</directory>
</blacklist>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./</directory>
<exclude>
Expand Down
32 changes: 21 additions & 11 deletions styles/all/template/topicpreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,14 @@
previewContainer
.stop(true, true) // stop any running animations first
.fadeOut('fast') // hide the topic preview with a fadeout
.animate({ top: '-=' + settings.drift + 'px' }, { duration: 'fast', queue: false }, function() {
// animation complete
.animate({
top: '-=' + settings.drift + 'px'
}, {
duration: 'fast',
queue: false,
complete: function() {
// animation complete
}
})
;
obj.restoreTitles('dt').restoreTitles('dl'); // reinstate original title attributes
Expand All @@ -110,14 +116,18 @@
};

return this.each(function() {
$(this).hover(showTopicPreview, hideTopicPreview).on('click', function() {
// Remove topic preview immediately on click as failsafe
previewContainer.hide();
// clear any existing timeouts
if (previewTimeout) {
previewTimeout = clearTimeout(previewTimeout);
}
});
$(this)
.on('mouseenter', showTopicPreview)
.on('mouseleave', hideTopicPreview)
.on('click', function() {
// Remove topic preview immediately on click as failsafe
previewContainer.hide();
// clear any existing timeouts
if (previewTimeout) {
previewTimeout = clearTimeout(previewTimeout);
}
})
;
});
};

Expand All @@ -139,7 +149,7 @@
// b. loading takes longer than timeout
var image = this;

$(image).bind('error', function() {
$(image).on('error', function() {
insertPlaceholder();
});

Expand Down
Loading

0 comments on commit 52ee900

Please sign in to comment.