UPDATES EasyBlog 6.0.11 Released! Update to the latest version now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is online
Our support specialists is available now. We will attend to you as soon as we can.
  Support is online
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. :)
The replies under this section are restricted to logged in users or users with an active subscription with us