Support forums : Feature Requests

Include Gray in formatting buttons

Now that you've read stuff first and introduced yourself, the next thing you'll probably want to do is say what you want Quam Plures to have and do. So here ya go: A feature request forum!

Moderator: Dracones

Re: Include Gray in formatting buttons

Postby Afwas » Mon Mar 07, 2011 4:21 am

Yes I found it confusing as well. Took some time to figure out I had to click the button for the color to change (no change when I leave he ColorPicker by clicking somewhere else in the page). The latter is due to not having the selected color with the onHide event.
The light colorscheme provided with the plugin is too light for the standard QP gr[a|e]y. Need something a tad darker but that would mean redo all shades of gr[a|e]y in all images.
Remembering the last color actually is a great idea. Could save it in $Session or even $User, perhaps $Settings so everybody gets the last used color by anyone :)

Having done this ColorPicker I can still have a go at SimpleColor as it is called.
Afwas
Dracone
User avatar
 
Posts: 72
Joined: Sun Nov 22, 2009 5:28 pm
Location: Groningen, The Netherlands

Re: Include Gray in formatting buttons

Postby Afwas » Mon Mar 07, 2011 4:23 pm

colorpicker in lp:~foppe/quam-plures/quicktags_colorful
Needs some thourough testing. It's feature complete as discussed in previous posts.
Afwas
Dracone
User avatar
 
Posts: 72
Joined: Sun Nov 22, 2009 5:28 pm
Location: Groningen, The Netherlands

Re: Include Gray in formatting buttons

Postby Afwas » Mon Mar 07, 2011 5:49 pm

@EdB: Can you help debugging? It doens't seem to remember previous color the first time around but it does every subsequent edit or new post.
I don't see why and when exactly.
Afwas
Dracone
User avatar
 
Posts: 72
Joined: Sun Nov 22, 2009 5:28 pm
Location: Groningen, The Netherlands

Re: Include Gray in formatting buttons

Postby EdB » Mon Mar 07, 2011 6:23 pm

Will do. Dunno if I would have even noticed such a subtle "bug" but now that you mentioned it I'm sure it'll stand out like a ... like a ... like a thing that stands out a lot. Anyway I got the branch so I'll do an install of it some time today. Dunno when though.
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: Include Gray in formatting buttons

Postby EdB » Mon Mar 07, 2011 8:24 pm

installing on WAMP wrote:Installing plugin: ping_pingomatic_plugin... OK.
Installing plugin: quicktags_plugin...
Warning: Call-time pass-by-reference has been deprecated in D:\wamp\www\quicktags_colorful\qp_plugins\quicktags_plugin\_quicktags.plugin.php on line 211
OK.
Installing plugin: smilies_plugin... OK.

Same thing at the top of the first admin page when I log in. Dunno if it is wamp-specific or what. All I know is it seemed a wee bit upset about line 211.
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: Include Gray in formatting buttons

Postby Afwas » Mon Mar 07, 2011 11:33 pm

Code: Select all
209        function AfterItemInsert( & $params )
210        {
211                $this->AfterItemUpdate( & $params );
212        }

Nothing special
Afwas
Dracone
User avatar
 
Posts: 72
Joined: Sun Nov 22, 2009 5:28 pm
Location: Groningen, The Netherlands

Re: Include Gray in formatting buttons

Postby Afwas » Mon Mar 07, 2011 11:50 pm

Hit Write in toolbar
Write a post with a new color
Hit Save. You're now in the list with posts
Hit Edit

Now the colorpicker *does not* default to the latest saved color, which would be the colorof your newly created post. Every subsequent action seems fine for as far as my debug goes at this moment.

Edit The 'Save' action (not publish) doesn't trigger either AfterItemInsert() nor AfterItemUpdate()

Edit Yabs couldn't reproduce so we're enclined to call it a no bug
Afwas
Dracone
User avatar
 
Posts: 72
Joined: Sun Nov 22, 2009 5:28 pm
Location: Groningen, The Netherlands

Re: Include Gray in formatting buttons

Postby EdB » Tue Mar 08, 2011 4:42 am

Not sure which aspect you're not calling a bug, but those two hooks most certainly do work, and this plugin throws an error. Deleted and re-got the branch and I'm getting the same thing, uninstalled the plugin and I get the same thing on the "install plugin" page, so yeah it's a bug. Very easily solved however :)
Code: Select all
<?php
/**
 * foo Plugin
 *
 * @package plugins
 * @subpackage foo
 */

if( !defined('QP_MAIN_INIT') ) die( "bitches be tryin', bitches be dyin'" );

/**
 * foo Plugin
 *
 * @package plugins
 * @subpackage foo
 */
class foo_plugin extends Plugin
{
    var 
$author 'EdB';
    var 
$code 'foo';
    var 
$group 'foo';
    var 
$sub_group 'foo';
    var 
$number_of_installs 1;
    var 
$priority 1;
    var 
$version '0.1';

    
/**
     * @see Plugin::PluginInit()
     */
    
function PluginInit( & $params )
    {
        
$this->name $this->T_('foo');
        
$this->short_desc $this->T_('testing AfterItemInsert and AfterItemUpdate');
        
$this->long_desc $this->T_('testing AfterItemInsert and AfterItemUpdate');
    }


    
/**
     * @see Plugin::GetDefaultSettings()
     */
    
function GetDefaultSettings( & $params )
    {
        global 
$app_name;

        
$default_settings = array(
            
'use_AfterItemInsert' => array(
                
'label' => $this->T_('AfterItemInsert'),
                
'defaultvalue' => '0',
                
'type' => 'checkbox',
                
'note' => 'use the AFterItemInsert hook?',
            ),
            
'use_AfterItemUpdate' => array(
                
'label' => $this->T_('AfterItemUpdate'),
                
'defaultvalue' => '0',
                
'type' => 'checkbox',
                
'note' => 'use the AFterItemUpdate hook?',
            ),
        );
        return 
$default_settings;
    }


    
/**
     * @see Plugin::GetDefaultUserSettings()
     */
    
function GetDefaultUserSettings( & $params )
    {
        
$user_settings = array(
            
'random_color' => array(
                
'label' => $this->T_('random color'),
                
'type' => 'text',
                
'defaultvalue' => '000000',
            ),
        );
        return 
$user_settings;
    }


    
/**
     * @see Plugin::AfterItemInsert()
     */
    
function AfterItemInsert( & $params )
    {
        if( 
$this->Settings->get'use_AfterItemInsert' ) )
        {
            die( 
"AfterItemInsert just happened" );
        }
        else
        {
            
$this->change_users_color();
        }
    }


    
/**
     * @see Plugin::AfterItemUpdate()
     */
    
function AfterItemUpdate( & $params )
    {
        if( 
$this->Settings->get'use_AfterItemUpdate' ) )
        {
            die( 
"AfterItemUpdate just happened" );
        }
        else
        {
            
$this->change_users_color();
        }
    }


    
/**
     * supporting function
     */
    
function change_users_color()
    {
        
$new_color '';
        while( 
strlen$new_color ) <)
        {
            
$new_color .= sprintf("%02X"mt_rand(0255));
    }
        
$this->UserSettings->set'random_color'$new_color );
        
$this->UserSettings->dbupdate();
    }

}

?>

Oh and one of the things that wasn't obvious to me was how to actually tell it "yeah I want this color". I figured out to click the little color wheel. And I figured out if I didn't want to have that floaty-box thing to click back on the main page, but I looked at the code. The image that moves from top to bottom doesn't really change much. Perhaps that should just be an image of like a check-mark or something? Or when you hover over it you get the bottom half which would be a check mark or something? Some way that more folks would be inclined to think "clicking this will be using this color".

OMG I think I just duplicated the "it won't set the first time" issue. Lemme check again... Ah well. Can't test it quickly due to I now have "Duplicate entry 'quicktags' for key 'plug_code'(Errno=1062)" which I assume is coming from the fact that this plugin throws an error all the time due to what was 211 but just now complained about 209.

ANYWAY what I noticed was that dragging the slider up and down didn't change the box for "color I am about to select", but clicking in the big box area and dragging the dot to the specific color of my dreams made that little box update. Dunno if that is related or not to the original issue, but when I saw it I thought it might be the same thing.
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: Include Gray in formatting buttons

Postby EdB » Tue Mar 08, 2011 4:57 am

Yeah that seems to be related to the "it won't save the first pass color". Meaning it will if you drag the dot in the bigger multi-color section instead of the slider it will both use and save the color selected.
EdB
Dracone
User avatar
 
Posts: 2072
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: Include Gray in formatting buttons

Postby Kimberly » Tue Mar 08, 2011 5:30 am

I grabbed the colour picker this morning but just now have tested it. I renamed the quick tag plugin to old, uploaded the new quick tag, went to the backend and uninstalled the quick tag plugin and reinstalled it. Maybe I should uninstall the old one first; My logic is not always forward. Anyway, it installed without a problem.

Went to the write tag with TinyMCE enabled and it worked fine for me. Quickly figured out that I needed to drag the circle with the cross. It started at grey but easy to change the colours around (I am use to working with similar in graphic programmes). Colours applied and shown in the TinyMCE editor. Exit the write editor and then went back in. It was back to the grey, but I don't really see that as a problem because I may be sliding things around anyway. If I have fixed colours that I always want to use, then I would have them preset; especially since TinyMCE allows present formats in a drop down list.

Left the edit window and then turned off TinyMCE. Back to the editor in html mode. Again when bringing up the colour picker back to the default grey, but to me that is no real problem. Applied colours as before. Worked as expected. If you decide to change the colour, you have to delete the span since it will apply a second span; but then that is no real biggie either since we are in html mode and can see the spans and delete them with ease; or delete the span first before changing the colour.

-Kimberly
Kimberly
Dracone
User avatar
 
Posts: 842
Joined: Mon Jul 19, 2010 4:44 pm

PreviousNext

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron