*

MB Themes

Re: Unregistered users
« Reply #30 on: December 17, 2016, 08:04:12 PM »
@bimbo
Can you please read again what is written in plugin configuration?
Where you found something that unregistered users cannot send personal message?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

bimbo

  • ***
  • 31 posts
Re: Unregistered users
« Reply #31 on: December 17, 2016, 09:05:19 PM »
@bimbo
Can you please read again what is written in plugin configuration?
Where you found something that unregistered users cannot send personal message?

ok got the <?php if(function_exists('im_messages')) { echo im_messages(); } ?> in header,also logged out can still see button and send message..

Quote
Where you found something that unregistered users cannot send personal message?

I want that unregistered users cannot send personal message until registered or logged in! I also have Show Header Link to Registered Only On! But still unregistered can still send messages

Here is site you can still see button no matter what i do?

http://www.freeclassifieds.trade
« Last Edit: December 17, 2016, 10:33:04 PM by bimbo »

*

MB Themes

Re: Unregistered users
« Reply #32 on: December 17, 2016, 11:29:41 PM »
@bimbo
I do not see any button related to plugin.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

bimbo

  • ***
  • 31 posts
Re: Unregistered users
« Reply #33 on: December 18, 2016, 12:34:57 AM »
@bimbo
I do not see any button related to plugin.

This is the plugin right encircled??

http://imgur.com/DgTtJb8

*

MB Themes

Re: Unregistered users
« Reply #34 on: December 18, 2016, 10:09:46 AM »
@bimbo
as you have written in this thread, modification of original code:
Code: [Select]
<?php if(function_exists('im_messages')) { echo im_messages(); } ?>
into:
Code: [Select]
<?php 
  
if(function_exists('im_messages')) { 
    if(
osc_is_web_user_logged_in(){
      echo 
im_messages(); 
    } 
  } 
?>


Will hide it to not-logged users.
Button you have higlighted is different function.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

bimbo

  • ***
  • 31 posts
Re: Unregistered users
« Reply #35 on: December 18, 2016, 02:20:01 PM »
@bimbo
as you have written in this thread, modification of original code:
Code: [Select]
<?php if(function_exists('im_messages')) { echo im_messages(); } ?>
into:
Code: [Select]
<?php 
  
if(function_exists('im_messages')) { 
    if(
osc_is_web_user_logged_in(){
      echo 
im_messages(); 
    } 
  } 
?>


Will hide it to not-logged users.
Button you have higlighted is different function.

The above code made site go blank

*

MB Themes

Re: Unregistered users
« Reply #36 on: December 18, 2016, 05:23:21 PM »
@bimbo
Right, there is missing one )

Fixed:
Code: [Select]
<?php 
  
if(function_exists('im_messages')) { 
    if(
osc_is_web_user_logged_in()){
      echo 
im_messages(); 
    } 
  } 
?>

  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

bimbo

  • ***
  • 31 posts
Re: Unregistered users
« Reply #37 on: December 18, 2016, 07:24:28 PM »
@bimbo
Right, there is missing one )

Fixed:
Code: [Select]
<?php 
  
if(function_exists('im_messages')) { 
    if(
osc_is_web_user_logged_in()){
      echo 
im_messages(); 
    } 
  } 
?>


Ok site didn't go blank but unregistered members can still send private messages

*

MB Themes

Re: Unregistered users
« Reply #38 on: December 18, 2016, 09:41:19 PM »
@bimbo
This code only hide send message button, respectively header link button. There is no code to deny sending messages to users that are not logged in.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

bimbo

  • ***
  • 31 posts
Re: Unregistered users
« Reply #39 on: December 20, 2016, 02:58:31 PM »
Quote
There is no code to deny sending messages to users that are not logged in.

Can you do a code for that please so deny users that are not logged it to send messages,this is essential as any kind of spam source can be sent to members!!

Regards

*

MB Themes

Re: Unregistered users
« Reply #40 on: December 20, 2016, 10:45:53 PM »
I already post solution.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

bimbo

  • ***
  • 31 posts
Re: Unregistered users
« Reply #41 on: December 20, 2016, 11:14:37 PM »
I already post solution.

where is this code located in zara theme? <?php if(function_exists('im_messages')) { echo im_messages(); } ?>

Found it but it still will not work

How to hide send message button it's important to unregistered users?
« Last Edit: December 20, 2016, 11:52:36 PM by bimbo »

Marked as best answer by frosticek on December 21, 2016, 08:42:49 AM
*

MB Themes

Re: Unregistered users
« Reply #42 on: December 21, 2016, 08:42:45 AM »
@bimbo
Following code shows Send Message button to everyone. It is also in plugin configuration:
Code: [Select]
<?php 
  
if(function_exists('im_contact_button')) { 
    
im_contact_button(); 
  } 
?>


Following code hide this button to users that are not logged in:
Code: [Select]
<?php 
  
if(function_exists('im_contact_button')) { 
    if(
osc_is_web_user_logged_in()) {
      
im_contact_button(); 
    }
  } 
?>

  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

bimbo

  • ***
  • 31 posts
Re: Unregistered users
« Reply #43 on: December 21, 2016, 11:07:25 AM »
@bimbo
Following code shows Send Message button to everyone. It is also in plugin configuration:
Code: [Select]
<?php 
  
if(function_exists('im_contact_button')) { 
    
im_contact_button(); 
  } 
?>


Following code hide this button to users that are not logged in:
Code: [Select]
<?php 
  
if(function_exists('im_contact_button')) { 
    if(
osc_is_web_user_logged_in()) {
      
im_contact_button(); 
    }
  } 
?>


Could you just say where to find above code in which file?,would be a lot easier!

Code: [Select]
<?php 
  
if(function_exists('im_contact_button')) { 
    
im_contact_button(); 
  } 
?>

*

MB Themes

Re: Unregistered users
« Reply #44 on: December 21, 2016, 09:32:34 PM »
First read instructions of plugin, on each page in configuration at bottom. Check also integration section.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots