Posts by: juergen

Posts: 1480
Post: 7306
Topic: Can't log in to site

If the website is on a public server, could you provide us with an URL?


 

6 years ago
Post: 7304
Topic: Multi Language Manager - get current page language
Works like a charm.

Thanks a lot Frédéric!
6 years ago
Post: 7300
Topic: Multi Language Manager - get current page language

1st of all -  great to see the forum back online. Thank you Josh!

For my question: I used Multi Language Manager several times recently and it works great. But i couldn't figure out how to retrieve the current language of a page in PHP.

I need this to set a proper lang attribute in the <html> tag in the template like <html lang="en"> and <html lang="de"> for the english/german pages.
This is crucial if one wants to use CSS3 hyphenation (see below) which works pretty well in most major browsers (except Chrome and Adroid Stock for now).

#content {
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
}
 
Especially in mobile design, hyphenation helps a lot to make narrow text blocks look good and to break too long words. For that purposse I'd want to have the lang attribute set correctly in the <html> tag. Is there a way to retrieve this from the plugin to do sth. like …
 
<html lang="<?php
   if isset($currentlang) { echo $currentlang; } else { echo 'en'; }
?>">

… in the template code.

Is there a way to get $currentlang?

Thanks in advance!

 

(PS: For now I can set a lang attribute in every section on every page using the section’s "Options" but that's cumbersome. In fact i do some awkward jQuery hack to retrieve it from the language selector and apply it to the <html> tag but browsers do not exactly like setting the lang attribute @domready sometimes.)

6 years ago
Post: 7052
Topic: Slide appear on multiple sides

Hi morten0908,

by default the NivoSlider Gadget will render where your Theme has it's "GetAllGadgets()" output (that's mostly located in a sidebar or footer area).
If you want the slider to show only on your index page there are two possibilities.

For both versions you will first have to remove the NivoSlider Gadget from the GetAllGadgets area by editing your Layout:
In the black Admin Toolbar/Menu go to Appearance-->Edit This Layout. Find the "NivoSlider" Gadget representation (one of the grey boxes) and click "Remove".

Version 1, simple - Place the gadget within your page content:
Navigate to the index page, rightclick/hover over a Section in the content and choose "New Section" - in the following box select "File Include", press [Save].
Hover/rightclick the new section labeled "File Include" and click "Edit". Then click the field labeled "Gadgets" and select "NivoSlider". [Save and Close]. Done.

Version 2, use dedicated Layout areas: Outside the regular content the Nivo Slider Gadget has to be inserted into a different area of your Theme/Layout. Depending on the Theme there may be already some areas suitable for that purpose. If not, you will have to create one by editing your [Server Root]/themes/[Theme Name]/template.php and insert one by putting <?php gpOutput::Get('Extra','NivoSlider'); ?> where you want the Slider to render. After that you will find a new area representation when editing the Layout via the Admin Toolbar/Menu. Insert the NivoSlider Gadget there. If you want to show the slider only on one page you will have to copy your Layout first and assign it only to this specific page. Add the Nivo Slider Gadget by editing the Layout of this page afterwards.

Unfortunately there is no detailed documentation for gpEasy's Theme/Layout workflow I could refer to. If you are unfamiliar with that get back here or to the regular forum for further help.


 

 

7 years ago
Post: 5784
Topic: Safe Mode On

Installing gpEasy on a development server (such as XAMPP or any other meeting gpEasy's installation requirements) and moving the site to the live host (with PHP Safe Mode=ON) afterwards will sometimes work, with limitations though.

I have managed to make some setups run this way in the past.
You likely lose some features like subsequent installation of plugins/themes and maybe some others too.

I have always wondered if it was possible to make some FTP fallback to circumvent Safe Mode restricitons but I cannot code such stuff.
(If there was a convenient way I guess Josh would have implemented it yet)

Since Safe Mode is deprecated in PHP 5.3 and removed in 5.4 this will hopefully belong to the past soon.

7 years ago
Post: 5649
Topic: Only one image showing
Ok, seems you have a <div id="slider"> in your template. The Nivo Slider Plugin also creates such a div by itself so there is an id conflict.
Just use another id for your div and it will most likely work.
8 years ago
Post: 5646
Topic: Only one image showing

Could you please provide me with some more details? Such as gpEasy version, PHP version.
Do you have special non-ascii characters or blanks in your image file names?
Are there any warnings or other messages?

Or do you have a link for me to see the output?

 

8 years ago
Post: 5506
Topic: Another CKeditor plugin question

is common:UseCK(); not working?

Sorry, was my error -  it actiually did work but I use the new function now.

 

So here is where I currently am:

  • CKEDITOR instance with current configuration is invoked in a hidden div
  • The dummy CKeditor for drag-n-drop configuration is built upon the elements snitched from the hidden live CKE.
  • All remaining standard items (like form elements, etc.) which are not used in the current configuration are placed in the repository area, distributed in new toolbars (some have no visible icon, see issues below)
  • Dragging/dropping works basically but is a bit laggy.
  • JSON generation works. Will only render to the textareas (does not save) for now.

To-do:

  • Get item information for all available/installed plugins which have an icon.
  • Render all plugin icons that aren't part of the current configuration in the repository area
  • Save configuration (when everything eventually works)

To be considered:

  • Allow to create multiple, named configurations for different situations/user permissions
  • Allow CKEDITOR skin selection

Here it is: CKconfigurator_UXdraft3.zip

Issues:

  • hidden CKEDITOR instance drops a (non-fatal) JS error when it is deleted after cloning the elements. This seems to be a timing issue but couldn't find a proper solution yet. I leave the hidden instance alive for now.
  • Skins/icons: Current CKeditor (gpEasy 3.6r2) seems to address some skin incompatibility issues with adding inline styles for icons. I cannot imitate this behavior for the "Available Items" because these are not copied from the live instance. Maybe this will solve itself with CKE 4.1 (?)
  • Some elements aren't icons but "combos", like the "Format" element. I have left the current 3 ones untouched. Such elements are almost impossible to generate just upon their names. If they cannot be copied from a live CKE - which is the case for all elements that are not part of the current CKE configuration - it needs the reverse-engineering CKE I was afraid of. A possible solution could be to invoke a complete CKE with all available elements and plugins configured and distribute the element copies into the dummy editor and repository areas upon the current toolbar configuration. Maybe there are also ways to generate elements using CKE's built-in JS-functions but I doubt.

So much for now. This endeavour is going to be a little crazy. I'm somewhat amazed that it's still working.

PS: My code has lots of comments but is far from being beautiful ;-). Currently only tested in FF19/Win.

Edited: 8 years ago
Post: 5494
Topic: Another CKeditor plugin question

I'm currently struggling to invoke a CKeditor instance with the current configuration from my Admin.php.
Any quick hints? Thx!

 

/edit: something like common:UseCK(); ?

Edited: 8 years ago
Post: 5488
Topic: Another CKeditor plugin question

Here is an updated version which already generates CKeditor config JSON: CKconfigurator_UXdraft2.zip

 

8 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

HH-Support

Company located in Tórshavn, Faroe Islands. * Webpage Design * Consultant & Provider of a wide range of programs for visually impaired and dyslextics.

Find out more about our Provider Spotlight

Log In

  Register