Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Post Edit History Viewer Details »»
Post Edit History Viewer
Version: 1.00, by Lieva Lieva is offline
Developer Last Online: Mar 2008 Show Printable Version Email this Page

Version: 3.5.1 Rating:
Released: 01-21-2006 Last Update: 11-06-2006 Installs: 46
DB Changes Uses Plugins
Is in Beta Stage  
No support by the author.

When someone edits a post, the old message is stored in another table before the new one overwrites the old message.

Posts that have been edited will have "view edit history" displayed below the post count in the postbit.

Clicking "view edit history" allows previous versions of a post to be seen.

The postbit and postbit_legacy templates are altered using a similar method to the one used in the vbshout extension by Zero Tolerance, i.e. a search and replace. This means that no manual alterations to these templates are required.

Normally, everyone can see the post history for all the posts, however, the XML file post_hist_mods_only.xml restricts it to mods only (and the poster themselves). (Both versions should not be installed at the same time).

--------------------------------

Updated:

use post-hist_1_1b.zip

Changes

- Enable/Disable by forum
-- On/Off by forum

- Enable/Disable by usergroup
-- Can see own history: Yes/No
-- Can see everyone's history: Yes/No

- Indicates who made the edit (if it wasn't the original author)

- Workaround for unknown templates
-- Insert <<Insert Post History>> into postbit and postbit_legacy templates
-- (This is only for templates where the auto-match doesn't work)

The options are controlled by admincp.

By default, nobody can see any of the histories. At minimum, you should set the admin usergroup to see all histories.

Request

I don't know how 3.6.x products work, but if someone tries it on 3.6.x and it works, that would be good to know. I don't actually have 3.6 on our own forums, so can't test it.

Also, if you find out any bugs for < 3.6, that would be good to know too.

Install Info

The zip file contains:

bit_field_post_hist.xml -> XML for permissions
post_hist_1_1.xml -> product file

To install:

copy bit_field_post_hist.xml to /includes/xml

and install the product.

In theory, this should work as an upgrade to the previous version. However, I haven't tested that.

If you uninstall the old version and install the new version, you will lose any saved post histories.

Troubleshooting

bitfield cache
You might have to open:

yourserver.com/admincp/index.php?do=buildbitfields

This re-calculates the bitfields that have been altered. On some versions, the product installer will automatically do it.

Moderators
The postbits determine if a post is a person's own post by seeing if they have permission to edit the post. This means that if you give mods the rights to see their own post histories, then they will be able to click to see everyone elses post histories as they have the rights to edit all posts. However, the link won't have any effect as the actual viewer is restricted based on actual poster.

Usage

The XML file should add 2 options that can be set when setting up a usergroup and 1 new option for each forum.

New options for each usergroup:

Can See Post History (Yes/No)
---- Allows members of this usergroup to see all post histories

Can See Own Post History (Yes/No)
---- Allows members of this usergroup to see their own post history

New option for each forum:

Post History Displayed (Yes/No)
---- Shows post history for every post in this forum

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 01-22-2006, 04:29 PM
Lieva Lieva is offline
 
Join Date: Apr 2005
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bashy
OK just mad a single edit with a 4 word text edit
and the links only show the latest edit!!
You have to click view post history at least once ... or does it just show

View Edit History: 1

and not

View Edit History: 0 1

?
Reply With Quote
  #53  
Old 01-22-2006, 04:39 PM
Alex_ Alex_ is offline
 
Join Date: Jan 2006
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

From the hook on:
Code:
 ($hook = vBulletinHook::fetch_hook('showthread_postbit_create')) ? eval($hook) : false;

                $postbit_obj =& $postbit_factory->fetch_postbit($fetchtype);
                if ($fetchtype == 'post')
                {
                        $postbit_obj->highlight =& $replacewords;
                }
                $postbit_obj->cachable = $post_cachable;

                $post['islastshown'] = ($post['postid'] == $lastpostid);
                $post['attachments'] =& $postattach["$post[postid]"];

                $parsed_postcache = array('text' => '', 'images' => 1, 'skip' => false);

                $postbits .= $postbit_obj->construct_postbit($post);
Hmhm, I don't understand it... does the postbit constructer change something?!

---
Edit

The constructer does this
Code:
 $this->post['message'] = $this->bbcode_parser->parse($this->post['pagetext'], $this->forum['forumid'], $this->post['allowsmilie']);
So he does use the pagetext - *confused*
Reply With Quote
  #54  
Old 01-22-2006, 04:49 PM
Lieva Lieva is offline
 
Join Date: Apr 2005
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alex_
From the hook on:
Code:
 ($hook = vBulletinHook::fetch_hook('showthread_postbit_create')) ? eval($hook) : false;

                $postbit_obj =& $postbit_factory->fetch_postbit($fetchtype);
                if ($fetchtype == 'post')
                {
                        $postbit_obj->highlight =& $replacewords;
                }
                $postbit_obj->cachable = $post_cachable;

                $post['islastshown'] = ($post['postid'] == $lastpostid);
                $post['attachments'] =& $postattach["$post[postid]"];

                $parsed_postcache = array('text' => '', 'images' => 1, 'skip' => false);

                $postbits .= $postbit_obj->construct_postbit($post);
Hmhm, I don't understand it... does the postbit constructer change something?!
It looks the same as mine. postbit_obj->construct_postbit($post) generates the actual code for the postbit.

Perhaps that has been changed.

In
includes/class_postbit.php

The postbit functions are defined.

There should be a section of code something like:

/**
* Parses the post for BB code.
*/
function parse_bbcode()
{
$this->post['message'] = $this->bbcode_parser->parse($this->post['pagetext'], $this->forum['forumid'], $this->post['allowsmilie']);
}

Maybe that refers to a different variable.
Reply With Quote
  #55  
Old 01-22-2006, 04:50 PM
Alex_ Alex_ is offline
 
Join Date: Jan 2006
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just edited
This is the same code as mine... I am confused...
Reply With Quote
  #56  
Old 01-22-2006, 04:55 PM
Lieva Lieva is offline
 
Join Date: Apr 2005
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alex_
I just edited
This is the same code as mine... I am confused...
hard to debug without the files in front of me .

One other possibility is that there is a parse error in the plugin. This results in the server just ignoring it. You could add another plugin at the same hook with just $post['pagetext'] = "testing" and see if that modifies the message.

Also

showthread.php?p=68298&prev_postid=68298&prev_edit num=0#post68298

should show the original version of a given post (change 68298 to the postid of the post you want to check).
Reply With Quote
  #57  
Old 01-22-2006, 05:01 PM
Alex_ Alex_ is offline
 
Join Date: Jan 2006
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just did a $post['pagetext'] = "something" within the showthread.php to show _all_ posts with the same text but the they were still the same... so this couldn't be.
I opened another thread and now it showed the forced text.

I think this has something to do with post cache (not browser cache because I have two browsers showing the same).
So if you open the thread the posting gets cached... now you click on history version - the page reloads but the forum says - hey, I just showed you this thread, I'll load it from the cache...

This would mean I have to hook in on an earlier stage? I don't know how the cache system works but we do cache posts for 10 days I think...
Reply With Quote
  #58  
Old 01-22-2006, 05:14 PM
Lieva Lieva is offline
 
Join Date: Apr 2005
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alex_
I just did a $post['pagetext'] = "something" within the showthread.php to show _all_ posts with the same text but the they were still the same... so this couldn't be.
I opened another thread and now it showed the forced text.

I think this has something to do with post cache (not browser cache because I have two browsers showing the same).
So if you open the thread the posting gets cached... now you click on history version - the page reloads but the forum says - hey, I just showed you this thread, I'll load it from the cache...

This would mean I have to hook in on an earlier stage? I don't know how the cache system works but we do cache posts for 10 days I think...
Sounds reasonably and might explain why Bashy was having some issues which fixed themselves.

One test that might be worth doing is to disable post caching and see if that fixes it.
Reply With Quote
  #59  
Old 01-22-2006, 05:20 PM
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Location: Buenos Aires
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

leet
Reply With Quote
  #60  
Old 01-22-2006, 05:21 PM
Alex_ Alex_ is offline
 
Join Date: Jan 2006
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes it did sound reasonably but setting it to zero doesn't change anything
Reply With Quote
  #61  
Old 01-22-2006, 05:34 PM
Lieva Lieva is offline
 
Join Date: Apr 2005
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alex_
Yes it did sound reasonably but setting it to zero doesn't change anything
That's wierd. I set mine to 10 days and it broke it ... maybe it would take 10 days to clear the cache ...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:06 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06205 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete