PDA

View Full Version : (attachment upload) If first post


Bernd
06-09-2006, 05:48 PM
Is there an easy way to find out if an attachment is being uploaded in a first post? Basically, I need to add a query if an attachment is being uploaded in a first post.

Sorry if this has been discussed before. The forum search function isn't working properly when using a search term.

calorie
06-21-2006, 07:42 PM
An idea... Look in newattachment.php for the following:

if ($threadid) // newreply.php or editpost.php called
{
// blah blah
}
else if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostnew'])) // newthread.php
{
print_no_permission();
}

And add something after that, perhaps like follows:

if (!$threadid AND ($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostnew']))
{
// do your stuff
}