Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[UPDATE] User_Edit_Profile

Quote Reply
[UPDATE] User_Edit_Profile
I don't see any messages here on this one, but it's on the UltraNerds site.

I've been updating and upgrading it, and there will be a User_Edit_Profile_Pro as part of the OEM systems, but I've made quite a few bug fixes, and upgrades to some of the utilties used to display fields. It wasn't a huge plugin to begin with, so a few lines of code changes are "major" <G>.

I'll release a 3.0 version (to bring it in line with GLinks) once I'm sure there are no more bug fixes, and the multipage/multiprofile version will be released once I'm done with it, hopefully real soon, as I've spent the last 3 days doing nothing but this one "little" (yeah, right) system. This *is* a major program, and everything I do seems to require 3 layers of reworking to generalize it, so nothing is "hard coded".

Just a note on something else. A year ago, or more, we said we would be changing our pricing policies to match the GLinks "major version" licensing. That *will* go into effect in the next few weeks, and I'll be updating the notices on the UltraNerds site to reflect any changes in the previously released info.

The programs and plugins are getting too complex to be put under a one-price-gets-all-forever blanket. The smaller utilities will still be in the Ultra Packages, but many will be moved into the "Ultra Widgets" as some older plugins can be reduced to a few lines of code now (things have changed).

In short, the "Ultra" packages will give you a 1 year license, which is renewable each year at a percentage of the current values. Individual utility programs purchased at full price, still give unlimited upgrades. More complex programs will give you upgrades/bug fixes through the current major version. OEM/Major programs will give you upgrades through the major version, and may have other attached plugins or add ons for each development tree.

Old licensing will be honored, if you've already bought the Ultra packages, etc. Service contracts, custom work, support, etc, will be as usual. Only the pre-written software is affected.

If you are considering any of the plugins, now is the time. Also, if you are purchasing, please leave me a PM here or in the UltraNerds Forum, as I may not get the auto notifications yet.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] [UPDATE] User_Edit_Profile In reply to
Worked most of the night on this, and made a few little changes (it's amazing how hours of playing can be reduced to a line of code <sigh>) and there are now a series of routines that allow a lot of flexibility, and the calling function is a bit long, but only one function is needed, not several.

<%Plugins::User_Edit_Profile::load_user_profile_table ('table_name')%>

This loads a data record belonging to the logged in user from table_name (eg: another profile page). In this plugin, it defaults to "Users", but if/when I get this into the Widgets, it will be a settable default parameter. The current config allows you to set the key fields in the profile tables, but defaults to Profile_Username (to differentiate from Users::Username/user.Username which is *always* the logged in user).

<%Plugins::User_Edit_Profile::get_fields_like ('fields_like_')%>
<%-- the return is <%found_fields_like%> as an array of hashrefs
Profile_Field_Name => is the column
Profile_Field_Value => is the value of that column (just like the standard tags)
--%>

This returns an array of hashrefs (a loopable variable) of all the fields in the current tags set, that begin with the "fields_like_" field.
If you have a large number of check or select boxes, if you prefix them all with same prefix, you call this function, then you can loop through them, and only them. So if you have a few fields you want to manually format (create a form) you can auto generate the rest of them by using:

<%loop found_fields_like%> ... <%endloop%>

The main function, the one that returns the actual <%pretty_name%> and <%formatted_field%> is this one:

<%Plugins::User_Edit_Profile::FormatField_Select($Profile_Field_Name, $Profile_Field_Value, 'table_name', 'radio', '0')%>

It gets called inside the loop, for each record, or at the position in your template you want to return the auto-generated input box.

The $Profile_Field_Name and $Profile_Field_Value could be your regular 'tag_name' (hard coded) and $tag_name (it's <%tag_name%>) The point of using the loop, though, shows it's full functionality.

table_name is needed to grab an HTML object, this is a requirement of GLinks.

The next two fields are optional. They default to "select" and '0'. If you want a radio/select/checkbox you can pass in that parameter. If you want to have "no/0" fields removed, you can pass in a 1. This really doesn't apply to select boxes, which is why I did it this way, but lets say you have 20 yes/no fields. You can use select boxes, but it's annoying. You can use radio buttons or check boxes with both yes/no boxes, but it's also visually annoying. If you pass in "1" the "no=0" value is removed, and only the "Yes[]" value is shown on the form. If the field is set, the Yes[x] is checked, (or selected, for a radio button). If not, it's not. This probably has some quirks, but it seems to be working.

Oddly, this is a smaller routine than the previous ones. The calling function is a bit ugly though, and only if there is an outcry of horror, will I try to simplify it, by making some wrappers. (perhaps when/if it gets added to the Widgets). But, you really need to have a field name, selected/default value and a table, so to simplify it, some assumptions would have to be made, and that can be problematic.

There's actually a lot more work, mostly in setting up the install and management code, but if anyone needs a more advanced profile editor, and wants to suffer through this beta, I'll offer a big discount. This Profile_Editor_Pro is going to be a big plugin, and has taken up all my time at the moment. The main advantages are it allows using arbitrary tables for storing different profile data, so you don't have one HUGE table, and you can use this as a development platform for customizing advanced profile pages like some of the more advanced community sites. I have to more routines to write, and I'll show off a beta. I have to walk through the process of creating a new profile table, and make sure all the logic/routines work, and then it's ready for pre-release testing.

Once I get that done, the demo site will be posted.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] [UPDATE] User_Edit_Profile In reply to
I just posted this in another thread, on a reply to users being able to add categories,

===


I've spent the last few weeks working on the advanced profile system, and last night started working on the last piece (the display-only code). The security is really tight, which is what is taking so long, and I've moved a lot of functionality to the templates, so you could override the way the system works by writing a global, or a new function, without actually editing any of the "core" profile code. Basically, I've said the GT template parser is as powerful as PHP, if not more so, and I think I'm starting to prove it <G>

===

This program and the models/photographers gallery program are going hand in hand, as my needs require some interlocking features. I'm trying to generalize as much as possible (rather than quickly coding/hacking a routine) so that is taking extra time, but is going to allow the plugin to roll out as soon as the beta system is stable.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] [UPDATE] User_Edit_Profile In reply to
I just went through the profile system, and I think I can have the update to the existing User_Edit_Profile plugin in a day or two. There are some bug fixes, and enhancements.

There is an Ultra_Profile plugin, that is also nearer to completion than I thought. This is a profile editor, set up to manage ONE other table, and has some extra features to do that. Many features are hard-coded, to make this plugin easier to maintain, and to set up templates for. They are slimmed down versions of the Ultra_Profile_Pro, which is part of the OEM programs, and which will be released as a stand-alone item.

I see the need for several sorts of profile editors, rather than one huge monster.

1) the original one, that allowed a user to edit aspects of their basic GLinks profile, such as newsletters, bookmarks, and such. This ties in to a basic install, and is most of the functionality most people need. It only manages the Users table, and any extra fields are added to that.

2) An advanced editor, that uses an extra table to store extended profile data. On the site I will beta it on, it will allow a user to upload a profile about their body mods, interests, and such. When combined with one of our image management programs, it *should* allow some flexibility with linking to images, and setting up a nice display page. It will be almost everything *most* sites need for setting up an "about me" type page. Many of the functions will be available through the Ultra_Widgets system, for generalized use in your other templates.

3) The Pro version, will allow an arbitrary number of tables to be attached, for different sorts of profiles. They can all be managed, and called from within the templates, and the functions are self contained, so they will mesh with other plugins, and templates, and OEM functions. Most configuration will be done through the inital set up (the actual layout, types and numbers of profiles, etc) and through the templates (all the display functions). You should *not* have to muck with the code at all to heavily customize the system, if you spend a little time learning the advanced features of the template parser system, such as functions, loops, and the various control blocks.

Both the advanced and Pro versions can do pretty impressive things within the context of the templates, since all functionality is just another callable function, and any existing functions can be used. The search templates will be enhanced to allow for advanced searching in the Pro versions.

The basic profile editor *may* become a free plugin, if it's not already.

Anyone who purchaed this, will get an upgrade to the Advanced editor under current license terms. You do *NOT* have to upgrade, if you do not want to. It's an option. It *should* be compatible with only any of your custom template changes necessary. The extra functionality does not have to be accessed, if you don't want to use it.

The Pro version is a standalone version, that is also being integrated into our OEM programs.

These are major functionality releases, and will offer enhanced experiences to your users, and many new features as these initial versions mature.

NOTE: The integration into the Ultra_Widgets system is an ongoing effort, and will probably not debut until later in the year. Ultra_ package owners will be the first to benefit from it, as new versions of the Ultra_ packaged programs are released. Function and subroutine calls will share a common library, making it easier to maintain, and share a common interface between plugins no matter when they were written or by whom.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.