Osclass Support Forums
Osclass plugin support => Instant Messenger Plugin => Topic started by: MB Themes on July 07, 2016, 10:44:10 AM
-
Hello guys,
Today there has been update to 1.0.3 version that allows messaging to unregistered users as well without need to register.
Check and leave feedback ;)
// Note that you need to uninstall and install plugin again.
-
i am having trouble with unregistered user message taking over the threads from other users.
i had done test message for an item 2 weeks ago and now a message has been sent by a real user but this users message have been merged with the test message i had been sending. i was using a logged in user for the test but the real user is not logged in
here is a screenshot of the thread (https://s10.postimg.org/jemtu9wkp/merged_user_mkessgae.png)
the test messengers name has changed the real users name. but the phone number stayed the same for the test message.
i have noticed similar behaviour with other test messages.
how does the plugin organgise the threads? by email or ip and item?
i also have trouble with removing threads . when i remove threads they do seem to be removed from within the admin panel but when a message gets sent the old threads reappear with in that new message thread :-\
-
the only modification i have made to the plugin is on line 185 of the index.php
i changed this
$to_user_name = $item['s_contact_name'];
to this
$to_user_name = osc_username_now();
and that function looks like this
<?php
// Display UserName
function osc_username_now(){
if( osc_item_user_id() <> 0 && osc_item_user_id() <> '') {
$user = User::newInstance()->findByPrimaryKey( osc_item_user_id() );
return $user['s_username'];
} else {
return false;
}
}
?>
-
oooh and i made a change in how the contact name is got in my theme.
with this
<?php
// Child Class for Contact::Form
class myContactForm extends ContactForm {
static public function your_username() {
if( Session::newInstance()->_getForm("yourName") != "" ) {
$name = Session::newInstance()->_getForm("yourName");
parent::generic_input_text("yourName", $name, null, false);
} else {
parent::generic_input_text("yourName", BO_username_commentator_now(), null, false);
}
return true;
}
}
?>
and the function used here is this
<?php
// Display Commentator UserName
function BO_username_commentator_now(){
if( osc_logged_user_id() <> 0 && osc_logged_user_id() <> '') {
$user = User::newInstance()->findByPrimaryKey( osc_logged_user_id() );
return $user['s_username'];
} else {
return false;
}
}
?>
-
@BabyDunk
For phone number, it will not change as it is placed inside message. There is no function that would get it from user profile.
-
here is a thread from 2 diffrerent items and 2 different users being merged (https://s13.postimg.org/mf2rkuo3r/here_is_a_thread_from_another_item_merged_with_t.png)
-
@BabyDunk
Can you do this on our demo site?
-
i will give it a go and see if i can .
-
i cant try it on your system . spam protect plugin bans me everytime i send a message.
-
@BabyDunk
What are you doing? :D
I have disabled it for while.
-
im gonna try and get the same result as i receive on my system :D lol
i havent received my activation email for registration. can you activate me please :D
-
@BabyDunk
Done.
-
thanks :D need listing activated now thanks
-
Done
-
can you activate a second account please :D
-
sorry one sec
going register with an email address i have already used in one of the messages
-
can you remove the messages now please :D
-
hi frosticek
i dont know if you have removed the messages yet . i was using -1 in the maintenance tab . maybe that is what is causing my problem, although it did remove all messages from the conversations tab
-
@BabyDunk
I did not remove anything, were you able to get the issue?
-
Good morning Frosticek :D
no i didn't get the issue. i only seen the problem on my system after i removed the threads but i don't know if removing the threads with -1 days caused the problem. as i see in the plugin help notes,that only inactive threads are removed.
how long does a thread need to be inactive for before its considered for removal?
I cant test any further without the threads being removed :-\
time for coffee ;-)
-
@BabyDunk
You can set this in Maintenance menu of plugin.
-
sorry i didnt realise i could change that myself.
i cant get the same effect as what i was having. i have since removed and reinstall the plugin on my server and made only that one change on the line185 in index.php.
i could have possibly made more changed when i first looked for what i need to change for to display username when i first installed the plugin.
i will just have to wait and see what happens from here on out :)
just to clarify, it is safe to remove threads by using -1 days ??
Many thanks
Chris
-
@BabyDunk
It is better to set it to i.e. 9999 days.
-
Hello,can anyone tell me how to turn off unregistered users to send messages and this blue button to be shown only when someone is loged in.Tnx
-
@Bokas
Place code for button into:
<?php if(osc_is_web_user_logged_in()) { ?>
... code for button ...
<?php } ?>
-
Thanks for quick reply!
-
Hello guys,
Today there has been update to 1.0.3 version that allows messaging to unregistered users as well without need to register.
Check and leave feedback ;)
// Note that you need to uninstall and install plugin again.
Really not a good idea unregistered users should not be able to contact registered users as tons of spam will be in your message box
-
@Bokas
Place code for button into:
<?php if(osc_is_web_user_logged_in()) { ?>
... code for button ...
<?php } ?>
How to do please and where?
-
@bimbo
How to? Copy & paste
Where? Anywhere you want to have buttons.
Simply using this code you can show send message button just to users that are currently logged in.
-
@bimbo
How to? Copy & paste
Where? Anywhere you want to have buttons.
Simply using this code you can show send message button just to users that are currently logged in.
Just look at these pics,i have plugin installed ok i can see the button and so can unregistered users
http://imgur.com/CYqHTfx
http://imgur.com/iK4mvfc
-
@bimbo
Can you please read again what is written in plugin configuration?
Where you found something that unregistered users cannot send personal message?
-
@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..
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
-
@bimbo
I do not see any button related to plugin.
-
@bimbo
I do not see any button related to plugin.
This is the plugin right encircled??
http://imgur.com/DgTtJb8
-
@bimbo
as you have written in this thread, modification of original code:
<?php if(function_exists('im_messages')) { echo im_messages(); } ?>
into:
<?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.
-
@bimbo
as you have written in this thread, modification of original code:
<?php if(function_exists('im_messages')) { echo im_messages(); } ?>
into:
<?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
-
@bimbo
Right, there is missing one )
Fixed:
<?php
if(function_exists('im_messages')) {
if(osc_is_web_user_logged_in()){
echo im_messages();
}
}
?>
-
@bimbo
Right, there is missing one )
Fixed:
<?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
-
@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.
-
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
-
I already post solution.
-
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?
-
@bimbo
Following code shows Send Message button to everyone. It is also in plugin configuration:
<?php
if(function_exists('im_contact_button')) {
im_contact_button();
}
?>
Following code hide this button to users that are not logged in:
<?php
if(function_exists('im_contact_button')) {
if(osc_is_web_user_logged_in()) {
im_contact_button();
}
}
?>
-
@bimbo
Following code shows Send Message button to everyone. It is also in plugin configuration:
<?php
if(function_exists('im_contact_button')) {
im_contact_button();
}
?>
Following code hide this button to users that are not logged in:
<?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!
<?php
if(function_exists('im_contact_button')) {
im_contact_button();
}
?>
-
First read instructions of plugin, on each page in configuration at bottom. Check also integration section.
-
First read instructions of plugin, on each page in configuration at bottom. Check also integration section.
Listen this is support forum i am not getting answers and this is the 4th page in the thread can you just not say where that code has to be executed
e.g oc-content/blah??
i mean it's simple just give me a straight answer!! >:(
If you are not able just say so end of story!!
-
@bimbo
You are asking 4th time and still did not read plugin setup instructions.... so sad...
To show link to message center and count of unread messages of user, place following link to your theme files:
<?php if(function_exists('im_messages')) { echo im_messages(); } ?>
To show "Send message" button, place following link to your theme files (item.php, search-list.php, ...):
<?php if(function_exists('im_contact_button')) { im_contact_button(); } ?>
-
@bimbo
You are asking 4th time and still did not read plugin setup instructions.... so sad...
To show link to message center and count of unread messages of user, place following link to your theme files:
<?php if(function_exists('im_messages')) { echo im_messages(); } ?>
To show "Send message" button, place following link to your theme files (item.php, search-list.php, ...):
<?php if(function_exists('im_contact_button')) { im_contact_button(); } ?>
i don't think you understand if i put this in
<?php if(function_exists('im_contact_button')) { im_contact_button(); } ?>
it shows button twice????
Actually ya know what,i'm asking paypal for my money back due to lack of proper support
-
@bimbo
And still you just complaint and cannot read what is in plugin configuration:
Hook Button to Item Page
"Send Message" button will be shown on listing page without need of theme modifications.
For sure you have turned this on ... or ... you have already placed link into your files
Then you place link again and complain that it is shown twice.
If you are smart person, first you will go trough plugin configuration, read all instructions here and then you will ask something.
What are you going to complain on paypal? We have delivered product that exactly match it's description and is fully funcitonal.
Where you found functionality "hide to unregistered"? So it is your custom requirement? Yes it is.. then if you are not satisfied what you got for free, you can hire developer to setup your page.
Locking this thread as original question was already answered.