I understand that creating customizations are not supported. I was wondering if I could get pointed in the right direction with a snippet of code.

I'm wanting to access an EasySocial boolean custom field for the current logged in user. For example I want to let the user decide if certain site menu's should float such as the header. The problem is that I don't know how to check the boolean field in the condition. See PHP code:

<?php
if(ES-Unique-Key-BOOLEAN == true) {
//JS code to append floating class
}

else {
// remove floating class from menus
}
?>


I see some info on it in the docs.

Would the PHP code block start out with:

require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php');
$my = ES::user();
$state = $my->setFieldValue(string $key, 'some value here');


? Also where it says "some value here", is this where the unique key goes? Also I'm not quite sure where to apply:

public function setFieldValue($key, $value)


I would put the code in index.php of the current template. Any pointers would go greatly appreciated. :)
Websites: Personal Website ยท PeakBeta
18 replies
Mark replied on Monday, February 01 2016, 02:03 PM
Accepted Answer
You should try to output the $state and see what is the output :)
Please do take some time to read through some of these links:

http://stackideas.com/docs
http://stackideas.com/support


Our Social Media Pages:

http://facebook.com/StackIdeas
http://twitter.com/stackideas

We are sorry, you need a valid subscription for EasyDiscuss
in order to view replies for this post in this category.

Your time
Stack Ideas time
Support is
Online
We are online!

The support team is online and will be able to answer your inquiries. Please stay calm, follow the rules and do not cross post.

We will attend to you as soon as we can.


Official support hour is:
Monday — Friday. 10:00 am - 7:00 pm
Our timezone:
Kuala Lumpur (GMT +8)