[RC] Prime Post Revisions - View all edits to posts

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
User avatar
primehalo
Former Team Member
Posts: 2850
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC] Prime Post Revisions - View all edits to posts

Post by primehalo » Tue Apr 05, 2011 4:57 am

I'd first change your image line to this:

Code: Select all

'PRIME_POST_REVISIONS_IMG'            => '<img src="/forum/images/upload_icons/txt.gif" title="%s"/>', 
Then change this line:

Code: Select all

$postrow['EDITED_MESSAGE'] = trim($postrow['EDITED_MESSAGE'] . ' ' . $l_edited_link); 
To this:

Code: Select all

$postrow['EDITED_MESSAGE'] = sprintf($l_edited_link, trim($postrow['EDITED_MESSAGE'])); 
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

mazeteam
Registered User
Posts: 76
Joined: Thu Apr 20, 2006 1:45 am
Location: York, UK
Contact:

Re: [RC] Prime Post Revisions - View all edits to posts

Post by mazeteam » Tue Apr 05, 2011 10:20 pm

Well that does work, sort of...

The HTML for the link to user profile is messing up the IMG code, so we get this:

Code: Select all

<a href="viewtopic.php?p=9999&display_history=true" class="view_edits"><img src="/forum/images/upload_icons/txt.gif" title="Last edited by <a href="./memberlist.php?mode=viewprofile&u=1" style="color: #006699;" class="username-coloured">User Name</a> on Tue Apr 05, 2011 10:32 pm, edited 1 time in total."/></a>
I know php can strip out html, so how can it be applied to this so that the html A HREF tag is removed entirely when within the IMG tag?

thanks so far.
Have you not heard? it was my understanding that everybody had heard...

mazeteam
Registered User
Posts: 76
Joined: Thu Apr 20, 2006 1:45 am
Location: York, UK
Contact:

Re: [RC] Prime Post Revisions - View all edits to posts

Post by mazeteam » Tue Apr 05, 2011 10:29 pm

Okay, scratch that last bit because I've fixed it myself.

the original line

Code: Select all

$postrow['EDITED_MESSAGE'] = trim($postrow['EDITED_MESSAGE'] . ' ' . $l_edited_link);

Is now this, with the strip tags function added in by myself

Code: Select all

$postrow['EDITED_MESSAGE'] = sprintf($l_edited_link, strip_tags($postrow['EDITED_MESSAGE'], ''));
So now it is complete with a nice discreet little image which is clickable for the view revisions page.
Have you not heard? it was my understanding that everybody had heard...

Namor76
Registered User
Posts: 5
Joined: Mon Sep 26, 2011 10:51 am

Re: [RC] Prime Post Revisions - View all edits to posts

Post by Namor76 » Mon Sep 26, 2011 10:58 am

uh oh... I just installed this and double checked that everything was editing per the instructions... but now when going into a forum... there is no posts visable?

does anyone have any ideas as to what might be causing it??

User avatar
doktornotor
Registered User
Posts: 608
Joined: Fri Sep 09, 2011 7:41 am

Re: [RC] Prime Post Revisions - View all edits to posts

Post by doktornotor » Mon Sep 26, 2011 3:12 pm

This is really an interesting mod, but a huge overkill for me. I would like the functionality to be triggered for reported posts only - i.e., store all revisions after they have have been reported. Ideas? :D
Support requests via PM go straight to /dev/null!

User avatar
primehalo
Former Team Member
Posts: 2850
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC] Prime Post Revisions - View all edits to posts

Post by primehalo » Tue Sep 27, 2011 7:41 pm

Namor76 wrote:uh oh... I just installed this and double checked that everything was editing per the instructions... but now when going into a forum... there is no posts visable?

does anyone have any ideas as to what might be causing it??
The only explanations I can think of is that it wasn't installed correctly or it is conflicting with some other MOD.
doktornotor wrote:This is really an interesting mod, but a huge overkill for me. I would like the functionality to be triggered for reported posts only - i.e., store all revisions after they have have been reported. Ideas? :D
Open the includes/prime_post_revisions.php file and modify the part of the code that determines whether or not a revision will be stored so that it checks if the post has been reported.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Namor76
Registered User
Posts: 5
Joined: Mon Sep 26, 2011 10:51 am

Re: [RC] Prime Post Revisions - View all edits to posts

Post by Namor76 » Wed Sep 28, 2011 1:25 am

i got it working now... thanks. its an awesome mod!!

User avatar
doktornotor
Registered User
Posts: 608
Joined: Fri Sep 09, 2011 7:41 am

Re: [RC] Prime Post Revisions - View all edits to posts

Post by doktornotor » Wed Sep 28, 2011 8:57 am

primehalo wrote:
doktornotor wrote:This is really an interesting mod, but a huge overkill for me. I would like the functionality to be triggered for reported posts only - i.e., store all revisions after they have have been reported. Ideas? :D
Open the includes/prime_post_revisions.php file and modify the part of the code that determines whether or not a revision will be stored so that it checks if the post has been reported.
Thanks for the hint... will play with that when I have more time. Great mod! 8-)
Support requests via PM go straight to /dev/null!

mazeteam
Registered User
Posts: 76
Joined: Thu Apr 20, 2006 1:45 am
Location: York, UK
Contact:

Re: [RC] Prime Post Revisions - View all edits to posts

Post by mazeteam » Sun Oct 02, 2011 2:02 am

As a callback to a previous bit of discussion....
mazeteam wrote:Well that does work, sort of...

The HTML for the link to user profile is messing up the IMG code, so we get this:

Code: Select all

<a href="viewtopic.php?p=9999&display_history=true" class="view_edits"><img src="/forum/images/upload_icons/txt.gif" title="Last edited by <a href="./memberlist.php?mode=viewprofile&u=1" style="color: #006699;" class="username-coloured">User Name</a> on Tue Apr 05, 2011 10:32 pm, edited 1 time in total."/></a>
I know php can strip out html, so how can it be applied to this so that the html A HREF tag is removed entirely when within the IMG tag?

thanks so far.
This was so that a post that had been edited just shows a little clickable icon next to the post info text. As it stands all this works, and clicking it shows the post history page.... But:

(a) is there a way of making it compulsory that a reason has to be typed in before a message can be edited - and that the reason then shows up in the 'tooltip' that pops up when the mouse hovers over the icon (example "last edited at XX:XX by ____ for reason: Spelling corrections")

(b) is there a way of having the icon show up for all members viewing the page, but without the availability to view post revisions - so there'd just be the icon which would bring up a 'tooltip' when hovered over that says "last edited at XX:XX by ____ for reason: Spelling corrections"

Thanks.
Have you not heard? it was my understanding that everybody had heard...

User avatar
primehalo
Former Team Member
Posts: 2850
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC] Prime Post Revisions - View all edits to posts

Post by primehalo » Fri Nov 04, 2011 8:38 am

I will have to leave that as an exercise to the user. It's not something I really have a need for, and so don't really want to spend the time implementing it.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

UnknownTBeast
Registered User
Posts: 58
Joined: Fri May 21, 2010 4:18 pm

Re: [RC] Prime Post Revisions - View all edits to posts

Post by UnknownTBeast » Thu Dec 08, 2011 4:48 am

Any chance of an update for this MOD for 3.0.9?

baloo
Registered User
Posts: 70
Joined: Mon Feb 11, 2008 12:32 pm

Re: [RC] Prime Post Revisions - View all edits to posts

Post by baloo » Thu Dec 08, 2011 5:14 am

UnknownTBeast wrote:Any chance of an update for this MOD for 3.0.9?
I installed this recently on 3.09 with no issues

kaneaston
Registered User
Posts: 1
Joined: Thu Apr 12, 2012 11:18 am

Re: [RC] Prime Post Revisions - View all edits to posts

Post by kaneaston » Thu Apr 12, 2012 11:24 am

I've just installed this on 3.0.10 and encountered an issue with the view post history link not working.

To resolve the issue I have made the following modification to includes/prime_post_revisions.php
Original

Code: Select all

$l_edited_link = '<a href="' . append_sid("viewtopic.$phpEx", "p={$row['post_id']}&display_history=true") . '" class="view_edits">' . $user->lang['PRIME_POST_REVISIONS_VIEW'] . '</a>';
Modified

Code: Select all

$l_edited_link = '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_id']}&display_history=true") . '" class="view_edits">' . $user->lang['PRIME_POST_REVISIONS_VIEW'] . '</a>';

User avatar
primehalo
Former Team Member
Posts: 2850
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC] Prime Post Revisions - View all edits to posts

Post by primehalo » Sun Apr 15, 2012 12:51 am

Thanks for the correction!
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

hywel
Registered User
Posts: 51
Joined: Mon Jul 12, 2010 12:53 pm

Re: [RC] Prime Post Revisions - View all edits to posts

Post by hywel » Sun May 06, 2012 11:39 am

Hi Prime, could we please have an update 1.2.7 to 1.2.8.xml contrib walkthrough?
Thanks for your time!
Cheers

Locked

Return to “[3.0.x] MODs in Development”