plainblack.com
Username Password
search
Bookmark and Share

ShortChat

A simple chat for your homepage.

This version is not using any Jabber stuff, and so it is considerably less bloated than the previous version.
It was most recently tested on WebGUI 6.0.3. I have no idea if it works with later or earlier versions.
Changelog:

  • Changed create-ShortChat.sql so it will install without errors on 6.0.3.
  • Version 0.7 out.
  • 2003-11-27 Removed the WebGUI::Smileys stuff and used the replace functionality in WebGUI instead.
  • 2003-11-27 removed a a bugg in the create-sql script that removed the template table.
  • 2003-11-27 removed Jabber stuff.
  • 2003-05-01 Version 0.5 with some buggfixes.
  • 2003-04-02 Version 0.3 available.
  • 2003-04-02 Added support for GeoIP, Geo::CountryFlags and Smileys, and made an (for now invisible) archive for older messages.
  • 2003-03-25 ShortChat v0.2 is available for download.
  • 2003-03-25 Thanks to Len Kranendonk for fixing the copybug in version 0.1 and adding support for WebGUI 5.2.
  • 2003-03-16 Version 0.1 for WebGUI 5.1.2 available. Has a copybug, and not much functionality.

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
4skotos: "Any Idea where this wobject can be"
2halotron: "I just added the most recent version so that it is downloadable from plainblacks homepage in the contributions"
4andreasG: "
if i use hyphen in the message, sometimes the messages won't be assumed...

WebGUI worldwide Germany
http://www.webgui-cms.de

"
4andreasG: "
Is your Wobject tested with WebGUI 6.1.x? If not: what should i have to change?

WebGUI worldwide Germany
http://www.webgui-cms.de

"
4andreasG: "
no answers?

WebGUI worldwide Germany
http://www.webgui-cms.de

"
4ntisithoj: "Here's a diff of the module I tweeked to get working in 6.1.8
... fairly simple changes.  I'm still testing so there may be more

136c136
<     return WebGUI::Privilege::insufficient()  unless ($_[0]->canEdit);
---
>     return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditPage());
267c267
<     return WebGUI::Privilege::insufficient()  unless ($_[0]->canEdit);
---
>     return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditPage());
298c298
<     if(WebGUI::Grouping::isInGroup($_[0]->get("postGroup"), $session{user}{userId})) {
---
>     if(WebGUI::Privilege::isInGroup($_[0]->get("postGroup"), $session{user}{userId}))"
4ntisithoj: "Still issues w/ 6.2.8...  

Thu Nov 11 11:54:13 2004 C:/data/domains/wnylit.net/www/index.pl WARNING: Wobject [0] appears to be missing or corrupt, but was requested by Admin [3].
/data/WebGUI/lib/WebGUI/Page.pm:533 (sub"
4crythias: "If you're interested further, you might wish to change your create-ShortChat.sql to change the wobjectId to Varchar(22)

I am not certain how that affects all the internals of the .pm file,
yet. I do know that you should change a bunch of SQL queries that
reference wobjectId to include quote() around them.. I haven't fully tested this, yet, but I have a feeling it might assist.


My diff New<Old> has the following changes:
113c113
< $sth = WebGUI::SQL->read("select * from ShortChat_msgs where
wobjectId=".quote($_[0]->get("wobjectId")));
---
> $sth = WebGUI::SQL->read("select * from ShortChat_msgs where
wobjectId=".$_[0]->get("wobjectId"));
115c115
< ($msgIndex) = WebGUI::SQL->quickArray('select max(msgIndex)
from ShortChat_msgs where wobjectId='.quote($newWobjectId));
---
> ($msgIndex) = WebGUI::SQL->quickArray('select max(msgIndex)
from ShortChat_msgs where wobjectId='.$newWobjectId);
124c124
< WebGUI::SQL->write("delete from ShortChat_msgs where
wobjectId=" . quote($_[0]->get("wobjectId")));
---
> WebGUI::SQL->write("delete from ShortChat_msgs where
wobjectId=" . $_[0]->get("wobjectId"));
136c136
< return WebGUI::Privilege::insufficient() unless
($_[0]->canEdit);
---
> return WebGUI::Privilege::insufficient() unless
(WebGUI::Privilege::canEditPage());
267c267
< return WebGUI::Privilege::insufficient() unless
($_[0]->canEdit);
---
> return WebGUI::Privilege::insufficient() unless
(WebGUI::Privilege::canEditPage());
298c298
< if(WebGUI::Grouping::isInGroup($_[0]->get("postGroup"),
$session{user}{userId})) {
---
> if(WebGUI::Privilege::isInGroup($_[0]->get("postGroup"),
$session{user}{userId})) {
320c320
< $sql = WebGUI::SQL->read("select * from ShortChat_msgs where
wobjectId=".quote($_[0]->get("wobjectId"))." and msgSort " . $arg.
$_[0]->get("maxNrMsgs") . " order by msgSort");
---
> $sql = WebGUI::SQL->read("select * from ShortChat_msgs where
wobjectId=".$_[0]->get("wobjectId")." and msgSort " . $arg.
$_[0]->get("maxNrMsgs") . " order by msgSort");
389c389
< ($tmp) = WebGUI::SQL->quickArray('select count(*) from
ShortChat_msgs where wobjectId='.quote($_[0]->get("wobjectId")));
---
> ($tmp) = WebGUI::SQL->quickArray('select count(*) from
ShortChat_msgs where wobjectId='.$_[0]->get("wobjectId"));
393c393
< $sql = WebGUI::SQL->read('select msgIndex from ShortChat_msgs
where wobjectId='.quote($_[0]->get("wobjectId")).' and msgSort >
'. $tmp);
---
> $sql = WebGUI::SQL->read('select msgIndex from ShortChat_msgs
where wobjectId='.$_[0]->get("wobjectId").' and msgSort > '.
$tmp);
397c397
< WebGUI::SQL->write('delete from ShortChat_msgs where
wobjectId='.quote($_[0]->get("wobjectId")).' and msgIndex='.$tmp2);
---
> WebGUI::SQL->write('delete from ShortChat_msgs where
wobjectId='.$_[0]->get("wobjectId").' and msgIndex='.$tmp2);
401,402c401,402
< WebGUI::SQL->write('update ShortChat_msgs set msgSort = msgSort
+ 1 where wobjectId='.quote($_[0]->get("wobjectId")));
< ($tmp2) = WebGUI::SQL->quickArray('select max(msgIndex) from
ShortChat_msgs where wobjectId='.quote($_[0]->get("wobjectId")));
---
> WebGUI::SQL->write('update ShortChat_msgs set msgSort = msgSort
+ 1 where wobjectId='.$_[0]->get("wobjectId"));
> ($tmp2) = WebGUI::SQL->quickArray('select max(msgIndex) from
ShortChat_msgs where wobjectId='.$_[0]->get("wobjectId"));
443c443
< WebGUI::SQL->write("insert into ShortChat_msgs values \(" .
quote($_[0]->get("wobjectId")) . ", " . $tmp2 . ", 1, " .
quote($msg) . ", " . $tmp . ", " . quote($session{env}{REMOTE_ADDR}) .
", " . $session{user}{userId} . ", " . quote($userName) . ", " .
quote($countryCode) . ')');
---
> WebGUI::SQL->write("insert into ShortChat_msgs values \(" .
$_[0]->get("wobjectId") . ", " . $tmp2 . ", 1, " . quote($msg) . ",
" . $tmp . ", " . quote($session{env}{REMOTE_ADDR}) . ", " .
$session{user}{userId} . ", " . quote($userName) . ", " .
quote($countryCode) . ')');
"
4crythias: "Forget it. There was enough to change that I'm going to repost this, with"
DownloadShortChat-0.7.1.tar.gz ShortChat-0.7.1.tar.gz
LinksNo Support Offered
Statistics Downloads: 385
Views: 8867
Rating: 4
Updated: 8/12/2005
Keywords Assets
NavigationBack to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved