Search?

sitename

YStore Help

  • Home
  • About
  • Rss

Microsoft bids to buy Yahoo!

Posted By: admin  Published in Uncategorized

2

Feb

Today, Microsoft reportly placed a bid to buy Yahoo! for $44.6 billion. This is not Microsoft’s first attempt to purchase Yahoo and if this bid is rejected, it probably won’t be the last. The purchase of Yahoo would be another advantage for Microsoft in battling with Google for the online advertising market.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
no comment

How to create a PHP contact form

Posted By: admin  Published in Uncategorized

27

Jan

Given the recent pro forma script update, we thought it would be a good time to share the PHP contact form script we use for Yahoo! Stores.

The contact form processing script we show you in this tutorial will send an email with all of the form data as well as the ip address, host, and browser of the person that submitted the form.

Step 1) Create a form

From within your store editor create a new item and paste the code below into the caption field. You will need to edit the value of the”action” attribute within the first line of the form. The “action” of the form needs to point to where your PHP contact form processing script will be located, typically all you should need to change is the domain.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<form id="contact" name="contact" method="post" action="http://site.domain.com/contact.php">
  <table width="375" border="0" cellspacing="5" cellpadding="0">
    <tr>
      <td><label>Name:</label></td>
    </tr>
    <tr>
      <td><input name="name" type="text" id="name" maxlength="128" class="input"></td>
    </tr>
    <tr>
      <td><label>Email:</label></td>
    </tr>
    <tr>
      <td><input name="email" type="text" id="email" maxlength="128" class="input"></td>
    </tr>
    <tr>
      <td><label>Comments:</label></td>
    </tr>
    <tr>
      <td><textarea name="comments" cols="50" rows="5" id="comments" class="input"></textarea></td>
    </tr>
    <tr>
      <td align="center"><label>
        <input type="reset" name="reset" id="reset" value="Reset">
      </label>
      <label>
      <input type="submit" name="submit" id="submit" value="Submit">
      </label></td>
    </tr>
  </table>
</form>

Step 2) Create a PHP form processing script

Now that we have a page with a form on it we need to create the PHP processing script. Open a text editor like Notepad or website editor like Dreamweaver and paste the code below into it.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Require that data was posted
if($_SERVER['REQUEST_METHOD']!='POST') {
	// Give the user an error message
	die('The request sent was invalid. Please try again.');
} else { // Data was posted, process it
	// If the name field is not empty, clean the user entered data
	if (isset($_POST['name'])) {$name = clean($_POST['name']);}
	// If the email field is not empty, clean the user entered data
	if (isset($_POST['email'])) {$email = clean($_POST['email']);}
	// If the comments field is not empty, clean the user entered data
	if (isset($_POST['comments'])) {$comments = clean($_POST['comments']);}
 
	// Set the email address you want to receive the email
	$to = "info@domain.com";
	// On Yahoo! the from email has to be from your domain
	// On another server you may want to use $email insteads
	$from = "info@domain.com"
	// Set the subject of the email
	$subject = "Contact Form Submission";
	// Grab the users IP address
	$ip = $_SERVER['REMOTE_ADDR'];
	// Grab the users host
	$hostaddress = gethostbyaddr($ip);
	// Grab the users browser (user agent)
	$browser = $_SERVER['HTTP_USER_AGENT'];
	// Create the HTML email to be sent
	$email_message = "<strong>Name:</strong> $name<br />\n"
	."<strong>Email:</strong> $email<br />\n"
	."<strong>Comments:</strong> $comments<br /><br />\n"
	."<strong>IP Address:</strong> $ip<br />\n"
	."<strong>Host:</strong> $hostaddress<br />\n"
	."<strong>Browser:</strong> $browser";
	// Call the send HTML email function
	sendHTMLemail($email_message,$from,$to,$subject);
	// We're done! Send the user to the thank you page
	header('Location: http://www.domain.com/thank-you.html');
}
// Clean all user entered data
function clean($string) {
  $string = stripslashes($string); 
  $string = htmlentities($string); 
  $string = strip_tags($string); 
  return $string; 
}
// Send a HTML formatted email
function sendHTMLemail($email_message,$from,$email,$subject) {
    $headers = "From: $from\r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $boundary = uniqid("HTMLEMAIL");
    $headers .= "Content-Type: multipart/alternative;".
                "boundary = $boundary\r\n\r\n";
    $headers .= "This is a MIME encoded message.\r\n\r\n"; 
    $headers .= "--$boundary\r\n".
                "Content-Type: text/plain; charset=ISO-8859-1\r\n".
                "Content-Transfer-Encoding: base64\r\n\r\n"; 
    $headers .= chunk_split(base64_encode(strip_tags($email_message))); 
    $headers .= "--$boundary\r\n".
                "Content-Type: text/html; charset=ISO-8859-1\r\n".
                "Content-Transfer-Encoding: base64\r\n\r\n"; 
    $headers .= chunk_split(base64_encode($email_message)); 
    mail($email,$subject,"",$headers);
}

Now you will need to edit the following lines of the script using your corresponding information. On line 15 enter the email address that you want the form to be sent to. If you are placing the PHP script on your Yahoo! hosting you will need to use the same email address on line 18. If you are using another server for hosting you may want to the the variable “$email” instead. On line 20 you can edit the subject of the email that will be sent. On line 37 you will need to enter the location of the thank you page or the page where you would like users to be redirected to after submitting the form. Once you are done editing the script you will need to save the file as “contact.php” and upload the file to the location you place within the “action” of the contact form. Thats it!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
no comment

Security updates to Pro-Forma!

Posted By: admin  Published in Uncategorized

25

Jan

Does your Yahoo! Store use the Pro-Forma CGI script? If so, there may be a few changes you will need to make in order to preserve the functionality of the pro-forma CGI script.

Effective 01/24/2008, security updates to the pro-forma script require merchants to use a new form tag, maintain a list of approved email recipients for form submissions, and host their confirmation (thankyou-URL) and continue (continue-URL) pages within their store domain.

If forms do not use the approved format for pro-forma functionality, you may not receive submissions of these forms.

You can find out how to implement the “approved format” into your Yahoo! Store by reviewing the Yahoo! Small Business help.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
no comment

Yahoo! planning layoffs?

Posted By: admin  Published in Uncategorized

23

Jan

Could Yahoo! have plans to layoff some of it’s employees in the near future? If they do, how will that affect the Yahoo! Store e-commerce platform, if at all?

CNN Article - Yahoo! reportedly plans layoffs

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
no comment

Easy detailed image popup

Posted By: admin  Published in Uncategorized

23

Jan

The creation of this item image click to enlarge popup window requires three quick and easy steps:

Step 1) Create a raw-html page.

Once within the Yahoo Store editor click on the contents button located on the store editor toolbar. This will take you to your contents page, that lists all of the pages, items, links, etc. within your store (unless the page, item, etc. have been placed within the store editor clipboard.). On this contents page you will need to click on the new button, which will take you to a page where you may enter a name and type for the page you are creating. For this example, enter “view-image” for the name and select “raw-html” as the type, then press submit. You should be taken directly to the page you just created, on this page press the edit button and paste the following code into the html field, and press update.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<p align="center"> 
    <small><a href="javascript:self.close();">Close Window</a></small> 
    <a href="javascript:self.close();"> 
    <script type="text/javascript">    
	i = window.location.href.indexOf("?") + 1;  
	imgsrc = window.location.href.substring(i,255);  
	document.write(\'<img src="\' + imgsrc + \'" name="resizeMe">\');  
    </script> 
    </a> 
    <small><a href="javascript:self.close();">Close Window</a></small>
 
<script type="text/javascript">    
function imgResize() {  
	if (document.resizeMe && document.resizeMe.complete) {  
		w = document.resizeMe.width + 55;  
		h = document.resizeMe.height + 150;  
		window.resizeTo(w, h);  
	}  
}  
</script>

Step 2) Place JavaScript within the Head-tags field

After completing step 1, you will need to goto the store editor variables page by clicking on the variables button within the store editor toolbar. When the variables page has finished loading place the following code within the head-tags field and press the update button.

1
2
3
4
5
6
7
8
9
<script type="text/javascript">    
function popup(url) {  
	newwindow=window.open(url,\'name\',\'height=350,width=350,toolbar=no, \  
	location=no,directories=no,status=no,menubar=no, \  
	scrollbars=yes,resizable=yes\');  
	if (window.focus) {newwindow.focus()}  
	return false;  
}  
</script>

Step 3) Edit the image RTML template

To edit the image RTML template click on the templates button within the store editor toolbar. Then, click on the “image.” template link located within the built-in templates column. Then, click on the copy template button and enter a new template id, for example: “popup-image” and then press the copy button. Now, use the store editor to replace this RTML code:

1
2
3
4
TAG-WHEN tag STRING-APPEND 
                         "a href=\"" 
                         IMAGE-REF image 
                         "\""

With this RTML code:

1
2
3
4
TAG-WHEN tag STRING-APPEND 
                         "a href=javascript:popup('view-image.html?" 
                         IMAGE-REF image 
                         "')"

If have followed all of the steps correctly, your item images should now open a popup window when clicked upon.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
no comment

Categories

  • Uncategorized

Archives

  • February 2008
  • January 2008

Blogroll

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Planet
July 2009
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Meta

  • Register
  • Login
  • Main Entries Rss
  • Comments Rss
  • XFN Network
  • Wordpress

Recent Entries

  • Microsoft bids to buy Yahoo!
  • How to create a PHP contact form
  • Security updates to Pro-Forma!
  • Yahoo! planning layoffs?
  • Easy detailed image popup

Recent Comments

  • Keine Kommentare vorhanden.

Wpthemesplugin.com

Edit this in the footer

Theme By London Venues & supported by Texas Driver Education.

Valid XHTML | Valid CSS 3.0