Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member
    Join Date
    Jan 2013
    Posts
    5
    Member #
    35032
    Hi Everyone. I need to find the best way of shuffling html content. I am creating a mini event and the gift page will have anywhere from 10-12 gifts on it and I want all the gifts to randomly rotate to give each of them the same amount of exposure at the top. Here is an example of the type of gift page I will be using, http://www.realmoneymaker.net/giveaway/downloads/

    I'm not overly familiar with scripting languages, so if you know how this can be done and can point me in the right direction, it would be much appreciated!

    Thanks

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    First of all, make each one the same CSS class. So it doesn't matter which one goes into which location. Float them left (float:left and then do a break after every three of them.

    Note each one has the same class name "item". That class will have a float:left; with some padding.
    When three of them are placed, you will do a float (clear) reset and start over on the next row.

    So it looks sort of like this:
    Code:
            <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/DerekJ-binder-small.png" width="210" height="250" title="" alt="" /><br /></h2><center>From Zero To Hero</center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_derekjamieson" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a>        </h2>
            </div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/KirillisnV-tacash.gif" width="200" height="200" title="" alt="" /><br /></h2>FREE Guide to Making Money With Instant Cash Pay Programs Reveals Secret Powerfull Strategies To Start Generating Commissions as Quickly as Tomorrow<h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_kirillvasilyev" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2>
                </div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/PetarK-dvdcaseopen4.png" width="200" height="261" title="" alt="" /><br /></h2><center>This truly automated software makes $4000+ a week on autopilot. You can now get this software for free today!</center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_petarkostadinov" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2>
            </div>
    
    <div style="clear:both;"></div>
    
            <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/Nataliya7dplr.jpg" width="200" height="225" title="" alt="" /><br /></h2><center><center>Stop spending weeks developing online profiting ideas that may never work. Discover how to create your&nbsp;</center><center>own unique product with pre existing PLR products</center></center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_nataliya" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2></div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/MarkL-img1kce.png" width="200" height="200" title="" alt="" /><br /></h2><center>PLUS More FREE Marketing Products...</center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_marklee" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2></div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/Chris_Rich-picresized_1345175639_IMrevolution_eCover_flat_600.jpg" width="200" height="200" title="" alt="" /><br /></h2><center><center>Learn The Business Model That Took Me From Making $700/Month To $314,900.29/Month In An 18 Month Period!</center></center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_christopherrichmond" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2></div>
    
    <div style="clear:both;"></div>
    It's important to do that first ... make them all use the same coding so they are alike.
    When you get that to look nice, let me know.

    The next part after that will be to use PHP to render your items randomly.

    EDIT:
    Also change the name of your page from "index.html" to "index.php" if you haven't already done so.


  4. #3
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Are you talking about shuffling on the page on a timer, or every time the page is loaded?

    And is that what you actually plan on "giving away", or is it just an example of 10-12 items on a page (I'm really hoping it's the latter)?
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  5. #4
    Junior Member
    Join Date
    Jan 2013
    Posts
    5
    Member #
    35032
    Quote Originally Posted by mlseim, post: 247275
    First of all, make each one the same CSS class. So it doesn't matter which one goes into which location. Float them left (float:left and then do a break after every three of them.

    Note each one has the same class name "item". That class will have a float:left; with some padding.
    When three of them are placed, you will do a float (clear) reset and start over on the next row.

    So it looks sort of like this:
    Code:
            <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/DerekJ-binder-small.png" width="210" height="250" title="" alt="" /><br /></h2><center>From Zero To Hero</center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_derekjamieson" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a>        </h2>
            </div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/KirillisnV-tacash.gif" width="200" height="200" title="" alt="" /><br /></h2>FREE Guide to Making Money With Instant Cash Pay Programs Reveals Secret Powerfull Strategies To Start Generating Commissions as Quickly as Tomorrow<h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_kirillvasilyev" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2>
                </div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/PetarK-dvdcaseopen4.png" width="200" height="261" title="" alt="" /><br /></h2><center>This truly automated software makes $4000+ a week on autopilot. You can now get this software for free today!</center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_petarkostadinov" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2>
            </div>
    
    <div style="clear:both;"></div>
    
            <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/Nataliya7dplr.jpg" width="200" height="225" title="" alt="" /><br /></h2><center><center>Stop spending weeks developing online profiting ideas that may never work. Discover how to create your&nbsp;</center><center>own unique product with pre existing PLR products</center></center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_nataliya" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2></div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/MarkL-img1kce.png" width="200" height="200" title="" alt="" /><br /></h2><center>PLUS More FREE Marketing Products...</center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_marklee" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2></div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/Chris_Rich-picresized_1345175639_IMrevolution_eCover_flat_600.jpg" width="200" height="200" title="" alt="" /><br /></h2><center><center>Learn The Business Model That Took Me From Making $700/Month To $314,900.29/Month In An 18 Month Period!</center></center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_christopherrichmond" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2></div>
    
    <div style="clear:both;"></div>
    It's important to do that first ... make them all use the same coding so they are alike.
    When you get that to look nice, let me know.

    The next part after that will be to use PHP to render your items randomly.

    EDIT:
    Also change the name of your page from "index.html" to "index.php" if you haven't already done so.
    Quote Originally Posted by mlseim, post: 247275
    First of all, make each one the same CSS class. So it doesn't matter which one goes into which location. Float them left (float:left and then do a break after every three of them.

    Note each one has the same class name "item". That class will have a float:left; with some padding.
    When three of them are placed, you will do a float (clear) reset and start over on the next row.

    So it looks sort of like this:
    Code:
            <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/DerekJ-binder-small.png" width="210" height="250" title="" alt="" /><br /></h2><center>From Zero To Hero</center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_derekjamieson" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a>        </h2>
            </div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/KirillisnV-tacash.gif" width="200" height="200" title="" alt="" /><br /></h2>FREE Guide to Making Money With Instant Cash Pay Programs Reveals Secret Powerfull Strategies To Start Generating Commissions as Quickly as Tomorrow<h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_kirillvasilyev" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2>
                </div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/PetarK-dvdcaseopen4.png" width="200" height="261" title="" alt="" /><br /></h2><center>This truly automated software makes $4000+ a week on autopilot. You can now get this software for free today!</center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_petarkostadinov" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2>
            </div>
    
    <div style="clear:both;"></div>
    
            <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/Nataliya7dplr.jpg" width="200" height="225" title="" alt="" /><br /></h2><center><center>Stop spending weeks developing online profiting ideas that may never work. Discover how to create your&nbsp;</center><center>own unique product with pre existing PLR products</center></center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_nataliya" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2></div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/MarkL-img1kce.png" width="200" height="200" title="" alt="" /><br /></h2><center>PLUS More FREE Marketing Products...</center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_marklee" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2></div>
                <div class="item"><h2 align="center"><img src="http://jonileung.com/200/01-2013/thanks/images/Chris_Rich-picresized_1345175639_IMrevolution_eCover_flat_600.jpg" width="200" height="200" title="" alt="" /><br /></h2><center><center>Learn The Business Model That Took Me From Making $700/Month To $314,900.29/Month In An 18 Month Period!</center></center><h2 align="center"><a href="http://trackz.jonileung.com/track/go.php?c=r_christopherrichmond" target="_blank" title=""><span style="color: #0000ff">Download Here</span></a></h2></div>
    
    <div style="clear:both;"></div>
    It's important to do that first ... make them all use the same coding so they are alike.
    When you get that to look nice, let me know.

    The next part after that will be to use PHP to render your items randomly.

    EDIT:
    Also change the name of your page from "index.html" to "index.php" if you haven't already done so.
    Thanks for that. I have done those thing's you suggested, now for the PHP.

  6. #5
    Junior Member
    Join Date
    Jan 2013
    Posts
    5
    Member #
    35032
    Quote Originally Posted by TheGAME1264, post: 247283
    Are you talking about shuffling on the page on a timer, or every time the page is loaded?

    And is that what you actually plan on "giving away", or is it just an example of 10-12 items on a page (I'm really hoping it's the latter)?
    I would like the gifts to shuffle on each page load ideally. That is just an example page, just to get an idea of the layout and the look of the page.

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    OK ...

    Below is what's called a simple text database. Each line is one of your items.
    Each line contains: The URL to the photo, the Title or Caption, the URL for the link.
    The fields are separated by pipes |

    Copy the file, paste it into Notepad and upload it in the same directory as your web page.
    You can call it "items.txt"
    Code:
    http://jonileung.com/200/01-2013/thanks/images/DerekJ-binder-small.png|From Zero To Hero|http://trackz.jonileung.com/track/go.php?c=r_derekjamieson
    
    http://jonileung.com/200/01-2013/thanks/images/KirillisnV-tacash.gif|FREE Guide to Making Money With Instant Cash Pay Programs Reveals Secret Powerfull Strategies To Start Generating Commissions as Quickly as Tomorrow|http://trackz.jonileung.com/track/go.php?c=r_kirillvasilyev
    
    http://jonileung.com/200/01-2013/thanks/images/PetarK-dvdcaseopen4.png|This truly automated software makes $4000+ a week on autopilot. You can now get this software for free today!|http://trackz.jonileung.com/track/go.php?c=r_petarkostadinov
    
    http://jonileung.com/200/01-2013/thanks/images/Nataliya7dplr.jpg|Stop spending weeks developing online profiting ideas that may never work. Discover how to create your own unique product with pre existing PLR products|http://trackz.jonileung.com/track/go.php?c=r_nataliya
    
    http://jonileung.com/200/01-2013/thanks/images/MarkL-img1kce.png|PLUS More FREE Marketing Products...|http://trackz.jonileung.com/track/go.php?c=r_marklee
    
    http://jonileung.com/200/01-2013/thanks/images/Chris_Rich-picresized_1345175639_IMrevolution_eCover_flat_600.jpg|Learn The Business Model That Took Me From Making $700/Month To $314,900.29/Month In An 18 Month Period!|http://trackz.jonileung.com/track/go.php?c=r_christopherrichmond
    
    http://jonileung.com/200/01-2013/thanks/images/BenX-products%20Full%20Package.jpg|>Get 15 of the Hottest Internet Marketitng Softwares and guides gifts, worth OVER $1,257 Dollars, 100% FREE|http://trackz.jonileung.com/track/go.php?c=r_benx
    
    http://jonileung.com/200/01-2013/thanks/images/DanielS-mmo-collection.gif|NEW! &quot;If You Are Struggling To Make Money Online - This Collection Is For You!&quot;|http://trackz.jonileung.com/track/go.php?c=r_danielsmith
    
    http://jonileung.com/200/01-2013/thanks/images/BruceS-vtg-300.png|Video Traffic Strategies That Bring You Visitors Day And Night|http://trackz.jonileung.com/track/go.php?c=r_brucedstewart        
    
    http://jonileung.com/200/01-2013/thanks/images/CraigC-mfpimage.png|Professionally created marketing funnel pack with eye catching graphics, squeeze pages and OTO pages. PLR Included|http://trackz.jonileung.com/track/go.php?c=r_craigcoulter
    
    http://jonileung.com/200/01-2013/thanks/images/RobertS-articlewritinghandbook.jpg|Flood Your Website With Traffic and Dominate Your Niche In Days..|http://trackz.jonileung.com/track/go.php?c=r_robertschultz
    
    http://jonileung.com/200/01-2013/thanks/images/Frank-ListLandslide_Book_High.jpg|Discover How You Can Explode Your List Size With These Ninja List Building Strategies Unknown to 95% Of Marketers!|http://trackz.jonileung.com/track/go.php?c=r_franky
    PHP will be opening this .txt file and putting all of the lines into an array.
    That array will be shuffled (random), and then the PHP script will loop through
    and generate your HTML.

    So do the copy/paste to notepad, upload as "items.txt" and I'll follow with some PHP scripting.


  8. #7
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    Make a safe copy of your "index.php" file ... store it on your PC somewhere safe.

    The script below will be your "new" index.php file.
    I did not test this ... so if you get any script errors, let me know.

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head><script src="/A2EB891D63C8/avg_ls_dom.js" type="text/javascript"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Download Free Gifts</title>
    <link href="../css/styles.css" rel="stylesheet" type="text/css" />

    </head>

    <body>


    <div class="container">

        <div class="header"><h1>Thank You!</h1>
          You can download ALL of these gifts for a limited time only!
    </div>
        
        <div class="content">
        
        <div id="shuffle">
     
    <?php
    //Load items.txt into array
    $filename="items.txt";
    $array1=file($filename);

    //Randomize the array
    shuffle($array1);

    $pos=1;
    $count_array=count($array1);

    // Loop through array to display items
    for ($i=0;$i<$count_array;$i++) {
    $temp=explode("|",$array1[$i]);
    $photo=$temp[0];
    $text=$temp[1];
    $download=$temp[2];

    // Only display item if there is a photo to show
    if($photo){

       if(
    $pos==1){ 
       echo
    "<div class=\"row\">";
       }
       echo
    "<div class=\"item\"><h2 align=\"center\"><img src=\"".$photo."\" title=\"\" alt=\"\" /><br /></h2><center>".$text."</center><h2 align=\"center\"><a href=\"".$download."\" target=\"_blank\" title=\"\"><span style=\"color: #0000ff\">Download Here</span></a></h2></div>";

       if(
    $pos==3){
       echo 
    "</div><div style=\"clear:both;\"></div>";
       
    $pos=0;
       }
       
    $pos++;

    }
    //end if photo
    }//end for loop

    if($pos>1){
    echo 
    "</div><div style=\"clear:both;\"></div>";
    }

     
    ?>
            
     </div><!--end shuffle-->
            
     </div><!--end content-->

    </div><!--end container-->

    <div class="footer">&copy; <?php echo date("Y");?></div>
    </body>
    </html>


  9. #8
    Junior Member
    Join Date
    Jan 2013
    Posts
    5
    Member #
    35032
    Quote Originally Posted by mlseim, post: 247295
    Make a safe copy of your "index.php" file ... store it on your PC somewhere safe.

    The script below will be your "new" index.php file.
    I did not test this ... so if you get any script errors, let me know.

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head><script src="/A2EB891D63C8/avg_ls_dom.js" type="text/javascript"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Download Free Gifts</title>
    <link href="../css/styles.css" rel="stylesheet" type="text/css" />

    </head>

    <body>
     
    <div class="container">

        <div class="header"><h1>Thank You!</h1>
          You can download ALL of these gifts for a limited time only!
    </div>

        <div class="content">

        <div id="shuffle">

    <?php
    //Load items.txt into array
    $filename="items.txt";
    $array1=file($filename);

    //Randomize the array
    shuffle($array1);

    $pos=1;
    $count_array=count($array1);

    // Loop through array to display items
    for ($i=0;$i<$count_array;$i++) {
    $temp=explode("|",$array1[$i]);
    $photo=$temp[0];
    $text=$temp[1];
    $download=$temp[2];

    // Only display item if there is a photo to show
    if($photo){

      if(
    $pos==1){
      echo
    "<div class=\"row\">";
      }
      echo
    "<div class=\"item\"><h2 align=\"center\"><img src=\"".$photo."\" title=\"\" alt=\"\" /><br /></h2><center>".$text."</center><h2 align=\"center\"><a href=\"".$download."\" target=\"_blank\" title=\"\"><span style=\"color: #0000ff\">Download Here</span></a></h2></div>";

      if(
    $pos==3){
      echo 
    "</div><div style=\"clear:both;\"></div>";
      
    $pos=0;
      }
      
    $pos++;

    }
    //end if photo
    }//end for loop

    if($pos>1){
    echo 
    "</div><div style=\"clear:both;\"></div>";
    }

    ?>

    </div><!--end shuffle-->

    </div><!--end content-->

    </div><!--end container-->

    <div class="footer">&copy; <?php echo date("Y");?></div>
    </body>
    </html>
    That's great, thanks. They rotate great, but there are some other divs popping up with a broken image link and download here text. Some images are quite big, but I would be hosting images and resizing them to fit.

  10. #9
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    The size part I can't fix because it has no way of knowing what size it SHOULD be. If they were all the same size it could be done. So, if you host them, you can size them before you upload them.

    The other problem?
    I think it's seeing the blank lines in the .txt file.
    We'll try to ignore blank lines.
    Try this version instead:

    PHP Code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head><script src="/A2EB891D63C8/avg_ls_dom.js" type="text/javascript"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Download Free Gifts</title>
    <link href="../css/styles.css" rel="stylesheet" type="text/css" />

    </head>

    <body>


    <div class="container">

        <div class="header"><h1>Thank You!</h1>
          You can download ALL of these gifts for a limited time only!
    </div>
        
        <div class="content">
        
        <div id="shuffle">
     
    <?php
    //Load items.txt into array
    $filename="items.txt";
    $array1=file($filename);

    //Randomize the array
    shuffle($array1);

    $pos=1;
    $count_array=count($array1);

    // Loop through array to display items
    for ($i=0;$i<$count_array;$i++) {
    $temp=explode("|",$array1[$i]);
    $photo=$temp[0];
    $text=$temp[1];
    $download=$temp[2];

    // Only display item if there is a photo to show
    if(strlen($photo)>3){

       if(
    $pos==1){ 
       echo
    "<div class=\"row\">";
       }
       echo
    "<div class=\"item\"><h2 align=\"center\"><img src=\"".$photo."\" title=\"\" alt=\"\" /><br /></h2><center>".$text."</center><h2 align=\"center\"><a href=\"".$download."\" target=\"_blank\" title=\"\"><span style=\"color: #0000ff\">Download Here</span></a></h2></div>";

       if(
    $pos==3){
       echo 
    "</div><div style=\"clear:both;\"></div>";
       
    $pos=0;
       }
       
    $pos++;

    }
    //end if photo
    }//end for loop

    if($pos>1){
    echo 
    "</div><div style=\"clear:both;\"></div>";
    }

     
    ?>
            
     </div><!--end shuffle-->
            
     </div><!--end content-->

    </div><!--end container-->

    <div class="footer">&copy; <?php echo date("Y");?></div>
    </body>
    </html>


  11. #10
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    Neat eh?

    If you have any blank lines in your .txt file that have spaces in them, that line isn't blank. So it's OK to have blank lines to make your .txt file easier to read, but make sure the blank line is really blank.

    Also by using PHP, you have features like the copyright date ... will always show the correct year.

    And now it's easy to add, edit, or delete items, just by updating the .txt file.

    If you want, you can also add another field that has a date in it. PHP can ignore any lines that are older than or newer than a date you specify. That means you can enter some ahead of time and they won't appear until a certain date. Let me know about that, or try to figure that out in a way to learn some PHP.



Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

php shuffle divs

Click on a term to search for related topics.
All times are GMT -6. The time now is 04:52 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com