Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Idea...

  1. #1
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default Idea...

    Okay. My latest project has been to create a website where you create your account, blah blah, and you can post articles (news, blogs, whatever). It does work thus far, and here's the link:
    http://livejournal.funpic.org/
    Just wanted to see what you think.

    Thanks,
    Mike
    - Mike

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Nice little site. Could be a few mods to it, but nothing really major. I think you should incorporate either a Rich Text Editor or a BBcode editor for the stories (or at least the nl2br function to convert new lines to actual new lines on the page). Also, I noticed that after I logged in, it keeps wanting to go back to the login page but then quickly redirects me to the page that I was going to in the first place. You may want to fix that as well.

    Other than this, nice layout and idea for it. Good job.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Thanks... Actually, I was so hung up on the user registration part I forgot about the actual text-editing part. I'll do the nl2br function. And as for the slow redirecting. It's because I'm use meta tag redirects which are slower. header() won't work for some reason. It keeps saying that I already called a header function, or something.
    - Mike

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    How are the "sessions" stored (cookie or actual sessions)? Also make sure that you do not have anything being sent to the browser other than "header" info (such as cookies, sessions, etc) before you call the header redirect.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I simply call "session_start()" once at the top of my index.php. The index is a template, and I include the other pages through arrays with the "q" variable.

    If I use session_start(), how can I use a header redirect after that?
    - Mike

  6. #6
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Now you said that you use index.php as your template, is it in the format of something like this:

    Code:
    <?php
    session_start();
    function head() {
    ?>
     Top portion of HTML goes here
    <?php
    }
    
    function foot() {
    ?>
     Bottom portion of HTML goes here
    <?php
    }
    
    head();
    include($_GET['q']);
    foot();
    ?>
    (Just an example, not tested code).

    Or do you define the variables in another page, then call the include? I would recommend making defining your html in another page (continue using your index.php as the main page; of course, and have the session_start(); there as well), and just include the page like you usaully do.

    Now in each page; when you are going to output text, simply call the head and foot functions (to display your HTML), then whatever text you have on that page as well. This will make it to where you can control the output of the text, and allow you to use the header() function.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  7. #7
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I simply include the php files directly into my template. It makes it alot easier to manage my pages.
    For example, I might use an array like this:
    Code:
    $input = array("main","codepage");
    $output = array("index.php","_codepage.html");
    - Mike

  8. #8
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Umm, live jornal already exists, http://www.livejournal.com/ I envy you, if you've never heard about it...
    A large portion of the site is emo middle class suburban teenagers whining about how their lives suck. Rather funny, when you think about it.

    but anyways, there is a (customizable) BBcode script that one of the DD members made, im sure that would be better than writing one from scratch.
    Here it is: Blm126's Simple BBcode
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  9. #9
    Join Date
    Mar 2007
    Location
    Scotland
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I just wanted to ask how long you expect your emails from the website after registration to reach their destination. I registered about 10 minutes ago. Just wondered whether this is normal.

  10. #10
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Hmm... mine was sent immediately. thetestingsite had no problems either. Your e-mail address had everything spelled correctly.

    A large portion of the site is emo middle class suburban teenagers whining about how their lives suck. Rather funny, when you think about it.
    Lol... didn't know it even exisisted. I first thought of Word Press, but coincidentaly that was taken. (wordpress.org, blogging site).
    - Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •