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 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 26
  1. #11
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,973
    Member #
    5580
    Liked
    760 times
    Post a couple of lines you have in your quote list file so I can see how you are doing the list.


  2.  

  3. #12
    Junior Member
    Join Date
    Mar 2013
    Posts
    12
    Member #
    35903
    I attached a file...snagit_quotes.txt.jpgAttachment 2715

    Thanks

  4. #13
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,973
    Member #
    5580
    Liked
    760 times
    Upload this test script ....

    PHP Code:
    <html>
    <body>
    Here is my site <br /><br />
    <?php
    $quote 
    file("quotes.txt");
    shuffle($quote);
    $string str_replace(array("\r\n""\r""\n"), ""$quote[0]);
    $quo str_replace("\"""&quot;"$string);
    // separate the quote from the photo
    $parts=explode("|",$quo);
    // pick out the two parts of the array.
    $quote=$parts[0];
    $photo=$parts[1];
    ?>
    <div style="float:left; padding:15px;">
    <img src="images/<?=$photo?>"  />
    <div>
    <div style="float:left;">
    <?=$quote?>
    <div>
    <div style="clear:both;"></div>
    <br /><br />
    The rest of my site
    <br />
    </body>
    </html>


  5. #14
    Junior Member
    Join Date
    Mar 2013
    Posts
    12
    Member #
    35903
    1. "Upload this test script ...."I uploaded it to Notepad++

    2. // separate the quote from the photo. $parts=explode("|",$quo); In between the quotation marks, I deleted the pipe then added the first quote then a pipe then the image.jpg, then I put in a comma, then I added the second quote then a pipe then the next image.jpg, then I added the third quote then a pipe then the image.jpg then I added the comma then the $quo. (See the attached file) Everything worked on 1776infowarrior.com except for an image to appear.

    3. // pick out the two parts of the array. I don't understand what to do.

    4. I uploaded an image on how I want the pictures and a quotes to look like.

    I appreciate your help, I noticed that you were part of the webdesignforums.net staff, I made a contribution to your site.
    Attached Images Attached Images

  6. #15
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,973
    Member #
    5580
    Liked
    760 times
    In PHP, the // lines are comments.

    You don't have to do anything, I'm describing what the next line does.
    Example ...
    // pick out the two parts of the array
    The next two lines are what does that ... you don't have to modify anything with the script.
    The only thing I didn't know was the name of the directory where you put your photos.


    <img src="images/<?=$photo?>" />

    I called your directory "images/", but you probably use a different name.
    Put the correct path where you keep your photos.

    So fix the directory name "images/" and re-upload the test script without modifying anything else.

    And after you make the changes in notepad++, save it as "test.php" and upload to your website for testing.


  7. #16
    Junior Member
    Join Date
    Mar 2013
    Posts
    12
    Member #
    35903
    1. "I called your directory "images/", but you probably use a different name.
    Put the correct path where you keep your photos."
    Code:
    <img src="photophp"<?=$photo?>"  />
    (see uploaded file number "1".



    2. "And after you make the changes in notepad++, save it as "test.php" and upload to your website for testing." I couldn't get test.php to work in my Public_HTML folder. I used index.php instead.

    3. I uploaded the images to the public_html website control panel. In the control panel, I made a new folder called "photophp" (see uploaded file number "4"). I transferred the uploaded images to that folder ("photophp")

    4. Viewing my website, the quotes were visible, but no picture. The only image was an icon. The icon is visible in uploaded file named "2". Once I right clicked on the visible icon, I clicked "view image", the image that appeared was in uploaded file number "3". How I had the directory for the images in my Public_HTML folder can be viewed in uploaded file number "4". The .jpg files in the directory "photophp" can be viewed in uploaded file number "5".

    Attached Images Attached Images

  8. #17
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,973
    Member #
    5580
    Liked
    760 times
    You're so close. The img src line ...
    You need a slash after photoshop

    "photoshop/"


    And when you upload a file like "test.php" you said it did not work. Did you run it like this?
    http://www.1776infowarrior.com/test.php


  9. #18
    Junior Member
    Join Date
    Mar 2013
    Posts
    12
    Member #
    35903
    "And when you upload a file like "test.php" you said it did not work. Did you run it like this?
    http://www.1776infowarrior.com/test.php" No I didn't, but after doing it the way you have it, that did the trick!

    "You need a slash after photoshop "photoshop/" " After adding the slash and removing the quotation mark....SUCCESS!!!!!!

    Thanks man!

  10. #19
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,973
    Member #
    5580
    Liked
    760 times
    So now let's recap ....

    You have your own website now, with a good webhost. The door is opened for endless possibilities. You can play around with examples you find, PHP, JQuery, MySQLi, whatever. Create new directories and within those directories, create new 'web pages'. If any directory has a file called "index.php", that will be the default script for that directory.

    If you really feel brave, you can access your website control panel and look at all of the things they have to manage your website, create email accounts, create databases, loads of stuff.

    My website is filled with about 1000 different scripts for testing things, experimenting, and just temporary scripts to learn how to do something. You can use your website as a place to store files as well ... like a virtual drive. You can create a directory, fill it with files, and password protect it.

    Play Play Play ... make scripts, troubleshoot problems, and you'll learn so much by doing it.

    ...

    And now, onto the Chess-Move part of your web page.
    Here's a place to start for open-source scripts:
    http://www.dhtmlgoodies.com/?whichScript=dhtml-chess


    .
    AlphaMare likes this.


  11. #20
    Junior Member
    Join Date
    Mar 2013
    Posts
    12
    Member #
    35903
    I appreciate the recap comments you sent me. It has really opened up the myriad of possibilities that I can do with website design. I am looking forward to finishing up the HTML, Javascript, and the PHP tutorials on www.thenewboston.org and www.w3schools.com.

    "My website is filled with about 1000 different scripts for testing things, experimenting, and just temporary scripts to learn how to do something." Is your website: http://www.catpin.com? Are you referring to: www.Webdesignforums.net or www.dhtmlgoodies.com?

    After downloading: "dhtml-chess.zip (4.5 mb - Updated, January 2nd, 2012)" from the link you sent me: http://www.dhtmlgoodies.com/?whichScript=dhtml-chess, there are about 48 different files to choose from. For what I want to do, putting custom multiple chess tactics puzzles on my website, I am unsure of which file to get started on.
    Attached Images Attached Images
    • File Type: jpg 1.jpg (1.9 KB, 3 views)


Page 2 of 3 FirstFirst 1 2 3 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
  •  
All times are GMT -6. The time now is 03:44 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com