Posts by: edouard.lopez

Posts: 8
Post: 640
Topic: Need to duplicate the gallery page

Did you try creating a normal page XYZ, then 2-3 galleries pages (a, b, c) and include them in X ?

with this kind of content in page XYZ:

blabla {{a}} Some text to describe gallery 'a' {{b}} Some text {{c}}
12 years ago
Post: 639
Topic: Forum notifications

Yeap we need some notifications system email on inside the forum. It'll be a lot easier to track conversations.

12 years ago
Post: 621
Topic: Multiple site not working

As the warning stated, it was related to an open_basedir restriction. After checking the php.ini it was disable so I look for it in gpEasy and found that it's enable in include/common.php:225 SetGlobalPaths() function:

     if( $dataDir !== $rootDir ){         ini_set('open_basedir',$dataDir);     }

From what I understand it will lock you inside a subfolder/multiple site, which is in contradiction with the multiple site plugins. So what I did was to only enable the restrictions if the $dataDir is not under the root install folder, using preg_match().

    if (preg_match("!$rootDir!", $dataDir, $matches)==0){         ini_set('open_basedir',$dataDir);     }

I'm not sure this is viable for every configuration, but I think it is when you want to use multiple site for multi language website.

12 years ago
Post: 614
Topic: BIG PROBLEM with Alpha 2

explain your problem in your native language, maybe someone will understand better.

Did you read the upgrading tutorial?

 

Maybe this could help you: http://translate.google.com/.

12 years ago
Post: 608
Topic: Multiple site not working

Hi, I got some problem with the multi site plugin. My gpEasy install is as follow :

/home/ed/public_html/jstarservice.com/

I create another site here:

/home/ed/public_html/jstarservice.com/fr/

I use the following apache vhost: http://pastebin.com/FA9RAzvb.I've the following .htacces file: http://pastebin.com/Aiq3QaQw.

  1. When I to the http://jstar.org/fr/ (local host) I got the content of ./fr/index.html instead of the index.php.
  2. When I explicitly open http://jstar.org/fr/index.php, I got nothing.
  3. When I went to check the ./fr/index.php file, here is what I got: http://pastebin.com/YK7mdiu5. Note that there is NO closing tag. Is this normal ?
  4. When I copy my root index.php into ./fr/index.php :
    <?php define('gpdebug',true); // define('gp_indexphp',true); define('gp_indexphp',false); define('gp_indexphp_root','/'); require_once('include/main.php'); ?>
    I got some errors related to the path: http://pastebin.com/JYS9Ywqd

Do you have any solutions or hint ?

12 years ago
Post: 603
Topic: PHP code within pages

Firstly, you can use the {{PageName}} syntax as described in the documentation: File_Inclusion.

For more advanced thing, I developed my own system with a similar approach. Adding some PHP directly into a page then editing it, you'll see your modifications have been replaced by static HTML, overwriting your PHP. So my approach was to put some place holder that into the page and replace this token by the output/result of a script. So here is how it work:

  1. the static file/page, called <page>_static.php, is editable as it contain only HTML and the place holder with the following syntax: {{PLACE_HOLDER}} or {{PLACE_HOLDER_##}} where ## is a 2-digit number. For instance, you will write something like:
    About Us Contact Us Policy  {{PLACE_HOLDER}}
  2. the dynamic file/script called <page>_dynamic.php, which should not be edited. This script will generate and return a variable called $results (string or array).
    $results = rand(10);
  3. Then I've the script that link those two files together,  called place_holder.php (see the source). The idea is simple: capture the result of the dynamic file, and replace the placeholder with it.
  4. Here is how I embed a dynamic content in my template:
    <?php   $GLOBALS["WORKING_FILE"] = "partners"; // define the page we want to work with   gpOutput::Get('Extra', "place_holder"); ?>

If you want to use it outside the template, you'll need to edit a bit more gpEasy ; have a look at main.php:ReplaceContent() function. Guess I could've use this one myself XD.

12 years ago
Post: 602
Topic: Need to duplicate the gallery page

What do you mean by only one folder ? You can pick images from all your website subfolders.

12 years ago
Post: 326
Topic: multi language website

Hi, 

how did you plan to manage the multi-languages ?

  1. PHP array,
  2. Gettext method and .po files ?

I'm not sure about it, but a easy way could be to create sub-folders in data/_pages/ for each language like data/_pages/fr/. The 

data/_pages/ root being used for the primary language, then adding a layer/folder for each new language. Then with a parameter in the URL you can modify the path to fetch the pages, like:

  • http://example.com/ -> data/_pages/
  • http://example.com/fr/ -> data/_pages/fr/

Do you need some help ?

12 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, Ennetb├╝rgen (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Websi...

Find out more about our Provider Spotlight

Log In

  Register