vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Post Edit History Viewer (https://vborg.vbsupport.ru/showthread.php?t=105989)

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:

PHP Code:

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 ?

kafi 09-29-2006 09:20 AM

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

kafi 09-29-2006 09:29 PM

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

kafi 09-29-2006 10:07 PM

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:

PHP 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

PHP Code:

.
                if ( 
$forumid == 120 )
                    {
                    
$return true;
                    } 

before

PHP Code:

.
                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

Quote:

- 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

Quote:

Originally Posted by D.Ilyin
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_edit num=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.

kafi 10-01-2006 01:12 PM

Quote:

Originally Posted by Lieva
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:

PHP 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

PHP Code:

.
                if ( 
$forumid == 120 )
                    {
                    
$return true;
                    } 

before

PHP Code:

.
                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:

PHP Code:

.
                if ( 
$forumid == 120  && $do=='caneditposts' )
                    {
                    
$return true;
                    } 


kafi 10-01-2006 06:49 PM

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

Quote:

Originally Posted by dcevoclub
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

Code:


$query = "INSERT INTO `" . TABLE_PREFIX . "post_edits`
                                ( postid, editnum, message )
                                VALUES
                                ( " . $postinfo['postid'] . " , " .
                                ($postinfo['numedits']) . " , '" .
                                addslashes($postinfo['pagetext']) . "' ) ";

to something like

Code:

$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

Quote:

Originally Posted by Lieva
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).

Code:

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?

Quote:

- 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.

kafi 10-26-2006 06:07 PM

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

Code:

varchar(50) to varchar(100)
Vbul use 100 positions now for nicks afaik.

Add field:

Code:

editorid mediumint(10) UNSIGNED NULL Def NULL
The content of plugin POST-HIST: record_edits becomes:

Code:

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:

Code:

//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

Quote:

Originally Posted by Lieva
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

Quote:

Originally Posted by Viper007Bond
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

Quote:

Originally Posted by TosaInu
I guess your method doesn't need the extra query?

Yeah, think so.

kafi 11-18-2006 09:46 PM

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

Quote:

Originally Posted by Lieva (Post 1115616)
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...


Code:

<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]">
                        &nbsp;
                        <if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;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">
                                        &nbsp;<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">
                                &nbsp;<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&amp;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]
                &nbsp;
        </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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;userlist=buddy&amp;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...

Code:

<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]">
                        &nbsp;
                        <if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> &nbsp;</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>&nbsp;
                        </if>
                        <if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;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> &nbsp;</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> &nbsp;</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%">&nbsp;</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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;userlist=buddy&amp;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


All times are GMT. The time now is 11:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01909 seconds
  • Memory Usage 2,080KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (8)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (38)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete