I'm trying to make a usersetting that allow user icon display, it's not working. In newestmembers.php,
$show_icon = get_plugin_usersetting('show_icon', 'me4real'); - yes or no from edit.php
foreach($newest_members as $mem) {
if ($mem->show_icon == 'no')
continue;
code ....
What am I doing wrong here?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Per Jensen@gillie
Per Jensen - 0 likes
- Per Jensen@gillie
Per Jensen - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- Per Jensen@gillie
Per Jensen - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- Per Jensen@gillie
Per Jensen - 0 likes
You must log in to post replies.Can somebody see what I'm missing? This is supposed to hide the usericon from newest members. Is it the wrong way to go?
foreach($newest_members as $mem) {
if ($mem->show_icon == 'no')
continue;
echo "<div class=\"recentMember\">" . elgg_view("profile/icon", array('entity' => $mem, 'size' => 'tiny')) . "</div>";
}
Is it possible to get a little hint about this?
Try ->
foreach($newest_members as $mem)
{
echo"<pre>";
echo"($show_icon)\nMEM=>\n";
print_r($mem);
echo"</pre>";
EXIT();
Then send me the display that this shows .
Thank you. A long list...
hmmm... i do not see what i was after ;-( goto skype and we'll have a closer look ;
Following the documentation - http://docs.elgg.org/wiki/Pluginsettings - I have added a usersetting, and it's working, the right value is set on edit.php. But the value is not parsed to the view, which is myplugin/myview, the avatar_on is empty,
$avatar_on = get_plugin_usersetting('avatar_on', 'myplugin');
$newest_members = elgg_get_entities_from_metadata(array('metadata_names' => 'icontime', 'types' => 'user', 'limit' => 18));
foreach($newest_members as $mem){
if ($mem->avatar_on == 'no')
continue;
echo "<li>";
echo "<div class=\"recentMember\">" . elgg_view("profile/icon", array('entity' => $mem, 'override' => TRUE, 'size' => 'small')) . "</div>";
echo "</li>";
}
How do I handle this. Does anybody know of a bug causing this to fail or am I just doing this completely wrong?