Running text with database connection (4 posts)

  1. ozzie123
    Posted 11 years ago #

    Hello guys,

    Is it possible to have a running text in my site that display the latest entries of my blog and are clickable? (that's why I assume we need a database connection)

    Thank You

  2. Cypher
    Posted 11 years ago #

    The database is used to store everything WP related, from posts, pages, comments, configuration, statistics and more.

    How you display the posts is entirely up to you. Currently thre is a Loop that will show the last X (configurable by you) posts starting with the latest on top.

    If you want to make the output a "scrolling" version, which is what I think you mean by running, then you can do so with the appropriate JavaScript code or whatever and it should work fine.


  3. ozzie123
    Posted 11 years ago #

    Yes, that's what I'm asking about. Does anyone knows how to make such javascript that virtually pulls the title of my entries (based on certain variables) and also clickable.


  4. ozzie123
    Posted 11 years ago #

    Ok guys, I'm working out on this one but the news still doesn't show up on the scrolling javascript. Here's the code I write:

    <SCRIPT LANGUAGE="JavaScript">

    var myMainMessage=" rel="bookmark"><?php the_title(); ?>;
    var speed=150;
    var scrollingRegion=50;

    var startPosition=0;
    function mainTextScroller() {
    var mainMessage=myMainMessage;
    var tempLoc=(scrollingRegion*3/mainMessage.length)+1;
    if (tempLoc<1) {tempLoc=1}
    var counter;
    if(startPosition>scrollingRegion) startPosition=0;
    setTimeout("mainTextScroller()",speed); }

    <body onLoad="mainTextScroller()">

    <form name="mainForm">
    <input type="text" name="mainTextScroller" size="40" value>

    But still, the entry just doesn't scroll, it doesn't even displayed. Any hand here?

Topic Closed

This topic has been closed to new replies.

About this Topic