wp-quotes – scrolling text hack

Uncategorized

If you want scrolling quotes to appear in wordpress, install wp-quotes and replace the stuff from line 66-76 in wp-quotes.php with the following code:

<div <?php echo $encloseDiv?>>
        <div class="<?php echo $quoteDiv?>"><marquee><?php echo $quote->quote; ?></marquee></div>
        <?php
        if ( !empty($quote->author) )
        {
            ?>
            <div class="<?php echo $authorDiv?>"><?php echo $quote->author;?></div>
            <?php
        }
        ?>
    </div>

Original code:

<div <?php echo $encloseDiv?>>
        <div class="<?php echo $quoteDiv?>"><?php echo nl2br($quote->quote); ?></div>
        <?php
        if ( !empty($quote->author) )
        {
            ?>
            <div class="<?php echo $authorDiv?>"><?php echo $quote->author;?></div>
            <?php
        }
        ?>
    </div>

As you can see I just added marquee tags and removed the nl2br() function.

Tags: ,

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>