Thank you Thomas & Yaron. Thomas, here is the simple change I made to your code, to curtail the inclusion of scripts in pages that don't display the Halo ACL tookbar. Thanks, John
function addNonSpecialPageHeader(&$out) {
  global $wgRequest;
  $token = $wgRequest->getText( 'action', 'view' );
  if( !($token == 'edit' || $token == 'formedit' ))
      $out->addScript("<script type=\"text/javascript\" src=\"". $haclgHaloScriptPath .  
                      "/" . $token . "\"></script>");
  else {
     global $haclgHaloScriptPath, $haclgHaloScriptPath;
     // -------------------

     if (!defined('SMW_HALO_VERSION')) {
        // don't include prototype.js if SMWHalo is present
        $out->addScript("<script type=\"text/javascript\" src=\"". $haclgHaloScriptPath .  
                        "/scripts/prototype.js\"></script>");
    }
 
-----Original Message-----
From: Yaron Koren [mailto:yaron57@gmail.com]
Sent: Wednesday, March 17, 2010 5:09 AM
To: Thomas Schweitzer
Cc: jmcclure@hypergrove.com; semediawiki-devel@lists.sourceforge.net
Subject: Re: [SMW-devel] HaloACL - where is sfEditPageBeforeForm

Hi,

I have no record of that hook ever having been in the Semantic Forms code; or of my having been asked to add it in. My guess is that it's only been in the SMW+ version of Semantic Forms. I could add it in now, though...

-Yaron


On Wed, Mar 17, 2010 at 2:25 AM, Thomas Schweitzer <schweitzer@ontoprise.de> wrote:
Hi John,

Yaron added this hook for us in Semantic Forms and I thought it should
be part of his latest release. Yaron, can you please comment on this?

I've still got it in form of a patch:
In SF_EditData.php. line 110

   <form name="createbox" onsubmit="return validate_all()" action=""
method="post" class="createbox">
   <input type="hidden" name="query" value="true" />

END;
       /*op-patch|TS|2009-09-18|HaloACL|Semantic protection|start*/
       //Original code: $text .= $form_text;
          $html = '';
          wfRunHooks('sfEditPageBeforeForm', array(&$page_title, &$html));
          $text .= $html.$form_text;
       /*op-patch|TS|2009-09-18|end*/
       }
   }
   SFUtils::addJavascriptAndCSS();

And in SF_AddData.php line 207:

           $text .=<<<END
               <form name="createbox" onsubmit="return validate_all()"
action="" method="post" class="createbox">

END;
           /*op-patch|TS|2009-09-18|HaloACL|Semantic protection|start*/
             //Original code: $text .= $form_text;
            $html = '';
            wfRunHooks('sfEditPageBeforeForm', array(&$page_title,
&$html));
            $text .= $html.$form_text;
             /*op-patch|TS|2009-09-18|end*/
       }
   }
   SFUtils::addJavascriptAndCSS();


Hope this helps!

Best
      Thomas

John McClure schrieb:
> The Halo ACL toolbar displays per the hook "EditPageBeforeEditButtons" for
> normal page editing.
> The Halo ACL toolbar does not display when editing with a form. This is a
> big problem for all SF users.
>
> The Halo ACL toolbar displays per the hook "sfEditPageBeforeForm"
> (HACL_GlobalFunctions.php)
> But "sfEditPageBeforeForm" does not appear in Semantic Forms source code, so
> the hook is never called....
> Please advise! Thanks - jmc
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
>


--
Thomas Schweitzer
Professional Services
ontoprise GmbH - know how to use Know-how
---
Halo Extension - Want to get involved? http://smwforum.ontoprise.com/development
---
ontoprise ist Generalunternehmer für Vulcans Semantic Wiki im Projekt Halo
http://www.ontoprise.de/
---
An der Raumfabrik 29; 76227 Karlsruhe
Tel.: +49 (0) 721 509 809 39; Fax: +49 (0) 721 509 809 11
eMail: schweitzer@ontoprise.de;  www: http://www.ontoprise.de
Sitz der Gesellschaft: Amtsgericht Mannheim, HRB 9540
Geschäftsführer: Prof. Dr. Jürgen Angele, Dipl.Wi.-Ing. Hans-Peter Schnurr


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel



--
WikiWorks · MediaWiki Consulting · http://wikiworks.com