Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


Control Look of Module Display on Wiki Pages

posts: 130

Continuing to work on a project whereby I use some dynamicdrive script (rsspausescroller) on our library web pages. Thanks to the help of this community, getting closer and closer to the solution. Special thanks to chibaguy who is a work horse on these forums.....

I was able to get the code into a module (see earlier post re: scrolling rss feeds for a text file that shows how I did this)....
http://web1.co.douglas.or.us/tiki/tiki-index.php?page=scrollingrssfeeds

My new problem is that I cannot seem to control the look of the module itself on the wiki page. I do not want the box displayed at all....I am using the wiki plugin module to display it with the following syntax....

Image
Copy to clipboard
{MODULE(module=>rss_scroll,nobox=>y,decorations=>n) /}


The help on the wikiplugin shows the following:
Displays a module inlined in page:

Image
Copy to clipboard
{MODULE(module=>,float=>left|right|none,decorations=>y|n,flip=>y|n,max=>,np=>0|1,args...)}{MODULE}


decorations doesnt seem to work if I say >=n, and on some docs pages for the wikiplugin module, I found where you were suppose to be able to use nobox=y> to show no box, although this doesnt show up in the help for the plugin. I believe I have using version 1.10.

Another angle would be, I dont think I ever want the box to show up when displaying a module on the wiki page, can I edit the css to remove the boxes when displayed on a wiki page, but keep the boxes for the menu?

posts: 4657 Japan

The module properties are set by div.box, h3.box title (div.box-title in older themes), and div.box-data. These are styled according to the theme's stylesheet. The properties can be overridden in wiki pages by adding new selectors, .wikitext div.box, .wikitext h3.box-title, and .wikitext .box-data to the css file. You can control their width in wiki pages this way, what the "box" properties are (borders, etc. in div.box), whether the title displays (use display:none, for example).

-- Gary


posts: 130

Thanks once again for your quick response. Just to clarify for me and whoever else this might help. What I need to do is edit the css for the particular theme I am using and add the sections you identified above into it.....

Do I need to do anything else from there, or will this just automatically not show boxes within wiki pages? Or do I need to add some additional code when I display the modules to take advantage of the css change noted above....

posts: 4657 Japan

The properties for div.box (which may be written just .box, in the stylesheet) and .box-data and .box-title will be used unless the same property is specified by .wikitext .box with a different value. For example, if the module width is set by .box {width: 174px} normally, this will be used, but if you have a .wikitext .box {width: 100%}, this will be used instead for modules in the wiki page (the wiki page content is in div.wikitext). In addition to overriding existing .box properties, you can add more properties for .wikitext .box, and these will apply only to modules in the wiki page, not those in the side columns, because .wikitext .box, which gets the additional properties, is a subset of .box. So you don't need to add anything else in the CSS file, but you can if you want to give the wikitext module box additional styling.

-- Gary


posts: 130

Well, even with all of your excellent support, I couldnt seem to get the desired changes.....

I have attached the css file for the theme we are using, in the hopes you have nothing better to do than peruse through and lend me a hand 😀

Thanks for any help you can provide....

posts: 4657 Japan

Hmm, I searched the file for ".box" and ".wikitext" in order to find the ".wikitext .box" that needs to be added, and only the standard instances show up. For some reason the new lines to style wikitext modules aren't in this file (which I hope normally has a .css extension, not .txt).

-- Gary

posts: 130

I sent you a completely clean (no editing from me) css file (yes, I renamed it to .txt) just to show you what css file we are using......

for example, if I add the following css to it, I would expect the border of the boxes to be in red when displaying on a wiki page using the module plugin.....does it matter where I put this within the css file? is this the correct syntax? when i view the css file using the edit templates feature of tikiwiki, sure enough I see a red border display, but when I view the wiki page using the module plugin, I do not see a red border....

Image
Copy to clipboard
.wikitext.box { border: 4px solid red; }

posts: 130

Found it! Based upon the knowledge you provided, it was staring me right in the face!

In the top of the css file where it was configuring how boxes would be displayed, sure enough I found a wikitext div.box css entry.....when I added stuff like borders: none; and then I added another entry of wikitext div.box-title and then display: none; that did it!

A couple of things I was confused about, mainly because of my lack of good knowledge regarding css, is that the space between wikitext div.box is intended....i was looking in the wrong place and i was trying stuff like wikitext.box or wikitext.div-box......

thanks for your help chibaguy, and hopefully this will help someone else as well.....


posts: 130

Just to be accurate for future reference, here is the css I added to remove the borders and title shading from modules on wiki pages.....

Image
Copy to clipboard
.wikitext div.box { width : auto; border: none; } .wikitext div.box-title { display: none; }