Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#271 2008-01-30 18:49:36

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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

rsskga
Member
From: San Francisco, CA USA
Registered: 2007-06-23
Posts: 50
Website

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

rsskga
Member
From: San Francisco, CA USA
Registered: 2007-06-23
Posts: 50
Website

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

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

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

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_self_register

What version of mem_moderation are did you install?

Offline

#276 2008-01-31 02:58:15

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: mem_self_register

Manfre wrote:

What version of mem_moderation are did you install?

0.4.10

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

#277 2008-01-31 15:21:54

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_self_register

No worries. Redownload mem_self_register. I forgot that 4.0.6 moved the admin functions in to a different file. Things should be happy now.

Offline

#278 2008-02-02 01:45:27

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: mem_self_register

Manfre wrote:

No worries. Redownload mem_self_register. I forgot that 4.0.6 moved the admin functions in to a different file. Things should be happy now.

Ummm… I just tried it twice and I am still getting the same error.

Offline

#279 2008-02-02 02:00:15

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_self_register

Can you email a login and url to your txp install? I’d like to take a look.

Offline

#280 2008-02-04 18:19:18

rsskga
Member
From: San Francisco, CA USA
Registered: 2007-06-23
Posts: 50
Website

Re: mem_self_register

Hi Manfre,

Just an FYI… the latest version of mem_self_register won’t work with Txphorum. The “create an account” form goes MIA—probably just because the form or tag names changed and it’s no longer being referenced correctly. I’ll let Ben know, too. He’ll probably want to update Txphorum—maybe your change log will point him in the right direction?


Swim Kitten, A Magento Site
When nothing but incredibly revealing dresses and swimwear will do

Offline

#281 2008-02-04 21:03:21

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_self_register

Raina, the tags have changed with the newest version. The first post contains examples that cover a majority of user needs.

Offline

#282 2008-02-06 04:14:00

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_self_register

I uploaded new versions of mem_self_register and mem_form. I did some quick tests and fixed a few issues when run with 4.0.6.

Offline

#283 2008-02-06 13:11:33

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: mem_self_register

some time ago somebody asked if it was possible to enable this plugi to work with neswletter manager (aka the Postmaster plugin).
is there any plan to do so? Would it be just about checking whether the postmaster plugin is present and then update the tables created in the database by that plugin?
thanks


what was that again…?

Offline

#284 2008-02-06 15:05:01

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_self_register

feragnoli wrote:

some time ago somebody asked if it was possible to enable this plugi to work with neswletter manager (aka the Postmaster plugin).
is there any plan to do so? Would it be just about checking whether the postmaster plugin is present and then update the tables created in the database by that plugin?
thanks

I’ve never used the Postmaster plugin. Can you please provide more details on how you imagine our plugins working together?

Offline

#285 2008-02-06 15:38:46

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: mem_self_register

well, there might be a tag like@<subscribe_to_postmaster>@ tag (a shorter… m, name) to be included in the subscribe form. the tag might have some argument like:
  • type = button, popup (a yes/no radio button; a drop-down list with choices if you have more than one list; that means that you should be able to, in the case of the list to select more than one of them)
  • lists = comma-separeted list of lists to select which lists to display if the type is list

it should also have a ‘check for postmaster tables in the database’ function in the admin tab, maybe.

something like that?


what was that again…?

Offline

Board footer

Powered by FluxBB