Previous Thread
Next Thread
Print Thread
Rate Thread
#283317 01/27/2005 6:06 PM
Joined: Nov 2000
Posts: 1,271
Kahuna
Kahuna
Joined: Nov 2000
Posts: 1,271
i'm looking for a way to ease up on the ftp process i always go through.

i'd like to add a field just above the subject name field, where i could browse for an image on my hard drive to upload to my server (same server the boards share)

this would be for admin's only (me!)

is possible?

Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
http://www.google.at/search?q=php+image+upload

if you add the boards authentification to this, you have what you want.

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550

Joined: Nov 2000
Posts: 1,271
Kahuna
Kahuna
Joined: Nov 2000
Posts: 1,271
ok!

i found this tute pretty helpful. and i even got it working already, here

some questions:

1) is it possible to set up so that the final destination is not fixed? like, sometimes i'd like an image to be placed in "/uploads/baseball/" and other times times "/uploads/hockey/". do i have to create a seperate upload for each?

2) how can i set this up so that its only viewable to admins? (i'm the only admin)

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
> /uploads/baseball/" and other times times "/uploads/hockey/

Instead of hardcoding the directory, put a variable in there and populate it using a dropdown menu.
Look at the jumpmenu at the bottom right of this page to see the concept.


2) Include this at the top of the script

// Require the library
require ("./includes/main.inc.php");
// Get the user info
$userob = new user;
$user = $userob -> authenticate("U_Groups");
$html = new html;
// Make sure they should be here
if ( $user['U_Status'] != 'Administrator') {
$html -> not_right ("Only admins can use this script",$Cat);
}

Sponsored Links

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
isaac
isaac
California
Posts: 1,157
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 20221218)