TagPHP

Hash 1.1: IRC/HipChat-like chat system built on PHP, jQuery, HTML, & CSS

First off, this is my first post about Hash, a “secret” chat project I’ve been working on to replace my personal IRC woes (mainly IRC logging). Don’t get me wrong, I love IRC, but I also love HipChat, but I hate that HipChat list closed….you get the point. Plus I needed something dead simple, no logins, no signups, just chat…

Hash is a simple IRC-like, HipChat-like (mainly in that it has persistent chat), (PHP, jQuery, HTML/CSS)-based chat system. So anyone can use a Hash install to use.

Screenshot showing Hash collecting nick and hash names

Here’s how it works. All you do is create a room (which I call a hash, because you hash things out), and pick a nick. No login. No password, in fact two people (at the moment) could use a single nick or login as many. Then, chat. Notifications let you know when something new is said. Chat history is persistent.

It’s developer friendly, which only really means it’s easy to create rooms, share them, and assign people nicks because the chat uses ?hash=&nick= to start the person loading the hash off with a hash and a nick. Easy for inviting clients into chat rooms by just giving them a link.

Hash 1.1 will continue to make small improvements to make Hash more useful. I have been using it, and it appears to be stable enough to use, again for private purposes. Not sure about public use yet, but I need it for a few new things, and so 1.1 will get those features.

You can try out Hash on my site where you can make a hash and start chatting away with someone else. I’d love to see people use it and give feedback.

Want to help? Check out Hash on Github. There are some issues that need some help.

Submit WordPress theme without sidebar / register_sidebar hack

Below is what I used to get past Theme Check for WordPress since it required register_sidebar, but I did not have any sidebars.

<?php
        /**
         * Hack to get past theme check, which requires register_sidebar, 
         * though I am not going to have sidebar option as a part of my theme.
         *
         * I did not want to actually call this because I did not want to have the widgets
         * option show, when I don't even have a sidebar!
         */
        if(0){
                ?>register_sidebar();<?php
        }
?>

XAMPP Sendmail using Gmail account

This is how I did it:

Okay, today, the best answer did not work for me. But, this did:

in sendmail.ini:

[sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=****@gmail.com
auth_password=*******
force_sender=****@gmail.com

in php.ini:

[mail function]
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

Based on port @: http://support.google.com/mail/bin/answer.py?hl=en&answer=13287

@http://stackoverflow.com/a/11020314/1436129

WordPress Change Default Display Name Publicy As for all existing users

<?php

//Sets the user's display name (always) to first name last name, when it's avail.
add_action ('admin_head','make_display_name_f_name_last_name');
function make_display_name_f_name_last_name(){

    $users = get_users(array('fields'=>'all'));

    foreach($users as $user){
        $user = get_userdata($user->ID);    

        $display_name = $user->first_name . " " . $user->last_name;

        if($display_name!=' ') wp_update_user( array ('ID' => $user->ID, 'display_name' => $display_name) );
            else wp_update_user( array ('ID' => $user->ID, 'display_name' => $user->display_login) );

        if($user->display_name == '')
            wp_update_user( array ('ID' => $user->ID, 'display_name' => $user->display_login) );
    }
}

?>

From: WordPress Change Default Display Name Publicy As for all existing users