• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Admin-panel (MySQL)

Can you tell me what excatlly i need to edit to install this plugin because apper this

Unable to connect to the database
 
semi-complete/detailed install plan

  • Download chevereto nb 1.9[/*]
  • download admin panel[/*]
  • upload chevereto to server[/*]
  • uploasd admin panel to server (let it over write the files)[/*]
  • edit config.php with db info[/*]
  • point your browser to yourdomain.com/chevereto/path/install.php[/*]
  • login[/*]
 
wait! after i change to this mod, my remote upload tab doesn't work... what's the problem..?
 
thrill said:
wait! after i change to this mod, my remote upload tab doesn't work... what's the problem..?
If this problem still exists.
Are there any errors? How does it not work? Are you sure it worked before you applied this mod?
 
works fine! the only thing that is missing is the option to create users! can you write the mod?
 
i am uploading it and install but after login I realized that images not showing!
What is the reason?
 
hello to the entire community the problem I have is this is that I have installed the script with admin panel in a folder called img not show me photos in admin panel url is the problem as it could change the url img browse to the folder that is where I have installed everything, sorry for my English use a translator.
 
Hi, i have install this nice software and i have in dir/images about 1100 images.
Then i install this mod( Admin-panel (MySQL)) and almost all are ok except i dont have images in admin panel as you see (i hope understand what i mean with poor english)
http://tinyurl.com/33byehp
 
AndreasHW said:
Hi, i have install this nice software and i have in dir/images about 1100 images.
Then i install this mod( Admin-panel (MySQL)) and almost all are ok except i dont have images in admin panel as you see (i hope understand what i mean with poor english)
http://tinyurl.com/33byehp
This admin panel only works if you install it from the start. Since all images have to be in its db.
I have recently done some image work, I might be able to make a import script.
 
I don't know if this helps any one, but it was fun to make :D
very basic import script. just adds the images to the db. nothing more. (doesn't get the image file size however, idk. if you want it ask)

the script:
PHP:
<?php
// timer FTW
   $mtime = microtime();
   $mtime = explode(" ",$mtime);
   $mtime = $mtime[1] + $mtime[0];
   $starttime = $mtime;

echo "<h1>Admin importer thing by Gamerlv</h1>";
echo "<h2>Warning, this script may run ALOT of mysql queries!</h2>";
echo "<p>So make sure you have engouht time to let it run.</p>";
echo "<p>This takes about 0.001527 seconds per image (that's what it takes on my pc :D)</p>";
echo "<form action=\"\">
    <p><input type=\"hidden\" value=1 name=\"ihavethetime\" /></p>
    <input type=\"submit\" value=\"I have the time\" />
    </form>";

if (!isset($_GET['ihavethetime']) || !$_GET['ihavethetime'])
    die(); //no need to go any futher.


require_once('config.php');
require_once('db_connect.php');
#This header only is for the function getImages
# Original PHP code by Chirp Internet: [url=http://www.chirp.com.au]www.chirp.com.au[/url]
# Please acknowledge use of this code by including this header.
# 25% rewitten by Gamerlv

  function getImages($dir)
  {
    $cachefile = "cache.import";
    if (file_exists($cachefile)){
    $cache = explode("|||" ,file_get_contents($cachefile));
    if (time() - $cache[0] > 172800) {
        return $cache;
    }
    unset($cache);
    }
    
    $imagetypes = array("image/jpeg", "image/gif", "image/png", "image/bmp");

    # array to hold return value
    $retval = array();
    $return = array();

    # add trailing slash if missing
    if(substr($dir, -1) != "/") $dir .= "/";

    # full server path to directory
    $fulldir = getcwd()."/".$dir;

    $d = @dir($fulldir) or die("getImages: Failed opening directory ".$dir." for reading <br />In ".getcwd() );
    while(false !== ($entry = $d->read())) {
      # skip hidden files
      if($entry[0] == ".") continue;

        if (!function_exists('mime_content_type'))
        {
            function mime_content_type($file)
            {
                //!!!!!THIS ONLY WORKS @ LINUX!!!!!!!
                return trim(exec('file -bi ' . escapeshellarg($file)));
            }
        }

      # check for image files
      if(in_array(mime_content_type($fulldir.$entry), $imagetypes)) {
        $retval[] = array(
            'path' =>  "/".$dir.$entry,
            'name' => $entry
        );
      }
    }
    $d->close();
    
    $return[0] = time();
    foreach($retval as $key => $value)
    {
        $five = substr($value['name'], 0 , 6);
         if ( !($five == "thumb_") && !($five == "editor") ){
             unset($five);
             $return[] = $value['name'];
             echo "I found ". $value['name'] ."<br />\n"; 
         }             
    }
    unset($retval);
    
    if (file_exists($cachefile)){
    $cache = implode("|||" ,$return);
    file_put_contents($cachefile, $cache);
    }
    
    return $return;
  }
  
//For admin-panel.
$now=mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"));
$uid=0;
$created=$now;
$lastviewed=0;
$submitip=$_SERVER["REMOTE_ADDR"] or "127.0.0.1";
$views=0;
$picfsize=0;
$pic_width=0;
$pic_height=0;
$tamano = 0;

echo "<br /><p>Okay, here we go, I'm now starting to look for your images.</p><br />\n";
 
if (isset($config))
{
    $images = getImages($config['dir']['images']);
} elseif (isset($_GET['folder']) && $_GET['sec'] == "Ag5Fw4afbhFP52" ) {
    $images = getImages($_GET['folder']); //for testing
    define("DIR_IM", $_GET['folder']."/");
} else {
    $images = getImages(DIR_IM);
}

 //For admin-panel. Send info about img to DB.
  /*mysql_query("insert into pics(created,lastviewed,pictype,submitip,picfsize,uniqid,pic_width,pic_height)
  values(
  ".$created.",
  ".$lastviewed.",
  '".$exten."',
  '".$submitip."',
  ".$tamano.",
  '".$name."',
  ".$ancho.",
  ".$alto."
  )");*/

echo "<h3>-=Got the images, lets import them=-</h3>\n";
$i = 0;
$c = 0;
$query = "insert IGNORE into pics(created,lastviewed,pictype,submitip,picfsize,uniqid,pic_width,pic_height) values";
foreach ($images as $key => $image)
{
    if ($key == 0) continue;
    echo "Generating sql on " . $image . "<br />\n";
    $exten = substr($image, -3);
    list($width, $height) = getimagesize(DIR_IM . $image);
    $query .= " (
              ".$created.",
              ".$lastviewed.",
              '".$exten."',
              '".$submitip."',
              ".$tamano.",
              '".$image."',
              ".$width.",
              ".$height."
              )";
    if ($i == 60){
    echo "<h3>-=Running the query to not make it too long=-</h3>\n";
        mysql_query($query); //excute, so it doesn't become to big
        $i = 0;// rest count
        //die("lets stop right here. <br />". $query); //debug
        $query = "insert IGNORE into pics(created,lastviewed,pictype,submitip,picfsize,uniqid,pic_width,pic_height) values"; //start fresh
    } else {
        $query .= ",";
    }
    $i++; $c++; //add one to count
}
// yeay timing
   $mtime = microtime();
   $mtime = explode(" ",$mtime);
   $mtime = $mtime[1] + $mtime[0];
   $endtime = $mtime;
   $totaltime = ($endtime - $starttime);
   
echo "<br />
<br />
<p>Okay, where all done.</p>
<p>In total I imported: ".$c." images and this took ".$totaltime." seconds.</p>
That's " . $totaltime / $c . " seconds per image <br /> ps, dont forget to delete me.";

?>
Please note, I did not test this with the panel. There for I need your help to test this.
 
gamerlv said:
AndreasHW said:
Hi, i have install this nice software and i have in dir/images about 1100 images.
Then i install this mod( Admin-panel (MySQL)) and almost all are ok except i dont have images in admin panel as you see (i hope understand what i mean with poor english)
http://tinyurl.com/33byehp
This admin panel only works if you install it from the start. Since all images have to be in its db.
I have recently done some image work, I might be able to make a import script.
yes i understand but when i install this mod i have in db many images and i see in admin panel but without pictures, is easy to fix this someboby?
 
AndreasHW said:
gamerlv said:
AndreasHW said:
Hi, i have install this nice software and i have in dir/images about 1100 images.
Then i install this mod( Admin-panel (MySQL)) and almost all are ok except i dont have images in admin panel as you see (i hope understand what i mean with poor english)
http://tinyurl.com/33byehp
This admin panel only works if you install it from the start. Since all images have to be in its db.
I have recently done some image work, I might be able to make a import script.
yes i understand but when i install this mod i have in db many images and i see in admin panel but without pictures, is easy to fix this someboby?

ho lolz. wrote an import whiles you didn't need it. waist of time :eek: .
I can probably fix it if I can look at the source code. Can you pm you url and login stuff ( I won't change anything)?
 
thrill said:
wait! after i change to this mod, my remote upload tab doesn't work... what's the problem..?

Hi,

Revert back to the original scripts Index and CSS it should fix it
 
Hi all, I just installed this over the top of a pretty fresh install(I only had 1 image uploaded as a test) and am having some issue with running install.php. I created a new DB and added all the info into config.php but I continuously get Unable to connect to DB messages. I'm trying to figure out if I'm overlooking something simple here but I'm just not seeing it. I was wondering if someone could possibly point me into the right direction here? Thanks.
 
Back
Top