<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : page edit hooks</title>
		<link>https://www.cotonti.com</link>
		<description>Last topic posts</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Wed, 08 Apr 2026 14:39:16 -0000</pubDate>

		<item>
			<title>esclkm</title>
			<description><![CDATA[thx )]]></description>
			<pubDate>Sun, 22 Feb 2009 00:17:00 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=1964&d=0#post8581]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[Yes, I approve this because currently there is no other way to overcome these limitations.]]></description>
			<pubDate>Sun, 22 Feb 2009 00:12:47 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=1964&d=0#post8580]]></link>
		</item>
		<item>
			<title>esclkm</title>
			<description><![CDATA[Simple Idea! Trustmuster or Kilandor - say what do you think about it.<br />
now:<br />
<div class="highlight"><pre class="php">
	list($usr&#091;'auth_read'&#093;, $usr&#091;'auth_write'&#093;, $usr&#091;'isadmin'&#093;) = sed_auth('page', $row1&#091;'page_cat'&#093;);
	sed_block($usr&#091;'isadmin'&#093;);

	/* === Hook === */
	$extp = sed_getextplugins('page.edit.update.first');
	if (is_array($extp))
	{ foreach($extp as $k =&gt; $pl) { include_once($cfg&#091;'plugins_dir'&#093;.'/'.$pl&#091;'pl_code'&#093;.'/'.$pl&#091;'pl_file'&#093;.'.php'); } }
	/* ===== */

</pre></div>
and<br />
<div class="highlight"><pre class="php">list($usr&#091;'auth_read'&#093;, $usr&#091;'auth_write'&#093;, $usr&#091;'isadmin'&#093;) = sed_auth('page', $pag&#091;'page_cat'&#093;);
sed_block($usr&#091;'isadmin'&#093;);

/* === Hook === */
$extp = sed_getextplugins('page.edit.first');
if (is_array($extp))
{ foreach($extp as $k =&gt; $pl) { include_once($cfg&#091;'plugins_dir'&#093;.'/'.$pl&#091;'pl_code'&#093;.'/'.$pl&#091;'pl_file'&#093;.'.php'); } }
/* ===== */
</pre></div>
<br />
<br />
I think better is:<br />
<div class="highlight"><pre class="php">
	list($usr&#091;'auth_read'&#093;, $usr&#091;'auth_write'&#093;, $usr&#091;'isadmin'&#093;) = sed_auth('page', $row1&#091;'page_cat'&#093;);

	/* === Hook === */
	$extp = sed_getextplugins('page.edit.update.first');
	if (is_array($extp))
	{ foreach($extp as $k =&gt; $pl) { include_once($cfg&#091;'plugins_dir'&#093;.'/'.$pl&#091;'pl_code'&#093;.'/'.$pl&#091;'pl_file'&#093;.'.php'); } }
	/* ===== */
	sed_block($usr&#091;'isadmin'&#093;);

</pre></div>
and<br />
<div class="highlight"><pre class="php">list($usr&#091;'auth_read'&#093;, $usr&#091;'auth_write'&#093;, $usr&#091;'isadmin'&#093;) = sed_auth('page', $pag&#091;'page_cat'&#093;);
/* === Hook === */
$extp = sed_getextplugins('page.edit.first');
if (is_array($extp))
{ foreach($extp as $k =&gt; $pl) { include_once($cfg&#091;'plugins_dir'&#093;.'/'.$pl&#091;'pl_code'&#093;.'/'.$pl&#091;'pl_file'&#093;.'.php'); } }
/* ===== */
sed_block($usr&#091;'isadmin'&#093;);

</pre></div>
<br />
What do you think about this?]]></description>
			<pubDate>Sat, 21 Feb 2009 18:44:11 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=1964&d=0#post8559]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[Nothing brilliant at the moment, need to think it over later or see some other opinions in this topic.]]></description>
			<pubDate>Tue, 10 Feb 2009 04:54:30 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=1964&d=0#post7504]]></link>
		</item>
		<item>
			<title>esclkm</title>
			<description><![CDATA[your ideas?]]></description>
			<pubDate>Tue, 10 Feb 2009 03:12:55 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=1964&d=0#post7479]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[Actually, this fix is not quite right for what you're going to do. What we need is to affect access privileges on a concrete item from within a plugin, an additional hook is just a dirty way to intercept the execution flow. There should be a better way to affect that auth check.]]></description>
			<pubDate>Tue, 10 Feb 2009 01:45:47 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=1964&d=0#post7456]]></link>
		</item>
		<item>
			<title>esclkm</title>
			<description><![CDATA[on my place or other?]]></description>
			<pubDate>Tue, 10 Feb 2009 01:31:08 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=1964&d=0#post7449]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[I think a hook before sed_block is really needed. This would eliminate duplicated code in things like eyoop. So I think we can just add the hook 'page.edit.first' and that will be fine.]]></description>
			<pubDate>Mon, 09 Feb 2009 16:59:13 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=1964&d=0#post7410]]></link>
		</item>
		<item>
			<title>esclkm</title>
			<description><![CDATA[we now have available are too few opportunities to hook code into page.edit<br />
<br />
example:<br />
now:<br />
<div class="highlight"><pre class="php">list ($ usr &#091; 'auth_read'&#093;, $ usr &#091; 'auth_write'&#093;, $ usr &#091; 'isadmin'&#093;) = sed_auth ( 'page', 'any');
sed_block ($ usr &#091; 'auth_read'&#093;);

$ id = sed_import ( 'id', 'G', 'INT');
$ c = sed_import ( 'c', 'G', 'TXT');

/ / Extra fields - getting
$ extrafields = array ();
$ fieldsres = sed_sql_query ( &quot;SELECT * FROM $ db_extra_fields WHERE field_location = 'pages'&quot;);
while ($ row = sed_sql_fetchassoc ($ fieldsres)) $ extrafields &#091;&#093; = $ row;

if ($ a == 'update')
(
$ sql1 = sed_sql_query ( &quot;SELECT page_cat, page_ownerid FROM $ db_pages WHERE page_id = '$ id' LIMIT 1&quot;);
Sed_die (sed_sql_numrows ($ sql1) == 0);
$ Row1 = sed_sql_fetcharray ($ sql1);

list ($ usr &#091; 'auth_read'&#093;, $ usr &#091; 'auth_write'&#093;, $ usr &#091; 'isadmin'&#093;) = sed_auth ( 'page', $ row1 &#091; 'page_cat'&#093;);
Sed_block ($ usr &#091; 'isadmin'&#093;);

/ * === Hook === * /
$ extp = sed_getextplugins ( 'page.edit.update.first');
If (is_array ($ extp))
(Foreach ($ extp as $ k =&gt; $ pl) (include_once ($ cfg &#091; 'plugins_dir'&#093;.'/'.$ pl &#091;' pl_code'&#093;.'/'.$ pl &#091; 'pl_file'&#093;.'. php ');))
/ * ===== * /

</pre></div>
I believe that is more optional:<br />
<div class="highlight"><pre class="php">list ($ usr &#091; 'auth_read'&#093;, $ usr &#091; 'auth_write'&#093;, $ usr &#091; 'isadmin'&#093;) = sed_auth ( 'page', 'any');
sed_block ($ usr &#091; 'auth_read'&#093;);

$ id = sed_import ( 'id', 'G', 'INT');
$ c = sed_import ( 'c', 'G', 'TXT');

/ / Extra fields - getting
$ extrafields = array ();
$ fieldsres = sed_sql_query ( &quot;SELECT * FROM $ db_extra_fields WHERE field_location = 'pages'&quot;);
while ($ row = sed_sql_fetchassoc ($ fieldsres)) $ extrafields &#091;&#093; = $ row;

$ sql1 = sed_sql_query ( &quot;SELECT page_cat, page_ownerid FROM $ db_pages WHERE page_id = '$ id' LIMIT 1&quot;);
Sed_die (sed_sql_numrows ($ sql1) == 0);
$ Row1 = sed_sql_fetcharray ($ sql1);

list ($ usr &#091; 'auth_read'&#093;, $ usr &#091; 'auth_write'&#093;, $ usr &#091; 'isadmin'&#093;) = sed_auth ( 'page', $ row1 &#091; 'page_cat'&#093;);
/ * === Hook === * /
$ Extp = sed_getextplugins ( 'page.edit.first');
If (is_array ($ extp))
(Foreach ($ extp as $ k =&gt; $ pl) (include_once ($ cfg &#091; 'plugins_dir'&#093;.'/'.$ pl &#091;' pl_code'&#093;.'/'.$ pl &#091; 'pl_file'&#093;.'. php ');))
/ * ===== * /


if ($ a == 'update')
(
Sed_block ($ usr &#091; 'isadmin'&#093;);
</pre></div>
to understand why I think so: blogs and why developers do not want to sell through a simple page and make the individual plugins without using pages; or plugin for seditio &quot;users edit own pages&quot; - compare files of plugin and file users.edit in Seditio<br />
<br />
analogical pages.add<br />
<br />
What do you think about this?[/][/]]]></description>
			<pubDate>Sat, 07 Feb 2009 09:46:44 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=1964&d=0#post7148]]></link>
		</item>
	</channel>
</rss>