Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2014-01-27 11:35:19

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 295
Website GitHub Twitter

Re: [plugin] [ORPHAN] upm_pending_notify: Pending article notification

Although this plugin is orphaned, but has someone a solution or an alternative with a function notifiing authors in case of setting an article to “Live” in textpattern 4.5.5?

When an article is changed from “Pending” to “Live” status, the article’s author receives a link to view their article on the live site. If the author happens to be a Publisher and set the article to “Live” herself, she does not receive the email.

Thanks!

Offline

#26 2014-01-29 21:27:15

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 295
Website GitHub Twitter

Re: [plugin] [ORPHAN] upm_pending_notify: Pending article notification

no one?

Offline

#27 2014-01-29 23:10:15

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,467

Re: [plugin] [ORPHAN] upm_pending_notify: Pending article notification

I imagine that could do rah_post_versions.

Offline

#28 2014-01-30 15:16:46

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 295
Website GitHub Twitter

Re: [plugin] [ORPHAN] upm_pending_notify: Pending article notification

ah, thanks, I’ll give it a try …

Offline

#29 2014-02-01 15:20:36

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 295
Website GitHub Twitter

Re: [plugin] [ORPHAN] upm_pending_notify: Pending article notification

hm, somehow it doesn’t match my needs …
Maybe someone of the developers can take a look on this code and say, where changes have to be made. Publishers are still notified, when an author creates an article, but there should be also a notification for the authors, when the article is published by an editor.

	if (txpinterface == 'admin')
	{
		// i quite hate doing it this way, the write tab's setup is screwy

		add_privs('upm_pending_notify_created', '1,2,3,4,5');
		register_callback('upm_pending_notify_created', 'article', 'edit');

		add_privs('upm_pending_notify_updated_pre', '1,2,3,4,5');
		register_callback('upm_pending_notify_updated_pre', 'article', '', 1);

		add_privs('upm_pending_notify_updated_post', '1,2,3,4,5');
		register_callback('upm_pending_notify_updated_post', 'article', 'edit');
	}

//--------------------------------------------------------------

	function upm_pending_notify_created()
	{
		global $ID;

		// not trying to create a new article
		// begone!
		if (!gps('publish'))
		{
			return;
		}

		$Status = (int) ps('Status');

		if (!has_privs('article.publish') && $Status >= 4)
		{
			$Status = 3;
		}

		if ($Status == 3)
		{
			$ID	= (int) $ID;
			$Title = ps('Title');

			upm_pending_notify_publisher($ID, $Title);
		}
	}

//--------------------------------------------------------------

	function upm_pending_notify_updated_pre()
	{
		$GLOBALS['upm_pending_notify'] = false;

		// article updated
		if (gps('save'))
		{
			$ID = (int) ps('ID');

			$Status = (int) ps('Status');

			$old_status = (int) safe_field('Status', 'textpattern', "ID = $ID");

			// only notify if...

			// ...marked as pending
			// publishers are notified
			// see: upm_pending_notify_updated_post()
			if ($Status == 3)
			{
				$GLOBALS['upm_pending_notify'] = 'publishers';
			}

			// ...marked as live/sticky and was previously pending
			// author is notified
			// see: upm_pending_notify_updated_post()
			elseif ($Status > 3 and $old_status == 3)
			{
				$GLOBALS['upm_pending_notify'] = 'author';
			}
		}
	}

//--------------------------------------------------------------

	function upm_pending_notify_updated_post()
	{
		global $upm_pending_notify, $txp_user, $prefs;

		if (!$upm_pending_notify)
		{
			return;
		}

		$ID = (int) ps('ID');
		$Title = ps('Title');

		switch ($upm_pending_notify)
		{
			case 'publishers':
				upm_pending_notify_publisher($ID, $Title);
			break;

			case 'author':
				$AuthorID = ps('AuthorID');
				$LastModID = ps('LastModID');

				upm_pending_notify_author($ID, $Title, $AuthorID, $LastModID);
			break;
		}
	}

//--------------------------------------------------------------

	function upm_pending_notify_publisher($ID, $Title)
	{
		global $txp_user, $prefs;

		$publishers = safe_rows_start('RealName, email', 'txp_users', "privs = 1 and name != '".doSlash($txp_user)."'");

		if ($publishers)
		{
			$Title = ($Title) ? strip_tags($Title) : gTxt('untitled');
			$author = get_author_name($txp_user);

			$subject = upm_pending_notify_gTxt('email_subject_publisher', array(
				'{sitename}' => $prefs['sitename'],
				'{title}'		 => $Title,
			));

			while ($publisher = nextRow($publishers))
			{
				$body = upm_pending_notify_gTxt('email_message_publisher', array(
					'{article_url}' => hu.'textpattern/index.php?event=article&step=edit&ID='.$ID,
					'{author}'			=> $author,
					'{publisher}'		=> $publisher['RealName'],
					'{title}'				=> $Title,
				));

				upm_pending_notify_mail($publisher['RealName'], $publisher['email'], $subject, $body);
			}
		}
	}

//--------------------------------------------------------------

	function upm_pending_notify_author($ID, $Title, $AuthorID, $LastModID)
	{
		global $txp_user, $prefs;

		$author = safe_row('RealName, email', 'txp_users', "name = '".doSlash($AuthorID)."' and name != '".doSlash($txp_user)."'");

		if ($author)
		{
			include_once txpath.'/publish/taghandlers.php';

			$Title = ($Title) ? strip_tags($Title) : gTxt('untitled');
			$url = permlinkurl_id($ID);
			$publisher = get_author_name($txp_user);

			$subject = upm_pending_notify_gTxt('email_subject_author', array(
				'{sitename}' => $prefs['sitename'],
				'{title}'		 => $Title,
			));

			$body = upm_pending_notify_gTxt('email_message_author', array(
				'{article_url}' => $url,
				'{author}'			=> $author['RealName'],
				'{publisher}'		=> $publisher,
				'{title}'				=> $Title,
			));

			upm_pending_notify_mail($author['RealName'], $author['email'], $subject, $body);
		}
	}

//--------------------------------------------------------------

	function upm_pending_notify_mail($name, $email, $subject, $body)
	{
		global $prefs;

		if ($prefs['override_emailcharset'])
		{
			$charset = 'ISO-8859-1';

			if (is_callable('utf8_decode'))
			{
				$name		 = utf8_decode($name);
				$email	 = utf8_decode($email);

				$subject = utf8_decode($subject);
				$body		 = utf8_decode($body);
			}
		}

		else
		{
			$charset = 'UTF-8';
		}

		$name = encode_mailheader(strip_rn($name), 'phrase');
		$email = strip_rn($email);

		$subject = encode_mailheader(strip_rn($subject), 'text');

		$sep = !is_windows() ? "\n" : "\r\n";

		$body = str_replace("\r\n", "\n", $body);
		$body = str_replace("\r", "\n", $body);
		$body = str_replace("\n", $sep, $body);

		return mail("$name <$email>", $subject, $body,
			"From: $name <$email>".
			$sep.'X-Mailer: upm_pending_notify Textpattern plugin'.
			$sep.'Content-Transfer-Encoding: 8bit'.
			$sep.'Content-Type: text/plain; charset="'.$charset.'"'.
			$sep
		);
	}

//--------------------------------------------------------------

	function upm_pending_notify_gTxt($what, $vars = array())
	{
		$lang = array();

		$lang['email_subject_author']		 = '[{sitename}] Article published: {title}';
		$lang['email_message_author']		 = <<<eml
Dear {author},

{publisher} has published your article:

{title}
{article_url}
eml;

		$lang['email_subject_publisher'] = '[{sitename}] Article submitted: {title}';
		$lang['email_message_publisher'] = <<<eml
Dear {publisher},

{author} has submitted an article for review:

{title}
{article_url}
eml;

		return strtr($lang[$what], $vars);
	}

Offline

#30 2014-02-12 12:38:48

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 295
Website GitHub Twitter

Re: [plugin] [ORPHAN] upm_pending_notify: Pending article notification

no one?

function upm_pending_notify_publisher($ID, $Title) works, but function upm_pending_notify_author($ID, $Title, $AuthorID, $LastModID) not, where I have to make changes?

Thanks!

Offline

#31 2014-04-02 10:18:42

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 295
Website GitHub Twitter

Re: [plugin] [ORPHAN] upm_pending_notify: Pending article notification

once again, has no one an idea?

Offline

#32 2015-04-03 07:04:41

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 295
Website GitHub Twitter

Re: [plugin] [ORPHAN] upm_pending_notify: Pending article notification

found it
was the same ajax linked problem as mentioned here

so I compiled the plugin code with this new option:

# upm_pending_notify v0.1.2
# Pending article notification.
# Mary Fredborg
# 

# ......................................................................
# This is a plugin for Textpattern - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# ......................................................................

YToxMDp7czo0OiJuYW1lIjtzOjE4OiJ1cG1fcGVuZGluZ19ub3RpZnkiO3M6NzoidmVyc2lv
biI7czo1OiIwLjEuMiI7czo2OiJhdXRob3IiO3M6MTM6Ik1hcnkgRnJlZGJvcmciO3M6MTA6
ImF1dGhvcl91cmk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N0YXR1cyA9PSAzKQog
ICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAkR0xPQkFMU1sndXBtX3BlbmRpbmdfbm90
aWZ5J10gPSAncHVibGlzaGVycyc7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIC8vIC4u
Lm1hcmtlZCBhcyBsaXZlL3N0aWNreSBhbmQgd2FzIHByZXZpb3VzbHkgcGVuZGluZwogICAg
ICAgICAgICAvLyBhdXRob3IgaXMgbm90aWZpZWQKICAgICAgICAgICAgLy8gc2VlOiB1cG1f
cGVuZGluZ19ub3RpZnlfdXBkYXRlZF9wb3N0KCkKICAgICAgICAgICAgZWxzZWlmICgkU3Rh
dHVzID4gMyBhbmQgJG9sZF9zdGF0dXMgPT0gMykKICAgICAgICAgICAgewogICAgICAgICAg
ICAgICAgJEdMT0JBTFNbJ3VwbV9wZW5kaW5nX25vdGlmeSddID0gJ2F1dGhvcic7CiAgICAg
ICAgICAgIH0KICAgICAgICB9CiAgICB9CgovLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCgogICAgZnVuY3Rpb24gdXBt
X3BlbmRpbmdfbm90aWZ5X3VwZGF0ZWRfcG9zdCgpCiAgICB7CiAgICAgICAgZ2xvYmFsICR1
cG1fcGVuZGluZ19ub3RpZnksICR0eHBfdXNlciwgJHByZWZzOwoKICAgICAgICBpZiAoISR1
cG1fcGVuZGluZ19ub3RpZnkpCiAgICAgICAgewogICAgICAgICAgICByZXR1cm47CiAgICAg
ICAgfQoKICAgICAgICAkSUQgPSAoaW50KSBwcygnSUQnKTsKICAgICAgICAkVGl0bGUgPSBw
cygnVGl0bGUnKTsKCiAgICAgICAgc3dpdGNoICgkdXBtX3BlbmRpbmdfbm90aWZ5KQogICAg
ICAgIHsKICAgICAgICAgICAgY2FzZSAncHVibGlzaGVycyc6CiAgICAgICAgICAgICAgICB1
cG1fcGVuZGluZ19ub3Rp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vYmFs
ICR0eHBfdXNlciwgJHByZWZzOwoKICAgICAgICAkYXV0aG9yID0gc2FmZV9yb3coJ1JlYWxO
YW1lLCBlbWFpbCcsICd0eHBfdXNlcnMnLCAibmFtZSA9ICciLmRvU2xhc2goJEF1dGhvcklE
KS4iJyBhbmQgbmFtZSAhPSAnIi5kb1NsYXNoKCR0eHBfdXNlcikuIiciKTsKCiAgICAgICAg
aWYgKCRhdXRob3IpCiAgICAgICAgewogICAgICAgICAgICBpbmNsdWRlX29uY2UgdHhwYXRo
LicvcHVibGlzaC90YWdoYW5kbGVycy5waHAnOwoKICAgICAgICAgICAgJFRpdGxlID0gKCRU
aXRsZSkgPyBzdHJpcF90YWdzKCRUaXRsZSkgOiBnVHh0KCd1bnRpdGxlZCcpOwogICAgICAg
ICAgICAkdXJsID0gcGVybWxpbmt1cmxfaWQoJElEKTsKICAgICAgICAgICAgJHB1Ymxpc2hl
ciA9IGdldF9hdXRob3JfbmFtZSgkdHhwX3VzZXIpOwoKICAgICAgICAgICAgJHN1YmplY3Qg
PSB1cG1fcGVuZGluZ19ub3RpZnlfZ1R4dCgnZW1haWxfc3ViamVjdF9hdXRob3InLCBhcnJh
eSgKICAgICAgICAgICAgICAgICd7c2l0ZW5hbWV9JyA9PiAkcHJlZnNbJ3NpdGVuYW1lJ10s
CiAgICAgICAgICAgICAgICAne3RpdGxlfScgICAgICAgICA9PiAkVGl0bGUsCiAgICAgICAg
ICAgICkpOwoKICAgICAgICAgICAgJGJvZHkgPSB1cG1fcGVuZGluZ19ub3RpZnlfZ1R4dCgn
ZW1haWxfbWVzc2FnZV9hdXRob3InLCBhcnJheSgKICAgICAgICAgICAgICAgICd7YXJ0aWNs
ZV91cmx9JyA9PiAkdXJsLAogICAgICAgICAgICAgICAgJ3thdXRob3J9JyAgICAgICAgICAg
ID0+ICRhdXRob3JbJ1JlYWxOYW1lJ10sCiAgICAgICAgICAgICAgICAne3B1Ymxpc2hlcn0n
ICAgICAgICA9PiAkcHVibGlzaGVyLAogICAgICAgICAgICAgICAgJ3t0aXRsZX0nICAgICAg
ICAgICAgICAgID0+ICRUaXRsZSwKICAgICAgICAgICAgKSk7CgogICAgICAgICAgICB1cG1f
cGVuZGluZ19ub3RpZnlfbWFpbCgkYXV0aG9yWydSZWFsTmFtZSddLCAkYXV0aG9yWydlbWFp
bCddLCAkc3ViamVjdCwgJGJvZHkpOwogICAgICAgIH0KICAgIH0KCi8vLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KCiAg
ICBmdW5jdGlvbiB1cG1fcGVuZGluZ19ub3RpZnlfbWFpbCgkbmFtZSwgJGVtYWlsLCAkc3Vi
amVjdCwgJGJvZHkpCiAgICB7CiAgICAgICAgZ2xvYmFsICRwcmVmczsKCiAgICAgICAgaWYg
KCRwcmVmc1snb3ZlcnJpZGVfZW1haWxjaGFyc2V0J10pCiAgICAgICAgewogICAgICAgICAg
ICAkY2hhcnNldCA9ICdJU08tODg1OS0xJzsKCiAgICAgICAgICAgIGlmIChpc19jYWxsYWJs
ZSgndXRmOF9kZWNvZGUnKSkKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgJG5hbWUg
ICAgICAgICA9IHV0ZjhfZGVjb2RlKCRuYW1lKTsKICAgICAgICAgICAgICAgICRlbWFpbCAg
ICAgPSB1dGY4X2RlY29kZSgkZW1haWwpOwoKICAgICAgICAgICAgICAgICRzdWJqZWN0ID0g
dXRmOF9kZWNvZGUoJHN1YmplY3QpOwogICAgICAgICAgICAgICAgJGJvZHkgICAgICAgICA9
IHV0ZjhfZGVjb2RlKCRib2R5KTsKICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAg
ZWxzZQogICAgICAgIHsKICAgICAgICAgICAgJGNoYXJzZXQgPSAnVVRGLTgnOwogICAgICAg
IH0KCiAgICAgICAgJG5hbWUgPSBlbmNvZGVfbWFpbGhlYWRlcihzdHJpcF9ybigkbm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Vj
dF9hdXRob3InXSAgICAgICAgID0gJ1t7c2l0ZW5hbWV9XSBBcnRpY2xlIHB1Ymxpc2hlZDog
e3RpdGxlfSc7CiAgICAgICAgJGxhbmdbJ2VtYWlsX21lc3NhZ2VfYXV0aG9yJ10gICAgICAg
ICA9IDw8PGVtbApEZWFyIHthdXRob3J9LAoKe3B1Ymxpc2hlcn0gaGFzIHB1Ymxpc2hlZCB5
b3VyIGFydGljbGU6Cgp7dGl0bGV9CnthcnRpY2xlX3VybH0KZW1sOwoKICAgICAgICAkbGFu
Z1snZW1haWxfc3ViamVjdF9wdWJsaXNoZXInXSA9ICdbe3NpdGVuYW1lfV0gQXJ0aWNsZSBz
dWJtaXR0ZWQ6IHt0aXRsZX0nOwogICAgICAgICRsYW5nWydlbWFpbF9tZXNzYWdlX3B1Ymxp
c2hlciddID0gPDw8ZW1sCkRlYXIge3B1Ymxpc2hlcn0sCgp7YXV0aG9yfSBoYXMgc3VibWl0
dGVkIGFuIGFydGljbGUgZm9yIHJldmlldzoKCnt0aXRsZX0Ke2FydGljbGVfdXJsfQplbWw7
CgogICAgICAgIHJldHVybiBzdHJ0cigkbGFuZ1skd2hhdF0sICR2YXJzKTsKICAgIH0KCiI7
czozOiJtZDUiO3M6MzI6IjY1YmI4YTRkZWJmMDlhYTM0MzBmMGU3MzZjNzUzODdhIjt9

Offline

#33 2015-04-03 17:27:14

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,868
Website

Re: [plugin] [ORPHAN] upm_pending_notify: Pending article notification

Should it be added to your Github of plugins to ensure it doesn’t get misplaced again?


…. texted postive

Offline

#34 2015-04-04 15:51:31

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 295
Website GitHub Twitter

Re: [plugin] [ORPHAN] upm_pending_notify: Pending article notification

ok, I it is now here

Last edited by whocarez (2015-04-06 18:17:43)

Offline

#35 2015-04-04 15:54:33

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,724
Website GitHub Twitter

Re: [plugin] [ORPHAN] upm_pending_notify: Pending article notification

whocarez wrote #289739:

ok, I it is now here

I also updated the first post to point to github


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB