Update attachment

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

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
User avatar
AllCity
Registered User
Posts: 230
Joined: Sun Jun 22, 2008 6:33 pm
Name: Andrey Shapoval
Contact:

Re: Update attachment

Post by AllCity » Tue May 26, 2009 6:05 pm

Greight wrote:General Error
You are not allowed to access this file.
In my version its fixed and administrators, moderators can update any file in the post messages and personal messages.
My mods home page.

User avatar
Greight
Registered User
Posts: 163
Joined: Sun Jan 18, 2009 12:10 pm

Re: Update attachment

Post by Greight » Tue May 26, 2009 7:03 pm

So u mean the replace script u provided really does not work and fix the issue ?

User avatar
Luckyluciano
Registered User
Posts: 93
Joined: Tue Feb 05, 2008 11:09 pm
Location: Italy
Name: Luciano
Contact:

Re: Update attachment

Post by Luckyluciano » Tue May 26, 2009 7:05 pm

It's possible to have the changes for prosilver theme?
Official support Italian to Portal XL

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Update attachment

Post by RMcGirr83 » Tue May 26, 2009 7:22 pm

AllCity wrote:
Greight wrote:General Error
You are not allowed to access this file.
In my version its fixed and administrators, moderators can update any file in the post messages and personal messages.
:roll:

So you took all of rxu's original code, copied 99% of it, added pm's and made the fix as you stated in this topic and it's now "your" mod? I wonder, did you ask rxu for permission to be able to use his code?

BTW, you don't need to purge the cache in the ACP, just need to refresh the template.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
AllCity
Registered User
Posts: 230
Joined: Sun Jun 22, 2008 6:33 pm
Name: Andrey Shapoval
Contact:

Re: Update attachment

Post by AllCity » Wed May 27, 2009 6:31 am

RMcGirr83, :lol: see author list and license.txt ;) .
My mods home page.

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Update attachment

Post by RMcGirr83 » Wed May 27, 2009 4:12 pm

AllCity wrote:RMcGirr83, :lol: see author list and license.txt ;) .
I don't find anything funny about it. It is always good practice to at least ask the original mod author if they wouldn't mind 1) you taking over the mod or 2) using the code, adjusting it and giving credit where credit is due. I understand it is released under GNU/GPL, but I still don't think it "good form".

"Common courtesy" (aka, "Общяя учтивость") is what it is called.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

nemmar
Registered User
Posts: 85
Joined: Mon Jun 13, 2005 2:07 pm

Re: Update attachment

Post by nemmar » Fri Jun 19, 2009 5:26 am

Here's a solution I used when I had THOUSANDS of image and document files that I needed to add to topics/posts in my forums. I obviously didn't want to spend months uploading attachment images/files one at a time to my topics/posts. Nor did I want to install and test attachment MODs and fix the bugs. I realized the best, fastest and easiest solution for me was to use the BBCodes instead of uploading attachment files. You can read the phpBB BBCode user guide here: http://www.phpbb.com/community/faq.php?mode=bbcode

For my situation, I was converting from a custom Content Management System (CMS) to my phpBB forum. So I used Regular Expressions to find the HTML tags of my web content and replace those tags wtih BBCode tags. Once I figured out the correct reg exp to use, it was quick and easy and saved me an enormous amount of time!! If you're in a situation like I was (I've read in these forums that some people have been), and you can upload your photos and download files to your server, or website, or some other online account, then you can quickly and easily add them to your posts without having to upload attachments when you create topics/posts.

1) I used these Regular Expressions (in the following sequence) to find/replace the HTML tags in my web content into BBCode tags:
a) To change html begin link tags to BBCode begin URL tags:
Find: <a href="{.*}">
Replace with: [url=\1]

b) To change html image tags to BBCode image tags:
Find: <img src="{.*}">
Replace with: [img]\1[/img]

c) To change html end link tags to BBCode end URL tags (normal search and not a reg exp):
Find: </a>
Replace with: [/url]

2) I created thumbnails for my photo and image files and used the BBCodes to add them to my posts without having to upload attachments. Example photo image link (instead of a post attachment):
[url=http://www.domain.com/imagefolder/thumbnailfilename.jpg][img]http://www.domain.com/imagefolder/fullsizefilename.jpg[/img][/url]

2) I am also using the BBCodes to add download files to my posts without having to waste a lot of time uploading attachments. Example file download link (instead of a post attachment):
[url=http://www.domain.com/downloadfolder/filename.pdf][/url]

Example file download with a text link (instead of a post attachment):
[url=http://www.domain.com/downloadfolder/filename.pdf]Click to download file[/url]

Anyway, I hope this advice might help anyone with a similar problem with their forums. It saved me from having to upload thousands of images/files one at a time. Good luck!!
Last edited by nemmar on Mon Jun 22, 2009 1:27 pm, edited 5 times in total.

User avatar
Greight
Registered User
Posts: 163
Joined: Sun Jan 18, 2009 12:10 pm

Re: Update attachment

Post by Greight » Fri Jun 19, 2009 10:54 am

Was this really something special :o ? You mean you think we don't know how we can make links ?!

nemmar
Registered User
Posts: 85
Joined: Mon Jun 13, 2005 2:07 pm

Re: Update attachment

Post by nemmar » Fri Jun 19, 2009 1:05 pm

Greight,
Maybe your Bill Gates and Einstein combined. But search phpBB threads for "multiple attachments" and similar phrases. You'll find plenty of posts from people complaining that they can't find a solution or a MOD that works well. Some of them mention they have hundreds/thousands of files/photos to upload to their boards and they don't want to do it one at a time. So if you're such a genius Greight then why didn't you post replies to all those threads when they were looking for a solution? I'm new to phpBB and I searched and didn't find a solution for days, and neither did they if you read their posts about how they installed a bunch of MODS or couldn't find a MOD that worked well.

User avatar
Greight
Registered User
Posts: 163
Joined: Sun Jan 18, 2009 12:10 pm

Re: Update attachment

Post by Greight » Fri Jun 19, 2009 1:16 pm

Actually what they want is either a multiple file uploader like the one in VB or they want to attach a file so that downloads are counted. Otherwise they all know how to upload their files,then link to them.

VickiFletcher
Registered User
Posts: 193
Joined: Sat Oct 25, 2008 1:48 am

Re: Update attachment

Post by VickiFletcher » Mon Jul 06, 2009 11:27 pm

Will this mod work with 3.0.5?

I can't find the lines in the posting.php file. :cry:

Thanks,
Vicki

rxu
Extensions Development Team
Posts: 2953
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Update attachment

Post by rxu » Tue Jul 07, 2009 1:36 pm

VickiFletcher wrote:I can't find the lines in the posting.php file.
There only 1 line is needed.

Code: Select all

$refresh	= (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['cancel_unglobalise']) || $save || $load) ? true : false;
And this line is there ;) Perhaps you have modified it before, try to search for the part of the line, i.e.

Code: Select all

$refresh	= (isset($_POST['add_file'])

VickiFletcher
Registered User
Posts: 193
Joined: Sat Oct 25, 2008 1:48 am

Re: Update attachment

Post by VickiFletcher » Tue Jul 07, 2009 5:43 pm

rxu wrote:
VickiFletcher wrote:I can't find the lines in the posting.php file.
There only 1 line is needed.

Code: Select all

$refresh	= (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['cancel_unglobalise']) || $save || $load) ? true : false;
And this line is there ;) Perhaps you have modified it before, try to search for the part of the line, i.e.

Code: Select all

$refresh	= (isset($_POST['add_file'])
Thanks for the explanation. I was attempting to find these in the wrong posting.php file. (DUH)

Everything is working as expected now.

I am having a problem with IExplorer and Firefox though. It doesn't automatically refresh the page and will still show the old thumbnail and not the updated thumbnail. The correct files are updated on the server, so this is a problem with those two browsers.

If I delete the Browsing History, it shows the new (and correct) thumbnail. That's a pain though and my users aren't going to understand that.

Is there someway to add the code to make the updated file show in the browsers automatically?

Thanks,
Vicki

rxu
Extensions Development Team
Posts: 2953
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Update attachment

Post by rxu » Wed Jul 08, 2009 12:40 pm

VickiFletcher wrote:Is there someway to add the code to make the updated file show in the browsers automatically?
The code seems to be sending correct headers to browser. Hence, the problem should be a browser cache. In theory, thumbnail should to be refreshed after the page reload. Otherwise, I'm not ready to offer any other workaround for now yet, sorry.

VickiFletcher
Registered User
Posts: 193
Joined: Sat Oct 25, 2008 1:48 am

Re: Update attachment

Post by VickiFletcher » Wed Jul 08, 2009 5:18 pm

VickiFletcher wrote: I am having a problem with IExplorer and Firefox. It doesn't automatically refresh the page and will still show the old thumbnail and not the updated thumbnail. The correct files are updated on the server, so this is a problem with those two browsers.

If I delete the Browsing History, it shows the new (and correct) thumbnail. That's a pain though and my users aren't going to understand that.
Is anyone else having this problem or am I the only one?

Vicki

Locked

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