Welcome, Guest. Please login or register.

ShoutBox!

Scrubmeister

2024-04-19, 10:32:40
Good to see the site back faster than ever. :)
 

Skhilled

2024-04-18, 21:09:09
I've upgraded the server...more resources. ;)
 

Ken

2024-04-18, 20:57:10
Now that you mention it...  :D
 

Skhilled

2024-04-18, 20:47:19
...and, you should notice that the site is much faster.  :o
 

Ken

2024-04-18, 20:31:37
Hey Steve.
 

Skhilled

2024-04-18, 17:56:10
Re-read the message below...
 

Skhilled

2024-03-31, 15:22:06
Oh yeah, you need to upgrade the site first...
 

Ken

2024-03-30, 09:54:54
Whoops! I forgot that the SMF install here on OFF is out of date!  :'(
 

Ken

2024-03-30, 09:44:48
 Conga-Rats Steve!  :thumbup:
Me gonna install it here just for the fun of it!  :)
 

Skhilled

2024-03-29, 22:15:23
Released!  :D

Recent Topics

TP Articles


Search in titles
Search in article texts

Author Topic: nneonneo:yshoutforsmf- Shoutbox for the Arcade.  (Read 10859 times)

0 Members and 1 Guest are viewing this topic.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« on: August 19, 2010, 05:02:40 PM »
This new "nneonneo:yshoutforsmf" shoutbox that we're using in the Arcade seems to work very well.  :bigthumb:

The first one we tried, "SMFPacks Shoutbox", was nice and I wanted to keep it but it was causing game save errors and after some work and input from Underdog it was decided that we should dump that first one and use the nneonneo shoutbox instead.

Much thanks to Underdog for doing the edits so that it would work correctly in the Arcade main page, but not while in game play. This was a very important part of the function so that it would not mess up scoring the way the SMFPacks sb was doing... as mentioned I liked it and UD worked on the code for it trying to get it to work, but no joy on that.

If you notice any issues with this new 'Arcade Chat' be sure to post the details.



One thing I'm currently working on is the layout... I'll wanting it to have a scroll function so that when you view it you could hit the scroll bar and view the past 24 or 36 shouts. (the default is "$maxLines=12;")
The maxlines setting is simple enough to change of course, but I need the code for the scroll bar function.  :wave:
Code: [Select]
<?php
/*************************************
 * Main Shoutbox Settings            *
 * Does not include CSS (appearance) *
 *************************************/
global $maxLines,$chatsDir,$chatFormat,$historyFormat,$gzipCompression;
global 
$reverseShouts,$shoutFormOnTop,$autoGuestName,$allowCommands,$guestCommands;
global 
$updateTimeout,$updatePeriod,$bannedCommands,$bannedCode;
global 
$maxShoutChars,$maxUsernameChars;

// Set the maximum amount of lines to be displayed at a time
// After changing this, /clear the shoutbox to make the change
// take effect.
$maxLines=12;

// Logging folder for the chats
$chatsDir='chats';

// Chat file format - %s means the chat file as given by the client
$chatFormat='%s.txt';

// History format - set to '' to disable archiving.
$historyFormat='history.%s.txt';

// Should we use GZip compression? If bandwidth usage is a concern,
// set this to true. GZip compression does NOT apply to shoutbox refreshes,
// only to initialization and shout events.
$gzipCompression=false;

// The shoutbox usually shows shouts with the newest chats at the bottom.
// If you want the newest ones at the top, set this to true.
$reverseShouts=false;

// If you reverse the shouts, you might want the shout form to be on top
// rather than on the bottom. Set this to true to move the shout form
// to the top (the tool links will stay above the form)
$shoutFormOnTop=false;

// 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;

// How long should the script wait for the chats to update? (in seconds)
// If this is set to 0 the script will not wait at all,
// but this will be very detrimental to performance.
// Make sure this is less than the maximum script execution time
// on your server, or the shoutbox will never update.
$updateTimeout=20;

// The chats file is periodically checked for changes up to $updateTimeout seconds.
// This variable, $updatePeriod, defines the time between those checks in milliseconds.
// Lower means a more responsive shoutbox (slightly more real-time), while higher
// means less strain on the system.
// 500 milliseconds is the default.
$updatePeriod=500;

// An array of commands to block.
// Example: $bannedCommands=Array('/impersonate');
// Note that since SMF recognizes /me by default, it can't be blocked.
$bannedCommands=Array();

// 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]');

// How many characters will be permitted in each shout.
$maxShoutChars=255;

// How many characters will be permitted in the username.
// This does not apply to SMF registered usernames.
$maxUsernameChars=25;

// Function to customize the timestamp.
// Default formatting: [(SMF user profile timestamp)]
function preg_timeformat($matches)
{
// format: <timeval=(value)>
// return ''; // to disable the timestamp
return '['.timeformat(intval($matches[1])).']';
}
?>
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Underdog

Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #1 on: August 19, 2010, 06:45:35 PM »

The history button isn't good enough?


Controlling how the scroll works is the overflow style setting for the body of the block itself.
SP allows me complete control over that by supplying a text box for style settings of both tab titles and body.

I'd have to play around with your TP to see if it lets you input that in its settings..

.. if not I could wrap the whole thing in a div and add some style overflow to see if it works.

... you are trying to eliminate the scroll bar if the max lines are increased, correct?

 

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #2 on: August 19, 2010, 07:15:53 PM »
Maybe I need to be satisfied with with a balance between how many shouts are going to show and the size of the shoutbox block. Currently it's set at 16 and that seems to be OK, any more than that and the block starts being too tall. And, as you say there is the history button available.


Quote
... you are trying to eliminate the scroll bar if the max lines are increased, correct?
Actually, trying to get it to throw a scroll bar instead of having the block continue to grow taller with an increase of the $maxLines.
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Underdog

Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #3 on: August 19, 2010, 09:14:33 PM »
Property values ref.
http://www.w3schools.com/css/pr_pos_overflow.asp


This is your syntax to use:
Code: [Select]
echo '<div style="overflow:scroll;width:100%;height:200px;">';

/* Your content  */

echo '</div>';

I set your block up like this already.. but if you want to operate it with the scroll you will have to set it all in reverse.

Navigate to: yshout / Settings.php

Find:
Code: [Select]
// The shoutbox usually shows shouts with the newest chats at the bottom.
// If you want the newest ones at the top, set this to true.
$reverseShouts=false;

// If you reverse the shouts, you might want the shout form to be on top
// rather than on the bottom. Set this to true to move the shout form
// to the top (the tool links will stay above the form)
$shoutFormOnTop=false;

Replace with:
Code: [Select]
// This shoutbox is preset to show shouts with the newest chats at the top.
// If you want the newest ones at the bottom, set this to false.
$reverseShouts=true;

// If you reverse the shouts, you might want the shout form to be on the bottom
// rather than on the top. Set this to false to move the shout form
// to the bottom (the tool links will stay above the form)
$shoutFormOnTop=true;


« Last Edit: August 19, 2010, 09:28:00 PM by Underdog »

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #4 on: August 19, 2010, 10:15:20 PM »
That works.  :bigthumb:

Looking at the code now to see if the Smiles can be moved to the top as well.
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #5 on: August 19, 2010, 10:21:12 PM »
The Smiles code is in the TP block right? I'm looking at it but not seeing how to move the Smiles to the top.
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Skhilled

  • Administrator
  • *
  • Posts: 9006
  • Gender: Male
  • All of my passwords are protected by amnesia...
  • View Gallery
    • Buildz Hosting
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #6 on: August 20, 2010, 07:27:49 AM »
This works very well!

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #7 on: August 20, 2010, 08:14:27 AM »
This works very well!

That it dose.

UD has put in a lot of time working with the code for this shoutbox as well as other parts and pieces that effect how the Arcade preforms. He also put in some time on the SMFPacks sb trying to get it to work, but it just interfered too much with the arcade operations... mainly scoring.

At first I was liking the SMFPacks version better, but this nneonneo sb is growing on me.  :disted:
The main thing is that it works correctly and is not messing up the operation of the arcade scoring system... Thanks to UD.  :bigthumb:
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #8 on: August 20, 2010, 10:23:58 AM »
@Underdog:
In the Arcade Chat you mentioned the sitemap and that it may have some issues, so I've turned it off... actually it's not in use anyway, the 'sitemap' that is linked is an article(TP) as seen at the link below. I had stopped using the sitemap package because it was not displaying the links that I wanted. It was not un-installed because it was throwing file errors as seen in the attached image, but if you think that it has to be uninstalled I'll go ahead and do a manual uninstall?

http://www.ourfamilyforum.org/FamilyForum/index.php?page=111

"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Underdog

Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #9 on: August 20, 2010, 11:54:00 AM »

IMAO - If you are not using it then get rid of it.

Yes - do the necessary manual parsing.
 If you are not comfortable doing manual edits I could do them but then I will need FTP access (temporary account if preferred).
   

Offline Underdog

Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #10 on: August 20, 2010, 12:01:17 PM »

On second thought, FTP access is unnecessary..

Just attach:

Sources / Admin.php
Sources / ManageSettings.php
Themes / default / languages / Modifications.english.php

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #11 on: August 20, 2010, 12:45:21 PM »
Here they are:
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Underdog

Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #12 on: August 20, 2010, 07:09:28 PM »
attached...

the language file doesn't have a proper edit. don't bother.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #13 on: August 20, 2010, 07:23:45 PM »
attached...

the language file doesn't have a proper edit. don't bother.


OK, done.  :bigthumb:
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Underdog

Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #14 on: August 20, 2010, 08:03:54 PM »

you'll have to remove that sitemap buttons from your themes.  I only edited 3 of them - as you added buttons in the Admin / Current Theme settings.

you have some page errors (not smf errors) that might cause a problem only because there are so many.
this might be why that constellation game crashed the site when saving scores.
I use html tidy firefox add-on which is actually quite a mild filter (as I've been informed) but it cleans it up a bit.
Perhaps you should download it from the firefox site and check it out yourself.


It's difficult to find the errors because on top of edits to files you have many mods that have input boxes that add content for display.


Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #15 on: August 20, 2010, 08:09:54 PM »
OK, thanks UD.
I'll take a look at all of the themes and try to clean them up.
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #16 on: September 10, 2010, 03:22:14 PM »
@UD... posting to this topic because I just noticed something in the yshout/settings.php file.

In my ftp screen the file name shows as settings.php, but when a copy is downloaded into Notepad++ the name reads as settings 2.php. yes, there is a space before the 2.

Here's a copy of the file.


EDIT: Just checked the FF files and it's the same, the files on both sites have that name; settings 2.php
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Underdog

Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #17 on: September 10, 2010, 05:26:02 PM »
@UD... posting to this topic because I just noticed something in the yshout/settings.php file.

In my ftp screen the file name shows as settings.php, but when a copy is downloaded into Notepad++ the name reads as settings 2.php. yes, there is a space before the 2.

Here's a copy of the file.


EDIT: Just checked the FF files and it's the same, the files on both sites have that name; settings 2.php


has to be settings.php

rename it

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #18 on: September 10, 2010, 05:37:13 PM »
It's OK, turns out it was my Notepad++, even though there was not a second copy of the file open it for some reason was treating the files as copies of already open files.
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #19 on: September 10, 2010, 08:18:57 PM »
OK, the latest Subs.php was uploaded and seems to be OK, but there is an error for the button:
Quote
http://www.ourfamilyforum.org/FamilyForum/index.php?action=arcade
8: Undefined index: yshout_shout_button
File: /home/kenkayjm/public_html/FamilyForum/yshout/yshout.php
Line: 304

I think your idea for loading everything to a testsite and working out the bugs sounds like a very good way to go. I'm not going to be able to do all of that until late tomorrow, but will start to do just that this evening to the SMF2 testsite. http://www.ourfamilyforum.org/SMF2.0/index.php

One nice side effect of this latest Subs.php file is that it gets rid of the message count indicator that was cluttering up the top links bar.  :bigthumb:
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Skhilled

  • Administrator
  • *
  • Posts: 9006
  • Gender: Male
  • All of my passwords are protected by amnesia...
  • View Gallery
    • Buildz Hosting
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #20 on: September 11, 2010, 06:34:19 AM »
It's OK, turns out it was my Notepad++, even though there was not a second copy of the file open it for some reason was treating the files as copies of already open files.

If you open a file a 2nd time (2nd instance) it will treat it as a copy. This also goes for files that are opened via ftp. If you open a file on your hd it should not do that unless you open more than one instance of it.

Offline Underdog

Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #21 on: September 12, 2010, 12:31:46 AM »

You will have to edit that settings.php file again for the shouts and input to display on the top.
I uninstalled and installed it again trying to get it to work.


This works good on my test forum (and mine btw) but I'm currently stumped as to what is causing the shout history and shout button to be messed up here.


 


Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11674
  • Gender: Male
  • View Gallery
Re: nneonneo:yshoutforsmf- Shoutbox for the Arcade.
« Reply #22 on: September 12, 2010, 12:36:28 AM »
OK.
As mentioned before, my desktop is unavailable so it will be tomorrow before the edits can be made.
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.