<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Building a Website with MODx for Newbies &#8211; Part 5: Introducing Snippets</title>
	<atom:link href="http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/</link>
	<description>Programming blog - Discussions, Tutorials, Resources</description>
	<lastBuildDate>Fri, 03 Sep 2010 08:16:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: sharad</title>
		<link>http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/comment-page-1/#comment-9654</link>
		<dc:creator>sharad</dc:creator>
		<pubDate>Wed, 11 Aug 2010 05:14:14 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=574#comment-9654</guid>
		<description>hi,

I have made a snippet to enter data in modx database ...in the same snippet i call the eform snippet one by one to send emails to different people also...here is the code that I am using:
CODE:
function save(&amp;$fields){

	global $modx;
	$tableArray = array();

	// Initialize the DB Columns Array

	$tableArray[&#039;name&#039;] = $modx-&gt;db-&gt;escape($fields[&#039;name&#039;]); 
	$tableArray[&#039;email&#039;] = $modx-&gt;db-&gt;escape($fields[&#039;email&#039;]); 
	$tableArray[&#039;mobile&#039;] = $modx-&gt;db-&gt;escape($fields[&#039;mobile&#039;]); 
	$tableArray[&#039;message&#039;] = $modx-&gt;db-&gt;escape($fields[&#039;message&#039;]; 
	$tableArray[&#039;eventurl&#039;] = $modx-&gt;db-&gt;escape($fields[&#039;eventurl&#039;]); 
	$tableArray[&#039;keyword&#039;] = $modx-&gt;db-&gt;escape($fields[&#039;keyword&#039;]); 
	$tableArray[&#039;ememmail&#039;] = $modx-&gt;db-&gt;escape($fields[&#039;ememmail&#039;]); 

	for($count = 1; $count db-&gt;escape($fields[&#039;ref&#039;. $count .&#039;name&#039;]); 
		$tableArray[&#039;ref&#039;. $count .&#039;email&#039;] = $modx-&gt;db-&gt;escape($fields[&#039;ref&#039;. $count .&#039;email&#039;]); 
		$tableArray[&#039;ref&#039;. $count .&#039;mobile&#039;] = $modx-&gt;db-&gt;escape($fields[&#039;ref&#039;. $count .&#039;mobile&#039;]); 
	}
		$dbQuery = $modx-&gt;db-&gt;insert($tableArray, &#039;temp_swastika&#039;);
Till this step form details are saved in the database ...now i call eform snippet to send emails
CODE:
$params = array();
	$params[&#039;to&#039;] = $modx-&gt;db-&gt;escape($fields[&#039;ememmail&#039;]);
	$params[&#039;subject&#039;] = &#039;MobiVite Enquiry : For&#039; . $fields[&#039;keyword&#039;];
	$params[&#039;report&#039;] = &#039;swastika_enquiry_email_manager&#039;;
	$params[&#039;formid&#039;] = &#039;enquiryform&#039;;
	$params[&#039;tpl&#039;] = &#039;swastika_enquiry_form_chunk&#039;;
	$params[&#039;fromname&#039;] = &#039;Mobivite&#039;;
	$params[&#039;from&#039;] = &#039;info@mobivite.in&#039;;
	$params[&#039;replyto&#039;] = $fields[&#039;ememmail&#039;];
	$modx-&gt;runSnippet(&#039;eForm&#039;, $params);
	unset($params);




this snippet is perfectly getting called but the next snippet call is just not happening
. The following snippet call is not executing .(don&#039;t know why)
CODE:
$paramseq = array();
	$paramseq[&#039;to&#039;] = $fields[&#039;name&#039;];
	$paramseq[&#039;subject&#039;] = &#039;My MobiVite Enquiry and references: For &#039; . $fields[&#039;keyword&#039;];
	$paramseq[&#039;report&#039;] = &#039;swastika_enquiry_email_enquirer&#039;;
	$paramseq[&#039;formid&#039;] = &#039;enquiryform&#039;;
	$paramseq[&#039;tpl&#039;] = &#039;swastika_enquiry_form_chunk&#039;;
	$paramseq[&#039;fromname&#039;] = &#039;Mobivite&#039;;
	$paramseq[&#039;from&#039;] = &#039;info@mobivite.in&#039;;
	$paramseq[&#039;replyto&#039;] = $fields[&#039;ememmail&#039;];
	$modx-&gt;runSnippet(&#039;eForm&#039;, $paramseq);
	unset($paramseq);

	return true;
}



?&gt;

Please help........</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>I have made a snippet to enter data in modx database &#8230;in the same snippet i call the eform snippet one by one to send emails to different people also&#8230;here is the code that I am using:<br />
CODE:<br />
function save(&amp;$fields){</p>
<p>	global $modx;<br />
	$tableArray = array();</p>
<p>	// Initialize the DB Columns Array</p>
<p>	$tableArray['name'] = $modx-&gt;db-&gt;escape($fields['name']);<br />
	$tableArray['email'] = $modx-&gt;db-&gt;escape($fields['email']);<br />
	$tableArray['mobile'] = $modx-&gt;db-&gt;escape($fields['mobile']);<br />
	$tableArray['message'] = $modx-&gt;db-&gt;escape($fields['message'];<br />
	$tableArray['eventurl'] = $modx-&gt;db-&gt;escape($fields['eventurl']);<br />
	$tableArray['keyword'] = $modx-&gt;db-&gt;escape($fields['keyword']);<br />
	$tableArray['ememmail'] = $modx-&gt;db-&gt;escape($fields['ememmail']); </p>
<p>	for($count = 1; $count db-&gt;escape($fields['ref'. $count .'name']);<br />
		$tableArray['ref'. $count .'email'] = $modx-&gt;db-&gt;escape($fields['ref'. $count .'email']);<br />
		$tableArray['ref'. $count .'mobile'] = $modx-&gt;db-&gt;escape($fields['ref'. $count .'mobile']);<br />
	}<br />
		$dbQuery = $modx-&gt;db-&gt;insert($tableArray, &#8216;temp_swastika&#8217;);<br />
Till this step form details are saved in the database &#8230;now i call eform snippet to send emails<br />
CODE:<br />
$params = array();<br />
	$params['to'] = $modx-&gt;db-&gt;escape($fields['ememmail']);<br />
	$params['subject'] = &#8216;MobiVite Enquiry : For&#8217; . $fields['keyword'];<br />
	$params['report'] = &#8217;swastika_enquiry_email_manager&#8217;;<br />
	$params['formid'] = &#8216;enquiryform&#8217;;<br />
	$params['tpl'] = &#8217;swastika_enquiry_form_chunk&#8217;;<br />
	$params['fromname'] = &#8216;Mobivite&#8217;;<br />
	$params['from'] = &#8216;info@mobivite.in&#8217;;<br />
	$params['replyto'] = $fields['ememmail'];<br />
	$modx-&gt;runSnippet(&#8217;eForm&#8217;, $params);<br />
	unset($params);</p>
<p>this snippet is perfectly getting called but the next snippet call is just not happening<br />
. The following snippet call is not executing .(don&#8217;t know why)<br />
CODE:<br />
$paramseq = array();<br />
	$paramseq['to'] = $fields['name'];<br />
	$paramseq['subject'] = &#8216;My MobiVite Enquiry and references: For &#8216; . $fields['keyword'];<br />
	$paramseq['report'] = &#8217;swastika_enquiry_email_enquirer&#8217;;<br />
	$paramseq['formid'] = &#8216;enquiryform&#8217;;<br />
	$paramseq['tpl'] = &#8217;swastika_enquiry_form_chunk&#8217;;<br />
	$paramseq['fromname'] = &#8216;Mobivite&#8217;;<br />
	$paramseq['from'] = &#8216;info@mobivite.in&#8217;;<br />
	$paramseq['replyto'] = $fields['ememmail'];<br />
	$modx-&gt;runSnippet(&#8217;eForm&#8217;, $paramseq);<br />
	unset($paramseq);</p>
<p>	return true;<br />
}</p>
<p>?&gt;</p>
<p>Please help&#8230;&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yusuf</title>
		<link>http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/comment-page-1/#comment-9580</link>
		<dc:creator>Yusuf</dc:creator>
		<pubDate>Tue, 20 Jul 2010 21:50:28 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=574#comment-9580</guid>
		<description>Thanks for this tutorial.</description>
		<content:encoded><![CDATA[<p>Thanks for this tutorial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: YJ</title>
		<link>http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/comment-page-1/#comment-9568</link>
		<dc:creator>YJ</dc:creator>
		<pubDate>Sun, 18 Jul 2010 06:26:04 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=574#comment-9568</guid>
		<description>Again, making what could be complicated - simple. Thanks Mary!</description>
		<content:encoded><![CDATA[<p>Again, making what could be complicated &#8211; simple. Thanks Mary!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Irshad</title>
		<link>http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/comment-page-1/#comment-9527</link>
		<dc:creator>Irshad</dc:creator>
		<pubDate>Sat, 03 Jul 2010 07:11:39 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=574#comment-9527</guid>
		<description>I’ve followed this tutorial up to the snippets portion using my own template instead of the swansong one and everything has gone smoothly up to this point except for the menu doesn’t link to the pages created it goes back to the home page everytime. What did I do wrong?</description>
		<content:encoded><![CDATA[<p>I’ve followed this tutorial up to the snippets portion using my own template instead of the swansong one and everything has gone smoothly up to this point except for the menu doesn’t link to the pages created it goes back to the home page everytime. What did I do wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pekka</title>
		<link>http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/comment-page-1/#comment-9212</link>
		<dc:creator>Pekka</dc:creator>
		<pubDate>Wed, 31 Mar 2010 20:05:44 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=574#comment-9212</guid>
		<description>Thanks a lot!

Your site and advices are superb! I investigated your link and then searched that basic drop menus original css-code. A little bit modification and voila! its working. 

And I found an other excellent page: http://ago.tanfa.co.uk/css/index.html

Combining information of those sites I finally got that menu working.

You MODx tutorial is very good. I have been making basic web-sites with html and css many years. Now I needed system, that can be updated without programming skills.  I have earlier tried to get idea of MODx, but didn&#039;t understand  properly. In January this year I started working with it again and found your place. It saved my nerves and marriage :D.  

Thanks! 
Pekka</description>
		<content:encoded><![CDATA[<p>Thanks a lot!</p>
<p>Your site and advices are superb! I investigated your link and then searched that basic drop menus original css-code. A little bit modification and voila! its working. </p>
<p>And I found an other excellent page: <a href="http://ago.tanfa.co.uk/css/index.html" >http://ago.tanfa.co.uk/css/index.html</a></p>
<p>Combining information of those sites I finally got that menu working.</p>
<p>You MODx tutorial is very good. I have been making basic web-sites with html and css many years. Now I needed system, that can be updated without programming skills.  I have earlier tried to get idea of MODx, but didn&#8217;t understand  properly. In January this year I started working with it again and found your place. It saved my nerves and marriage <img src='http://codingpad.maryspad.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .  </p>
<p>Thanks!<br />
Pekka</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mary</title>
		<link>http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/comment-page-1/#comment-9210</link>
		<dc:creator>mary</dc:creator>
		<pubDate>Wed, 31 Mar 2010 12:57:51 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=574#comment-9210</guid>
		<description>Pekka
Take a look at the link to the Wayfinder developer&#039;s website. There are some example dropdown menus there with code, should give you a good start.  The link is &lt;a href=&quot;http://www.muddydogpaws.com/development/wayfinder/examples/&quot;&gt;http://www.muddydogpaws.com/development/wayfinder/examples/&lt;/a&gt;

mary</description>
		<content:encoded><![CDATA[<p>Pekka<br />
Take a look at the link to the Wayfinder developer&#8217;s website. There are some example dropdown menus there with code, should give you a good start.  The link is <a href="http://www.muddydogpaws.com/development/wayfinder/examples/">http://www.muddydogpaws.com/development/wayfinder/examples/</a></p>
<p>mary</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mary</title>
		<link>http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/comment-page-1/#comment-9208</link>
		<dc:creator>mary</dc:creator>
		<pubDate>Tue, 30 Mar 2010 20:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=574#comment-9208</guid>
		<description>thanks for the feedback. time is an issue... if I have it I will update :)

I did do a screencast on the differences between 0.9.6.3 and 1.0.2 and recommend that if you need to you watch that to get a good grasp on the differences

mary</description>
		<content:encoded><![CDATA[<p>thanks for the feedback. time is an issue&#8230; if I have it I will update <img src='http://codingpad.maryspad.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I did do a screencast on the differences between 0.9.6.3 and 1.0.2 and recommend that if you need to you watch that to get a good grasp on the differences</p>
<p>mary</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://codingpad.maryspad.com/2009/04/05/building-a-website-with-modx-for-newbies-part-5-introducing-snippets/comment-page-1/#comment-9207</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Tue, 30 Mar 2010 18:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://codingpad.maryspad.com/?p=574#comment-9207</guid>
		<description>still awesome.  might want to update screenshots, though.  I just started with 1.0.2, and there are a few navigational differences in the Manager, but no problems so far!

Thanks.</description>
		<content:encoded><![CDATA[<p>still awesome.  might want to update screenshots, though.  I just started with 1.0.2, and there are a few navigational differences in the Manager, but no problems so far!</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
