Welcome, Guest. Please login or register.

ShoutBox!

 

Skhilled

2024-08-09, 18:19:29
Awww! Poor thing! LOL
 

Ken

2024-08-09, 09:20:52
 

Skhilled

2024-07-06, 10:33:18
 :D
 

Ken

2024-07-06, 06:40:47
Happy Saturday after the 4th of July!
 :fireworks:
 

Skhilled

2024-07-04, 20:27:02
Happy Day Off From Work!  :D
 

Ken

2024-06-25, 06:23:12
84... who knew?  laughing7
...2013 was my *magic* year
 

Skhilled

2024-06-14, 22:09:12
I hope so! LOL
 

Ken

2024-06-14, 21:41:30
My B-Day is forthcoming and maybe it will be far enough along so that I can be a regular Dancing Fool for that day!!! :banana: :2funny:
 

Ken

2024-06-14, 21:38:38
Happy Friday everyone! I'm  SOOO glad to see Friday and not just because it's the weekend, but because it marks one more day in the recovery of my foot!  laughing7

Scrubmeister

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

Recent Topics

TP Articles


Search in titles
Search in article texts

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

0 Members and 1 Guest are viewing this topic.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11942
  • 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: 11942
  • 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: 11942
  • 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: 11942
  • 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: 9424
  • 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: 11942
  • 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: 11942
  • 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: 11942
  • 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: 11942
  • 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.