mirror of
https://github.com/e107inc/e107.git
synced 2025-01-29 18:47:54 +01:00
content: event triggerHook correction
This commit is contained in:
parent
8b202d55cc
commit
c1231d16f9
@ -12,8 +12,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/content/handlers/content_form_class.php,v $
|
||||
| $Revision: 1.22 $
|
||||
| $Date: 2008-12-29 20:53:24 $
|
||||
| $Revision: 1.23 $
|
||||
| $Date: 2009-01-03 09:17:05 $
|
||||
| $Author: lisa_ $
|
||||
+---------------------------------------------------------------+
|
||||
*/
|
||||
@ -786,9 +786,23 @@ class contentform{
|
||||
}
|
||||
}
|
||||
|
||||
global $CONTENTFORM_HOOK;
|
||||
global $CONTENTFORM_HOOK, $CONTENT_ADMIN_CONTENT_CREATE_HOOKSTART, $CONTENT_ADMIN_CONTENT_CREATE_HOOKITEM;
|
||||
$data = array('method'=>'form', 'table'=>$plugintable, 'id'=>$row['content_id'], 'plugin'=>'content', 'function'=>'create_item');
|
||||
$CONTENTFORM_HOOK = $e_event->triggerHook($data);
|
||||
$hooks = $e_event->triggerHook($data);
|
||||
$CONTENTFORM_HOOK='';
|
||||
if(!empty($hooks))
|
||||
{
|
||||
$CONTENTFORM_HOOK .= $CONTENT_ADMIN_CONTENT_CREATE_HOOKSTART;
|
||||
foreach($hooks as $hook)
|
||||
{
|
||||
if(!empty($hook))
|
||||
{
|
||||
$HOOKCAPTION = $hook['caption'];
|
||||
$HOOKTEXT = $hook['text'];
|
||||
$CONTENTFORM_HOOK .= preg_replace("/\{(.*?)\}/e", '$\1', $CONTENT_ADMIN_CONTENT_CREATE_HOOKITEM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$button = ($hidden ? $hidden : "");
|
||||
if($qs[1] == "edit" || $qs[1] == "sa" ){
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/content/templates/content_admin_template.php,v $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2007-04-10 14:34:39 $
|
||||
| $Revision: 1.5 $
|
||||
| $Date: 2009-01-03 09:17:05 $
|
||||
| $Author: lisa_ $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -718,12 +718,26 @@ if(!isset($CONTENT_ADMIN_CONTENT_CREATE)){
|
||||
{CONTENTFORM_LAYOUT}
|
||||
{CONTENTFORM_CUSTOM}
|
||||
{CONTENTFORM_PRESET}
|
||||
{CONTENTFORM_HOOK}
|
||||
<tr><td class='forumheader' style='text-align:center' colspan='2'>{CONTENT_ADMIN_BUTTON}</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>";
|
||||
}
|
||||
|
||||
//hooks
|
||||
if(!isset($CONTENT_ADMIN_CONTENT_CREATE_HOOKSTART))
|
||||
{
|
||||
$CONTENT_ADMIN_CONTENT_CREATE_HOOKSTART = "<tr><td class='fcaption' colspan='2' >".LAN_HOOKS." </td></tr>";
|
||||
}
|
||||
if(!isset($CONTENT_ADMIN_CONTENT_CREATE_HOOKITEM))
|
||||
{
|
||||
$CONTENT_ADMIN_CONTENT_CREATE_HOOKITEM = "
|
||||
<tr>
|
||||
<td style='width:30%; vertical-align:top;' class='forumheader3'>{HOOKCAPTION}</td>
|
||||
<td style='width:70%' class='forumheader3'>{HOOKTEXT}</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
//custom tags
|
||||
if(!isset($CONTENT_ADMIN_CONTENT_CREATE_CUSTOMSTART)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user