Community Support Forums — WordPress® ( Users Helping Users ) — 2011-04-21T22:05:20-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=3160 2011-04-21T22:05:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=13128#p13128 <![CDATA[Re: redirecting index.php to wp-login.php?]]>

Statistics: Posted by Cristián Lávaque — April 21st, 2011, 10:05 pm


]]>
2011-04-21T21:48:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=13127#p13127 <![CDATA[Re: redirecting index.php to wp-login.php?]]>
Cristián Lávaque wrote:
OK. Did you watch the videos I suggested?


it worked!!! thank you.

Statistics: Posted by zerotosran — April 21st, 2011, 9:48 pm


]]>
2011-04-21T19:27:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=13121#p13121 <![CDATA[Re: redirecting index.php to wp-login.php?]]> Statistics: Posted by Cristián Lávaque — April 21st, 2011, 7:27 pm


]]>
2011-04-21T17:57:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=13115#p13115 <![CDATA[Re: redirecting index.php to wp-login.php?]]>
Cristián Lávaque wrote:
zerotosran wrote:so, i've used alternative protection option because it was the solution that i was looking for. it doesn't work


Could you explain what you did, what happens, and what you expected?

Also, I suggest you watch these:
http://www.s2member.com/general-options-overview-video/
http://www.s2member.com/content-restric ... ble-video/

I hope that helps. :)



see my website for an example. . the index pages shows by the widgeted page. even with alternative protection option set to "YES"(the last one) it still shows the website.

Statistics: Posted by zerotosran — April 21st, 2011, 5:57 pm


]]>
2011-04-21T13:52:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=13101#p13101 <![CDATA[Re: redirecting index.php to wp-login.php?]]>
zerotosran wrote:
so, i've used alternative protection option because it was the solution that i was looking for. it doesn't work


Could you explain what you did, what happens, and what you expected?

Also, I suggest you watch these:
http://www.s2member.com/general-options-overview-video/
http://www.s2member.com/content-restric ... ble-video/

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — April 21st, 2011, 1:52 pm


]]>
2011-04-21T13:38:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=13099#p13099 <![CDATA[Re: redirecting index.php to wp-login.php?]]> Statistics: Posted by zerotosran — April 21st, 2011, 1:38 pm


]]>
2011-04-16T14:51:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=12780#p12780 <![CDATA[Re: redirecting index.php to wp-login.php?]]>
drbyte wrote:
This will only show login form to none members including the header and footer....once they are logged in then it will show everything including your side bars.

Code:
<?php if(is_user_logged_in()){ ?>
<?php get_header(); ?>
    <?php dynamic_sidebar(1); ?>
                <?php if(get_option("ocmx_home_page_layout") == "widget") :
                    if (function_exists('dynamic_sidebar') && is_active_sidebar(2)) : ?>
                    <div id="widget-block" class="clearfix">
                        <ul class="widget-list">
                            <?php dynamic_sidebar(2); ?>
                        </ul>
                    </div>
                    <?php endif;
                else : ?>
          <ul class="double-cloumn clearfix">
              <li id="left-column">
                    <ul class="blog-main-post-container">
                        <?php if (have_posts()) :
                            global $show_author;
                            $show_author = 1;
                            while (have_posts()) :    the_post(); setup_postdata($post);
                                include(TEMPLATEPATH."/functions/fetch-list.php");
                            endwhile;
                        else :
                            ocmx_no_posts();
                        endif; ?>
                    </ul>
                    <?php motionpic_pagination("clearfix", "pagination clearfix"); ?>
            </li>
            <?php get_sidebar(); ?>
        </ul>
        <?php endif; ?>
<?php get_footer(); ?>
    <?php } else { ?>
        <?php get_header(); ?>
<form name="loginform" id="loginform" action="http://www.site.com/wp-login.php" method="post">
<p>
<label>Username *<br />
<input type="text" name="log" id="user_login" class="input" value="" size="20" tabindex="10" /></label>
</p>
<p>
<label>Password *<br />
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
</p>
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> Remember Me</label></p>
<p class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="Log In" tabindex="100" />
<input type="hidden" name="redirect_to" value="http://www.site.com/wp-admin/" />
<input type="hidden" name="testcookie" value="1" />
</p>
</form>
<?php get_footer(); ?>
    <?php } ?>



THANKS!! i think i am heading somewhere with your code, but pages of files or contents are still accessible by typing in the pageID number. all my page that are accessable by doing so, have custom template and it looks like this
Code:
<?php /* Template Name: Widgetized Page */
get_header();
$widget_title = $post->post_title;
dynamic_sidebar($widget_title." Slider Widget");
if (function_exists('dynamic_sidebar') && is_active_sidebar($widget_title." 3 Column")) : ?>
    <div id="widget-block" class="clearfix">
        <ul class="widget-list">
            <?php dynamic_sidebar($widget_title." 3 Column"); ?>
        </ul>
    </div>
    <?php endif;
get_footer(); ?>

how can i block the contents?
i tried to fiddle with [Specific Post/Page Access Restrictions ( optional )] still does not block or put restrictions for non-login members.

Statistics: Posted by zerotosran — April 16th, 2011, 2:51 pm


]]>
2011-04-15T01:59:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=10754#p10754 <![CDATA[Re: redirecting index.php to wp-login.php?]]>
zerotosran wrote:
where should i put these in?


This is the part of your template that shows the posts:

Code:
<ul class="blog-main-post-container">
    <?php if (have_posts()) :
        global $show_author;
        $show_author = 1;
        while (have_posts()) :    the_post(); setup_postdata($post);
            include(TEMPLATEPATH."/functions/fetch-list.php");
        endwhile;
    else :
        ocmx_no_posts();
    endif; ?>
</ul>


So you wrap that with the condition that the person is logged in.

Code:
<?php if (user_is_logged_in()) { ?>

    <ul class="blog-main-post-container">
        <?php if (have_posts()) :
            global $show_author;
            $show_author = 1;
            while (have_posts()) :    the_post(); setup_postdata($post);
                include(TEMPLATEPATH."/functions/fetch-list.php");
            endwhile;
        else :
            ocmx_no_posts();
        endif; ?>
    </ul>

<?php } else { ?>

    Here goes the message you want to give to those who aren't logged in.

<?php } ?>


I hope that helps you. :)

Statistics: Posted by Cristián Lávaque — April 15th, 2011, 1:59 am


]]>
2011-04-14T17:12:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=10737#p10737 <![CDATA[Re: redirecting index.php to wp-login.php?]]>
Code:
<?php if(is_user_logged_in()){ ?>
<?php get_header(); ?>
    <?php dynamic_sidebar(1); ?>
                <?php if(get_option("ocmx_home_page_layout") == "widget") :
                    if (function_exists('dynamic_sidebar') && is_active_sidebar(2)) : ?>
                    <div id="widget-block" class="clearfix">
                        <ul class="widget-list">
                            <?php dynamic_sidebar(2); ?>
                        </ul>
                    </div>
                    <?php endif;
                else : ?>
          <ul class="double-cloumn clearfix">
              <li id="left-column">
                    <ul class="blog-main-post-container">
                        <?php if (have_posts()) :
                            global $show_author;
                            $show_author = 1;
                            while (have_posts()) :    the_post(); setup_postdata($post);
                                include(TEMPLATEPATH."/functions/fetch-list.php");
                            endwhile;
                        else :
                            ocmx_no_posts();
                        endif; ?>
                    </ul>
                    <?php motionpic_pagination("clearfix", "pagination clearfix"); ?>
            </li>
            <?php get_sidebar(); ?>
        </ul>
        <?php endif; ?>
<?php get_footer(); ?>
    <?php } else { ?>
        <?php get_header(); ?>
<form name="loginform" id="loginform" action="http://www.site.com/wp-login.php" method="post">
<p>
<label>Username *<br />
<input type="text" name="log" id="user_login" class="input" value="" size="20" tabindex="10" /></label>
</p>
<p>
<label>Password *<br />
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
</p>
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> Remember Me</label></p>
<p class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="Log In" tabindex="100" />
<input type="hidden" name="redirect_to" value="http://www.site.com/wp-admin/" />
<input type="hidden" name="testcookie" value="1" />
</p>
</form>
<?php get_footer(); ?>
    <?php } ?>

Statistics: Posted by drbyte — April 14th, 2011, 5:12 pm


]]>
2011-04-14T12:08:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=10731#p10731 <![CDATA[Re: redirecting index.php to wp-login.php?]]>
Cristián Lávaque wrote:
You could edit the template file for the homepage and use a conditional to check if the person is logged in before showing the posts, and redirect to wp-login.php if not.

WP Admin -> s2Member -> API / Scripting


i am new to coding world, sorry about the frequent questions.

so let say if my template indexpage code goes like

Code:
<?php get_header(); ?>
<?php dynamic_sidebar
(1); ?>
            <?php if(get_option("ocmx_home_page_layout") == "widget") :
                if (
function_exists('dynamic_sidebar') && is_active_sidebar(2)) : ?> 
                <div id="widget-block" class="clearfix">
                    <ul class="widget-list">
                        <?php dynamic_sidebar(2); ?>
                    </ul>
                </div>
                <?php endif; 
            else : 
?>
      <ul class="double-cloumn clearfix">
          <li id="left-column">
                <ul class="blog-main-post-container">
                    <?php if (have_posts()) :
                        global 
$show_author;
                        
$show_author 1;
                        while (
have_posts()) :    the_post(); setup_postdata($post);
                            include(
TEMPLATEPATH."/functions/fetch-list.php");
                        endwhile;
                    else :
                        
ocmx_no_posts();
                    endif; 
?>
                </ul>
                <?php motionpic_pagination("clearfix""pagination clearfix"); ?>
        </li>
        <?php get_sidebar(); ?>
    </ul>
    <?php endif; ?>
<?php get_footer
(); ?>


where should i put these in?
Code:
<?php if(is_user_logged_in()){ ?>
    Content for anyone that is logged in, regardless of their Membership Level.
<?php } else { ?>
    Some public content.
<?php ?>

Statistics: Posted by zerotosran — April 14th, 2011, 12:08 pm


]]>
2011-04-14T03:00:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=10714#p10714 <![CDATA[Re: redirecting index.php to wp-login.php?]]>
The free version

Options 1
Using .htaccess

Code:
Options +FollowSymLinks
RewriteEngine on
# index.php to /wp-login.php
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]


Option 2

Create a new page..call it login

drop this into the HTML text editor:

Code:
<form name="loginform" id="loginform" action="http://www.site.com/wp-login.php" method="post">
<p>
<label>Username *<br />
<input type="text" name="log" id="user_login" class="input" value="" size="20" tabindex="10" /></label>
</p>
<p>
<label>Password *<br />
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
</p>
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> Remember Me</label></p>
<p class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="Log In" tabindex="100" />
<input type="hidden" name="redirect_to" value="http://www.site.com/wp-admin/" />
<input type="hidden" name="testcookie" value="1" />
</p>
</form>



Change the site.com to yours
Save the page

Go to wp-admin ----settings-----reading
Front page displays

Your latest posts
or
A static page (select below)

Choose the second option and from the drop down menu choose the page you just created

save..make sure you are log out and refresh your page...use another browser ..it makes it easier to see the changes without log in and log out

Now you need to protect your Categories/pages/posts ....Read the s2member general options instructions


Option 3

Use meta data

inset this to the meta data in your theme usually in the header.php

<meta http-equiv="refresh" content="10; url=http://example.com/wp-login">

In all cases you need to protect your Categories/Pages/and Posts with S2m so no matter what they do they will get either the log in page or the membership page

There are other ways to do so...try the above first and let me know

Sam

Statistics: Posted by drbyte — April 14th, 2011, 3:00 am


]]>
2011-04-14T02:05:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=10289#p10289 <![CDATA[Re: redirecting index.php to wp-login.php?]]> wp-login.php if not.

WP Admin -> s2Member -> API / Scripting

Statistics: Posted by Cristián Lávaque — April 14th, 2011, 2:05 am


]]>
2011-04-14T00:50:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=10284#p10284 <![CDATA[Re: redirecting index.php to wp-login.php?]]> By doing that. I can lock my website from unregistered users. But how can i?

Statistics: Posted by zerotosran — April 14th, 2011, 12:50 am


]]>
2011-04-14T00:22:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=10281#p10281 <![CDATA[Re: redirecting index.php to wp-login.php?]]> wp-login.php be the homepage of your website?

Statistics: Posted by Cristián Lávaque — April 14th, 2011, 12:22 am


]]>
2011-04-13T13:52:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=3160&p=9685#p9685 <![CDATA[redirecting index.php to wp-login.php?]]> Statistics: Posted by zerotosran — April 13th, 2011, 1:52 pm


]]>