Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Little add-on : Shoutbox  (Read 22095 times)

0 Members and 1 Guest are viewing this topic.

Corbamis

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 1
    • afkcafe.free.fr
Little add-on : Shoutbox
« on: December 14, 2007, 12:00:55 am »

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" :

Code: [Select]
<?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  :'(
« Last Edit: April 06, 2008, 04:11:21 am by Corbamis »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Little add-on : Shoutbox
« Reply #1 on: December 14, 2007, 08:42:34 am »

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.
Logged

Templarart

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Little add-on : Shoutbox
« Reply #2 on: December 27, 2007, 02:43:30 am »

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!!!
Logged

dke

  • Guest
Re: Little add-on : Shoutbox
« Reply #3 on: January 25, 2008, 10:32:56 am »

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.
Logged

dke

  • Guest
Re: Little add-on : Shoutbox
« Reply #4 on: January 25, 2008, 10:48:32 am »

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


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

replace to:
Code: [Select]
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!
Logged

Templarart

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Little add-on : Shoutbox
« Reply #5 on: February 26, 2008, 04:25:55 pm »

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.
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Little add-on : Shoutbox
« Reply #6 on: February 26, 2008, 04:33:22 pm »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Little add-on : Shoutbox
« Reply #7 on: February 26, 2008, 05:35:31 pm »

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

SGhost

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Little add-on : Shoutbox
« Reply #8 on: July 04, 2008, 10:06:33 pm »

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?
Logged

Nibbler

  • Guest
Re: Little add-on : Shoutbox
« Reply #9 on: July 04, 2008, 10:29:13 pm »

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

SGhost

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Little add-on : Shoutbox
« Reply #10 on: July 04, 2008, 10:35:11 pm »

just so

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

Heroe

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 124
    • abroadbg.com
Re: Little add-on : Shoutbox
« Reply #11 on: January 18, 2009, 02:20:29 pm »

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

Quote
ech '<tr><td class="tableb">';

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

Quote
echo '<tr><td class="tableb">';

 :)
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.