Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2003
Posts: 329
Beta Tester
Beta Tester
Offline
Joined: Nov 2003
Posts: 329
I posted this in the wrong forum so i'm posting it again.
Sorry for the duplicate. But i think ive sorted it.

Hi, is there away that i can prefix
my attachements with a name as well as the
incremntal number?

Currently

1-mysillypic.jpg

Could this be changed too

1-ubbdevelopers-mysillypic.jpg
============================================

\scripts\filemanager.inc.php

Line 149

Code
 			$FileName = "$file_id-$_FILES['userfile']['name']}";
$FileName = preg_replace("/ +/","",$FileName);


Change to

Code
			$FileName = "$file_id-yourprefix-{$_FILES['userfile']['name']}";
$FileName = preg_replace("/ +/","",$FileName);
All ive added is yourprefix-

I have tested it on my test forum and works well.
I can upload, and view the images no problem.

And now i have a prefix with my site name.
Note: i havent included in my prefix any "dots" (yourprefix)
so i cant tell you if that would break things.

I only dug around, i dont know if there are any knock on
effects, but its working fine.

Enjoy smile


BOOM 7.6.+ rocks....
Sponsored Links
Entire Thread
Subject Posted By Posted
Prefix - Attachments - (Done) Mark_S 11/28/2006 4:09 PM
Re: Prefix - Attachments - (Done) Mark_S 11/28/2006 4:30 PM
Re: Prefix - Attachments - (Done) Gizmo 11/29/2006 2:04 AM
Re: Prefix - Attachments - (Done) jgeoff 12/02/2006 11:34 PM
Re: Prefix - Attachments - (Done) Z65_Paul 12/08/2006 8:13 AM
Re: Prefix - Attachments - (Done) Gizmo 12/08/2006 8:18 AM
Re: Prefix - Attachments - (Done) jgeoff 12/08/2006 8:55 AM
Re: Prefix - Attachments - (Done) jgeoff 12/08/2006 8:57 AM
Re: Prefix - Attachments - (Done) AllenAyres 12/08/2006 8:07 PM
Re: Prefix - Attachments - (Done) Mark_S 07/09/2007 1:50 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)