This is a page from the documentation from my site so if it doesnt follow the guideline here I will change it. I have removed the working examples as this server doesnt have this hack.
- Purpose - The purpose of this is to enable the creation of custom div tags, and maintain the other wikka formating capabilities, and the ability to have a div inside of another div.
- Syntax - This is a wikka command that is broken into two parts to allow div's inside of div's.
- Opening Tag - This is the more complicated part, as it is one big shortcut. The basic syntax is the following "<<[bg_color][fg_color][width][floating]<"
- [bg_color] - This is a single letter selecting the background color of the div
- [fg_color] - This is a single letter selecting the font color in the div
- [width] - This is a single number representing the width of the div, 0 = 100%, and all other number representing tenths
- [floating] - This is a single letter representing the float css option, r = right, l = left, n = none.
- Closing Tag - Always the same, no matter what you made for the opening tag. "<d<"
- The following colors are selectable. For the bg_color and fg_color. (If you wish to add more then ammend the CSS) I selected soft colors so that they would look good in the browser and not detract from the appearance of the page. Also if you want to add more go ahead, and just add to the CSS, folowing the others as an example
- r - Red
- o - Orange
- y - Yellow
- g - Green
- b - Blue
- v - Violet (Purple)
- k - Black
- w - White
- Examples
<<gk6r< Green box with black text Floating to the right covering 60% <d<
<<rk5n< Text inside the red would go here <<gk5r< And text inside the green would go here <d< <d<
- Notes
- You need to keep track of all the parts that you open and you need to remember to close each, or you WILL screw up the HTML.
- All parts of the opening tag are required.
- Yes I know this isnt the most elegant solution but it works very well.
- The Following Code Changes had to be made for this to work - remember that lines numbers, and filename are according to my system. Also Note that I do not usually code in php, so if my syntax is not according to the wikka standards please tell me and I will correct it.
/var/www/html/Wikka/Formatters/wikka.php (line 73)
- // Create custom DIV boxes
- // Syntax = [bgColor][fgColor][width][floating], to close use
- {
- }
- {
- return ('</div>');
- }
/var/www/html/Wikka/Formatters/wikka.php (line 423)
- "\<\<....\<|\<d\<|".
/var/www/html/Wikka/css/wikka.css (line 605)
- /* This is the section added for the customer div RobertLeckie */
- .rl_default {
- border:1px solid #EDD
- margin:5px;
- padding:0 15px 10px 15px;
- }
- .f_l {
- float: left;
- }
- .f_r {
- float: right;
- }
- .f_n {
- float: none;
- }
- .bg_r {
- background-color: #FF7C80;
- }
- .bg_o {
- background-color: #FFCC99;
- }
- .bg_y {
- background-color: #FFFF99;
- }
- .bg_g {
- background-color: #CCFFCC;
- }
- .bg_b {
- background-color: #AAD4FF;
- }
- .bg_v {
- background-color: #D4AAFF;
- }
- .bg_k {
- background-color: #000000;
- }
- .bg_w {
- background-color: #FFFFFF;
- }
- .fg_r {
- color: #FF7C80;
- }
- .fg_o {
- color: #FFCC99;
- }
- .fg_y {
- color: #FFFF99;
- }
- .fg_g {
- color: #CCFFCC;
- }
- .fg_b {
- color: #AAD4FF;
- }
- .fg_v {
- color: #D4AAFF;
- }
- .fg_k {
- color: #000000;
- }
- .fg_w {
- color: #FFFFFF;
- }
- /* This is the end of the custom div section by RobertLeckie */
WantedFormatters