nneonneo's Shoutbox

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

Previous topic - Next topic

ExSpirit

Thx, I managed to move to to index only with moving
// Show the shoutbox!
shoutbox();

from index.template to BoardIndex.template.


I only have 1 more question, is it possible to make ShoutBox hidden by default? User can show/Hide it but when they first see it it's open...

Yabco

#5581
Hello.

I have 1 big problem with this shoutbox, I can't use it even if i'm logged in. it just display msg that i must be loged in to use shoutbox. It happens on every theme that i use. Before i installed it on my site i tried it localy and it worked fine, on default theme and on other theme that i used.

I'm using SMF 1.1.10
Shoutbox version 1.22

Chen Zhen

Quote from: Yabco on August 14, 2009, 10:33:00 AM
Hello.

I have 1 big problem with this shoutbox, I can't use it even if i'm logged in. it just display msg that i must be loged in to use shoutbox. It happens on every theme that i use. Before i installed it on my site i tried it localy and it worked fine, on default theme and on other theme that i used.

I'm using SMF 1.1.10
Shoutbox version 1.22

Check your permissions.

UD

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

Yabco

Quote from: 01_Underdog on August 14, 2009, 03:35:51 PM
Quote from: Yabco on August 14, 2009, 10:33:00 AM
Hello.

I have 1 big problem with this shoutbox, I can't use it even if i'm logged in. it just display msg that i must be loged in to use shoutbox. It happens on every theme that i use. Before i installed it on my site i tried it localy and it worked fine, on default theme and on other theme that i used.

I'm using SMF 1.1.10
Shoutbox version 1.22

Check your permissions.

UD

i've done that already, just frogot to mention :P

bu default only admin can see shoutbox, like i said in my previous post i can see shoutbox, but i cant use it because it say that im not loged in.

herohenson

can you help me install advance shoutbox to my site? i cant install it, even manually.. thanks pm me

Chen Zhen

Quote from: Yabco
i've done that already, just frogot to mention :P

bu default only admin can see shoutbox, like i said in my previous post i can see shoutbox, but i cant use it because it say that im not loged in.

Navigate to  public_html / yshout / yshout.php

Find and compare the following code:

if(!allowedTo('yshout_view'))
{
if(isGuest())
echo $txt['yshout_no_guests'];
return;
}

// Check guest status and grab guest username


... I included the last line as a reference point in case your code is messed up.
Compare this part of the code to yours and make sure it matches.

Also locate this code from the same file:

find:

// Check user group membership
$user['is_sbmod']=false;
$user['can_sbpost']=false;
if(allowedTo('yshout_moderate'))
$user['is_sbmod']=true;
if(allowedTo('yshout_post'))
$user['can_sbpost']=true;

if($loadedFromSMF)
{
// Initialize the shoutbox and quit
initShoutbox($user,true);
return;
}

// Permission checks
function isGuest($user=false)
{
if($user===false) global $user;
return !$user['is_logged'];
}


Compare the code and make sure it matches as well.

UD


My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

Yabco

#5586
this code matches. i've installed SB using Package Manager so i didn't even unzip it on my pc. What i did was only manual editing of index.template.php for 2nd theme i use. Also i've tried to instal AdvSB and it happens to that one too :P

ExSpirit

Is it possible to make ShoutBox hidden by default? User can show/Hide it but when they first visit website it's open... It's also Shown to guests...

Chen Zhen

#5588
Just to correct myself from a previous post...

For adding the shoutbox to a portal block... Use a php block instead of html.
Just put the same code that is contained in your public_html / Themes / YOUR THEME / BoardIndex.template.php

ie.

Use this code for a regular shoutbox:

      echo '
                     <br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
                     <div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';



Use this code for shoutbox with smileys (after you have added the appropriate modifications and files):

echo '

                   <br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />

<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
';



It also restricts the positioning of the portal to the extreme top, bottom, left or right of your site pages. For right blocks I suggest putting a break after the timestamp.

ExSpirit:
This will also give the option of expand/collapse.
Although, adjusting it to initially appear collapsed is not a regular option for the simple portal - however I am not positive if that is the case for other types of portals.
It can however, be done manually by adjusting the code although I have not experimented in such an endeavor.
I have the shoutbox on my forum page using the javascript upshrink for expand/collapse and a nice 'bg' border around it like the info center and message boards , however it currently expands/collapses the darn info center with it although I have assigned its own variables in the index.template.php file. When I get it working correctly I will let you know. 


UD

//Edit -Fixed: Oops... I had an image from my site in there.

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

Yabco

@UD

i've just finished doing those changes you suggested but it didn't help me, i'm still getting "Sorry, you must be logged in to use the shoutbox!" msg. I can see sb when site is loading but when it fully loads i have the above msg... :/ It doesn't matter if i use this:


      echo '
                     <br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
                     <div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';


or this:

// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code


code. Funny thing is that i have exactly the same setup on my local machine and it works fine. So i think it may be sth wrong with my hosting. Old php version or something like that.

May wrong chmod settings cause thak kind of problems?

rotorsrule

Quote from: nneonneo on March 05, 2007, 09:36:22 PM

1) Disabling BBC: there are two spots in yshout/yshout.php where the code "[list]" (*with quotes*) is found. Add "[img" (no closing bracket) and whatever other tags you want to disable to *each* instance of the replacing code.
It should look a bit like this
str_replace(array("[list]",[*other replaces*],"[right]","[img")"",$newText));
It will disable images, but please do note that some raw BBC will show through (unless you do some more advanced PHP stuff, like adding preg_replace).


Is this gone in 1.22? I cant find this anywhere in the yshout.php file. Is there a new way of blocking bbc code? Sorry if this has been answered, I searched an searched but found nothing...[/list][/list]

magnitude2007

Quote from: Yabco on August 15, 2009, 08:11:25 AM
this code matches. i've installed SB using Package Manager so i didn't even unzip it on my pc. What i did was only manual editing of index.template.php for 2nd theme i use. Also i've tried to instal AdvSB and it happens to that one too :P



when i trying to install AdvSB_1.22 Shout box i always for FTP Information required error...and i dont know how to proced to next step...

I put
FTP Server:     localhost
Port: 21
Username:    hyper
Password:    ****(ftp pass)
Local path to SMF: /usr/export/www/hosting/hyper

But still no luck please help me to sort out this issue

Chen Zhen

Quote from: Yabco on August 15, 2009, 06:21:49 PM
@UD

i've just finished doing those changes you suggested but it didn't help me, i'm still getting "Sorry, you must be logged in to use the shoutbox!" msg. I can see sb when site is loading but when it fully loads i have the above msg...

...Funny thing is that i have exactly the same setup on my local machine and it works fine. So i think it may be sth wrong with my hosting. Old php version or something like that.

May wrong chmod settings cause thak kind of problems?

You said you have it installed on a local machine?
Well... Let's do a little process of elimination here..
Copy the yshout.php file from the local to the one having issues.

Then you can eliminate the possibilty of an error in the code of the permissions check from that file.

I sent you a PM

UD

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

Relemar

How to disable it writing to the history logs? I had about a 20MB text file, cleared and it went from slow to fast. Need this stopping, thanks.

ExSpirit

Quote from: rotorsrule on August 15, 2009, 08:25:35 PM
Quote from: nneonneo on March 05, 2007, 09:36:22 PM

1) Disabling BBC: there are two spots in yshout/yshout.php where the code "[list]" (*with quotes*) is found. Add "[img" (no closing bracket) and whatever other tags you want to disable to *each* instance of the replacing code.
It should look a bit like this
str_replace(array("[list]",[*other replaces*],"[right]","[img")"",$newText));
It will disable images, but please do note that some raw BBC will show through (unless you do some more advanced PHP stuff, like adding preg_replace).


Is this gone in 1.22? I cant find this anywhere in the yshout.php file. Is there a new way of blocking bbc code? Sorry if this has been answered, I searched an searched but found nothing...[/list][/list]
Open Settings.php there you can set which words are auto deleted at $bannedCode...

// An array of strings to delete from the input.
// By default, this includes the list, center, left and right tags.
$bannedCode=Array('[list]','[/list]','[center]','[/center]','[left]','[/left]','[right]','[/right]');



Anyone figured out a way to auto hide the Shoutbox? I am still trying but no luck, looks like I'll have to remove it since it's a bit annoying for those who doesn't want to chat..

Carnaggee

Hello!
I have a problem - I want to switch off bbcode in shoutbox. Is it possible?
If not, is it possible to switch some tags like img, flash?

I try this:
http://www.simplemachines.org/community/index.php?topic=137508.msg1550994#msg1550994

But it seems that it doesn't work.

ExSpirit

Quote from: Carnaggee on August 21, 2009, 02:35:03 PM
Hello!
I have a problem - I want to switch off bbcode in shoutbox. Is it possible?
If not, is it possible to switch some tags like img, flash?

I try this:
http://www.simplemachines.org/community/index.php?topic=137508.msg1550994#msg1550994

But it seems that it doesn't work.
Read post above yours...

Carnaggee

I make sth like this:

// An array of strings to delete from the input.
// By default, this includes the list, center, left and right tags.
$bannedCode=Array('[list]','[/list]','[center]','[/center]','[left]','[/left]','[right]','[/right]','[img]','[/img]','[flash]','[url]');


But the img tag still works :( any ideas?

Maulth

Alright, asking in a support thread is ALWAYS my last resort, but I can't really figure this out, although it's a very simple problem. Well, I actually have two problems, but one is insignificant. My pressing issue is that the buttons (History, Usesounds, commands, etc..) are just plain text, not actual buttons. It looks really sloppy and, for lack of a better word, noobish. I'm nearly 100% sure the error is on my part. I've installed the latest version of ADVShoutbox on my custom theme, AA Damage v2, and have copied in the code that was pointed out earlier in this support thread to my index.template.php file. Is there a simple fix for my lack of buttons, or did I mess up somewhere else entirely? My PHP is rudimentary at best compared to the mod author's, so sorry for my nubbish ways. Also, on a side-note, I couldn't get the scroll bar to work. I put the code correctly in the .js file and in my index.template.php. It's not really that big of a deal, but meh, it's kind of annoying >.< Thanks in advance.

ExSpirit

Quote from: Carnaggee on August 21, 2009, 03:42:32 PM
I make sth like this:

// An array of strings to delete from the input.
// By default, this includes the list, center, left and right tags.
$bannedCode=Array('[list]','[/list]','[center]','[/center]','[left]','[/left]','[right]','[/right]','[img]','[/img]','[flash]','[url]');


But the img tag still works :( any ideas?
Try like this:
$bannedCode=Array('[list]','[/list]','[center]','[/center]','[left]','[/left]','[right]','[/right]','[img','[/img]');


Quote from: Maulth on August 21, 2009, 03:49:43 PM
Alright, asking in a support thread is ALWAYS my last resort, but I can't really figure this out, although it's a very simple problem. Well, I actually have two problems, but one is insignificant. My pressing issue is that the buttons (History, Usesounds, commands, etc..) are just plain text, not actual buttons. It looks really sloppy and, for lack of a better word, noobish. I'm nearly 100% sure the error is on my part. I've installed the latest version of ADVShoutbox on my custom theme, AA Damage v2, and have copied in the code that was pointed out earlier in this support thread to my index.template.php file. Is there a simple fix for my lack of buttons, or did I mess up somewhere else entirely? My PHP is rudimentary at best compared to the mod author's, so sorry for my nubbish ways. Also, on a side-note, I couldn't get the scroll bar to work. I put the code correctly in the .js file and in my index.template.php. It's not really that big of a deal, but meh, it's kind of annoying >.< Thanks in advance.
You have to copy all images which ware placed in your default template directory's image folder to your template image folder...

Advertisement: