groupjive_jb.php issue...

15 years 5 months ago #25409 by dsendecki
groupjive_jb.php issue... was created by dsendecki
Hey Fluffy --

First off -- excellent work!

First off, if I am a registered user but not a member of a group, I can browse open groups, look at members, and read 'bulletins'.

I can even read a group's forum posts (I have integrated Joomlaboard). In fact, I can still post to a group's forum post.

I think that these forums are meant to be for group members only -- ie only group members should post and 'see' their own forum.

However, there is a problem with this code:

[code:1] if($result == $group_cat )
{
$q=("SELECT group_id from #__gj_jb, #__gj_users WHERE category_id='$catid' AND $my->id=id_user AND id_group=group_id"«»);
$database->setQuery($q);
$gid=$database->loadResult();
$groupjive=1;
if(!empty($gid))
{
showgroup($gid);
}
else
{
echo "You are not authorized to view this page.";
}

} [/code:1]

When a user who is not a member, clicks on the "Group Forum" link, they are presented with the message "You are not authorized to view this resource"

That is great, but the problem is that the forum still displays underneath this message.

That is because when a user clicks on the "Group Forum" link, the modified joomlaboard file is called.

This modified file "includes" groupjive_jb.php which runs the above check (in the case of a non-member, displaying the "unauthorized" message) but after it runs the above check, it still outputes the group forum.

I hope my message was clear!

What do you think?

Please Log in to join the conversation.

15 years 5 months ago #25557 by fryedpye
Replied by fryedpye on topic Re:groupjive_jb.php issue...
just loaded this and had the same problem.

The problem is at the group listing page you need to open the "groupjive.html.php" page and remove the href tags from here:


echo "<tr style=border-bottom: solid #096BFF 1px;><td class=sectiontableentry1><b><a href=".sefRelToAbs("index.php?option=com_groupjive&task=showgroup&groupid=$row->id").">".stripslashes($row->name)."</a></b></td>";
echo "<td valign=top class=sectiontableentry1><a href=".sefRelToAbs("index.php?option=com_groupjive&task=sign&groupid=$row->id").">".gj_sign."</a></td>";
}
elseif ($row->type != '3' && !checkuseractive($row->id,$my->id))
{
echo "<tr style=border-bottom: solid #096BFF 1px;><td class=sectiontableentry1><b><a href=".sefRelToAbs("index.php?option=com_groupjive&task=showgroup&groupid=$row->id").">".stripslashes($row->name)."</a></b></td>";
echo "<td valign=top class=sectiontableentry1>".gj_pending."</td>";

in both of these tables remove all of this
<a href=".sefRelToAbs("index.php?option=com_groupjive&task=showgroup&groupid=$row->id").">


Save the file and job done www.joomlapolis.com/components/com_joomlaboard/emoticons/cool.png
B)

Please Log in to join the conversation.

15 years 5 months ago #25619 by Fluffy5
Replied by Fluffy5 on topic Re:groupjive_jb.php issue...
Hi guys!
Please see a thread in the forum on www.groupjive.com that solves this problem. I think it's under the 1.5alpha forum. I would link directly to the topic, but the site is offline (again).

And since the groupjive site is up again, here is the link to the thread mentioned above.
http://groupjive.com/component/option,com_mamboboard/Itemid,27/func,view/id,687/catid,9/

Post edited by: Fluffy5, at: 2006/11/27 22:00

Please Log in to join the conversation.

15 years 5 months ago #25647 by WakiPaki
Replied by WakiPaki on topic Re:groupjive_jb.php issue...
Thanks fluffy, i could have sworn i checked that post before. Oh well. I got my group type saving issue fixed by doing what you posted in the thread:

This is a stupid little bug that is easily corrected. In the file groupjive.html.php on line 496 and 497, change the option values to 2 and 3 respectively. The whole list of options should look like this:

if ($row->create_open) {echo '<OPTION value="1"> '. gj_open.' </option>';}
if ($row->create_closed) {echo '<OPTION value="2"> '. gj_aprequired.' </option>';}
if ($row->create_invite) {echo '<OPTION value="3"> '. gj_private.' </option>';}


Now.. my problem with the module not showing me as part of a group i created, still working on.

Please Log in to join the conversation.

15 years 5 months ago #25649 by Fluffy5
Replied by Fluffy5 on topic Re:groupjive_jb.php issue...
See, this is why I locked the forum on groupjive.com. Obviously I can't remember what has been discussed there when answering questions here. :blush:

Please Log in to join the conversation.

15 years 5 months ago #25653 by WakiPaki
Replied by WakiPaki on topic Re:groupjive_jb.php issue...
hehe i hear ya!

Question, i know the integration with joomlaboard is a bit iffy, but the files and changes you posted in that thread on groujive.com they would apply to joomlaboard 1.14 would they? I tried just pasting over those files to see if they worked but get errors.
Thanks

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.177 seconds

Facebook Twitter LinkedIn