Search

A new Extension, “Members (Unofficial Release)” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

The Official Release

Edit: The Official Members Extension has been released as the Frontend Membership Extension. Unless you are using Symphony 2.0.6, you’ll be far better off using the official version (see discussion).

About the Unofficial Members Extension

All credit for creating the extension goes to Alistair Kearney. I am merely releasing this extension, unofficially, as a GitHub repository.

While not officially released by the developers, I asked for the Members extension and Alistair was kind enough to supply it. At the time, there were some patches needing to be pushed to the integration branch that prevented the release of the extension. With the release of 2.0.3, the extension seems to be in working order, but I haven’t fully tested it.

I say “unofficially” because I haven’t fully tested the extension and it lacks documentation.

Known Issues

The extension will throw an error when navigating to Members : Roles before configuring preferences in Members : Preferences.

Fatal error: Call to undefined method Symphony::database() in /Users/stephen/Sites/sym/members-ext/extensions/members/extension.driver.php on line 200

Dependencies

The Members extension is dependent on the Advanced Symphony Database Connector (ASDC) and the ConfigurationAccessor class from a Symphony Extensions Library. Install these in the extensions directory.

extensions/asdc
extensions/library/lib/class.configurationaccessor.php

Installation

These can be installed with Git by cloning the GitHub repositories:

cd extensions
git clone git://github.com/bauhouse/members.git
git clone git://github.com/pointybeard/asdc.git
git clone git://github.com/bauhouse/library.git

Or install them as submodules:

git submodule add git://github.com/bauhouse/members.git
git submodule add git://github.com/pointybeard/asdc.git
git submodule add git://github.com/bauhouse/library.git

Configuration

Alistair hasn’t had time to document configuration and usage, but he did provide a brief set of instructions:

The Members extension provides 3 new fields. The important 2 are “Member Role” and “Member username & password”, both of which need to be added to a member section and then specified in the preferences. Then, to allow logins, use a utility like this one for a login form:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template name="login-panel">
    <xsl:param name="member" select="/data/events/member-login-info"/>
    <form id="login-panel" action="{$current-url}" method="post">
        <fieldset>
            <ul>
                <xsl:choose>
                    <xsl:when test="$member/@logged-in = 'true'">
                        <li>
                            <a href=""><xsl:value-of select="$member/name"/></a>
                            <xsl:text> </xsl:text>
                            <a href="?member-action=logout">(Logout)</a>
                        </li>
                    </xsl:when>
                    <xsl:otherwise>
                        <li><input name="username" value="username"/></li>
                        <li><input name="password" type="password" value="password"/></li>
                        <li><input id="submit" type="submit" name="member-action[login]" value="Log In"/></li>
                    </xsl:otherwise>
                </xsl:choose>
            </ul>
        </fieldset>
    </form>
</xsl:template>

</xsl:stylesheet>

Notice that you don’t need to explicitly add any event to your pages. The Member extension uses delegates to validate logins based on the existence of member-action[login] in the forms post data.

Perhaps Alistair can chime in and explain what the “Member Link” field is for. When I have tried to use it, I get a validation error, so I haven’t figured out what it’s for yet.

From my experience of using this (in its previous guises, and through tinkering with this forum) the Member Link field is for linking entries to a member account, like a Select Box Link (ish).

In the context of this site, there is a Members section that contains the Member Role and Member Username/Password fields (as well as email address and other information). Each forum Discussion entry has a Member Link field, stating which Member it belongs to. In the backend this is manifested as a textfield with the Member “username” in it. But when sending via an Event I believe you need to send the ID of the Member entry itself.

This is great, can’t wait to try it out.

Should any bugs or patches be sent directly back to you Stephen, or should we hold out for it to be officially supported?

Thanks for the info about the Member Link field, Nick. I was thinking it had to be something similar to a Select Box Link, but when it showed up as a text field, it threw me off. It would be great to enhance this field with functionality similar to czheng’s Reference Link field.

It’s sounds like Alistair has given his blessing and he hasn’t had time to release an official version. I think it makes sense for the community to do some of the heavy lifting on extensions like this so the dev team can focus on Symphony 3.0. I am happy to host the unofficial fork until Alistair releases the official version, at which time we can merge the changes made by the community into the official release.

Stephen, have you made the login form functional on any of your sites yet? I’ve included as you note above, but it doesn’t seem to actually do anything. I’m not seeing any errors in the logs.

To be honest, no. I only got as far as producing the front end form to allow members to register, which works fine. I was trying to figure things out without any documentation, and got stumped on login. The quote from Alistair above is his answer to me when I got stuck, but I honestly haven’t had time to try it out yet.

False alarm - it was far too late for me to be doing much other than falling asleep. I have the whole shebang working just great.

This is something that should be included in the list of submodules included with Symphony - seriously, it’s that good. Well done, Alistair!

Awesome, I might give this a go then :-). Just needs documenting! I’ve been experimenting using a Markdown-formatted README on Markdown for documentation (here and here). Could we do the same for this? I’m not sure it needs a full Guthub wiki.

  • Installation and dependencies
  • Configuration
  • Creating roles and permissions
  • Using the Member Link field in other sections
  • Filtering by members and Data Source/XSLT

Would be a real feather in the cap.

One step closer to more essential functionality (besides the core that is) in Symphony, yay! Will check this out, thanks Alistair & Bauhause.

I’ll take a look at putting together documentation around what I’ve found to work later in the weekend and post back here when it’s ready.

Thank you community for picking this up. We’re definitely running thin on human hours to do everything! Rest assured though that once our backlog of stuff clears out, we’ll jump back into this one.

I will contribute to this where I can as I’m using it for a project. It works similar to a Members extension (unreleased) I created but with much more functionality and robustness, so I’m looking to switch over and further this one’s development.

I’m finding the Select Box Link field more useful than the Member Link field; better admin navigation with the former.

I’ve also added a param in the driver, $member-id, to be able to filter datasources to the specific member.

Great! Looking forward to seeing how you make out with this.

@nickdunn:

Just needs documenting!

Sorry, Nick, I’d forgotten I hadn’t done this yet. Hopefully, this GitHub documentation makes up for it. I tried to be as thorough as possible, without having had the chance to delve in too deep myself, yet. Hope to do so now. Luckily, Alistair just pulled in my fix for a CSS bug on the admin pages to the integration branch which affects this extension in Firefox.

Wowee, yes this is brilliant :-) If only all extensions had this level of documentation! This will make it so much easier next time I need to use this. Thank you.

Great! Looking forward to seeing how you make out with this.

I sent my changes… hope I did it correctly.

bauhouse: Members > Roles throws an error if there isn’t a member section selected yet:

Fatal error: Call to a member function get() on a non-object in extensionsmemberscontentcontent.roles.php on line 61

Maybe that can be replaced with a message asking to create and select a section first.

And after deleting the members-section, I get the following error in Members > Preferences (thus disabling me from chosing another section):

Fatal error: Call to a member function fetchFields() on a non-object in extensionsmemberscontentcontent.preferences.php on line 75

In this case, the extension should display the well known notification-bar on top but not break down completely.

Additionally, the CSS looked a bit broken to me. I’ll look into that after I got it working again… :-)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details