Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-06-24 00:13:37

rawling
New Member
Registered: 2010-06-23
Posts: 7

Do a plugin (HELP)

Hello, I’m new in this of Textpattern and wanted to contact someone to ask you some things about the plug-in and they asked me to make one.
I want to make a plugin to display a tab that shows a color palette to change the background to the main page. (CSS)

could you help me?

sorry for my English

Sorry for the inconvenience
Regards

Offline

#2 2010-06-24 00:52:17

masa
Member
From: North Wales, UK
Registered: 2005-11-25
Posts: 1,095

Re: Do a plugin (HELP)

I’ve never used it but there is msd_admin_colorpicker

Maybe you can adapt that for your purpose?

Offline

#3 2010-06-24 03:07:27

rawling
New Member
Registered: 2010-06-23
Posts: 7

Re: Do a plugin (HELP)

thanks you! I´ll see it!

Offline

#4 2010-06-24 18:33:19

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Do a plugin (HELP)

Probably best to continue our conversation here. msd_admin_colorpicker could be modified to add a colorpicker to some other textbox whithin the admin panle of Textpattern and then the variable set by that textbox could be used else where, like in a front end template to change the background.

Are you looking for anyone with administrative access to be able to change the background color of the website?

P.S. This seems like a very specific and unusual request. I don’t imagine many people would use this.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#5 2010-06-24 23:12:59

rawling
New Member
Registered: 2010-06-23
Posts: 7

Re: Do a plugin (HELP)

Hi Matt, i know is an unusual and specific request, but is a work that i have to do for college.

The profesor request me to do the plugin for this sunday.

I don´t understand much of textpattern. Can you help me?

Thank you very much.

Regards

Offline

#6 2010-06-24 23:44:00

rawling
New Member
Registered: 2010-06-23
Posts: 7

Re: Do a plugin (HELP)

Matt, the plug in that I have to do is like this:
1_I need a palet with colors to be shown
2_Select a color
3_ that color have to appear in the background of the CSS .
This plug in is from the admin to change the color of the USER page.
To help the user to change his/her backgorund color..

Thank you very much

Regards

Offline

#7 2010-06-25 07:04:40

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Do a plugin (HELP)

So you need to create the plugin?

I would set a variable, similar to the adi_variables plugin, using the colorpicker and use that variable in the css of the site.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#8 2010-06-26 05:56:53

rawling
New Member
Registered: 2010-06-23
Posts: 7

Re: Do a plugin (HELP)

its ok, but I´don´t undestand how I do it. Im a NW.
Could you help me? please
thank you

Offline

#9 2010-06-26 18:31:45

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Do a plugin (HELP)

If a professor requests you to make a plugin, then I’m assuming this is a school assignment and we shouldn’t make the plugin for you, but instead guide you in the right direction. I’d suggest using this as a starting point for creating your first plugin.

I believe requests for help with school assignments should focus on specific parts of a problem, not a generic “could you help me”. After all, the goal is to learn how to do it yourself ;)

Offline

#10 2010-06-26 21:29:07

rawling
New Member
Registered: 2010-06-23
Posts: 7

Re: Do a plugin (HELP)

Thank you rudd.
I read this article 2 times. I don´t understand. Also I read others articles.
I dont know how to change de CSS background.
Actually I do this code.

if (@txpinterface == 'admin') {
   add_privs('abc_admin_hello_world', '1'); // Publishers only
   register_tab('extensions', 'abc_admin_hello_world', 'Paleta de colores');

   register_callback('abc_admin_hw_gui', 'abc_admin_hello_world');
}

function abc_admin_hw_gui($event, $step) {
   pagetop('Titulo de pagina');
   echo 'Generando Paleta!';

  $filas=safe_rows("name,css","txp_section",1);

  echo "<form><table align=\"center\"><tr><th>Seccion</th><th>Estilo</th></tr>";
  echo "</select></table></form>";

  echo "<form><table align=\"center\"><tr><th><select name=\"seleccion\">"; 
  foreach ($filas as $registro) {
  echo "<option value=".$registro['css'].">".$registro['name']." -      ".$registro['css']."</option>";
  }

  echo "</tr></th></select></table></form>";

  echo "-";//Bizarreada para ganar un renglon.
  echo "<form><table align=\"center\"><tr><th>".'Ingresar color:'."</tr></th></table></form>";

  echo "<form><table align=\"center\"><tr><th><input type=\"text\" name=\"color\"></tr></th></table></form>";

  echo "<form><table align=\"center\"><tr><th><input type=\"submit\" name=\"aceptar\"></tr></th></table></form>";
}

(added bc.. for better code display. -Els)

Last edited by els (2010-06-27 00:45:56)

Offline

#11 2010-06-27 22:02:33

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Offline

Board footer

Powered by FluxBB