From: Bradley D. <buc...@us...> - 2003-09-02 07:02:43
|
Hi folx, I was working on the ldifimport plugin, which lead me to fixing the image_buttons plugin which lead me to finding out that the functions/strings.php file didn't have a hook call for the compose link, if javascript was on and compose was set to be done in a new window. So here is a short few line patch that adds the internal_link hook for the compose link. Once this is patched, then my new rendition of image_buttons will work. And with image_buttons now working the ldif_import will work with SM version 1.2 as well as 1.3 and above. I'll release those later after a bit more sleep;-) Watch the possible long line splits on the patch below. This is porbably too late for inclusion into SM 1.4.2 I presume. Brad *** strings.php.orig 2003-07-29 15:29:38.000000000 -0600 --- strings.php 2003-09-02 00:52:04.000000000 -0600 *************** *** 434,439 **** --- 434,444 ---- /* if we can use JS, use the fancy window, else just open a new one HTML-style */ if($javascript_on) { sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION); + if ((preg_match('/\/compose\.php/', $base_uri.$url)) && (!preg_match('/passed_id=/', $base_uri.$url))) { + $hooktext = do_hook_function('internal_link',$text); + if ($hooktext != '') + $text = $hooktext; + } return '<a href="javascript:void(0)" onclick="comp_in_new(\''.$base_uri.$url.'\')">'. $text.'</a>'; } Brad J. Donison said: > p dont think said: > [snip] >> Indeed. Image_buttons is one of those plugins that has been driving us >> crazy. Brad, if you can really clean it up (preferably a re-write), >> we'd love to have you take that one too, although this one is a plugin >> that I'd personally rather drop altogether... > > I have been looking and cleaning a bit. A couple of questions comes to mind > though as this is not a standard plugin anyways. Actually I have found a few > plugins that are more like specific patches to the core code to provide some > extra functionality. Anyways, my questions are: > > Will templates ultimately serve this plugin much better than patching core > files like page_header.php and others? > > Are there beta templates code / examples out there? I see some code in > functions/html.php that looks like it could be pre-templates code... > > Who is working the templates code and are there any vague notions of when > we'll see something working? > > I wonder if this would be a good test plugin for templates driven > squirrelmail. > > Thx, > > Brad -- void c(long time) { ### long time no see } |