"scroll_box_engine"
and "scroll_box"
, respectively. Example:
%INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box_engine" }% %INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box" name="must_be_unique" title="This is a test" content="TWiki keeps getting more and more useful." delay="100" vstep="1" width="400" height="30" }%The
"scroll_box_engine"
section defines the CSS and JavaScript. It must be included once per page.
The "scroll_box"
section generates a scroll box. It can be included more than once on a page to create multiple scroll boxes. Parameters of "scroll_box" section:
Parameter | Description | Default |
---|---|---|
name |
Name of the box. Must be unique per page. Use only alphanumeric characters and underscore! |
(none) |
title |
Title of the box. | (no title) |
content |
Content of the box. Can be of any form, such as TML, HTML, images. Make sure to escape double quotes with a backslash, such as <br clear=\"all\"> . |
(none) |
delay |
Delay between scrolls, in milliseconds. | "1000" |
vstep |
Vertical step taken per scroll, in pixels. | (container height) |
width |
Box width, in pixels. | "300" |
height |
Box height of scrollable area, in pixels. | "40" |
boxstyle |
CSS of outer box. | "border: solid #d0d0d0 1px; |
titlestyle |
CSS of title. | "text-align:center; |
contentstyle |
CSS of content. | "text-align: justify;" |
%INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box_engine" }% <!-- once per page --> <div id="myOwnBoxContainer"> <div id="myOwnBoxContent"> (put content here) </div><!-- id="myOwnBoxContent" --> </div><!-- id="myOwnBoxContainer" --> <script type="text/javascript"> initScrollBox( 'myOwnBoxContainer', 100, 1, 200, 400 ); </script>The first parameter of
initScrollBox()
is the ID of the div that contains the scroll box. The numeric parameters are delay
, vstep
, width
and height
, respectively.
"scroll_box_engine"
and "static_box"
, respectively. Example:
%INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box_engine" }% %INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="static_box" title="Nice box" content="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." width="400" height="225" }%The
"scroll_box_engine"
section defines the CSS and JavaScript. It must be included once per page.
The "static_box"
section generates a static box. It can be included more than once on a page to create multiple boxes. Parameters of "static_box" section:
Parameter | Description | Default |
---|---|---|
title |
Title of the box. | (no title) |
content |
Content of the box. Can be of any form, such as TML, HTML, images. Make sure to escape double quotes with a backslash, such as <br clear=\"all\"> . |
(none) |
width |
Box width, in pixels. | "300" |
height |
Height of content, in pixels. | (auto) |
boxstyle |
CSS of outer box. | "border: solid #d0d0d0 1px; |
titlestyle |
CSS of title. | "text-align:center; |
contentstyle |
CSS of content. | (none) |
%INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box_engine" }% %INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="static_box_start" title="Nice box" width="400" height="225" }% Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. %INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="static_box_end" }%The
"scroll_box_engine"
section defines the CSS and JavaScript. It must be included once per page.
The "static_box_start"
section generates the start of a static box. Parameters of "static_box_start" section:
Parameter | Description | Default |
---|---|---|
title |
Title of the box. | (no title) |
width |
Box width, in pixels. | "300" |
height |
Height of content, in pixels. | (auto) |
boxstyle |
CSS of outer box. | "border: solid #d0d0d0 1px; |
titlestyle |
CSS of title. | "text-align:center; |
contentstyle |
CSS of content. | (none) |
"static_box_end"
section generates the end of the static box. Pairs of "static_box_start"
and "static_box_end"
section INCLUDEs can be done on a page to create multiple boxes.
"scroll_box_engine"
, "scroll_box"
, "static_box"
, "static_box_start"
and "static_box_end"
. View the raw text of this topic to look under the hood.
Rendered text scroll:
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
Raw text:
%INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box_engine" }% %INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box" name="textExample" title="Lorem ipsum" content="<br /><!-- make space on top --> Lorem ipsum dolor sit amet, consectetur ... deserunt mollit anim id est laborum." delay="100" vstep="1" width="300" height="150" }% |
Rendered logo roll:
TWiki Users Around the Globe
|
Raw text:
%INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box_engine" }% %INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box" name="logoExample" title="TWiki Users Around the Globe" content="<img src='%ATTACHURLPATH%/com-cisco.png' alt='cisco' width='56' height='30' /> <img src='%ATTACHURLPATH%/com-hp.png' alt='hp' width='43' height='30' /> ... <img src='%ATTACHURLPATH%/com-cmu.png' alt='cmu' width='117' height='30' />" delay="2000" vstep="30" width="300" height="30" }% |
Rendered image box:
Beverly Hills
|
Raw text:
%INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box_engine" }% %INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box" name="imageExample" title="Beverly Hills" content="<img src='%ATTACHURLPATH%/Dsc08566.jpg' alt='Beverly Hills' width='300' height='225' /> <img src='%ATTACHURLPATH%/Dsc08581.jpg' alt='Rodeo Drive' width='300' height='225' /> <img src='%ATTACHURLPATH%/Dsc08580.jpg' alt='Expensive cars' width='300' height='225' /> <img src='%ATTACHURLPATH%/Dsc08567.jpg' alt='Beverly Hills City Hall' width='300' height='225' />" delay="3000" vstep="225" width="300" height="225" }% |
Rendered static box:
Nice box
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.
|
Raw text:
%INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box_engine" }% %INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="static_box" title="Nice box" content="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." width="300" contentstyle="text-align: justify;" }% | |
Same static box, alternative syntax:
Nice box
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.
|
Raw text:
%INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="scroll_box_engine" }% %INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="static_box_start" title="Nice box" width="300" contentstyle="text-align: justify;" }% Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. %INCLUDE{ "%SYSTEMWEB%.ScrollBoxAddOn" section="static_box_end" }% |
ScrollBoxAddOn.zip
in your twiki installation directory. Content: File: | Description: |
---|---|
data/TWiki/ScrollBoxAddOn.txt | Add-on topic |
pub/TWiki/ScrollBoxAddOn/* | Images used by the examples |
Add-on Author: | TWiki:Main.PeterThoeny |
Copyright: | © 2012-2018 TWiki:Main.PeterThoeny |
License: | GPL (GNU General Public License) |
Add-on Version: | 2018-07-05 |
2018-07-05: | TWikibug:Item7841: Copyright update to 2018 |
2016-01-09: | TWikibug:Item7708: Copyright update to 2016 |
2013-10-11: | TWikibug:Item7328: Fix for ScrollBoxAddOn not working on IE9 -- TWiki:Main.YaojunFei |
2013-05-04: | TWikibug:Item7154: Document need to specify image width & height; add Twisty to history and installation section |
2012-10-14: | TWikibug:Item6985: Dark link colors in scroll box titles |
2012-10-12: | TWikibug:Item6971: Add ScrollBoxAddOn to core distribution |
2012-10-04: | TWikibug:Item6956: CSS based box shadow and rounded corners |
2012-05-14: | TWikibug:Item6837: Add non-scrolling box feature with "static_box*" sections; change padding from 10px to 15px; add boxstyle, titlestyle and contentstyle parameters |
2011-02-10: | TWikibug:Item6638: Avoid <p /> tag when including scroll box engine |
2011-01-25: | TWikibug:Item6638: Small style change: More padding below title |
2010-12-23: | TWikibug:Item6623: Doc improvements; changing function initScrollContent to initScrollBox |
2010-12-22: | TWikibug:Item6623: Initial version |
TWiki Dependency: | $TWiki::Plugins::VERSION 1.1 (TWiki 4.0) |
CPAN Dependencies: | none |
Other Dependencies: | none |
Perl Version: | 5.005 |
Add-on Home: | https://TWiki.org/cgi-bin/view/Plugins/ScrollBoxAddOn |
Feedback: | https://TWiki.org/cgi-bin/view/Plugins/ScrollBoxAddOnDev |
Appraisal: | https://TWiki.org/cgi-bin/view/Plugins/ScrollBoxAddOnAppraisal |