Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/d9ee1cfafed7dfb5#

I suggest new functionality allowing the newbie user, not knowing even

...

HTML and CSS, quickly and easily receive unique, different from other

...

sites front-end. Meanwhile such user can quickly and easily install

...

only one of standard themes and receive a site very similar to

...

hundreds of other sites, made with In-Portal by the same unprepared

...

users.

How this could work. In the administrative console user comes into
section Themes, opens a theme on Edit. If the theme supposes fast
automatic change there will be one more tab "Parameters". On this tab
user can change theme's parameters. In the elementary case there will
be enough three parameters: 1)

  1. primary color of a background

...

  1. primary color of the text

...

  1. the basic type of a font (Arial, Times etc.)

 

Having set these parametres parameters user can press button "Apply" - thus it
will be automatically changed style.css and other files which are
necessary for changing for conformity of a theme to new parametres.
How  How this can be developed. In case the theme supports such automated
change, theme's files should contain the information on that what
parameters a theme accepts also what files should change
automatically. I suggest to make in such themes the "parametresparameters"
folder folder, where to place place  1)

  1. CSV a file parameters.csv with fields

      ...

        1. "Name" - a parameter name, for example "BackgroundColor",

      ...

        1. "Default" - value of a variable by default, that follows to

      ...

        1. generation of a standard theme

      ...

        1. "Value" - the value entered at last change of a theme

      ...

      1. to Each file which should be changed at theme change, there should

      ...

      1. correspond a file in the "parameters" folder.

          ...

            1. For example if it is necessary to change a file style.css there

          ...

            1. should be a file parameters/inc/style.css in which color constants and

          ...

            1. names of fonts are replaced by a code designating what variable it is

          ...

            1. necessary to substitute.

          ...

            1. If a theme contains color images which should correspond to the

          ...

            1. chosen color parametres, them it is possible automatically generate.

           

          For example, if there will be a file parameters/inc/blue_line.gif it
          is possible at automatic change of a theme on the basis of this file,
          preset values of color parameters and default values of color
          parameters in a theme generate a file ile inc/blue_line.gif where color of
          each pixel will be calculated under the formula. It probably to make
          with GD library (functions imagecolorset, imagecolorat).

          Actual variables count can be greater than parameters entered by the
          user. For example, complementary colors can be calculated
          automatically, as proportional to components of base colors of a
          background and the text. For example, color of headings may be taken
          as 20 % shift colour component's of primary colour of the text towards
          primary color of a background.

          Probably, it is necessary to store in the "parameters" folder also
          last versions of automatically changed files to warn the user changed
          files directly about possible loss of changes in result of automatic
          theme generation.