forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: kwszp on December 29, 2013, 04:27:44 pm

Title: CPMfetch call problem: autoformatting/breaking by open source editors - help pls
Post by: kwszp on December 29, 2013, 04:27:44 pm
In my index.php code  (www.kwszp.info) I have cpmfetch call in canonical form:
Code: [Select]
<?php include_once "./galeria/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./galeria/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(47);
$objCpm->cpm_close(); ?>

So far I've been editing using Kompozer and it worked, but as this editor is causing some annoyances, I decided to try alternatives.
It appeared however that both BlueGriffon and SeaMonkey treat that block in 'specific' way: immediately upon opening the file, the code is formatted to:

Code: [Select]
<!--?php include_once "./galeria/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./galeria/cpmfetch/cpmfetch_config.php");
$objCpm--->cpm_viewLastAddedMedia(4, 7);
$objCpm-&gt;cpm_close(); ?&gt;

I've found some references (https://groups.google.com/forum/#!topic/bluegriffon/kvlZsXx-CNQ) to the issue, but nobody seemed to mentioned it here, so my question:
is there something wrong with the code (or its use), or what (simple) editor is appropriate for the job?

Many thanks

Title: Re: CPMfetch call problem: autoformatting/breaking by open source editors - help pls
Post by: phill104 on December 29, 2013, 07:44:27 pm
notepad++ should do the trick.

http://notepad-plus-plus.org/
Title: Re: CPMfetch call problem: autoformatting/breaking by open source editors - help pls
Post by: gmc on December 29, 2013, 09:05:09 pm
The code is of course fine, your editor doesn't like PHP - and from the board you provided the link to - seems they have no desire to...

I've used HAPEdit for almost a decade now: http://hapedit.free.fr/ (http://hapedit.free.fr/) - HTML ASP PHP Editor.
Doesn't seem to have much support left - no upgrades in a while - but I've used the same version with WinXP, WinMe, WinVista, and Win7.  Some newer PHP functions it doesn't give hints for - but still works well.
The only replacements it makes automatically on document opening is replacing tabs with spaces. Never caused me an issue.

I will be downloading Phil's suggestion of Notepad ++ and comparing when I can.
Title: Re: CPMfetch call problem: autoformatting/breaking by open source editors - help pls
Post by: Αndré on December 30, 2013, 09:56:52 am
I also use Notepad++. For more alternatives, see http://documentation.coppermine-gallery.net/en/dev_tools.htm#dev_tools_editor