YaBB SE Community

Development => Completed mods => Topic started by: Beertje on October 14, 2002, 03:57:52 AM

Title: [Done 1.4.1] Guests can view memberlist
Post by: Beertje on October 14, 2002, 03:57:52 AM
With this mod you will give guests the right to view the memberlist.

Email addresses that are set as hidden in the members profile will not be visible for guest.

You can download this one at: http://www.acherentals.com/YaBB_SE/attachments/guest_can_view_memberlist.zip (http://www.acherentals.com/YaBB_SE/attachments/guest_can_view_memberlist.zip)

REMARK: The package contains also a version to mod your memberlist in case you installed the Online Time Mod v0.3a by Vorapoap.
Title: Re:[Done 1.4.1] Guests can view memberlist
Post by: Beertje on October 23, 2002, 05:31:22 AM
No comments on this, so it's DONE now.
Title: Re:[Done 1.4.1] Guests can view memberlist
Post by: Daniel D. on October 23, 2002, 01:30:01 PM
Nice ! Thx.
Title: Re:[Done 1.4.1] Guests can view memberlist
Post by: sensovision on June 22, 2003, 02:35:32 PM
Hi Beertje, nice mod! BTW will you make it compatible with 1.5.4?
Title: Re:[Done 1.4.1] Guests can view memberlist
Post by: sharkey on March 26, 2004, 12:20:32 PM
just tried this on 1.5.5 with no luck, any chance of it being updated ? :)
Title: Re:[Done 1.4.1] Guests can view memberlist
Post by: sharkey on March 26, 2004, 01:51:10 PM
Just had a go at updating the code myself and it seems to be working ok on my board, guests can now view the member list and if email is hidden it is not shown to guests (as per the previous code).

Not sure what the procedure is for updating code, so I do apologise if this is breaking any rules but hopefully someone will find the below useful.  

Note this is not my mod, but simply updated code based on Beertje's original mod. The below is how my mod file now looks.


Code: [Select]
<id>
Guests can view memberlist
</id>

<version>
1.0
</version>

<author>
Beertje
</author>

<homepage>
http://www.acherentals.be/
http://www.acherentals.com/YaBB_SE
</homepage>

<mod info>
This mod will show the memberlist to guests also.
Email addresses that are set hidden in members profile are not shown in the memberlist.
</mod info>

<edit file>
Sources/Memberlist.php
</edit file>

<search for>
if ($username == "Guest")
   fatal_error($txt[223]);
</search for>

<replace>
// if ($username == "Guest")
//   fatal_error($txt[223]);
</replace>


<search for>
   if ($user == 'Guest')
      fatal_error($txt[223]);
</search for>

<replace>
//    if ($user == 'Guest')
//      fatal_error($txt[223]);
</replace>


<search for>
      $row['emailAddress'] = (($row['hideEmail'] && $settings[7] != "Administrator" && $allow_hide_email) ? "" : "<a href=\"mailto:$row[emailAddress]\"><img src=\"$imagesdir/email_sm.gif\" alt=\"$txt[69]\" title=\"$txt[69] $row[realName]\" border=\"0\" /></a>");
</search for>

<replace>
      $row['emailAddress'] = (($row['hideEmail'] && ($settings[7] != "Administrator" || $user == "Guest") && $allow_hide_email) ? "" : "<a href=\"mailto:$row[emailAddress]\"><img src=\"$imagesdir/email_sm.gif\" alt=\"$txt[69]\" title=\"$txt[69] $row[realName]\" border=\"0\" /></a>");
</replace>


<search for>
    if ($user == "Guest")
      fatal_error($txt[223]);
</search for>

<replace>
//    if ($user == "Guest")
//      fatal_error($txt[223]);
</replace>

<search for>
   if ($user == 'Guest')
      fatal_error($txt[223]);
</search for>

<replace>
//   if ($user == 'Guest')
//      fatal_error($txt[223]);
</replace>