News:

SMF 2.1.5 has been released! Take it for a spin! Read more.

Main Menu

nneonneo's Shoutbox

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

Previous topic - Next topic

nneonneo

Huh? That's slightly odd.

Just deleting the file should work, but if the permissions are wrong...hmm.

Here's a possible fix:

In yshout/yshout.php, add
if(isset($_GET['clear_hist']))
{
if($user['is_admin'] || $user['is_mod'])
{
$chatFile=isset($_GET['file'])?$_GET['file']:"home.txt";
$chatFile = checkName($chatFile);
$chatPath = "$logDir/history.$chatFile";
$handle = fopen($chatPath, "w");
fclose($handle);
exit;
}
}

before
if(isset($_GET['banid']))

Then, point your browser at http://domain.com/path/to/forum/yshout/yshout.php?clear_hist. If it works, you'll get a blank page, and the history will be completely erased.
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!

kichu

The Shout box is moving up and down... how to fix the fixed height of Shoutbox..

nneonneo

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!

kichu


malware

hello..
how can i set only selected membergroup can shout?
sorry if this already answered... i can't find

nneonneo

#1425
I think the easiest way to do this is to hide the shoutbox from those members:

In index.template.php, find (n.b. may not be exactly as shown)
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END

Add before
global $user_profile;
if (loadMemberData(Array($context['user']['id']),false,'minimal')!==false && in_array($user_profile[$context['user']['id']]['ID_GROUP'],array(9,10)))

where 9,10 are the membergroups that are allowed to shout.

Also, in yshout/yshout.php, after
$user=ssi_welcome('nothing'); // ssi_welcome only does something IF the parameter is 'echo'; otherwise the user data is returned!
add
if (!(loadMemberData(Array($context['user']['id']),false,'minimal')!==false && in_array($user_profile[$context['user']['id']]['ID_GROUP'],array(9,10))))
die("Sorry, you are not allowed to shout.");

where 9,10 is as before.
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!

AHMER

how can i do this

like if u r not logged in it say this

like can u tell me the coding thanx
IF U ARE LOOKING FOR A WEBMASTER THEN EMAIL ME @ ahmerfish [at] hotmail [dot]com

brianjw

There is a setting in the yshout.php file.

zookeeper

I'm using FerryTema theme.  I believe I can see it on the forums when I first go there as a GUEST.  However, when I sign in as administrator I can't see it at all. 

It also appears to be centered and not aligned to the left.

I have a test forum I did with the default style so I "saw" basically where to install the second smaller section.  However, not sure if thats really right or not as I guess it was loaded there automatically when I added this on?

// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END

This is an incredible thread and a little overwhelming for me I'm afraid.   I've read many tut but not why its not working for my theme?


nneonneo

@AHMER: Yes, the $allowGuests setting (set to false to make that message appear for guests)
@zookeeper: There are *two* spots where that code must be inserted.

In index.template.php, change
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>

to
// YSHOUT HERE
echo '<br /><b>Shout Box</b><br /><br /><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
// YSHOUT HERE
echo '<br /><b>Shout Box</b><br /><br /><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END
echo ' </span>
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!

AHMER

Quote from: nneonneo on December 28, 2007, 01:17:30 PM
@AHMER: Yes, the $allowGuests setting (set to false to make that message appear for guests)
But where can i find this $allowGuest
IF U ARE LOOKING FOR A WEBMASTER THEN EMAIL ME @ ahmerfish [at] hotmail [dot]com

nneonneo

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!

AHMER

can u make me the code like replace this with this

plzz that would be gr8
IF U ARE LOOKING FOR A WEBMASTER THEN EMAIL ME @ ahmerfish [at] hotmail [dot]com

nneonneo

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!

AHMER

theses things are set to ture

// Should we use GZip compression? If you are having trouble with the shoutbox, set this to false.
$gzipCompression=true;

// Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;

// Guest usage for posting. Set to false if you don't want to let guests post to the shoutbox; if allowGuests is on, they will still see it.
$allowGuestsPost=true;

// Automatic Guest Usernames: should they be able to choose their own usernames?
// Set to some string (a prefix) if you want to disable guest choice of username
// Set to false if you want to allow guests to choose a username
$autoGuestName=false;//'guest-';

// Command options.
// If this is set to false, all typed commands are disabled.
// Admin functions, via admin links, are still available.
$allowCommands=true;

// If this is set to false, guests will be denied access to commands.
$guestCommands=true;

but doesnt work
IF U ARE LOOKING FOR A WEBMASTER THEN EMAIL ME @ ahmerfish [at] hotmail [dot]com

nneonneo

Sorry, sorry; I meant false...
$allowGuests=false;
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!

AHMER

IF U ARE LOOKING FOR A WEBMASTER THEN EMAIL ME @ ahmerfish [at] hotmail [dot]com

aFiEND

took me a bit but got it working, good work thanks.

had a heckuva time getting past 'shoubox loading..'

final error was from the server error logs, yshout.php was 777 which i did to test but server denied access till i made it 755

FragaCampos

Hello there.
Im' sorry for not reading the (72!) pages of this thread, but i used the search and nothing came up.
Here it goes: i installed the mod and th eonly thing i see is

Shout Box

...loading shoutbox...

Does this mean my server does not have ajax support?
Thanks.

nneonneo

Hello FragaCampos:

This is a oft-discussed problem. If your browser supports AJAX (Firefox, IE 5.5+, ...) then this message means that your browser was unable to load the shoutbox -- usually, this means the server had some problem serving it up.

Try these:
1) Check server error logs -- errors like "denied due to write-attribute/777" or "file not writable [...]" on yshout/yshout.php typically indicate misconfigurations (usually, chmod'ding yshout.php 755 or the chats folder 777/755 fixes these)
2) Go to http://domain.com/forum/yshout/yshout.php and see what comes up:
a) "Nothing to do" -- shoutbox should be functional (probably client side issue -- easiest thing to do is give me the forum URL and let me check it out)
b) Nothing at all -- shoutbox lacks language files but should otherwise work
c) HTTP Error 500 -- shoutbox failed to load due to a server error (check error log)
d) HTTP Error 404 -- shoutbox isn't installed...
e) Anything else -- Something isn't right.
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!

Advertisement: