Log In

Home
    - Create Journal
    - Update
    - Download

Scribbld
    - News
    - Paid Accounts
    - Invite
    - To-Do list
    - Contributors

Customize
    - Customize
    - Create Style
    - Edit Style

Find Users
    - Random!
    - By Region
    - By Interest
    - Search

Edit ...
    - User Info
    - Settings
    - Your Friends
    - Old Entries
    - Userpics
    - Password

Need Help?
    - Password?
    - FAQs
    - Support Area


jimmy ([info]jimmy) wrote,
@ 2008-06-07 10:01:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Entry tags:coding, web design

A Complete Website
For the longest time, I've always wanted a website, that contained a blog, a photo gallery and maybe some simple message boards. The answer might be a CMS based system, but I feel that is really to large and really to featured for what I had in mind. After ages of trying out hundreds of software packages I think I have something that's going to work for me. This article here is going to explain the process of getting 3 pieces of software to work (hopefully) together. Those are:

  • WordPress

  • ZenPhoto

  • bbPress


  • So let's begin the journey of this project, shall we?!

    Day 1: Well I am sure if you could really call this day 1 as I've been using WordPress for a while. I had installed bbPress once before, but was turned off the instant I saw the homepage of it. It's SOOO BLAND and I have no experience in CSS and styling at all. So today I installed it again and actually read some documentation on how to style it an all. I ended up using the CSS style from this K2 theme. I think that'll prove benificial in the end because I do want it all integrated. I plan to actually re-install bbPress to my ASO server so integrating these will be easier.

    I just found out about ZenPhoto yesterday and I spent quite some time just playing with it and installing it several places. Currently it sits on a local Gentoo Linux box.

    I think I will leave it there and see if I can just PHP include it since my photos take up a lot of space that I don't have on the ASO server but have on my Gentoo box. I will probably also style that to match K2 and this layout so everything look the same (again hopefully).

    So basically...I will do bbPress first. I will then style that with CSS code. I will use the K2 style.css as a base and work off that. Getting that and WordPress integrated is my first objective. Please note, I know no CSS and no PHP. This is going to be one heck of a project.

    -- Later in the day... --

    Alright, I have got bbPress installed on the ASO server and that seems to be working. I actually dropped the K2 style sheet and just started working off the ZenPhoto.org/support/ stylesheet. It was easier and "less bloated". I say that because the K2 stylesheet was made for WordPress and has many more definitions that I don't need. Of course figure out which ones I do and don't need would take to long and I like to cheat a little.

    So bbPress is working a-ok. I then tried to include the K2 header and I got some error about wp_title() not working so I removed the actual call to that in header.php for the K2 theme and just wrote it in manually. That did fix that error. But now you have the bbPress AND the K2 headers calling 2 different stylesheets...that didn't work out so well. So I remove the K2 header include from the bbPress header.

    I then continued to edit the stylesheet and change things around a little. I up'd the H2 to 2em and I changed some of the widths and stuff so when I eventually get it into the K2 layout it will work.

    Then I worked on ZenEdit itself. I added a TON OF PHOTOS, so feel free to check them out and leave some comments :) I am trying to get the Gravatar hack working. I signed up for an account on ZenPhoto.org this morning and they said they would send an email with my password in a few minutes...that was 6-7 hours ago :\

    I changed around a couple options in the layout. I made it so it has a blue background around the image no matter if it was visited or un-visited. I changed the background color to a light light grey...I might even go lighter...actually yeah, I just did and I like it a lot more, using #EDEDED now.

    So everything is setup...it's just getting them into the K2 layout. The hard part...but hey, for day one, I am not doing that bad!

    Day 2 & 3: Alright, I did a lot of work since and I've already figured a ton of things out. I posted on ZenPhoto about trying to get WP2.0 and ZP working together. They had this bit of code:

    /* Start Wordpress */
    define('WP_USE_THEMES', false);
    require($_SERVER["DOCUMENT_ROOT"].'/journal/wp-blog-header.php');
    /* Start zenphoto */
    require_once("zen/template-functions.php");
    $themepath = 'themes';
    $theme = $_zp_gallery->getCurrentTheme();
    $_zp_themeroot = WEBPATH . "/$themepath/$theme";
    if (in_context(ZP_IMAGE)) {
    include("$themepath/$theme/image.php");
    } else if (in_context(ZP_ALBUM)) {
    include("$themepath/$theme/album.php");
    } else if (in_context(ZP_INDEX)) {
    include("$themepath/$theme/index.php");
    }


    Basically that allows you to use WordPress funtions in ZenPhoto or whatever you include it, i.e. bbPress also. So I did that but nothing seemed to work. If you notice this line of code from that require($_SERVER["DOCUMENT_ROOT"].'/journal/wp-blog-header.php');. That would obviously not work in my situation. I have ZP and WP installed on 2 different servers, so I had to change that to include 'http://www.equestrianhonor/wp-blog-header.php' instead. And it seemed to work because i had no call errors or anything. The stupid thing looked the exact same as when it didn't have that code though. So I tried messing with that stuff for hours, calling the header and footer files but nothing seemed to work.

    So then I tried working more with bbPress since WP and bbPress were on the same server and I used the same method provided by the ZenPhoto boards. This actually worked. So I've been working a lot with the EzStatic plugin for WordPress. It allows you to include PHP code in your WP posts. So I tried to include bbPress in a page file but it looked really screwed up.

    So I hit up the WordPress codex and I found this. I found this function called get_home_template. Which eliminates the need to call the footer and header which is really nice and it works. Although I still get this error which I navigate away from the homepage which sucks.

    So that's basically where I am at with the project right now...

    -- Later in the day... --

    Alright, I spent more time learning about a couple PHP functions, include and require and what the differences are. Basically require will stop on a fatal error and stop processing the page. It will output the error.

    So since I wasn't getting an error I assumed things would be working. But for some reason I couldn't use the get_header and other WordPress functions on ZenPhoto. My solution?

    I installed ZenPhoto on the ASO server which also has WordPress and bbPress. Things now work and actually ZenPhoto is completely done. Check it out, it's got most of the same CSS as the blog but I changed the links around a little. Added some neat little effects.

    Now the only thing left is to get bbPress working. I am going to work on that now. I guess I might have to upgrade my hosting package because the photos take up so much space...oh well, oly and extra $5.00 a month for a little more then double the space I have no and about double and half the bandwidth.

    Alright to hack up bbPress!

    -- 7:41PM (10 minutes after the last update) --

    Wow, I think I just did my first REAL piece of CSS. And I am so proud of it:


    .news {
    border: 1px solid #FF0000;
    background-color: #FFD2D2;
    width: 375px;
    padding: 2px;
    text-align: left;
    }


    I wanted to create a red box with some text inside of it. And I DID! If you check out the photo page you can see it in action! WOW! I feel so good haha I feel so accomplished!

    Day 4: Alright, commenting now works on the photo album and no errors are being returned. I had to move where I was calling the header file and change a function to just $FIXME.

    This fix also fixed the AJAX functions in the layout when namng/renaming photos and descriptions of photos and albums. The photo album is 100% done? Of course there could be errors I missed!


    (Post a new comment)



    scribbld is part of the horse.13 network
    Design by Jimmy B.
    Logo created by hitsuzen.
    Scribbld System Status