View Full Version : Post Edit History Viewer
Lieva
01-21-2006, 10:00 PM
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
SnickersTK
01-22-2006, 10:40 AM
Where is the file?
oh and I love the sound of this!!1
Lieva
01-22-2006, 10:42 AM
Sorry forgot to include it :p
Have attached it now.
SnickersTK
01-22-2006, 10:43 AM
Thanks, sounds wonderful!
But I am confused, does all moderators and administrators see this or?
and can you decide who is able?
Lieva
01-22-2006, 10:44 AM
Thanks, sounds wonderful!
But I am confused, does all moderators and administrators see this or?
and can you decide who is able?
At the moment it is everyone.
SnickersTK
01-22-2006, 10:46 AM
Oh.....
Well are you able to code it so only administrators and/or moderators are able to see the before edited posts, this is what I am looking for and I am sure more wants the same :)
I hate when I see a member has edited his/her's post and not knowing the original post :(
Lieva
01-22-2006, 11:17 AM
Oh.....
Well are you able to code it so only administrators and/or moderators are able to see the before edited posts, this is what I am looking for and I am sure more wants the same :)
I hate when I see a member has edited his/her's post and not knowing the original post :(
The 2nd file restricts it to mods only, install that instead of the standard version.
redspider
01-22-2006, 11:23 AM
nice mod will check later for out of beta version .
bashy
01-22-2006, 11:34 AM
I have the Moderator 1 installed yet i cannot view my edits as a Admin nor as a MOD, do i need to do anything else other than install??
Gizmo5h1t3
01-22-2006, 11:41 AM
I have the Moderator 1 installed yet i cannot view my edits as a Admin nor as a MOD, do i need to do anything else other than install??
same situation here, cant see anything
Developer
01-22-2006, 11:52 AM
nice hack as they said it has a proplem plz fix to install it
Yorixz
01-22-2006, 12:12 PM
Seriously something that should be standard in vB 3.5, I'll try it out later this week, thanks a lot!
murrtex
01-22-2006, 12:52 PM
thanks lieva, can we delete the histories by this hack??
Lieva
01-22-2006, 01:05 PM
I have the Moderator 1 installed yet i cannot view my edits as a Admin nor as a MOD, do i need to do anything else other than install??
Does the standard one work ?
Another possibility is that you have edited the postbit template. The system works by searching for a string the the postbit template and replacing it.
Lieva
01-22-2006, 01:06 PM
thanks lieva, can we delete the histories by this hack??
Well uninstalling and reinstalling would wipe the history as it deletes the new table that stores all the edits.
bashy
01-22-2006, 01:15 PM
Just tried the standard 1, still nothing....
but to be honest i aint sure where im meant to be looking,
Is it where it tells you that the post has been editied?
Lieva
01-22-2006, 01:26 PM
Just tried the standard 1, still nothing....
but to be honest i aint sure where im meant to be looking,
Is it where it tells you that the post has been editied?
No, it is just under the post count in the field with the username.
for example:
Join Date: Feb 2003
Posts: 621
View Edit History:
It also only appears if the post has been editted since the plugin was installed (as previous edits aren't recorded).
If that doesn't help, could you post the contents of your postbit template.
bashy
01-22-2006, 01:39 PM
no, still aint showing....I will post my post bit after you have seen my
postbit working ;)
Take a gander HERE (http://www.bashys-place.com/forums/showthread.php?t=194)
If ya still want me postbit i wil post when ya ask again :)
Lieva
01-22-2006, 01:51 PM
no, still aint showing....I will post my post bit after you have seen my
postbit working ;)
Take a gander HERE (http://www.bashys-place.com/forums/showthread.php?t=194)
If ya still want me postbit i wil post when ya ask again :)
Looking at your forum, it looks like you have pretty extensively changed the postbit template :).
The plugin searches for
"<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>"
and adds code for the history link after that section.
I assume that section doesn't exist for your forum (or is changed) ?
Another possibility is that the default template is different in 3.5.3
bashy
01-22-2006, 01:57 PM
I am 90% sure that is there...2 secs, gonna check...
here ya go..this is mine, copied exact as i see it
Although a search didnt bring it up....
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
Looking at your forum, it looks like you have pretty extensively changed the postbit template :).
The plugin searches for
"<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>"
and adds code for the history link after that section.
I assume that section doesn't exist for your forum (or is changed) ?
Another possibility is that the default template is different in 3.5.3
bashy
01-22-2006, 01:59 PM
heres my full postbit ;)
<!-- post #$post[postid] -->
<if condition="$show['spacer']">
$spacer_open
<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>
<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" $post[scrolltothis]>
<div class="normal" style="float:$stylevar[right]">
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> </if>
<if condition="$show['reputationlink']"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a> </if>
<!-- [START HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.0' CHANGEID= 6 ] -->
<if condition="$vboptions['vbpager_active'] AND $bbuserinfo[userid]">
<a href="#" onclick="window.open('pager.php?do=buddylist&puserid=$post[userid]','pagerbuddylist','statusbar=no,menubar=no,toolba r=no,scrollbars=yes,resizable=yes,width=$vboptions[vbpager_width],height=$vboptions[vbpager_height]'); return false;"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/vbpager_icon.gif" alt="<phrase 1="$post[username]">$vbphrase[pager_send_pager_message_to_x]</phrase>" border="0" /></a> </if>
<!-- [END HACK='vB Pager' AUTHOR='UAEWEB.COM' VERSION='3.0.0' CHANGEID= 6 ] -->
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a> </if>
$post[iplogged]
<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" onclick="inlineMod.toggle(this)" />
</if>
</div>
<div class="normal">
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
<if condition="!$show['announcement']">
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
<else />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</div>
</td>
</tr>
<tr>
<td class="alt2" style="padding:0px">
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
<td nowrap="nowrap">
<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<div class="smallfont"><strong>$WWU002_ranktext</strong></div>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
<if condition="$post[userid]">
<div>UserID: $post[userid]</div>
</if>
<!-- mood hack display start -->
<if condition="$post[field19] != ''"><div class="smallfont">
Current Mood: <img src="images/mood/$post[field19].gif" title="$post[field19]" align="center">
</div></if>
<!-- mood hack display end -->
<if condition="$show['warning']"><div class="smallfont">$post[warning]</div></if>
</td>
<td width="100%"> </td>
<td class="WWU002postbit">
<table cellspacing="2" cellpadding="0">
<tr>
<td><img src="$stylevar[imgdir_misc]/activity/textactivity.gif" /></td>
<td><img src="$stylevar[imgdir_misc]/activity/textlongevity.gif" /></td>
</tr>
<tr>
<td title="$WWU002_activityinfo"><img src="$stylevar[imgdir_misc]/activity/activity$WWU002_activitylevel.gif" class="i" /></td>
<td title="$WWU002_longevityinfo"><img src="$stylevar[imgdir_misc]/activity/long$WWU002_longevitylevel.gif" class="i" /></td>
</tr>
<tr>
<td><img src="$stylevar[imgdir_misc]/activity/texttoday.gif" /></td>
<td><img src="$stylevar[imgdir_misc]/activity/textposts.gif" /></td>
</tr>
<tr>
<td title="$WWU002_todayinfo"><img src="$stylevar[imgdir_misc]/activity/today{$WWU002_todaylevel}_$WWU002_maxtodaylevel.gi f" class="i" /></td>
<td dir="ltr"><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[1].gif" class="il" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[2].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[3].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[4].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[5].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[6].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[7].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[8].gif" class="im" /><img src="$stylevar[imgdir_misc]/activity/posts$WWU002_postsd[9].gif" class="ir" /></td>
</tr>
</table>
</td>
<td valign="top" nowrap="nowrap">
<div class="smallfont">
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post[field18] != ''"><div>
State/County: <img src="images/state/$post[field18].gif" title="$post[field18]" align="center">
</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<if condition="$vboptions['vbookiecashon']">
vCash: $post[vbookie_cash]
</if>
<!-- Start Post Thank You Hack -->
<if condition="$post[userid]">
<br />
$vbphrase[post_thanks_thanks]: $post[post_thanks_user_amount]
<br />
<if condition="$post[post_thanks_thanked_times_on] == 1">
$vbphrase[post_thanks_time_post]
<else />
<if condition="$post[post_thanks_thanked_posts_on] == 1">
<phrase 1="$post[post_thanks_thanked_times]">$vbphrase[post_thanks_times_post]</phrase>
<else />
<phrase 1="$post[post_thanks_thanked_times]" 2="$post[post_thanks_thanked_posts]">$vbphrase[post_thanks_times_posts]</phrase>
</if>
</if>
</if>
<!-- End Post Thank You Hack --> </div>
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower] </if><div>$post[reputationdisplay]</div></if>
<!--System Specs-->
<if condition="$post[field5] == YES">
<div id="sysinfo_$post[postid]" align="left" class="info" nowrap>
<a href="#sysinfo"><b>My System</b> </a><script type="text/javascript"> vbmenu_register("sysinfo_$post[postid]"); </script></div>
</if>
<br />
<!--/System Specs-->
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>
</td>
</tr>
</table>
<!-- / user info -->
</td>
</tr>
<tr>
<td class="alt1" id="td_post_$post[postid]">
<!-- message, attachments, sig -->
<if condition="$show['messageicon'] OR $post['title']">
<!-- icon and title -->
<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>
<!-- message -->
<div id="post_message_$post[postid]"><if condition="$post[field21]"><font face="$post[field21]">$post[message]</font><else />$post[message]</if></div>
<!-- / message -->
<!-- #### SHOW REPUTATION GIVEN IN POST START - BY LEVI THORNTON #### -->
<if condition="$show['post_reputation_gv']">
<br>
<fieldset class="fieldset" style="border-color:#DDDDDD;">
<legend>Comments on this post</legend>
<div style="padding:12px">
$post_rep_gv
</div>
</fieldset>
</if>
<!-- #### SHOW REPUTATION GIVEN IN POST END - BY LEVI THORNTON #### -->
<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">
<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>
<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>
<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>
</div>
<!-- / attachments -->
</if>
<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>
<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>
<div align="$stylevar[right]">
<!-- controls -->
<!-- Start Post Thank You Hack -->
$post_thanks_button
<!-- End Post Thank You Hack -->
<if condition="$post[userid] != $bbuserinfo[userid]"><if condition="$show['pmlink']"><a href="private.php?$session[sessionurl]do=newpm&u=$post[userid]" target="_blank" rel="nofollow"><img src="$stylevar[imgdir_button]/sendpm.gif" alt="sendpm.gif" title="<phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase>" border="0" /></a></if></if>
<if condition="$post['editlink']">
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<!-- / controls -->
</div>
<!-- message, attachments, sig -->
</td>
</tr>
</table>
<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post[usergroupid]!= 6 AND $bbuserinfo[usergroupid] == 6">
<tr><td class="vbmenu_option"><a
href="moderator.php?$session[sessionurl]do=useroptions&u=$post[userid]"><phrase
1="$post[username]">Edit User</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->
<!--System Specs-->
<div class="vbmenu_popup" id="sysinfo_$post[postid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<td class="thead">My System Information</td>
<if condition="$post[field6]"><tr><td class="vbmenu_option"><b>CPU:</b> $post[field6]</td></tr></if>
<if condition="$post[field7]"><tr><td class="vbmenu_option"><b>Motherboard:</b> $post[field7]</td></tr></if>
<if condition="$post[field8]"><tr><td class="vbmenu_option"><b>Mem:</b> $post[field8]</td></tr></if>
<if condition="$post[field9]"><tr><td class="vbmenu_option"><b>HDD:</b> $post[field9]</td></tr></if>
<if condition="$post[field10]"><tr><td class="vbmenu_option"><b>Graphics:</b> $post[field10]</td></tr></if>
<if condition="$post[field11]"><tr><td class="vbmenu_option"><b>Sound:</b> $post[field11]</td></tr></if>
<if condition="$post[field12]"><tr><td class="vbmenu_option"><b>OS:</b> $post[field12]</td></tr></if>
<if condition="$post[field13]"><tr><td class="vbmenu_option"><b>Modem:</b> $post[field13]</td></tr></if>
<if condition="$post[field14]"><tr><td class="vbmenu_option"><b>Internet:</b> $post[field14]</td></tr></if>
<if condition="$post[field15]"><tr><td class="vbmenu_option"><b>DigiBox:</b> $post[field15]</td></tr></if>
<if condition="$post[field16]"><tr><td class="vbmenu_option"><b>Area:</b> $post[field16]</td></tr></if>
</table>
</div>
<if condition="$post['hasbday']">
<img src="$stylevar[imgdir_misc]/birthday_small.gif" alt="<phrase 1="$post[username]">$vbphrase[x_has_a_birthday]</phrase>" />
</if>
<!--/System Specs-->
<if condition="$show['spacer']">
</div>
$spacer_close
</if>
<!-- / post #$post[postid] -->
<!-- Start Post Thank You Hack -->
$post_thanks
<!-- End Post Thank You Hack -->
Lieva
01-22-2006, 02:01 PM
I am 90% sure that is there...2 secs, gonna check...
here ya go..this is mine, copied exact as i see it
Although a search didnt bring it up....
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
That is not exactly the same as my version.
Is "$post[skypeicon]" a mod that you made or is it a change that was made to the default since v3.5.0 ?
I was looking through the template trying to find a more stable insert point.
bashy
01-22-2006, 02:03 PM
I think that was default in 3.5.2?
Lieva
01-22-2006, 02:11 PM
I think that was default in 3.5.2?
I have modified the postbit section of the plugin so that it should work with your postbit. (only the mod version of the XML atm)
bashy
01-22-2006, 02:13 PM
elxcellent m8, so just redownload ya plugin and overwrite?
Lieva
01-22-2006, 02:14 PM
yeah, you have to uninstall the first one.
Also, to test make sure you edit a post after installing as it doesn't store old edits.
bashy
01-22-2006, 02:15 PM
ok m8 will do, thanks alot! :)
Lieva
01-22-2006, 02:19 PM
ok m8 will do, thanks alot! :)
np, just say if it works now :p.
bashy
01-22-2006, 02:20 PM
Ok done this, it now shows View Edit History: 0 1 2
I made 3 seperate edits, click each edite number and no edit
history shows?
I have a feeling it just aint gonna play ball for me pmsl
Lieva
01-22-2006, 02:31 PM
Ok done this, it now shows View Edit History: 0 1 2
I made 3 seperate edits, click each edite number and no edit
history shows?
I have a feeling it just aint gonna play ball for me pmsl
Hmm, the post should change as you click each number so you can see each version of the post ... however, at least we are making progress :).
bashy
01-22-2006, 02:37 PM
i m8, we is getting somewhere lol
Lieva
01-22-2006, 02:38 PM
i m8, we is getting somewhere lol
So when you click the numbers it always shows the most up to date version of the post ? When you edited, did you change the post or just re-save it?
bashy
01-22-2006, 02:41 PM
Yes it just shows the most recent edit,
all 3 links show the same, the latest edit.
When i edited the post i changed it from say 123456789 (orginal)
to 12345 and then 1234
and saved each time...
Does this make sense lol
Lieva
01-22-2006, 02:43 PM
Yes it just shows the most recent edit,
all 3 links show the same, the latest edit.
When i edited the post i changed it from say 123456789 (orginal)
to 12345 and then 1234
and saved each time...
Does this make sense lol
maybe its a problem with the moderator check code. I will update the version which allows everyone to see the code and see if that works.
bashy
01-22-2006, 02:44 PM
Just tried it again with 6 changes this time and it worked...
Lieva
01-22-2006, 02:48 PM
Just tried it again with 6 changes this time and it worked...
Hmm, wierd. Maybe it was a cache issue or something.
Anyway, have updated the non-mod version too.
Lieva
01-22-2006, 02:49 PM
Hmm, wierd. Maybe it was a cache issue or something.
Anyway, have updated the non-mod version too.
Does the old post that had 3 edits that didn't work, work now ?
bashy
01-22-2006, 02:52 PM
No m8 it dont...
I have a feeling its because i have installed the Prefix hack since creating that thread and when i edited it it asked for a prefix, i think this is why i aint showing the edits.
Just a hunch mind,
Im gonna try 1 that dont require a prefix
bashy
01-22-2006, 02:56 PM
Seems to work 100% when it dont ask for a prefix during the edit :)
Gonna make the prefixes not mandatory i think although most sections
arnt anyway!!
So other than that, all is well m8, tis a great idea, well done and thanks for you time :)
Lieva
01-22-2006, 02:58 PM
Seems to work 100% when it dont ask for a prefix during the edit :)
Gonna make the prefixes not mandatory i think although most sections
arnt anyway!!
So other than that, all is well m8, tis a great idea, well done and thanks for you time :)
np, and thanks for your help in testing.
bashy
01-22-2006, 03:00 PM
Not a problem m8, least we got there in the end..
If another bod has the same issue at least ya can
narow it down if they use the prefixes lol
Thanks again
Have fun
Alex_
01-22-2006, 03:46 PM
I don't have prefixes but the same problem... several edits (not just re-save) but all versions show the same text. Looking at the database I see the old version but it won't show up in the thread... :(
bashy
01-22-2006, 03:49 PM
Try editing the same post and saving it about 6 times, just want to see
if its the same as mine...
Lieva
01-22-2006, 04:03 PM
I don't have prefixes but the same problem... several edits (not just re-save) but all versions show the same text. Looking at the database I see the old version but it won't show up in the thread... :(
Which version of vbulletin are you using and also which version of the plugin are you using?
The original version should be a little more reliable as it doesn't do any checks before reverting to an older version.
Alex_
01-22-2006, 04:05 PM
I edited it now 8 times without success...
I tested the can_moderate condition (filled in some debug output in the showtread plugin) - this is working - I also printed out the history post as plain text on the page - this is also working.
So I guess it's a problem with this line
$post['pagetext'] = $post_temp['message'];
It seems that $post[pagetext] is not the place where my vB reads the post? Or it does overwrite it or something like that...
---
Edit:
Ok in post[pagetext] is the text of the post - I can read it out, it matches... but when I change it within the plugin the post itself doesn't change - so it seems to me that the forum takes the post text not from this var - but from where?
bashy
01-22-2006, 04:10 PM
Hi m8y...
I just had to do an official edit on my own post, i forgot to
add an attachment and also had to edit again to include
more text, but again it only shows the latest edit even though
theres 4 links 0 to 3
I am going to try a single edit on another post...
bashy
01-22-2006, 04:12 PM
OK just mad a single edit with a 4 word text edit
and the links only show the latest edit!!
Lieva
01-22-2006, 04:15 PM
I edited it now 8 times without success...
I tested the can_moderate condition (filled in some debug output in the showtread plugin) - this is working - I also printed out the history post as plain text on the page - this is also working.
So I guess it's a problem with this line
$post['pagetext'] = $post_temp['message'];
It seems that $post[pagetext] is not the place where my vB reads the post? Or it does overwrite it or something like that...
---
Edit:
Ok in post[pagetext] is the text of the post - I can read it out, it matches... but when I change it within the plugin the post itself doesn't change - so it seems to me that the forum takes the post text not from this var - but from where?
Maybe showthread.php was modified in 3.5.3.
If you set $post['pagetext'] to some string, then that would indicate if $post['pagetext'] is being used. It would only modify the post that you are viewing page history for.
Alex_
01-22-2006, 04:19 PM
Because your plugin does a
$post['pagetext'] = 'matched change post';
I can answer your question already - no it is not used by showthread... I'm trying to find the correct var it reads out
Lieva
01-22-2006, 04:27 PM
Because your plugin does a
$post['pagetext'] = 'matched change post';
I can answer your question already - no it is not used by showthread... I'm trying to find the correct var it reads out
Ahh ok. In 3.5.1 (and it seems 3.5.2), that variable is used for the message.
Is this section of code the same in 3.5.3 ? (are we allowed post code snippets as long as they are in [ code ] tags ? )
$post['islastshown'] = ($post['postid'] == $lastpostid);
$post['attachments'] =& $postattach["$post[postid]"];
$parsed_postcache = array('text' => '', 'images' => 1, 'skip' => false);
$postbits .= $postbit_obj->construct_postbit($post);
It passes $post to the postbit generator function/class. The plugin mods the $post variable just before this section.
The above is from showthread.php
Lieva
01-22-2006, 04:29 PM
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
?
Alex_
01-22-2006, 04:39 PM
From the hook on:
($hook = vBulletinHook::fetch_hook('showthread_postbit_crea te')) ? 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
$this->post['message'] = $this->bbcode_parser->parse($this->post['pagetext'], $this->forum['forumid'], $this->post['allowsmilie']);
So he does use the pagetext - *confused*
Lieva
01-22-2006, 04:49 PM
From the hook on:
($hook = vBulletinHook::fetch_hook('showthread_postbit_crea te')) ? 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.
Alex_
01-22-2006, 04:50 PM
I just edited ;)
This is the same code as mine... I am confused...
Lieva
01-22-2006, 04:55 PM
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_editnum=0#post68298
should show the original version of a given post (change 68298 to the postid of the post you want to check).
Alex_
01-22-2006, 05:01 PM
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...
Lieva
01-22-2006, 05:14 PM
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.
COBRAws
01-22-2006, 05:20 PM
leet
Alex_
01-22-2006, 05:21 PM
Yes it did sound reasonably but setting it to zero doesn't change anything :(
Lieva
01-22-2006, 05:34 PM
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 ...
silurius
01-22-2006, 05:37 PM
This is awesome. Been looking for this for a while. It covers about half of a request I put out.
Would you mind establishing a wishlist for this thread and adding version comparison & revert capability to that list? (Even if you can't get to such features yourself, at least they'd be noted somewhere central).
Will definitely install when it matures a bit. Thank you!!!
Alex_
01-22-2006, 05:38 PM
But I like the cache feature...
I tried it with $post_cachable = false within the plugin without success... there must be point when the forum decides to use the cached version.
Lieva
01-22-2006, 05:53 PM
But I like the cache feature...
I tried it with $post_cachable = false within the plugin without success... there must be point when the forum decides to use the cached version.
It seems that if
$post['pagetext_html'] exists then it uses that instead of $postbit['pagetext'].
Adding:
$post['pagetext_html'] = "";
to the end of the plugin fixed it for me.
If this solves your problem, I will update the two XML files.
Lieva
01-22-2006, 05:55 PM
This is awesome. Been looking for this for a while. It covers about half of a request I put out.
Would you mind establishing a wishlist for this thread and adding version comparison & revert capability to that list? (Even if you can't get to such features yourself, at least they'd be noted somewhere central).
Will definitely install when it matures a bit. Thank you!!!
Is there a wishlist function or something (or do you just mean that I would add a wishlist section in the original post ) ?
Alex_
01-22-2006, 06:16 PM
It seems that if
$post['pagetext_html'] exists then it uses that instead of $postbit['pagetext'].
Adding:
$post['pagetext_html'] = "";
to the end of the plugin fixed it for me.
If this solves your problem, I will update the two XML files.
Not yet...
Lieva
01-22-2006, 06:16 PM
Not yet...
It had no effect ?
Lieva
01-22-2006, 06:18 PM
It had no effect ?
Try adding:
$post_cachable = 0
too. I assumed that that wasn't needed.
silurius
01-22-2006, 06:18 PM
Is there a wishlist function or something (or do you just mean that I would add a wishlist section in the original post ) ?Wherever, doesn't really matter to me, just so long as it's somewhere visible.
Alex_
01-22-2006, 06:21 PM
Try adding:
$post_cachable = 0
too. I assumed that that wasn't needed.
Argh, I'm sorry - while testing I tried several other hooks - I forgot to switch back.
It is working now, great work.
Lieva
01-22-2006, 06:27 PM
Argh, I'm sorry - while testing I tried several other hooks - I forgot to switch back.
It is working now, great work.
great, hopefully it stays working :).
Alex_
01-22-2006, 06:28 PM
I added the cachable just to be sure... without there seem to come up some side effects when using the cache.
Lieva
01-22-2006, 06:36 PM
I added the cachable just to be sure... without there seem to come up some side effects when using the cache.
Yeah, seems that it sometimes caches one of the older versions of the post.
Anyway, have updated both versions of the XML.
Alex_
01-22-2006, 06:38 PM
Just another question ;)
I guess can_administer is not a function like can_moderate?
Is it possible to restrict it to administrator only? I don't want my moderators to be able to view the history
SnickersTK
01-22-2006, 06:45 PM
Wait, if your running 3.5.2 and you install the mod one, it should work now right?
I am scared of all the replies in this mod to install it :-(
Lieva
01-22-2006, 06:54 PM
Wait, if your running 3.5.2 and you install the mod one, it should work now right?
I am scared of all the replies in this mod to install it :-(
Well, the worst that will happen is that it won't do anything. Also, the uninstall function will undo any database edit. The problems in this thread were pretty minor and don't represent a risk of damaging the database or anything.
The changes necessary for 3.5.2 operation are already included.
Lieva
01-22-2006, 06:56 PM
Just another question ;)
I guess can_administer is not a function like can_moderate?
Is it possible to restrict it to administrator only? I don't want my moderators to be able to view the history
You would have to check the person's main usergroup.
Something like ( $vbulletin->userinfo['usergroupid'] == 6 )
6 is the default admin usergroup, so you may need to change that.
Alex_
01-22-2006, 06:57 PM
Wait, if your running 3.5.2 and you install the mod one, it should work now right?
I am scared of all the replies in this mod to install it :-(
You shouldn't be scared... IMO there are some problems with caching - after going around the vB post cache and testing it for a while my browser does cache some sites not showing then up right. But that's a browser thing...
I restricted now to a userid and I'm happy with it :)
Alex_
01-22-2006, 07:01 PM
One last thing for me today... you should add the if condition to the postbit modifier as well so users who cannot view the history don't get the 'View History' link.
Lieva
01-22-2006, 07:49 PM
One last thing for me today... you should add the if condition to the postbit modifier as well so users who cannot view the history don't get the 'View History' link.
The mod to the postbit should already mean that only those with rights to see the text can see it.
Alex_
01-22-2006, 07:55 PM
Sure?
I don't see the according code... it's just a simple str_replace, isn't it?
When I restricted it to one user only this one could view the history but the link showed up for others as wellg giving them always the same version on every number...
My code looks now like
if ( $vbulletin->userinfo['usergroupid'] == 6 ) {
$vbulletin->templatecache['postbit'] = str_replace( $insert_point, $insert_point . $new_text , $vbulletin->templatecache['postbit'] );
$vbulletin->templatecache['postbit_legacy'] = str_replace( $insert_point, $insert_point . $new_text , $vbulletin->templatecache['postbit_legacy'] );
$vbulletin->templatecache['postbit'] = str_replace( $insert_point2, $insert_point2 . $new_text , $vbulletin->templatecache['postbit'] );
$vbulletin->templatecache['postbit_legacy'] = str_replace( $insert_point2, $insert_point2 . $new_text , $vbulletin->templatecache['postbit_legacy'] );
}
Lieva
01-22-2006, 08:01 PM
Sure?
I don't see the according code... it's just a simple str_replace, isn't it?
When I restricted it to one user only this one could view the history but the link showed up for others as wellg giving them always the same version on every number...
My code looks now like
if ( $vbulletin->userinfo['usergroupid'] == 6 ) {
$vbulletin->templatecache['postbit'] = str_replace( $insert_point, $insert_point . $new_text , $vbulletin->templatecache['postbit'] );
$vbulletin->templatecache['postbit_legacy'] = str_replace( $insert_point, $insert_point . $new_text , $vbulletin->templatecache['postbit_legacy'] );
$vbulletin->templatecache['postbit'] = str_replace( $insert_point2, $insert_point2 . $new_text , $vbulletin->templatecache['postbit'] );
$vbulletin->templatecache['postbit_legacy'] = str_replace( $insert_point2, $insert_point2 . $new_text , $vbulletin->templatecache['postbit_legacy'] );
}
I meant that if you left it as default, it would have worked :p
The check is that those who can edit the post can also see the option.
Alex_
01-22-2006, 08:02 PM
Ah ok... cause I want it for admins only I had to add it ;)
SIINSI
01-22-2006, 10:51 PM
Ah ok... cause I want it for admins only I had to add it ;)
There's definitely, some kind of problem with this hack. I just had a zillion users PM me that they could not see any posts in a thread at all!!! I disabled the plugin and everything is back to normal.
Miguel
SnickersTK
01-23-2006, 05:24 AM
see, now I am scared :-S
ndamico
01-23-2006, 01:50 PM
Installed and working fine for me. One minor bug: When viewing pm's it shows a linked "1" now where the "View History" is on edited posts. It does this on all pm's even before the hack was installed. It links to:
http://www.123.com/forum/showthread.php?p=&prev_postid=&prev_editnum=1#post
Minor but could be fixed. I haven't been able to look at and fix it yet myself.
Lieva
01-23-2006, 04:44 PM
Installed and working fine for me. One minor bug: When viewing pm's it shows a linked "1" now where the "View History" is on edited posts. It does this on all pm's even before the hack was installed. It links to:
http://www.123.com/forum/showthread.php?p=&prev_postid=&prev_editnum=1#post
Minor but could be fixed. I haven't been able to look at and fix it yet myself.
I have fixed it. The problem is that PMs use the same postbit as posts. I just had to add a check so that it doesn't display unless $post[editnums] exists.
Lieva
01-23-2006, 04:50 PM
There's definitely, some kind of problem with this hack. I just had a zillion users PM me that they could not see any posts in a thread at all!!! I disabled the plugin and everything is back to normal.
Miguel
Were you able to see the threads, or was it just other users ... it would be surprising if there was a usergroup dependant bug ?
It sounds like the postbit for showthread is broken somehow (and is crashing the postbit generator).
What version of vbulletin are you using and also have you changed the postbit template much ?
Another check that would be worth doing is to see if disabling just the plugin relating to showthread allows you to see normal threads.
If not, then check if disabling just the plugin relating to the postbit allows the you to see threads normally.
If you disable the postbit change, then it is still possible to view older versions of posts by typing in the link directly, you can use:
showthread.php?p=69841&prev_postid=69841&prev_editnum=0#post69841
to view the original version of a post that you have edited. You need to change 69841 to the postid of the post you have just edited.
Lieva
01-23-2006, 04:51 PM
see, now I am scared :-S
:), but you will notice that removing the plugin fixed everything.
Totti
01-23-2006, 05:11 PM
hmm,
doesn't rewuire this hack a lot of diskspace due to the double and higher saves of one post?!?
any way of deleting the saved edits after half a year or similar?
Lieva
01-23-2006, 05:41 PM
hmm,
doesn't rewuire this hack a lot of diskspace due to the double and higher saves of one post?!?
any way of deleting the saved edits after half a year or similar?
It only records edited posts. Posts that aren't edited are still only stored once.
SIINSI
01-24-2006, 12:50 AM
Were you able to see the threads, or was it just other users ... it would be surprising if there was a usergroup dependant bug ?
It sounds like the postbit for showthread is broken somehow (and is crashing the postbit generator).
What version of vbulletin are you using and also have you changed the postbit template much ?
Another check that would be worth doing is to see if disabling just the plugin relating to showthread allows you to see normal threads.
If not, then check if disabling just the plugin relating to the postbit allows the you to see threads normally.
If you disable the postbit change, then it is still possible to view older versions of posts by typing in the link directly, you can use:
showthread.php?p=69841&prev_postid=69841&prev_editnum=0#post69841
to view the original version of a post that you have edited. You need to change 69841 to the postid of the post you have just edited.
Yes, I was able to see the threads, that's what made it so wierd. Supermods were able to see it also. Moderators and another usergroup I made with supermod permissions were not able to see it. I got alot of IM's about it so, I just de-installed. Any ideas? It is a great idea nad could surely be useful.
Miguel
SIINSI
01-24-2006, 12:52 AM
hmm,
doesn't rewuire this hack a lot of diskspace due to the double and higher saves of one post?!?
any way of deleting the saved edits after half a year or similar?
I would think you could just clean out the table it makes anytime you wanted to.
ndamico
01-24-2006, 02:12 AM
I have fixed it. The problem is that PMs use the same postbit as posts. I just had to add a check so that it doesn't display unless $post[editnums] exists.
Yep, that did it. Thanks for a great hack.
Just a suggestion: How about recording the username that makes the edit and displaying it with each edit version somewhere. I'll probably modify my board with something of this nature.
SnickersTK
01-24-2006, 02:57 PM
I love you for this hack :)
Lieva
01-24-2006, 05:02 PM
Yes, I was able to see the threads, that's what made it so wierd. Supermods were able to see it also. Moderators and another usergroup I made with supermod permissions were not able to see it. I got alot of IM's about it so, I just de-installed. Any ideas? It is a great idea nad could surely be useful.
Miguel
It sounds like the postbit for showthread is broken somehow. The only thing in there that is usergroup related is the "can_moderate" function. It might be worth trying the version that allows everyone to see old posts.
Another question, as admin do you use a different version of the postbit template ? Maybe you use postbit_legacy ? Also, if you use a different style that might be it as well.
Also, there might be a problem caused by other edits to the postbit template. Are you using the default version of the postbit template ?
There are two places where showthread could be being broken:
-- the plugin where the postbit is modified. This is the plugin using the "parse_templates" hook. It is called "POST-HIST: modify postbits". If you disable that, then the original postbit will be used, but you should still be able to view older versions of a post using the URL directly.
for example:
<forumname>/showthread.php?p=69841&prev_postid=69841&prev_editnum=0#post69841
allows you see the original version of a post before any edits. (change 69841 to the postid of the post you want to examine)
-- in showthread.php, this is where posts are replaced by older versions
The plugin is uses the "showthread_postbit_create" hook and is called "POST-HIST: update showthread"
If you can see the threads with this plugin disabled then this shows that this is where the problem is.
If not, then check if disabling just the plugin relating to the postbit allows the you to see threads normally.
Also, using guest login would probably allow you to replicate the problem
bashy
03-19-2006, 01:35 PM
This is working 100% atm, well done :)
Nathan2006
04-11-2006, 12:33 AM
Thank you Lieva
This is really cool :cool:
Just one thing I never understood in the other posts how would I be able to restrict it to admins only?
Thanks
Install
Southpaw
04-11-2006, 05:45 PM
Is there a way to restrict this only to certain forums?
johngdk
04-24-2006, 07:11 PM
Is there a way to restrict this only to certain forums?
I was wondering excatly the same.
Hope someone can help with a mod to the mod ;)
Btw. Great hack!
GrendelKhan{TSU
04-25-2006, 10:13 AM
oooOOooo.... does this work with 3.5.4?
also, how deep does the history go? this is would the necessary hack to make something like this:
https://vborg.vbsupport.ru/showthread.php?t=110635&highlight=viki+wiki
Stoebi
04-25-2006, 06:43 PM
Nice Plugin, thx a lot.
Log out, clear your cookies. The page numbers are visible if you enter http://www.yourdomain.xx/showthread.php?p=1&prev_postid=1&prev_editnum=3#post1 for example. Not realy usable but the page numbers are visible.
Can you fix it, please?
EDIT:
I've the mod only version installed (vbtest).
Regards, Stoebi
Djamil
05-29-2006, 07:28 PM
Does anybody have an idea how to make old versions available to moderators only and not to the poster ?
Djamil
-=Sniper=-
05-29-2006, 07:53 PM
download the mods only version! from the download section in this thread.
Djamil
05-29-2006, 08:20 PM
Thanks for your reply, but the suggested download does still allow the post owner to see the post history. I want mods only and nobody else to view the history.
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).
Djamil
GREAT Lieva!
I want encourage you to continue in development of this hack because this is what I was looking for SO LONG :-)
and finally YOU made it happen :-)))
As my preposters already said, would be great to elaborate on features such as:
- who made changes (as wiki does)
- per forum permission settings
- per usegroup permission settings
- delete history per post/forum/time
This might become a hack of the month if not YEAR .-)
Is there anybody who will hepl Lieva with this perfect hack??? If I was coder I would definitally pick up this .-)
Djamil
06-11-2006, 04:35 PM
Does anybody have an idea how to make old versions available to moderators only and not to the poster ?
Isn't anybody in here able to point me the right direction ?
I think it's a simple conditional as "if (is_member_of($usergroupid, 5, 6, 7))" but I can't figure out where exactly to put it into the XML.
Djamil
tamborinegal
06-17-2006, 04:11 AM
This is a great hack. Thanks Lieva.
I also agree that it would be good for it to be just for admins... or even admins and moderators.
This should be standard in vBulletin IMO.
Thanks again!
Clancy
Is there anybody interested to contribute to the development of this hack?
If there is more of us willing to pay, maybe Lieva or other coders will be interested to develop this hack...
Djamil
06-21-2006, 06:16 PM
If there is more of us willing to pay, maybe Lieva or other coders will be interested to develop this hack...
I doubt it since this is already under consideration (http://www.vbulletin.com/forum/showthread.php?t=145631) for a standard feature and Lieva was not online for over a month. Feel free to support all people at vb.com that expressed their needs in the thread. :-)
For the meantime I maybe will post in one of the help forums here since it should be no big deal to make this available to mods only. Should be a simple template conditional which I don't know how to place into the XML-file - somebody should be able to help if I find the time to post a proper request.
Djamil
I checked the thread but from it seems that this feature will not be available in 3.6 so I guess it will take long time to wait for it frm vb.com.
Furthermore I guess that there might be more usefull option for this than vb.com will include in official release.
To me it can be used for common knowleadge base - aka wiki.
Lieva
06-27-2006, 11:02 PM
I doubt it since this is already under consideration (http://www.vbulletin.com/forum/showthread.php?t=145631) for a standard feature and Lieva was not online for over a month. Feel free to support all people at vb.com that expressed their needs in the thread. :-)
For the meantime I maybe will post in one of the help forums here since it should be no big deal to make this available to mods only. Should be a simple template conditional which I don't know how to place into the XML-file - somebody should be able to help if I find the time to post a proper request.
Djamil
Glad to see it has been useful for some peeople. I did this for our own forum, so it's sorta hard coded to what I wanted but I thought it would be nice to share :). It isn't actually that complex so adding the extra features would make it (somewhat) more complex. (There is also a slight problem in that I have somehow killed my local copy of vbulletin that I use for testing changes and haven't got around to figuring out how I broke it :) ).
Anyway, for those who are looking at the XML, there is mainly 2 parts:
The hookpoint: parse_templates
This is basically:
$insert_point = "blah";
$insert_point2 = "blah2";
$new_text = "new text";
Then a few commands do a search and replace on the templates. This is why there is no need to manually update the templates. The problem is that the required insert_point is different from version to version, that's why there is 2 insert_points.
Also, the text required here is the text of the template after some processing, rather than just copy/paste the template from admincp ... so hard to get it to match for different versions. It is also hard to read :).
The check code is
( \$post['numedits'] != 0 ) && ( \$post['editlink'] )
This means that it displays the edit history options as long as there is more than 0 edits and the user is permitted to edit the post.
Any variables that are available to the postbit can be used. I am not sure if usergroup settings are available.
I think that replacing
( \$post['editlink'] )
with
( \$show['inlinemod'] )
in the XML before uploading should make it so only mods can see the controls for viewing older versions. (This assumes that you are using inline mods)
The 2nd hookpoint is
showthread_postbit_create
This is less complex. It is where the post is actually modified so that it looks at the old post. Also, it checks permissions. This is the only part that needs to be updated if you don't mind users seeing the edit history options as long as they can't use the options.
The check is:
( can_moderate($thread['forumid']) || ($post['userid'] == $vbulletin->userinfo['userid'] ) )
The 1st term is the one that allows moderators to view the post history and the second term is for the user themselves.
Changing it to:
( can_moderate($thread['forumid']) )
would mean that only moderators can use the feature.
So, making those 2 chances to the XML (just requires a text editor) should make it so that only mods can see/use the edit history system. I don't have a "scratch" version of 3.5.1 atm, so I can't confirm that.
Btw, have people tried this out on other 3.5.x versions? It would probably be worth a yes/no question for each version. Also, posting the default postbit (and postbit_legacy) for those versions would help if they aren't working.
Getting it to work for the other versions (if they don't work), should just be a matter of adding more $insert_pointx strings.
Also, I haven't actually looked, but is the 3.6.x plugin system compatible with 3.5.x or have they redone everything again ?
Djamil
06-29-2006, 01:36 PM
Thank you very much for clarifying this, I will check if this will do it.
BTW, I have "post hist mods only.xml" installed on a 3.5.4 forum and it works as you have designed it. If I manage to change it to work only for mods with your info I will owe you one ... :-)
Djamil
murdo
06-29-2006, 02:06 PM
Great job, but I was wondering if there was any way to extend the information? (basically, i want to know who did the edit as well as view the history!)
Is this possible?
Lieva please let us know wheter you are interested to continue development of this hack or do you agree to pick this up by somebody else.
I willing to pay for this hack!
Thank you
SnickersTK
09-07-2006, 06:35 PM
Can anyone help fix this error :(
I have no idea what it means or how to fix it. It only appears when you go to thread's you've posted in or your pressing edit, it seems :confused:
please please please help
SnickersTK
09-08-2006, 07:36 PM
*waited 24 hours as the rules says*
anyone, please? I would really like this hack to work.
SnickersTK
09-11-2006, 04:05 AM
anyone *bumps again*
Cybertims
09-13-2006, 12:56 PM
Can you please post the templates edits it would need since the plugin version doesnt work for me as the line it looks for isnt there anymore.....it has all ben changed.
Cheers.
Protonus
09-19-2006, 04:33 AM
Ack it seems this broke in 3.6. Just went to use it on my board and the buttons don't show in the template anymore ugh. Anyone got an idea how to fix this in 3.6? I'm assuming this is what Cybertims was enquiring about.
This really ought to be a standard feature in vB... I can't see why you wouldn't want this and if anything you could turn it off...
Anyone have a link to the thread that was aforementioned for support of this as a feature in vB?
Lieva
09-22-2006, 05:47 PM
As I said, the template update occurs in the "POST-HIST: modify postbits" plugin.
You could post the 2 templates, postbit and postbit_legacy templates and It should be possible to create new search strings. I haven't 3.6.0 on my server.
The real problem is that vbulletin has not put in markers or hooks in the templates.
SnickersTK, I am not sure what is causing your error.
The code is:
if( ( $_REQUEST['prev_postid'] == $post['postid'] ) && ( $_REQUEST['prev_editnum'] < $post['numedits'] ) )
{
$post['pagetext'] = 'matched change post';
$query = "SELECT message FROM " . TABLE_PREFIX . "post_edits WHERE
(postid = " . $post['postid'] . "
AND editnum = " . $_REQUEST['prev_editnum'] . ")";
$post_temp = $db->query_first( $query );
$post['pagetext'] = $post_temp['message'];
$post['pagetext_html'] = "";
$post_cachable = 0;
}
From your screen shot, the only $_REQUEST value set is the thread value t=2069. This means that the if at the top should not return true.
You could maybe use isset outside the if statement above, e.g.
if( isset( $_REQUEST['prev_postid'] ) && isset( $_REQUEST['prev_editnum'] ) )
{
<the above code>
}
Lieva
09-23-2006, 06:25 PM
Ok, I decided to just update the modification rather than people trying to figure out how to mod it themselves.
It now supports:
- 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)
Lieva
09-24-2006, 11:27 AM
Btw, is the customary to create a new thread for an upgrade ?
Lieva
09-28-2006, 08:06 PM
Hmm, 12 downloads and no comments. Must mean my reliability has increased since the last version :).
Has anyone tried it on 3.6 ?
Thank you Lieva for upgrade.
I can not find where to admin this add-on in admincp? Can you post it in your first post?
Lieva
09-29-2006, 08:50 PM
Done.
There is no specific post history menu. I added new options that can be set using the usergroup manager and also the forum manager.
For usergroup settings, it's usergroups -> usergroup manager -> edit usergroup
and similar for forums
Sorry lieva, I do not see any options there...can you be more specific?
I do not see anythink like related to post-history in usergroup settings. I only see can edit own thread. I do not see "Can edit others thread" or "Can see others post history"...
Maybe I am missing something....
also you are saying this:
"By default, nobody can see any of the histories. At minimum, you should set the admin usergroup to see all histories."
But I didnt changed any option and users can see history...
Thank you .-)
Lieva
09-29-2006, 09:35 PM
Did you upload the XML file from the zip file to
/includes/xml
?
Also, did you try opening
yourserver.com/admincp/index.php?do=buildbitfields
?
It looks like the options aren't being added.
COBRAws
09-29-2006, 10:06 PM
Thanks for the update Lieva! Im really thankfull
uff, you are right ... somehow I downloaded just post-hist.xml not the zip file... and thought that you are saying to installed it from includex/xml location ... didnt understand why... etc etc... my fault .. I was too quick to install it :-)
.......
Now I see the options :-)
............
QUESTION: how would I set up for certain forum so that any user can edit post?...AKA WIKI ?
Lieva
09-30-2006, 09:29 AM
I thought that was possible via the admincp, but it doesn't seem to be. Maybe, it might be worth searching for another hack that does it.
The only way I can see to get it to work would be modify the can_moderate function. The problem is that there is only 1 hook in can_moderate (in 3.5.1 anyway) and it is not in a useful position.
In a later version, they may have added more hooks.
The code required is pretty simple.
In /includes/functions.php there is a section of code:
.
$return = false;
if (!isset($vbulletin->bf_misc_moderatorpermissions["$do"]))
{
($hook = vBulletinHook::fetch_hook('can_moderate_forum')) ? eval($hook) : false;
}
return $return;
Your best bet would be to find 'can_moderate_forum'.
You then need to add
.
if ( $forumid == 120 )
{
$return = true;
}
before
.
return $return;
120 in the above code is the forumid of the forum you want to enable. If you want to enable multiple forums, you can just paste the code once for each forum you want to enable.
What is really annoying is that the hook is in exactly the right place, but it doesn't get activated unless the if branch is true.
NOTE: the . in the above php snippets are just for formatting, they shouldn't be copied into the code.
D.Ilyin
09-30-2006, 03:48 PM
- Enable/Disable by usergroup
-- Can see own history: Yes/No
-- Can see everyone's history: Yes/No
For me not work on 3.6.1 :(
Others functions are well....
Click install, but wait version for vB 3.6.1
Lieva
09-30-2006, 06:35 PM
For me not work on 3.6.1 :(
Others functions are well....
Click install, but wait version for vB 3.6.1
Are the options appearing in the usergroup and the forum managers ?
Have you tried browsing to
/admincp/index.php?do=buildbitfields
on your server?
It could be just that the postbit template are not setup/working correctly.
Can you post the postbit and postbit_legacy templates.
Alternatively, if you add
<<Insert Post History>>
into the postbit and postbit legacy templates at the appropriate position, it should also work.
Finally, can you try browsing to:
your_server/showthread.php?p=95518&prev_postid=95518&prev_editnum=0#post95518
replace 95518, in all 3 places, with the postid of a post you have edited since installing the hack. It should show the original version of the post.
Unfortunately, I haven't got 3.6.x installed on any test forums, otherwise, I could check myself. It would be a great help if you could answer this questions.
I thought that was possible via the admincp, but it doesn't seem to be. Maybe, it might be worth searching for another hack that does it.
The only way I can see to get it to work would be modify the can_moderate function. The problem is that there is only 1 hook in can_moderate (in 3.5.1 anyway) and it is not in a useful position.
In a later version, they may have added more hooks.
The code required is pretty simple.
In /includes/functions.php there is a section of code:
.
$return = false;
if (!isset($vbulletin->bf_misc_moderatorpermissions["$do"]))
{
($hook = vBulletinHook::fetch_hook('can_moderate_forum')) ? eval($hook) : false;
}
return $return;
Your best bet would be to find 'can_moderate_forum'.
You then need to add
.
if ( $forumid == 120 )
{
$return = true;
}
before
.
return $return;
120 in the above code is the forumid of the forum you want to enable. If you want to enable multiple forums, you can just paste the code once for each forum you want to enable.
What is really annoying is that the hook is in exactly the right place, but it doesn't get activated unless the if branch is true.
NOTE: the . in the above php snippets are just for formatting, they shouldn't be copied into the code.
Great help Lieva!
Before I try it I just want to check if this will only allow others to edit the post without the rest of moderating options such move, delete etc. ???
Lieva
10-01-2006, 01:31 PM
Hmm, actually, it grants all mod rights.
For just editing rights, it would be:
.
if ( $forumid == 120 && $do=='caneditposts' )
{
$return = true;
}
Great, that is what I thought. Thank you for your solution and thank you for picking-up this great add-on again :-)
If you will got some sparetime i have something to think of. I suggest that moderator or owner (if permission is granted) will be able to delete desired part of history of the post. Those kinds like grammar edit etc. .-)
Also short description option for post history version will just do fine .-)
Also I have suggestion for colaborative use of it in the thread. After first post there can be second post (produced automatically and simultaneosly with first post) dedicated to colaborative answer with history option - editable by anybody. Then from 3rd post discussion may start. Anybody willing to contribute to colaborative solution in the second post will be welcomed .-)
Second post - if empty yet should be rolled up - saving some space....
Thank you!
dcevoclub
10-03-2006, 03:39 PM
this does not work on 3.6.1 just FYI :)
Lieva
10-03-2006, 05:54 PM
this does not work on 3.6.1 just FYI :)
can you post the postbit and/or postbit_legacy templates for 3.6.1 (I can then add in the search/replace command).
Also, do the options appear in the usergroup manager and forum manager, in admincp, after you install the hack.
TosaInu
10-15-2006, 10:22 PM
Nice hack Lieva,
We could use this very well for WiKi forums.
The logs do not contain info about who edited (while the field is there).
I guess there should be a bit in plugin POST-HIST: record_edits
$query = "INSERT INTO `" . TABLE_PREFIX . "post_edits`
( postid, editnum, message )
VALUES
( " . $postinfo['postid'] . " , " .
($postinfo['numedits']) . " , '" .
addslashes($postinfo['pagetext']) . "' ) ";
to something like
$query = "INSERT INTO `" . TABLE_PREFIX . "post_edits`
( postid, editnum, message, editor )
VALUES
( " . $postinfo['postid'] . " , " .
($postinfo['numedits']) . " , '" .
addslashes($postinfo['pagetext']) . "' , " .
($postinfo['edit_username']) . " ) ";
I don't quite understand the ." part. And maybe I'm just all wrong. Am I missing something?
TosaInu
10-16-2006, 10:04 AM
It now supports:
- Enable/Disable by forum
-- On/Off by forum
The on/off only stops displaying the history log in those forums. It does not stop actual logging into the database. You need to wrap a conditional around the code in the plugin POST-HIST: record_edits to stop logging other forums (this can consume quite some space and may be an issue for some).
if($foruminfo['histstatus'] == 1){
..
..
and close the whole block:
}
Lieva, histstatus is a yes/no toggle right? I can change that to boolean/tinychar or something like that in the db?
- Indicates who made the edit (if it wasn't the original author)
The field is in the database, but no info is stored there. I can't find code to do it either. VB 3.5 also has 100 positions to store usenames, not 50 anymore.
It's a great hack that has many possible applications: thanks Lieva.
P.S. maybe I just wrecked my installation and encounter errors that aren't there :)
Logged the id and name of the editor now.
Did you accomplished that you see who edited? I do not :-( Can you help?
Thank you!
TosaInu
10-26-2006, 08:19 PM
Yes, some extra code has to be added and you need to add at least 1 extra field to the post_edit table (I did that with a SQL edit tool, rather than XML import).
I'm half sleeping now, I'll post tomorrow (unless someone else got better, which is very possible).
TosaInu
10-29-2006, 01:43 PM
:( Sorry for being slow.
Use a sql editor and change in table post_edits
varchar(50) to varchar(100)
Vbul use 100 positions now for nicks afaik.
Add field:
editorid mediumint(10) UNSIGNED NULL Def NULL
The content of plugin POST-HIST: record_edits becomes:
if($foruminfo['histstatus'] == 1){
$query = "INSERT INTO `" . TABLE_PREFIX . "post_edits`
( postid, editnum, message, editor, editorid )
VALUES
( " . $postinfo['postid'] . " , " .
($postinfo['numedits']) . " , '" .
addslashes($postinfo['pagetext']) . "' , '" . ($vbulletin->userinfo['username']) . "' , '" . ($vbulletin->userinfo['userid']) . "' ) ";
$db->query_write( $query );
$query = "UPDATE `" . TABLE_PREFIX . "post` SET
numedits = numedits + 1 WHERE
postid = " . $postinfo['postid'];
$db->query_write( $query );
}
The 1st if conditions makes that only hist forums are logged and not just everything (that can be an issue when space is your concern).
The content of plugin POST-HIST: update showthread becomes:
//global $permissions;
$viewown = ( $permissions['userhiststatus'] & 2 ) != 0;
$viewall = ( $permissions['userhiststatus'] & 1 ) != 0;
if(
(
( $foruminfo['viewhist'] != 0) ||
( $viewall != 0 ) ||
( ( $viewown != 0 ) && ( $vbulletin->userinfo['userid'] == $post['userid'] ) )
)
&&
( $_REQUEST['prev_postid'] == $post['postid'] )
&&
( $_REQUEST['prev_editnum'] < $post['numedits'] )
)
{
$post['pagetext'] = 'matched change post';
$query = "SELECT message FROM " . TABLE_PREFIX . "post_edits WHERE
(postid = " . $post['postid'] . "
AND editnum = " . $_REQUEST['prev_editnum'] . ")";
$post_temp = $db->query_first( $query );
if ($_REQUEST['prev_editnum'] > 0){
$query = "SELECT editor FROM " . TABLE_PREFIX . "post_edits WHERE (postid = " . $post['postid'] . "
AND editnum = " . ($_REQUEST['prev_editnum']-1) . ")";
$editedby = $db->query_first( $query );
$edittxt = "\n \n Edited by: " . $editedby['editor'] . "";
}
else {
$edittxt ="";
}
$post['pagetext'] = $post_temp['message'] . $edittxt;
$post['pagetext_html'] = "";
$post_cachable = 0;
}
Note that it adds an extra query.
isanda
11-05-2006, 08:27 PM
Any news on a version for 3.6 of this mod???
Hornstar
11-06-2006, 11:17 AM
If you have this running with no problems on 3.6.2 let us know.
thanks.
Lieva
11-07-2006, 04:37 PM
it does say who editted when someone other than the original poster does the editting. However, it places it on the old version of post.
E.g. if you go to version 2, it would say "xxx edited this post" and then version 3 would be the editted version.
I realised that the other way was better but didn't bother :p.
[edit]
Hmm, I seem to have uploaded the wrong file (as my local copy did show who edited the posts). The 1_1b zip file shows who editted the posts.
Viper007Bond
11-07-2006, 09:58 PM
Man oh man, I'd love to have this for 3.6.2. :o
TosaInu
11-11-2006, 08:13 PM
it does say who editted when someone other than the original poster does the editting. However, it places it on the old version of post.
E.g. if you go to version 2, it would say "xxx edited this post" and then version 3 would be the editted version.
I realised that the other way was better but didn't bother :p.
[edit]
Hmm, I seem to have uploaded the wrong file (as my local copy did show who edited the posts). The 1_1b zip file shows who editted the posts.
I guess your method doesn't need the extra query?
Lieva
11-12-2006, 05:18 PM
Man oh man, I'd love to have this for 3.6.2. :o
go to
admincp->styles and templates->style manager
Press the << >> button for the default style
The click on
postbit templates
postbit
(It might be different in 3.6.2)
Post the contents of the template or PM them to me and unless they seriously changed the format, I should be able to update it.
Lieva
11-12-2006, 05:19 PM
I guess your method doesn't need the extra query?
Yeah, think so.
Lieva if possible I would love to have your add-on have ability to:
- reserv 2nd post for colaborative answer (trigger second post right after 1st post has been made)
- grant access (usergroup permission) to colaborate (edit the post) in 2nd post on the answer (only for the second post not the other posts where discussion will follow)
- reveal who edited and show edit versions only for second post
Control this option per-forum basis in admincp
Is this possible Lieva? I will be happy to pay for it .-)
da420
11-20-2006, 03:00 PM
postbit templates
postbit
(It might be different in 3.6.2)
Post the contents of the template or PM them to me and unless they seriously changed the format, I should be able to update it.
This is 3.6.3 postbit and postbit_legacy templates...
postbit_legacy...
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<if condition="$show['announcement']">
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</td>
<else />
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-right: 0px" $post[scrolltothis]>
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</td>
<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-left: 0px" align="$stylevar[right]">
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if>
<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" />
</if>
</td>
</if>
</tr>
<tr valign="top">
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">
<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
<if condition="$show['avatar']">
<div class="smallfont">
<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>
<div class="smallfont">
<br />
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>
</td>
<if condition="$show['moderated']">
<td class="alt2" id="td_post_$post[postid]" style="border-right: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">
<else />
<td class="alt1" id="td_post_$post[postid]" style="border-right: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">
</if>
<if condition="$show['messageicon'] OR $post['title']">
<!-- icon and title -->
<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">
<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>
<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>
<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>
</div>
<!-- / attachments -->
</if>
<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>
<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>
</td>
</tr>
<tr>
<td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
$post[onlinestatus]
<if condition="$show['reputationlink']">
<span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>
<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>
</if>
<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a></if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
$post[iplogged]
</td>
<if condition="$show['moderated']">
<td class="alt2" align="$stylevar[right]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-left: 0px; border-top: 0px">
<else />
<td class="alt1" align="$stylevar[right]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-left: 0px; border-top: 0px">
</if>
<!-- controls -->
<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<if condition="$show['deletedpost']">
<img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" />
</if>
<if condition="$show['redcard']">
<a href="infraction.php?$session[sessionurl]do=view&p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
<else />
<if condition="$show['yellowcard']">
<a href="infraction.php?$session[sessionurl]do=view&p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
</if>
</if>
<!-- / controls -->
</td>
</tr>
</table>
<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->
da420
11-20-2006, 03:03 PM
Had to make it 2 posts... too many characters...
postbit...
<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" $post[scrolltothis]>
<div class="normal" style="float:$stylevar[right]">
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> </if>
<if condition="$show['reputationlink']">
<span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>
<if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>
</if>
<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a> </if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a> </if>
$post[iplogged]
<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" />
</if>
</div>
<div class="normal">
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
<if condition="!$show['announcement']">
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
<else />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</div>
</td>
</tr>
<tr>
<td class="alt2" style="padding:0px">
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
<td nowrap="nowrap">
<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
</td>
<td width="100%"> </td>
<td valign="top" nowrap="nowrap">
<div class="smallfont">
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>
</td>
</tr>
</table>
<!-- / user info -->
</td>
</tr>
<tr>
<td class="alt1" id="td_post_$post[postid]">
<!-- message, attachments, sig -->
<if condition="$show['messageicon'] OR $post['title']">
<!-- icon and title -->
<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">
<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>
<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>
<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>
</div>
<!-- / attachments -->
</if>
<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>
<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>
<div style="margin-top: 10px" align="$stylevar[right]">
<!-- controls -->
<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<if condition="$show['deletedpost']">
<img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" />
</if>
<if condition="$show['redcard']">
<a href="infraction.php?$session[sessionurl]do=view&p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
<else />
<if condition="$show['yellowcard']">
<a href="infraction.php?$session[sessionurl]do=view&p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
</if>
</if>
<!-- / controls -->
</div>
<!-- message, attachments, sig -->
</td>
</tr>
</table>
<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none;">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->
That should help ya get it ready for 3.6.x...
Viper007Bond
11-29-2006, 01:12 AM
Does anyone know if that besides the template editing (which I can easily do myself), the rest of this is 3.6.x compatible?
EDIT: Dur, I'll just go install it on my localhost test install. heh
EDIT #2: It works 'cept for a kinda big bug. Viewing old posts results in "matched change post" as the content.
klaush
11-29-2006, 08:22 AM
Same here!
Bigblah
12-01-2006, 11:31 AM
I downloaded the version contained in "post hist 1 1b.zip"; looking through the code, why is there a plugin titled "Allows Everyone to edit posts"? Is it supposed to be in there?
Protonus
12-01-2006, 04:45 PM
There is now a 3.6 version of this hack here:
https://vborg.vbsupport.ru/showthread.php?t=132708&
Awesomesauce.
Djamil
11-07-2007, 09:37 PM
Still no luck in 3.5.8 :-(
If you allow a usergroup to view post history, he can view it in ANY Forum, not just the ones that have set "Post History Displayed" to YES.
It randomly doesn't display the older version, instead of it there is the text "matched change post"
All previous version of the post are held in the database. Seems there is a data-fetch or template-output-problem.Djamil
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.