Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
Xeno14
New Member
New Member



Joined: Oct 30, 2004
Posts: 17

PostPosted: Mon Nov 29, 2004 2:58 pm Reply with quote

i am trying to edit the feedback module to turn it into an enlistment module.
i have made a new folder under modules. changed the lang-english and the index.php and it doesnt work

here is my lang-english.php
Code:
<?php


/**************************************************************************/
/* PHP-NUKE: Advanced Content Management System                           */
/* ============================================                           */
/*                                                                        */
/* This is the language module with all the system messages               */
/*                                                                        */
/* If you made a translation, please go to the site and send to me        */
/* the translated file. Please keep the original text order by modules,   */
/* and just one message per line, also double check your translation!     */
/*                                                                        */
/* You need to change the second quoted phrase, not the capital one!      */
/*                                                                        */
/* If you need to use double quotes (") remember to add a backslash (\),  */
/* so your entry will look like: This is \"double quoted\" text.          */
/* And, if you use HTML code, please double check it.                     */
/**************************************************************************/

define("_SEND.","Send");
define("_YOURNAME.","*Your Online Name");
define("_MESSAGE.","*Your Age");
define("_WHYYOUWANTTOJOIN.","Why you want to Join Us?");
define("_YOUREMAIL.","*Your Email")
define("_COUNTRY.","*Country");
define("_FAVGUN.","Your Favourite Gun");
define("_FAVMAP.","Your Favourite Map");
define("_FEEDBACKTITLE.","Enlistment Form");
define("_FEEDBACK.,"Feedback");
define("_FBENTERNAME.","ERROR: Please enter your name!");
define("_FBENTEREMAIL.","ERROR: Please enter your e-mail address!");
define("_FBENTERMESSAGE.","ERROR: Please enter a message!");
define("_SENDEREMAIL.","Sender's Email");
define("_SENDERNAME.","Sender's Name");
define("_FBMAILSENT.","Mail has been sent!");
define("_FBTHANKSFORCONTACT.","Thank you for Applying to us");

?>


and here is the index.php


Code:
<?php


/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* Based on php Addon Feedback 1.0                                      */
/* Copyright (c) 2001 by Jack Kozbial                                   */
/* http://www.InternetIntl.com                                          */
/* jack@internetintl.com                                                */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/*         Additional security & Abstraction layer conversion           */
/*                           2003 chatserv                              */
/*      http://www.nukefixes.com -- http://www.nukeresources.com        */
/************************************************************************/

if (!eregi("modules.php", $_SERVER['SCRIPT_NAME'])) {
    die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);

/**********************************/
/* Configuration                  */
/*                                */
/* You can change this:           */
/* $index = 0; (right side off)   */
/**********************************/
$index = 1;
$subject = "$sitename "._FEEDBACK."";
/**********************************/

include("header.php");
$cookie[0] = intval($cookie[0]);
if ($cookie[1] != "") {
    $row = $db->sql_fetchrow($db->sql_query("SELECT name, username, user_email FROM ".$user_prefix."_users WHERE user_id='$cookie[0]'"));
    if ($row['name'] != "") {
   $sender_name = $row['name'];
    } else {
   $sender_name = $row['username'];
    }
    $sender_email = $row['user_email'];
}

$form_block = "
    <center><font class=\"title\"><b>$sitename: "._FEEDBACKTITLE."</b></font>
    <br><br><font class=\"content\">"._FEEDBACKNOTE."</font>
    <FORM METHOD=\"post\" ACTION=\"modules.php?name=$module_name\">
    <P><strong>"._YOURNAME.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_name\" VALUE=\"$sender_name\" SIZE=30></p>
    <P><strong>"._COUNTRY.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_country\" VALUE=\"$sender_name\" SIZE=30></p>
    <P><strong>"._AGE.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_age\" VALUE=\"$sender_name\" SIZE=30></p>
    <P><strong>"._YOUREMAIL.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_email\" VALUE=\"$sender_email\" SIZE=30></p>
    <P><strong>"._FAVGUN.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_Gun\" VALUE=\"$sender_email\" SIZE=30></p>
    <P><strong>"._FAVMAP.":</strong><br>
    <INPUT type=\"text\" NAME=\"sender_Map\" VALUE=\"$sender_email\" SIZE=30></p>
    <P><strong>"._WHYYOUWANTTOJOIN.":</strong><br>
    <TEXTAREA NAME=\"why_join_us\" COLS=30 ROWS=5 WRAP=virtual>$message</TEXTAREA></p>
    <INPUT type=\"hidden\" name=\"opi\" value=\"ds\">
    <P><INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\""._SEND."\"></p>
    </FORM></center>
";

OpenTable();
if ($opi != "ds") {
    echo "$form_block";
} elseif ($opi == "ds") {
    if ($sender_name == "") {
   $name_err = "<center><font class=\"option\"><b><i>"._FBENTERNAME."</i></b></font></center><br>";
   $send = "no";
    }
    if ($sender_email == "") {
   $email_err = "<center><font class=\"option\"><b><i>"._FBENTEREMAIL."</i></b></font></center><br>";
   $send = "no";
    }
    if ($message == "") {
       $message_err = "<center><font class=\"option\"><b><i>"._FBENTERMESSAGE."</i></b></font></center><br>";
   $send = "no";
    }
    if ($send != "no") {
   $sender_name = removecrlf($sender_name);
   $sender_email = removecrlf($sender_email);
   $msg = "$sitename\n\n";
   $msg .= ""._SENDERNAME.": $sender_name\n";
   $msg .= ""._SENDEREMAIL.": $sender_email\n";
   $msg .= ""._MESSAGE.": $message\n\n";
   $to = $adminmail;
   $mailheaders = "From: $sender_name <$sender_email>\n";
   $mailheaders .= "Reply-To: $sender_email\n\n";
   mail($to, $subject, $msg, $mailheaders);
   echo "<P><center>"._FBMAILSENT."</center></p>";
   echo "<P><center>"._FBTHANKSFORCONTACT."</center></p>";
    } elseif ($send == "no") {
   OpenTable2();
   echo "$name_err";
   echo "$email_err";
   echo "$message_err";
   CloseTable2();
   echo "<br><br>";
   echo "$form_block";
    }
}

CloseTable();
include("footer.php");

?>


when i go to the site it comes up all screwed up with the _WHATEVERGOESHERE <example >

onto of the boxes.

also i have an error at the top saying
Code:


Parse error: parse error, unexpected T_STRING in e:\domains\s\********\user\htdocs\modules\JoinUs\language\lang-english.php on line 25


any ideas, please help.
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon Nov 29, 2004 3:53 pm Reply with quote

You're missing a ; at the end of this line

define("_YOUREMAIL.","*Your Email")
 
View user's profile Send private message
Xeno14







PostPosted: Tue Nov 30, 2004 11:34 am Reply with quote

ok thats worked ^_^ error gone, but i still cant find out why it doesnt come up with what it should.



on the site it comes up with

Code:


_YOUREMAIL_FEEDBACKTITLE

_FEEDBACKNOTE
_YOURNAME:


_COUNTRY:


_AGE:


_YOUREMAIL:


_FAVGUN:


_FAVMAP:


_WHYYOUWANTTOJOIN:
Only registered users can see links on this board! Get registered or login! thats the link
 
Raven







PostPosted: Tue Nov 30, 2004 12:26 pm Reply with quote

If you look at your language file DEFINES at the top of this thread, they each have a . after them. Get rid of that . after each of your defines.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©