Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#265 2008-01-29 20:16:06
Re: mem_self_register
I tried to do a new install of mem_self_register on a brand new svn install. After clicking “Start Install Wizard,” the next page returns three errors:
A problem occured while loading the plugin: mem_form -> Notice: Undefined index: mem_self_admin_email on line 135
A problem occured while loading the plugin: mem_form -> Notice: Undefined index: mem_self_admin_name on line 136
A problem occured while loading the plugin: mem_form -> Notice: Undefined index: mem_self_new_user_priv on line 137
The only plugins I have installed are mem_self_register 0.9, mem_form 0.3, and ign_password_protect 0.4.2d.
I haven’t tried clicking Install so I don’t know what happens then.
Offline
#266 2008-01-30 16:19:07
Re: mem_self_register
Those are safe to ignore. The notices are caused from the config values not existing in $prefs yet. The install would resolve this. I also uploaded a new copy that should silence them.
Offline
#267 2008-01-30 18:29:17
Re: mem_self_register
Manfre wrote:
To those wishing to do a public profile, I have started to add support for it. Available in SVN, I have v0.8.4b with an updated mem_profile tag.
Any possibility of adding an image attribute to the <txp:mem_profile /> tag?
Swim Kitten, A Magento Site
When nothing but incredibly revealing dresses and swimwear will do
Offline
#268 2008-01-30 18:30:47
Re: mem_self_register
Add the field to the db and then you should be able to reference it by the case sensitive name.
Offline
#269 2008-01-30 18:31:31
Re: mem_self_register
Manfre wrote:
Add the field to the db and then you should be able to reference it by the case sensitive name.
Yep – just saw the previous notes about using custom fields. I’m assuming that will do it. Thanks!
Swim Kitten, A Magento Site
When nothing but incredibly revealing dresses and swimwear will do
Offline
#270 2008-01-30 18:34:52
Re: mem_self_register
I’ve also been in discussion with Patrick about glx_gravatar. I think it works with the <txp:comment_email /> tag, but I’d like to get it to work with users in Txphorum, too. Because Txphorum posts are actually articles, and not comments, it won’t work out of the box. Still, I’m sure there’s a way to call the users email (probably through your <txp:mem_profile /> tag) and have the gravatar show up. Any thoughts?
I really don’t know php, but here’s the portion of Patrick’s code that I think is making the call:
$url = ‘http://www.gravatar.com/avatar.php?gravatar_id=’; $url .= md5($thiscomment[‘email’]); if (!empty($atts[‘rating’])){ $url .= ‘&rating=’.$atts[‘rating’];
Maybe altering or adding to ($thiscomment[‘email’]); will do the trick?
Ok. Off to lynda.com. It’s high time I try to learn a little bit of this myself.
Last edited by rsskga (2008-01-30 18:41:40)
Swim Kitten, A Magento Site
When nothing but incredibly revealing dresses and swimwear will do
Offline
#271 2008-01-30 18:49:36
Re: mem_self_register
You’ll need a tag to fetch the email of an author from an article ($thisarticle). I’m not sure which plugins will do that, but the tag would look something like below. You could then use it with asy_wondertags to feed it in to another tag that creates the gravatar links.
Note: this is untested and never parsed code. Treat as pseudo code.
function mem_author_email($atts,$thing) {
global $thisarticle;
static $map = array();
assert_article($thisarticle);
$username = $thisarticle['AuthorID'];
if (!isset($map[$username])) {
$out = safe_field('email', 'txp_users', "name = '".doSlash($username)."'");
$map[$username] = ($out ? $out : '');
}
return $map[$username];
}
Offline
#272 2008-01-30 19:23:47
Re: mem_self_register
Great. rss_author_email will fetch it. It seems to be a simpler, more stable plugin than rss_author_info (which has been giving me 500 internal server errors that I can’t quite diagnose).
Ok – yes, I already have asy_wondertags installed. I’ll report back shortly. Thanks for the collaboration.
Swim Kitten, A Magento Site
When nothing but incredibly revealing dresses and swimwear will do
Offline
#273 2008-01-30 19:44:20
Re: mem_self_register
Some questions about the thought process:
Patrick’s glx_gravatar has this line:
$url .= md5($thiscomment[‘email’]);
which I want to change to:
$url = md5($thisarticle[‘some-email-field’]);
It seems that I should find the field title in the database. But in trying to match Patrick’s, there is no ‘comment’ field in the database — it’s ‘txp_discuss’. So, why wouldn’t it have to be ($thistxp_discuss[‘email’]? How do I know what the names of the elements are?
What I want from the database (at least I think, since I’m using the alternate database for Txphorum self-registered users) is [‘ign_usersemail’]. But, how do I know exactly what name to give it if it’s not just the database table and field names?
BTW… I am looking at the plugin help now, too. I may find an answer there.
***Update – I now successfully have gravatars working with Txphorum. I’m researching what the appropriate way to release this back to the community is. It may get folded into existing plugins that it so heavily borrowed from, or it may become it’s own entity.
Last edited by rsskga (2008-02-04 18:14:06)
Swim Kitten, A Magento Site
When nothing but incredibly revealing dresses and swimwear will do
Offline
#274 2008-01-30 21:40:46
Re: mem_self_register
I installed the new version of the plugin and the previous error disappeared. Unfortunately, in their place was:
A problem occured while loading the plugin: mem_moderation -> User_Error: Unable to include required plugin “mem_admin_parse” on line 482
I googled mem_admin_parse and installed the plugin. Same error. I decided to chance continuing and on the next screen got:
Notice: Undefined index: html in /home/.lancelot/michaelkpate/michaelpate.org/textpattern/lib/txplib_misc.php(574) : eval()’d code on line 284
Notice: Array to string conversion in /home/.lancelot/michaelkpate/michaelpate.org/textpattern/lib/txplib_misc.php(574) : eval()’d code on line 85
as well as the first error on the top of the screen.
Getting closer… :)
Offline
#275 2008-01-30 22:05:13
Re: mem_self_register
What version of mem_moderation are did you install?
Offline
#276 2008-01-31 02:58:15
Re: mem_self_register
Manfre wrote:
0.4.10What version of mem_moderation are did you install?
The good news is that I noticed I forgot to activate mem_admin_parse. Everything seemed to install without a hitch this time.
The bad news is that when I try to create an account, I get:
Fatal error: Call to undefined function: generate_password() in /home/…/textpattern/lib/txplib_misc.php(574) : eval()’d code on line 418
You can visit my test install at http://michaelpate.org/register/
I apologize for being such a nuisance. :)
Offline