This question about Developing extensions (plugins skins etc.): Closed unanswered

HelpOnSpecificTableRenderingParameters

What attributes in table plugin are needed to render a table like the following sample

1 1 1 1
1 1 1 1
1 1 1 1

-- AntonioVega - 28 Jul 2011

See VarTABLE.

%TABLE{cellpadding="0" cellspacing="0" cellborder="1" tablerules="all" databg="#fff" headerbg="#fff" sort="off" tableborder="1"}%

1 1 1 1
1 1 1 1
1 1 1 1

-- ArthurClemens - 28 Jul 2011

Arthur, thank you for the attribute values, but in my 3.6.18 Firefox version under lunix and 5.0.1 Firefox version under Win7 the plugin´s rendering , of division colors are lighter (grey), and I need them black, as per the regular table html tag, any furhter ideas?

-- AntonioVega - 28 Jul 2011

All of the site colors are controlled by the Skin - See the topic PatternSkinColorSettings on your site. In order to follow the instructions on that page, you need:
  • AttachContentPlugin must be installed and enabled
  • You need to be logged in as an admin, or your id needs to be in the admin group.
Edit the topic PatternSkinColorSettings. Find the lines:

TABLE_BORDER Table border, sup (light neutral tone)

  • Local TABLE_BORDER = #eee

and change the eee to 000 for a black border on all tables. When you save the topic, it will automatically generate an attachment to the PatternSkinTheme topic called my_colors.css. You can activate the alternate colors by setting the below setting in Main.SitePreferences, your user preferences, any WebPreferences topic, or in individual topics.
   * Set USERCOLORSURL = /pub/System/PatternSkinTheme/my_colors.css 

-- GeorgeClark - 29 Jul 2011

Arthur, I set USERCOLORURL as mentioned (I did it on SitePreferences), I checked the pub dir and the AttachContentPlugin saved my_colors.css, though not sure where to check if the definition actually changed. Upon goin back to view the topic,the color is still unchanged, I wonder if the generated css is OK or is a Plugin thing. Also noted that the rendering of this page of my sample table with html tags are not black anymore Why is it????

-- AntonioVega - 29 Jul 2011

Sorry Antonio, I forgot to sign my comments. And I corrupted your example - I used the Wysiwyg editor to edit the topic and it reverted back to a %TABLE style layout. I'll restore your html.

Not sure why the color didn't apply for you. I think I noticed the same thing once - it was grey - but I did it a 2nd time and then it worked. I'd have to look at your css file to be sure. If you look at the raw css file (view the /pub/System/PatternSkinTheme/my_colors.css file in your browser directly, you should see the following definitions for the table components:

/* TablePlugin */
.foswikiTable,
.foswikiTable td,
.foswikiTable th {
   border-color:#000;
}

Maybe something cached in the browser? (though I expect this is highly unlikely since the css file is a new name).

-- GeorgeClark - 30 Jul 2011

Here is another solution that avoids the css file for one-off topics. Though you could probably apply this to multiple topics using a View Template. Or it can also be %INCLUDEd as is done here.

%STARTSECTION{"mystyle"}%
%ADDTOZONE{"head"
   id="MyCSS"
   text="
<style>
.foswikiTable,
.foswikiTable td,
.foswikiTable th {
   border-color:#000;
}
</style>"
}%
%ENDSECTION{"mystyle"}%

-- GeorgeClark - 30 Jul 2011

Arthur, I see your attributes worked.
I looked at the css and my_colors.css somehow still had #eee ! ? . I edited and saved a couple ??? of times PatternSkinColorSettings, until #000 color got changed. Rendeering still not working. BTW your exact atributes were both copied into the TablePlugin extensions in configure script and also in the topic. None worked.
FYI I am setting a new foswiki instance and on ly DirectedGrpahPlugin was added before AttachContentPlugin was added for this purpose. I am ready to start all over all the installation if you do not suggest otherwise.

-- AntonioVega - 30 Jul 2011

Antonio, I don't see any reason that you would have to reinstall Foswiki. That's pretty drastic. I don't believe that DirectedGraphPlugin would have any impact at all. Can you try the "inline" method I used above on this topic? (The %ADDTOZONE{ ....  }% text.) What browser are you using? If Firefox, do you have WebDeveloperToolbar installed so you can inspect the CSS that is applied to the rendered table?

-- GeorgeClark - 30 Jul 2011

George, your solition did work.
I installed WebDeveloper tool bar addon (did not it existed) for firefox though,
I deleted your inline css to verify that the reported style using the regular TablePlugin set up belonged to syle.css, despite I set SitePreferences variable USERCOLORSURL = /pub/System/PatternSkinTheme/my_colors.css
-- AntonioVega - 30 Jul 2011

Antonio, Can you expand %USERCOLORSURL% in a topic to confirm that it is properly set and propagated to your topic? Also verify that you can load /pub/System/PatternSkinTheme/my_colors.css in your browser. (examine the path of other images, css, etc. .. or verify the setting of $Foswiki::cfg{PubUrlPath} in your LocalSite.cfg. You might need a prefix in front of the /pub, such as /foswiki/pub )

Hm. actually rather than hard-coding the path, you should probably use %PUBURLPATH%/System/PatternSkinTheme/my_colors.css for example: /pub/System/PatternSkinTheme/my_colors.css

-- GeorgeClark - 30 Jul 2011

George USERCOLORSURL = %PUBURLPATH% /System/PatternSkinTheme/my_colors.css expands as /foswiki/pub/System/PatternSkinTheme/my_colors.css , Now it works but for my surprise, the table, still belogs to colors.css. The table style is following the options I originally placed on configure´s TablePluigin extension. I guess it can be considered solved, but somehow, the topic not using my_colors.css is not ok.

-- AntonioVega - 01 Aug 2011

Despite my previous remark on the strange behavior of css, the above arrangement rendered the tables as specified, so far so good,, but on the print version, they would not. This is not the case on foswiki org site, where both view and printable versions are rendered the same. I am lost again, the only reason keeping me from calling-off and re-installing foswiki is that this issue might help to improve the stability of foswiki, but maybe is the way to go. What are your thoughts?.

-- AntonioVega - 09 Sep 2011


Its been some time since I asked this Question, Back in the day, I changed colors.css in order to table,th,td colors to #000 on my previous foswiki instalation, and worked as per the following desired rendering. (All solid black lines in the table)

1 1 1 1
1 1 1 1
1 1 1 1

Now version 2.1.2 uses TABLEPLUGIN_TABLEATTRIBUTES to avoid hard coding. I am looking to have the above result, but I can not manage to get it. -- AntonioVega - 30 Jun 2016

QuestionForm edit

Subject Developing extensions (plugins skins etc.)
Extension TablePlugin
Version Foswiki 2.1.2
Status Closed unanswered
Related Topics
Topic revision: r18 - 25 Jul 2016, AntonioVega
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy