0 Members and 1 Guest are viewing this topic.

*

havana

  • *
  • 15
  • Non profit - community work.
  • osDate Version: osDate Evo v1.0
Closed off dating viewing for unregistred random vistitors. Few Questions on

Hi,

I managed to get EVO up and running. My idea to make a free community project to support people with special needs. It is not a normal dating site, the reason why people will come there will be sensitive.

Question#1
Any idea how only registered users can make use of the site. Only view content when registered?

Question#2
Any idea where to remove/turn off that random man/woman widget in the left of the frontpage? Site will be sensitive, the profiles contain pictures. I want profile information only availiable to people who registered.

Props for developing this open source dating script. I think it can give some good support for the community i am setting this up.
« Last Edit: July 20, 2016, 10:28:16 PM by Pharg »

*

Pharg

  • *****
  • 3,147
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Closed off dating viewing for unregistred random vistitors.
« Reply #1 on: July 20, 2016, 10:58:44 PM »
Hi havana,

Quote
Question#1
Any idea how only registered users can make use of the site. Only view content when registered?
Looking up the answer, as it's in the forum, I just have to find it again, will post it here when I find it.

Quote
Question#2
Any idea where to remove/turn off that random man/woman widget in the left of the frontpage?

Edit the leftcolumn.tpl and remove / delete this
Code: [Select]
{if $luckySpinGenderFemale != ''}
{$luckySpinGenderFemale}
<br />
{/if}
{if $luckySpinGenderMale != ''}
{$luckySpinGenderMale}
<br />
{/if}

The other option is to hide it from the quests/ visitors

Change this:
Code: [Select]
{if $luckySpinGenderFemale != ''}
{$luckySpinGenderFemale}
<br />
{/if}
{if $luckySpinGenderMale != ''}
{$luckySpinGenderMale}
<br />
{/if}

to this:
Code: [Select]
{if $smarty.session.UserId != ''}
{if $luckySpinGenderFemale != ''}
{$luckySpinGenderFemale}
<br />
{/if}
{/if}
{if $smarty.session.UserId != ''}
{if $luckySpinGenderMale != ''}
{$luckySpinGenderMale}
<br />
{/if}
{/if}
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

havana

  • *
  • 15
  • Non profit - community work.
  • osDate Version: osDate Evo v1.0
Re: Closed off dating viewing for unregistred random vistitors.
« Reply #2 on: July 20, 2016, 11:11:13 PM »
Hi Pharg,

Thanks for the quick respond. I will wait with code removal, that random thing might be usefull.

My first concern is to 'close' that frontpage from sensitive random visitor information. After that i will reconsider.

*

Pharg

  • *****
  • 3,147
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Closed off dating viewing for unregistred random vistitors.
« Reply #3 on: July 21, 2016, 12:10:22 AM »
Hi havana,

When a visitor clicks on a frontpage photo, it will now stop them viewing the profile and redirect them to the login page, add the following in the .php file

Find
Code: [Select]
if ( !defined( 'SMARTY_DIR' ) ) {
     include_once( 'init.php' );
}

After Add
Code: [Select]
include('sessioninc.php');

So if you wanted to stop members not logged in, viewing profiles, you should put that code in showprofile.php

If you don't want any photos showing on the frontpage to visitors then you have to edit the
homepage.tpl like this:

Change this:
Code: [Select]
{strip}
<div align="center">
{if $smarty.session.UserId == ''}
{include file='special_offer.tpl'}
{elseif $smarty.session.UserId > 0 }
{* Show the statistics since last login  *}
{include file='user_home_stats.tpl'}
<br />
{if count($bdpusers) > 0}
{include file='birthday_profiles.tpl'}
{/if}
{/if}

{if $config.iplocation_profcnt > 0 && count($iplusers) > 0 }
{* This is for showing the IP Location based Profiles  *}
{include file='iplocation_profiles.tpl'}
{/if}

{if $config.newest_profpics_dispcnt > 0 && count($profpicsusers) > 0 }
{* This is for showing the Featured Profiles  *}
{include file='newest_profpics.tpl'}
{/if}
{if $config.show_random_profiles > 0 }
{* This is for showing the Featured Profiles  *}
{include file='random_profiles.tpl'}
{/if}
{if $config.show_featured_profiles > 0 && count($featured_profiles) > 0}
{* This is for showing the Featured Profiles  *}
{include file='home_featured_profiles.tpl'}
{/if}
{if $config.show_recent_active_profiles > 0 }
{* Now show recently active profiles       *}
{include file='recent_active_profiles.tpl'}
{/if}
    {if $smarty.session.UserId != ''}
    {if $config.list_newmembers > 0 && $nulusers }
{* Now show the latest members names *}
{include file='home_newuserlist.tpl'}
{/if}
    {/if}
    {if $config.no_last_new_users > 0 && count($npusers) > 0 }
{* Now show newest profiles       *}
{include file='home_membersincelastlogin.tpl'}
{/if}
    {if $smarty.session.UserId != ''}
    {* This is for showing the IM Messager and Online users  *}
{* {include file='home_im_onlineusers.tpl'}*}
    {/if}


</div>
{/strip}

Replace with:

Code: [Select]
{strip}
<div align="center">
{if $smarty.session.UserId == ''}
{include file='special_offer.tpl'}
{elseif $smarty.session.UserId > 0 }
{* Show the statistics since last login  *}
{include file='user_home_stats.tpl'}
<br />
{if count($bdpusers) > 0}
{include file='birthday_profiles.tpl'}
{/if}
{/if}
   
   {if $smarty.session.UserId != ''}
{if $config.iplocation_profcnt > 0 && count($iplusers) > 0 }
{* This is for showing the IP Location based Profiles  *}
{include file='iplocation_profiles.tpl'}
{/if}

{if $config.newest_profpics_dispcnt > 0 && count($profpicsusers) > 0 }
{* This is for showing the Featured Profiles  *}
{include file='newest_profpics.tpl'}
{/if}
{if $config.show_random_profiles > 0 }
{* This is for showing the Featured Profiles  *}
{include file='random_profiles.tpl'}
{/if}
{if $config.show_featured_profiles > 0 && count($featured_profiles) > 0}
{* This is for showing the Featured Profiles  *}
{include file='home_featured_profiles.tpl'}
{/if}
{if $config.show_recent_active_profiles > 0 }
{* Now show recently active profiles       *}
{include file='recent_active_profiles.tpl'}
{/if}
    {if $smarty.session.UserId != ''}
    {if $config.list_newmembers > 0 && $nulusers }
{* Now show the latest members names *}
{include file='home_newuserlist.tpl'}
{/if}
    {/if}
    {if $config.no_last_new_users > 0 && count($npusers) > 0 }
{* Now show newest profiles       *}
{include file='home_membersincelastlogin.tpl'}
{/if}
    {if $smarty.session.UserId != ''}
    {* This is for showing the IM Messager and Online users  *}
{* {include file='home_im_onlineusers.tpl'}*}
    {/if}
  {/if}


</div>
{/strip}


This is how you hide stuff
{if $smarty.session.UserId == ''}
code to hide goes here
{/if}
« Last Edit: July 21, 2016, 12:23:49 AM by Pharg »
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

havana

  • *
  • 15
  • Non profit - community work.
  • osDate Version: osDate Evo v1.0
Re: Closed off dating viewing for unregistred random vistitors.
« Reply #4 on: July 24, 2016, 04:51:46 PM »
Hi Parge,

I used your last piece of code, but it does not solve my problem. I changed it, but people can still use the search function and my osdate website will show them pictures and names.

If possible, i would like to fence the frontpage off untill people get part of the club and they login. After login they can search and look pictures or whatever they want.

(PS: That code for removal of the random person on the frontpage worked, it only appears again when people are logged in.)

Greetings, Havana

*

Pharg

  • *****
  • 3,147
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Closed off dating viewing for unregistred random vistitors.
« Reply #5 on: July 24, 2016, 11:06:57 PM »
Hi Havana,

In the index.tpl find on line 38 this:

Code: [Select]
<div class="headbgbox">
        <div class="big_search">
{include file="searchprofile.tpl"}
</div>
            <div class="small_search">
{include file="searchprofile_min.tpl"}
</div>
            </div>

Change to this to hide:
Code: [Select]
{if $smarty.session.UserId != ''}
     <div class="headbgbox">
        <div class="big_search">
{include file="searchprofile.tpl"}
</div>
            <div class="small_search">
{include file="searchprofile_min.tpl"}
</div>
            </div>
           {/if}
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

havana

  • *
  • 15
  • Non profit - community work.
  • osDate Version: osDate Evo v1.0
Re: Closed off dating viewing for unregistred random vistitors.
« Reply #6 on: July 25, 2016, 09:13:31 AM »
Changed it.. it also includes the none working anaylitics code in the bottom. My index.tpl which is located in /templates/default/index.tpl looks like this

Code: [Select]
{include file="index_header.tpl"}
{strip}
<body dir="{lang mkey='DIRECTION'}">
<center>
<!-- Header portion  -->

<div class="main_outer_table">
         <div class="big_search">
          {include file="loginbar.tpl"}
           </div>
         <div class="small_search">
          {include file="loginbar_min.tpl"}
           </div>
       {if $smarty.session.UserId != ''}
       <table width="100%" border="0" cellpadding="0" cellspacing="0" class="headbginside">
      <tr>
  <td style="width:100%;">
        <div>
          {include file="logo_inside.tpl"}
        </div>
           </td>
      </tr>
     </table>
      {else}
       <table width="100%" border="0" cellpadding="0" cellspacing="0" class="headbgtitle">
      <tr>
  <td style="width:100%;">
        <div>
          {include file="logo.tpl"}
        </div>
           </td>
      </tr>
     </table>
     {/if}
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
  <td style="width:100%;">
 {if $smarty.session.UserId != ''}
     <div class="headbgbox">
        <div class="big_search">
{include file="searchprofile.tpl"}
</div>
            <div class="small_search">
{include file="searchprofile_min.tpl"}
</div>
            </div>
           {/if}
       {if $smarty.session.UserId != ''}
        <div class="dropdownbgbox">
           <div class="big_menu">
{if $config.menutype == 'top' && $smarty.session.UserId != ''}
{include file="dropdownpanelmenu_big.tpl"}   
   {/if}
</div>
               </div>
        <div class="dropdownbgbox">
           <div class="small_menu">
{if $config.menutype == 'top' && $smarty.session.UserId != ''}
{include file="dropdownpanelmenu_mid.tpl"}   
   {/if}
</div>
              </div>
        {/if}
          </td>
      </tr>
     </table>
     


                 <!-- Leftside Column   -->
<div style="margin-top: 2px; width:100%;">
<div class="leftcolumn">
{include file="leftcolumn.tpl"}
</div>
<div class="user_menu">
{include file="user_menu.tpl"}
</div>
      </div>
     <div id="backtop">&#9650;</div>
      <div id="backtop" data-v-w="300, 1200">&#9650;</div>
<!-- Rendered page -->
<div class="page">
{$rendered_page}
        <br />
{$modosdate_main}
<br />
          {include file="banner_mainpage.tpl"}
              <br />
             <br />
        </div>


   
    <div id="backtop" data-v-w="300, 1200">&#9650;</div>
<!--  Footer   -->
<div style="clear:both; text-align:center; width:100%;">
{include file="footer.tpl"}
</div>
</div>
</center>
{literal}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
var jq172 = jQuery.noConflict();
</script>
{/literal}
<script type="text/javascript">
updateOnlineTime();
{if $smarty.session.UserId <= 0}
updateOnlineCount();
{/if}
</script>
</body>
</html>
{closedb}
{/strip}

{literal}<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'XX-XXXXXXXX-X', 'auto');
  ga('send', 'pageview');

</script>{/literal}

*

havana

  • *
  • 15
  • Non profit - community work.
  • osDate Version: osDate Evo v1.0
Re: Closed off dating viewing for unregistred random vistitors.
« Reply #7 on: July 25, 2016, 09:15:10 AM »
It is not working BTW. Frontpage is still not closed.. what am i doing wrong?

*

Pharg

  • *****
  • 3,147
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Closed off dating viewing for unregistred random vistitors.
« Reply #8 on: July 25, 2016, 09:30:14 AM »
Hi havana,

If the Google Analytics is new it will take a few days to start showing results, you own visits don't count most of the time, give it time.

The search hiding looks correct, just make sure you added it to the correct index.tpl template name file, like if you are using default it has to be that one, if you are using pink template then it's that index.tpl you need to edit.
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

havana

  • *
  • 15
  • Non profit - community work.
  • osDate Version: osDate Evo v1.0
Re: Closed off dating viewing for unregistred random vistitors.
« Reply #9 on: July 25, 2016, 09:41:45 AM »
Solved.

Made my edit op index.tpl in the wrong template dir. Now it is working. Both google analytics as the hiding for the users for not registred users.

 :D

*

Pharg

  • *****
  • 3,147
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Closed off dating viewing for unregistred random vistitors.
« Reply #10 on: July 25, 2016, 10:32:32 AM »
Good to know  :D
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35