Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[ticket/10650] Last post subject in forum list. #720

Closed
wants to merge 1,979 commits into
from

Conversation

Projects
None yet
Contributor

rahulr92 commented Apr 6, 2012

This patch displays the last post subject in the forum list with a link to the last post. A global toggle in the ACP is provided to toggle the feature on/off. It takes into consideration passworded forums and read permissions of user. Empty subject lines are not displayed.

imkingdavid and others added some commits Mar 28, 2012

[ticket/10586] Change the interface to an abstract class
This allows the common phpBB objects to be automatically accessible to
extensions without the author having to globalize and assign each one
himself. This is better because it also gives purpose to the
phpbb_extension_controller class; instead of just being the way to
ensure a handle() method is present, it also does this work for us.

PHPBB3-10586
Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10732] Add config_dev.php and config_test.php to .gitignore
Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10708] Check converted passwords for multi-byte characters

Conflicts:
	phpBB/includes/auth/auth_db.php
Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10730] Added label tag around "select" text in post splitting UI
[ticket/10705] Change WARNINGS_ZERO_TOTAL in en language
Located the WARNINGS_ZERO_TOTAL in the language and replaced it with
NO_WARNINGS

PHPBB3-10705
[ticket/10705] Change WARNINGS_ZERO_TOTAL in prosilver
Located the L_WARNINGS_ZERO_TOTAL in prosilver and replaced it with
L_NO_WARNINGS

PHPBB3-10705
[ticket/10705] Change WARNINGS_ZERO_TOTAL in subsilver2
Located the L_WARNINGS_ZERO_TOTAL in subsilver2 and replaced it with
L_NO_WARNINGS

PHPBB3-10705
Merge remote-tracking branch 'upstream/develop' into feature/merging-…
…style-components

* upstream/develop: (65 commits)
  [ticket/10730] Added label tag around "select" text in post splitting UI
  [ticket/10732] Add config_dev.php and config_test.php to .gitignore
  [ticket/10586] Added space in if statement
  [ticket/10586] Tidy up comments
  [task/php5.3] Updated range of tested PHP versions
  [task/php5.3] Looks like I missed a few places that needed PHP 5.2 changed to PHP 5.3.2
  [task/php5.3] Changed minimum PHP requirement for Ascraeus to 5.3.2
  [ticket/10723] Stop Travis running all tests on sqlite
  [ticket/10703] Added a condition to check if ext directory exists
  [task/travis] Refactor php version check for dbunit install
  [task/travis] Exclude functional and slow tests
  [ticket/10719] Revert "Skip functional tests on PHP 5.2"
  [task/travis-develop2] Update version from 5.3 to 5.3.2
  [task/travis] Dropping support for 5.2 in develop branch
  [task/travis] Some more small travis fixes
  [task/travis] Rename travis phpunit config files
  [task/travis] Fixing some travis issues
  [ticket/10684] Adjust function and parameter name, minor changes.
  [task/travis] Add automated testing to readme
  [task/travis] Removing development information
  ...

Conflicts:
	phpBB/install/database_update.php
Merge branch 'develop-olympus' into develop
Conflicts:
	phpBB/language/en/acp/common.php
[feature/event-dispatcher] Update core.page_header event
Update it to the new correct format.

PHPBB3-9550
Merge remote-tracking branch 'upstream/develop' into feature/event-di…
…spatcher

* upstream/develop: (35 commits)
  [ticket/10730] Added label tag around "select" text in post splitting UI
  [ticket/10732] Add config_dev.php and config_test.php to .gitignore
  [ticket/10586] Added space in if statement
  [ticket/10586] Tidy up comments
  [task/php5.3] Updated range of tested PHP versions
  [task/php5.3] Looks like I missed a few places that needed PHP 5.2 changed to PHP 5.3.2
  [task/php5.3] Changed minimum PHP requirement for Ascraeus to 5.3.2
  [ticket/10129] Remove apostrophes and plurals in ACP user management -> permissions language file as per ticket.
  [ticket/10703] Added a condition to check if ext directory exists
  [ticket/10708] Check converted passwords for multi-byte characters
  [ticket/10586] Tests finally work (thanks naderman)
  [ticket/10586] Correctly purge board cache and don't rename install directory
  [ticket/10586] trying to get tests to work
  [ticket/10586] more work on getting tests to pass
  [ticket/10586] Tests are coming along, just a little more to go
  [ticket/10586] Rename install directory back to install/ after tests
  [ticket/10586] browse tests now work, but mine dont. at least we are making progress
  [ticket/10586] initial work on copying fixtures. Note that this depends on 10706
  [ticket/10586] Adding the extensions used by the tests
  [ticket/10586] Now tests run, but fail. But here is what I have.
  ...
[feature/merging-style-components] Changing acp_styles text
Changing acp styles welcome message a little bit.

PHPBB3-10632
Merge pull request #662 from imkingdavid/ticket/10586
[ticket/10586] Use an abstract class that implements the interface
Merge remote-tracking branch 'imkingdavid/ticket/10727' into develop
* imkingdavid/ticket/10727:
  [ticket/10727] Do not hide Quick Reply with javascript on prosilver
[ticket/10270] Added JavaScript popups and basic AJAX functionality t…
…o PHP.

This commit adds the phpbb object (JavaScript), and alert and confirm box
methods. It also adds the first basic AJAX functionality, to deleting posts
in viewtopic.

PHPBB3-10270
[ticket/10271] Added phpbb.confirm_box (JavaScript).
As well as adding the method, this commit also changes the previous commit
so that deleting a post from viewtopic uses this method, too. This commit
has also made some improvements to phpbb.alert and phpbb.confirm.

PHPBB3-10271
[ticket/10272] AJAXified most links.
This commit makes some significant changes to the phpbb.confirm_box function
(namely, removing some duplicate code), and also manually adds most link
to the phpBB AJAX functions.

PHPBB3-10272
[feature/ajax] Cleaned up AJAX-related JavaScript.
Mostly just added comments, but has cleaned up some actual code too.

PHPBB3-10270
[ticket/10273] AJAXified approve / disapprove posts (in viewtopic).
This commit AJAXifies the moderator approval functionality, and adds it to
viewtopic instead of the MCP. This commit has involved some language changes,
which may affect fallbacks.

PHPBB3-10273
[ticket/10270] Cleaned up code and made popups fade.
This commit cleans up some code - mostly, replacing all instances of __self
with "that", and also replacing the parse_hidden function with jQuerys built
in .serialize. It also adds animations to the popups.

PHPBB3-10270
[ticket/10273] Added phpbb.ajaxify_form and converted accept / deny t…
…o it.

Also made a few minor improvements to other JavaScript.

PHPBB3-10273
[feature/ajax] Reduced duplicate code by merging all AJAX function in…
…to one.

This commit merges phpbb.confirm_box, phpbb.ajaxify and phpbb.ajaxify_form into
one function which automatically detects what is happening and calls the
correct code accordingly. This has removed a lot of duplicate code and
generally made the code cleaner.

PHPBB3-10270
[ticket/10270] Changed function names of jQuery modifications.
The code was modifying the jQuery code before, now the functions have been
renamed to unused function names.

PHPBB3-10270
[ticket/10272] Made some jQuery selectors more specific to avoid conf…
…licts.

Before, a link to any URL with, say, "mode=bump" in the title would have been
prevented from acting normally.

PHPBB3-10272
[ticket/10271] Added ability for exceptions to phpbb.ajaxify.
Also made it easy for additional options to be added in the future.

PHPBB3-10271
[ticket/10270] Removed the js anim functions.
This commit removes the hide_anim, show_anim and remove_anim functions and
replaces them with built in jQuery function that do exactly the same thing.

PHPBB3-10270
[feature/ajax] Replaced jQuery selectors with data attributes.
Due to problems that could have been caused by selecting the element using
jQuery selectors, they have been replaced by HTML5 data attributes.

PHPBB3-10270
[ticket/10271] AJAXified Quick-mod tools.
Also made some improvements to the exceptions.

PHPBB3-10271
[ticket/10291] AJAXified quick reply form.
Also changed the show quick reply button to a button, not a submit - it was
affecting the behaviour of phpbb.ajaxify.

PHPBB3-10291
[ticket/10270] Fixed a bug where fadedark wouldn't go.
If the confirm box was submitted as yes, then the fadedark would stay until it
was clicked. This commit fixes that.

PHPBB3-10270
[feature/ajax] Fixed a small bug in the JavaScript.
The bug meant that code outside of the function that ran on document ready would
not be able to access the phpbb object.

PHPBB3-10270
[ticket/10328] Added a JSON class.
The JSON class adds a consistent way to send JSON to the client, making
it perfect for AJAX (jQuery automatically parses it).

PHPBB3-10328
[ticket/10270] Lengthened the timeout on the AJAX request error.
It was at 3 seconds before, now it is at 5 seconds from when the popup
has faded in.

PHPBB3-10270
[ticket/10272] Zebra operations using AJAX are now less hacky.
Before, they were splitting stuff by the <br />, and now JSON::add() is
being used.

PHPBB3-10272

igorw and others added some commits Apr 1, 2012

Merge remote-tracking branch 'sadu/ticket/10740' into develop
* sadu/ticket/10740:
  [ticket/10740] Changed styling of phpbb_alert box, to be centered.
Merge remote-tracking branch 'upstream/develop' into ticket/10665
* upstream/develop:
  [ticket/10733] Fixing test
  [ticket/10733] Removing static from data providers
  [ticket/10731] Fixed addquote() to work on opera browser.
  [ticket/10731] Fixed addquote() to work on opera browser.
  [Ticket/10675] Correct language string ATTACH_DISK_FULL
  [feature/event-dispatcher] Adding composer.phar to .gitignore for olympus
  [ticket/10705] Change WARNINGS_ZERO_TOTAL in subsilver2
  [ticket/10705] Change WARNINGS_ZERO_TOTAL in prosilver
  [ticket/10705] Change WARNINGS_ZERO_TOTAL in en language
  [ticket/10675] Add disk full language string when posting attachments
Merge remote-tracking branch 'igorw/ticket/10740' into develop
* igorw/ticket/10740:
  [ticket/10740] Revert margin-left changes of previous commit
  [ticket/10740] Changed styling of phpbb_alert box, to be centered.
[ticket/10665] Moving filter parameters to one array
Moving filter parameters to one array in template compiler class

PHPBB3-10665
[ticket/10665] Changing template->_js_include to public
Changing template->_js_include to public function

PHPBB3-10665
[ticket/10665] New test class for templates with tree
New parent template test class for tests that use styles tree

PHPBB3-10665
[ticket/10665] Solution for T_SUPER_TEMPLATE_PATH
Temporary solution for T_SUPER_TEMPLATE_PATH pointing to wrong directory, variable will be completely removed later because it will be obsolete

PHPBB3-10665
[ticket/10665] Adding includejs to acp templates
Adding includejs to acp overall_footer.html

PHPBB3-10665
Merge branch 'develop' of github.com:phpbb/phpbb3 into develop
* 'develop' of github.com:phpbb/phpbb3:
  [ticket/10740] Revert margin-left changes of previous commit
Merge remote-tracking branch 'cyberalien/ticket/10665' into develop
* cyberalien/ticket/10665:
  [ticket/10665] Adding includejs to acp templates
  [ticket/10665] Solution for T_SUPER_TEMPLATE_PATH
  [ticket/10665] New test class for templates with tree
  [ticket/10665] Changing template->_js_include to public
  [ticket/10665] Moving filter parameters to one array
  [ticket/10665] INCLUDEJS unit test
  [ticket/10665] Changing template compiler test
  [ticket/10665] INCLUDEJS template changes
  [ticket/10665] INCLUDEJS template tag
Merge pull request #670 from imkingdavid/feature/qrpreview
[feature/qrpreview] Preview from Quick Reply
[ticket/10438] Alligning the Smileys on the same line as the text.
Changed the styling of smilies to appear at the same level as
text, by adding vertical-align: text-bottom css property to all
smilies. Edited functions_content.php to add class="smilies"
to all parsed smilies.

PHPBB3-10438
[ticket/10742] Fixing table widths
Fixing table widths for members list, team page, online users list

PHPBB3-10742
Merge remote-tracking branch 'cyberalien/ticket/10742' into develop
* cyberalien/ticket/10742:
  [ticket/10742] Fixing table widths
Merge remote-tracking branch 'sadu/ticket/10438' into develop
* sadu/ticket/10438:
  [ticket/10438] Alligning the Smileys on the same line as the text.
Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10699] Long h2 title breaks div.minitabs in MCP
  [ticket/10699] Long h2 title breaks div.minitabs in MCP

Conflicts:
	phpBB/styles/prosilver/theme/tweaks.css
[ticket/10752] Removing globals acp_styles
Removing global variables from functions in acp_styles

PHPBB3-10752
[ticket/10752] Pass-by-reference fix for acp_styles
Fixing pass-by-reference bug in acp_styles

PHPBB3-10752
[ticket/10752] More fixes for acp_styles
Fixing return doc blocks, spacing, incorrect sorting function and other minor fixes

PHPBB3-10752
[ticket/10752] Changing private to protected variables in acp_styles
Changing private to protected variables in acp_styles

PHPBB3-10752
[ticket/10752] Fixes for acp_styles
Adding form token, changing functions to public/protected, fixing few more errors

PHPBB3-10752
Merge remote-tracking branch 'github-cyberalien/ticket/10752' into de…
…velop

* github-cyberalien/ticket/10752:
  [ticket/10752] Fixes for acp_styles
  [ticket/10752] Changing private to protected variables in acp_styles
  [ticket/10752] More fixes for acp_styles
  [ticket/10752] Pass-by-reference fix for acp_styles
  [ticket/10752] Removing globals acp_styles
Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10658] Do not fetch ranks into the $ranks array, it is no longer used.
  [ticket/10658] Use get_user_rank() for group ranks on group view.
[ticket/10650] Displaying last topic on forum list
The most recent topic title of the forum can now
be displayed on the board index. An option is provided
in the ACP under the 'General Forum Setting' which
allows the admin to enable or disable this feature.

PHPBB3-10650
[ticket/10650] Added static sql files
Ran create_schema_files.php and added
the generated static sql files to the commit.

PHPBB3-10650
[ticket/10650] Changed language files and forumlist
The entry in languages have been changed from
title to subject. Also the IF condition in forumlist_body.html
has been properly intented.

PHPBB3-10650
[ticket/10650] Corrected space before true
Inserted a space before 'true' as per coding
guidelines.

PHPBB3-10650
[ticket/10650] Cropped subject and inserted newline
The subject being displayed in the forum list have been
shortened to 30 characters. Also it is now being shown
in a separate line.

PHPBB3-10650
[ticket/10650]Added permission checking and utf8 functions
Passworded forums and ones in which user doesn't have
read access will be excluded. Also uft8 based string functions and
html encode/decode functions have been used to sanitise subject.

PHPBB3-10650
Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10607] Added 'Powered by' translation string.

Conflicts:
	phpBB/adm/index.php
	phpBB/language/en/common.php
[ticket/10650] Corrected intendation
Corrected the intendation of if condition.

PHPBB3-10650
[ticket/10650] Added checking for empty subjects
Now empty subjects will not be displayed in a
new line on the forum list.

PHPBB3-10650
[ticket/10650] Revert merge of 'rahulr92/ticket/10650' into develop
The pull request (#654) was merged a little too quickly.

In particular, display_last_subject per-forum option needs consensus.

This reverts commit b1fb34a, reversing
changes made to 7d6b289.

PHPBB3-10650
Merge branch 'ticket/10650' into develop
* ticket/10650:
  [ticket/10650] Revert merge of 'rahulr92/ticket/10650' into develop
Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10760] Fix numbering in php fun facts.
  [ticket/10760] Value must be quoted as it might be two words.
  [ticket/10760] PHP is great. This commit is the proof.
  [ticket/10760] Catch both versions of parse error output in php.
  [ticket/10760] Account for display_errors=stderr in pre-commit hook.
  [ticket/10760] Quote PHP_BIN when using it.
  [ticket/10760] Use echo -e only if echo understands -e.
  [ticket/10760] Use externally specified PHP_BIN if any.
[ticket/10547] User is not logged in as admin after installation
After installing, when user clicks Login button (final installation step),
he is not logged in because there's a missing var ($data)

PHPBB3-10547
[ticket/10575] Fixing non-static access to static functions get_instance
These changes should solve the strict standards error about accessing
the non-static get_instance() in a non-static way.
For that, I changed the get_instance methods to static methods.

PHPBB3-10575
[ticket/10575] Adding public visibility to the methods.
Added public visibility to the methods

PHPBB3-10575
Merge remote-tracking branch 'p/ticket/10547' into develop
* p/ticket/10547:
  [ticket/10547] User is not logged in as admin after installation
Merge remote-tracking branch 'brunoais/ticket/10575' into develop
* brunoais/ticket/10575:
  [ticket/10575] Adding public visibility to the methods.
  [ticket/10575] Fixing non-static access to static functions get_instance
Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10508] Marked as read message now less specific.

@rahulr92 rahulr92 closed this Apr 6, 2012

Contributor

rahulr92 commented Apr 6, 2012

Some changes were lost when trying to resolve conflicts while cherry-picking useful commits from earlier ticket branch (pr #654). I will make required corrections and reopen this pr.

@nickvergessen nickvergessen commented on the diff Apr 6, 2012

phpBB/includes/functions_display.php
@@ -397,6 +397,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
if ($row['forum_last_post_id'])
{
$last_post_subject = $row['forum_last_post_subject'];
+ if (utf8_strlen(htmlspecialchars_decode($last_post_subject)) > 30)
+ {
+ $last_post_subject = htmlspecialchars(utf8_substr(htmlspecialchars_decode($last_post_subject, 0, 30)));
@nickvergessen

nickvergessen Apr 6, 2012

Contributor

The brakets on this line are wrong!

p and others added some commits Apr 8, 2012

Merge PR #718 branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10764] FAQ now mentions Area51 instead of SourceForge
  [ticket/10764] FAQ now mentions GitHub instead of SourceForge
Merge PR #716 branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10455] Removed NOTE from prosilver overall_header.html.
[ticket/10650] Displaying last topic on forum list
The most recent topic title of the forum can now
be displayed on the board index. An option is provided
in the ACP under the 'General Forum Setting' which
allows the admin to enable or disable this feature.

PHPBB3-10650
[ticket/10650] Added static sql files
Ran create_schema_files.php and added
the generated static sql files to the commit.

PHPBB3-10650
[ticket/10650] Changed language files and forumlist
The entry in languages have been changed from
title to subject. Also the IF condition in forumlist_body.html
has been properly intented.

PHPBB3-10650
[ticket/10650] Corrected space before true
Inserted a space before 'true' as per coding
guidelines.

PHPBB3-10650
[ticket/10650] Cropped subject and inserted newline
The subject being displayed in the forum list have been
shortened to 30 characters. Also it is now being shown
in a separate line.

PHPBB3-10650
[ticket/10650]Added permission checking and utf8 functions
Passworded forums and ones in which user doesn't have
read access will be excluded. Also uft8 based string functions and
html encode/decode functions have been used to sanitise subject.

PHPBB3-10650
[ticket/10650] Corrected intendation
Corrected the intendation of if condition.

PHPBB3-10650
[ticket/10650] Added checking for empty subjects
Now empty subjects will not be displayed in a
new line on the forum list.

PHPBB3-10650
[ticket/10650] Changed acp option from per forum to global
Changed the display last subject acp toggle option from
per forum to global. Modified associated database entries.
New option is available in ACP General->Board Features.
Also corrected <br /> in forumlist_body.html.

PHPBB3-10650
[ticket/10650]Removed incorrect newline
Deleted additional line in the end of database_update.php

PHPBB3-10650

@rahulr92 rahulr92 reopened this Apr 8, 2012

@rahulr92 rahulr92 closed this Apr 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment