<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>Sticky comment forms for sNews</title>
<link>http://www.mdj.us/</link>
<description>Make your snews comment form sticky with this mod, allow your users to save their name and url info.</description>
<language>en</language>
<item>
<title>Matt</title>
<description></description>
<link>http://www.mdj.us/snews-cms/hacks-mods/sticky-comment-forms-for-snews/#comment-649</link>
<pubDate>Thu, 12 Nov 2009 12:40:20 +0000</pubDate>
<content:encoded><![CDATA[Hi Kreatur, that's easy, in the first step, find this;<br />
$cookie = base64_encode($name.'|'.$url);<br />
<br />
and change it to this;<br />
$cemail = cleanXSS($_POST['email']);<br />
$cookie = base64_encode($name.'|'.$url.'|'.$cemail);<br />
<br />
then add the highlighted email lines in the second part;<br />
<br />
        if($_SESSION[_SITE.'comment']['fail'] == true) {<br />
            $name = $_SESSION[_SITE.'comment']['name'];<br />
            $comment = $_SESSION[_SITE.'comment']['comment'];<br />
            $url = $_SESSION[_SITE.'comment']['url'];<br />
            &lt;span class=&quot;highlight&quot;&gt;$cemail = $_SESSION[_SITE.'comment']['email'];&lt;/span&gt;<br />
            unset($_SESSION[_SITE.'comment']);<br />
        } elseif (isset($_COOKIE['cinfo'])){<br />
            $comment_info = base64_decode($_COOKIE['cinfo']);<br />
            $bits = explode('|',$comment_info);<br />
            $name = cleanXSS($bits['0']);<br />
            $url = cleanXSS($bits['1']);<br />
            &lt;span class=&quot;highlight&quot;&gt;$cemail = cleanXSS($bits['2']);&lt;/span&gt;<br />
            $remember_me = &quot;ok&quot;;<br />
        } else {<br />
            $url = $name = $comment = '';<br />
        }<br />
<br />
 lastly, change the email field to this;<br />
 <br />
         echo html_input('text', 'email', 'email', &lt;span class=&quot;highlight&quot;&gt;$cemail&lt;/span&gt;, l('cemail'), 'text', '', '', '', '', '', '', '', '', '');]]></content:encoded>
</item>
<item>
<title>Kreatur</title>
<description></description>
<link>http://www.mdj.us/snews-cms/hacks-mods/sticky-comment-forms-for-snews/#comment-648</link>
<pubDate>Thu, 12 Nov 2009 12:28:42 +0000</pubDate>
<content:encoded><![CDATA[So, how about remembering the e-mail? Can you please give the the modifications?]]></content:encoded>
</item>
<item>
<title>Sven - Philippe</title>
<description></description>
<link>http://www.mdj.us/snews-cms/hacks-mods/sticky-comment-forms-for-snews/#comment-619</link>
<pubDate>Thu, 05 Nov 2009 16:42:41 +0000</pubDate>
<content:encoded><![CDATA[Yeap! That was it.<br />
Thanks again Mat.<br />
And 5 stars for this Mod.<br />
Hip hip hip...]]></content:encoded>
</item>
<item>
<title>Matt</title>
<description></description>
<link>http://www.mdj.us/snews-cms/hacks-mods/sticky-comment-forms-for-snews/#comment-618</link>
<pubDate>Thu, 05 Nov 2009 15:58:44 +0000</pubDate>
<content:encoded><![CDATA[Ahhh... I think I see the problem, empty value in the remember_me box, try this block instead...<br />
<br />
if ($remember_me == 'ok') {$checked='checked=&quot;checked&quot;';}<br />
echo '<br />
&lt;div class=&quot;commentsbox&quot;&gt;&lt;h2&gt;', l('addcomment') ,'&lt;/h2&gt;<br />
&lt;p&gt;', l('required') ,'&lt;/p&gt;<br />
&lt;form method=&quot;post&quot; action=&quot;', _SITE ,'&quot; id=&quot;post&quot; accept-charset=&quot;UTF-8&quot;&gt;<br />
&lt;p&gt;&lt;label for=&quot;name&quot;&gt;* ', l('name') ,'&lt;/label&gt;:&lt;br /&gt;<br />
&lt;input type=&quot;text&quot; name=&quot;name&quot; id=&quot;name&quot; class=&quot;text&quot; value=&quot;', $name ,'&quot; /&gt;&lt;/p&gt;<br />
&lt;p&gt;&lt;label for=&quot;url&quot;&gt;', l('url') ,'&lt;/label&gt;:&lt;br /&gt;<br />
&lt;input type=&quot;text&quot; name=&quot;url&quot; id=&quot;url&quot; class=&quot;text&quot; value=&quot;',$url,'&quot; /&gt;&lt;/p&gt;<br />
&lt;p&gt;&lt;input name=&quot;remember_me&quot; id=&quot;remember_me&quot; value=&quot;yes&quot; ',$checked,' type=&quot;checkbox&quot;&gt; &lt;label for=&quot;remember_me&quot;&gt;', l('comment_remember') ,'&lt;/label&gt;&lt;/p&gt;<br />
&lt;p&gt;&lt;label for=&quot;text&quot;&gt;* ', l('comment') ,'&lt;/label&gt;:&lt;br /&gt;<br />
&lt;textarea name=&quot;text&quot; rows=&quot;5&quot; cols=&quot;5&quot; id=&quot;text&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;<br />
',  mathCaptcha() , '<br />
 &lt;p&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;category&quot; id=&quot;category&quot; value=&quot;', $categorySEF ,'&quot; /&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;id&quot; id=&quot;id&quot; value=&quot;', $_ID ,'&quot; /&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;article&quot; id=&quot;article&quot; value=&quot;', $art_value ,'&quot; /&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;commentspage&quot; id=&quot;commentspage&quot; value=&quot;', $back_to_page ,'&quot; /&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;ip&quot; id=&quot;ip&quot; value=&quot;', $_SERVER['REMOTE_ADDR'] ,'&quot; /&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;time&quot; id=&quot;time&quot; value=&quot;', time() ,'&quot; /&gt;<br />
&lt;input type=&quot;submit&quot; name=&quot;comment&quot; id=&quot;comment&quot; class=&quot;button&quot; value=&quot;', l('submit') ,'&quot; /&gt;<br />
&lt;/p&gt;<br />
&lt;/form&gt;<br />
&lt;/div&gt;';]]></content:encoded>
</item>
<item>
<title>Matt</title>
<description></description>
<link>http://www.mdj.us/snews-cms/hacks-mods/sticky-comment-forms-for-snews/#comment-617</link>
<pubDate>Thu, 05 Nov 2009 15:51:58 +0000</pubDate>
<content:encoded><![CDATA[Sven, did you add the code to set the cookie? I posted a test comment and it didn't set the cookie.]]></content:encoded>
</item>
<item>
<title>Sven - Philippe</title>
<description></description>
<link>http://www.mdj.us/snews-cms/hacks-mods/sticky-comment-forms-for-snews/#comment-616</link>
<pubDate>Thu, 05 Nov 2009 15:38:35 +0000</pubDate>
<content:encoded><![CDATA[It works fine... it works fine... locally.<br />
On line it fails.<br />
Can you post some comments to try:<br />
<a href="http://on-air.hiseo.fr/fatras/svg-et-html5/" rel="nofollow">http://on-air.hiseo.fr/fatras/svg-et-html5/</a><br />
Weirdo. -)]]></content:encoded>
</item>
<item>
<title>Sven - Philippe</title>
<description></description>
<link>http://www.mdj.us/snews-cms/hacks-mods/sticky-comment-forms-for-snews/#comment-613</link>
<pubDate>Wed, 04 Nov 2009 14:20:46 +0000</pubDate>
<content:encoded><![CDATA[You think and you're right pal!<br />
I think and I'm allways wrong.-D<br />
<br />
It just works fine.<br />
Thanks a lot Matt.]]></content:encoded>
</item>
<item>
<title>Matt</title>
<description></description>
<link>http://www.mdj.us/snews-cms/hacks-mods/sticky-comment-forms-for-snews/#comment-609</link>
<pubDate>Wed, 04 Nov 2009 12:48:48 +0000</pubDate>
<content:encoded><![CDATA[hmmmmmm, not tested, but I think this is what you're looking for Sven.<br />
<br />
<br />
echo '<br />
&lt;div class=&quot;commentsbox&quot;&gt;&lt;h2&gt;', l('addcomment') ,'&lt;/h2&gt;<br />
&lt;p&gt;', l('required') ,'&lt;/p&gt;<br />
&lt;form method=&quot;post&quot; action=&quot;', _SITE ,'&quot; id=&quot;post&quot; accept-charset=&quot;UTF-8&quot;&gt;<br />
&lt;p&gt;&lt;label for=&quot;name&quot;&gt;* ', l('name') ,'&lt;/label&gt;:&lt;br /&gt;<br />
&lt;input type=&quot;text&quot; name=&quot;name&quot; id=&quot;name&quot; class=&quot;text&quot; value=&quot;', $name ,'&quot; /&gt;&lt;/p&gt;<br />
&lt;p&gt;&lt;label for=&quot;url&quot;&gt;', l('url') ,'&lt;/label&gt;:&lt;br /&gt;<br />
&lt;input type=&quot;text&quot; name=&quot;url&quot; id=&quot;url&quot; class=&quot;text&quot; value=&quot;',$url,'&quot; /&gt;&lt;/p&gt;<br />
&lt;p&gt;&lt;input name=&quot;remember_me&quot; id=&quot;remember_me&quot; value=&quot;',$remember_me,'&quot; checked=&quot;checked&quot; type=&quot;checkbox&quot;&gt; &lt;label for=&quot;remember_me&quot;&gt;', l('comment_remember') ,'&lt;/label&gt;&lt;/p&gt;<br />
&lt;p&gt;&lt;label for=&quot;text&quot;&gt;* ', l('comment') ,'&lt;/label&gt;:&lt;br /&gt;<br />
&lt;textarea name=&quot;text&quot; rows=&quot;5&quot; cols=&quot;5&quot; id=&quot;text&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;<br />
',  mathCaptcha() , '<br />
 &lt;p&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;category&quot; id=&quot;category&quot; value=&quot;', $categorySEF ,'&quot; /&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;id&quot; id=&quot;id&quot; value=&quot;', $_ID ,'&quot; /&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;article&quot; id=&quot;article&quot; value=&quot;', $art_value ,'&quot; /&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;commentspage&quot; id=&quot;commentspage&quot; value=&quot;', $back_to_page ,'&quot; /&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;ip&quot; id=&quot;ip&quot; value=&quot;', $_SERVER['REMOTE_ADDR'] ,'&quot; /&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;time&quot; id=&quot;time&quot; value=&quot;', time() ,'&quot; /&gt;<br />
&lt;input type=&quot;submit&quot; name=&quot;comment&quot; id=&quot;comment&quot; class=&quot;button&quot; value=&quot;', l('submit') ,'&quot; /&gt;<br />
&lt;/p&gt;<br />
&lt;/form&gt;<br />
&lt;/div&gt;';]]></content:encoded>
</item>
<item>
<title>Sven - Philippe</title>
<description></description>
<link>http://www.mdj.us/snews-cms/hacks-mods/sticky-comment-forms-for-snews/#comment-606</link>
<pubDate>Wed, 04 Nov 2009 11:28:45 +0000</pubDate>
<content:encoded><![CDATA[Hi Matt, I've been scratching my head to adapt this Mod to the comments form function in sNews.<br />
Since I've changed it to shorten it (see <a href="http://snewscms.com/forum/index.php?topic=8391.msg61890#msg61890" rel="nofollow">http://snewscms.com/forum/index.php?topic=8391.msg61890#msg61890</a> for code],<br />
I didn't find how to have this code in it the html echo.<br />
<br />
If you have a minute... ;-)]]></content:encoded>
</item>
<item>
<title>asundrus</title>
<description></description>
<link>http://www.mdj.us/snews-cms/hacks-mods/sticky-comment-forms-for-snews/#comment-332</link>
<pubDate>Tue, 28 Apr 2009 13:34:53 +0000</pubDate>
<content:encoded><![CDATA[Another mod added to my page, thanks again.]]></content:encoded>
</item>
</channel>
</rss>

