Go Back   Pligg CMS Forum > Pligg Development > Pligg Templates > Template Support > "yget"

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-31-2007, 03:05 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 32
Thanks: 7
Thanked 0 Times in 0 Posts
ajax contact form in the sidebar help needed..

Ok I wanted to add a contact from to my sidebar. this is what I did;

Demo

Pic:



1. I created a new file in /templates/yget/sidebar_modules called emailme.tpl

2. Then I added this code;
Code:
<div class="tlb">
     {php}echo "<span> <a onclick=\"new Effect.toggle('ads','blind', {queue: 'end'}); \">  <img src=\"".my_pligg_base."/templates/yget/images/expand.png\"> </span>";
     {/php}

      <a href="#">Contact us</a>
</div>

{literal}

	<style type='text/css' media='screen,projection'>

	<!--

	fieldset { border:0;margin:0;padding:0; }

	label { display:block; }

	input.text,textarea { width:230px;font:12px/12px 'courier new',courier,monospace;color:#333;padding:3px;margin:1px 0;border:1px solid #ccc; }

	input.submit { padding:2px 5px;font:bold 12px/12px verdana,arial,sans-serif; }

	-->

	</style>

{/literal}






	<h2></h2>

	<p id="loadBar" style="display:none;">

		<strong>Sending Email</strong> <img src="{$ajaxcontact_path}img/loading.gif" alt="Loading..." title="Sending Email" align="absmiddle" />

		<br /><br />

	</p>

	<p id="emailSuccess" style="display:none;">

		<strong style="color:green;">Success! Your Email has been sent.</strong>

		<br /><br />

	</p>

	

	<div id="contactFormArea">

		<form action="{$ajaxcontact_path}scripts/contact.php" method="post" id="cForm">

			<fieldset>

				Name:<br />

				<input class="text" type="text" size="25" name="posName" id="posName" /><br /><br />

				Email:<br />

				<input class="text" type="text" size="25" name="posEmail" id="posEmail" /><br /><br />

				Regarding:<br />

				<input class="text" type="text" size="25" name="posRegard" id="posRegard" /><br /><br />

				Message:<br />

				<textarea cols="50" rows="4" name="posText" id="posText"></textarea><br /><br />

				<label for="selfCC">

					<input type="checkbox" name="selfCC" id="selfCC" value="send" /> Send CC to self

				</label><br />

				<label>

					<input class="submit" type="submit" name="sendContactEmail" id="sendContactEmail" value=" Send Email " />

				</label>

			</fieldset>

		</form>

	</div>
3. Then I added this code to the sidebat.tpl
Code:
{assign var=sidebar_module value="emailme"}{include file=$the_template_sidebar_modules."/wrapper.tpl"}
And that's it... everything looks fine, however when I input the information and click send I get this mes.

Not Found
The requested URL /scripts/contact.php was not found on this server. what am I doing wrong??????


Thank you
__________________
www.TechFeed.ca | www.TechFeed.info |
Reply With Quote
  #2 (permalink)  
Old 03-31-2007, 03:35 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
change this line
Code:
<form action="{$ajaxcontact_path}scripts/contact.php" method="post" id="cForm">
to

Code:
<form action="www.yourdomain.com/modules/ajaxcontact/scripts/contact.php" method="post" id="cForm">
You may run into more problems but see what happens when you do that.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #3 (permalink)  
Old 03-31-2007, 04:08 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 32
Thanks: 7
Thanked 0 Times in 0 Posts
I keep getting the same error


Not Found
The requested URL /www.techfeed.ca/modules/ajaxcontact/scripts/contact.php was not found on this server.
__________________
www.TechFeed.ca | www.TechFeed.info |
Reply With Quote
  #4 (permalink)  
Old 03-31-2007, 04:12 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
try
Code:
<form action="modules/ajaxcontact/scripts/contact.php" method="post" id="cForm">
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #5 (permalink)  
Old 03-31-2007, 04:41 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 32
Thanks: 7
Thanked 0 Times in 0 Posts
bingo. It works now, however when I click SEND, it send the email just fine, but then the site shows blank..


Could you try sending an email through the sidebar and see what i mean.

This is what I get in the address bar in my browsers

http://www.techfeed.ca/modules/ajaxc...p?success=true

Thank you
__________________
www.TechFeed.ca | www.TechFeed.info |

Last edited by Sadmir; 03-31-2007 at 04:46 PM..
Reply With Quote
  #6 (permalink)  
Old 04-02-2007, 09:17 AM
Casual Pligger
 
Join Date: Sep 2006
Posts: 64
Thanks: 11
Thanked 2 Times in 2 Posts
Thank you for your code!
I try it and it works fine!

Unfortunatly, i can reduce the contact box. When i click on the arrow, nothing appens. What did i do ?
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax Contact Form v0.1 ??? dragan General Help 10 04-24-2008 03:44 AM
[mod request] (re)captcha for ajax contact form? Rodney Modification Tutorials 3 03-30-2008 02:00 AM
Another AJAX Contact form sending error GeneralLedger Bug Report 2 03-22-2008 02:49 PM
[SOLVED] No Emails from Ajax Contact Form jawinn General Help 6 07-09-2007 07:47 AM
Ajax Contact Form v0.1 Sadmir General Help 1 03-26-2007 12:39 PM


Search Engine Friendly URLs by vBSEO 3.2.0