vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - Post Edit History (PEH) (https://vborg.vbsupport.ru/showthread.php?t=132708)

Surviver 12-09-2006 05:08 PM

Quote:

Originally Posted by Viper007Bond (Post 1135202)
Sadly, it doesn't. :(

Code:

Database error in vBulletin 3.6.4:
Invalid SQL:
INSERT INTO vb_edithistory
      (postid, oldtitle, newtitle, oldtxt, newtxt, newreason, oldreason, dateline, edituserid, editusername)
VALUES
      ((366862, '', '', '[post contents removed]', '', '', 1165684492, 13306, '[username removed]');
MySQL Error  : Unknown column 'newreason' in 'field list'
Error Number : 1054
Date        : Saturday, December 9th 2006 @ 05:14:52 PM
Script      : http://forums.finalgear.com/editpost...&postid=366862
Referrer    :
IP Address  : [removed]
Username    : [removed]
Classname    : vb_database

Did you make sure to add in upgrade code that'd ALTER the table?

The install code had the false Version ;)

new Version attached :)

Viper007Bond 12-10-2006 12:37 AM

Thanks. :)

EDIT: Bah!

Code:

Altering Table edithistory ...
Fatal error: Call to a member function on a non-object in [...]/forums/htdocs/admincp/plugin.php(1941) : eval()'d code on line 3


Surviver 12-10-2006 04:52 AM

Quote:

Originally Posted by Viper007Bond (Post 1135459)
Thanks. :)

EDIT: Bah!

Code:

Altering Table edithistory ...
Fatal error: Call to a member function on a non-object in [...]/forums/htdocs/admincp/plugin.php(1941) : eval()'d code on line 3


Ok, Got to ACP -> Plugins & Products -> Manage Products -> Post Edit History -> Edit -> Go -> Version -> Enter 1.2.0 -> Save.

The Import the ATtached Produkt !

Say if it works :)

Greetings SUrviver

Viper007Bond 12-10-2006 06:15 AM

Version was already at 1.2.0 (guess it never got updated since the import failed).

Importing the file you just attached results in a DB error:

Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
ALTER TABLE vb_edithistory CHANGE reason oldreason varchar(255);

MySQL Error  : Unknown column 'reason' in 'vb_edithistory'
Error Number : 1054
Date        : Sunday, December 10th 2006 @ 08:14:17 AM
Script      : http://forums.finalgear.com/admincp/plugin.php?do=productimport
Referrer    : http://forums.finalgear.com/admincp/plugin.php?do=productadd
IP Address  : [removed]
Username    : Viper007Bond
Classname    : vb_database


Surviver 12-10-2006 06:42 AM

Quote:

Originally Posted by Viper007Bond (Post 1135549)
Version was already at 1.2.0 (guess it never got updated since the import failed).

Importing the file you just attached results in a DB error:

Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
ALTER TABLE vb_edithistory CHANGE reason oldreason varchar(255);

MySQL Error  : Unknown column 'reason' in 'vb_edithistory'
Error Number : 1054
Date        : Sunday, December 10th 2006 @ 08:14:17 AM
Script      : http://forums.finalgear.com/admincp/plugin.php?do=productimport
Referrer    : http://forums.finalgear.com/admincp/plugin.php?do=productadd
IP Address  : [removed]
Username    : Viper007Bond
Classname    : vb_database


Sorry my Mistake, run the following QUery

ALTER TABLE vb_edithistory CHANGE oldreason reason varchar(255);

Then import the product again !

Greetings Surviver

Nathan2006 12-10-2006 09:14 AM

Thanks Surviver,

Updated and working great!

;)

Viper007Bond 12-10-2006 10:41 AM

Ran the query, changed the version number in my admin area to 1.2.1 (so the broken upgrade code wouldn't run), and ran the XML you had attached. Everything works now. :)

Surviver 12-10-2006 12:12 PM

Quote:

Originally Posted by Viper007Bond (Post 1135612)
Ran the query, changed the version number in my admin area to 1.2.1 (so the broken upgrade code wouldn't run), and ran the XML you had attached. Everything works now. :)

Cool, and Sorry for my Mistakes ;)

Protonus 12-10-2006 10:12 PM

Updated, works, thanx!

Jackal von ?RF 12-14-2006 06:56 PM

At my forums there have been two cases when a user edited all of his messages to remove them from the forums (in one case he had over a thousand messages and it took him two days to edit them). What I've done to them is ban them (removing their right to edit their own posts) and restored all the messages from a backup (takes a couple of hours when writing some SQL scripts manually).

It would be nice if this mod offered the possibility to mass-undo all edits which a user made within a specific time frame. The same way as the prune tools in vB's Admin CP work. It should show all individual edits (before and after editing), when it was done, who edited it, and there should be a checkbox for selecting the edits which should be undone.

It would also be nice for the program to send a PM to the admins/moderators when a user edits many of his old messages in a short time. It should be configurable so, that editing even one old message (for example older than 30 days) would send a PM. Then the moderators could quickly stop the user from editing all of his messages away.

Anyways, thanks for your work. Your script looks promising. I'll try it soon. I first thought about creating a similar script myself, but luckily you had already done the job. :) (I might even offer some help in adding these features I requested, if I really like your script and I have the time.)

EDIT 1:
I looked quickly through your code (v1.2.1) and noticed the query in \includes\cron\edithistory.php. Wouldn't it look much nicer if it was written like this?
Code:

$vbulletin->db->query_write("
        DELETE edithistory
        FROM " . TABLE_PREFIX . "edithistory AS edithistory
        LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = edithistory.postid)
        WHERE post.postid IS NULL
");

Or does this have to do with the incompatibility between MySQL 4.0 and 4.1 as mentioned here? In that case how about writing it without the "AS" keyword like this? Also there should be a comment which would tell about the incompatibility and why the SQL had to be written in an ugly way. (In any case format the SQL to have less tabs; indentation of one tab instead of eight.)
Code:

$vbulletin->db->query_write("
        DELETE " . TABLE_PREFIX . "edithistory
        FROM " . TABLE_PREFIX . "edithistory
        LEFT JOIN " . TABLE_PREFIX . "post ON (" . TABLE_PREFIX . "post.postid = " . TABLE_PREFIX . "edithistory.postid)
        WHERE " . TABLE_PREFIX . "post.postid IS NULL
");

EDIT 2:
Does the field edithistory.postid have an index at all? I noticed quite many queries use it in the WHERE condition, but I didn't find anywhere an index for it to be created. This might create full scans of the edithistory table...

Also, I noticed the following line of code. Since reason is a text field, the value assigned to it should be quoted in the SQL query. It would be a good habbit to always quote the values, even if you know that they are numeric.
Code:

$db->query_write("UPDATE " .TABLE_PREFIX. "editlog SET reason = ".$edit['oldreason']." WHERE postid = ".$postinfo['postid']."");
Also, I noticed from my DB dump of vB3.5.x (first install was 2.3.5 or older) that the editlog.reason field is defined as `reason` varchar(200) NOT NULL default '' but in your code you have the oldreason and newreason fields defined as varchar(255). Could somebody with a clean vB3.6.x install check that what the size should be?

EDIT 3:
As somebody already mentioned, there's no need for the cron job to run more often that once a day or week (I think it's now by default once an hour). It's rare that posts get physically deleted, so most of the time the cron job would do nothing. I hope you have checked that it uses indexes correctly and runs quickly. I'm just a bit worried because checking every postid might take some time for a big board... My board has some 300K posts and also boards with millions of posts exist. It would be better to remove those rows from edithistory when a post gets physically deleted, and not in a cron job.


PS: I think you should tick the boxes "Additional files" and "Is in Beta stage" for this mod. Also I recommend you to write more comments in your code (I didn't notice any).

Surviver 12-15-2006 11:43 AM

Quote:

Originally Posted by Jackal von ?RF (Post 1138635)
At my forums there have been two cases when a user edited all of his messages to remove them from the forums (in one case he had over a thousand messages and it took him two days to edit them). What I've done to them is ban them (removing their right to edit their own posts) and restored all the messages from a backup (takes a couple of hours when writing some SQL scripts manually).

It would be nice if this mod offered the possibility to mass-undo all edits which a user made within a specific time frame. The same way as the prune tools in vB's Admin CP work. It should show all individual edits (before and after editing), when it was done, who edited it, and there should be a checkbox for selecting the edits which should be undone.

I will see, waht I can do ;)
Quote:

Originally Posted by Jackal von ?RF (Post 1138635)
It would also be nice for the program to send a PM to the admins/moderators when a user edits many of his old messages in a short time. It should be configurable so, that editing even one old message (for example older than 30 days) would send a PM. Then the moderators could quickly stop the user from editing all of his messages away.

This would add 1-2 Querys if you edit a post ... (And not nany user would use ist)
Quote:

Originally Posted by Jackal von ?RF (Post 1138635)

Anyways, thanks for your work. Your script looks promising. I'll try it soon. I first thought about creating a similar script myself, but luckily you had already done the job. :) (I might even offer some help in adding these features I requested, if I really like your script and I have the time.)

EDIT 1:
I looked quickly through your code (v1.2.1) and noticed the query in \includes\cron\edithistory.php. Wouldn't it look much nicer if it was written like this?
Code:

$vbulletin->db->query_write("
        DELETE edithistory
        FROM " . TABLE_PREFIX . "edithistory AS edithistory
        LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = edithistory.postid)
        WHERE post.postid IS NULL
");

Or does this have to do with the incompatibility between MySQL 4.0 and 4.1 as mentioned here? In that case how about writing it without the "AS" keyword like this? Also there should be a comment which would tell about the incompatibility and why the SQL had to be written in an ugly way. (In any case format the SQL to have less tabs; indentation of one tab instead of eight.)

Code:

$vbulletin->db->query_write("
        DELETE " . TABLE_PREFIX . "edithistory
        FROM " . TABLE_PREFIX . "edithistory
        LEFT JOIN " . TABLE_PREFIX . "post ON (" . TABLE_PREFIX . "post.postid = " . TABLE_PREFIX . "edithistory.postid)
        WHERE " . TABLE_PREFIX . "post.postid IS NULL
");


Or does this have to do with the incompatibility between MySQL 4.0 and 4.1 as mentioned here? Yes !
Quote:

Originally Posted by Jackal von ?RF (Post 1138635)
EDIT 2:
Does the field edithistory.postid have an index at all? I noticed quite many queries use it in the WHERE condition, but I didn't find anywhere an index for it to be created. This might create full scans of the edithistory table...

I will add it !
Quote:

Originally Posted by Jackal von ?RF (Post 1138635)
Also, I noticed the following line of code. Since reason is a text field, the value assigned to it should be quoted in the SQL query. It would be a good habbit to always quote the values, even if you know that they are numeric.
Code:

$db->query_write("UPDATE " .TABLE_PREFIX. "editlog SET reason = ".$edit['oldreason']." WHERE postid = ".$postinfo['postid']."");

I will fix it ! :)
Quote:

Originally Posted by Jackal von ?RF (Post 1138635)
Also, I noticed from my DB dump of vB3.5.x (first install was 2.3.5 or older) that the editlog.reason field is defined as `reason` varchar(200) NOT NULL default '' but in your code you have the oldreason and newreason fields defined as varchar(255). Could somebody with a clean vB3.6.x install check that what the size should be?

Why is the size important? ;)
Quote:

Originally Posted by Jackal von ?RF (Post 1138635)
EDIT 3:
As somebody already mentioned, there's no need for the cron job to run more often that once a day or week (I think it's now by default once an hour). It's rare that posts get physically deleted, so most of the time the cron job would do nothing. I hope you have checked that it uses indexes correctly and runs quickly. I'm just a bit worried because checking every postid might take some time for a big board... My board has some 300K posts and also boards with millions of posts exist. It would be better to remove those rows from edithistory when a post gets physically deleted, and not in a cron job.


PS: I think you should tick the boxes "Additional files" and "Is in Beta stage" for this mod. Also I recommend you to write more comments in your code (I didn't notice any).

I will check Additional Files, but it is not really a beta Release.
Maybe it has some bug, but its no relly Beta ;)

Thanky for your feedback !

Greetings Surviver

Jackal von ?RF 12-16-2006 04:31 AM

Quote:

Originally Posted by Surviver (Post 1139093)
This would add 1-2 Querys if you edit a post ... (And not nany user would use ist)

Another way would be have search functions in the Admin CP, with which it would be possible to search for suspicious mass edits of old messages. For example in the same place where the controls for mass undoing the edits would be. Or some other way to view all edits which the users have done (just like there is the Moderator Log to see all moderation actions). The biggest problem might be, that how a large number of edits could be visualized informatively and effectively in a small space.

The feature of sending automatic PMs is not very important (and might not even be the optimal solution to the problem), so don't worry about implementing it yet. Maybe I'll make a custom tool for analyzing the edit actions. In any case I'll first need to experiment a bit to find a good way to visualize the edits, after I've had the edit history in use for some time and gathered real usage data.

I'll keep you informed if I get some good ideas.

Quote:

Originally Posted by Surviver (Post 1139093)
Why is the size important? ;)

Well, since they are VARCHAR fields, I suppose it doesn't take any more space from the database than a VARCHAR(200) would take. So it's not really a problem. Just a matter of style and consistency.

Surviver 12-16-2006 11:41 AM

Quote:

Originally Posted by Jackal von ?RF (Post 1139579)
Another way would be have search functions in the Admin CP, with which it would be possible to search for suspicious mass edits of old messages. For example in the same place where the controls for mass undoing the edits would be. Or some other way to view all edits which the users have done (just like there is the Moderator Log to see all moderation actions). The biggest problem might be, that how a large number of edits could be visualized informatively and effectively in a small space.

The feature of sending automatic PMs is not very important (and might not even be the optimal solution to the problem), so don't worry about implementing it yet. Maybe I'll make a custom tool for analyzing the edit actions. In any case I'll first need to experiment a bit to find a good way to visualize the edits, after I've had the edit history in use for some time and gathered real usage data.

I'll keep you informed if I get some good ideas.


Well, since they are VARCHAR fields, I suppose it doesn't take any more space from the database than a VARCHAR(200) would take. So it's not really a problem. Just a matter of style and consistency.

Ok, i will canch it in the new version. Annd i'll add an index ;)

Jackal von ?RF 01-08-2007 08:01 PM

Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
UPDATE vb_editlog SET reason = fda WHERE postid = 354660;

MySQL Error  : Unknown column 'fda' in 'field list'
Error Number : 1054
Date        : Monday, January 8th 2007 @ 11:59:09 PM
Script      : http://foorumit.fffin.com/edithistory.php?do=restore&editid=5
Referrer    :
IP Address  : x.x.x.x
Username    : Jackal von ?RF
Classname    : vb_database

This has not yet been fixed in v1.2.2. Also, the value needs to be escaped. If only single quotes are added to the query, it will make the database vulnerable to SQL injection attack:
Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
UPDATE vb_editlog SET reason = 'aa ' bee' WHERE postid = 354660;

MySQL Error  : You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'bee' WHERE postid = 354660' at line 1
Error Number : 1064
Date        : Tuesday, January 9th 2007 @ 12:03:10 AM
Script      : http://foorumit.fffin.com/edithistory.php?do=restore&editid=6
Referrer    :
IP Address  : x.x.x.x
Username    : Jackal von ?RF
Classname    : vb_database

I also found that the rest of your the code is vulnerable to SQL injection attacks. You must ALWAYS escape EVERY parameter that is put to an SQL query:
Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
INSERT INTO vb_editlog (postid, userid, username, dateline, reason) VALUES('354660', '468', 'Jackal von ?RF', '1168294059', 'a ' b');

MySQL Error  : You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'b')' at line 1
Error Number : 1064
Date        : Tuesday, January 9th 2007 @ 12:07:39 AM
Script      : http://foorumit.fffin.com/edithistory.php?do=restore&editid=12
Referrer    :
IP Address  : x.x.x.x
Username    : Jackal von ?RF
Classname    : vb_database


I've attached a version of edithistory.php where the above security holes have been fixed.

All users of PEH 1.2.2 (and below) are STRONGLY RECOMMENDED to apply this patch, or disable PEH.


PS: I noticed that there are more detailed instructions for installing PEH at http://www.my-vb.org/board/showthread.php?t=236 (fortunately I can read German, I'm worried about everybody else ;)). Could you also make the English instructions more detailed? Also, please include the instructions as a text file to the ZIP file, so that it would not be necessary to read this thread for the instructions.

Surviver 01-10-2007 05:37 PM

Quote:

Originally Posted by Jackal von ?RF (Post 1153946)
Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
UPDATE vb_editlog SET reason = fda WHERE postid = 354660;

MySQL Error  : Unknown column 'fda' in 'field list'
Error Number : 1054
Date        : Monday, January 8th 2007 @ 11:59:09 PM
Script      : http://foorumit.fffin.com/edithistory.php?do=restore&editid=5
Referrer    :
IP Address  : x.x.x.x
Username    : Jackal von ?RF
Classname    : vb_database

This has not yet been fixed in v1.2.2. Also, the value needs to be escaped. If only single quotes are added to the query, it will make the database vulnerable to SQL injection attack:
Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
UPDATE vb_editlog SET reason = 'aa ' bee' WHERE postid = 354660;

MySQL Error  : You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'bee' WHERE postid = 354660' at line 1
Error Number : 1064
Date        : Tuesday, January 9th 2007 @ 12:03:10 AM
Script      : http://foorumit.fffin.com/edithistory.php?do=restore&editid=6
Referrer    :
IP Address  : x.x.x.x
Username    : Jackal von ?RF
Classname    : vb_database

I also found that the rest of your the code is vulnerable to SQL injection attacks. You must ALWAYS escape EVERY parameter that is put to an SQL query:
Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
INSERT INTO vb_editlog (postid, userid, username, dateline, reason) VALUES('354660', '468', 'Jackal von ?RF', '1168294059', 'a ' b');

MySQL Error  : You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'b')' at line 1
Error Number : 1064
Date        : Tuesday, January 9th 2007 @ 12:07:39 AM
Script      : http://foorumit.fffin.com/edithistory.php?do=restore&editid=12
Referrer    :
IP Address  : x.x.x.x
Username    : Jackal von ?RF
Classname    : vb_database


I've attached a version of edithistory.php where the above security holes have been fixed.

All users of PEH 1.2.2 (and below) are STRONGLY RECOMMENDED to apply this patch, or disable PEH.


PS: I noticed that there are more detailed instructions for installing PEH at http://www.my-vb.org/board/showthread.php?t=236 (fortunately I can read German, I'm worried about everybody else ;)). Could you also make the English instructions more detailed? Also, please include the instructions as a text file to the ZIP file, so that it would not be necessary to read this thread for the instructions.



Thank you, this is MY Mistake. I will attache a complete fixed Version in the first post, i inserted your name as co-author ;)

I'll include the Installation Instructions,. but the Problem is, my English is too bad :(

I'll give my best ;)

Greetings SUrviver

Surviver 01-10-2007 06:22 PM

Quote:

Originally Posted by Jackal von ?RF (Post 1153946)
Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
UPDATE vb_editlog SET reason = fda WHERE postid = 354660;

MySQL Error  : Unknown column 'fda' in 'field list'
Error Number : 1054
Date        : Monday, January 8th 2007 @ 11:59:09 PM
Script      : http://foorumit.fffin.com/edithistory.php?do=restore&editid=5
Referrer    :
IP Address  : x.x.x.x
Username    : Jackal von ?RF
Classname    : vb_database

This has not yet been fixed in v1.2.2. Also, the value needs to be escaped. If only single quotes are added to the query, it will make the database vulnerable to SQL injection attack:
Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
UPDATE vb_editlog SET reason = 'aa ' bee' WHERE postid = 354660;

MySQL Error  : You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'bee' WHERE postid = 354660' at line 1
Error Number : 1064
Date        : Tuesday, January 9th 2007 @ 12:03:10 AM
Script      : http://foorumit.fffin.com/edithistory.php?do=restore&editid=6
Referrer    :
IP Address  : x.x.x.x
Username    : Jackal von ?RF
Classname    : vb_database

I also found that the rest of your the code is vulnerable to SQL injection attacks. You must ALWAYS escape EVERY parameter that is put to an SQL query:
Code:

Database error in vBulletin 3.6.4:

Invalid SQL:
INSERT INTO vb_editlog (postid, userid, username, dateline, reason) VALUES('354660', '468', 'Jackal von ?RF', '1168294059', 'a ' b');

MySQL Error  : You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'b')' at line 1
Error Number : 1064
Date        : Tuesday, January 9th 2007 @ 12:07:39 AM
Script      : http://foorumit.fffin.com/edithistory.php?do=restore&editid=12
Referrer    :
IP Address  : x.x.x.x
Username    : Jackal von ?RF
Classname    : vb_database


I've attached a version of edithistory.php where the above security holes have been fixed.

All users of PEH 1.2.2 (and below) are STRONGLY RECOMMENDED to apply this patch, or disable PEH.


PS: I noticed that there are more detailed instructions for installing PEH at http://www.my-vb.org/board/showthread.php?t=236 (fortunately I can read German, I'm worried about everybody else ;)). Could you also make the English instructions more detailed? Also, please include the instructions as a text file to the ZIP file, so that it would not be necessary to read this thread for the instructions.

Update, Thanks again !

Pottsy 01-12-2007 07:55 AM

I tried to update it to 1.2.3 (upload all new files and import xml with "allow overwrite") and got:

Database error in vBulletin 3.6.4:

Invalid SQL:
ALTER TABLE edithistory CHANGE reason oldreason varchar(200);

MySQL Error : Unknown column 'reason' in 'edithistory'
Error Number : 1054
Date : Friday, January 12th 2007 @ 09:50:17 AM
Script : xxxxxxplugin.php?do=productimport
Referrer : xxxxxxx?do=productadd
IP Address : xx.xx.xx.xx
Username : xxxxx
Classname : vb_database

EDIT: Got it working by running query

ALTER TABLE edithistory CHANGE oldreason reason varchar(255);

and then doing the import again.

TrIn@dOr 01-12-2007 10:21 AM

Very nice, perhaps u can add in the explanations that by default NO usergroup can view the historys!! :P

Surviver 01-12-2007 11:18 AM

Quote:

Originally Posted by Pottsy (Post 1156848)
I tried to update it to 1.2.3 (upload all new files and import xml with "allow overwrite") and got:

Database error in vBulletin 3.6.4:

Invalid SQL:
ALTER TABLE edithistory CHANGE reason oldreason varchar(200);

MySQL Error : Unknown column 'reason' in 'edithistory'
Error Number : 1054
Date : Friday, January 12th 2007 @ 09:50:17 AM
Script : xxxxxxplugin.php?do=productimport
Referrer : xxxxxxx?do=productadd
IP Address : xx.xx.xx.xx
Username : xxxxx
Classname : vb_database



EDIT: Got it working by running query

ALTER TABLE edithistory CHANGE oldreason reason varchar(255);

and then doing the import again.

I'll look at this

//I can nnot repoduce the Problem.
It works fine for me ;)

Quote:

* Altering Table post ...Done!

* Altering Table usergroup ...Done!

* Creating Table edithistory ... Done!

* Altering Table edithistory ...Done!

* Altering Table edithistory ...Done!

* Altering Table edithistory ...Done!

* Altering Table edithistory ...Done!

* Altering Table forum ...Done!

* Altering Table edithistory ...Done!

* Altering Table edithistory ...Done!

* Adding Index postid ...Done!
Quote:

Originally Posted by TrIn@dOr (Post 1156918)
Very nice, perhaps u can add in the explanations that by default NO usergroup can view the historys!! :P

This is Default

Nathan2006 01-13-2007 06:55 PM

Thanks Surviver,

Updated and working :)

ben_erhan 01-13-2007 08:39 PM

I have made all the changes on 3.6.3 but it did not work.
I could not see the edit history link anywhere?

If I want this hack, is it necessary to upgrade the version of vb?

Surviver 01-14-2007 06:11 AM

Quote:

Originally Posted by ben_erhan (Post 1158348)
I have made all the changes on 3.6.3 but it did not work.
I could not see the edit history link anywhere?

If I want this hack, is it necessary to upgrade the version of vb?

you must use a 3.6.x Version of vB. Did you the Template-Edits and are you sure youzr members have the right rights ?

Greeetins Surviver

Duran26 01-14-2007 01:39 PM

Hello,

Nice Script. Thank you.

But I can“t find the link "Edit History" in my Forum.

What might be wrong ?

regards

Surviver 01-14-2007 01:43 PM

Quote:

Originally Posted by Duran26 (Post 1158851)
Hello,

Nice Script. Thank you.

But I can?t find the link "Edit History" in my Forum.

What might be wrong ?

regards

1.) IT's not active in the specified Forum
2.) The User has not the rights
3.) You didn't the Template Edit

Greetings Surviver

Duran26 01-14-2007 02:10 PM

Quote:

Originally Posted by Surviver (Post 1158856)
1.) IT's not active in the specified Forum
2.) The User has not the rights
3.) You didn't the Template Edit

Greetings Surviver



1.) Where can i activate it ?
2.) The User is the Superadmin
3.) Done

Surviver 01-14-2007 03:43 PM

Quote:

Originally Posted by Duran26 (Post 1158884)
1.) Where can i activate it ?
2.) The User is the Superadmin
3.) Done

1.) AdminCP -> Forum Manager -> Select Forum -> Edithistory Active ?
1.) That has nothing to say. AdminCP -> Usergroupmanager ->Select usergroups -> Post Edit History Permissions

Greetins Surviver

stwilson 01-14-2007 05:46 PM

I have followed the setup instructions to the letter:

-uploaded files
-installed product
-modified templates

But I still do not see the option to enable this feature in the Forum Manager >Edit section. I cannot locate the Edithistory Active setting. What am I missing??? I'm looking forward to using this mod.

ST

Duran26 01-14-2007 06:27 PM

Quote:

Originally Posted by Surviver (Post 1158964)
1.) That has nothing to say. AdminCP -> Usergroupmanager ->Select usergroups -> Post Edit History Permissions

Hello Surviver,

Thank you very much!
It works now !!

The permissions in the Usergroupmanager was the problem.

have a nice day ! :)

Surviver 01-14-2007 06:36 PM

Quote:

Originally Posted by Duran26 (Post 1159153)
Hello Surviver,

Thank you very much!
It works now !!

The permissions in the Usergroupmanager was the problem.

have a nice day ! :)

Thats good, thanks ;)

Greetins Surviver

Spinball 01-14-2007 06:39 PM

The link to the video does not work.

stwilson 01-15-2007 03:32 AM

Quote:

Originally Posted by stwilson (Post 1159086)
I have followed the setup instructions to the letter:

-uploaded files
-installed product
-modified templates

But I still do not see the option to enable this feature in the Forum Manager >Edit section. I cannot locate the Edithistory Active setting. What am I missing??? I'm looking forward to using this mod.

ST

I uninstalled and reinstalled and got it to work. Nice MOD! Thank you.

ST

MThornback 01-16-2007 12:20 PM

I use a customized postbit and I laid out the edit display differently than the coder's.....

Code:

<if condition="$post[editcount]==0">
&nbsp;
<else />
<if condition="$show['edithistorylink'] AND $post[editcount] > '0'">
<td valign="top">
<fieldset class="fieldset">
<legend><b>Post Edit History</b>:</legend>
<a href="edithistory.php?do=viewedithistory&postid=$post[postid]"><phrase 1=$post[editcount]>$vbphrase[saved_edits]</phrase></a></td>
</if>
</if>

Its not much...but it saves room if there are no edits on that perticular post...all are free to use it if they wish :)

With the author's permission i'd like to release it as a template mod too :o

Surviver 01-16-2007 02:37 PM

Quote:

Originally Posted by MThornback (Post 1160521)
I use a customized postbit and I laid out the edit display differently than the coder's.....

Code:

<if condition="$post[editcount]==0">
&nbsp;
<else />
<if condition="$show['edithistorylink'] AND $post[editcount] > '0'">
<td valign="top">
<fieldset class="fieldset">
<legend><b>Post Edit History</b>:</legend>
<a href="edithistory.php?do=viewedithistory&postid=$post[postid]"><phrase 1=$post[editcount]>$vbphrase[saved_edits]</phrase></a></td>
</if>
</if>

Its not much...but it saves room if there are no edits on that perticular post...all are free to use it if they wish :)

With the author's permission i'd like to release it as a template mod too :o

If you like .. Release id as a template mod :)

TheWhite 01-21-2007 12:45 AM

If I have to update from a previous version what must i do?

Regards

Surviver 01-21-2007 04:21 AM

Quote:

Originally Posted by TheWhite (Post 1163931)
If I have to update from a previous version what must i do?

Regards

Overite all Files an import the Product again, ALlow Override ;)

voteforbird 02-09-2007 05:31 PM

Nevermind

madmaca 05-16-2007 04:05 PM

This seems to have stopped working for 3.6.6 :(

Can anyone else confirm?

stwilson 05-17-2007 04:13 AM

It is working fine for me in 3.6.7.

MThornback 05-17-2007 06:19 AM

Works for me too....

You may have reverted your templates to accommodate the changes in the 3.6.6 release...you'd need to reapply them afterwards :)

ChopBam 05-18-2007 04:55 PM

Just installed it. It works fine for me in 3.6.7.
Here's a change I made.
I edited the phrase to "Edit History" like you can see on the first page. However, I also made use of the $post[editcount] feature by not having the "Edit History" link even show up if there is no edit history. Just a small change, but real handy dandy.

Code:

<if condition="$show['edithistorylink'] && $post[editcount] > 0"><a href="edithistory.php?do=viewedithistory&postid=$post[postid]"><phrase>$vbphrase[saved_edits]</phrase><a></if>

Oh, and I suggest that you add to the readme the fact that you need to allow this for usergroups before it'll work. I was confused at first but started reading the thread and found out that way. Other people might not be so fortunate.


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

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.01584 seconds
  • Memory Usage 1,938KB
  • 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
  • (23)bbcode_code_printable
  • (28)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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