Closed GoogleCodeExporter closed 9 years ago
Original comment by lucasreddinger
on 9 Jan 2007 at 2:36
Original comment by lucasreddinger
on 19 Feb 2007 at 9:53
i was going to start work on this tonight. i planned on using xdiff
(http://pecl.php.net/package/xdiff) to make this feature. but i cannot figure
out how
to add the extension on windows. it's not on the win32 binary page
(http://pecl4win.php.net/list.php). so i can't develop using it on this
computer. and
our host doesn't have that extension, either. so i'm lacking a development
environment at the moment.
here's how i plan to implement revisions for ttf:
ALTER TABLE `ttf_post` ADD `rev` SMALLINT NOT NULL DEFAULT '0' AFTER
`author_id` ;
CREATE TABLE `ttf_revision` (
`rev_id` MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`post_id` MEDIUMINT NOT NULL ,
`author_id` MEDIUMINT NOT NULL ,
`date` INT NOT NULL ,
`ip` VARCHAR( 15 ) NOT NULL ,
`body` LONGTEXT NOT NULL
) ;
here's how it would work:
* posts are entered into ttf_post as usual, with the table storing raw entry,
and the
post body being formatted on select.
* when a user edits a post for the first time, the original post body is copied
to
ttf_revision as rev 0. the new post body is diffed against the old, and the
unified
diff is stored in ttf_revision as rev 1. the resultant patched post body is
stored in
ttf_post.
* when displaying a thread, ttf_post is selected from, which contains the
patched
HEAD of each post's revisions. if if rev>0, then the number of revisions is
displayed
along with a link to a page that shows the edit history.
Original comment by lucasreddinger
on 12 Mar 2007 at 6:59
i've decided to push this feature beyond v1.0.
this is because i'm looking for a prompt v1.0 release and i want all data
archival
features implemented in a branch (edit revisions, user profile and title
revisions, &c)
there will be a new branch structure after v1.0 with the introduction of
ttfproject.com.
Original comment by lucasreddinger
on 21 Mar 2007 at 9:14
just a question, is there a reason or benefit for doing the diffs as opposed to
just
storing the old post? it will take up less space with diffs obviously, but more
processor(which still wouldn't be much until huge amounts on traffic).
Original comment by fakeemp...@gmail.com
on 20 Apr 2007 at 4:29
well, the idea is that when you see an edited post, it will say something like
"2
revs" as a link. click on it, and you can browse the revisions with diff
highlighting.
rev 0 will be stored as the base
rev 1, 2, ... will be stored as diffs
then in ttf_post, the complete formatted BASE+patches will be stored. so when
browsing threads, they aren't patched on demand.
i guess i could just store the complete posts and make a function to highlight
differences. i'll probably do that with user titles.
Original comment by lucasreddinger
on 20 Apr 2007 at 4:47
changing the milestone.. this _is_ a v1.0 issue.
maple, ref:
http://www.thinktankforums.com/thread.php?thread_id=683
Original comment by lucasreddinger
on 20 Apr 2007 at 4:51
ttf has a fully working versioning system now that encompasses post revisions.
Original comment by lucasreddinger
on 22 Apr 2007 at 8:47
Original issue reported on code.google.com by
lucasreddinger
on 9 Jan 2007 at 2:17