Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - fgallery

Pages: [1] 2 3 4
1
Feedback & Suggestions / Re: Downloading older versions
« on: September 22, 2006, 04:55:05 PM »
But the question is still open!

PS. I need 4images1.7.1 and I can't find it.

3
TheOracle could you please write an auto-install script for db-fields like V@no did?
I can't use PhpMyAdmin on my host and I really don't know how to add info to DB in another way =(

5
Where can I set number of characters (numbers)?

6
@JensF

1)Open details.php and find:
Code: [Select]
     $site_db->query($sql);
     $commentid = $site_db->get_insert_id();
     update_comment_count($id, $user_info['user_id']);

Add after:
Code: [Select]
//-----------------------------------------------------
// Start Emailer for comments
//-----------------------------------------------------
   $recipient_name = $image_row['user_name'];
   $recipient_email = $image_row['user_email'];
   $image_url = $script_url."/details.php?".URL_IMAGE_ID."=".$id;

   $sql = "SELECT user_allowemails FROM ".USERS_TABLE." WHERE ".get_user_table_field("", "user_name")." = ".$recipient_name;
   $result = $site_db->query($sql);
   $row = $site_db->fetch_array($result);
   $user_allowemails = ($row['user_allowemails']);

   if ($image_row['user_id'] != $user_info['user_id'] && $user_allowemails == 1) {
   include(ROOT_PATH.'includes/email.php');
   $site_email = new Email();
   $site_email->set_to($recipient_email);
   $site_email->set_from($config['site_email'], $config['site_name']);
   $site_email->set_subject($lang['send_comment_emailsubject']);
   $site_email->register_vars(array(
     "user_name" => stripslashes($user_name),
     "recipient_name" => stripslashes($image_row['user_name']),
     "image_name" => $image_row['image_name'],
     "comment_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
     "site_name" => $config['site_name'],
     "image_url" => $image_url,
     "comment_text" =>(stripslashes($comment_text)),
     "comment_headline"=>(stripslashes($comment_headline)),
          ));
    $site_email->set_body("comment_email", $config['language_dir']);
    $site_email->send_email();
    }

Be sure to add this before:
Code: [Select]
   }
 }
 unset($row);
 unset($spam_row);
}

//-----------------------------------------------------
//--- Show Comments -----------------------------------
//-----------------------------------------------------

2)Create file called comment_email.html, put this code into the file:
Code: [Select]
Dear {recipient_name},

{user_name} posted a comment on {image_name} at {site_name}.
To view the comment go to: {image_url}

------
Best regards, {site_name}
Upload comment_email.html to /lang/language/email/.

3)Open /lang/language/main.php and find:
Code: [Select]
$lang['post_comment'] = "post comment";

Add after:
Code: [Select]
$lang['send_comment_emailsubject'] = "COMMENT_NOTIFICATION_SUBJECT_HERE";
Replace COMMENT_NOTIFICATION_SUBJECT_HERE to whatever you want to appear in mail subject.

4)Open /templates/template/member_editprofile.html & add this code to the right place.
Code: [Select]
         <tr>
           <td class="row2"><b>{lang_allow_emails}</b></td>
           <td class="row2">
             <input type="radio" name="user_allowemails" value="1"{user_allowemails_yes} />
             {lang_yes}&nbsp;&nbsp;&nbsp;
             <input type="radio" name="user_allowemails" value="0"{user_allowemails_no} />
             {lang_no}</td>
         </tr>
This switch will allow users to enable or disable comments notification.

I can translate this instruction into deutsch but I hope it's clear enough ;)

@Vraxor
Perhaps you could update install instructions and delete all confusing comments ;)

7
Update :

I found it. You're probably talking about this line :

Quote

"comment_headline"=>$comment_headline,


change it to :

Code: [Select]

"comment_headline"=>(stripslashes($comment_headline)),


;)
I guess I should do the same with 'comment_text'.

8
I've upadated my full code, thanks!

PS.I thought your corrections would also fix this problem:
If I write for e.g. testin' in Hedline and/or Comment I'll receive it as testin\'

9
@fgallery:

Looks good. However, these two lines :

Quote

$image_url = $script_url."/details.php?".URL_IMAGE_ID."=".$id."";

$sql = "SELECT user_allowemails FROM ".USERS_TABLE." WHERE user_name = '$recipient_name'";


could also simply be stated like this :

Quote

$image_url = $script_url."/details.php?".URL_IMAGE_ID."=".$id;

$sql = "SELECT user_allowemails FROM ".USERS_TABLE." WHERE ".get_user_table_field("", "user_name")." = ".$recipient_name;


;)
Does it make any difference?
Sorry, I'm not a coder :)

10
[EDITED]
All right I've made all corrections specified above & below (till this reply) and the final code was (it works  :wink: ):
Code: [Select]
//-----------------------------------------------------
// Start Emailer for comments
//-----------------------------------------------------
   $recipient_name = $image_row['user_name'];
   $recipient_email = $image_row['user_email'];
   $image_url = $script_url."/details.php?".URL_IMAGE_ID."=".$id;

   $sql = "SELECT user_allowemails FROM ".USERS_TABLE." WHERE ".get_user_table_field("", "user_name")." = ".$recipient_name;
   $result = $site_db->query($sql);
   $row = $site_db->fetch_array($result);
   $user_allowemails = ($row['user_allowemails']);

   if ($image_row['user_id'] != $user_info['user_id'] && $user_allowemails == 1) {
   include(ROOT_PATH.'includes/email.php');
   $site_email = new Email();
   $site_email->set_to($recipient_email);
   $site_email->set_from($config['site_email'], $config['site_name']);
   $site_email->set_subject($lang['send_comment_emailsubject']);
   $site_email->register_vars(array(
     "user_name" => stripslashes($user_name),
     "recipient_name" => stripslashes($image_row['user_name']),
     "image_name" => $image_row['image_name'],
     "comment_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
     "site_name" => $config['site_name'],
     "image_url" => $image_url,
     "comment_text" =>(stripslashes($comment_text)),
     "comment_headline"=>(stripslashes($comment_headline)),
          ));
    $site_email->set_body("comment_email", $config['language_dir']);
    $site_email->send_email();
    }
    }
  }
 unset($row);
 unset($spam_row);
}

Don't forget to add:
Code: [Select]
$lang['send_comment_emailsubject'] = "COMMENT_NOTIFICATION_SUBJECT_HERE";
to /lang/language/main.php

PS.It will also disable sending you your own comments.

Perhaps I'd be useful for someone ...

11
I'd suggest you using this code instead:
http://www.4homepages.de/forum/index.php?topic=2705.msg14792#msg14792
then replace
Code: [Select]
if ($user_allowemails == 1) {with:
Code: [Select]
if ($image_row['user_id'] != $user_info['user_id'] && $user_allowemails == 1) {
Wow V@no! It works!
Thank you.

12
Language Packs / Re: [Language] Russian language files & buttons
« on: January 21, 2006, 07:15:04 PM »
òå ÷òî âûãëÿäÿò êàê îðèãèíàëû 4images (êâàäðàòíûå), áûëè âçÿòû îòñþäà:
http://www.4homepages.de/forum/index.php?topic=1094.0
À äðóãèå (ñ êðóãëûìè óãëàìè) áûëè âçÿòû ñ phpBB ôîðóìà.
Òû íå íàõîäèøü, ÷òî êíîïêè mawenzi íåìíîãî îòëè÷àþòñÿ îò îðèãèíàëüíûõ?
À Jan çàæàë äëÿ íàñ .psd-âåðñèè :)

13
Why admins do not receive comments for their images?
Only admins? have you tested it with regular member(s) or more then one admin account with VALID email address?
Nevermind V@no I've found the problem.
Now another question to the MOD'S author:
Can I disable notification on comments made by myself?
I mean I don't want to receive my own comments.

14
Language Packs / Re: [Language] Russian language files & buttons
« on: January 21, 2006, 05:34:29 PM »
Так блин, на вопросы по топику никто не отвечает :)
Какие вопросы-то?

Ну вот, например мой вопрос про кнопки:
http://www.4homepages.de/forum/index.php?topic=3257.msg50980#msg50980

15
Language Packs / Re: [Language] Russian language files & buttons
« on: January 21, 2006, 05:29:23 PM »
Ошибка в темплете, не хватает </form>  после <form method="post" action="./search.php">

P.S. Народ, прекратите задавать вопросы под этим топиком не касающие русского перевода галери и кнопок!

Так блин, на вопросы по топику никто не отвечает :)

Pages: [1] 2 3 4