PDA

View Full Version : [How?] Edit attachments after the "Editing time" is over?


za4a tuner
03-26-2009, 08:28 AM
Hello,
i'd like to let the threadstarter edit his own post/thread after the "vB's edit time limit restriction for content" is over.
@ the ACP (GARS Options) i did the setting for this -> the users can edit their own posts/treads.

BUT:
If a user want to edit an attachment / upload a new attachment AFTER the time limit for editing posts is over, it's not possible, to edit / upload an attachment.

Is there a fix for?


I use vb 3.8.1 and GARS 2.1.9


kr Chris

Morgan
03-27-2009, 01:39 AM
Where in GARS are you setting this option:

the users can edit their own posts/treads

Do you mean this setting?

Ignore vB's edit time limit restriction for content

What message do you see when adding another attachment?

za4a tuner
03-27-2009, 07:03 AM
Where in GARS are you setting this option
Do you mean this setting?

Ignore vB's edit time limit restriction for content
Yes, that's the option i set

What message do you see when adding another attachment?
I get this errormessage, when a users try to upload an new attachment or edit an existing file after the timelimit is over:
Du kannst einen Beitrag nur innerhalb von 8640 Minuten, nachdem du ihn abgeschickt hast, ändern. Diese Zeit ist inzwischen verstrichen. Wenn du Änderungen an deinem Beitrag vornehmen möchtest, musst du dich an den Administrator wenden.
This is the standardmessage, if a user tries to edit an "old" post.
The text of a post can be edited, but not even the attachments!

Morgan
03-28-2009, 01:55 AM
GARS does not affect the vBulletin attachment settings. Out of the box GARS is intertwined with the following THIS_SCRIPT pages:

editpost
forumdisplay
inlinemod
newreply
newthread
postings
printthread
showthread

So untested but to get GARS to affect the THIS_SCRIPT newattachment page, you could add a plugin to the gars_ignition_start hook with the following code and see if it works:

if (THIS_SCRIPT == "newattachment")
{
require_once(DIR . '/geek/gars/includes/gars_class_core.php');
$vbulletin->gars =& new GARS_base();
if ($vbulletin->gars->settings['edittime'])
{
$vbulletin->options['edittimelimit'] = 0;
}
}

za4a tuner
03-28-2009, 08:50 AM
Hy Morgan,
thanks for your help => the plug-in works perfekt!