Forums

[Plugin: User Community] Suggestion: Editable css (2 posts)

  1. johandemeijer
    Member
    Posted 3 years ago #

    Hi Txanny,

    I've got a suggestion for the User Community Plugin.

    The page indicators are coloured to alkivia.org. But my site have got different colours.
    Last time I've edited the css file, but when I receive an update, the css file gets overwritten.

    So can you build a css editor for the plugin? :) Would be great!

    Regards,

    Johan

  2. Txanny
    Member
    Posted 3 years ago #

    Yes, I provided some colors from my theme, but you can change it easily editing the CSS file, and moving it by using a very simple custom plugin.

    Follow this steps:

    1. Edit and save the CSS file out of the plugin folder, can be anywhere on the web. The only rule is to be accessible by a browser.

    2. Create a plugin like this, to change the public style URL. (More filters are available to change other things, I promise I will write a documment for all them as soon as 0.6 version has been released).

    <?php
    <?php
    /*
    Plugin Name: My Filters
    Plugin URI: http://example.com
    Description: My custom filters for plugins I use.
    Version: 1.0
    Author: My Name
    Author URI: http://example.com
    */
    
    /**
     * This will set a new style file for User Community.
     * Remember you have to write your new community.css file!
     */
    function my_community_style( $old_url ) {
        return 'http://mysite.com/styles/community.css';
    }
    add_filter('akucom_style_url', 'my_community_style');
    ?>

    3. Upload this your plugin's folder and activate the plugin. Done!

    It's a good idea to include a field to set this URL on the settings page. I prefer this than providing an editor, as you can use the tool that best meets your needs and upload it where you want.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags