<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<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">
	<channel>
		<title>Gravity Support Forums Topic: poll</title>
		<link>https://legacy.forums.gravityhelp.com/topic/poll</link>
		<description>Gravity Support Forums Topic: poll</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 01:37:01 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/poll" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "poll"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/poll#post-71212</link>
			<pubDate>Wed, 15 Aug 2012 18:30:15 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">71212@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you for the update.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kerchmcc on "poll"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/poll#post-71205</link>
			<pubDate>Wed, 15 Aug 2012 17:13:08 +0000</pubDate>
			<dc:creator>kerchmcc</dc:creator>
			<guid isPermaLink="false">71205@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Chris&#60;br /&#62;
OK thanks for that.. It totally makes sense.&#60;br /&#62;
I have WP installed in almost all my sites in a directory different than the root. Never had this trouble before AND  I recently deleted/replace the original index.php which is included in the wp directory ... it had this line:&#60;br /&#62;
&#60;code&#62;require(&#38;#39;./wp-blog-header.php&#38;#39;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I was afraid that might be mucking up stuff as what controls the site (in the root directory) is:&#60;br /&#62;
&#60;code&#62;require(&#38;#39;./root/wp-blog-header.php&#38;#39;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;So I deleted the index.php that was in the wp directory.. and that screwed it all up.&#60;/p&#62;
&#60;p&#62;BTW, after our little chat (S) I replaced the wp index.php with a &#34;Silence is golden&#34; file.. and that made NONE of the previews show at all. &#60;/p&#62;
&#60;p&#62;THEREFORE, I think I am saying that when you copy the index.php to root and adjust for the folder, don't delete the index.php that came with the install.&#60;br /&#62;
I hope I haven't confused everyone.&#60;br /&#62;
But thanks for putting your finger on the problem.&#60;br /&#62;
I love this poll plug in.. It's great!!&#60;br /&#62;
Kerch
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "poll"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/poll#post-71186</link>
			<pubDate>Wed, 15 Aug 2012 14:46:47 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">71186@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It looks like your installation is missing the index.php file in the /website directory.  That's the reason the directory index is showing all your files.  This is related to having your WordPress URL and website URL different.  You can do that, but I'm unsure if you need to in your case.  The settings which control the location of the site and WordPress installation are at this URL for your server (replace example.com with your URL):&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://example.com/website/wp-admin/options-general.php&#34; rel=&#34;nofollow&#34;&#62;http://example.com/website/wp-admin/options-general.php&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You can find out more about giving WordPress its own directory here:&#60;br /&#62;
&#60;a href=&#34;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Fixing that will make the polls work.  However, to prevent your server from showing a listing of all files in a directory (for example, if someone loaded this URL for your domain:  &#60;a href=&#34;http://example.com/website/wp-content/plugins/broken-link-checker/&#34; rel=&#34;nofollow&#34;&#62;http://example.com/website/wp-content/plugins/broken-link-checker/&#60;/a&#62; they would see a listing of all files there) you need to add to your site's .htaccess file (or create one if there is not one already), this line:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;Options -Indexes&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That will suppress directory listings when there is no index file present.&#60;/p&#62;
&#60;p&#62;When there is an index.php file, depending on server configuration, that is normally loaded and you don't see a directory listing.  In your case, in the website folder, there is no index.php file.  That's why the directory listing is shown, and that's why the poll will not preview.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "poll"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/poll#post-71100</link>
			<pubDate>Wed, 15 Aug 2012 00:55:02 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">71100@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;What does this mean exactly?&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
 I'd see the entire index file of my wordpress install
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;If this is something sensitive, please email &#60;a href=&#34;mailto:chris@rocketgenius.com&#34;&#62;chris@rocketgenius.com&#60;/a&#62; with a URL where this can be seen, and reference this topic in your email.  Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>kerchmcc on "poll"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/poll#post-70994</link>
			<pubDate>Tue, 14 Aug 2012 11:07:57 +0000</pubDate>
			<dc:creator>kerchmcc</dc:creator>
			<guid isPermaLink="false">70994@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I was really excited yesterday when I found this.&#60;br /&#62;
The poll itself works great.. &#60;/p&#62;
&#60;p&#62;However, when I loaded it up and then previewed a new form, I'd see the entire index file of my wordpress install. YIKES. Did I do something wrong?&#60;br /&#62;
Didn't want to leave it up and post that info to the world.&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
kerch
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cinisli on "poll"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/poll#post-61691</link>
			<pubDate>Wed, 06 Jun 2012 17:20:48 +0000</pubDate>
			<dc:creator>cinisli</dc:creator>
			<guid isPermaLink="false">61691@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;and i just figure it out that after i put the code my other forms are not working aswell. i have error :&#60;/p&#62;
&#60;p&#62;There was a problem with your submission. Errors have been highlighted below.&#60;/p&#62;
&#60;p&#62;---&#60;/p&#62;
&#60;p&#62;one more time i am placing this code in functions php  :&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;/**
* Limit IP to One Submission Per Time Period
* &#60;a href=&#34;http://gravitywiz.com/2012/05/12/limit-ip-to-one-submission-per-time-period&#34; rel=&#34;nofollow&#34;&#62;http://gravitywiz.com/2012/05/12/limit-ip-to-one-submission-per-time-period&#60;/a&#62;
*/

$gws_limit_message = &#38;#39;Ayni IP 48 saat sonra bir daha oy verebilir.&#38;#39;;
$gws_limit_time = 172800; // must be specified in seconds; 86400 seconds is equal to 24 hours

// update the &#38;quot;5&#38;quot; to your form ID
add_action(&#38;#39;gform_pre_render_5&#38;#39;, &#38;#39;gform_limit_ip_submissions&#38;#39;);
function gform_limit_ip_submissions($form){
    global $gws_limit_message, $gws_limit_time;     

    if(!gform_has_ip_exceeded_limit($form, $gws_limit_time))
        return $form;

    $submission_info = rgar(GFFormDisplay::$submission, $form[&#38;#39;id&#38;#39;]);

    // if no submission, hide form
    // if submission and not valid, hide form
    if(!$submission_info &#124;&#124; !rgar($submission_info, &#38;#39;is_valid&#38;#39;)) {
        add_filter(&#38;#39;gform_get_form_filter&#38;#39;, create_function(&#38;#39;&#38;#39;, &#38;quot;return &#38;#39;&#38;lt;div class=\&#38;quot;limit-message\&#38;quot;&#38;gt;$gws_limit_message&#38;lt;/div&#38;gt;&#38;#39;;&#38;quot;) );
    }

    return $form;
}

add_filter(&#38;#39;gform_validation&#38;#39;, &#38;#39;gform_validate_limit_ip_submissions&#38;#39;);
function gform_validate_limit_ip_submissions($validation_result) {
    global $gws_limit_message, $gws_limit_time;

    if(gform_has_ip_exceeded_limit($validation_result[&#38;#39;form&#38;#39;], $gws_limit_time))
        $validation_result[&#38;#39;is_valid&#38;#39;] = false;

    return $validation_result;
}

function gform_has_ip_exceeded_limit($form, $limit_time) {
    global $wpdb;

    $current_ip = RGFormsModel::get_ip();
    $last_submission = $wpdb-&#38;gt;get_var($wpdb-&#38;gt;prepare(&#38;quot;SELECT date_created FROM {$wpdb-&#38;gt;prefix}rg_lead WHERE ip = %s and form_id = %d ORDER BY date_created DESC&#38;quot;, $current_ip, $form[&#38;#39;id&#38;#39;]));

    if(empty($last_submission))
        return true;

    $time_out = strtotime($last_submission) + $limit_time;
    $current_time = time();

    return $current_time &#38;gt; $time_out ? false : true;
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>cinisli on "poll"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/poll#post-61665</link>
			<pubDate>Wed, 06 Jun 2012 15:44:55 +0000</pubDate>
			<dc:creator>cinisli</dc:creator>
			<guid isPermaLink="false">61665@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I just place the code in my themes function php,  and change :&#60;/p&#62;
&#60;p&#62;Update $gws_limit_message to the message visitors should see when they have reached their submission limit.&#60;/p&#62;
&#60;p&#62;Update $gws_limit_time to the amount of time the user must wait until they can submit the WordPress form again. This time must be provided in seconds. (i made this 48 hours in sec)&#60;/p&#62;
&#60;p&#62;Update the 5 in the filter gform_pre_render_5 to your own form ID.&#60;/p&#62;
&#60;p&#62;Thats all. Now the code blocks all ips .
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "poll"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/poll#post-61659</link>
			<pubDate>Wed, 06 Jun 2012 15:03:34 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">61659@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Cinisli,&#60;/p&#62;
&#60;p&#62;What do you change between when the code was working and now? I tested the code provided in the link locally and it worked without an issue.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cinisli on "poll"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/poll#post-61652</link>
			<pubDate>Wed, 06 Jun 2012 14:30:54 +0000</pubDate>
			<dc:creator>cinisli</dc:creator>
			<guid isPermaLink="false">61652@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello again david,&#60;/p&#62;
&#60;p&#62;I made the changes as you said, added code to functions.php, made the changes in the code, but now it blocks all ip's ..&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://Www.1907.net&#34; rel=&#34;nofollow&#34;&#62;http://Www.1907.net&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Poll is under anketler&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cinisli on "poll"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/poll#post-61647</link>
			<pubDate>Wed, 06 Jun 2012 13:16:29 +0000</pubDate>
			<dc:creator>cinisli</dc:creator>
			<guid isPermaLink="false">61647@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;ok. i saw the import export section. thanks again
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
