Filip_ps Posted August 11, 2010 Report Share Posted August 11, 2010 Hola amigos de ChileComparte tengo un problema con un scrip el cual no he podido instalar porque no he encontrado ningun tutorial o intrucciones que me ayuden a configurar su Config.php Bueno tengo la base de datos creada con su user y pass tambien configurados pero no entiendo su config.Php ( me refiero que no es asi como el config de vbulletin que es super facil) bueno el scrip se llama: Scripteen Image Hosting Script es la versio 1.4.3 y si alguien me podria decir como configurar el config.php que cosas debo cambiar? bueno os dejo el codigo del config php <? include("db.php"); $link = mysql_connect($db_server, $db_user, $db_password) or die("Could not connect"); mysql_select_db($db_name) or die("Could not select database"); $query = "SELECT * from config"; $result = mysql_query($query) or die("Query failed"); while ($row = mysql_fetch_assoc($result)) { $config[$row['soption']]=$row['svalue']; } $site_name = $config['Full-premieres hosting images']; // your support email address // Example: [email protected] $sql="select * from users where userid='1'"; $result = mysql_query($sql) or die("Query failed."); while ($row = mysql_fetch_array($result)) { $support_email=$row['email']; } // your domain // Example: http://www.Your-Site.com $server_url = $config['http://201.238.222.61/~fullpre/']; // thumbnail settings $thumbnail_size_max = $config['ThumbHeight']; $thumbnail_quality = $config['ThumbWidth']; $server_root = $config['SiteRoot']; $server_directory = ""; $server_save_directory = $server_directory . "/images/"; // /folder/ // do not change the following variables global $server_dir; $server_dir = $server_root . $server_save_directory; $page_url = $server_url . $server_directory; $image_url = $server_url . $server_save_directory; $valid_mime_types_display = $config['Extension']; $valid_file_ext=explode(",",$config['Extension']); // Convert a URL to the local file path and vice versa, convert a local file path to a URL. // this sets the sytem / or \ : strstr( PHP_OS, "WIN") ? $slash = "\\" : $slash = "/"; // This is the location of the php file that contains this // function. Usually this request is made to files/folders // down the directory structure, so the php file that // contains these functions is a good "where am i" // reference point: $WIMPY_BASE['path']['physical'] = getcwd(); $WIMPY_BASE['path']['www'] = "http://".$_SERVER['HTTP_HOST']; function url2filepath($theURL){ global $WIMPY_BASE, $slash; $AtheFile = explode ("/", $theURL); $theFileName = array_pop($AtheFile); $AwimpyPathWWW = explode ("/", $WIMPY_BASE['path']['www']); $AtheFilePath = array_values (array_diff ($AtheFile, $AwimpyPathWWW)); if($AtheFilePath){ $theFilePath = $slash.implode($slash, $AtheFilePath).$slash.$theFileName; } else { $theFilePath = implode($slash, $AtheFilePath).$slash.$theFileName; } return ($WIMPY_BASE['path']['physical'].$theFilePath); } function filepath2url ($theFilepath){ global $WIMPY_BASE, $slash; $AtheFile = explode ($slash, $theFilepath); $theFileName = array_pop($AtheFile); $AwimpyPathFILE = explode ($slash, $WIMPY_BASE['path']['physical']); $AtheFilePath = array_values (array_diff ($AtheFile, $AwimpyPathFILE)); $thFileURL = implode("/", $AtheFilePath)."/".$theFileName; return ($WIMPY_BASE['path']['www']."$thFileURL"); } ?> si podrian marcarme con rojo que parte es la que necesito modificar estaria muy agradecido por lo demas indicar que es un scrip para hostear imagenes, bueno si saben algo mas que alla que modificarle a este scrip de host me lo indican pliss Saludos Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now