4images Modifications / Modifikationen > Mods & Plugins (Releases & Support)

[Mod] Email image validation results to the user

<< < (2/5) > >>

ai-gu:
Hi all,
My 4images was integrated with phpBB, and I tried to install this MOD, after I did all as instructed in here, I got this error:


--- Quote ---Image added: test (cbnu.JPG)

DB Error: Bad SQL Query: SELECT user_email, user_name, user_allowemails FROM phpbb202_users WHERE user_id = 4
Unknown column 'user_name' in 'field list'
--- End quote ---


I would appreciate if any one could help me out this problem.
Thanks in advance.

SLL:
just check phpbb field names and change this query accordingly

ai-gu:
Hi all,

Thanks SLL I changed the field names and there was no Error. But it seems that no mail was sent. The problem may be at the red colored text. (most of the e-mail addresses at the phpBB forum are not viewable by users (user_viewemail).

Can you guide me to change the code so that whoever post an image will receive the mail upon validation or decline??



--- Quote ---$current_time = time();
   $row = array();
   $sql = "SELECT user_email, username, user_viewemail FROM ".USERS_TABLE." WHERE user_id = $user_id";
   $result = $site_db->query($sql);
   $row = $site_db->fetch_array($result);
   $user_allowemails = ($row['user_viewemail']);   $recipient_email = ($row['user_email']);
   $recipient_name = ($row['username']);
   $cut_url = str_replace("admin", "", $script_url);
   $image_url = $cut_url."details.php?".URL_IMAGE_ID."=".$image_id."";

   if ($user_allowemails == 1) {
   $site_email = new Email();
   $site_email->set_to($recipient_email);
   $site_email->set_from($config['site_email'], $config['site_name']);
   $site_email->set_subject("Image Validation Results");
   $site_email->register_vars(array(
   "recipient_name" => $recipient_name,
   "lang_image_add_success" => $lang['image_add_success'],
   "validation_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
   "site_name" => $config['site_name'],
   "yr_image_name" => strtoupper($image_media_file),
   "image_url" => $image_url,
   ));
   $site_email->set_body("validation_email", $config['language_dir']);
   $site_email->send_email();
   }
//-------------------------------------------------------
--- End quote ---

SLL:
just remove these two lines and } bracket at the very end.

eXup:
Hi all,

der Mod ist wirklich sehr nützlich.

Könnte man ihn so umbauen, dass der Uploader beim Upload definieren kann ob er die
"Validation-E-Mail" erhalten will oder nicht? Meine Gedanken dazu: Man müsste ein Auswahlfeld
in die Uploadmaske einfügen und beim Validieren fallabhängig die E-Mail schicken.

Leider geht das aber eindeutig über meinen Horizont. Wäre nett, wenn es jemandem gelingen würde
diese Modifikation einzubauen.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version