Not logged in. · Lost password · Register
Forum: General Help and Support Plugins RSS
Rolling text
Avatar
empgc #1
Member since Oct 2007 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: Rolling text
Hi to All,

I would like to have a rolling text in my wiki. I tried to use the marquee tag:

<marquee behavior="scroll" direction="right" loop="-1" truespeed>rolling text</marquee>

but it doesn't work.

Can someone give a hint how to do this task?

Best regards,
Eduardo Catarino
Avatar
Wolfgang_F. #2
Member since Jul 2007 · 24 posts
Group memberships: Members
Show profile · Link to this post
It may work, if you have html enabled in your wiki - but marquee does not belong to the html-standard (and I don't like this element).

If you do not want to allow html, you may write a little plugin to include marquee:
Look at http://www.heine-wiki.de/Playground
take the code of my Blockquote-Plugin and rename every (!) "blockquote" to "marquee" - instead of my <bq>some text</bq> you may use <mq>...</mq>

so function connectTo and function postConnect will be
    function connectTo($mode) {
      $this->Lexer->addEntryPattern('<mq>(?=.*\x3C/mq\x3E)',$mode,'plugin_marquee');
    }
 
    function postConnect() {
      $this->Lexer->addExitPattern('</mq>','plugin_marquee');
    }

 
and function render will be
    function render($mode, &$renderer, $data) {
        if($mode == 'xhtml'){
            if ($data[1] == DOKU_LEXER_ENTER){
                $renderer->doc .= '</p><marquee behavior="scroll" direction="right" loop="-1" truespeed>';
            } else if ($data[1] == DOKU_LEXER_UNMATCHED){
                $renderer->doc .= $renderer->_xmlEntities($data[0]);
            } else if ($data[1] == DOKU_LEXER_EXIT){
                $renderer->doc .= '</marquee><p>';
            }
            return true;
        }
        return false;
    }


It will not give you the possibility to change direction, speed etc. but it should work - I used code from http://wiki.splitbrain.org/plugin:inserted

Wolfgang
Avatar
empgc #3
Member since Oct 2007 · 3 posts
Group memberships: Members
Show profile · Link to this post
Hi Wolfgang,

    Thanks for your help. I'm going to try and then forward the results.

Best regards,
Eduardo Catarino
Avatar
empgc #4
Member since Oct 2007 · 3 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
It works!!!!!

Thanks for your help!!!

Best regards,
Eduardo
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-10-16, 07:16:33 (UTC +02:00)