Shout Box added to my Gallery Shout Box added to my Gallery
 

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]

Main Menu

Shout Box added to my Gallery

Started by Ross(SE-MI), February 05, 2006, 01:55:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ross(SE-MI)

Not sure if you have had any requests for this but,
See it on my site here: http://www.metaldetectingpics.com/

To install, get and install G-Shout SHOUT! mod from: http://sourceforge.net/projects/g-shout
http://sourceforge.net/project/showfiles.php?group_id=145380&package_id=159886&release_id=347003

Open anycontent.php
Find:
This is for any content block - just a test - Edit the file "anycontent.php" to change what is shown here
</td></tr>
<?php
endtable
();

?>


Replace with:
<br>
<?php
endtable
();
starttable("100%");
?>

<td class="tableb" width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
<b>Your Website Name</b> powered by <A HREF="http://sourceforge.net/projects/shout" target="_blank"><b>Shout!</b></A><br />
<iframe src="http://www.your site.com/shout/shoutbox.php" width="600" height="360" frameborder=0></iframe>
//Add this if you want copy rights notice
<br>
&copy;&nbsp2006&nbsp<font color=blue>Your Website Name</font>
//End copy rights
</td>
<?php
endtable
();

?>


BTW, thanks for this great program (Coppermine)

[edit GauGau]
Replaced the shoutbox mod link as suggested later in this thread
[/edit]

slasherx

i tried your way exatly..but still i get this error.. :(


can you tell exatly how u did..please..thnx..
ps: nice site !!

warning: fopen() [function.fopen]: Unable to access scret/logs.php in /home/www/free/xhost.ro/miu.xhost.ro/pic/shout/includes/functions.inc.php on 872

warning fopen(scret/logs.php) [function fopen]:failed to open streams: no such file or directory in /home/www/free/xhost.ro/miu.xhost.ro/pic/shout/includes/functions.inc.php on line 872

warning feof(): supplied argument is not a valid stream resource in /home/www/free/xhost.ro/miu.xhost.ro/pic/shout/includes/funtions.inc.php on line 874

warning: filesize() [function.filesize]: stat failed for scret/logs.php in /home/www/free/xhost.ro/miu.xhost.ro/pic/shout/includes/funtions.inc.php on line 874

these are the errors which are killing me..

Ross(SE-MI)

Hi slasherx,
This mod is pretty straight forward and shouldn't effect your functions.inc.php file at all unless you chaged something you originally had in anycontent.php to cause your error.
First test to see if you installed shoutbox properly by viewing it by itself through your browser.
In your browser type   http://www.yoursitename.com/shout/shoutbox.php

See this link of my shout on how it looks by itself.
http://www.metaldetectingpics.com/shout/shoutbox.php

If you can't get that working, look for support on G-Shout here:
http://sourceforge.net/forum/forum.php?forum_id=439068

If G-Shout is working OK, ask for help with adding general code to your anycontent.php file from this group.
Perhaps list what you have in this file.
Sorry, I am not a programmer. I do everything by trial and error till I get it working.

Joachim Müller

some webhosts disable fopen() for security reasons. If your webhost did, you can't use this mod. You might want to try to addini_set("allow_url_fopen","1");right before the first fopen call, maybe your webhost let's you override the restriction.
Another thing to look into is of course permissions - CHMOD accordingly.

slasherx

yeah i guess i cant change it due to the restictions and security of the web host..
so i wish to ask..is there any suitable shout box which is the same as the one at hand..?
thanks aloot and i really apprcite the fast replies here :D
thans again..

pcboy123


simoxy

it doesn't work for me either. Can't get the script to install?
go get in the surf!

Joachim Müller

those two above postings are not valid bug reports nor good postings to request help: saying "doesn't work for me" doesn't mean anything at all ::). Get the shoutbox to work as standalone app first. If it works, integrate it into your coppermine page. If you expect help, post what you did, what error message you got, and maybe a link or screenshot to illustrate your issues. If you have nothing to say, then don't.

Ross(SE-MI)

I am so sorry, I gave you all incorrect info.
I just realized that I did not use G-Shout as my shoutbox mod.

I actually used SHOUT! written by James R Fleeting.
Here is the correct download link:
http://sourceforge.net/project/showfiles.php?group_id=145380&package_id=159886&release_id=347003

Install and test this as a stand alone mod before adding to your gallery.
Then see my instructions for adding to gallery above.

Again, I am very sorry for this error.

pcboy123

lol
thanks for the correction

no wonder it didnt work for me

lol!!

good job any ways

Ross(SE-MI)

Added click able Smilies and also showing my changes to authors original script.
Note: changed original post in this tread slightly to add credit link to author.
Code added here borrowed from scripts in this Coppermine software.

Files to edit in Shout: shoutbox.php
Open shoutbox.php

Find and remove, (added in anycontent.php, see first post)
$version = "v0.5";
$powered = "Powered: SHOUT!";


Find
print "</HEAD>

Replace with
print "
<SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>
<!--
/****************************************************
     AUTHOR: WWW.CGISCRIPT.NET, LLC
     URL: http://www.cgiscript.net
     Use the code for FREE but leave this message intact.
     Download your FREE CGI/Perl Scripts today!
     ( http://www.cgiscript.net/scripts.htm )
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=='random'){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=='center'){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!='random') || pos==null){myleft=0;mytop=20}
settings='width=' + w + ',height=' + h + ',top=' + mytop + ',left=' + myleft + ',scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';win=window.open(mypage,myname,settings);
win.focus();}
// -->
</script>
<script language='JavaScript' type='text/javascript'>
<!--
function emoticon_post(text) {
        text = ' ' + text + ' ';
        if (document.post.message.createTextRange && document.post.message.caretPos) {
                var caretPos = document.post.message.caretPos;
                caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
                document.post.message.focus();
        } else {
                document.post.message.value  += text;
                document.post.message.focus();
        }
}

function storeCaret_post(textEl) {
        if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}
//-->
</script>
</HEAD>


Find
if (isset($_COOKIE['name'])){

$name = $_COOKIE['name'];
$email = $_COOKIE['email'];
$site = $_COOKIE['site'];

echo "<form action='$php_self' method='post' name='form'>
<INPUT TYPE='TEXT' value='$name' NAME='name' SIZE=18 maxlength='100'><br />
<INPUT TYPE='TEXT' value='$site' NAME='site' SIZE=18 maxlength='100'><br />
<INPUT TYPE='TEXT' value='$email' NAME='email' SIZE=18 maxlength='100'><br />
<INPUT TYPE='TEXT' value='message' NAME='message' SIZE=18 maxlength='100'><br />
<input type='submit' name='submit' value='shout'><input type='reset' name='reset' value='Reset'>
</form>";
} else {
echo "<form action='$php_self' method='post' name='form'>


Replace with
echo "<div id='comments'><form action='$php_self' method='post' name='post'>
                           <td><input type='hidden' name='msg_author' value='Webmaster' /></td>
<!-- BEGIN input_box_smilies -->
Enter your name and your message here.<br>


Find
<INPUT TYPE='TEXT' value='message' NAME='message' SIZE=54 maxlength='100'><br />
<input type='submit' name='submit' value='shout'><input type='reset' name='reset' value='Reset'>
</form>";


Replace with
Note: change smilie codes to your liking
<INPUT TYPE='TEXT' value='message' NAME='message' SIZE=54 maxlength='140' class='textinput' id='message' name='msg_body' onselect='storeCaret_post(this);' onclick='storeCaret_post(this);' onkeyup='storeCaret_post(this);' />
<input type='reset' name='reset' value='Reset'>
<input type='submit' class='comment_button' name='submit' value='shout'>
<!-- END input_box_smilies -->

                <td class='tableb_compact'>
                <input type='hidden' name='event' value='comment' />
                <input type='hidden' name='pid' value='91' />
                </td>
</br>
Click on smilies below to add to your message.
                        <table width=50% border=0 cellspacing=0 cellpadding=0>
        <tr align=center height=30 valign=middle>
                <td width=5%><img src=smilies/".$theme."/".$theme."biggrin.gif alt= :-D width=15 height=15 border=0 style=cursor:pointer; title= :-D onclick=javascript:emoticon_post(':-D') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."smilewinkgrin.gif alt= :swg width=15 height=15 border=0 style=cursor:pointer; title= :swg onclick=javascript:emoticon_post(':swg') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."smile.gif alt= :) width=15 height=15 border=0 style=cursor:pointer; title= :) onclick=javascript:emoticon_post(':)') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."laugh.gif alt= :lol width=15 height=15 border=0 style=cursor:pointer; title= :lol onclick=javascript:emoticon_post(':lol') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."cool.gif alt= :cool width=15 height=15 border=0 style=cursor:pointer; title= :cool onclick=javascript:emoticon_post(':cool') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."sad.gif alt= :( width=15 height=15 border=0 style=cursor:pointer; title= :( onclick=javascript:emoticon_post(':(') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."cry.gif alt= :cry width=15 height=15 border=0 style=cursor:pointer; title= :cry onclick=javascript:emoticon_post(':cry') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."dead.gif alt= :dead width=15 height=15 border=0 style=cursor:pointer; title= :dead onclick=javascript:emoticon_post(':dead') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."eek.gif alt= :o width=15 height=15 border=0 style=cursor:pointer; title= :o onclick=javascript:emoticon_post(':o') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."bigeek.gif alt= :bO width=15 height=15 border=0 style=cursor:pointer; title= :bO onclick=javascript:emoticon_post(':bO') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."embarrassed.gif alt= :emb width=15 height=15 border=0 style=cursor:pointer; title= :emb onclick=javascript:emoticon_post(':emb') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."mad.gif alt= :x width=15 height=15 border=0 style=cursor:pointer; title= :x onclick=javascript:emoticon_post(':x') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."no.gif alt= :no width=15 height=15 border=0 style=cursor:pointer; title= :no onclick=javascript:emoticon_post(':no') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."none.gif alt= :| width=15 height=15 border=0 style=cursor:pointer; title= :| onclick=javascript:emoticon_post(':|') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."razz.gif alt= :razz width=15 height=15 border=0 style=cursor:pointer; title= :razz onclick=javascript:emoticon_post(':razz') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."bigrazz.gif alt= :brazz width=15 height=15 border=0 style=cursor:pointer; title= :brazz onclick=javascript:emoticon_post(':brazz') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."roll.gif alt= :roll width=15 height=15 border=0 style=cursor:pointer; title= :roll onclick=javascript:emoticon_post(':roll') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."rolleyes.gif alt= :rol2 width=15 height=15 border=0 style=cursor:pointer; title= :rol2 onclick=javascript:emoticon_post(':rol2') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."shy.gif alt= :shy width=15 height=15 border=0 style=cursor:pointer; title= :shy onclick=javascript:emoticon_post(':shy') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."uhoh.gif alt= :O width=15 height=15 border=0 style=cursor:pointer; title= :O onclick=javascript:emoticon_post(':O') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."wink.gif alt= ;) width=15 height=15 border=0 style=cursor:pointer; title= ;) onclick=javascript:emoticon_post(';)') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."yes.gif alt= :yep width=15 height=15 border=0 style=cursor:pointer; title= :yep onclick=javascript:emoticon_post(':yep') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."sleep.gif alt= :sleep width=15 height=25 border=0 style=cursor:pointer; title= :sleep onclick=javascript:emoticon_post(':sleep') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."sleepw.gif alt= :slw width=15 height=25 border=0 style=cursor:pointer; title= :slw onclick=javascript:emoticon_post(':slw') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."confused.gif alt= :-? width=15 height=25 border=0 style=cursor:pointer; title= :-? onclick=javascript:emoticon_post(':-?') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."confusedw.gif alt= :-w width=15 height=25 border=0 style=cursor:pointer; title= :-w onclick=javascript:emoticon_post(':-w') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."sigh.gif alt= :sigh width=15 height=25 border=0 style=cursor:pointer; title= :sigh onclick=javascript:emoticon_post(':sigh') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."sighw.gif alt= :siw width=15 height=25 border=0 style=cursor:pointer; title= :siw onclick=javascript:emoticon_post(':siw') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."upset.gif alt= :grim width=15 height=25 border=0 style=cursor:pointer; title= :grim onclick=javascript:emoticon_post(':grim') /></td>
                <td width=5%><img src=smilies/".$theme."/".$theme."upsetw.gif alt= :griw width=15 height=25 border=0 style=cursor:pointer; title= :griw onclick=javascript:emoticon_post(':griw') /></td>               
        </tr>
</table>
</form></div>";


Find and remove, not needed
echo '<br />';
echo '<center>';
echo $powered.'<br />';

//page loading time
$round = 3;// The number of decimal places to round the micro time to.
$m_time = explode(" ",microtime());
$m_time = $m_time[0] + $m_time[1];
$endtime = $m_time;
$totaltime = ($endtime - $starttime);
echo "Load: ". round($totaltime,$round) ." seconds";
echo "</center>";


Save and close file, enjoy
Working on "name field" to match person logged in.
Please let me know if you are using this script by providing your link, thank you.

pacimir

Very god mod! :)
I have some suggestions
It'll be god if there is a script to check if there is blank text areas.
Text areas to be blank, not like this "you@somewhere.com"
Can I see the old shouts after some time. Is there something like, page1, page2 etc.
From where to change the color of "Horisontal Line" between posts?

Ross(SE-MI)

However, I am not a programmer. I can only mimic codes from others.
I have tried asking for help from authur of this shoutbox mod but he doesn't seem interested in modifiying his code.
I am still trying to get shoutbox to recognize logged in user name. I think because the box is shown as an in-line frame it won't pick up cookies from gallery. Can't figure out how to set up includes properly.
I do like the simplicity of this mod though. To see older shouts, just change in config more shouts to be shown and use scrool bars.

trippinsweet

Quote from: pacimir on March 24, 2006, 03:35:55 PM
Very god mod! :)
I have some suggestions
It'll be god if there is a script to check if there is blank text areas.
Text areas to be blank, not like this "you@somewhere.com"
Can I see the old shouts after some time. Is there something like, page1, page2 etc.
From where to change the color of "Horisontal Line" between posts?

Check if the text area is blank and then what... stop the user from shouting?

crxman

somebody knows any shoutbox that can keep user register and post with their login, we can imagine then that people won't be able to shout if they are not registred ...

If you know a script please let me know  ;)

Ross(SE-MI)

Update to shoutbox, found 3 corrections/improvements.
My shoutbox stopped working. To solve my problem, I had help from a support person at my host provider, Aplusnet.

Open shoutbox.php
Find and remove
                <td class='tableb_compact'>
                <input type='hidden' name='event' value='comment' />
                <input type='hidden' name='pid' value='91' />
                </td>


Find
if($submit)

Replace with
if($_POST[submit])

Find
      "VALUES ('NULL','$name', '$message','$time','$site','$email')");

Replace with
      "VALUES ('NULL','$_POST[name]', '$_POST[message]','$_POST[time]','$_POST[site]','$_POST[email]')");


Keule

#16
edit: just deleted that shoutbox because i dont get support.
http://keule.ke.ohost.de if someone wants to visit my gallery.

Ross(SE-MI)

If you still want my help, send me an email explaining your problem.
rms42098@wowway.com

tandiono

Hello,

I've upload all the file and set the config. But it seems that it's not working the shout is not shown on gallery.

here's my setting :

<br>
<?php
endtable
();
starttable("100%");
?>

<td class="tableb" width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
<b>FriendsterForum.com</b> powered by <A HREF="http://www.hits.fm/" target="_blank"><b>Shout!</b></A><br />
<iframe src="http://www.friendsterforum.com/gallery/shout/shoutbox.php" width="600" height="360" frameborder=0></iframe>
//Add this if you want copy rights notice
<br>
&copy;&nbsp2006&nbsp<font color=blue>FriendsterForum.com</font>
//End copy rights
</td>
<?php
endtable
();



and as for the config setting DB, just wondering should i create a new one for the shout or use the "cpm DB" ?

Sami

‍I don't answer to PM with support question
Please post your issue to related board