nneonneo's Shoutbox

Started by nneonneo, December 26, 2006, 06:58:11 PM

Previous topic - Next topic

nneonneo

@mickeyb107: There should be little "del" and "ban" icons next to all the shouts, and "HideAdminLinks" or "ShowAdminLinks" in the title bar. If none of that is showing up, then it is likely some sort of bug...

@SunKing: If you could post install.xml that would be great. I suspect it is just a matter of applying the same anonymizing code to the topic reply notification, so that the shoutbox also gets the same anonymization.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

[unplugged]

Here you go. (I do realize that technically this doesn't have a thing to do with the shoutbox, and therefore can be put at the bottom of your "to-do" list.  :P)
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



mickeyb107

it does show on my admin account and my other admins have it but nothing for co admin or super mod
<a href="http://ftasatfile.com">FTASATFILE FREE TV YOUR
SOURCE FOR ALL YOUR SATELLITE NEEDS

nneonneo

#4623
@SunKing: Here you go. This replaces the code block mentioned in the original post.

$fakeUser=array('name'=>$posterOptions['name'], 'id'=>$posterOptions['id'], 'is_guest'=>$posterOptions['id']==0);
$oldUser=$user_info;
$user_info['name']=$posterOptions['name'];
$user_info['id']=$posterOptions['id'];
$oldIP=$_SERVER['REMOTE_ADDR'];
$_SERVER['REMOTE_ADDR']=$posterOptions['ip'];
if ($newTopic)
{
$notifyData = array(
'body' => $_POST['message'],
'subject' => $_POST['subject'],
'name' => $user_info['name'],
'poster' => $user_info['id'],
'msg' => $msgOptions['id'],
'board' => $board,
'topic' => $topic,
);
notifyMembersBoard($notifyData);
// YSHOUT TOPIC NOTIFICATION
$res = $smcFunc['db_query']('','SELECT b.name
FROM ({db_prefix}boards AS b)
WHERE b.ID_BOARD = {int:board}', array('board' => $board));
$row = $smcFunc['db_fetch_assoc']($res);
if($row) $boardName = $row['name'];
ob_start();
global $context,$scripturl;
include_once('yshout/yshout.php');
makeShout('New Topic in board [url='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/url]: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.html_entity_decode($_POST['subject']).'[/url]',$fakeUser);
ob_end_clean();
// YSHOUT TOPIC NOTIFICATION END
}
elseif (empty($_REQUEST['msg']))
{
// Only send it to everyone if the topic is approved, otherwise just to the topic starter if they want it.
if ($topic_info['approved']) {
sendNotifications($topic, 'reply');
// YSHOUT REPLY NOTIFICATION
ob_start();
global $context,$scripturl;
include_once('yshout/yshout.php');
makeShout('New reply: [url='.$scripturl . '?topic=' . $topic . '.new;topicseen#new'.']'.html_entity_decode($_POST['subject']).'[/url]',$fakeUser);
ob_end_clean();
// YSHOUT REPLY NOTIFICATION END
}
else
sendNotifications($topic, 'reply', array(), $topic_info['id_member_started']);
}
$_SERVER['REMOTE_ADDR']=$oldIP;
$user_info=$oldUser;


It sets up a fake user, tells the shoutbox to use that user, and also hacks the IP address to be equal to the post's address.

@mickeyb107: What version of SMF are you on? Do they at least have "ShowAdminLinks" above the shoutbox?
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

[unplugged]

That works brilliantly! It posts anonymously, and now shows "Anonymous" in the email too. ;)
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



mickeyb107

nneonneo thank you for the help... i am running smf version 1.17 i as admin do have the delete and ban buttons also the show admin links, the thing i want is for other staff on my forum to have the power to delete shouts and ban... co admin and supermod but its not working...

im not complaining as i really like this with the posts going to shoutbox that is main feature ive been looking for,i would just like to see if i could fix and give permissions to other staff... thank you
<a href="http://ftasatfile.com">FTASATFILE FREE TV YOUR
SOURCE FOR ALL YOUR SATELLITE NEEDS

nneonneo

@mickeyb107: I wanted just to know if a co-admin can see the ShowAdminLinks option, or if that is missing too.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

mickeyb107

sorry... no co admin can not... only admin
<a href="http://ftasatfile.com">FTASATFILE FREE TV YOUR
SOURCE FOR ALL YOUR SATELLITE NEEDS

savek

Hello nneonneo,

Thanks for great mod. I've 2 questions to ask you.

1. When I use /clearhist command, It show error following

Warning: fopen(/history.) [function.fopen]: failed to open stream: Permission denied in /home/esgcoth/domains/esg.co.th/public_html/smf/yshout/yshout.php on line 368

Warning: fclose(): supplied argument is not a valid stream resource in /home/esgcoth/domains/esg.co.th/public_html/smf/yshout/yshout.php on line 370


That line 368 is "$handle = fopen("$logDir/history.$chatFile", "w+");" and when I see in my ftp program, permission in chats folder show is below

[nofollow]
[nofollow]

How can I correct it ?


2. When I post in yshout, some text not show full text (see picture below).

[nofollow]
[nofollow]

Could you please suggest me to correct it?

Thanks and sorry for my poor english.

atha

Hello,
first of all cheers to everyone and a huge thanks to the author for a very nice shoutbox.
Now let's do the bussines. :D

I would use some general help about placing the shoutbox part in SMF 2.0 forum.
I installed everything fine, modified the php's manually but i'm not quite satisfied with the shoutbox placing.
Position at the top of the forum doesn't suite me.
If i place it above the copyright in the bottom, shoutbox shows at every template, admin template etc.
So if i could just place it somewhere in the "info center" part of the SMF, it would be great, but i don't know which template would that be.
The requested position would be in the info center let's say above the "upcoming calendar" part.

Thank you in advance for your help,
Igor

kr5323

I have trouble with chat to include to the end into my file index.template.php a script that activates effect snow in the forum. The chat ceases to be visible. I can think in two different forums so desacarto problems in my files.

Any solution?


This is the script:

<script language="JavaScript1.2">

/******************************************
* Snow Effect Script- By Altan d.o.o. ([email protected], http://www.altan.hr/snow/index.html)
* Visit Dynamic Drive (http://www.dynamicdrive.com/) for full source code
* Modified Dec 31st, 02' by DD. This notice must stay intact for use
******************************************/


//Configure below to change URL path to the snow image
var snowsrc="http://www.myhost/snow1.png"
// Configure below to change number of snow to render
var no = 20;

var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;

if (ns4up||ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();

for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) { // set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><a href=\"http://dynamicdrive.com/\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"><\/layer>");
}
} else if (ie4up||ns6up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
}
}
}

function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", 10);
}

function snowIE_NS6() { // IE and NS6 main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = ns6up?window.innerWidth : document.body.clientWidth;
doc_height = ns6up?window.innerHeight : document.body.clientHeight;
}
dx[i] += stx[i];
if (ie4up){
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
else if (ns6up){
document.getElementById("dot"+i).style.top=yp[i];
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
}
}
setTimeout("snowIE_NS6()", 10);
}

if (ns4up) {
snowNS();
} else if (ie4up||ns6up) {
snowIE_NS6();
}

</script>




Thaks.

nneonneo

@mickeyb107: Would you mind if I took a look at your forum?

@savek: The /clearhist is not a standard feature, so can you point me at the installation instructions? The code you've used is out-of-date with the newest shoutbox.

For #2, increase $maxShoutChars (settings.php); it should be at least six times as long as the maximum number of characters because of entity encoding.

@atha: That would be in BoardIndex.template.php, probably above
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])

Now, you'll want to look at the code for the other Info Center parts to integrate it nicely, giving it the same "feel". Something like
echo '<tr>
<td class="titlebg" colspan="2">Shoutbox</td>
</tr>
<tr>
<td class="windowbg2">';
SHOUTBOX CODE
echo ' </td>
</tr>';

should do the trick nicely.

@kr5323: I don't see anything that would conflict. Does your browser give a JavaScript error?
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

kr5323

x nneonneo

No, no error of javascript. And it is curious, I include the script in the index.template.php and comments seen stop Chat, only a few seconds the text of "loading" and nothing else. If the script off the chat back to normal.





Thanks for the answers.


PS: Discuss default theme and use that as the script is only visible with Firefox and not with IExplorer.

mickeyb107

nneonneo sure i would be delighted if you can take a look. http://www.ftasatfile.com i was going to send you a pm let me know if you would like i make you admin... thx again for the support
<a href="http://ftasatfile.com">FTASATFILE FREE TV YOUR
SOURCE FOR ALL YOUR SATELLITE NEEDS

tripl3r

Any tuts about how to install the advanced shoutbox manually? having trouble with my smf ftp to upload the advanced version...
thanks ;)

n01d3a

#4635
I would like to make shoutbox appear in a popup window, all by itself. can someone help me do this. I am quite new so as descriptive as possible would be great.

I would like to have a link in the menu that when pressed a new window pops up with shoutbox.

Thanks.

atha

Quote@atha: That would be in BoardIndex.template.php, probably above
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])

Now, you'll want to look at the code for the other Info Center parts to integrate it nicely, giving it the same "feel". Something like
echo '<tr>
<td class="titlebg" colspan="2">Shoutbox</td>
</tr>
<tr>
<td class="windowbg2">';
SHOUTBOX CODE
echo ' </td>
</tr>';

should do the trick nicely.


Hello,

thanks for your reply.
I've forgot to mention that my theme doesn't have an BoardIndex.template.php. I've had that file in other theme while using SMF v1.1.x, but in this 2.0 theme i don't have it. I tried to place the code you gave me at \Sources\BoardIndex.php but it always places the ShoutBox code outside the template at the top of the page. Maybe some other suggestion, placing in different template?

File structure inside of theme:
hxxp:img184.imageshack.us/my.php?image=templatelb8.jpg [nonactive]

nneonneo

@kr5323: I don't understand why it is not working. How is this script installed to your index.template.php? Maybe you can post the modified template?

@mickeyb107: Co-admin or something if possible; PM me a test account

@tripl3r: Use the built-in package parser on the main mod page: SMF 2.0b4, SMF 1.1.7

@n01d3a: Have a link like this:
<a href="http://domain.com/forum/yshout/index.php" target="_blank">Shoutbox</a>
This should popup a new window with the shoutbox.
To get fancier, you can adjust the link using JavaScript so the popup window is any size you choose, for example
<a href="javascript:window.open('http://domain.com/forum/yshout/index.php','Shoutbox','width=600,height=400')">Shoutbox</a>

@atha: If the theme doesn't have BoardIndex.template.php then it is using the default theme's file, which means you can just edit the default BoardIndex.template.php, or (if you don't want to touch the default theme), copy it from the default to the custom theme.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

n01d3a

#4638
Thanks nneo, thats works. But i am using firefox, it changes the current page to a page that just says "[object window]" as well as a window with the shout box.
2 questions.
1)How do I make it so that the page with the link does not change?
2)Do you know how i can add a link to the main menu, along with forum, login, profile etc...

ok another problem. The sound button and show admin links do not work. I have this issue with both links.

ScarMix

Thanks for your help and a VERY NICE mod, THANKS again  ;)

Advertisement: