Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2009-01-18 10:46:48
- candyman
- Member

- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: msd_admin_colorpicker: Adds colorpicker to write tab
BTW
- msd_admin_colorpicker plugin add a color picker to the custom 2 field in the write tab to associate a custom color with each article
- msd_google_map add a google map to your article tab to assist you with adding lat/lng coordinates to the first 2 custom fields: custom 1 field and custom 2 field
It would be nice a package of the 2 plugins with the first plugin modified to use the third custom field avoiding the user the cose to use them simultaneously.
Not so important, anyway :P
Offline
Re: msd_admin_colorpicker: Adds colorpicker to write tab
You can easily edit msd_admin_colorpicker to change the field used.
Change
define("colorpicker_field", "custom-2"); //custom-2 can be changed.
to
define("colorpicker_field", "custom-3"); //custom-2 can be changed.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#18 2009-01-29 14:42:59
- candyman
- Member

- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: msd_admin_colorpicker: Adds colorpicker to write tab
Thanks!
Offline
Re: msd_admin_colorpicker: Adds colorpicker to write tab
Glad you like it.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#20 2009-01-29 20:24:40
- candyman
- Member

- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: msd_admin_colorpicker: Adds colorpicker to write tab
Another questions… I think that your plugin is very scenographic: it gives the admin area a very professional look… even without using it! ;)
In the help text should be useful to find some real life examples (apart the Widescreen template for which it was created).
For example I’d like to obtain a marker effect
(maybe with an extra icon to add beside the rah_textile plugin ones…): the user chooses the color with your colorpicker, applies the marker and obtain something like this:

<span style=“color: #ffffff; background-color: ##f2f65a”>HIGHLIGHTED TEXT</span>
Is it possible, in other words, to change the background color with your plugin?
Apart this, let’s talk apart possible things: can you post the code to associate a custom color with each article?
Thanks in advance!
Last edited by candyman (2009-01-29 20:28:54)
Offline
Re: msd_admin_colorpicker: Adds colorpicker to write tab
I’m not sure about the highlight effect.
As far as associating custom color with each article – That is what the plugin does. You could then use the value of the custom field where ever you want. The Widescreen template uses it in embeded css to change the background color using an article form.
<txp:if_custom_field name="Image-Color">
<!-- Custom color -->
<style type="text/css">
li#n-current a, li#n-archive a, li#n-previous a, li#n-next a {
background-color:#<txp:custom_field name="Image-Color" />;
}
#rowone-inner {
border-bottom:10px solid #<txp:custom_field name="Image-Color" />;
}
#rowone-inner h1 a:hover {
color:#<txp:custom_field name="Image-Color" />;
}
h2#title, h2#title a, h2#title a:hover {
background-color:#<txp:custom_field name="Image-Color" /> !important;
}
#caption a, #taglinks a {
border-bottom:1px solid #<txp:custom_field name="Image-Color" />;
}
#caption a:hover, #taglinks a:hover {
background-color:#<txp:custom_field name="Image-Color" />;
border-bottom:1px solid #<txp:custom_field name="Image-Color" />;
}
#taglinks h3 {
background-color:#<txp:custom_field name="Image-Color" />;
}
#footer {
border-left:10px solid #<txp:custom_field name="Image-Color" />;
}
#commentsarea a {
border-color:#<txp:custom_field name="Image-Color" />;
}
#commentsarea a:hover {
background-color:#<txp:custom_field name="Image-Color" />;
}
a.backtotop {
background-color:#<txp:custom_field name="Image-Color" />;
}
</style>
<txp:else />
</txp:if_custom_field>
I imagine you could do the same thing for your highlight use case by applying a class to the span wrapped around the highlighted text and use the custom color and some css to style it.
Last edited by MattD (2014-01-10 18:59:26)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: msd_admin_colorpicker: Adds colorpicker to write tab
v1.0 – allows you to edit the custom field and default color in the extensions tab.
See first post for download link.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#23 2009-08-18 09:57:56
- candyman
- Member

- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: msd_admin_colorpicker: Adds colorpicker to write tab
I tried to change the custom field color in the extension tab but a SAVE button is missing: the new custom field number remains the same. Where am I wrong?
BTW any new idea for the highlight effect? I can’t associate the CSS with the custom field…
Thanks in advance.
Last edited by candyman (2009-08-18 10:00:42)
Offline
Re: msd_admin_colorpicker: Adds colorpicker to write tab
I’ve fixed the missing button and the updated plugin is available for download on my site
I’ll have to take a look at rah_textile_bar.
Last edited by MattD (2009-08-18 13:58:52)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#25 2009-08-18 20:48:03
- candyman
- Member

- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: msd_admin_colorpicker: Adds colorpicker to write tab
Many thanks Matt!
Another suggestion: why not a toggle effect vith [+] and [-] for the colorpicker colour wheel as well as for the map of msd_google_map (default closed)?
Offline
Re: msd_admin_colorpicker: Adds colorpicker to write tab
Toggle was added to msd_google_map in v0.4. I can add the same to colorpicker.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#27 2009-08-18 21:08:36
- candyman
- Member

- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: msd_admin_colorpicker: Adds colorpicker to write tab
Perfect!
Could you add the [+] beside the custom field choosen in the msd_colourpicker preferences?
For example: I choose the custom-3 as colourpicker field, rename it as “Colour” in TXP=>Presentation=> Advanced Preferences and, in the TXP=>Contents=>Write page, I’d like to obtain:
Colour [+]
Last edited by candyman (2009-08-18 21:10:40)
Offline
Re: msd_admin_colorpicker: Adds colorpicker to write tab
Also rewrote a lot of the code so that it’s much more readable and admin side only. Please let me know if you see any issues.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#29 2009-08-19 06:20:14
- candyman
- Member

- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: msd_admin_colorpicker: Adds colorpicker to write tab
Thank you very much!
The only issue I see is that the only custom used is custom-1: even changin’ the custom number in the plugin preferences the [+] is always beside the first TXP custom field.
Offline
Re: msd_admin_colorpicker: Adds colorpicker to write tab
I just confirmed I can change it on my install. I’ve tested it in Chrome and Firefox 3.5.
What browser are you using?
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline