1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help with mobile planning for future php. CSS? Layout? Dynamic PHP?

Discussion in 'PHP' started by prince718, Jul 16, 2011.

?

Read the post. Am I going the right direction?

  1. Yes! :D

    0 vote(s)
    0.0%
  2. No

    0 vote(s)
    0.0%
  3. I have no clue

    0 vote(s)
    0.0%
  1. #1
    Hello. I want to implement PHP on my site in a month or so when im at a point in my studies where I can do it myself. My site is a site where ppl go to view pics from events that I was hired to shoot. It will be locked and require a login to view the pic pages. So I was going to use Media Queries and maybe some Javascript to switch CSS files dependant on resolution..... Now, I am still very confused on how this would work in the long run with PHP. I was thinking I would make my page with the main type of layout in the top section, and on the CSS files for the desktop screen sizes, I would have it hide the layout below it, and make the layout below it for small screens, and have that revealed in the css for the mobile devices

    
    <html>
    <head>
    
    <!-- This CSS file will reveal all the divs for the class="desktopscreensize" -->
    <link rel="stylesheet" type="text/css" src="desktop900plus.css" media="screen and (min-width:900px)" />
    
    
    <!-- This CSS file will reveal all the divs for the class="handheldscreensize" -->
    <link rel="stylesheet" type="text/css" src="handheld500max.css" media="screen and (max-width:500px)" />
    
    </head>
    
    <body>
    
    <!-- START divs for desktop screen sizes  -->
    <div class="desktopscreensize">
    
    etc........
    
    </div>
    <!-- END divs for desktop screen sizes -->
    
    
    
    
    <!-- START divs smaller screen sizes-->
    <div class="handheldscreensize">
    
    etc.. Smaller layout. Smaller image sizes, etc... 
    
    </div>
    <!-- END divs for smaller screen sizes -->
    
    
    
    </body>
    </html>
    
    
    
    Code (markup):
    So I am wondering. If I choose to go this route, will I be able to implement the PHP? Its going to be a site with a few static pages. Home, About Us, Contact, and then the Photos page will have the thumbnails to events that I have shot, and when they click on the thumbnails it will go to the (Dynamic?)event page- which will have thumbnails to all the photos, and when clicked, will open up a popup.....

    PartyPrinceProductions.com -- My site before a MAJOR change in design, and before the php implementation.

    I only know some of the basic fundamentals of PHP(and I guess all programming). Variables, Strings, If statements... I am studying via Lynda.com tutorials and W3Schools.com. I am now getting back on it, but wanted to know if I am going the right direction.. I could really use some guidance. ALL tips, thoughts, and ideas appreciated. Thanx!
     
    prince718, Jul 16, 2011 IP
  2. prince718

    prince718 Peon

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    ...................
     
    prince718, Jul 17, 2011 IP
  3. prince718

    prince718 Peon

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Help me please
     
    prince718, Jul 17, 2011 IP
  4. gwydion

    gwydion Peon

    Messages:
    125
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    PHP will handle most of the programatic tasks you have. However, if you want to server different pages dependent on screen size then you will need some JavaScript and possibly cookies as well. I implemented this my site a while back and then it was a bit fiddly. Use JavaScript to get screen size and then pass this to PHP so I could dynamically serve a different version of my site (using CSS and alternate PHP code) for those with smaller screens.

    Like most things in programming you can do just about anything you want, just depends how hard your are willing to knock your head against that wall.
     
    gwydion, Jul 18, 2011 IP