News:

Wondering if this will always be free?  See why free is better.

Main Menu

SMF Shoutbox

Started by Deep, March 15, 2006, 08:09:52 AM

Previous topic - Next topic

master2oo8

For everybody who want, that the shoutbox is only to member over xx posts.

open
Quote
BoardIndex.template.php
search
Quote
   global $context, $settings, $options, $txt, $scripturl, $modSettings;
replace with
Quote
   global $context, $settings, $options, $txt, $scripturl, $modSettings, $user_settings;
search
Quote
if (function_exists('sbox')) sbox();
replace with
Quote
  if ($user_settings['posts'] > NUMBEROFPOSTS)
   sbox();

Thanks again to TE

rarach

Just today we have experienced some issues on our forum. While editing some of the codes for our default theme, the theme .php files got messed up and we ended up having to re-install the theme from scratch. Now we need to re-customize everything, including get the shoutbox back up and working.

The shoutbox is installed on our forum, and works on one of the themes that no one uses, but it will not show up on the default layout. I'm not so well versed in coding.. so I do not know what would need to be added and where if that is the case to solve this issue.

All and any advice/help would be greatly appreciated!
Thanks! :)

mickeyb107

can anyone tell me how to change color where member would type message... <Type your message and press enter>...

in one theme its white in another theme its black and hard to see.. how could i change this to stay the color white
<a href="http://ftasatfile.com">FTASATFILE FREE TV YOUR
SOURCE FOR ALL YOUR SATELLITE NEEDS

DarkAngel612

it might be governed by the theme's style.css file

change the hex color there and see if that helps.
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

DarkAngel612

I guess you found out the hard way to work off a duplicate file...I did that myself a few years ago.

the best way is to open the zip file on your computer and find the file that tells you what it modifies.

I know there is the sbox code to insert into boardtemplate.index.php file

of course you could go into admin>packages and uninstall the shoutbox then reinstall it.


Quote from: rarach on October 09, 2008, 02:56:18 PM
Just today we have experienced some issues on our forum. While editing some of the codes for our default theme, the theme .php files got messed up and we ended up having to re-install the theme from scratch. Now we need to re-customize everything, including get the shoutbox back up and working.

The shoutbox is installed on our forum, and works on one of the themes that no one uses, but it will not show up on the default layout. I'm not so well versed in coding.. so I do not know what would need to be added and where if that is the case to solve this issue.

All and any advice/help would be greatly appreciated!
Thanks! :)
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

rarach

I sure did learn the hard way! :/

I'll have to look around more to see what file in the mod says what it modifies.
I tried to uninstall and reinstall, but that did not do a thing. :(
The shoutbox still appears on the dark day layout, but it does not show up on our default layout (helios multicolor)


DarkAngel612

ok "default" to me meant the one smf comes with...the blue one. Now that I know you meant another theme then what you need to do is open the boardtemplate.index.php file in the default theme folder NOT helios.

do a search in the text editor for sbox and you should find the code to make it appear.

copy-paste it into the helios file of the same name and that should make it appear.

or go to the download section hee for the box you downloaded, at the bottom of the page should be the code to place in that file.

the package only gets installed into the basic original default theme you have to manually edit the files of the other themes.


Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

rarach

#1707
alright. i'll work on that. thanks! :D

[edit]

worked like a charm. thanks! ;)

Eva

#1708
Quote from: agridoc on November 03, 2006, 01:13:44 AM
So there is a problem with foreign languages if a non UTF-8 codepage is used.
http://www.simplemachines.org/community/index.php?topic=115579.msg793648#msg793648
Quote from: agridoc on November 02, 2006, 02:21:34 PM
After a quick glance, I believe that the problem for non UTF-8 encoding is this part of code in sboxDB.php

function missinghtmlentities($text) {
  global $context;
  // entitify missing characters, ignore entities already there (Unicode / UTF8) (hopefully in {-notation)
  $split = preg_split('/(&#[\d]+;)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
  $result = '';
  foreach ($split as $s) {
    if (substr($s, 0, 2) != '&#' || substr($s, -1, 1) != ';') {
      // filter out "ANSI_X3.4-1968" charset, which just means plain old ASCII ... replace by UTF-8
      if (strpos($context['character_set'], 'ANSI_') !== false) $charset = 'UTF-8'; else $charset = $context['character_set'];
      $result .= @htmlentities($s, ENT_NOQUOTES, $charset);
    } else {
      $result .= $s;
    }
  }
  return $result;
}


However some more points might need examining.

I see in the topic interest from another Greek and a Turkish about codepage conflict problem of SMF Shoutbox.

I know this is a very old post I'm reviving but can anyone please tell me whether we have found a solution for this?  :-\


If you remove the above mentioned code along with this from the sboxDB.php file
// enquote html and script code to avoid html/javascript injection$content = htmlentities($content, ENT_QUOTES);
the greek characters appear correctly.

But isn't this "fix" jeopardize the security of the Shoutbox and make it vulnerable to possible attacks?  ???

Goodman854

Could you fix the screen shot?

DarkAngel612

yes that is the security feature and taking it out will allow people with nothing but time on their hands to attack
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

Eva

Quote from: DarkAngel612 on October 12, 2008, 01:19:41 AM
yes that is the security feature and taking it out will allow people with nothing but time on their hands to attack

I understand that, but does anyone understand why this code messes up the display of non-english characters?
Is there a way to fix this?

I'm attaching a screenshot

DarkAngel612

only thing i can think of is to make sure you have the languae file you need installed in the theme folders
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

Chopper

Is there a way to alter the width of the shoutbox? It seems to take up the full width of the forum

DarkAngel612

you might try opening the sbox template file and see if it is in there. I know you can but I can't remember where I changed it prior to installing Tiny Portal
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

SpelingMistakes

Quote from: master2oo8 on October 05, 2008, 01:35:48 PM
For everybody who want, that the shoutbox is only to member over xx posts.

open
Quote
BoardIndex.template.php
search
Quote
   global $context, $settings, $options, $txt, $scripturl, $modSettings;
replace with
Quote
   global $context, $settings, $options, $txt, $scripturl, $modSettings, $user_settings;
search
Quote
if (function_exists('sbox')) sbox();
replace with
Quote
  if ($user_settings['posts'] > NUMBEROFPOSTS)
   sbox();

Interesting – I am not a coder, but if I read this careful, I am thinking that this can be also coded for forbid to some special members and groups of users? Am I right?

I need something like that to forbid usage of shoot box for some users – I think I am not only one who needs this

Any suggestion how to change cod to fulfill requests?

Spel
There is a huge difference between living and being alive!

Chopper

Quote from: DarkAngel612 on October 14, 2008, 10:44:51 PM
you might try opening the sbox template file and see if it is in there. I know you can but I can't remember where I changed it prior to installing Tiny Portal

I have no idea where to check in that template?

DarkAngel612

Quote from: Chopper on October 14, 2008, 02:15:22 PM
Is there a way to alter the width of the shoutbox? It seems to take up the full width of the forum

in the sbox.template.php file:

FIND and adjust the width and height where indicated in red.:

<iframe name="sboxframe" src="' . $sourceurl . '/sboxDB.php?" width="100%" height="'.$modSettings['sbox_Height'].'" frameborder="0" style="border: 2px ridge silver;"></iframe>

that is approximately line 93
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

Chopper

Quote from: DarkAngel612 on October 17, 2008, 08:00:59 PM
Quote from: Chopper on October 14, 2008, 02:15:22 PM
Is there a way to alter the width of the shoutbox? It seems to take up the full width of the forum

in the sbox.template.php file:

FIND and adjust the width and height where indicated in red.:

<iframe name="sboxframe" src="' . $sourceurl . '/sboxDB.php?" width="100%" height="'.$modSettings['sbox_Height'].'" frameborder="0" style="border: 2px ridge silver;"></iframe>

that is approximately line 93

Thank you this is exactly what i was looking for.

One more question if i may, now that the shoutbox width is reduced and leaving a gap to the left hand side. Is it possible to create a list of the members who are currently using the shoutbox?

DarkAngel612

so you want it to look like a chat box with the users to the side area...lol

that I am afraid someone else will need to address since I am still a very new novice at php...sorry
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

Advertisement: