Posted on: 07/21/04 12:59pm
By: mvaughn
I am trying to get my plugin (forum) link to show up in my header. It only shows up when I am logged in as Admin. Otherwise, when users are logged in, the link (forum) doesn't show up. However, if I change user privelages to forum admin, the link will show up in the header. Any suggestions on how to make this work without making users admins?
Mike
Plugin links in Header
Posted on: 07/21/04 06:41pm
By: JohnVanVliet
well the code is slightly diff. for each skin in the layout file .
I am using a hack of Evolution
one way is to add {plg_menu_elements} in the header.thtml file . Hear is an example
{plg_menu_elements}<td align="center" class="navcell" width="15%"><a class="navtext" href="http://johnscelestiapage.no-ip.com/VirtualTextures/">"John'sVirtualTextures"</a></td>
or you can add a table to the header
<p class="header3">{datetime} <a id="navcell123" href="http://www.shatters.net/celestia/"><span id="navtext123">Celestia: A 3D Space Simulator</span></a></p>
<br>
<table width="90%" class="navtable" cellspacing="0" cellpadding="1" border="1" align="center">
<tr onMouseover="changeto(event, '#707070')" onMouseout="changeback(event, '')">
<!-- [[td align="center" class="navcell" width="11%"]][[a href="{site_url}/profiles.php?uid=2"]][[font color="#f2f2f2"]]{button_contact}[[/font]][[/a]][[/td]]-->
<td align="center" class="navcell" width="15%"><a href="{site_url}/gallery"><span class="navtext">gallery</span></a></td>
<td align="center" class="navcell" width="15%"><a href="{site_url}/calendar.php"><span class="navtext">Calendar</span></a></td>
<td align="center" class="navcell" width="15%"><a href="{site_url}/links.php"><span class="navtext">Links</span></a></td>
<td align="center" class="navcell" width="15%"><a href="{site_url}/usersettings.php?mode=preferences"><span class="navtext">Preferences</span></a></td>
</tr>
</table>
<br>
<table width="75%" class="navtable" cellspacing="0" cellpadding="1" border="1" align="center">
<tr onMouseover="changeto(event, '#707070')" onMouseout="changeback(event, '')">
<!-- [[td align="center" class="navcell" width="11%"]][[a href="{site_url}/profiles.php?uid=2"]][[font color="#f2f2f2"]]{button_contact}[[/font]][[/a]][[/td]]-->
{plg_menu_elements}<td align="center" class="navcell" width="15%"><a class="navtext" href="http://johnscelestiapage.no-ip.com/VirtualTextures/">"John'sVirtualTextures"</a></td>
</table><BR>
<table border="0" cellspacing="5" cellpadding="0" width="95%" >
<tr>
{left_blocks}
<td width="95%" valign="top">
<!-- START OF CONTENT AREA -->
to see it in action click
" here-johnscelestiapage.no-ip.com/ "[*1]
but adding a plg_menu_elements for the fourms is probly your best bet
Plugin links in Header
Posted on: 07/22/04 09:41am
By: mvaughn
The {plg_menu_elements} does exist in the header file and displays the link correctly for the admins, but not for the basic users. My workaround is to manually put the link in the header file... although this creates two "forum" links for the admins.
Plugin links in Header
Posted on: 07/22/04 09:54am
By: Blaine
Check your forum plugin settings. You may have "Register to View" set to yes. In that case, only members that have forum.user permission (ROOT has all rights) will be able to access the forum and see the link in the header.
Plugin links in Header
Posted on: 07/22/04 10:05am
By: mvaughn
Thanks!! That did the trick. I knew it had to be something simple.
Plugin links in Header
Posted on: 07/22/04 10:57am
By: mvaughn
...wait, that wasn't the trick I was looking for. What I want is for registered users ONLY to be able to use the forum. But registered users can't access the forum link without giving them admin privilages... then the link shows up for them. It seems logical that the link would normally show up for registered users... but it doesn't.
Just for FYI purposes, I am creating a forum to be used by worldwide groups (within our company) to post for topic discussion and workshare purposes. I don't want just anyone to be able to view the discussions that go on there for security reasons. Another problem I have is that while setting 'loginrequired' = 1 and everything else to 0, unregistered users can still view the posts. Is there another way around this?? Any help is greatly appreciated. Thanks.
Mike
Plugin links in Header
Posted on: 07/22/04 11:11am
By: Blaine
Yes there is a solution. I just debated this same question and design on my site with another user.
I can not assume that you will want all registered members to access the plugin so I do not by default enable this. You may have wanted only certain members to access the forums.
So ... you need to add the permission forum.user to the group that will have access. If you want all members of an existing Core Group like "Logged-in Users" to have access then you can add that new permission to that group.
Wait .. Geeklog won't let you edit the permissions or rights to a Core group. So you can not add the forum.user permission.
Solution: Use the GroupAccess Block that I wrote and available
here[*2] from my site. It allows you to easily add/edit permissions to core groups.
This way plugin developers don't need to have 10 different security settings or options. It's not possible to please everyone or know how they want to setup access.
Plugin links in Header
Posted on: 07/22/04 12:15pm
By: mvaughn
Awesome!!
Thanks!!