Results 1 to 13 of 13
  1. #1
    ABW Ambassador
    Join Date
    June 30th, 2007
    Location
    Syracuse, NY
    Posts
    677
    How should I code these ideas? (not asking how how)
    I'm not asking to be told how to code, but how I should in your opinions, code my site plans/ideas. If that makes sense? Meaning, I'm still trying to grasp the concept of what CSS, PHP, and MyQSL does.

    Pitty me, but we all gotta start somewhere! LOL

    Quick background: I learned BASIC in highschool (Useful now, I know), and have made websites in dreamweaver with a lot of pages.. meaning, having to edit every page if I wanted to change something in the layout, bleh.

    I know I could be asking a lot and it is okay if no one answers, but if anyone is going to be kind enough to answer, I'm numbering these to make it easier to answer.

    1) What I would like to do, is make a website that doesn't require editing every page to make a layout change. I've read this can be done with CSS, though if I use the CSS positioning instead of tables, I read I need to make it work with each version of internet explorer. I think PHP can also be done to accomplish this or no?

    2) I would like to have some rotating things, a "daily tip" that changes for each reload, a rotating banner perhaps, might mix an affiliate banner with adsense, or something, not sure yet. That would be done with a PHP script or there other ways too? Although I've seen PHP script posted here to do that, so obviously it can be done in PHP, LOL.

    3) I'm thinking of a monthly poll and a quiz, that once submitted, will load a page giving the score and showing which questions were right and wrong, while also going into detail and explaining the answers. Both would be PHP and MyQSL or something else?

    4) I read on here, doing your content with PHP can make it hard for the spiders to see it, so you need to umm.. mod_edit.. or, I should have written down what it was. Someone provide that so I can look it back up?

    5) From what I've gathered on here, using wordpress could be a good option. The main page will have a small part of it with some blogging done on it. Anyone feel I should look into other programs or wordpress should be good for a newbie like me? Or is there an editor you'd recommend to help me as I learn the coding?

    Thanks a ton in advance for anyone who answers! And again, I'm not asking how to code all this. If I'm on the right track, then I'll go try to teach myself how to do the coding (hopefully!).

  2. #2
    Moderator BurgerBoy's Avatar
    Join Date
    January 18th, 2005
    Location
    jacked by sylon www.sylonddos.weebly.com
    Posts
    9,618
    Talking
    Use as php include in your page template where you want the content to be different and then when you change the content of the include page it will change on all pages.

    Vietnam Veteran 1966-1970 USASA
    ABW Forum Rules - Advertise At ABW

  3. #3
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    I have a header.php page that contains a standard template for all my pages, which includes logo, top nav and side nav links. When I create new page, I do a php include('header.php') to pull in the standard template. After that, I create the main content for that page.

    I also use an external css style sheet, which contains the objects that give a standard look to all pages.

  4. #4
    Affiliate Manager MINDsprinter's Avatar
    Join Date
    August 18th, 2006
    Location
    Washington, DC
    Posts
    1,436
    You've basically got it. CSS allows you to control layout and styles on every page from one or two files. This means that if you want to change your color scheme, you only need to change one file.

    Dynamic content requires some kind of dynamic script such as php, using includes most likely as others have pointed out.

    MySQL is a database, so it is used for storing data. It could store the results of your poll, for example, or all your daily tips. PHP works with MySQL. PHP will call for data in your MySQL database and then display it for visitors.
    Jason Rosenbaum
    Affiliate Manager
    MINDsprinting

  5. #5
    Affiliate Manager cbsturg's Avatar
    Join Date
    January 24th, 2007
    Location
    Lima OH
    Posts
    753
    I don't believe that coding in PHP can have any negative effect on your rankings with G. Flash - yes, PHP - no.

    You've got the basic gist of it down. PHP coupled with database-driven content styled with CSS is the only way to go IMHO. You can probably even find free scripts that will handle your polls and other add-ons to your website (no reason to reinvent the wheel).
    Chris Sturgill
    "All my life I've had one dream, to achieve my many goals." - H. Simpson

  6. #6
    Full Member
    Join Date
    December 20th, 2005
    Posts
    413
    I did BASIC in high school, too.

    I think you're on the right track with Wordpress or similar packages, which come with templates and plug-ins that will probably do what you want. Your knowledge of BASIC from way back when will help you in an indirect way: I don't suggest you go out and learn PHP or other languages, but your ability to read through a file and get the gist of what it does will help you when you want to try modifying and customizing it to your needs. That's a lot easier than starting from a blank screen and trying to write your own code.
    [URL=http://themoneyforums.com]The Money Forums[/URL]

  7. #7
    ABW Ambassador
    Join Date
    June 30th, 2007
    Location
    Syracuse, NY
    Posts
    677
    Awesome, thank you all! It is starting to make more sense now.

    One thing I'm a bit confused on though, after reading this through. The PHP file that can include logo, top nav and side nav links. In the PHP file, would it have the positioning of where the logo, top nav and side nav links go, or would that require the CSS style sheet?

    If that question made sense. I'm just wondering how or what tells the logo to be on top, the top nav links to be below that, and the side nav links to be on the side.

    And again thanks! Glad to see I am on the right track now.

  8. #8
    Affiliate Manager cbsturg's Avatar
    Join Date
    January 24th, 2007
    Location
    Lima OH
    Posts
    753
    Hardaka, the simple answer to your question is that it depends. Remember that anything written in PHP is processed BEFORE the page is sent to the browser. Anything you echo to the screen (e.g., logos, etc.) will be processed before it's sent to the browser. So just like you can place an image tag "<img src" in your html code, you can print that same thing out in PHP like so:

    Code:
    <html>
    <?php echo '<img src....'; ?>
    Just a simple example of how the process works.
    Chris Sturgill
    "All my life I've had one dream, to achieve my many goals." - H. Simpson

  9. #9
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    Quote Originally Posted by Hardaka
    Awesome, thank you all! It is starting to make more sense now.

    One thing I'm a bit confused on though, after reading this through. The PHP file that can include logo, top nav and side nav links. In the PHP file, would it have the positioning of where the logo, top nav and side nav links go, or would that require the CSS style sheet?

    If that question made sense. I'm just wondering how or what tells the logo to be on top, the top nav links to be below that, and the side nav links to be on the side.

    And again thanks! Glad to see I am on the right track now.
    The template page is just an html page. You place the logo, nav links, and whatever else on the page where you want using basic html commands. On the page you want to add the template to would need to be a php file in order to use the include() call.

  10. #10
    Full Member 212TomTom's Avatar
    Join Date
    May 31st, 2007
    Location
    Canton, GA
    Posts
    203
    Hi Hardaka,

    I used to be in the same bind that you are.. many pages with common elements, and when I wanted to make a change, I ended up making it on many pages.

    Something I found extremely useful were 'html to php' and 'html to javascript' converters. Just google 'html to php converter' or 'html to javascript converter' and you will find many of them.

    These converters will take the code you've written in html (including design using CSS), and turn them into php/javascript code. Then once you've got the php/javascript code in a file, you can add a meta tage to include that file

    <script type='text/javascript' src='header.js'></script>


    and then your html becomes something like

    <table width="800" cellspacing="0" cellpadding="0" border="1" bordercolor=blue align=center>
    <tr><td colspan="2" bordercolor=white ><script type='text/javascript'> doHeader() </script>

    </td></tr></table>

    where doHeader() is a javascript script in your header.js file
    to display your common header, etc. I'm sure there are cleaner and fancier ways of doing this, but this has simplified my life greatly.

    Good luck!
    Tom

  11. #11
    ABW Ambassador
    Join Date
    June 30th, 2007
    Location
    Syracuse, NY
    Posts
    677
    Interesting Tom. I'll keep that in mind if I have trouble learning how to work with PHP.
    The template page is just an html page. You place the logo, nav links, and whatever else on the page where you want using basic html commands. On the page you want to add the template to would need to be a php file in order to use the include() call.
    Ooohhh.. okay, I think I understand now!

    So, I'd make my template page with html. Could include a CSS style sheet here to position everything, set the color, format, etc. Then my links would be for the PHP files with my content, and when clicking on a link, it would load that PHP file's content to the place on the template I tell it to with the include call?

    Or that could be one way for it to work, but if that is right, it makes sense and sounds "easy" in my head to do. Which is miles ahead of where I was when I was reading about PHP and getting confused, LOL.

    Thanks once again for the replies!

  12. #12
    Moderator BurgerBoy's Avatar
    Join Date
    January 18th, 2005
    Location
    jacked by sylon www.sylonddos.weebly.com
    Posts
    9,618
    Talking
    Quote Originally Posted by SeymourButts
    The template page is just an html page. You place the logo, nav links, and whatever else on the page where you want using basic html commands. On the page you want to add the template to would need to be a php file in order to use the include() call.
    You can put a command in your .htaccess file to read php in htm and html files.

    Vietnam Veteran 1966-1970 USASA
    ABW Forum Rules - Advertise At ABW

  13. #13
    Newbie SuzanneMarie's Avatar
    Join Date
    August 5th, 2007
    Location
    CO
    Posts
    48
    Hi guys, I started a few years ago coding my first PHP/MySQL/CSS web site from scratch while reading a book by Luke somebody...forget the name just now. After having had that experience, and also having tried BLogger, Jooma, Wordpress and PLone, I think that starting with Word Press is a great step for a "beginner" who doesn't want to be limited as your knowledge of PHP, MySQL & CSS grows.

    Here's why:

    1) You can have your site up in 5 minutes, ready for blogging and other stuff
    2) You can use any of thousands of free templates (combination of PHP & CSS) that are ready to go with a look that you like
    3) Word press gives you easy and full editing access to all of your PHP and CSS without ever leavnig your WordPress Dashboard.

    This means that you can experiemtn with an already working product, not worry about breaking it (your posts are stored separately from your template), if youbreak it, just realod the template, you can add small scripts and positioning elements as you feel comfortable, etc.

    in short, I think that wordpress is the fastest way to get a working webpage while simultaneously allowing you to learn all the topics you mentioned in your first post.

    Good Luck!!!!

  14. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Replies: 34
    Last Post: September 22nd, 2004, 10:15 PM
  2. Replies: 4
    Last Post: June 19th, 2003, 10:45 AM

Posting Permissions

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