Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Page Refresh

  1. #11
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    XMLHttpRequest IS AJAX.

    It's the way that you "request" a page through javascript, behind the scenes, then it can do stuff with the contents of that page, like showing it, replacing part of the page, etc etc.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  2. #12
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    InNeedOfHelp: View the source of the messages frame.
    djr33: It's been released for a long time See http://www.twey.co.uk/dd/chat.phps
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #13
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    And I can use that on my site?
    Great.
    Did I miss when you submitted this to DD? If you haven't, I suggest you should, unless you're wanting to keep it yourself, in which case I understand, but I am sure it would be a big help to people
    Thanks!


    EDIT: Ah, darn. It's trying to parse the page, and giving a weird javascript error "<?php echo" something or other.
    Use .txt, I guess. .phps was so nice before, though, with the color coding...
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #14
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I didn't submit it because the interface layout (the top bit, at least) belongs to Johnnymushio. Also, he claims there are bugs when using multiple instances with the same database, although I've tried it myself and am unable to reproduce them.
    EDIT: Ah, darn. It's trying to parse the page, and giving a weird javascript error "<?php echo" something or other.
    Use .txt, I guess. .phps was so nice before, though, with the color coding...
    Yeah, unfortunately my new host doesn't parse phps. It sends it as text/plain, though, I think, so your browser shouldn't have a problem unless it's IE.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #15
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    IE.... or Safari, it seems. Weird. Mozilla works, though.
    Thanks

    Hey... wait... it uses my pixel color thing too?


    (and, with that, this is now officially off topic )


    EDIT: I think I also need the info as to what to set up in the database. I can look more later if you don't have the time to check for me.
    Last edited by djr33; 06-26-2006 at 12:54 AM.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #16
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Oh yeah, I forgot it had your pixel-colour thing

    I've an SQL dump somewhere...
    Code:
    -- MySQL dump 10.9
    --
    -- Host: localhost    Database: twey_japantown
    -- ------------------------------------------------------
    -- Server version       4.1.20-log
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
    
    --
    -- Table structure for table `chat_messages`
    --
    
    DROP TABLE IF EXISTS `chat_messages`;
    CREATE TABLE `chat_messages` (
      `id` int(11) NOT NULL auto_increment,
      `msg` text,
      `user` int(11) default NULL,
      `time` datetime default NULL,
      `special` int(11) default NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    --
    -- Table structure for table `chat_users`
    --
    
    DROP TABLE IF EXISTS `chat_users`;
    CREATE TABLE `chat_users` (
      `id` int(11) NOT NULL auto_increment,
      `handle` text,
      `font` text,
      `lastseen` datetime default NULL,
      `title` text,
      `logged` tinyint(1) default NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    /*!40000 ALTER TABLE `chat_users` ENABLE KEYS */;
    
    /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
    /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
    /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
    /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #17
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well.... got it running... now to fix the layout and setup the login to coincide with my forum...
    Thanks!

    Back on topic now, maybe. Heh.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #18
    Join Date
    Feb 2006
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    http://www.twey.co.uk/dd/chat.phps

    ^That script is incredible. When i look at that and then look at my chat script it gives me a good laugh.
    The XMLHttpRequest looks kind of complicated, but I'll look into it.

    While we're on the topic of chatrooms, do either of you have any idea how i would color each persons name separately? Like in AOL Instant Messanger, the color of each persons name is different to kind of keep orientation. How do i do that in PHP?

    Thanks.

  9. #19
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    That script is incredible.
    It's not actually all that awesome. It's kind of messy; I've just copied and pasted a lot of code where it wasn't strictly necessary, and the whole setupDatabase() thing isn't needed at all. I was originally going to only call it where a database connection was needed, for efficiency, but with the introduction of the little keep-alive thing it ended up kind of redundant.
    While we're on the topic of chatrooms, do either of you have any idea how i would color each persons name separately? Like in AOL Instant Messanger, the color of each persons name is different to kind of keep orientation. How do i do that in PHP?
    Again, study the script -- it offers users the choice of their text colour.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #20
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    There's a cool part of Twey's chatroom (I wrote this part, so I particularly like it) where a user can click on an image (as in jpg) and the color value at that pixel will be outputted and they can use that as their color.
    As for rotating through colors... that's a list, and based on who entered first, etc.
    Really, it's quite complex to set that up, for no big reason... the colors usually annoy me in AIM. It's also based on each user... not everyone sees the same colors... so it's based on you as red, the next person blue, etc etc., but individual for each person. It would be a whole different aspect to code, and doesn't seem like it's really worth doing that much for it.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •