101
Cozzie
Re: Search Engine Optimization (SEO)
  • 2007/9/27 10:17

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


That's great, thanks !



102
Cozzie
Re: Search Engine Optimization (SEO)
  • 2007/9/27 9:28

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


How can the site named be removed from the page titles? Is is a big job?



103
Cozzie
Re: Adding new fields to a module's existing tables?
  • 2007/9/25 10:29

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Hi Shine and thanks!

Each article is actually about university courses and so I added columns so that we could also display course details (such as tuition fee, entry requirements, email contact etc.) for each course. You can see it at:

http://how2uk.com/modules/coursesearch/item.php?itemid=11

So I know its a little unusual but we've kind of used an article module to suit our needs.

So each column just contains basic values for each course (price=10,000 start date=Sept) etc

Can the update of the submit/edit pages be done do you reckon?



104
Cozzie
Re: Adding new fields to a module's existing tables?
  • 2007/9/25 6:51

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Hello

I'm still stuck on this and I've got to find the answer by the end of the week so if anybody has any ideas I' really appreciate the help

Basically I am using the module smartsection. As with all article modules it allows me to compose articles with a title, an introduction, main text, an image etc.

Its great, but I have added a few additional columns to the article's database table and adjusted the pages so that these new values are also shown on each article.

The problem is that I can't figure out how to change the submit and admin pages so that when editing articles users can input/change these new values as well as the original ones.

All I can do is input the data in the new columns via phpmyadmin but this is not making my boss happy!

Can anyone help???




105
Cozzie
Re: Where is the html template? Please help
  • 2007/9/22 8:48

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Mmmmm, can't get the form to work. So I have adapted the much simpler contact.php form of xdirectory.

Now, when I submit a message its says it has now been sent successfully, but no email arrives (I'm trying to send to myself).

Is anyone able to take a quick look at the code I'm using and tell me why its not working???


Quote:

if ($submit) {
include("header.php");
global $xoopsConfig, $xoopsDB, $myts, $meta;

$result = $xoopsDB->query("SELECT title, email FROM ".$xoopsDB->prefix("coursesearch_items")." WHERE itemid = '$id'");
while(list($title, $email) = $xoopsDB->fetchRow($result)) {


if ($tele) {
$teles = "Phone: $tele";
} else {
$teles = "";
}

$message .= "Message from $namep\ne-Mail: $post ".$meta['title']."\n$teles\n\n";
$message .= "$namep wrote:\n";
$message .= "$messtext\n\n\n";
$message .= "This message was sent by $namep using the e-Mail form on {X_SITENAME}. \n\n\n";

$subject = "Email Submission from {X_SITENAME}";
$mail =& getMailer();
$mail->useMail();
$mail->setFromEmail($post);
$mail->setToEmails($email);
$mail->setSubject($subject);
$mail->setBody($message);
$mail->send();
echo $mail->getErrors();
}
redirect_header("index.php",1,_CLA_MESSEND);
exit();

} else {

include("header.php");
include(XOOPS_ROOT_PATH."/header.php");
OpenTable();

$result = $xoopsDB->query("SELECT title, email FROM ".$xoopsDB->prefix("coursesearch_items")." WHERE itemid = '$id'");
while(list($title, $email) = $xoopsDB->fetchRow($result)) {

echo "<script>
function verify() {
var msg = \"Errors were found during the validation of this form!\\n__________________________________________________\\n\\n\";
var errors = \"FALSE\";


if (document.Cont.namep.value == \"\") {
errors = \"TRUE\";
msg += \"The Name field is a required field.\\n\";
}

if (document.Cont.post.value == \"\") {
errors = \"TRUE\";
msg += \"The e-Mail field is a required field.\\n\";
}

if (document.Cont.messtext.value == \"\") {
errors = \"TRUE\";
msg += \"The Message field is a required field.\\n\";
}


if (errors == \"TRUE\") {
msg += \"__________________________________________________\\n\\nPlease correct the errors listed above before submitting this form.\\n\";
alert(msg);
return false;
}
}
</script>";


echo "<B></B><BR><BR>";
echo "Send a message to:<br><font size=4>$title</font><BR>";
echo "<form onSubmit=\"return verify();\" method=\"post\" action=\"contact.php\" NAME=\"Cont\">";
echo "<INPUT TYPE=\"hidden\" NAME=\"id\" VALUE=\"$id\">";
echo "<INPUT TYPE=\"hidden\" NAME=\"submit\" VALUE=\"1\">";

if($xoopsUser) {
$idd =$xoopsUser->getVar("name", "E");
$idde =$xoopsUser->getVar("email", "E");
}

echo "<TABLE WIDTH=100% BORDER=0 CELLSPACING=1>
<TR>
<TD>Your Name: </TD>
<TD><input type=\"text\" name=\"namep\" size=\"42\" value=\"$idd\"></TD>
</TR>
<TR>
<TD>Your e-Mail: </TD>
<TD><input type=\"text\" name=\"post\" size=\"42\" value=\"$idde\"></font></TD>
</TR>
<TR>
<TD>Your Phone: </TD>
<TD><input type=\"text\" name=\"tele\" size=\"42\"></font></TD>
</TR>
<TR>
<TD>Message: </TD>
<TD><textarea rows=\"5\" name=\"messtext\" cols=\"40\"></textarea></TD>
</TR>
</TABLE>
<p><INPUT TYPE=\"submit\" VALUE=\"Send\">
</form>";

CloseTable();
include(XOOPS_ROOT_PATH."/footer.php");
}
}
?>


Thanks a lot for any help, its really appreciated (and needed!)



106
Cozzie
Re: Where is the html template? Please help
  • 2007/9/21 10:43

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Thanks a lot zyspec! That clarifies things.

But I'm still stuck!!

I'm trying to put a contact form on each article of the smartsection module.

As smart section doesn't have this I'm trying to adapt the contact form on mxdirectory (the business listing module).

But every time I submit the contact form I get this message:

Error: Number %s, please contact the site administrator

This may be a bit vague, but do you know what I'm doing wrong?

I've changed the $result to get the relevant values from the smartsection database and I've changed $lid to $itemid (as used by smartsection) - but its not working.

Is it possible to set up a contact form in this way?

Thanks a lot for any suggestions



107
Cozzie
Where is the html template? Please help
  • 2007/9/19 9:57

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


I trying to update the contact form on the module mxdirectory. I can change the contact.php page, no problems - but I can't find a contact.html template anywhere!!!

There's gotta be one right?? But there isn't in the templates folder of the module.

Contact.php is the page to send an email to a company in the directory. There is the same problem for submit.php which is the page to add a listing - there's no html template page anywhere.

I've really, really gotta change the page layout asap - can someody help me please!!!!!

Thanks!



108
Cozzie
Adding new fields to a module's existing tables?
  • 2007/9/17 7:30

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


I've added the columns to the "items" table and inputted data and all seems to be working well.

Now I have one more problem, hope somebody can give me some advice.

Right now I have to use phpmyadmin to add data to any of the new columns that I have added.

So if a user presses the Submit Article button they can't add values to the new fields. How can I adjust the submit.php file to allow users to successfully add values to the new fields as well as the original one (article title, introduction, main text etc.).

If anyone has done anything similar for other modules couldyou let me know?

Thanks!!!



109
Cozzie
Re: About to Launch: Security Check List
  • 2007/9/14 9:09

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


I never said thanks - so thanks!



110
Cozzie
Smart section: can I add extra columns to its database?
  • 2007/9/12 3:07

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Hi,

My question is: can I add extra colums to the smartsection_items table/database (this is the table that stores the articles)?

Or any other module's db table for that matter??

I want each article to display some additional parameters beside the text of the article, and I just wanted to check that it is ok to do this?

Also I'll be adding about 10 new columns, will that make the table too large (it already has 25 columns)???

How many columns can a table have before it affects performance?

Thanks a lot for any replies!!!




TopTop
« 1 ... 8 9 10 (11) 12 13 14 »



Login

Who's Online

233 user(s) are online (164 user(s) are browsing Support Forums)


Members: 0


Guests: 233


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits