Clone posts

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
8
62%
Very Good
4
31%
Good
1
8%
Fair
0
No votes
Poor
0
No votes
 
Total votes: 13

User avatar
webmacster87
Former Team Member
Posts: 3758
Joined: Fri Jun 11, 2004 2:30 am
Location: San Mateo, CA
Name: Douglas Bell
Contact:

Post by webmacster87 » Tue Jan 03, 2006 12:09 am

MOD Updated to version 1.0.4a
See first post for Download Link

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Tue Jan 03, 2006 12:36 am

Thanks, Fountain,.; You guys are on a roll...5 of my mod upgrades validated today alone. Amazing.

Anyway, this is version 1.0.4a, which has no changes in functionality from version 1.0.4.

Here's the chagnelog since the last validated version:

Code: Select all

##   2005-12-11	- Version 1.0.4a
##		  no change in functionality, but minor code changes in clone_target_forum_selection.tpl as required for validation
##
##   2005-12-11	- Version 1.0.4
##		  changed code so that by default (a) the users who are authorized to create polls in a forum are the only
##		  ones who can clone posts in that forum and (b) admins or moderators in a forum are the only ones who can clones posts
##		  in that forum in the name of the original poster.  Also updated the instructions a bit.
##
##		  added a mod to the mod in the contrib folder that will allow the admin to set cloning permissions in the ACP
##		  in the same way the admin can fine tune permissions for other phpbb actions
##
##   2005-11-19	- Version 1.0.3a
##		  fixed code so that when you create the new post in original poster's name and then try to preview the
##		  post, it remembers that you are posting in original poster's name
##
##   2005-11-13	- Version 1.0.3
##		  added feature that allows admin to decide whether to create the new cloned post in the name of original poster
##		  or in the name of the user doing the cloning

Bealzabubba
Registered User
Posts: 45
Joined: Mon Dec 27, 2004 3:16 pm

Post by Bealzabubba » Wed Jan 18, 2006 4:23 pm

FWIW, just installed the latest version plus the ACP addon via EasyMod and had one small error in a SQL statement in viewtopic.php around line 158... (I neglected to copy the exact error before I fixed it :oops: )

There was a missing comma between f.auth_cloneposts and f.auth_sticky:

// start mod tabulated survey at topic head...

$sql = "SELECT t.topic_id, t.topic_title,... f.auth_cloneposts
, f.auth_sticky,...

I haven't tracked it down yet but I believe the error was introduced by the ACP addon MOD script.

Otherwise I only have one problem: the mod is cloning messages okay but not the survey associated with the message. Any hints on where to look for this problem? :(

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Wed Jan 18, 2006 4:51 pm

Bealzabubba wrote: ...I haven't tracked it down yet but I believe the error was introduced by the ACP addon MOD script...

Odd, since I tried adding the mod and the addon with easymod before I sent this in for validation and it worked fine (and of course part of the validation process likewise checks to see if it installs with easymod and works properly, and it got validated so I guess they thought so). [edit: I just looked at the code and you are right that the addon omits a comma for one piece of code it adds to viewtopic.php...odd that this didn't get picked up by me or the validation process]
Bealzabubba wrote: ...Otherwise I only have one problem: the mod is cloning messages okay but not the survey associated with the message. Any hints on where to look for this problem? :(

Take a look at the author's notes for the clone mod. Those notes give you extra changes you need to make if you are using this with the tabulated survey mod. If you made those changes and are still having problems, let me know.

Bealzabubba
Registered User
Posts: 45
Joined: Mon Dec 27, 2004 3:16 pm

Post by Bealzabubba » Sun Jan 22, 2006 3:53 pm

asinshesq wrote: Take a look at the author's notes for the clone mod. Those notes give you extra changes you need to make if you are using this with the tabulated survey mod. If you made those changes and are still having problems, let me know.


Doh! 8O

When all else fails, try reading the documentation. Damn, Im getting too lazy in my old age...

I'll let you know how it turns out after I make the changes... :oops:

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Sun Jan 22, 2006 4:00 pm

Bealzabubba wrote: ...When all else fails, try reading the documentation. Damn, Im getting too lazy in my old age...

Well, as someone who never, ever RTFM, I can empathize! Let me know how it turns out.

Bealzabubba
Registered User
Posts: 45
Joined: Mon Dec 27, 2004 3:16 pm

Post by Bealzabubba » Sun Jan 22, 2006 4:07 pm

Can't find the last of the four changes in posting.php

Code: Select all

FIND
if( $mode == 'editpost' && $post_info['topic_survey'] == 1)
I haven't tried running it without that change to see what happens...

[edit]Nevermind... It had already been changed. The 4th change is apparently redundant to a revision already in the clone post code perhaps?[/edit]

Bealzabubba
Registered User
Posts: 45
Joined: Mon Dec 27, 2004 3:16 pm

Post by Bealzabubba » Sun Jan 22, 2006 4:33 pm

Appears to be working now! :D

[edit]I spoke too soon. Appears to be mostly working now...

The survery clones but without some of the survery parameters like who can respond and should non-responders be listed.

Still better that typing the same survey twice though! :)[/edit]

Bealzabubba
Registered User
Posts: 45
Joined: Mon Dec 27, 2004 3:16 pm

Post by Bealzabubba » Sun Jan 22, 2006 4:48 pm

It's worse than I thought.

It's cloning the survey and the survey caption, but that's all. No survery params nor any survey questions. :(

Bealzabubba
Registered User
Posts: 45
Joined: Mon Dec 27, 2004 3:16 pm

Post by Bealzabubba » Sun Jan 22, 2006 6:33 pm

I can't edit surveys after making the changes either... :(

Changing back for now.

Bealzabubba
Registered User
Posts: 45
Joined: Mon Dec 27, 2004 3:16 pm

Post by Bealzabubba » Sun Jan 22, 2006 8:01 pm

Here's what I found so far...

There appears to be an error in the 4 changes.

#1 is okay.
#2 is okay
#3 is okay but should be repeated for two seperate ocurances of the FIND code. Missing one of these appears to be what caused the survey parameters not to clone.
#4 is a duplicate of #1 and appears unnecessary.

I'm betting that the failure to clone the survey questions themsleves and the inability to edit survey questions are one and the same problem. Further, I think that they're related to another MOD (FTP beta) and not the survey or clone MODs.

I'm printing out the before and after FTP versions of posting.php to see if I can track down the problem.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Mon Jan 23, 2006 1:47 am

Bealzabubba wrote: Here's what I found so far...

There appears to be an error in the 4 changes.

#1 is okay.
#2 is okay
#3 is okay but should be repeated for two seperate ocurances of the FIND code. Missing one of these appears to be what caused the survey parameters not to clone.
#4 is a duplicate of #1 and appears unnecessary....

I don't know what that ftp mod you referred to does to the picture, but your post above is incorrect. #4 is a duplicate of #2 and is necessary. #3 only happens once. I just checked this against my own posting.php (which works fine) and confirmed it.

Bealzabubba
Registered User
Posts: 45
Joined: Mon Dec 27, 2004 3:16 pm

Post by Bealzabubba » Thu Jan 26, 2006 12:39 am

I'll compare the before and afters again...

FWIW, the FTP mod didn't change anything related to clone post...

I'll back up and add the mod and changes again manually so I can verify exactly what is happening where.

vag-forum
Registered User
Posts: 6
Joined: Sun Oct 23, 2005 12:04 am
Contact:

Post by vag-forum » Mon Feb 27, 2006 12:21 pm

Thank for this Mod :wink:

I've an issue when I try to clone post keeping the original poster name:
Error in posting

DEBUG MODE

INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES (, 1, 2, '', 1141043083, '7f000001', 1, 0, 1, 1)
Line : 278
File : functions_post.php


line 278:

Code: Select all

$topic_id = $db->sql_nextid();

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Mon Feb 27, 2006 1:04 pm

vag-forum wrote: ...I've an issue when I try to clone post keeping the original poster name:
Error in posting

DEBUG MODE

INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES (, 1, 2, '', 1141043083, '7f000001', 1, 0, 1, 1)
Line : 278
File : functions_post.php


line 278:

Code: Select all

$topic_id = $db->sql_nextid();

That error is telling you that teh $topic_id is blank at that point when it tries to insert the post into the db. I suspect you put that $topic_id line (line 278) in the wrong place. I gather you didn't use easymod, did you?

The simplest way to fix this is to go back to your backup files and then install this mod with easymod. If you've already tried easymod and are stuck, let me know and I'll take a look at your files.

Post Reply

Return to “[2.0.x] MOD Database Releases”

Who is online

Users browsing this forum: No registered users and 7 guests