Author Topic: code2  (Read 3176 times)

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
code2
« on: August 16, 2015, 11:02:26 PM »
Hi,

I have added syntax highlighting to code2. Maybe someone can test the attached version

regards,
Martin

Offline dbs

  • Betatester
  • **
  • Posts: 8076
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: code2
« Reply #1 on: August 16, 2015, 11:17:52 PM »
Hi, tested in 283sp4, wb_theme, PHP5.4

Looks very good.  (Y)
Only the font-size is very small (is 1em but looks like 8px). 12px for .CodeMirror could help.

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
Update: code2
« Reply #2 on: August 19, 2015, 09:15:59 PM »
Hi,

I have set the font size to 12pt now and added a few fixes and cleaned up the code.
I have also added French and Italian language support.

Cheers, Martin

Offline nibz

  • Posts: 683
  • Gender: Male
Re: code2
« Reply #3 on: August 19, 2015, 10:45:57 PM »
The GitHub repo is up-to-date https://github.com/WebsiteBaker-modules/code2

Thanks for the changes Martin!!  (Y)

Offline jacobi22

  • Posts: 5891
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: code2
« Reply #4 on: August 20, 2015, 12:46:38 AM »
install not possible
Fatal error: Cannot use [] for reading in F:\.....\modules\code2\install.php on line 56

if i use this version as upgrade, i lost the background-colors in the editor-field for the types, PHP, JS etc

only one line in the empty editor is not my favorite, is it possible for me to change it?
Wer nicht will, findet Gründe, wer will, findet Wege.

Offline dbs

  • Betatester
  • **
  • Posts: 8076
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: code2
« Reply #5 on: August 20, 2015, 09:02:11 AM »
Here after update in the code2-section (Backend-Language english):
Code: [Select]
Parse error: syntax error, unexpected 'module' (T_STRING) in .../modules/code2/languages/EN.php on line 19

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
Bugfixes for code2
« Reply #6 on: August 20, 2015, 10:52:41 AM »
thanks for reporting these issues. There were a couple of typos etc. still in Version 2.2.1
I should have tested more intensively at my site.
Here is a fixed release (Version 2.2.2)

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
Re: code2
« Reply #7 on: August 20, 2015, 11:56:50 AM »
ahhh, the install script still had a bug. Here is another hotfix

Offline dbs

  • Betatester
  • **
  • Posts: 8076
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: code2
« Reply #8 on: August 21, 2015, 11:44:01 AM »
Hi, it works now and looks good.

But i missing the possibility to show only the first lines of many lines (small box).
I use the first line often as Comment for what ist the code for. More must the normal user not see or read.

Do you see a chance for something like this?

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
Re: code2
« Reply #9 on: August 21, 2015, 11:50:28 AM »
But i missing the possibility to show only the first lines of many lines (small box).
I use the first line often as Comment for what ist the code for. More must the normal user not see or read.

Do you see a chance for something like this?

the codemirror framework which does the syntax highlighting didn't (at least not out of the box) work together with the switching of small and large boxes. However, it starts with a small box and grows the box with more content being added.I thought this would be fine, but I have another request about this: A new box is always a single line, and also the with grows with very long lines pasted into it.
I'll look into a better alternative but with the previous release my main goal was to provide a fix for the broken things as quickly as possible. In short: I'll have a look and come up with another release in the near future.

Martin

Offline dbs

  • Betatester
  • **
  • Posts: 8076
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: code2
« Reply #10 on: August 21, 2015, 12:01:22 PM »
I hope you find time for this.
For now there are two versions, the old one with boxes and the (better) new one with colors.
We have the choice  :-)

Offline jacobi22

  • Posts: 5891
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: code2
« Reply #11 on: August 21, 2015, 01:16:22 PM »
For now there are two versions, the old one with boxes and the (better) new one with colors.
We have the choice  :-)

my choice: the "old" Version with small or large boxes
Wer nicht will, findet Gründe, wer will, findet Wege.

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
Re: code2
« Reply #12 on: August 21, 2015, 01:38:31 PM »
I hope you find time for this.
sure. Don't worry, it's on my agenda. I believe it is not that much work, but I have to test a few options and see which one works reliably.
For now there are two versions, the old one with boxes and the (better) new one with colors.
We have the choice  :-)
Note that the new one has also received a few other fixes (check for injected values from the backend),  and more languages supported.
Martin

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
Update: code2 again with large and small boxes
« Reply #13 on: August 22, 2015, 05:39:37 PM »
I hope you find time for this.
For now there are two versions, the old one with boxes and the (better) new one with colors.
We have the choice  :-)

Version 2.2.4 (attached) combines these features: syntax highlighting and the switch between large and small boxes is back

@nibz: Could you update the github repo, please?

Martin

Offline dbs

  • Betatester
  • **
  • Posts: 8076
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: code2
« Reply #14 on: August 22, 2015, 06:11:10 PM »
After Update: TOP  (Y)
Works like it should, thanks for your work!

In the modify.htt: missing some doublequotes
Code: [Select]
<link rel=stylesheet href="{WB_URL}/modules/code2/codemirror/lib/codemirror.css">
« Last Edit: August 22, 2015, 06:23:23 PM by dbs »

Offline nibz

  • Posts: 683
  • Gender: Male
Re: code2
« Reply #15 on: August 22, 2015, 06:36:42 PM »
@martin will do so in about an hour.

Offline nibz

  • Posts: 683
  • Gender: Male
Re: code2
« Reply #16 on: August 22, 2015, 08:19:53 PM »
Updated the repo: https://github.com/WebsiteBaker-modules/code2

Even put in the missing doublequotes and called the version 2.2.4.1

Everyone who would like i can add to have access to the GitHub, with the new GitHub Desktop program contributing is easy check: https://desktop.github.com/

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
Re: code2
« Reply #17 on: August 24, 2015, 08:46:03 PM »
In the modify.htt: missing some doublequotes
I have included the fix in 2.2.5, together with a few more improvements:
- I liked the box which increased its size depending on the content. In addition to the small and large box I have re-added this, and those who like it as well can select this behavior by choosing the "automatic" mode, now
- re-added error handling in the install procedure
- long lines without spaces still did not wrap around and caused the with of the whole page to increase

Offline nibz

  • Posts: 683
  • Gender: Male
Re: code2
« Reply #18 on: August 24, 2015, 09:01:24 PM »
Updated the github repo: https://github.com/WebsiteBaker-modules/code2
I really hope WebsiteBaker will add the posibility to install zips right from github so we can link to the master.zip :)

Offline dbs

  • Betatester
  • **
  • Posts: 8076
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: code2
« Reply #19 on: August 24, 2015, 09:14:10 PM »
Quote
- I liked the box which increased its size depending on the content. In addition to the small and large box I have re-added this, and those who like it as well can select this behavior by choosing the "automatic" mode, now
Works.
As a additionial feature - good idea. Good module, good job. Thx  (Y)

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
code2 Upgrade
« Reply #20 on: December 30, 2015, 10:50:03 AM »
Hi,

This version of code² contains the fix proposed by jacobi22 in this thread:
http://forum.WebsiteBaker.org/index.php/topic,28874.msg202403.html

Martin

Offline dbs

  • Betatester
  • **
  • Posts: 8076
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: code2
« Reply #21 on: March 16, 2016, 06:47:23 PM »
If backend-language french
Code: [Select]
There was an uncatched exception: syntax error, unexpected 'ex' (T_STRING) in line (18) of (/modules/code2/languages/FR.php)
// >>>  edit: is not an error, a result only of that missing backslash. M.

In the FR.php is a backslash missing.
$module_description 'Ce module vous permet d'ex&eactu;cuter PHPHTMLJavascript commandes ...

Should be
$module_description 'Ce module vous permet d\'ex&eactu;cuter PHP, HTML, Javascript commandes ...
« Last Edit: March 16, 2016, 08:58:17 PM by DarkViper »

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
code2 Update
« Reply #22 on: March 22, 2016, 10:25:37 AM »
The French module description is fixed in the attached version. Actually, I had this already fixed, but I was still cleaning up the code a bit in the modules I maintain, and when testing with French settings, I have found another minor issue: The javascript hints were not properly displayed with the French accent.

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
minor code2 update
« Reply #23 on: March 23, 2016, 11:43:16 AM »
for the French:
mince! Il'y avait une autre faute dans ce petit fichier de langue!
(Dammned! There was another mistake in this little language file).

I had a copy&paste error for the html special characters with acute-accent   :-(
Here is a fixed version

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 589
  • Gender: Male
    • meine Homepage
code2 update
« Reply #24 on: March 09, 2017, 10:41:27 AM »
Hi,

FS72 has reported a bug in the code2 module that the content is not properly stored when single quotes are used for instance in Javascript code.

a fixed version is attached.

Martin

admin edit: remove the attachement, see here
« Last Edit: April 23, 2017, 10:50:06 AM by jacobi22 »