<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Thoughts On Teaching &#187; css</title>
	<atom:link href="http://www.toddseal.com/rodin/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.toddseal.com/rodin</link>
	<description>Challenge The Status Quo</description>
	<lastBuildDate>Fri, 02 Dec 2011 03:08:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Grammar With CSS</title>
		<link>http://www.toddseal.com/rodin/2006/04/grammar-with-css/</link>
		<comments>http://www.toddseal.com/rodin/2006/04/grammar-with-css/#comments</comments>
		<pubDate>Mon, 03 Apr 2006 23:56:20 +0000</pubDate>
		<dc:creator>Todd</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[educational-technology]]></category>
		<category><![CDATA[grammar]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.toddseal.com/rodin/2006/04/grammar-with-css/</guid>
		<description><![CDATA[Here&#8217;s the example: Punctuation and Capitalization Practice I&#8217;ve typed something into a text file (saved as &#8220;text.txt&#8221;). I want the contents of that file as a variable in a PHP script so I can do some STR_REPLACE action to it, specifically so I can wrap all punctuation in SPAN tags. Surely, you can help me. [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the example:<br />
<a href="http://www.toddseal.com/rodin/grammar/maindemo.phtml">Punctuation and Capitalization Practice</a><br />
I&#8217;ve typed something into a text file (saved as &#8220;text.txt&#8221;). I want the contents of that file as a variable in a PHP script so I can do some STR_REPLACE action to it, specifically so I can wrap all punctuation in SPAN tags. Surely, you can help me. Though I may stumble across the solution in a few days, you know how to do it now. Leave me a <a href="#response">comment</a> and tell me how.</p>
<h4>But Why??</h4>
<p>If we use a little bit of CSS, any paragraph can easily be stripped of all capitalization and all punctuation with the click of a button. And it can all be added back again, just as easily. Oh, and teachers would only have to type out the paragraph a single time, correctly.</p>
<p>I started thinking about the times we teachers put our students through grammar exercises like this: here&#8217;s a paragraph without any punctuation or capitalization; correct it. The thought is that this builds an awareness of the importance of punctuation. The typical example is something like, &#8220;wake up tom jones is at the door&#8221; where the meaning of the sentence changes significantly depending on where you put the comma (is Tom Jones at the door? Am I waking Tom because Jones is here?). Actually, I&#8217;ve never seen that example before, but it works to illustrate the point.</p>
<p>I think this exercise could be a good reminder to many students, not just the English Language Learner (ELL) students that are frequently subjected to this kind of assignment. If it&#8217;s easy for the teacher to put in place, why not add it to the ever-growing bag-of-tricks, eh? And if it&#8217;s really easy, I could type up (or copy and past) a few paragraphs from the current reading and use that as the basic text for the exercise, thereby moving students along in their reading and giving them practice at the same time.</p>
<p>There&#8217;s <a href="http://grammar.ccc.commnet.edu/grammar/quizzes/punct4_quiz.htm">another site</a> that does something similar to what I want. But what I want doesn&#8217;t involve javascript, forms, or text boxes, although it could on the teacher administration side of things. No. What I want is easily customized. What I want is a very simple page, listing a few different paragraphs for practicing punctuation and capitalization. What I want might have a textbox for students to type their response, but it just as easily might not. And what I want to do uses CSS to do things for us.</p>
<p>Here&#8217;s the idea in a nutshell: you type out your paragraph and apply &#8220;text-transform: lowercase;&#8221; to take care of all capitalization within a paragraph. Then, by wrapping all punctuation in SPAN tags, use &#8220;display: none;&#8221; to hide all punctuation.</p>
<p>What I need your help with is a way to build a script that will open up my text (saved as &#8220;text.txt&#8221;) and run it through a filter to add SPAN tags around all punctuation. I&#8217;ve got the <a href="http://us3.php.net/str_replace">ARRAYs built for all punctuation</a>, but I&#8217;m having trouble setting up the script to open up the TXT file, run it through, then display the text.</p>
<p>I&#8217;d just <a href="http://www.stuffandnonsense.co.uk/resources/iotbs.html">use a</a> <a href="http://www.alistapart.com/articles/bodyswitchers/">style switcher</a> to turn back on capitalization and punctuation to check answers. Here&#8217;s what I thought might have worked, but clearly does not:</p>
<p><code><br />
&lt;?php<br />
// open my file where I've carefully typed my original, punctuated, capitalized paragraph<br />
$text=@fopen("text.txt","r");</p>
<p>// an array of all punctuation marks I want to wrap in SPAN tags<br />
$punct = array('.', ',', '!', ';', '?', '"');<br />
$punctspan = array('<span>.</span>', '<span>,</span>', '<span>!</span>', '<span>;</span>', '<span>?</span>', '<span>\"</span>');</p>
<p>// find all punctuation and wrap those marks in SPAN tags for easy hiding later<br />
$newtext = str_replace($punct, $punctspan, $text);</p>
<p>// when I call up this script, it'll do all that and display the finished result<br />
echo $newtext;</p>
<p>?><br />
</code></p>
<p>I&#8217;m working on creating a list of all the little scripts I use to make my life much easier and this could make it onto that list. But only if you help me figure out how to get the script to parse the content of &#8220;text.txt,&#8221; run it through the STR_REPLACE function I have above, and spit out the resulting paragraph, with all punctuation wrapped in SPAN tags.</p>
<p>I&#8217;m sure it&#8217;s something really easy, really obvious, and even something working in another script I use all the time. Looking around everything that I have running is on the agenda for tonight, but maybe you can help me get there quicker.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.toddseal.com/rodin/2006/06/standard-usage/" rel="bookmark" title="June 1, 2006">Standard Usage</a></li>
<li><a href="http://www.toddseal.com/rodin/2005/05/too-much-tech/" rel="bookmark" title="May 25, 2005">Too Much Tech!?</a></li>
<li><a href="http://www.toddseal.com/rodin/2007/10/tell-a-student/" rel="bookmark" title="October 9, 2007">Tell-A-Student</a></li>
<li><a href="http://www.toddseal.com/rodin/2006/05/less-is-more/" rel="bookmark" title="May 18, 2006">Less Is More</a></li>
<li><a href="http://www.toddseal.com/rodin/2007/04/video-editing-on-older-macs/" rel="bookmark" title="April 24, 2007">Video Editing On Older Macs</a></li>
</ul>
<p><!-- Similar Posts took 8.609 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.toddseal.com/rodin/2006/04/grammar-with-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

