Social tools/Archive/Phase II
(Redirected from Social tools/Phase II)
Social tools, phase 2
late June 2011-July 2011
List of changes to social extensions (excluding SocialProfile itself):
BlogPage
editversion 2.0 changes:
- wfLoadExtensionMessages() cruft removed
- self-contained (removed ListPages dependency, moved ArticlesHome & ArticleLists to the same directory) to the extent where it is possible (i.e. UserProfile integration code is in BlogHooks.php, not in SocialProfile/UserProfile/UserProfilePage.php)
- ArticleLists can be embedded on wiki pages
- i18n support improved, namespaces can now be translated
- ported UserStatsTrack::updateCreatedOpinionsCount() to CreatedOpinionsCount.php
- improved crappy regexes
- added new functions in BlogPage, some from ListPages, some totally original
- improved wfAllowShowEditBlogPage() to show a new, different message when an anon tries to edit a page in the NS_BLOG namespace
- new BlogHooks class, which contains all the hooked functions used by this extension
- initial ResourceLoader support added
- new special page, Special:CreateBlogPost, for writing blog posts
- TODO: category handling (MW:Blog-category & MW:Blog-by-user-category) is awfully hacky, make it less so even if we have to introduce a new msg
- TODO: tag cloud blacklist is stupid; it will not blacklist the 1st category because it does not match the expected format (\n* ) and that space shouldn't be mandatory there
- NOTE: CreateForms was removed in http://trac.wikia-code.com/changeset/31390
Comments
editversion 2.4 changes:
- wfLoadExtensionMessages() cruft removed
- CSS is no longer loaded in Comment::display(), but rather in the main extension setup file
- initial ResourceLoader support
- used $this->getTitle() instead of SpecialPage::getTitleFor( ... ) when appropriate
- removed unused legacy (AGM) ChangeToStep() function from Comment.js
- JS file rewritten to be more object-oriented
- i18n JS globals loaded via the MakeGlobalVariablesScript hook in displayComments()
- using Title::getArticleID() instead of Title::$mArticleID in displayComments()
- $wgCommentsLog variable was removed; comment logging is now unconditionally enabled, but hidden, like the patrol log
- removed Comment::$title and Comment::setTitle() + the related code from displayComments() as unused
- added initial support of normal MW parser hook args to displayComments()
- removed Comment::$Userid and Comment::$Username in favor of $wgUser->getId() and $wgUser->getName() -- addslashes srsly sucks. This fixes the annoying, ages-old doubleslashing issue: when [[User:Testing "for XSS]] would submit a comment, it'd show up as "Testing \"for XSS" and the link would be incorrect
- new <commentsoftheday /> parser hook, see CommentsOfTheDay.php; load that file separately in your wiki's LocalSettings.php if you need it, it's not loaded by default
- TODO: look into changing the SQL file to be more SQLite-compatible
- TODO: remove the useless vote key ($mk) argument from certain AJAX functions
- TODO: use wfTimestamp() and wfTimestampNow() like normal MW code does for timestamps (this might require changing the SQL fields from datetime into varchar or something...)
FanBoxes
editversion 2.0 changes:
- THAT FUCKING UPLOAD FORM WAS FINALLY REWRITTEN TO BE 1.16-COMPATIBLE ON 26 JUNE 2011 (and a bit on 27, too; yeah, I worked way past midnight)
- JS rewritten to be object-oriented
- rewrote the nasty raw SQL in UserFanBoxes class to use MW's Database stuff (TODO: test this and if test passes, drop the old raw SQL code!)
- wfLoadExtensionMessages() cruft removed
- moved all hooked functions into a FanBoxesHooks class, renamed the functions and autoloaded the class in the main setup file
- SQL file changed to be compatible with SQLite (and maybe other DBMSes, too)
- i18n changes:
- new FanBox.alias.php file to allow translators to translate the special page names
- new FanBox.namespaces.php file to allow translators to translate the UserBox namespace names + initial translations in Finnish (fi) and Dutch (nl)
- new constant, NS_FANBOX_TALK, defined in the main extension setup file for the NS translation file
- removed unused i18n message 'fanbox-namespace'
- fixed an E_DEPRECATED (Call-time pass-by-reference) in FanBoxPage.php
- new
user
argument to the<userboxes />
hook - fixed a bug in the YUI colorpicker on SpecialFanBoxes.php where it wasn't possible to set the background colors for left and right sides, only thing you could set was the text code
- added handling for $wgFanBoxPageDisplay['comments'] to FanBoxPage::view() (copied from PollPage::view())
- [[Special:ViewUserBoxes/Username]] can be used to view Username's userboxes
- removed the unused global variable $wgFanBoxDirectory; we already use standard dirname( __FILE__ ) stuff in the main setup file to build paths so we don't need that
- Renameuser support via the RenameUserSQL hook
- TODO: in FanBoxes::execute(), make that one foreach() loop i18n-compatible by not hardcoding "Userboxes_by_user_" in
- TODO: stuff like FanBox::updateFan() and FanBox::addFan() could and should take an array as the argument instead of 10 (addFan) or 11 (updateFan) separate args
- TODO: tracking for [[FanBox:]] links
- TODO: use wfTimestamp() and wfTimestampNow() like normal MW code does for timestamps
LinkFilter
editversion 2.0 changes:
- wfLoadExtensionMessages() cruft removed
- all hooked functions moved from Link.php to the new LinkFilterHooks class and renamed accordingly
- ResourceLoader support implemented
- i18n changes:
- new Link.alias.php file to allow translators to translate the special page names
- new Link.namespaces.php file to allow translators to translate the Link namespace names + initial translations in Finnish (fi) and Dutch (nl)
- new constant, NS_LINK_TALK, defined in the main extension setup file for the NS translation file
- JS rewritten to be object-oriented + inline JS basically removed
- SQL file changed to be compatible with SQLite (and maybe other DBMSes, too)
- support for update.php added -- when you run maintenace/update.php, a hooked function adds the link table to the DB
- UI work: some error-ish messages are shown to the user on Special:LinksHome when there are no links whatsoever and on Special:LinkApprove when the queue is empty and also when no links have been approved recently
- LinkApprove, LinksHome and LinkSubmit are now listed on Special:SpecialPages
- Renameuser support via the RenameUserSQL hook
- RSS/Atom feed support via the new LinkFeed class; feed format based on http://web.archive.org/web/20080630034148/http://www.armchairgm.com/rss/links.xml
- TODO: change timestamp handling for better i18n etc. so that it uses wfTimestamp(Now)() like all other MW extensions do
- TODO: would be nice to move ad handling code to ShoutWikiAds extension and replace it with a hook in LinkFilter
PictureGame
editversion 2.0 changes:
- THAT FUCKING UPLOAD FORM WAS FINALLY REWRITTEN TO BE 1.16-COMPATIBLE ON 26 JUNE 2011 (and a bit on 27, too; yeah, I worked way past midnight)
- it's a separate special page now rather than an action of Special:PictureGameHome, I figured it'd be the easiest that way
- SQL file changed to be compatible with SQLite (and maybe other DBMSes, too)
- wfLoadExtensionMessages() cruft removed
- code quality: (int)$wgRequest->getVal( 'stuff' ) changed to $wgRequest->getInt( 'stuff' )
- picturegame_images.flag changed from an enum() to a tinyint(2) + three new defines added to the main setup file
- added new i18n messages (picturegame-gallery, picturegame-gallery-empty, picturegame-empty, picturegame-nothing-to-edit, picturegame-images-category, picturegame-none, picturegame-js-edit, picturegame-js-error-title, picturegame-js-error-upload-imgone, picturegame-js-error-upload-imgtwo, picturegame-js-editing-imgone, picturegame-js-editing-imgtwo)
- no more fatals when the database tables for PictureGame have no info
- rewrote JS to be object-oriented + to use jQuery instead of YUI
- fixed plenty of "Trying to access the property of a non-object" notices
- Renameuser support via the RenameUserSQL hook
PollNY
editversion 2.0 changes:
- SQL file changed to be compatible with SQLite (and maybe other DBMSes, too)
- i18n changes:
- new Poll.alias.php file to allow translators to translate the special page names
- new Poll.namespaces.php file to allow translators to translate the Poll namespace names + initial translations in Finnish (fi) and Dutch (nl)
- new constant, NS_POLL_TALK, defined in the main extension setup file for the NS translation file
- rewrote JS to be object-oriented (including the lightbox stuff)
- moved all hooked functions from the main setup file into the new PollNYHooks class, which is autoloaded in the main setup file
- new "poll-timestamp" class in the CSS file, Poll.css
- wfLoadExtensionMessages() cruft removed
- code quality improvements, such as:
- $wgRequest->getVal( 'something' ) changed to $wgRequest->getInt( 'something' ) when we know/want/expect an integer
- $wgUser was not declared as a global in AdminPoll::execute() (!!!)
- pagination moved into a separate function in AdminPoll class
- HTML that has only very minor PHP bits in SpecialCreatePoll.php moved into create-poll.tmpl.php
- THAT FUCKING UPLOAD FORM WAS FINALLY REWRITTEN TO BE 1.16-COMPATIBLE ON 26 JUNE 2011 (and a bit on 27, too; yeah, I worked way past midnight)
- Renameuser support via the RenameUserSQL hook
- TODO: rewrite Poll::getRandomPollID() not to use raw SQL and test it
- TODO: CSS fix for Special:AdminPoll -- .view-poll-row's padding-bottom is 15px, 150px looks better
- TODO: improve ResourceLoader support; specifically, the 'poll-finished' msg which takes two params: $createPollObj->getFullURL() and $wgTitle->getFullURL()
- maybe create a addJSGlobals() method in PollHooks and have it output _POLL_IFRAME_URL and _POLL_FINISHED messages and load the rest via RL?
QuizGame
editchanges in version 2.0:
- THAT FUCKING UPLOAD FORM WAS FINALLY REWRITTEN TO BE 1.16-COMPATIBLE ON 26 JUNE 2011 (and a bit on 27, too; yeah, I worked way past midnight)
- initial ResourceLoader support
- got rid of that one useless extension function
- wfLoadExtensionMessages() cruft removed
- SQL file changed to be compatible with SQLite (and maybe other DBMSes, too)
- JS code quality: declared some local variables as such with the var keyword
- made use of $this->getTitle() in the main special page file
- removed an unused variable in QuizLeaderboard.php
- new alias file for i18n
- renamed some i18n messages and tweaked some other msgs
- changed quizgame_questions.q_flag from an enum() to tinyint(2), added some new defines in main setup file and altered other files as necessary
- rewrote JS as object-oriented, copied LightBox.js from PollNY's directory
- nuked showAnswerBox() function; originally in renderwelcomepage.js but never used anywhere
- fixed plenty of bugs in JS
- took out plenty of dead code from the switch() loop in QuizGameHome::execute()
- valid values for questionGameAction are:
- adminPanel
- createForm
- createGame
- completeEdit
- editItem
- launchGame
- renderPermalink
- valid values for questionGameAction are:
- rewrote the raw SQL in QuizGameHome::adminPanel() to use MW's Database class; this was easy after the introduction of those constants
- quiz log logs other actions than just crations (deletions, flaggings, unflaggings, protections)
- Renameuser support via the RenameUserSQL hook
- TODO: maybe $max_answers = 8; could be a system message instead (so that site admins can configure it)?
- TODO: get rid of some of the raw SQL, i.e. in QuizGameHome::completeEdit()
- TODO: might need to change .credit-box's padding-bottom to 150px or something like that
RandomFeaturedUser
changes in version 1.1:
- wfLoadExtensionMessages() cruft removed
- SQL files changed to be compatible with SQLite (and maybe other DBMSes, too)
RandomGameUnit
changes in version 2.0:
- wfLoadExtensionMessages() cruft removed
- hardened against possible, edge case fatals (added is_object() checks)
- changed the PictureGame SQL query in wfGetRandomGameUnit() to use 1 (=PICTUREGAME_FLAG_FLAGGED) instead of 'FLAG' because PictureGame's schema was changed earlier
SiteMetrics
editchanges in version 1.1:
- initial ResourceLoader support
- wfLoadExtensionMessages() cruft removed
Video (still under heavy development)
editchanges in version 1.3:
- SQL file changed to be compatible with SQLite (and maybe other DBMSes, too)
- hooked functions moved into the new VideoHooks class, which is autoloaded in the main setup file
- videos can now be deleted and undeleted
- initial ResourceLoader support
- wfLoadExtensionMessages() cruft removed
- i18n changes:
- new Video.alias.php file to allow translators to translate the special page names
- new Video.namespaces.php file to allow translators to translate the Video namespace names + initial translations in various languages
- new constant, NS_VIDEO_TALK, defined in the main extension setup file for the NS translation file
- renamed some messages and added some new ones
- fixed a typo in the extension description
- all video provider classes moved from VideoClass.php into their separate files in the new providers/ directory
- support added for many new video providers, namely:
- Archive.org
- Blip.tv
- Hulu
- Gametrailers
- GameVideos
- GoGreenTube
- MyVideo.de
- Sevenload
- South Park Studios
- Viddler
- Vimeo
- WeGame
- support for update.php added -- when you run maintenace/update.php, a hooked function adds the video and oldvideo tables to the DB
- Renameuser support via the RenameUserSQL hook
- TODO: finish Special:Undelete interface...but how? SpecialUndelete.php sucks
VoteNY
editversion 2.3.3 changes:
- JS rewritten to be object-oriented and PHP changed accordingly
- fixed bug where an unauthorized user (one without the 'vote' user right) was able to vote for pages if they knew the name(s) of the AJAX function(s) and the arguments to pass to said function(s)
- SQL file changed to be compatible with SQLite (and maybe other DBMSes, too)
- initial ResourceLoader support
- removed some unused globals
- wfLoadExtensionMessages() cruft removed
- using Title::getArticleID() instead of Title::$mArticleID in renderVote()
- parser cache is disabled in renderVote() and we can add the CSS & JS there
- Renameuser support via the RenameUserSQL hook
- new special page, Special:TopRatings, to list the top rated pages; also supports NS/category filtering
- moved global (top-level) functions from Vote.php into the new VoteHooks class, renamed functions accordingly and autoloaded the new class
- the required DB table (Vote) is now created when the user runs maintenace/update.php
- TODO list:
- Version 2.4:
- get rid of the unused votekey stuff in the Vote class + Vote_AjaxFunctions.php + Vote.js
- Version 2.5:
- drop pre-1.17 compatibility and require ResourceLoader
- Version 2.4: