Posts by: juergen

Posts: 1480
Post: 7369
Topic: SectionContent.php -> need a modification or possibly a H

What do you think?

Awesome!
But give me 1 day or so to think about it. Primary objective surely is to keep the UI/UX simple for simple user cases.

5 years ago
Post: 7367
Topic: gpEasy 4.4
Thx Josh - I've already seen them. I'll update the plugin when 4.4 RC is out.
5 years ago
Post: 7362
Topic: Filenames/Foldernames not showing in Finder (Uploaded Files)

Longer file names and folder names sometimes show blank in Finder.
That's because OpenSans renders a little bigger than other Sans-Serif fonts.

To fix this, add the following lines somwhere in the Plugin Stylesheet:

#admincontent #finder {
font-size:82.5%;
}

The stylesheet is...

  • if downloaded manually: /addons/FlatAdmin_2015/AltAdminStyle2015.css
  • if installed from gpeasy.com: /data/_addoncode/[random_hash]/AltAdminStyle2015.css

WIll be added in next version.

5 years ago
Post: 7355
Topic: SectionContent.php -> need a modification or possibly a H

So, if GetSection() was a Hook, it would have to be called within the Render() loop.
The problem is: If GetSection() does multiple recursions, which is it's purpose, it would have to return both the content and the count of already included sections to the Render() funtion. The already processed sections would have to be skipped inside the Render() loop to avoid double rendering.
I could not find an elegant way to do that within a foreach iteration, so I changed it to a do/while using the $sectionCounter value to target the sections individually.

( /edit: My current mechanism uses a technique which would be called "pull processing" in the context of XSLT, which means to target nodes specifically. Of course, a much more elegant way was to use "push processing", which means to always pass a remaining subset of nodes/sections to a recursion - this could avoid the sectionCounter. While I always use push processing in XSLT, I lack the experience of array and iteration methods to do so in PHP ;-)

Edited: 5 years ago
Post: 7354
Topic: SectionContent.php -> need a modification or possibly a H

Hi Josh,

I took a quick look at the code in your addon to see if I could figure out how it works. It appears you use a SectionType to insert the beginning of the wrapper in one section and the end of the wrapper in another section. Is that about right?

No, this is what I did and discussed with Eric some 2 years ago :-)
If you downloaded the code from this website http://gpeasy.grafikrausz.at/SectionWrapper - forget this one, its old.

The new one (attachment: SectionWrapper_0.3a.zip) is completely different. It stores wrapper as single sections within the flat page structure.
The nesting is done…
A) in Admin mode using Javascript/jQuery with DOM manipulation
B) in normal viewing mode on the server side. And this is where my recursive GetSection() funtion jumps in.

The whole concept is like this:

Storage:

[section (any type)]
[section type="wrapper_section" contains=2]
[section (any type)]
[section (any type)]
[section (any type)]

Rendering:

<section></section>
<wrappersection>
      <section></section>
      <section></section>
</wrappersection>
<section></section>

So, wrappers simply store the count of following sections they will contain at rendering time.
The recursive nested rendering method will allow even multi-level wrapping. The trick is quite simple.
The complex part is to keep section indexes and Area Ids in order so they won't mess up when things are being stored. But the latter is done by the plugin and it works quite nicely.
It's only the server-side rendering which I cannot influence without a Hook or monkey-patching (which isn't possible in PHP).

The Render() function changed from a foreach to a do/while utilizing a counter and calls GetSection() for each page section.
GetSection() checks if a section is a wrapper. If it is, it will render the wrapper and does a recursive GetSection() inside, incrementing the counter and returning the content.

My changes in SectionContent.php have comments about that.

Edited: 5 years ago
Post: 7352
Topic: SectionContent.php -> need a modification or possibly a H

Great to see 4.4b1!

I'm currently making headway with my SectionWrapper plugin.

Wrappers are the last missing piece of the puzzle to unleash the magic of grid-based layouts and other nice design enhancements in gpEasy.

But there is one thing I cannot resolve without a modification of the Render() function in /include/tool/SectionContent.php and that's the recursion for nesting sections.

Maybe it could be done with a new Hook but I cannot imagine if/how.

Josh (and of course anyone interested), would you please check the current plugin -> SectionWrapper_0.3a.zip.
If a Hook is possible to achieve the recursive rendering without modding the core system, it would be great to have it in a future gpEasy version.

Another option would be to include my modified rendering (or sth. similar) into the gpEasy core. Impact on rendering speed and memory consumption is hardly measurable in my tests.

The current approach to replace SectionContent.php is not exactly a useful solution.


Some notes about how to use the plugin:

  • Install (and replace SectionContent.php in /include/tool/)
  • New content type "SectionWrapper" is now available. Create one.
  • Edit the new Wrapper. Now you can drop other sections into it
    (you can also drag other sections around, this can also be done in the editor's tree view).
  • Save

"Move up" and "Add Section" do not yet behave as expected. That's what I'm currently working on.


The current default style of the wrappers is for testing purposes. I'm planning to add some useful presets and helpers for that later.

Any feedback is much appreciated. Thx

 

5 years ago
Post: 7351
Topic: Finally a Wrapper Plugin is on it's way

I'm happy to preannnounce SectionWrapper, a multi-level nesting tool to bulid Bootstrap .rows, full-with areas and other cool stuff.

Often requested and a bit of rocket science - but it's almost done.

Stay tuned!

5 years ago
Post: 7350
Topic: Empty span in Back-end

New version 1.2 is out. Just update.

Backend editing issue is fixed and FontAwesome is updated to ver 4.3 (40 new icons)

So FontAwesome icons should now work everywhere.

FYI: I modded the enclosed CKeditor widgets plugin to make it place a invisible "zero width non-joiner" character into the otherwise empty fa-spans/divs.
Positive side-effect: I got rid of the InlineEdit_Scripts Hook this way.
 

5 years ago
Post: 7349
Topic: Empty span in Back-end

Thanks for the heads up!

I have to see if there is a gpEasy hook that can be used when CKEditor is invoked in backend.

For the time being you could edit [gpEasy Installation directory]/include/thirdpary/ckeditor_43/ckeditor.js (make a backup first!)
goto line 41, column 15 and change

span:1  to  span:0

I will update the plugin if I find a solution.

5 years ago
Post: 7346
Topic: Search form width

It's styled to occupy 100% width, so we need to change it's parent’s width (which has float:right)

In the Admin Panel go to [ Appearance ] -> [ Edit this Layout ] and paste …

form.navbar-form.navbar-right {
  width:120px;
}

@media ( max-width : 768px ) {
  form.navbar-form.navbar-right {
    width:auto;
  }  
}


… into the editor area on the left. 120px is the new width. You name it.

Preview / Save

The @media rule unsets the width for screens narrower than 768px (that's the breakpoint where the menu becomes button-triggered and full-width)

Edited: 5 years ago

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register