Search

No problem. It appears that somehow the new forum converted the “_” into “make everything italic after _ and remove _”. I think we just found a bug.

@carsten: Now I understand.

Any thoughts about the POST data issue?

It seems that the $_POST array is empty when the delegate is called by the extension. The $_POST array is emptied by Symphony before the extension is executed, or the $_POST array is populated after the extension is executed.

This might be fixed by adding another delegate call.

Thank you, carsten. I guess I will try s.th. else for the moment. Nevertheless the Global Parameter Loader is a great extension.

Nevermind that previous comment, I was not paying attention. First, if you want to see your post variables in the param debug screen, make sure to redirect your form to ?debug=params.

Second, you can access the fields['name'] input this way: return ($_POST['fields']['name']);.

It works. This is so cool! Now I can build a small application using POST forms (saving data with Symphony events) and passing params from page to page. (Maybe even a one-page app.)

Thank you very much, Carsten!

Thanks for the extension! I was looking for something like this to use a randomly arranged set of url parameters, but in order for me to do so, I had to change a line of code in your extension:

$context['params'][$parameter['param']] = @eval($parameter['value']) ? eval($parameter['value']) : $parameter['value']; // line 96 extension.driver.php

with

$context['params'][$parameter['param']] = @eval($parameter['value']) !== FALSE ? eval($parameter['value']) : $parameter['value'];

I wanted to give a default parameter the number ‘0’, and eval returns FALSE when it errors out (not 0), so I had to make that change.

Thanks for your appreciation and your interest in this extension.

I have updated the extension on github with your improvement. The old version will work, but will not evaluate your PHP code when this code returns 0.

Everytime I load a parameter set my parameter definitions are ordered differently. Not a big deal but when I am trying to add a parameter by trial and error I always have to search for the field I was working on. :-)

You could try to sort the parameters by name, I think they are sorted by ID now.

They are sorted by “sortorder” wich is always “0”.

Is this a bug? See last row. There is no variable „$set_id“.

public function addParam(&$context) {
        $sets = $this->getSets();

        foreach ($sets as $set) {
            if(!$this->isPageSelected($context['params']['current-page-id'], $set['id'])) {
                $parameters = $this->getParameters($set_id);

Better:

public function addParam(&$context) {
        $sets = $this->getSets();

        foreach ($sets as $set) {
            if(!$this->isPageSelected($context['params']['current-page-id'], $set['id'])) {
                $parameters = $this->getParameters($set['id']);

Thanks Kaiuwe, this is indeed a bug that could prevent the exclusion of parameters from pages when multiple parameter sets are used. I have fixed this bug in the latest commit at github, download the latest version of the Global Parameter Loader at http://github.com/carsten/globalparamloader/tree/master.

@phoque: with this release, parameters are displayed by parameter set and sorted descending by parameter name. This should make it easier to find your parameters.

carsten: Cool, thanks!

Is it possible to access already existent URL- or system-parameters to do modifications on them with Global Paramter Loader?

You can try to access them by $context['params']['url-or-system-parameter-name'], but I haven’t tested this.

Hey Carsten, just put a test site life with your great extension and find (again) that the export ensemble didn’t include the params. Is there a way to export these params and avoid typing them all again?

Not yet. It’s a limitation of the Export Ensemble extension. There has been mention of more robust features to come, but this is as far back as version 1.1, so I couldn’t say when these features will be added:

Currently this extension adds a “Create” button to the preferences page. In the future it will instead have its own interface with options for including additional files and folders as well as excluding and other options.

More recently, Allen has mentioned that:

We intend to update the export ensemble to provide more control for developers.

We are looking at supplying export preferences for the following options:

  • Sections
  • Entries
  • core and custom DB tables
  • config.php
  • users

Thanks carsten, for this extension. It is just what I needed for a new feature on my blog site. I can confirm that it is compatible with 2.1.0. You might want to update the matrix.

I noticed one difference between your documentation and actual operation. You state that Global Parameter Loader is under the Blueprints menu when it is actually under System.

EDIT: Well, after looking a little closer at the overhead associated with this extension I decided to take a different approach. I found that I could use a very simple custom data source to accomplish the same thing.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details