![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Does someone have a site for me?
Uhmm... I am really bad with PHP, so my site sucks. I need a new one, but like I said, I suck in PHP. So I was wondering if someone had a template laying around, where I would just need to enter a new title and change some things, but just the design needs to be good.
Mabe a mysql db for reading from? My site is currently just using HTML and CSS, design is not is not bad, but when HTML is not easily extendable. To give you an impression of what my site desing used to look like: <?php
$news = '
<div class="news">
No news yet.
</div>
';
$links = '
<div class="links">
No links available.
</div>
';
function getContents($page)
{
global $news, $links;
switch($page)
{
case 'news':
echo $news;
break;
default:
echo $news;
break;
}
}
?>
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() |
Php really isn't used for design. It's more for making web apps, or reading from a db for a dynamic website.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Look out for my PHP5/DB-driven site builder! In stores soon!
![]() Seriously, I'm actually building one of these, though progress is slow. My suggestion would be to learn XHTML and CSS properly, and get a copy of PHP and MySQL Web Development, 2nd Edition by Welling and Thomson. |
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Yeah I already know XHTML and CSS
I know the syntax of PHP too, just cannot program it with good style. But I could get that book, but it'll probably take me longer to build a decent site than building my own OS ![]() Why can't their be a 3 layer model for websites in PHP? :p
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
C'mon... it's like really easy C...
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
In C it's easy, you have a main with functions or nicely ordered classes (in the case of C++). But here you have HTML where you can throw in some PHP, but then my website's height cannot be set statically so you have to do some tricks to get that right, then when you get that, then if you type too much or set the font too large in your webbrowser then my text leaps off of the background. A lot of such problems, so really my problem is not with PHP but with HTML...Can we not create something else instead of that? :p (I know we can but that cannot be displayed with say Firefox
)Just hurry on your site builder, haha :p and make it open source ![]() (Man I got a lot of smilies in my posts.)
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#7 |
|
Programming Guru
![]() ![]() ![]() |
I have the book that Ooble mentions and it is great.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#8 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
"PHP and MySQL" by Williams and Lane is also okay. The examples are written around the development of an online wine-store/database. If you decide to get into nested queries, be sure and have a bottle of aspirin on hand.
Its treatment of templates is very restricted, though there are examples. "Separation of presentation and content" is, of course, not possible. A page would look funny all bold at the top, and pink on the bottom. The thing is to keep it separate until the last possible moment, as much as you can. Let the browser meld it together. PHP only emits the HTML you (or a template, or a friend, or something) tell it to. It won't make you a design nabob. Along with the book or books mentioned, read something by Molly Holschweig and keep the PHP manual handy.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#9 | |
|
Professional Programmer
|
Quote:
|
|
|
|
|
|
|
#10 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
There's a third edition? Man, if only these buggers weren't so expensive...
nnxion: I agree, getting browsers to listen is a pain. However, you can set your page height statically - just make sure to set the html element's height too: http://ooble.no-ip.com/temp.php |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|