Author Topic: Recent updating  (Read 33533 times)

0 Members and 1 Guest are viewing this topic.

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3684
RE: Recent updating
« Reply #15 on: May 14, 2008, 07:05:20 pm »
Ah, that's where this topic went.



Sorry for not saying much about that .php file since the last time I tried.



I haven't ever had a chance to properly learn HTML.  PHP seems like a whole 'nother world.  Maybe I'm just ignorant.



What program(s) would you recommend for PHPing?  I've gotten spoiled with FrontPage for "coding" HTML.  I think if I could be more familiar with PHP I'd be much less hesitant to use it.  I don't care that it's as natural as breathing for some of you, this might as well be Greek rocket science for me!



I've been busy the last little while.  Kinda ruined the "new daily thumbnails" streak.  Finally decided on a car.  I'll be getting a red 2008 Mazda3 Sport (sedan), fairly loaded.  My first car.  Pathetic to finally have it now, but hey.  I'll be picking that up Thursday next week once the rest of this paperwork crap is finished.  I suppose I have to look into insurance tonight.  *sigh*

Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
RE: Recent updating
« Reply #16 on: May 14, 2008, 08:08:01 pm »
*cough* The Greeks didn't have rockets *cough*



For plain old PHP, I think you can just type it in Notepad and upload it to your site. For MySQL, though, you need database software on both your web server and your computer.

Offline Maxim

  • Hero Member
  • *****
  • Posts: 974
RE: Recent updating
« Reply #17 on: May 15, 2008, 02:46:41 am »
PHP is just a scripting language so all you need is a text editor. Preferably one with syntax highlighting; I tend to use ConTEXT. That, and a web browser pointing to a tutorial and/or the PHP website.



You'll probably want to get a local webserver set up for testing. I use WampServer, which is Apache, PHP and MySQL for Windows. Then, with a little configuring, you can have a test version of the site on a local disk that you can view in a web browser, rather than having to upload to test changes. This is assuming the site's running on similar software, of course.



Synchronising your local disk copy with the site is another issue. I use rsync but it's quite hard to set up.



A word of warning: PHP code is easy to write, but hard to write well. 99% of what you find online, posted as "tutorials" or "tips", is in fact rubbish.



If you do ever decide to rewrite the site from static HTML to be DB-driven, a framework like Ruby on Rails (probably not supported by your host) or CakePHP (PHP clone) is probably a god start. But that's probably at least a few years off.

Offline DarkWolf

  • Hero Member
  • *****
  • Posts: 640
RE: Recent updating
« Reply #18 on: May 15, 2008, 03:25:26 pm »
When you are starting out, it's good practice to type out the example code instead of using copy/paste when using tutorials. Especially if you are learning a language like PHP which uses semicolons and curly braces.  You have to get used to typing things that way.



Also make sure you really understand what is going on when you do tutorials or look at sample code.  If the tutorial uses a function without explaining what it is, you need to look it up.  http://php.net/function_name is the easiest way to quickly lookup functions (or objects) for PHP.



Taking small steps is the best way to go.  If you learn too much too quickly you'll just end up forgetting it.

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3684
RE: Recent updating
« Reply #19 on: May 18, 2008, 06:11:48 pm »
Maybe for now I'll just keep using the HTML index.



I would like the random map thumbnails thing to be cleaner though.  DarkWolf, maybe what I need is just a PHP thing for those, just a single square, though, which I can make iframes for as many as I need.  That would be easier, I think, than a whole index.php, at least while my PHP knowledge is still non-existent.

Offline Maxim

  • Hero Member
  • *****
  • Posts: 974
RE: Recent updating
« Reply #20 on: May 19, 2008, 05:41:21 am »
Iframes are nasty. Just rename index.html to index.php and it ough to still work. Then it's a matter of inserting <?php ?> around the code to insert the thumbnails, and presto: embedded dynamic content without iframes.

Offline DarkWolf

  • Hero Member
  • *****
  • Posts: 640
RE: Recent updating
« Reply #21 on: May 19, 2008, 02:26:08 pm »
Yeah that's essentially what I did.  AJAX is an option, instead of an IFRAME, to keep the server side code out of the HTML page.  But a bit tedious for just that one thing.



If you could still upload a version of the file named index2.php, I would like to take a look at why it isn't loading properly.