plainblack.com
Username Password
search
Bookmark and Share

ShortChat 0.8.2.628g

0.8.2.628g change: Added userHash as a variable. No other changes.

Suggested usage:
<a href=^\;?op=viewProfile&uid=<tmpl_var userHash>><tmpl_var username></a>

I *think* I fixed most of the issues with respect to ShortChat running on WebGUI 6.2.8 gamma. Since I merely added "quote()" around the appropriate objects, fixed a spelling error or two, and updated the create-ShortChat.sql. I ONLY changed wobjectId, templateId, and userId to varchar(22), (and 2 spelling errors) so consider adjusting the structure of an existing ShortChat table if you've tried to use the 0.7.1 version on 6.2.x. That is to say, the create-ShortChat.sql uses Drop Tables if exists, so if the chats are *valuable*, just change the structure with phpmyadmin or such.

This isn't *my* project, although I guess I inherited it by the mere fact of updating it while the original author is MIA. Your questions and comments, and suggestions are appreciated. One bug I *know* exists is the failure of the Archive link to actually *do* anything ... not the least of which is the fact that the built-in style templates call a non-existent javascript "popup" function. I tried to add a script to do it, but the archive results spill below the wobject anyway.

  • This does add code to the directories of WebGUI.
  • It requires changing of the WebGUI.conf file for each site that wants this feature.
  • It also requires restarting Apache once installed.
  • It *shouldn't* mess with anything specific to WebGUI, but I recommending opening up the tar in another directory to inspect before install!
Follows is the README file (some spelling changes were made here that won't necessarily be reflected in the file you download.):

#####################################################################
#
# ShortChat v0.7.1
#
# by Jonas Jakobsson <jonas@update.uu.se>
# Project homepage (hopefully) available from http://www.update.uu.se/~jonas
#
# Date: 2004-05-28
#
# This software is released under the GNU General Public License version 2.
####################################################################
# ShortChat v0.8.1.628g Updated by Gerald Young (sc@gwy.org)
#
# Revised 2004-11-15
#
# I chose to upgrade the .version because I wanted to start a new iteration
# I also added 628g because I wanted to indicate compatibility w/WebGUI.
# Bug fixes and code updates to work with WebGUI's hashing of ID's
# Changes from previous author marked with **
# Significant changes have been only made in create-SQL.sql and ShortChat.pm
# No functionality changes have been made.
#####################################################################

--->> Requirements:
(included means that these packages comes with ShortChat and are installed correctly
if the package is unpacked in the WebGUI root directory).

** - WebGUI 6.2.8 (It was tested on this version, but it might work on other versions)
- Geo::CountryFlags (included in the Shortchat tarball)
- Geo::IP::PurePerl (included, but you need to download a GeoIP datbase.
It is available inside some packages here:
http://www.maxmind.com/app/api
and is probably called GeoIP.dat)

--->> Installation:

- Do this: "cd /path/to/WebGUI-root"
- Then: "tar -xvzf /path/to/ShortchatXXXX.tar.gz"
- Go to the docs folder and do "mysql -uuser -ppassword WebGUI < create-ShortChat.sql".
- Modify your existing WebGUI.conf by adding "ShortChat" to the wobjects section.
- Now you are done IF you dont want the countryflags in the chat.
- If you do, then make a directory that is readable and writeable by the user the scripts
are run as. On Debian that user might be www-data, or apache.
- Make sure that the directory is accessible from the web.
- Restart the webserver and add a ShortChat to a page.
- Edt the settings for the wobject so that the countryflags directory uses the directory
you just made.
- All done.


--->> Uninstall:

- Remove the below mentioned files, or at least /lib/webGUI/Wobject/ShortChat.pm
- Remove ShortChat from your WebGUI.conf.
- Run "mysql -uuser -ppassword WebGUI < webgui_root/docs/ShortChat/drop-ShortChat.sql".
(ignore the errors due to missing tables and such).
- All done.

Please note that older versions of ShortChat might not uninstall perfectly with newer
versions of drop-ShortChat.sql. You need to remove that manually by dropping all ShortChat
tables, and removing ShortChat stuff from other tables.


--->> Configuration:

The Geo::IP database will eventually become too old, so it is a good idea to not use
the systemwide GeoIP database file. The systemwide database MUST reside in
/usr/local/share/GeoIP/GeoIP.dat, IF you choose to use the systemide database.
Otherwise ShortChat will crash. Yes it is ugly...

The archive of older posts is not functional in this release.

--->> Files in this package:

./docs/ShortChat/drop-ShortChat.sql
./docs/ShortChat/ShortChat.README
./docs/ShortChat/create-ShortChat.sql
./lib/WebGUI/Wobject/ShortChat.pm
./lib/Geo/CountryFlags.pm
./lib/Geo/IP/PurePerl.pm

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
Comments
4andreasG: "
you have two typo errors in your script:

in line 40 and 41

you have to replace

cellpaddning

with

cellpadding

btw. any ideas how to enhance the wobject to get followed functionality?

- if you click on the username you can view the profile of the user
- you can view DATE and Time of the posting

"
4crythias: "The original sql had that "paddning" problem, but I'm very certain that
that isn't the case with this file. Kindly make sure the date on your
.sql is Nov 15, because I *JUST* downloaded to a fresh directory and
extracted. I hope there isn't another location where I missed it.
(Besides, if I got that wrong, I bet wobjectId would show up as
int(11), and I'm certain I fixed that!)

DATE of posting: simple! Edit the ShortChat. Layout Tab. Edit Template.
See where there are two </td>'s near the bottom? Before the <tmpl_var time>, just add <tmpl_var date>&nbsp; or whatever delimiter.

I'm
trying to figure out the best way to have clickable usernames, but it
escapes me right now. I think it has to do with userId not being
passed, but I can't seem to figure it out right this second. ... OK,
here's the diff for it. I'll upload a revised version after I sleep.
But first, the template change: <a href=caret -backslash-semicolon -Macro?op=viewProfile&uid=<tmpl_var userHash>><tmpl_var username></a>
292c292
<     my($output, %var, $sql, %row, @messageloop, $time, @date,$sec,$min,
$hour,$mday,$mon,$year,$wday,$yday,$isdst,$userName,$userHash, $flag,
$showFlags,$showPosterName, $date, $gf, $flagwidth, $flagheight);
---
>     my($output, %var, $sql, %row, @messageloop, $time, @date,$sec,$min,
$hour,$mday,$mon,$year,$wday,$yday,$isdst,$userName,$flag,$showFlags,
$showPosterName, $date, $gf, $flagwidth, $flagheight);
326d325
<             $userHash = $row{userId};
329d327
<             $userHash = "";
351d348
<             userHash => $userHash,

"
4crythias: "These are the default variables that are passed to the loop for 0.8.1:
userNameflagflagwidthflagheighttimedatemsgipaddress
If you make the changes in the previous post, you can also have
userHash, which will return the userId. The definition of the ShortChat_msgs table contains a few more fields, but the only one of any potential usage is countryCode, which is supposed to be represented by flags anyway, according to the original author.
"
4andreasG: "
thx for your work, crythias! do you have an idea, how i can read the older messages in the database? (archived messages)

i don't know why the "Log entered messages to external file" is integrated? and it dosn't work...
"
4andreasG: "you can see my template for the shortChat here: http://www.bonsai.org/schat"
4crythias: "Actually, I think you could SQLReport it from the ShortChat_msgs"
4andreasG: "do you plan to upgrade it to 6.5.x? that would be nice"
4crythias: "
Yes, I do... I'm just having a bit of problems right now. In the
mean time, I have a "stub" that will help people who have problems
viewing the page. from upgrade.
--
Maintainer of an unofficial WebGUI FAQ Please contribute questions or answers!

When asking questions on this forum, please indicate (at least) which
version of WebGUI you are using. Optional, but sometimes helpful, are
your Operating System name and version, PERL version, and Apache
version. The little icons next to my picture indicate my IM status.
Yes, you are welcome to IM me. I am not an employee of Plain Black. My
offers of assistance are subject to the general disclaimer of this
discussion board that my answer may be completely wrong. Have a great
day!

"
DownloadShortChat.8.2.628g.tar.gz ShortChat.8.2.628g.tar.gz
LinksNo Support Offered
Screenshotsshortchat.jpg
Statistics Downloads: 363
Views: 6602
Rating: 4
Updated: 8/12/2005
Keywords Assets
NavigationBack to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved