cotonti.com : page edit hooks https://www.cotonti.com Son konu mesajları Cotonti en Tue, 21 Oct 2025 03:04:21 -0000 esclkm Paz, 22 Şub 2009 00:17:00 -0000 Trustmaster Paz, 22 Şub 2009 00:12:47 -0000 esclkm now:
	list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = sed_auth('page', $row1['page_cat']);
	sed_block($usr['isadmin']);

	/* === Hook === */
	$extp = sed_getextplugins('page.edit.update.first');
	if (is_array($extp))
	{ foreach($extp as $k => $pl) { include_once($cfg['plugins_dir'].'/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } }
	/* ===== */

and
list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = sed_auth('page', $pag['page_cat']);
sed_block($usr['isadmin']);

/* === Hook === */
$extp = sed_getextplugins('page.edit.first');
if (is_array($extp))
{ foreach($extp as $k => $pl) { include_once($cfg['plugins_dir'].'/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } }
/* ===== */


I think better is:
	list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = sed_auth('page', $row1['page_cat']);

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

and
list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = sed_auth('page', $pag['page_cat']);
/* === Hook === */
$extp = sed_getextplugins('page.edit.first');
if (is_array($extp))
{ foreach($extp as $k => $pl) { include_once($cfg['plugins_dir'].'/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } }
/* ===== */
sed_block($usr['isadmin']);


What do you think about this?]]>
Cmt, 21 Şub 2009 18:44:11 -0000
Trustmaster Sal, 10 Şub 2009 04:54:30 -0000 esclkm Sal, 10 Şub 2009 03:12:55 -0000 Trustmaster Sal, 10 Şub 2009 01:45:47 -0000 esclkm Sal, 10 Şub 2009 01:31:08 -0000 Trustmaster Pzt, 09 Şub 2009 16:59:13 -0000 esclkm
example:
now:
list ($ usr [ 'auth_read'], $ usr [ 'auth_write'], $ usr [ 'isadmin']) = sed_auth ( 'page', 'any');
sed_block ($ usr [ 'auth_read']);

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

/ / Extra fields - getting
$ extrafields = array ();
$ fieldsres = sed_sql_query ( "SELECT * FROM $ db_extra_fields WHERE field_location = 'pages'");
while ($ row = sed_sql_fetchassoc ($ fieldsres)) $ extrafields [] = $ row;

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

list ($ usr [ 'auth_read'], $ usr [ 'auth_write'], $ usr [ 'isadmin']) = sed_auth ( 'page', $ row1 [ 'page_cat']);
Sed_block ($ usr [ 'isadmin']);

/ * === Hook === * /
$ extp = sed_getextplugins ( 'page.edit.update.first');
If (is_array ($ extp))
(Foreach ($ extp as $ k => $ pl) (include_once ($ cfg [ 'plugins_dir'].'/'.$ pl [' pl_code'].'/'.$ pl [ 'pl_file'].'. php ');))
/ * ===== * /

I believe that is more optional:
list ($ usr [ 'auth_read'], $ usr [ 'auth_write'], $ usr [ 'isadmin']) = sed_auth ( 'page', 'any');
sed_block ($ usr [ 'auth_read']);

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

/ / Extra fields - getting
$ extrafields = array ();
$ fieldsres = sed_sql_query ( "SELECT * FROM $ db_extra_fields WHERE field_location = 'pages'");
while ($ row = sed_sql_fetchassoc ($ fieldsres)) $ extrafields [] = $ row;

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

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


if ($ a == 'update')
(
Sed_block ($ usr [ 'isadmin']);
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 "users edit own pages" - compare files of plugin and file users.edit in Seditio

analogical pages.add

What do you think about this?[/][/]]]>
Cmt, 07 Şub 2009 09:46:44 -0000