Customize Moodle table...

Customize Moodle table...

by Éric Bugnet -
Number of replies: 6
Picture of Documentation writers Picture of Plugin developers Picture of Translators

Hi all,

I want to cutomize Moodle, and I'm looking for making blocks (like Main Menu, Calendar...) with all the corners rounded.

Meaning modifing the "StartTable" ? and "EndTable" ? function I think...

Problem is : I don't know where looking !

Does someone found this function ?

Thanks all, and excuse my English !

Eric

Average of ratings: -
In reply to Éric Bugnet

Re: Customize Moodle table...

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hello Éric,

You'll find what you're looking for in the "style.php" file (it's a CSS definition file) in any of the themes found in the "theme" folder of your Moodle installation.

Begin with the "standard" theme and look for the "-moz-border-radius-bottomleft" etc. properties !

Cheers and see you in the "Moodle en français" course wink
Nicolas
In reply to Nicolas Martignoni

Re: Customize Moodle table...

by Éric Bugnet -
Picture of Documentation writers Picture of Plugin developers Picture of Translators

Hi Nicolas,

Thanks for your answer. I try want you say, but nothing happened (20pix, 50pix, or 100pix : all the same !)

But, I think I want more !

Look at the picture, I want to customize tables like the first one, meaning include <tr>...<td>...</td>...</tr> into the code, not only CSS.

I'm sure that top of the table and bottom of the table are made in a function, and I if I change this function, all the tables will be like I want... I now looking for this function to change. Do you understand what I want ?

I don't really know CSS, but I think it can't help me !

If you have another idea, or if you know where is this function, you're welcome !

Thanks all. Eric.

(I saw nothing to explain it in French course and forum)

Attachment ScreenShot103.jpg
In reply to Éric Bugnet

Re: Customize Moodle table...

by Éric Bugnet -
Picture of Documentation writers Picture of Plugin developers Picture of Translators

I find what I want : Look at the picture.

I've modifing source of this file : moodle/Lib/weblib.php here : function print_side_block_start and function print_side_block_end

Thanks for your answers !

Eric

Attachment ScreenShot106.jpg
In reply to Éric Bugnet

Re: Customize Moodle table...

by Genner Cerna -
How? and what script?
In reply to Genner Cerna

Re: Customize Moodle table...

by Éric Bugnet -
Picture of Documentation writers Picture of Plugin developers Picture of Translators

Hi... !

This file : moodle\lib\weblib.php

Needeing to know php and html, and shearch in this file (in blue : code to change, in red : comments)

function print_side_block_start...

}

// [pj] UGLY UGLY UGLY! I hate myself for doing this!

// When the Lord Moodle 2.0 cometh, his mercy shalt move all this mess

// to CSS and banish the evil to the abyss from whence it came.

begining of the table :

echo '<table style="width: 100%;" cellspacing="0" cellpadding="5"'.$attrtext.'>';

if ($heading) {

line for the title :

echo '<thead><tr><td class="sideblockheading">'.$heading.'</td></tr></thead>';

}

echo '<tbody style="background-color: '.$THEME->cellcontent2.';"><tr><td class="sideblockmain">';

}

And

function print_side_block_end() {

end of the table :

echo '</td></tr></tbody></table><br />';

echo "\n";

}

Make a table and call images in the cells.

It's not the thing to do if you're not sure of you : you're changing source of Moodle !

Good luck, Eric.

In reply to Éric Bugnet

Re: Customize Moodle table...

by Mario Planas -

Hi Eric,

By your messages in the forum, I've seen that you have found a solution to make rounded corners. I would like to present the blocks as in the following image.

block

I don´t know PHP. Do you know where can I get the code to generate this style?

Thanks,

Mario