Recent Topics

1 Sep 01, 2006 14:58    

What does it do:

It allows the administrator to define certain areas on a skin which can be customized by individual users. For example, a "banner" area where each user can display a different image, a "background" area for user to define background image or colour, etc.

Usage examples:
[list=1]

  • I maintain a blog group. I want the whole group to have a consistent look-and-feel, yet allow some degree of customization to reflect each blogger's personality. I use a single skin for all bloggers, and use this plugin to let the bloggers define their own banner, sidebar image, etc.

  • Users who are unfamiliar with HTML may feel uncomfortable modifying the skin directly. This plugin can help to simplify things by presenting only the customizable areas to those users.[/list:o]

  • How to use:
    [list=1]

  • Install the plugin.

  • Go to the Skin Area plugin settings, and define a few skin areas. For each skin area, give it a name, a default value, and a descriptive note for your users.

  • In your skin, insert the following codes into wherever you want each skin area to appear:

  • <?php
    $Plugins->call_by_code( 'evo_SkinArea', array(
    				'area_name'=>'BannerImg'
    				) );
    ?>


    Replace 'BannerImg' with the area name that you have defined.

  • A "Skin Area" sub-tab is added to the "Tools" tab. Users can access this tab, where they will see the list of skin areas that the administrator have defined (see screenshot). They can make their own settings, and it will be reflected on their blogs. However, they must use the skins with the above codes inserted.[/list:o]

  • Ideas for future extension:

    Here are some ideas floating in my mind but I cannot find time to do yet. If anyone wants to help out, you are more than welcome.
    [list]

  • Validation of user input.

  • Different types of input, e.g., check box, radio buttons, etc.

  • Integration with filemanager for file selection (useful for inserting <img> tags).

  • [*]Color picker.[/list:u]

    2 Oct 17, 2006 01:18

    Excellent!
    This plugin is ideal to ship together with my [url=http://forums.b2evolution.net/viewtopic.php?t=8146]Autoblog Plugin[/url].
    I tested it and it works really nice to define main skin colors, sidebar images, etc... for unexperienced bloggers.

    I was going to develope something like that when I saw you did it.

    I will recommend it. :-)

    3 Nov 11, 2006 14:40

    Another nice feature : make it possible to 'overwrite' blog choices with a new default one.
    Especially if the former 'blog' specific choices where the old default onces...

    I now have the trouble that if I want to change the default, the 'old default' is there in every blog...

    4 Nov 11, 2006 17:03

    Hi Topanga, if you leave the field value as blank, the plugin will automatically use the current default value when displaying it in the skin.

    I made the plugin to fill in the blanks in the user setting page with the blog default values automatically. Perhaps I should not have done that. Let me think about it...

    5 Nov 11, 2006 17:11

    I know, and that was very ok.

    I just noticed that I made and error (wrong link) and that I needed to replace all the default values..

    Once that you create a field, put in a default, that info is 'per default' on every blog. 100% ok ! (don't change that)

    But when I change the default in the plugin, because there was an error in it, I need to change that in every blog...
    So i the blog specific field is blank (it only contains the default value) make the new default value be there...

    6 Dec 01, 2006 18:09

    If have also a little request, in function SkinTag( $params ):

    Would it be possible to add a $params[ 'display' ] which decides if value must be echoed (like now) or just only returned?

    With this $params[ 'display' ] set eventually to TRUE as default, your current code would keep the actual behaviour, and if somebody adds $params[ 'display' ] =FALSE, it would just return its value without echoing.

    if ( $params[ 'display' ] === FALSE) return $val;


    I ask this because I am using your plugin for some custom code, and I need the function to return its value without echoing and I already did the changes for myself.

    But if my code works and is useful, maybe I will post it for all, so I would need that feature in the plugin.

    7 Dec 11, 2006 18:23

    Hi fralenuvol, if you have got that part of the code working already, could you kindly send it to me? I will incorporate it into my plugin and make a new release, which will also include Topanga's request.

    Thanks.

    8 Dec 11, 2006 20:29

    And can you test your plugin one last time that you can also empty your fields again ?
    My installation is refusing that... (since the serverhack)

    9 Dec 11, 2006 20:49

    In the meanwhile I send you my code (I also added "isset" in conditions as I got errors in mine).

    Have a look if it is fine for you.

    10 Jan 15, 2007 12:35

    When I try to install the plugin I get the following error:

    MySQL error!

    Too big column length for column 'skin_area_value' (max = 255). Use BLOB instead(Errno=1074)

    Your query:

    CREATE TABLE evo_plugin_skin_area_86_data (
    skin_area_blog_ID INT UNSIGNED NOT NULL,
    skin_area_name VARCHAR( 50 ) NOT NULL,
    skin_area_value VARCHAR( 1024 ) NOT NULL
    )

    I use b2evo 1.91. Maybe someone have a clue about what the problem are.

    11 Feb 10, 2007 15:54

    Hi fralenuvol,

    Unfortunately I couldn't find time to work on the script. I see that you have made some pretty good improvements on the script, would you like to adopt this plugin and take over its development from now on? I think you can do much more than me to better benefit the users.

    12 Apr 01, 2007 19:34

    I get the same error as mojman. Can anyone help please?

    Thanks!
    nureac

    13 Apr 19, 2007 16:25

    Would it be possible for somebody who has already done the modifications to say...the Custom Blog to upload it for anybody else? I think this would provide a perfect example of how to use this plug in, and you can also try it "right out of the box".

    What do you guys think?

    14 Apr 20, 2007 19:51

    Hi mojman and nureac,
    You should be able to fix this problem by modifying these lines in the _skin_area.plugin.php file:

    CREATE TABLE evo_plugin_skin_area_86_data (
    skin_area_blog_ID INT UNSIGNED NOT NULL,
    skin_area_name VARCHAR( 50 ) NOT NULL,
    skin_area_value VARCHAR( 1024 ) NOT NULL
    ) 
    

    to:

    CREATE TABLE evo_plugin_skin_area_86_data (
    skin_area_blog_ID INT UNSIGNED NOT NULL,
    skin_area_name VARCHAR( 50 ) NOT NULL,
    skin_area_value TEXT NOT NULL
    )

    After that, reinstall the plugin.

    Hi senkusha,
    When I first started to write this plugin I wanted to add some custom fields as default, so people can have an example of how to use it right out of the box. Unfortunately I couldn't find the way to specify a default array of fields and values with b2evo's plugin codes. But if you play around with it a bit you should get the general idea on how to use it.

    Topanga, sorry, I don't think I can work on the plugin anytime soon. I am afraid your requested modifications would have to wait... unless someone else is willing to adopt this plugin and take over its development...

    15 Apr 21, 2007 21:08

    I've got this installed, but I'm still getting an error.

    In the backoffice section under Tools/Skin area I get the following error and no idea what it is!

    Undefined property: text_from_AdminTabAction in ..../public_html/test/plugins/_skin_area.plugin.php on line 228

    Any help offered to this b2evolution newbie really appreciated! B)

    16 Jun 12, 2007 22:23

    Tassie wrote:

    I've got this installed, but I'm still getting an error.

    In the backoffice section under Tools/Skin area I get the following error and no idea what it is!

    Undefined property: text_from_AdminTabAction in ..../public_html/test/plugins/_skin_area.plugin.php on line 228

    Any help offered to this b2evolution newbie really appreciated! B)

    i'm also getting the same error (Undefined property: text_from_AdminTabAction) as explained above :(

    any ideas? this looks to be a very useful plugin :)

    17 Jun 12, 2007 22:29

    oh maybe i should add that i'm using the b2evo 1.10.2 "Florida" release ;)

    18 Jun 14, 2007 21:21

    Hello, when i defined value EnTete in admin page and add :

    <?php
    $Plugins->call_by_code( 'evo_SkinArea', array(
                'area_name'=>'EnTete'
                ) );
    ?>


    I've this errors :

    Notice: Undefined index: blog in /www/plugins/_skin_area.plugin.php on line 67
    
    Notice: Undefined index: length in /www/plugins/_skin_area.plugin.php on line 87


    And the value for this field :

    <img src="front.jpg" title="Nom de votre blog" alt="Nom de votre blog" />


    The picture is display.
    I'm use b2evolution 1.9.2

    Have you got a idea ?
    Thanks.

    19 Jul 04, 2007 16:30

    Can someone please repost the plugin? Those links in the thread dont seem to be working for me. I end up with a html file with the error message

    Could not connect to FTP Server: '70.85.122.223'. Please check your FTP-Settings

    20 Jul 05, 2007 23:10

    flipflip wrote:

    Hello, when i defined value EnTete in admin page and add :

    <?php
    $Plugins->call_by_code( 'evo_SkinArea', array(
                'area_name'=>'EnTete'
                ) );
    ?>


    I've this errors :

    Notice: Undefined index: blog in /www/plugins/_skin_area.plugin.php on line 67
    
    Notice: Undefined index: length in /www/plugins/_skin_area.plugin.php on line 87


    And the value for this field :

    <img src="front.jpg" title="Nom de votre blog" alt="Nom de votre blog" />


    The picture is display.
    I'm use b2evolution 1.9.2

    Have you got a idea ?
    Thanks.

    try changing the following on line 67 of the _skin_area.plugin.php code

    from

    if ( $params[ 'blog' ] )

    to

    if ( isset( $params[ 'blog' ] ) )

    plus perhaps also the same/similar on line 87 although just the above did the trick for me ;)

    21 Jul 05, 2007 23:28

    Tassie wrote:

    I've got this installed, but I'm still getting an error.

    In the backoffice section under Tools/Skin area I get the following error and no idea what it is!

    Undefined property: text_from_AdminTabAction in ..../public_html/test/plugins/_skin_area.plugin.php on line 228

    Any help offered to this b2evolution newbie really appreciated! B)

    i seem to be on top form tonight... :) here's another suggested fix for the above (seemingly cosmetic) error message

    in line 221 of the _skin_area.plugin.php code change the following:

    from

    echo $this->text_from_AdminTabAction;

    to

    echo $this->text_from_AdminTabAction = '';

    B)

    22 Jul 06, 2007 01:12

    Hi hiscores. Thanks for the info. As I'm now running 1.10.2 I'll need to reinstall this plugin. Will then try your fix and see how it goes.

    UPDATE: Seems fine now. :p Thanks again.

    24 Jul 13, 2007 08:10

    Thanks brin! Very glad that finally someone takes over. Have been feeling bad all this while for not answering the questions from the users.

    25 Sep 02, 2007 16:22

    Hi guys! I was able to use this plugin for a while but something's wrong. Skin areas that were supposed to be on the right side and the bottom are missing. Here's the error message.

    An unexpected error has occured!
    If this error persits, please report it to the administrator.

    Go back to home page

    Additional information about this error:
    MySQL error!

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4(Errno=1064)

    Your query:

    SELECT skin_area_value
    FROM evo_plugin_skin_area_21_data
    WHERE skin_area_name = "adzens_bottom"
    AND skin_area_blog_ID =

    26 Sep 03, 2007 07:24

    Problem solved.

    Since I used 2 skins, I didnt use customizable skin areas on the main page. No error anymore.

    Thanks

    27 Apr 30, 2008 22:27

    Does it work for 2.x? And where is the download link?


    Form is loading...