Little add-on : Shoutbox Little add-on : Shoutbox
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Little add-on : Shoutbox

Started by Corbamis, December 14, 2007, 12:00:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Corbamis

Hi there, I just began using Coppermine Photo Gallery few days ago, in order to up a huge collection of pics.

The only thing I needed, and didn't found here, or in a style I don't like, is a shoutbox, so I tried to make one easy to use :P

So I used the "anycontent.php" file, to include it in my CPG, with a little bit more files, that can be found as attachment file here,
if you want to use it, just unzip the file to your CPG install folder, overriding the file "anycontent.php" too.

If you want to modify config of the shoutbox, you can edit the file "shout_cfg.php" :

<?php
/**
* Shoutbox Config.
*
* Shoutbox by Corbamis (corbamis@gmail.com) for Coppermine Photo Gallery.
**/

//Labels Config
$shout_title "Shoutbox"//Any Content Tab Label
$shout_post "Post"//Button Label
$shout_msg "Message :"//Message Label
$shout_nopost "Please post something!"//No post Label
$shout_plz_login "Please login to post in the Shoutbox."//Login to post Label

//Size Config
$shout_height "200"//Height of the shoutbox
$shout_width "500"//Width of the shoutbox
$shout_input_size "110"//Size in chars for the input

//Images Config
$shout_up_img "images/arrow_up.gif";
$shout_down_img "images/arrow_down.gif";

//Colors Config
$shout_bg "#FFFFFF";
$shout_font "<font size=\"1\" face=\"Verdana, Arial\">";
$shout_font_error "<font size=\"1\" color=\"red\">";

//File Config
$shout_file "shoutbox.dat"//File which contain all posts

?>


This shoutbox is only available to registered members for writing, but anonymous can read it too, without posting  ;D

So, hope it could be useful for someone, and finally, sorry for my poor english, I'm french  :-*


Content of zip file :


  • images/arrow_down.gif (Image fo scrolling down the shout)
  • images/arrow_up.gif (Image for scrolling up the shout)
  • anycontent.php (File which permits access to the shout)
  • shout.php (File which permits access to the shout too)
  • shout_cfg.php (Config file)
  • shoutbox.dat (Data file which contains all posts)

Whoops, sorry, forget to post an example, so you can just try it at : http://afkcafe.free.fr  :'(

Joachim Müller

Thanks for your contribution. However, it is not a valid plugin, as it doesn't use the Plugin API of Coppermine. In fact, it's a plain mod. Moving accordingly.

Templarart

That was one awesome add-on!  I instantly added it!
And I LOVE your site - I'll probably add it to weirdandsexy.com

Note to other users: Don't forget to set permissions for shoutbox.dat to 666

I don't suppose there's a way to add a shoutbox to each member profile:

"Great pics HERBERT"
"Draw more green monsters!"
"When's the next page of BAD GUY coming out?"

Thanks again!!!

dke

I would like to test this modification however the code does not even load on my gallery, ive set the permissions to the files to 666, and both tested to load the page code in standalone and in anycontent, and nothing gets loaded.

Is there anything i've missed?

It does not give me an error message, page source is empty.

dke

Got it to load, had to change some code though:


find:
starttable("100%", $shout_title);
?>
<tr><td class="tableb" >
<?


replace to:
starttable("100%", $shout_title);
echo '<tr><td class="tableb"</tr>';


However it does not go smoothly into my theme "macosx" ill try figure out what makes it look weird, thanks for this simple and great modification!

Templarart

I've been using the shoutbox for quite awhile - it's on 3 of my sites now.

Here's a problem I've run into and if anyone has an answer I'd appreciate it...

Shoutbox works fine/no problem in Firefox.  In Internet Explorer, however, it works only about 20% of the time.  This is with and without pop-up blocking. I have 3 seperate computer with 2 different versions of IE and it's the same thing with all of them.

Hein Traag

Thanks Corbamis, nice little mod you got here. As Joachim points out it is not a real plugin, although i think it would be a nice one to have as a plugin.

Joachim Müller

Should be dead-easy to pluginize this little mod. Anyone who wants to start writing plugins should aim at this one.

SGhost

hmmm I have the question
I "installed" this shotbox, all works, but while refreshing site (firefox) I add the last written text >:( what is bad?

Nibbler

That's expected. Don't reload after submitting a form unless you want to repeat your action.

SGhost

just so

but or it will give so to get,enough one could refresh?

Heroe

nice small mod i found one error in yr anycontent.php
to get this mod to work you have to fix line  44 ore you will get error T_CONSTANT_ENCAPSED_STRING

Quoteech '<tr><td class="tableb">';

must be ''echo'' with "o" on the end

Quoteecho '<tr><td class="tableb">';

:)