Help administering our website

Posted:
in General Discussion edited January 2014
I'm involved with a charity that a while ago commissioned a website. We wanted to create something neat but professional and easy to administrate. We got that, although later had some issues - such as, when we had to amend our logo due to potential trademark issues they wanted £250 to change it, when I could see it was merely a matter of uploading the revised image as the background in a table cell.



Since then the site has been transferred to servers we can access ourselves. I have experience with Dreamweaver, and we now have someone onboard with more experience in it. However, the firm who designed the site say that without experience in PHP we may struggle. I wonder how we can learn about this and whether, as I'd assumed, we could merely download the existing site, open it in Dreamweaver and amend it all and then upload again.



Apologies if these questions seems both basic yet fundamental but you're help would be appreciated.

Comments

  • Reply 1 of 3
    MarvinMarvin Posts: 15,326moderator
    Quote:
    Originally Posted by mpw_amherst View Post


    Iwhen we had to amend our logo due to potential trademark issues they wanted £250 to change it, when I could see it was merely a matter of uploading the revised image as the background in a table cell.



    That seems a bit much. It hardly takes any time at all to do that. I think managing your own site is a good idea or at least find someone cheaper. Sometimes professional companies take advantage of funded organizations and some just charge a lot for their time.



    Quote:
    Originally Posted by mpw_amherst View Post


    Since then the site has been transferred to servers we can access ourselves. I have experience with Dreamweaver, and we now have someone onboard with more experience in it. However, the firm who designed the site say that without experience in PHP we may struggle. I wonder how we can learn about this and whether, as I'd assumed, we could merely download the existing site, open it in Dreamweaver and amend it all and then upload again.



    A quick run down of what makes up a site:



    client-side = HTML, Flash, CSS, Javascript

    server-side = PHP, MySQL



    PHP is code that runs on your server and can be used to access MySQL databases or to generate web page content. Client-side stuff is what runs on your browser.



    The display of your site is mainly held in CSS files but the data can be put there dynamically.



    For example, your home page is likely to be in a file called index.php. Inside this, there will be code like



    <?php if($_GET['link']=='charity_work_wales'){

    echo "<span>this is the Welsh charity page</span>";

    echo "<img src="img.jpg" width=400></img>";

    }else{

    echo "<span>this is some other page</span>";

    echo "<img src="img2.jpg" width-200></img>";

    }

    ?>



    If you don't know a programming language, it may be tricky to figure PHP out. In the URL bar, there are tags that let a PHP script know what to do. If you look at the top of the Appleinsider page, there are tags at the end like:



    newreply.php ? do=newreply & p=1283974



    The newreply.php is the name of the script being executed. The word 'do' is a variable that is set to 'newreply' and 'p' is set to 1283974. These are known as "GET" requests and are accessed via the $_GET command.



    To get to the welsh page in my example, the URL would be something like:



    http://www.charity.com/index.php?lin...ity_work_wales



    Because PHP is used this way to switch between whether I display img.jpg or img2.jpg above, it is helpful to learn it to know where the content is coming from.



    If you'd like to learn it, there are a few books like:



    http://www.amazon.com/Sams-Teach-You.../dp/0672323117



    that you can use. It won't take as little as 24 hours as the title suggests but you shouldn't need all that much experience to keep up the site you have.



    It is just a matter of downloading the site to your computer, changing it and uploading it as you said. You have to be careful when editing the code though because one line of code that is wrong will stop the script and your page won't load. It is a good idea to do your site testing offline and check everything is ok before uploading. On a Mac this is fairly easy to do and I can run through the steps so you can do this if you'd like.
  • Reply 2 of 3
    Quote:
    Originally Posted by Marvin View Post


    That seems a bit much. It hardly takes any time at all to do that. I think managing your own site is a good idea or at least find someone cheaper. Sometimes professional companies take advantage of funded organizations and some just charge a lot for their time.







    A quick run down of what makes up a site:



    client-side = HTML, Flash, CSS, Javascript

    server-side = PHP, MySQL



    PHP is code that runs on your server and can be used to access MySQL databases or to generate web page content. Client-side stuff is what runs on your browser.



    The display of your site is mainly held in CSS files but the data can be put there dynamically.



    For example, your home page is likely to be in a file called index.php. Inside this, there will be code like



    <?php if($_GET['link']=='charity_work_wales'){

    echo "<span>this is the Welsh charity page</span>";

    echo "<img src="img.jpg" width=400></img>";

    }else{

    echo "<span>this is some other page</span>";

    echo "<img src="img2.jpg" width-200></img>";

    }

    ?>



    If you don't know a programming language, it may be tricky to figure PHP out. In the URL bar, there are tags that let a PHP script know what to do. If you look at the top of the Appleinsider page, there are tags at the end like:



    newreply.php ? do=newreply & p=1283974



    The newreply.php is the name of the script being executed. The word 'do' is a variable that is set to 'newreply' and 'p' is set to 1283974. These are known as "GET" requests and are accessed via the $_GET command.



    To get to the welsh page in my example, the URL would be something like:



    http://www.charity.com/index.php?lin...ity_work_wales



    Because PHP is used this way to switch between whether I display img.jpg or img2.jpg above, it is helpful to learn it to know where the content is coming from.



    If you'd like to learn it, there are a few books like:



    http://www.amazon.com/Sams-Teach-You.../dp/0672323117



    that you can use. It won't take as little as 24 hours as the title suggests but you shouldn't need all that much experience to keep up the site you have.



    It is just a matter of downloading the site to your computer, changing it and uploading it as you said. You have to be careful when editing the code though because one line of code that is wrong will stop the script and your page won't load. It is a good idea to do your site testing offline and check everything is ok before uploading. On a Mac this is fairly easy to do and I can run through the steps so you can do this if you'd like.





    Thank you very much for such a full and helpful reply. Can I edit the css and html pages and leave the php and the site display as in Dreamweaver or will the browsers still access php and therefore render the changes meaningless?
  • Reply 3 of 3
    MarvinMarvin Posts: 15,326moderator
    Quote:
    Originally Posted by mpw_amherst View Post


    Thank you very much for such a full and helpful reply. Can I edit the css and html pages and leave the php and the site display as in Dreamweaver or will the browsers still access php and therefore render the changes meaningless?



    If you change the HTML and CSS, that should be enough. Sometimes there won't even be files ending in .html - that depends on how the server is configured though.



    Sometimes the HTML is held in a file called .php as the code can be in the same file - PHP was designed to integrate easily with websites. It's just that the PHP code doesn't run on the client computer, it gets executed on the server. The HTML along with the results of the PHP code are sent to the client browser to be rendered.



    But say even in a .php file, there is dynamic content like:



    $classname = $_GET['link']=='welsh'? 'welsh_heading':'english_heading';

    <span class='$classname'>Welcome</span>



    There would be CSS like:



    .welsh_heading{

    font-size:14px;

    color:#000000;

    }

    .english_heading{

    font-size:24px;

    color:#CCCCCC;

    }



    Editing that CSS alone will change the appearance without having to touch the PHP at all. You don't even have to upload the PHP. You just replace the CSS files on the server. Sometimes you have to shift-refresh the browser to see a stylesheet change as it caches it.



    You don't always get external stylesheets though, some CSS code is embedded and some is inline.



    For example, embedded code in an HTML file would be:



    <html>

    <head>



    <style>

    .some_class{

    font-size:14px;

    color:#999999;

    </style



    </head>

    <body>

    ...

    </body>

    </html>



    Inline code could be:



    <span style="font-size:10px; text-decoration:underline'>Some text</span>



    This would mean editing .html files or .php files to change the appearance and these would have to be uploaded.



    Most of the styles should be in external CSS files though so I would have a go at changing some stuff and replacing the CSS files. If you are changing image content, there are a couple of ways these can be defined.



    They can be loaded in CSS through the background-image property:



    #image_div{

    background-image:url("images/picture.jpg");

    }



    For accessibility, they are often HTML img tags:



    <img src="images/picture.jpg"></img>



    It's simply a case of changing the src path or the backgroun-image path and saving. Dreamweaver will let you browse and it will fill in the path for you. Then just upload the CSS or HTML and the new image it points to onto the server.
Sign In or Register to comment.