PDA

View Full Version : Albinator Importer


Chuck S
May 17th, 2005, 07:02 PM
Import Instructions for albinator import. This importer was written for the personal edition of albinator. If anyone has a full version and wants to send test data it can be sent to chuck@photopost.com. I beleive the only difference is the addition of a comments system.

1. Upload the two files to your photopost directory and CHMOD albinator.cnf.php to 777

2. Run the importer through your web browser and fill in all required info and paths for both programs

3. The importer will cycle through in steps each process.

4. After Import cleanup work needed.

a. Under Scan Database recheck and build post number and check for children.

b. Make sure to set any usergroup and categories permissions you see fit.

c. Set your medium size threshold in Upload Options and under Scan Database rebuild your medium imags.

anthroa
October 18th, 2005, 07:12 PM
Chuck - will this work with albinator pro which has been integrated with post nuke :eek: ?

and if i use it could i completely wreck the existing setup if it doesn't ?

thanks

Chuck S
October 18th, 2005, 08:11 PM
Can not say about nuke integration as it is written to port albinator to photopost all based on internal installs

It was also written for albinator not pro which has a forum I beleive

Although running it will not delete anything from albinator so you should be fine to try it out

EPICENTER
May 8th, 2006, 04:46 AM
Hi!
I tried the script but it dont worked for me!
The script wrote ..importing users ..and so on but without a result!
Importing the Pictures ...and a mysql mistake ist the result!

Can you help me please?!
You ve got mail from me too!

Greetings Martin

New Version of Photopost
Albinator Pro 2.0.8

Chuck S
May 8th, 2006, 09:16 AM
The script was written for Albinator Basic version and not pro.

Now most common user errors are incorrect mysql info entered and server path to the data directory containing the images entered wrong.

Therefore please post your error so we can assist.

EPICENTER
May 8th, 2006, 09:47 AM
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/xxx/httpdocs/scripte/bilderdatenbank/albinator.php on line 542

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/xxx/httpdocs/scripte/bilderdatenbank/albinator.php on line 546
Importing 16_p454.jpg



Thanks

EPICENTER
May 8th, 2006, 05:04 PM
<?PHP
error_reporting (E_ERROR | E_WARNING | E_PARSE);


require ("albinator.cnf.php");
if ($status == "complete") { echo "Import already done."; exit; }

if (phpversion() >= "4.1.0") {
$action = $_GET["action"];
$action2 = $_POST["action2"];
}

ini_set("max_execution_time", 0);
ini_set("memory_limit", "48M");

// Turn off the magic quoting and remove notices
set_magic_quotes_runtime(0);
error_reporting (E_ALL ^ E_NOTICE);

$magic = get_magic_quotes_gpc();
$types_to_register = array($HTTP_POST_VARS,$_POST,$HTTP_GET_VARS,$_GET,$HTTP_COOKIE_VARS,$_COOKIE);
foreach($types_to_register as $vartype) {
if(is_array($vartype)) {
while(list($key,$value) = @each($vartype)) {
if ($magic) {
if(!is_array($value)) { $value = stripslashes($value); }
}
${$key} = $value;
}
}
}

// ============================================================================

if ($action2 == "config") {

if (phpversion() >= "4.1.0") {
$vhost = $_POST["vhost"];
$vuser = $_POST["vuser"];
$vpwd = $_POST["vpwd"];
$vprefix = $_POST["vprefix2"];
$vdb = $_POST["vdb"];
$vpath = $_POST["vpath2"];
$uhost2= $_POST["uhost2"];
$uuser2= $_POST["uuser2"];
$upwd2 = $_POST["upwd2"];
$uprefix = $_POST["uprefix2"];
$udb2 = $_POST["udb2"];
$upath = $_POST["upath2"];
}

$eadmin2 = ereg_replace("@","\@",$eadmin2);

$cf = fopen("albinator.cnf.php", "w");
if(flock($cf, 2)) {
fputs ($cf,"<?

//Import configuration

\$vhost = \"$vhost2\";
\$vuser = \"$vuser2\";
\$vpwd = \"$vpwd2\";
\$vprefix = \"$vprefix2\";
\$vdb = \"$vdb2\";
\$vpath = \"$vpath2\";

// Photopost configuration

\$uhost = \"$uhost2\";
\$uuser = \"$uuser2\";
\$upwd = \"$upwd2\";
\$uprefix = \"$uprefix2\";
\$udb = \"$udb2\";
\$upath = \"$upath2\";

?>");
}
flock($cf, 3);
fclose($cf);

echo "Done! Click <a href=\"albinator.php?action=import_users\">here</a> to import users";
exit;



}
// ============================================================================

if ($status == "new") {

echo <<<intro
<html>
<head>
<title>Custom Import Script for Albinator to Photopost</title>
<style>

BODY,P,TABLE,TD,TR {
font-size: 9pt;
color: #000000;
font-family: Verdana, Helvetica, sans-serif;
}
BODY {
background: #FFFFFF;
}
FORM {
display: inline;
margin-bottom: 0;
}
PRE {
font-size: ;
font-family: ;
}

.tableborders {
background: #B4B4B4;
}

.tddetails {
background: #FFFFFF;
}

.menubar{
background: #498CD1;
font-size: 8pt;
color: #FFFFFF;
}
.menubar A:link {
color: #FFFFFF;
}
.menubar A:visited {
color: #FFFFFF;
}
.menubar A:active {
color: #FFFFFF;
}
.menubar A:hover {
color: #000000;
}

.formboxes{
font-family: ;
background-color: ;
color: ;
font-size: 9pt;
}

blockquote {
font-size:9pt; border:1px solid #E6E6E6;
margin:0px 20px; padding:0px 10px
}
blockquote .small {
background:#E6E6E6;
margin-left:-10px; padding:1px 2px
}
blockquote hr {
visibility:hidden;
height:1px
}
blockquote br {
font-size:1px
}
</style>
</head>
<body>
<table class="tableborders" cellpadding="1" cellspacing="1" borders="1" width="75%">
<tr>
<td class="menubar" align="center">
<h1>Custom Import Script for Albinator to Photopost 1.0</h1>
</td>
</tr>
<tr>
<td class="tddetails" align="center">
<br /><p>Welcome to the import script. Please enter all necessary information and click on <i>Submit</i> to continue.</p>
<form name="import" action="albinator.php" method=post>
<input type="hidden" name="action2" value="config">
<p>Albinator Database Configuration:</p>
<blockquote>
<table>
<tr>
<td align="right">
<em>Hostname</em></td>
<td>
<input type="text" name="vhost2" size="16" maxlength="16" value="localhost">
</td>
</tr>
<tr>
<td align="right">
<em>Username</em></td>
<td>
<input type=text name="vuser2" size=16 maxlength=16 value="$vuser">
</td>
</tr>


<tr>
<td align="right">
<em>Password</em></td>
<td>
<input type=password name="vpwd2" size=16 maxlength=16 value="$vpwd">
</td>
</tr>
<tr>
<td align="right">
<em>Table Prefix with under (albinator_)</em></td>
<td>
<input type=text name="vprefix2" size=16 maxlength=16 value="$vprefix">
</td>
</tr>
<tr>
<td align="right">
<em>Database</em></td>
<td>
<input type=text name="vdb2" size=50 maxlength=50 value="$vdb">
</td>
</tr>
<td align="right">
<em>Server Path to Albinator Data Directory</em></td>
<td>
<input type=text name="vpath2" size=50 maxlength=200 value="$vpath">
</td>
</tr>
</table>
</blockquote>

<p>
Photopost Database Configuration:</p>
<blockquote>
<table>
<tr>
<td align="right">
<em>Hostname</em></td>
<td>
<input type=text name="uhost2" size=16 maxlength=16 value="localhost">
</td>
</tr>
<tr>
<td align="right">
<em>Username</em></td>
<td>
<input type=text name="uuser2" size=16 maxlength=16 value="$uuser">
</td>
</tr>
<tr>
<td align="right">
<em>Password</em></td>
<td>
<input type=password name="upwd2" size=16 maxlength=16 value="$upwd">
</td>
</tr>
<tr>
<td align="right">
<em>Table Prefix with under (pp_)</em></td>
<td>
<input type=text name="uprefix2" size=16 maxlength=16 value="$uprefix">
</td>
</tr>
<tr>
<td align="right">
<em>Database</em></td>
<td>
<input type=text name="udb2" size=50 maxlength=50 value="$udb">
</td>
</tr>
<td align="right">
<em>Server Path to Photopost Data Directory</em></td>
<td>
<input type=text name="upath2" size=50 maxlength=200 value="$upath">
</td>
</tr>
</table>
</blockquote>

<input type=submit value="Submit">
</form>
</td>
</tr>
</table>
</body>
</html>
intro;
exit;
}

// ============================================================================

if (!$action) { echo "<script language=\"javascript\">window.location=\"albinator.php?action=import_users&start=1\";</script>"; }


$vbc = mysql_connect($vhost,$vuser,$vpwd);
$u3t = mysql_connect($uhost,$uuser,$upwd);
$Globals['albinator'] = $vprefix;
$Globals['photopost'] = $uprefix;
$Globals['albpath'] = $vpath;
$Globals['phopath'] = $upath;

// ============================================================================

if ($action == "import_users") {

if (phpversion() >= "4.1.0") {
$start = $_GET["start"];
}

mysql_select_db("$udb",$u3t);

mysql_query("DELETE FROM{$Globals['photopost']}users",$u3t);


mysql_select_db("$vdb",$vbc);


$query=mysql_query("SELECT * FROM {$Globals['albinator']}userinfo",$vbc);
$members=mysql_num_rows($query);

$members=$members+1; // +1
$end=$start+300;

echo "Importing $members users .... please wait<p>";

if ($start >= $members) {
echo "Click <a href=\"albinator.php?action=import_categories\">here</a> to import categories</a>";
exit;
}

while ($line=mysql_fetch_array($query)) {

for ( $x=0; $x < count($members); $x++ ) {

$userid = $line['uid'];
$username = addslashes($line['username']);
$password = addslashes($line['password']);
$email = addslashes($line['email']);
$joindate = strtotime($line['adddate']);

$query2=mysql_query("SELECT fnvalue FROM {$Globals['albinator']}config WHERE fname='adminname'",$vbc);
while ( list( $adminname ) = mysql_fetch_row($query2) ) {

if ( $adminname == $line['uname'] ) {
$title="Administrator";
$usergroupid = 5;
}
else {
$title="Member";
$usergroupid = 4;
}
}



echo "Importing $username ($userid)<br />";

mysql_select_db("$udb",$u3t);

mysql_query("INSERT INTO {$Globals['photopost']}users (`userid`, `usergroupid`, `username`, `password`, `email`, `joindate`)
values ('$userid', '$usergroupid','$username', '$password', '$email', '$joindate')",$u3t);


mysql_select_db("$vdb",$vbc);
}

}

$start = $start + 200;
echo "<script language=\"javascript\">window.location=\"albinator.php?action=import_users&start=$start\";</script>";
exit;

}


if ($action == "import_categories") {

if (phpversion() >= "4.1.0") {
$start = $_GET["start"];
}


mysql_select_db("$udb",$u3t);


mysql_query("DELETE FROM{$Globals['photopost']}categories WHERE id='1' OR id='2'",$u3t);

mysql_select_db("$vdb",$vbc);


$query=mysql_query("SELECT * FROM {$Globals['albinator']}category",$vbc);
$members=mysql_num_rows($query);

$members=$members+1; // +1
$end=$start+300;

echo "Importing $members Categories.... please wait<p>";

if ($start >= $members) {
echo "Click <a href=\"albinator.php?action=import_albums\">here</a> to import albums</a>";
exit;
}

while ($line=mysql_fetch_array($query)) {

for ( $x=0; $x < count($members); $x++ ) {

$catid = $line['cid'];
$catname = addslashes($line['cname']);
$catdesc = addslashes($line['cdesc']);
$catparent = $line['scid'];
$catorder = $line['cindex'];
$filepath = "{$Globals['phopath']}/$catid";
$filepath1 = "{$Globals['phopath']}/$catid/thumbs";
$filepath2 = "{$Globals['phopath']}/$catid/medium";
$filepath3 = "{$Globals['phopath']}/$catid/mini";
@mkdir( $filepath );
@chmod ($filepath, 0777);
@mkdir( $filepath1 );
@chmod ($filepath1, 0777);
@mkdir( $filepath2 );
@chmod ($filepath2, 0777);
@mkdir( $filepath3 );
@chmod ($filepath3, 0777);



echo "Importing $catname ($catid)<br />";

mysql_select_db("$udb",$u3t);

mysql_query("INSERT INTO {$Globals['photopost']}categories
(`id`, `catname`, `description`, `catorder`, `parent`, `ugnoanno`, `cattype`) VALUES ($catid, '$catname', '$catdesc', $catorder, '$catparent', '5,1,3,4,2', 'c')",$u3t);


mysql_select_db("$vdb",$vbc);
}

}

$start = $start + 200;
echo "<script language=\"javascript\">window.location=\"albinator.php?action=import_categories&start=$start\";</script>";
exit;

}

if ($action == "import_albums") {

if (phpversion() >= "4.1.0") {
$start = $_GET["start"];
}

mysql_select_db("$vdb",$vbc);


$query=mysql_query("SELECT * FROM {$Globals['albinator']}albumlist",$vbc);
$members=mysql_num_rows($query);

$members=$members+1; // +1
$end=$start+300;

echo "Importing $members Albums.... please wait<p>";

if ($start >= $members) {
echo "Click <a href=\"albinator.php?action=import_photos\">here</a> to import photos</a>";
exit;
}

while ($line=mysql_fetch_array($query)) {

for ( $x=0; $x < count($members); $x++ ) {

$catname = addslashes($line['aname']);
$catdesc = stripslashes(stripslashes($line['amsg']));
$catdesc = addslashes($catdesc);
$catpassword = addslashes($line['password']);
$catprivate = addslashes($line['private']);
$catparent = $line['uid'];
$importid = $line['aid'];
$catid= $importid+3000;

if ( $line['cid'] > 0 ) {
$children = $line['cid'];
}

if ( $catpassword == 0 ) $catpassword = "";
if ( $catprivate == 0 ) $catprivate = "no";
if ( $catprivate == 1 ) $catprivate = "yes";

echo "Importing $catname <br />";

mysql_select_db("$udb",$u3t);

mysql_query("INSERT INTO {$Globals['photopost']}categories (`id`, `catname`, `description`, `parent`, `private`, `ugnoanno`, `children`, `password`, `cattype`) VALUES ('$catid', '$catname', '$catdesc', '$catparent', '$catprivate', '5,1,3,4,2', '$children', '$catpassword', 'a')",$u3t);
$filepath = "{$Globals['phopath']}/$catid";
@mkdir( $filepath );
@chmod ($filepath, 0777);

mysql_select_db("$vdb",$vbc);
}

}

$start = $start + 200;
echo "<script language=\"javascript\">window.location=\"albinator.php?action=import_albums&start=$start\";</script>";
exit;

}

if ($action == "import_photos") {

if (phpversion() >= "4.1.0") {
$start = $_GET["start"];
}

mysql_select_db("$vdb",$vbc);


$query=mysql_query("SELECT * FROM {$Globals['albinator']}pictures",$vbc);
$members=mysql_num_rows($query);

$members=$members+1; // +1
$end=$start+2000;

echo "Importing $members Photos .... Please wait<p>";

if ($start >= $members) {
echo "Click <a href=\"albinator.php?action=import_files\">here</a> to import files</a>";
exit;
}

while ($line=mysql_fetch_array($query)) {

for ( $x=0; $x < count($members); $x++ ) {

$pid = $line['pid'];
$aid = $line['aid'];
$description = addslashes($line['pmsg']);
$date = $line['timestamp'];
$picture = addslashes($line['pname']);
$newid= $aid+3000;



mysql_select_db("$udb",$u3t);
$query2="SELECT c.id,c.catparent,u.username FROM {$Globals['photopost']}categories c LEFT JOIN {$Globals['photopost']}users u ON c.catparent=u.userid WHERE c.id ='$newid'";
$rows = mysql_query($query2,$u3t);
list( $cat, $userid, $name ) = mysql_fetch_row($rows);







mysql_select_db("$vdb",$vbc);
$query3="SELECT COUNT(*) FROM {$Globals['albinator']}pictures_viewcount WHERE pid ='$pid'";
$row1 = mysql_query($query3,$u3t);
list( $views ) = mysql_fetch_row($row1);




mysql_select_db("$udb",$u3t);
echo "Importing $picture<br />";
mysql_query("INSERT INTO {$Globals['photopost']}photos (`id`, `user`, `userid`, `cat`, `date`, `description`, `bigimage`, `views`, `lastpost`, `approved`)
VALUES ('$pid', '$name','$userid', '$cat', '$date', '$description', '$views', '$picture', '$date', 1)",$u3t);


mysql_select_db("$vdb",$vbc);
}

}

$start = $start + 1000;
echo "<script language=\"javascript\">window.location=\"albinator.php?action=import_photos&start=$start\";</script>";
exit;

}

if ($action == "import_files") {

if (phpversion() >= "4.1.0") {
$start = $_GET["start"];
}

mysql_select_db("$udb",$u3t);

$query=mysql_query("SELECT * FROM {$Globals['photopost']}photos",$u3t);
$members=mysql_num_rows($query);

$members=$members+1; // +1
$end=$start+200;

echo "Importing $members files .... please wait<p>";

if ($start >= $members) {
echo "Import Done";
exit;
}

while ($line=mysql_fetch_array($query)) {

for ( $x=0; $x < count($members); $x++ ) {

$id = $line['id'];
$userid = $line['userid'];
$cat = $line['cat'];
$image = $line['bigimage'];
$importid = md5($userid);
$image2 = "tb_$image";

echo "Importing ($image)<br />";


$inpath = "{$Globals['albpath']}/$importid";
$imagelink = "{$Globals['albpath']}/$importid/$image";

$imagesize = @filesize( $imagelink );
$image_stats = getimagesize( $imagelink );
$imagewidth = $image_stats[0];
$imageheight = $image_stats[1];

$filein = $inpath."/$image";
$openpath = $inpath;
$newfile = $inpath."/$image";
@rename($filein, $newfile);
$realname = $image;
$filein = $newfile;
$filepath = "{$Globals['phopath']}/$cat/$realname";
copy( $filein, $filepath );
@chmod ($filepath, 0666);

$filein2 = $inpath."/$image2";
$openpath = $inpath;
$newfile2 = $inpath."/$image2";
@rename($filein2, $newfile2);
$realname2 = $image2;
$filein2 = $newfile2;
$filepath2 = "{$Globals['phopath']}/$cat/thumbs/$realname";
copy( $filein2, $filepath2 );
@chmod ($filepath2, 0666);


mysql_query("UPDATE {$Globals['photopost']}photos SET width='$imagewidth',height='$imageheight',filesize='$imagesize WHERE id='$id''",$u3t);

}
}

$start = $start + 200;
echo "<script language=\"javascript\">window.location=\"albinator.php?action=import_files&start=$start\";</script>";
exit;

echo "<p>Import complete!";

$cf = fopen("albinator.cnf.php", "w");
fputs ($cf,"<? \$status = \"complete\"; ?>");
fclose($cf);

exit;
}
?>



I correct some little bugs

..now:



Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/xxx/httpdocs/scripte/bilderdatenbank/albinator.php on line 543
Importing 16_p454.jpg

Chuck S
May 8th, 2006, 06:04 PM
This importer works as it is written for albinator basic and there is no bugs that I know of as many sites have been imported with it.

Now what is your line 543 in the importer as line 543 is a blank line in the one we have listed in this thread. Obviously you have modified the file so there is no way I can assist without knowing what line your at.

EPICENTER
May 8th, 2006, 06:20 PM
Ok ..the original file

But: for example ..I think its not right!


Line 513: {$Globals['albinator']}_pictures

Line 545: {$Globals['albinator']}pictures_viewcount

One line with "_" and the other one without!

Line 554: mysql_query("INSERT INTO pp_photos

hard coded var


original file mistake:



Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/xxx/httpdocs/scripte/bilderdatenbank/albinator.php on line 542
Importing 16_p454.jpg

EPICENTER
May 8th, 2006, 06:27 PM
Line 542 is an empty line

If I cut off 536 to 542 ...the step "run fine"

Sorry my bad english!

Martin

Chuck S
May 8th, 2006, 09:44 PM
You can try redownloading the file

EPICENTER
May 9th, 2006, 04:50 AM
Im updating the script, but the same mistake!



Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/xxxx/httpdocs/scripte/bilderdatenbank/albinator.php on line 542




Do you need a dump of mysql?

or some installation/install files?

Chuck S
May 9th, 2006, 08:16 AM
I dont understand why your files do not match up the supported file in this thread.

Here is line 542 and there should be no issue here


mysql_select_db("$vdb",$vbc);


As far as this block not much I can say here since this thread clearly states this was written for albinator basic. This importer works on albinator basic. You would need to find out what fields your missing by doing some testing that is making the script fail. Here is the code block with the two queries near that line that you might want to check for validity. Now the photopost one I know is fine so you might want to check the albinator tables to ensure your pro version actually has this table as that would be my guess here.

{$Globals['albinator']}_pictures_viewcount


$query2="SELECT c.id,c.catparent,u.username FROM {$Globals['photopost']}categories c LEFT JOIN {$Globals['photopost']}users u ON c.catparent=u.userid WHERE c.id ='$newid'";
$rows = mysql_query($query2,$u3t);
list( $cat, $userid, $name ) = mysql_fetch_row($rows);

mysql_select_db("$vdb",$vbc);

$query3="SELECT COUNT(*) FROM {$Globals['albinator']}_pictures_viewcount WHERE pid ='$pid'";
$row1 = mysql_query($query3,$u3t);
list( $views ) = mysql_fetch_row($row1);

EPICENTER
May 9th, 2006, 12:38 PM
Ok, pp_catergories

query2

There ist a table called §catparent"
I think the table name ist "parent"

If I change this ...the script ist working until the next step!


Warning: getimagesize(/var/www/vhosts/xxx/httpdocs/scripte/.xxxxbilderdatenbank/data/cfcd208495d565ef66e7dff9f98764da/7): failed to open stream: No such file or directory in /var/www/vhosts/epicenter.de/httpdocs/scripte/bilderdatenbank/albinator.php on line 615

Warning: copy(/var/www/vhosts/xxx/httpdocs/scripte/.xxxxbilderdatenbank/data/cfcd208495d565ef66e7dff9f98764da/7): failed to open stream: No such file or directory in /var/www/vhosts/xxx/httpdocs/scripte/bilderdatenbank/albinator.php on line 626

Warning: copy(/var/www/vhosts/xxx/httpdocs/scripte/.xxxxbilderdatenbank/data/cfcd208495d565ef66e7dff9f98764da/tb_7): failed to open stream: No such file or directory in /var/www/vhosts/epicenter.de/httpdocs/scripte/bilderdatenbank/albinator.php on line 636
Importing (5)



..the importid is not ok!

an idea?!

Chuck S
May 9th, 2006, 12:55 PM
Again you might need to find out changes there are from albinator pro to albinator basic.

I updated the download to be parent not cat parent you might want to retry this but here is my logic for you to check on your file issues below.

In albinator basic the user data directory is md5 of their userid hense this below. That is the user directory on the server for basic albinator. I know I own a copy of the software.



$id = $line['id'];
$userid = $line['userid'];
$cat = $line['cat'];
$image = $line['bigimage'];
$importid = md5($userid);
$image2 = "tb_$image";

echo "Importing ($image)<br />";


$inpath = "{$Globals['albpath']}/$importid";
$imagelink = "{$Globals['albpath']}/$importid/$image";

$imagesize = @filesize( $imagelink );
$image_stats = getimagesize( $imagelink );
$imagewidth = $image_stats[0];
$imageheight = $image_stats[1];





But I dont think your issue is this. In albinator basic the filename is stored in the database pictures table of albinator in the pname field. So as noted below we use this field to input into the photopost bigimage field. So looking at your error I would suggest you see why your pro version pname field only has the image name with NO EXTENTION. This is your issue and one you would need to investigate.


$picture = addslashes($line['pname']);

EPICENTER
May 9th, 2006, 01:54 PM
The Pname field had an fileextension

the table:


pid aid pname pindex pmsg o_used i_used t_used ratings visits votestotal timestamp mediatype visible price postpay origname imagedim
454 16 16_p454.jpg 5 43222 0 3166 0 275 3 0 1 1 0 0 0 500x375
453 16 16_p453.jpg 4 51841 0 3320 0 153 3 0 1 1 0 0 0 500x375




I check the md5 hash too and its correct!

/data/md5 of the userid/pname

But the directory of the mistake ist not a valid directory in the data directory!

Martin

EPICENTER
May 9th, 2006, 02:14 PM
id user userid cat storeid storecat date title description keywords bigimage width height filesize views medwidth medheight medsize approved lastpost rating watermarked allowprint extra1 extra2 extra3 extra4 extra5 extra6 disporder ipaddress numcom lastposter lastpid
7871 0 0 0 0 1146395831 NULL 23 NULL NULL 0 315 0 0 0 1 1146395831 0.00 no yes NULL NULL NULL NULL NULL NULL 99999 0 0 NULL 0
7872 0 0 0 0 1146395831 NULL 21 NULL NULL 0 315 0 0 0 1 1146395831 0.00 no yes NULL NULL NULL NULL NULL NULL 99999 0 0 NULL 0
7873 0 0 0 0 1146395832 NULL 23 NULL NULL 0 315 0 0 0 1 1146395832 0.00 no yes NULL NULL NULL NULL NULL NULL 99999 0 0 NULL 0





The UserID and the BigImage is not ok in the pp_photos ..I think!

EPICENTER
May 9th, 2006, 02:29 PM
mysql_query("INSERT INTO {$Globals['photopost']}photos (`id`, `user`, `userid`, `cat`, `date`, `description`, `bigimage`, `views`, `lastpost`, `approved`)
VALUES ('$pid', '$name','$userid', '$cat', '$date', '$description', '$views', '$picture', '$date', 1)",$u3t);




Database rows are not ok

views and picture must be changed ..or?

Chuck S
May 9th, 2006, 10:19 PM
Correct

EPICENTER
May 14th, 2006, 08:48 AM
Hi Chuck!

After the Import, $imagesize $imagewidth $imageheight in pp_photos are not updated! And if I open the galerie there is no bigimage!

If I echo the variables while importing the pics, I can see, die with size and height!

But if I look in the Datebase ..the rows are empty!

Any Idea?!

Greetings Martin

Chuck S
May 14th, 2006, 06:24 PM
No ideas other than check your albinator data path. Remember we update the width height and filesize upon grabbing the file. You should be seeing errors that files can not be found or something.

EPICENTER
May 15th, 2006, 05:01 AM
Its right!

The files are in the new directory and if there large files and I do a rescan of the converted files and create medium images ...the medium images work!

Can I do a rescan of the bigimage files?!

Chuck S
May 15th, 2006, 09:17 AM
If I remember right you have altered your importer to work with different images and even a different albinator type.

When we import the photos we write a query to the photos row. I would suggest you redownload the normal importer and work forward. Obviously there is an edit you have done to not allow the query to work. I show the query to be sound and there should be an error on screen if you have an issue. Next the imagesizes are UPDATED in the photos table when we import the file. This importer works fine with the normal coding on albinator basic. Albinator has not been sold for years and all I own is basic. I have tested an import and all works okay so look to the coding changes you made to grab different files.

EPICENTER
May 19th, 2006, 05:25 AM
Thanks Chuck!

The import is done! ;)