By Mel on Friday, 23 June 2017
Posted in General Issues
Likes 0
Views 613
Votes 0
I recently had a load of custom work done by yourselves and just wanted to know if you could help me with one small issue with it.

In my custom work you created text links that open up the user popup toolbar. I wanted to make the text link a button so it stands out more to users (at the moment they say it isn't obvious where to click). Ideally they wanted it to open the new message input box straight away for that user, so they dont first see the overview popup but instead see the message form ready to type in their message. This is the code you did but I don't know how to change it:

$ESuser = ES::user($agent->user_id);
?>

<li>
<a href="/<?php echo $ESuser->getPermalink();?>" class="o-avatar"
data-popbox="module://easysocial/profile/popbox"
data-user-id="<?php echo $ESuser->id;?>"
data-popbox-position="top-left"
>
<?php echo Jtext::_('OS_CONTACT');?>
</a>
</li>


Are you able to offer any guidance?

Kind regards

Mel

Update: it is this box I want to open - basically the box that pops up when you click on the email icon:
If your custom code put into Easysocial theme file, you can use following code :

$user = ES::user($agent->user_id);

<button type="button" class="btn btn-es-default-o btn-sm btn--es-conversations-compose"
data-es-conversations-compose
data-id="<?php echo $user->id;?>">
Request more Details
</button>
·
Friday, 23 June 2017 22:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

thanks for responding. My custom code isn't inside easysocial it is in OSProperty files. If you open the dev site (see details on the edited post) then click on Buy then click on the first property image and then scroll down the page to where the Agent's contact details are you will see Request more Details -
it is that link I want to replace with a button that opens up the message box. I think they edited .../components/com_osproperty/classes/listing.html.php as it had to be done there because of how osproperty files were structured.
I think for that reason that code can't go anywhere else. I don't know if that makes sense to you?

Kind regards

Mel
Mel
·
Friday, 23 June 2017 22:52
·
0 Likes
·
0 Votes
·
0 Comments
·
You can try using this Mel,

[gist]
<button type="button" class="btn btn-default"
data-es-conversations-compose
data-id="<?php echo $user->id;?>">
Request more Details
</button>
[/gist]
·
Saturday, 24 June 2017 15:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Mark!

that creates the button when you view page:
https://www.linkprocrm.com/agents-reps/kevins

and it also opens a popup box that looks like it may be the message compose box, however it is blank inside and has an error message: Sorry, but the list id provided is not valid.

But it doesn't change the Request more Details for the user at all on this page:
https://www.linkprocrm.com/rent/sacfifice-30-000-below-market-value-owner-now-living-overseas

I know the 2 files I have to edit, the are .../classes/agent.html.php line 1629
and classes/listing.html.php line 1726

I replaced the existing code with yours in both.

And I believe these were also customised by yourselves to add the easysocial links:

.../components/com_osproperty/helpers/layouts/agentdetails.php
.../components/com_osproperty/helpers/layouts/agentslist.php

And lastly this os_property theme: 08012017160546theme1

It must be fairly close?

Mel
Mel
·
Saturday, 24 June 2017 17:01
·
0 Likes
·
0 Votes
·
0 Comments
·
I was unable to login on your dev site, it seems like you blocked that user which you provided us that login credentials in this thread.

Based on what you told us, it seems like it can show the pop up just that you hitting this following warning right?

Sorry, but the list id provided is not valid.


If yes, mean your user id is not get correctly, you should try var_dump($user->id);exit; and see what is the value it return.

If it return null, mean something wrong from the way you pass in that $user variable.
·
Saturday, 24 June 2017 21:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

I haven't blocked the login, but I did change the login credentials in the first thread, however it seems to have reverted to a site that no loner exists/is live. I need to remove it from my account. I will go do that now then try and change the login credentials again
Mel
·
Saturday, 24 June 2017 21:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

I have hopefully removed the site now from my details page. I have added the developer site credentials to the additional information box. Can you see them?

Mel

Apologies, I have now added details to this last post - didn't realise I could that.
Mel
·
Saturday, 24 June 2017 22:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks, it seems like you pass wrong variable into this section.

$ESuser = ES::user($agent->user_id);
?>

<li>
<button type="button" class="btn btn-default"
data-es-conversations-compose
data-id="<?php echo $user->id;?>">
Request more Details
</button>

</a>
</li>


Then i replace to :

$ESuser = ES::user($agent->user_id);
?>

<li>
<button type="button" class="btn btn-default"
data-es-conversations-compose
data-id="<?php echo $ESuser->id;?>">
Request more Details
</button>

</a>
</li>


It should work fine now, i modified on this file
JoomlaFolder/components/com_osproperty/classes/agent.html.php
·
Saturday, 24 June 2017 22:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Arlex,

thank you so much!!!

Now it works so much better and more logically.

Have a great weekend

Mel
Mel
·
Saturday, 24 June 2017 23:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

You are most welcome. Glad to hear that your issue has been resolved now.

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Sunday, 25 June 2017 00:02
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post