Loading...
 
Skip to main content
 Note
This page is to document "what Tiki should do". For feature documentation (what Tiki does), please see corresponding page on doc site

History: Staging and Approval

Preview of version: 51

Trunk Flagged Revisions

Fatal error: Undefined class constant 'FLAGGED' in lib/wiki/flaggedrevisionlib.php on line 21

[+]

Error after editing page

[+]

Error after categorizing

[+]

Fatal error: Using $this when not in object context in lib/wiki/renderlib.php on line 362

[+]

Tiki9 Flagged Revisions

Flagged revisions could use a little TLC. See http://doc.tiki.org/Flagged+Revisions#FAQ Here are some notes that are hoped to make that TLC easier for a newb.

  1. How are they implemented in the database?
    See the Database references table below. When you approve a Flagged Revision, a record is appended in tiki_objects_attributes, with itemId=tiki_history.historyId, type="wiki history", attribute="tiki.history.moderation", and value="OK". Then follow table.fields tiki_objects_attributes. itemId => tiki_history.historyId => tiki_history.pageName and tiki_history.version, which are two fields which match those in tabe tiki_pages.
  2. There is no way to list all current pending Flagged Revisions.
    1. A simple way to implement that might be to modify tiki-listpages.php by adding another Filter, very similar and following the tiki-listpages.php and tikilib.php code paths of "exact_match", selectable by a checkbox, labeled something like "Flagged Revisions pending approval". See tikilib.php function list_pages(). Need to define $mid = "where" clause, and "elseif ($type == 'flaggedrev_pending')".



Database references

Table Relevant Fields
tiki_pages page_id(=14)
pageName(=Procedures)
version(=2)
data(=latest content, may or may not yet be approved)
tiki_pages_changes Empty
tiki_historyhistoryId(=77)
pageName(=Procedures)
version(=2)
data(=blob)
tiki_objects_attributesattributeId(=autoincrement)
type(="wiki history")
itemId(=tiki_history.historyId)
attribute(="tiki.history.moderation")
value(="OK")

When you save an edit to a wiki page, a new record is appended to tiki_history database table, with an incremented version number. The new current wiki content is stuffed in the data blob field (easily readable in a text editor). tiki-pagehistory.php?page=PageName will list each saved edit separately, but those that have been approved contain the text "(approved)" in the "Information" column; so where is that "(approved)" stored or calculated?

So, after all this review, I think we can implement a listing of wiki pages pending flagged-revision approval by adding, on tiki-listpages.php, to the Type: dropdown, which currently has only an option for "Pages not in structure", a new option called "Pages Pending Approval".

Reference Notes, Ignore

TPL files

  1. tiki-flaggedrev_approval_header.tpl
    {if $prefs.flaggedrev_approval eq 'y' and $revision_approval}
    {if ($revision_approved or $revision_displayed) and $revision_approved neq $lastVersion}
    {if $lastVersion eq $revision_displayed}

PHP Files

  1. lib/wiki/flaggedrevisionlib.php
    1. function page_requires_approval($pageName)
      1. $attributelib->set_attribute('wiki history', $version_info'historyId', $attribute, $value);
      2. $attribute="tiki.history.moderation", $value="OK" ($flag="moderation")
  2. lib/wiki/histlib.php
  3. tiki-pagehistory.php
    1. $auto_query_args = array('page', 'oldver', 'newver', 'compare', 'diff_style', 'show_translation_history', 'show_all_versions', 'history_offset', 'paginate', 'history_pagesize');
    2. $info = $tikilib->get_page_info($page);
    3. if (isset($_REQUEST'preview', $_REQUEST'flaggedrev', $_REQUEST'page') && $prefs'flaggedrev_approval' 'y' && $tiki_p_wiki_approve 'y') {$targetFlag = null;
      1. if 'approve'" class="wiki wikinew text-danger tips isset">$_REQUEST'approve' {

    $targetFlag = 'OK';
    $targetVersion = (int) $_REQUEST'approve';
    $targetFlag is what is pushed into the "value" field in database table tiki_object_attributes.
      1. $flaggedrevisionlib->flag_revision($info'pageName', $targetVersion, 'moderation', $targetFlag);
  4. lib/attributes/attributelib.php

Notes

  1. page_ref_id is a wiki Structure page reference. Interestingly, tiki-editpage.php?page=PageName&page_ref_id=5 has both a "page=" and a "page_ref_id=".
  2. Is it possible to create a search like in tiki-search_replace.php, $results = $wikilib->get_pages_contains() that instead lists pages with pending approvals?
  3. By selecting the appropriate checkboxes here , tiki-listpages.php can list "Last ver." and "Vers.", which are usually the same, but sometimes different, but, at the moment don't make sense to my test page pending Flagged Revisions, dangit. Also, at the bottom, it has a "Perform action with checked:" dropdown that could include an option to approve the pending Flagged Revisions, someday.

Tiki7 revamp

LPH is revamping this feature in Tiki7

  • Needs to handle i18n
    • workflow
      • 0- Live
      • 1- Draft (one language is edited)
      • 2- Ready for content approval
      • 3- Content it approved, ready for translation
      • 4- Translation is done, both languages ready to go live
      • 0- Live




Notes for Tiki6

  • "There is a staging page (not yet approved) for this page." -> A link should be added for people with perms
  • * in page name conflicts with bad characters
  • Approval button should be in history as well http://demo.tiki.org/staging/tiki-approve_staging_page.php?page=*NewPage1
  • Make nicer UI when page is approved (no links to deleted page) and empty "Action" column
  • http://demo.tiki.org/staging/tiki-pagehistory.php?page=ThisPageDoesNOtExistYet


Bugs/Tracker

Open

Pending

Closed




Related

Alias

History

Advanced
Information Version
30 Dec 14 16:47 GMT-0000 Xavier de Pedro [Rollback by marclaporte to version 65] 67
29 Sep 18 12:30 GMT-0000 Marc Laporte 66
30 Dec 14 16:47 GMT-0000 Xavier de Pedro 65
30 Dec 14 15:59 GMT-0000 Xavier de Pedro 64
30 Dec 14 15:04 GMT-0000 Xavier de Pedro 63
30 Dec 14 14:47 GMT-0000 Xavier de Pedro 62
30 Dec 14 14:45 GMT-0000 Xavier de Pedro 61
19 Dec 14 11:57 GMT-0000 Xavier de Pedro 60
19 Dec 14 11:56 GMT-0000 Xavier de Pedro 59
03 Nov 13 06:40 GMT-0000 Marc Laporte Auto-TOC is now activated 58
21 Mar 13 16:23 GMT-0000 Marc Laporte 57
21 Mar 13 15:15 GMT-0000 Marc Laporte fixed 56
20 Mar 13 21:54 GMT-0000 Marc Laporte 55
20 Mar 13 21:51 GMT-0000 Marc Laporte 54
20 Mar 13 21:46 GMT-0000 Marc Laporte fixed 53
20 Mar 13 21:12 GMT-0000 Marc Laporte fixed 52
20 Mar 13 21:07 GMT-0000 Marc Laporte 51
20 Mar 13 19:53 GMT-0000 Marc Laporte 50
20 Mar 13 19:46 GMT-0000 Marc Laporte 49
04 Oct 12 21:18 GMT-0000 E.W. Peter Jalajas 48
04 Oct 12 20:23 GMT-0000 E.W. Peter Jalajas 47
03 Oct 12 19:45 GMT-0000 E.W. Peter Jalajas 46
03 Oct 12 19:35 GMT-0000 E.W. Peter Jalajas 45
03 Oct 12 19:32 GMT-0000 E.W. Peter Jalajas 44
03 Oct 12 19:26 GMT-0000 E.W. Peter Jalajas 43

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Kanban
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend
Terms and Conditions
Theme
TikiTests
Federated Timesheets
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools