• [MOD] Contact Form 5 0 5 1
Currently:  

Author Topic: [MOD] Contact Form  (Read 369077 times)

0 Members and 1 Guest are viewing this topic.

Offline honda2000

  • 4images Guru
  • *******
  • Posts: 3.263
    • View Profile
    • Wir machen Internet!
Re: [MOD] Contact Form
« Reply #135 on: April 19, 2007, 05:43:36 PM »
this is working, but look at your database in your admin-profile > e_mail_adress looking for: 4images_user

Offline manyaq

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Contact Form
« Reply #136 on: April 19, 2007, 06:54:43 PM »
this is working, but look at your database in your admin-profile > e_mail_adress looking for: 4images_user
I think u mean that the code is looking in for the admin email.
Am i right.
and i can not get the email, whats the reason. i build my gallery on my iss on localhost win xp pro sql 5 php 5. but i didnt install smtp server.

Offline honda2000

  • 4images Guru
  • *******
  • Posts: 3.263
    • View Profile
    • Wir machen Internet!
Re: [MOD] Contact Form
« Reply #137 on: April 19, 2007, 07:10:39 PM »
no, no, no no in Contrlpane, locking in your local-databse, open your localhost, lock at database in tabel: 4images_user
profile: <your-profile-as-admin> and in: e_mail: is it: admin@yourdomain.ldt?? ist it! remove it with your e-mail-adress

Offline musicsurfer

  • Full Member
  • ***
  • Posts: 184
    • View Profile
Re: [MOD] Contact Form
« Reply #138 on: May 27, 2007, 04:41:02 PM »
Ich habe folgendes Problem

Das Kontaktformular läuft, nur wenn ich es absende und den Hinweis 'E-Mail wurde verschickt' bekomme, dann springt das Formular nach einigens Sekunden auf die Startseite zurück und dass möchte ich vermeiden.
Es soll die Meldung  'E-Mail wurde verschickt' ruhig stehen bleiben und nur duch klicken auf eine andere Seite gehen.
Was muss ich in welchem Code ändern damit das klappt ?

Gruss

Offline gborislav

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: [MOD] Contact Form
« Reply #139 on: June 19, 2007, 05:45:45 PM »
Hi,

I need help.

I receive this error massage , Can Someone resolve this?

Email Error: Couldn't open Template ./lang/russian/email/contactform_message.html
No recipient addresses found in header
Warning: Cannot modify header information - headers already sent by (output started at /home/content/m/b/p/mbpartydesign/html/galery/includes/email.php:336) in /home/content/m/b/p/mbpartydesign/html/galery/contact.php on line 85

Thanks.

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Contact Form
« Reply #140 on: July 01, 2007, 04:23:53 AM »
Another tip before installing this MOD. Make sure that you have the ' mailchek ' module added from your includes/functions.php file. Otherwise, it will not work. ;)

-------------------------------------------------

Du müssen überprüfen, zuerst, wenn ' mailchek ' Modul ist beteiligt in includes/functions.php. Andernfalls, es wille ausfallen. ;)

Any one want to explain how to do this clearly? I have forgotten these things.
As long as I can finish my site before I die.

Offline mato72

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Brick-Cinema
Re: [MOD] Contact Form
« Reply #141 on: July 25, 2007, 04:05:42 AM »
Aaaalso...
Das mit dem kontakt-Formular wäre ja echt eine feine Sache! Ich habe hier ein etwas...kleineres File, welches auch nur aus einer Datei besteht. Ob und wie das mit 4Images funktioniert weiss ich nicht, kann ja mal jemand testen und hier berichten !!!???

Das Script läuft auf jeden Fall einwandfrei auf meinen Homepages (Noch ohne 4Images...leider)
Ausserdem ist ein rechen-Captcha integriert, mit dem man eine dynamisch erzuegte Rechenaufgabe lösen muss (9 ist die höchste Zahl)
Denn die Bots sind heute schon so schlau dass sie die zahlen/Buchstaben auf den Bildern erkennen können.
Dynamisch erstelle rechenaufgaben ( z.B. 6+4=?) beherrschen sie nicht
Das Mailformular beinhaltet noch eine Betreff-Option, die man vorher angelichen sollte.

Leider habe ich keinen Plan wie ich dieses Script in 4Images implementieren/Includen kann.
Wenn mir da jemand weiterhelfen kann, wäre ich echt dankbar!



Code: [Select]
<?

$bestätigung="Ihre mail wurde weitergeleitet";
$fehler="Es ist ein Fehler beim Mailversandaufgetreten";

if(!@$sentt)
{
$zahl1 = rand(1,9); #Zahl 1 per Zufall von 1-9 aussuchen
$zahl2 = rand(1,9); #Zahl 2 per Zufall von 1-9 aussuchen
formschreiben($PHP_SELF,$zahl1,$zahl2,$ergebnis,$Name,$Email,$Betreff,$Nachricht);
}
else
{
$ok=true;
if(!$zahl1 or !$zahl2)
{
$zahl1 = rand(1,9); #Zahl 1 per Zufall von 1-9 aussuchen
$zahl2 = rand(1,9); #Zahl 2 per Zufall von 1-9 aussuchen
}

if(intval($zahl1)+intval($zahl2)!=intval($ergebnis))
{
echo "Ergebnis falsch oder leer<br><br>";
formschreiben($PHP_SELF,$zahl1,$zahl2,$ergebnis,$Name,$Email,$Betreff,$Nachricht);
}
else
{

$to="Deine@Adresse.de"; # hier deine email angeben

$header.="From:\"DEINE HOMEPAGE\"<Deine@Adresse.de>\n"; #hier deine email mit angeben
$subject=$Betreff;



$message="Kontaktformular\n\n";
$message.="Von: \n".stripslashes($Name)."\n\n";
$message.="Email: \n".stripslashes($Email)."\n\n";
$message.="Betreff: ".stripslashes($Betreff)."\n\n\n";
$message.="Nachricht: \n".stripslashes($Nachricht)."\n";

if(mail($to,$subject,$message,$header))
echo $bestätigung;
else
echo $fehler;
}
}

?>



<?
function formschreiben($PHP_SELF,$zahl1,$zahl2,$ergebnis,$Name,$Email,$Betreff,$Nachricht)
{
?>
<form action="<? echo $PHP_SELF ?>" method="POST">
<input type="hidden" name="sentt" value="ok"></input>
<input type="hidden" name="zahl1" value="<?echo $zahl1 ?>"></input>
<input type="hidden" name="zahl2" value="<?echo $zahl2 ?>"></input>

<p> Bitte f&uuml;lle alle Felder im Formular auf, wenn Du mir
eine Nachricht schicken m&ouml;chtest
</p>
<table width="314" border="0" align="center">
<tr>
<td width="86">
<div align="left"><font size="2">
<strong>Name</strong></font></div></td>
<td width="218">
<div align="left">
<input type='text' name='Name' value="<? echo stripslashes(@$Name) ?>">
</div>
</td>
</tr>
<tr>
<td width="86">
<div align="left"><font size="2"><strong>Email</strong></font></div></td>
<td width="218">
<div align="left">
<input type='text' name='Email' value="<?echo stripslashes(@$Email) ?>">
</div>
</td>
</tr>
<tr>
<td width="86">
<div align="left"><small><font size="2"><strong>Betreff:</strong></font></small></div></td>
<td width="218">
<div align="left">
<select name="Betreff">
<?

echo "<option value=\"Software\"";
echo ($Betreff=="Software")?" selected>": ">";
echo "Software</option>";
echo "<option value=\"Tutorial\"";
echo ($Betreff=="Tutorial")? " selected>": ">";
echo "Tutorial</option>";
echo "<option value=\Anderes\"";
echo ($Betreff=="Anderes")?" selected>": ">";
echo "Anderes</option>";
?>
</select>
</div>
</td>
</tr>
<tr>
<td width="86" align="right" valign="top">
<div align="left"><font size="2"><strong>Message:</strong></font></div></td>
<td width="218">
<div align="left">
<textarea cols="25" rows="10" name="Nachricht" class=bgform><? echo stripslashes(@$Nachricht) ?></textarea>
</div>
</td>
</tr>
<tr>
<td>
<div align="left"><strong>Spam-Schutzfrage</strong>
</div></td>
<td><? echo "<span class='normal'>Addiere: $zahl1 + $zahl2 = </span><input class='felder' size='2'

id='summe' value='".@$ergebnis."' name='ergebnis' type='text' /><br />"; #hier wird das Ergebnis eingetragen ?></td>
</tr>
<tr>
<td width="86">&nbsp;</td>
<td width="218"><input type='submit' value='Submit' name="submit">
<input type="reset" name="submit2" value="Delete"></td>
</tr>
</table>
</form>
<?
}
?>
 

Probiert es aus und berichtet wie man es einbindet...

orb42

  • Guest
Re: [MOD] Contact Form
« Reply #142 on: July 29, 2007, 03:57:23 PM »
I got this error when opening contact.php


Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /mnt/107/xx/x/x/xxx/includes/db_mysql.php on line 116

Anyone has an idea please?

orb42

  • Guest
Re: [MOD] Contact Form
« Reply #143 on: July 29, 2007, 07:49:22 PM »
OK fixed this  :)
I think this version of contact.php is taken from the old "contact mod" and is not compliant with actual PHP/SQL.

to fix it,
open: CONTACT.PHP

find  line 132:       

Code: [Select]
FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
replace with:

Code: [Select]
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)

 


Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Contact Form
« Reply #144 on: August 01, 2007, 03:49:58 PM »
I see image table in contact ... why is there ? ...  :|
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

orb42

  • Guest
Re: [MOD] Contact Form
« Reply #145 on: August 01, 2007, 07:10:09 PM »
 
Could Vincent (or anyone else) tell us why is there this code in contact.php??  what does it serves plz?


Code: [Select]
//-----------------------------------------------------
//--- Show New Images ---------------------------------
//-----------------------------------------------------
$imgtable_width = ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
  $imgtable_width .= "%";
}

$additional_sql = "";
if (!empty($additional_image_fields)) {
  foreach ($additional_image_fields as $key => $val) {
    $additional_sql .= ", i.".$key;
  }
}

$num_new_images = $config['image_cells'];
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
        FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").")
        AND i.image_date >= ".(time() - 60 * 60 * 24 * $config['new_cutoff'])." ORDER BY RAND()
        LIMIT $num_new_images";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);

if (!$num_rows)  {
//  $new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr><td>";
  $new_images .= $lang['no_new_images'];
  $new_images .= "</td></tr></table>";
}
else  {
  $new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  $count = 0;
  $bgcounter = 0;
  while ($image_row = $site_db->fetch_array($result)){
    if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    //  orig  $new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
    $new_images .= "<td width=\"".$imgtable_width."\" valign=\"bottom\">\n"; //  Mod

    show_image($image_row);
    $new_images .= $site_template->parse_template("thumbnail_bit");
    $new_images .= "\n</td>\n";
    $count++;
    if ($count == $config['image_cells']) {
      $new_images .= "</tr>\n";
      $count = 0;
    }
  } // end while

  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover >= 1) {
      for ($f = 0; $f < $leftover; $f++) {
        $new_images .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $new_images .= "</tr>\n";
    }
  }
  $new_images .= "</table>\n";
} // end else

$site_template->register_vars("new_images", $new_images);
unset($new_images);

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Contact Form
« Reply #146 on: August 01, 2007, 07:51:35 PM »
... the part "Show New Images" has nothing to do with the "Contact Form" ...  :?
... only if you want to show "New Images" above/below your "Contact Form" ...
... if this part is in Vincents contact.zip /contact.php ... you can delete it ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD] Contact Form
« Reply #147 on: August 01, 2007, 11:25:04 PM »
Quote
... if this part is in Vincents contact.zip /contact.php ... you can delete it ...

Thanks for confirm.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline mato72

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
    • Brick-Cinema
Re: [MOD] Contact Form
« Reply #148 on: August 03, 2007, 04:33:15 AM »
Hi...
i have installed the mod, work´s fine...
But HOW to integrade in this Mod an Second Mail-Adress, an "CC"...?
We are 2 Site-Admins and we are nedd to implement a second Mail-Adress....

I have tried to like this:
$site_email->set_to("firstAdmin@home.com","secondAdmin@home.com");
But it dos not work...





Hallo..
Ich habe den Mod installiert, läuft super!
Aber wie baut man dort eineen 2ten Mail-Empfänger ein, einen "CC"...?
Wir sind 2 Admins, und müssen nun irgwnedwie eine 2te mai-adresse einbauen.

Ich hab´s mal so probiert.
$site_email->set_to("firstAdmin@home.com","secondAdmin@home.com");
geht aber nicht..

orb42

  • Guest
Re: [MOD] Contact Form
« Reply #149 on: August 03, 2007, 07:31:56 AM »
did you try:
Code: [Select]
$site_email->set_to("firstAdmin@home.com, secondAdmin@home.com");