View Kevin Jardine's plugins
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.
Try changing tha page owner bit at the top to
// Get the current page's owner
$page_owner = page_owner_entity();
if ($page_owner === false || is_null($page_owner)) {
$user = get_loggedin_user();
if ($user) {
$page_owner = $user;
set_page_owner($user->guid);
}
}
//set poll title
if(page_owner() == get_loggedin_userid()){
$area2 = elgg_view_title(elgg_echo('polls:your'));
}else{
$area2 = elgg_view_title(sprintf(elgg_echo('polls:not_me'),$page_owner->name));
}
I never see the problem you mention, so I am floundering a bit, but at least the new code uses the latest Elgg API.
And of course the page owner should already be set to the group anyway. What this is not happening is baffling. It works under Elgg 1.7.1 for me.
Still same.
It's got me stumped at the moment as well. I've been going over the code to see if I can spot anything, so far no luck.
My mistake - the issue is not the page owner. This was a red herring.
The problem is a bug in the core get_objects_in_group, apparently.
I'll post it to trac if it is not already there.
To route around the bug, add:
add_subtype('object', 'poll');
polls_init in start.php
RPGRealms - did that fix work for you?
I looked in get_objects_in_group() and cannot see how the code there could possibly be generating the bad query you reported. It would be helpful to know if my latest fix worked for you.
It's a core bug I believe.
http://trac.elgg.org/ticket/1495
I say this because I'm getting a error log warning:
WARNING: 2010-07-15 03:50:25 (EDT): "parse_url(/pg/polls/list/group:210) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL" in file /xxxxxx/xxxxxx/xxxxxx/engine/lib/elgglib.php (line 941)
Damn, you are posting right before I am. I'll check your work around in a sec.
And that's got it. No more error with the add_subtype fix.
I finally figured out the core Elgg bug and posted it to:
http://trac.elgg.org/ticket/2358
The avatar for groups needs to be resized to fit in the poll header when larger avatars are used. Perhaps force a set size?
Heh, I've run into a few issues with Groups as I've been playing with the code and creating plugins for the engine. Still, I'm impressed as hell with Elgg from a programmer's standpoint. It's pretty damn easy to work with.
RPGRealms, please tell me if you have a fix for the avatar/icon issue. I have not had a chance to look at that yet.
Sure, give me a few minutes and I'll start digging around and see if I can come up with something.
The icon size was set to "medium" in object/poll.php. I just changed it to "small" instead. There are still a few css/formatting issues. In the code it calls for a non-existant "strapline" class for css formatting. Looks like part of the fix from webgalli you added.
My mistake, the strapline is in the css, but probably should be set to p.strapline rather than just strapline.
Hi Kev. I've got a css issue as well. It breaks right after the Comments (0) when viewing an actual poll.
This happens for both individual and group polls.
Elgg 1.7.1 xampp
You mean that the tags are below the Time/Owner/Comments lines?
That's how it's coded.
For CSS issues, please post patches.
views/default/object/poll.php
line 99 - 116
Something here is causing the CSS to not render. Commenting all of those lines out makes the page load fine.
I'll work on it a bit more see what I can come up with.
Hi Kevin and RPGRealms,
Cutting back into the loop a bit late, but I see the group polls issue has been solved, and it works for me also!
Nice one!
Kevin,
compatibility issue of flexgroupprofile and polls is still there. when you click on any group icon, with both plugin's installed, the system trys to load the group page e.g.
http://localhost:8888/pg/groups/188/groupname/
. . and fails eventually returning a blank page.
Newbrie
Hi Newbrie,
I have both plugins activated and do not see this problem, and neither does the client who funded the development (or rather redevelopment) of the polls plugin.
I experimented with changing the plugin order but still could not reproduce the problem.
So I can't help further without more information (eg. a relevant message from your error log).
Hi, Kevin
I want to use this plugin im my site. I have read all the comments, but I didn't grasp how to use this plugin in Elgg 1.7.1 because of my poor English. Could you please give me some directions?
Regards!
OnlyBlue