Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: nneonneo on December 26, 2006, 06:58:11 PM

Title: nneonneo's Shoutbox
Post by: nneonneo on December 26, 2006, 06:58:11 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=585)

This shoutbox is based on the excellent work of Yuri Vishnevsky. It is an AJAX-powered shoutbox, making minimal adjustments to the forum software to avoid conflicts with existing mods.

The shoutbox needs no refreshing; just a modern AJAX-compatible web browser for the client. The script has been reworked for efficiency and minimal bandwidth use.

Questions and concerns may be directed to nneonneo {at} gmail {period} com or posted to the discussion thread (http://www.simplemachines.org/community/index.php?topic=137508) for this mod.

Screenshot: (administrator's view) - 1.03 version shown
(http://img150.imageshack.us/img150/5569/shoutboxsb9.png) (http://img238.imageshack.us/img238/2218/picture1mn4.png)

This mod has been tested with SMF 1.1.7 and SMF 2.0 Beta 4, and with Opera (9.0+), Safari (2.0+), Firefox (2.0+), Camino (1+), Internet Explorer (6+) and Konqueror (3+).

Table of Contents
Advanced Shoutbox (#post_advsb)
Live Demos (#post_demo)
Translations (#post_translations)
Editable Options (#post_options)
Installation to Other Themes (#post_otherthemes)
Tips and Customizations (#post_tips)
Troubleshooting (#post_troubleshooting)
Changelog (#post_changelog)
Upgrading to the Latest Version (#post_upgrading)

Advanced Shoutbox
SunKing and MrMoney, from the community forums, helped incorporate many of the more popular customizations into a modified shoutbox package, dubbed the "Advanced AJAX Shoutbox". It can be downloaded from this mod page as the AdvSB_ series of packages. The package includes the basic shoutbox, icons for the History, Commands etc. links, the sound mod, two-line display and other miscellaneous customizations.


Live Demos
Live Demo available at http://nneonneo.net46.net/smf/ for SMF 1.1.5 (and TinyPortal) and http://nneonneo.net46.net/smf2/ for the Advanced Shoutbox running in SMF 2.0. You do not need to have an account to test the shoutbox.


Translations
All translations are posted here (http://www.simplemachines.org/community/index.php?topic=137508.msg876847#post_attachments).
Note: Translations from 1.11 onwards should work fine with 1.16, and translations for 1.20 onwards work with 1.22.
Translations from 1.16 and before are not complete for 1.2x, as a few more strings were added in 1.20.

1.01-1.16 translations (updates for 1.20 welcome)

1.20+ translations (also work for 1.16 and below)

Thanks to everyone for making translations! If you'd like to make a translation, PM me (nneonneo) on the community forums.


Editable Options
in yshout/settings.php and yshout/settings.js: read the comments
in index.template.php:
Permissions for the shoutbox: in the admin panel, under Membergroups->Permissions.
More information available in the official thread (http://www.simplemachines.org/community/index.php?topic=137508).


Installation to Other Themes
In the theme's "index.template.php" file:
find
// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';

After that, add

// YSHOUT HERE - <head> code
global $boardurl,$shoutFile;
$shoutFile='home';
$scripturlparsed = parse_url($scripturl);
$scriptpath=isset($scripturlparsed['path'])?$scripturlparsed['path']:'/';
$args='';
foreach($_GET as $key => $value) // passthrough $_GET
$args.='&'.urlencode($key).'='.urlencode($value);
echo '
<script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script>
<script type="text/javascript"><!-- // --><![CDATA[
window.onload=function(){loadChat();};
var shoutFile="',$shoutFile,'";
var yshout_php="',$scriptpath,'?yshout',$args,'";
// ]]></script>
<script src="',$boardurl,'/yshout/js/yshout.js?July062008" type="text/javascript"></script>
<style type="text/css">
#yshout {
font-size: 10px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts { /* main shouts area */
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 6pt;
color: #141414;
}
#yshout #shout-form {
margin: 0;
padding: 0;
}
#yshout #shout-form fieldset {
border: none;
}
#yshout #forum-name {
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code


Second, find the desired location of the shoutbox and place at that location (in the index.template.php file!) *one* of the two blocks below:

For an "instant-on" shoutbox which loads with the page:
// 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


For the original 1.16 behaviour (shoutbox loads after the page has fully loaded):
// YSHOUT HERE - shoutbox code
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>';
// YSHOUT END - shoutbox code



Tips and Customizations
Putting the shoutbox on a separate page: Copy yshout/index.php to the desired location and modify $boardurl per the instructions in the file. Note that just visiting /forum/yshout/ will get you a simple forum-less shoutbox.

Installing to TinyPortal: Follow the instructions for the "<head> code" block under Installation to Other Themes (#post_otherthemes), then add either of the "shoutbox code" blocks to a new TinyPortal center phpbox.

Adding a smileys bar:
see http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091 (thank you pongsak!)

Adding a clicking sound to new/incoming posts: see http://www.simplemachines.org/community/index.php?topic=137508.msg1208212#msg1208212 for how to do this using SoundManager2.
http://www.simplemachines.org/community/index.php?topic=137508.msg1652792#msg1652792 for the user option for muting the sound.

Showing a scrollbar: see http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028

Installation to the news header: see http://www.simplemachines.org/community/index.php?topic=137508.msg1534963#msg1534963

Changing the timestamp: see http://www.simplemachines.org/community/index.php?topic=137508.msg1630065#msg1630065

Notifying users of new topics and replies in the forum: see http://www.simplemachines.org/community/index.php?topic=137508.msg1817042#msg1817042

Troubleshooting
No text? If you aren't using English on your board, you will need to add the following code to Themes/default/languages/Modifications.<language>.php, right above the final "?>" in the file (you're welcome to translate and localize this text; if you do so, you can PM me with the translation and I will post it with credit to you):
// ---- Begin modification - nneonneo's Shoutbox ----
$txt['yshout_shoutbox'] = 'Shout Box';
$txt['yshout_loading'] = '...loading shoutbox...';
$txt['yshout_rp_banned'] = "Sorry, you've been banned from the shoutbox.";
$txt['yshout_no_guests'] = 'Sorry, you must be logged in to use the shoutbox!';
$txt['yshout_ban_conf'] = 'Ban Confirmation';
$txt['yshout_select_mode'] = 'Select Ban Mode:';
$txt['yshout_rp'] = 'Reading and Posting';
$txt['yshout_p'] = 'Posting only';
$txt['yshout_error'] = 'ERROR: ';
$txt['yshout_no_user'] = 'User not found.';
$txt['yshout_del_success'] = 'Shout deleted.';
$txt['yshout_no_action'] = 'Nothing to do.';
$txt['yshout_history'] = 'History';
$txt['yshout_commands'] = 'Commands';
$txt['yshout_exthistory'] = 'ExtendedHistory';
$txt['yshout_hide'] = 'Hide';
$txt['yshout_show'] = 'Show';
$txt['yshout_admlinks'] = 'AdminLinks';
$txt['yshout_return'] = 'ReturnToShoutbox';
$txt['yshout_p_banned'] = 'You are banned from posting.';
$txt['yshout_banned'] = 'Banned';
$txt['yshout_shout_button'] = 'Shout!';
$txt['yshout_banlist_caption'] = 'Shout Box Bans (click to unban)';
$txt['yshout_ip_bans'] = 'IP Bans for ';
$txt['yshout_username_bans'] = 'Username Bans for ';
$txt['yshout_ban_type_error'] = 'use /banuser or /banip!';
$txt['yshout_ban_mode_error'] = 'Must have mode argument.';
$txt['yshout_imp_slash_error'] = 'Prefix shout with "/" (slash character)! See "/help impersonate" for details.';
$txt['yshout_imp_uname_error'] = 'No username given!';
$txt['yshout_imp_max4_error'] = 'Maximum 4 arguments!';
$txt['yshout_cmd_reference'] = 'Command Reference';
$txt['yshout_cmdlist'] = array(
'/help' => ' [command]: Help on a command, or all if no command is specified.',
'/return' => ': Go back to the Shout Box.',
'/pi' => ' [digits]: What is the value of pi to the nth digit?',
'/me' => ' &lt;message&gt;: Emotes the message (e.g. <span class="meaction"> * Nathaniel likes dogs</span>)');
$txt['yshout_cmdlistadmin'] = array(
'/clear' => ': Completely empty the Shout Box.',
'/help' => ' [command]: Help on a command, or all if no command is specified.',
'/return' => ': Go back to the Shout Box.',
'/banlist' => ': List all bans currently in place. Unban the users by clicking on their names.',
'/banuser' => ' &lt;mode&gt; &lt;username&gt;: Ban a user by name. You should use the user\'s real username, otherwise the ban can be evaded. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/banip' => ' &lt;mode&gt; &lt;IP&gt;: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' &lt;user&gt; [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote><div>
&lt;user&gt;: Username to use<br />
[userlevel]: User Level to use. 0=normal, 1=mod, 2=admin<br />
[ip]: IP address to use, as 1.2.3.4<br />
[userid]: User ID from forum, to fix profile link</div></blockquote>',
'/lock' => ' &lt;message&gt;: Lock the shoutbox for maintenance with the specified message.',
'/unlock' => ': Release the shoutbox from maintenance.');
$txt['yshout_maintenance'] = 'Locked';
$txt['yshout_lock_arg_error'] = 'You need to specify a reason for maintenance!';
$txt['yshout_lock_changed'] = 'Changed maintenance reason to "%s".';
$txt['yshout_lock_success'] = 'Locked shoutbox for maintenance with reason "%s".';
$txt['yshout_unlock_already'] = 'Failed to unlock: shoutbox isn\'t locked!';
$txt['yshout_unlock_success'] = 'Successfully unlocked shoutbox.';
$txt['yshout_no_posting'] = 'Sorry, you cannot post to the shoutbox.';
$txt['yshout_smilies'] = "Smilies";
// Permissions
$txt['permissiongroup_yshout'] = 'Shoutbox';
$txt['permissionname_yshout_view'] = 'View shoutbox';
$txt['permissionname_yshout_post'] = 'Post in shoutbox';
$txt['permissionname_yshout_moderate'] = 'Moderate shoutbox';
$txt['permissionhelp_yshout_view'] = 'This permission allows access to the shoutbox. If it is enabled, users will see the shoutbox and the chats in it.';
$txt['permissionhelp_yshout_post'] = 'This permission allows users to post messages to the shoutbox. If it is disabled, users cannot enter any messages.';
$txt['permissionhelp_yshout_moderate'] = 'If this permission is set, users will be allowed to moderate the shoutbox -- deleting, banning and clearing among other features.';
$txt['permissiongroup_simple_yshout'] = 'Shoutbox';
// ---- End modification - nneonneo's Shoutbox ----

above the final "?>" in your version of Themes/default/languages/Modifications.XXXX.php (where XXXX represents your localization/language)

PortaMx warnings in shoutbox: If warnings like this:
Notice: Undefined index: forum in /home/.../public_html/smf/Sources/Subs.php on line 3936
Notice: Undefined index: PortaMx in /home/.../public_html/smf/Sources/Subs.php on line 3938
Notice: Undefined index: pmx_settings in /home/.../public_html/smf/Sources/Subs.php on line 4000
Notice: Undefined index: pmx_blocks in /home/.../public_html/smf/Sources/Subs.php on line 4005
Notice: Undefined index: PortaMx in /home/.../public_html/smf/Sources/Subs.php on line 4207

are showing up in the shoutbox, see http://www.simplemachines.org/community/index.php?topic=137508.msg1829501#msg1829501 for a fix.

High bandwidth use for large forums: This shoutbox was never designed for very large forums. The limitations of PHP make it difficult, if not impossible to implement real ("live") chatting features without being resource-heavy.

That said, there is something you can do about it. The shoutbox can be made less taxing, at the cost of less interactivity.

The basic procedure is to set refreshTime in yshout/settings.js to something higher, like 20000 (milliseconds). After that, reduce $updateTimeout in yshout/settings.php to 10 seconds or less (0 will make the shoutbox behave like an autorefreshing shoutbox (with a delay controlled by refreshTime), rather than a shoutbox that updates automatically on new shouts).

You might also want to try enabling compression in the settings file: change $gzipCompression to true.

Changelog
Changes in 1.03 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg878711#msg878711):
Fixed incompatibility with PHP <= 4. This package can be upgraded directly over the previous version (1.02).

Changes in 1.04 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg882061#msg882061):
Fixed timezone issues (all times formatted according to user data with timeformat). Times shown will be according to user and forum time offsets.

Changes in 1.05 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg884599#msg884599):
Added a "del" option to shouts for administrators/moderators to allow for the deletion of shouts.
Added "$gzipCompression" option; this defaults to true but can be set to false if you experience issues.
Increased the security of a few functions as a precaution.
Fixed some bugs related to not using "home.txt" as the chat file. Now, it is possible to use a different file for each theme, or, if you're intrepid, a different file for different boards/users/etc. See index.template.php and search for "shoutFile".

Changes in 1.06 [description] (http://www.simplemachines.org/community/index.php?topic=137508.msg990248#msg990248) [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg990857#msg990857):
Guest support added by popular request.
Character encodings bug fixed.
Word filtering added (filters according to SMF settings)
1.1.2 support added and tested
New options to limit chat command usage (e.g. blocking commands or entirely disabling them; see yshout.php options)
Internationalization support added: default language is English (though translations are certainly welcome)
Added support for search-engine friendly pages.

Changes in 1.07 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1143912#msg1143912):
Fixed long standing smileys issue.
Fixed minor bug with line counting (off-by-one)
Added CSS class "adminlink" to allow for customization of the administrative links.
1.1.3 support added.

Changes in 1.08 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1170987#msg1170987):
Major bugfix and enhancement to auto-refreshing; the shoutbox should now be suitable for big forums as well as small. The basic gist of the upgrade is at http://www.simplemachines.org/community/index.php?topic=137508.msg996154;topicseen#msg996154 (thank you very much Sarke) coupled with a few minor changes that make the "push" shoutbox work :)

Changes in 1.09 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1211940#msg1211940):
Addition of "$maxShoutChars" and "$maxUsernameChars" parameters for controlling shout and username lengths respectively; note that the username limit does NOT apply to registered users.
Addition of a maintenance/lock mode, activated by the /lock command and deactivated by /unlock, which makes the shoutbox read-only for everyone except admins & mods.

Changes in 1.10 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1254803#msg1254803):
Compatibility with SMF 1.1.4.

Changes in 1.11 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1286944#msg1286944):
Option to prevent guests from posting added. If allowGuests is true, they can still see the shoutbox, and if the new allowGuestsPosts is false, then they will be barred from posting.
The bug for pressing "Cancel" on the Extended History dialog is fixed (it now appropriately cancels, rather than redirecting to an empty history page) - thanks to pongsak for discovering this.
Users who have multiple domains or use both "www." and no-www versions of their domain names can now do so without having the shoutbox fail. The shoutbox now uses absolute paths from the server root, instead of including a domain name.

Changes in 1.12 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1422347#msg1422347):
Added the option to set certain membergroups as moderators of the shoutbox.
Made the shoutbox use usergroup colors by default
One more fix for stubborn "...loading shoutbox..." problems. I've tested this on a number of configurations, and I think it should work for everyone properly now.
Fix to prevent long page loads on IE 7. Basically, on any page load request, the shoutbox aborts the current connection, using an IE-7 specific detection of that. It's a serious kludge, but it does resolve the lag on IE 7.

Changes in 1.13 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1444735#msg1444735):
Removed yshout/js/prototype.js and replaced it with a much smaller file containing only the necessary components. The old prototype.js caused problems with SMF's stats page.
Moved CSS out of index.template.php and yshout.php into their own files, Themes/default/yshout-style.css and yshout/yshout-style.css respectively. This makes upgrading, installation and uninstallation much easier. Other themes don't need to be updated.

Changes in 1.14 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1503486#msg1503486):
Fixed a refresh bug that could cause many requests to be sent to the server.
Merged SMF1 and SMF2 versions together. One package now works for both versions of SMF.

Changes in 1.14b [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1506291#msg1506291):
Fixed non-ASCII character support (regression in 1.14). Thanks to dannbass for spotting it.

Changes in 1.15 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1532025#msg1532025):
Compatibility with SMF 1.15 and 2.0b3.1.
Proper support for SMF 2: fixed membergroup detection and user banning.
Installation to SMF2 via the Package Manager should work again.

Changes in 1.16 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1571111#msg1571111):
Fixed storage of foreign usernames in shoutbox
Fixed postgroup bug that could cause shoutbox to fail to load

Changes in 1.20 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1593523#msg1593523):
Instant-on capability for quick loading
Security fixes
Guest name url-encoding bug fixed
Settings and documentation moved to a separate files
Permissions implemented as SMF membergroup permissions
Full XHTML-compliance
Additional functions to make modifying the shoutbox easier
Additional CSS classes for more customizability
Changed /yshout/ to act as a standalone shoutbox
Hooked index.php to fix the majority of "loading shoutbox" problems with previous versions
Added a warning for missing language files to alleviate problems with foreign boards
Many miscellaneous fixes

Changes in 1.17 (last planned release of 1.1x) [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1652953#msg1652953):
Security fix

Changes in 1.21 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1652953#msg1652953):
Removed dependencies on the Behaviour, Prototype and domFunction libraries.
Fixed a few bugs in form submission and flood control.
Fixed a bug that broke Whos Online (reported by bocco83).
Fixed security bug
Added postgroup colors

Changes in 1.22 [announcement] (http://www.simplemachines.org/community/index.php?topic=137508.msg1817205#msg1817205):
Proper SMF 2.0 Beta 4 compatibility
$gzipCompression now defaults to off, to avoid common issues with forums
Shoutbox no longer restarts session if forced to refresh

Upgrading to the Latest Version
1.2x versions are not backwards-compatible with 1.1x or 1.0x shoutbox versions. Previous versions should be uninstalled prior to installing 1.22.

1.22 includes an updater from 1.21 which you can use to update without having to uninstall.

Title: Re: nneonneo's Shoutbox
Post by: RoarinRow on December 26, 2006, 07:26:53 PM
Do you have a demo of this mod?   :)
Title: Re: nneonneo's Shoutbox
Post by: L.G.S on December 26, 2006, 08:00:56 PM
Does this mod have permissions?

Installed:

Fatal error: Call to undefined function: date_default_timezone_set() in /home/tscar/public_html/board/yshout/yshout.php on line 154
Title: Re: nneonneo's Shoutbox
Post by: IPForums on December 26, 2006, 08:46:49 PM
i get the same: -

Fatal error: Call to undefined function: date_default_timezone_set() in /hsphere/local/home/iptorren/ipforums.org/forum/yshout/yshout.php on line 154
Title: Re: nneonneo's Shoutbox
Post by: boolprop_net on December 26, 2006, 11:28:46 PM
Ditto.
Title: Re: nneonneo's Shoutbox
Post by: Daniel15 on December 26, 2006, 11:37:00 PM
This will only work on PHP 5.1.0 or higher, as it's using  date_default_timezone_set (A PHP 5 function) :(
Title: Re: nneonneo's Shoutbox
Post by: boolprop_net on December 26, 2006, 11:40:48 PM
Can the date part be edited to work for 4.4.4  ???
Title: Re: nneonneo's Shoutbox
Post by: L.G.S on December 27, 2006, 06:26:35 AM
Could have said, really.
Title: Re: nneonneo's Shoutbox
Post by: Daniel15 on December 27, 2006, 06:39:50 AM
I didn't actually check the code, I just recognised the error. I'll look through it later and see if it can be modified to support PHP 4 :)
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 27, 2006, 11:57:09 AM
installed and uninstalled for me just fine

but the position of the shoutbox is a bit awkward in my opinion
Title: Re: nneonneo's Shoutbox
Post by: tapirul on December 27, 2006, 01:43:18 PM
screenshots?
Title: Re: nneonneo's Shoutbox
Post by: sleepy127 on December 27, 2006, 03:00:29 PM
I have the same problem also
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 27, 2006, 03:01:51 PM
if ur host isnt offering the latest software then its time to say ba-bye to them
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 27, 2006, 05:22:26 PM
OK, quick fix:
Change the line
date_default_timezone_set('America/Regina');

to
if(function_exists('date_default_timezone_set')) date_default_timezone_set('America/Regina');


I'll hopefully have a new version uploaded in the next few days. In the interim, please use that fix.

As for positioning, if you do not like the location where it is installed by default (in the header of the default template), you can move it easily.
There are three code blocks (marked with "// YSHOUT HERE" in the PHP source code, and ended with "// YSHOUT END") which are relevant: the first is a <head> block, containing both a JS include/setup section and a CSS section for the appearance, the second is a JS block to handle a collapsed header, and the third is the block for the position of the shoutbox.
The file "Themes/default/index.template.php" is modified. If you prefer the shoutbox elsewhere, simply move the aforementioned three blocks to a new file (or move the third block to a new location within the index).

Note that the second (JS) block may not apply to other files, because it is strictly for positioning the shoutbox in the header. If you do not place the shoutbox there, this block can be omitted.

Thanks for testing!
Title: Re: nneonneo's Shoutbox
Post by: Geoff Mendicino on December 27, 2006, 06:14:19 PM
It works absolutely wonderful. I have 0 complaints about your mod after doing the fix you mentioned above. Thanks for supporting the community. *thumbs up*

If you are interested, my site has it up at:
http://pangya-hq.com/forum

I look forward towards your next release!
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 27, 2006, 06:45:54 PM
New version (1.03) uploaded.

For 1.02 users, simply download and install the new one (it's an upgrade), this should hopefully ensure that it works with PHP 4 and below.

Changes:
Added function check for date_default_timezone_set
Fixed minor typo in installation (doesn't affect existing installations)
Title: Re: nneonneo's Shoutbox
Post by: Geoff Mendicino on December 27, 2006, 07:06:02 PM
Spotted an urk.

It won't allow me to load 2 shoutboxes at the same time; it seems intentional, but it is inconvenient for me.
Title: Re: nneonneo's Shoutbox
Post by: donmusido on December 27, 2006, 07:12:19 PM
file SB_1.03.tgz (30KB) failed... it's no go decompress?
I used WinRAR  :(
Title: Re: nneonneo's Shoutbox
Post by: RoarinRow on December 27, 2006, 07:18:24 PM
After I uploaded, there was an error I could not remember, and now I can't get to my packages sections of the Admin Control Panel.  very strange. 
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 27, 2006, 07:36:40 PM
delete the package file via FTP from ur Packages folder if u are getting an intrnal server error
that should fix it

otherwise if its another error, then post it here and maybe i or someone else can help out
Title: Re: nneonneo's Shoutbox
Post by: RoarinRow on December 27, 2006, 07:58:34 PM
Quote from: akulion on December 27, 2006, 07:36:40 PM
delete the package file via FTP from ur Packages folder if u are getting an intrnal server error
that should fix it

otherwise if its another error, then post it here and maybe i or someone else can help out

That did it, thanks Aku    ;)
Title: Re: nneonneo's Shoutbox
Post by: Xarcell on December 27, 2006, 09:16:26 PM
Wow, I'm impressed. It works really well...

Do you think there is any chance you could make a chat version? Different rooms that load on different pages or something?
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 27, 2006, 11:13:46 PM
ok for those who want a demo u can see it on:
http://path-to-peace.com/forum
user: test
pass: test
Please note: kindly do not abuse this test account or post links using it!

As for custom theme modification, simply follow these instructions - Keep in mind! --> Not all themes are structured the same, so if the search for a code dosent give anything, try searching for a single line from that code until you find it and compare it to make sure it is pretty much the same! Small differences will exist!

This custom modification code is being posted up by reuest - im sure others will find it useful too.

Rule 1: Make a backup of your index.template.php file from your themes folder 1st!!!!

Then follow this:

Search for:

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';


ADD UNDER it:

// YSHOUT HERE
if($context['user']['is_logged'])
echo '
<script src="yshout/js/prototype.js" type="text/javascript"></script>
<script src="yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="yshout/js/behaviour.js" type="text/javascript"></script>
<script src="yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
',empty($options['collapse_header']) ? 'loadChat();':'','
}, { "yshout":"id"});

</script>
<script src="yshout/js/yshout.js?Oct112006" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END


Search for:

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";


here ur search is LIKELY to fail, so I recommend searching for // Guests don't have theme options!! and comparing the code until u get to the last line of the above posted code.

And the ADD AFTER it:

// YSHOUT HERE
document.getElementById("yshout").style.display = mode ? "none" : "";
if(!mode)
{
loadChat();
}
// YSHOUT END


Finally comes the tricky part.
In different themes you may or may not have a user info area!
So incase the top userinfo area dosent exist then u will have to compensate and add this code somewhere where you would like to show the shoutbox.
THIS is the code which will finally display the shoutbox

Search for:

if (!empty($context['user']['total_time_logged_in']))
{
echo '
', $txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}


Add after it:

// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END


THE END OF MODIFICATIONS!

Please note the colors for the text and all the rest of the stuff can be changed in the 1st part of the code posted - the css section specifies the colors.

enjoy
Title: Re: nneonneo's Shoutbox
Post by: RvG on December 27, 2006, 11:39:13 PM
aku... thanks for the info. I would like to use it inside TP. Is it possible?

BTW, still it didn't work to me. Using smf 1.1.1 php 4.

Shout Box

...loading shoutbox...

only this and nothing shows thereafter.
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 27, 2006, 11:43:26 PM
yup u can use it inside TP as well

and I dont believe it will work with php 4 as mentioned earlier
Title: Re: nneonneo's Shoutbox
Post by: Xarcell on December 27, 2006, 11:49:38 PM
the "loading shoutbox" is all I see on your site aku...
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 28, 2006, 12:18:28 AM
oh yes sorry I forgot to add something lol

just a min
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 28, 2006, 12:26:03 AM
there fixed

the problem was simply this which everyone should compensate for....

In most TP enabled themes, you wont have the comfort of being able to add the shoutbox neatly in the area where guest permissions are checked by default.

The shoutbox does not work for guests, so one has to login to see it.

now if you experience the problem that the shoutbox is still visible as a guest then it will simply say "shoutbox loading" and never load, since guests cant really use it!

So to fix this theme glitch (we can call it)
do this:

the last part of the modification I gave, u shold add it as follows:

if ($context['user']['is_guest'])
echo'';
else
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END


and that will take care of that issue

PS: u can login to my site as
user: test
pass: test

to see the actual shoutbox and test it out
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 28, 2006, 12:44:35 AM
a question for the mod author :

- how can I delete individual shouts? Do I have to do that from the tables via PHP myadmin?


found it
in yshout/chats/ folder
Title: Re: nneonneo's Shoutbox
Post by: superboomz on December 28, 2006, 02:15:25 AM
i tried change the timezone but it didn't work.
i'm in bangkok, thailand
i changed from 'America/Regina' to 'Asia/Bangkok' but the timestamp still not sync with my local time. :S
Title: Re: nneonneo's Shoutbox
Post by: kat on December 28, 2006, 12:29:53 PM
Hmmm. I'm getting "Shoutbox is loading in another window. Retrying..." and it just sits there.

Shame...
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 28, 2006, 01:04:31 PM
If you are using PHP <= 4, the timezone isn't set. I am looking into that problem.

If anyone gets a hung "loading shoutbox...", chances are that the shoutbox code (yshout/yshout.php) has errored. Please check your web server error log (not SMF's error log; it will log there).

1.03 should work with PHP 3 and 4 (but nothing older; if you have PHP 2 it's time to upgrade anyway :) )

AFAIK I may have to totally rework the timestamp to make it local-time compatible. If this is a big problem, you may wish to use one of the other shoutboxes in the meantime.


The shoutbox was designed to be loaded only once to avoid sucking bandwidth (I myself sometimes open every new topic in a separate tab, which could put a huge strain on server resources). It can be disabled by editing the yshout/js/yshout.js file: in the function loadChat, comment out the entire block of code that goes like this:
if(get_cookie("yShout_open"))
{
$("yshout").innerHTML="Shoutbox loaded in another window. Retrying...";
setTimeout("loadChat()",Math.random()*1000+1000/*between 1 and 2 seconds*/);
return;
}
set_cookie("yShout_open","true",3/*seconds*/);

and the shoutbox will load in all windows. Please be warned that this could potentially stress your server/hoster.
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 28, 2006, 01:09:12 PM
hey i wanted to ask can moderators have control over shoutbox functions as well?

also can I restrict it by membergroup basis?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 28, 2006, 01:26:03 PM
For moderators, you can add this immediately after
$user=ssi_welcome('nothing'); // ssi_welcome only does something IF the parameter is 'echo'; otherwise the user data is returned!

in yshout/yshout.php:
if (loadMemberData(Array($user['id']),false,'minimal')!==false)
{
$group=$user_profile[$user['id']]['ID_GROUP'];
if(in_array($group,array(2,3)))
{
$user['is_mod']=1;
}
if(in_array($group,array(100,200,300)))
{
die("Sorry, you cannot access the shoutbox.");
}
}
else
{
die("Sorry, you must be logged in to post!");
}


Replace 2,3 with the IDs of moderators (usually 2 is Global Mod, 3 is Moderator); replace 100,200,300 with membergroups not allowed to access the shoutbox.

Note that the "banned" membergroups will still see the shoutbox; if you want to avoid that, you will have to edit the theme code (specifically, the part with the actual shoutbox; just wrap it in an if statement to check for correct access)

EDIT: fixed missing bracket
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 28, 2006, 01:34:07 PM
thanks - this is a great shout box
thanks u very much for this wonderful contribution :D
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 28, 2006, 01:43:49 PM
oh just 1 last thing

I want to reduce the size (width) of the typing text box

and also put a <HR> tag between shouts

is that possible and how?
thanks
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 28, 2006, 03:16:02 PM
Find this little block in index.template.php:
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}

Change the "310px" to anything else you like (make sure to have "px" on the end though)

As for having a <hr> after each shout, do you want to have that saved to disk, or only have it display to users (i.e do you want the <hr> to show up in the history?)
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 28, 2006, 03:30:34 PM
the HR I just want displayed as html so that shouts get seperated like this:

User: hello etc etc
________________
User: hello etc etc
________________
User: hello etc etc

for formatting purposes basically
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 28, 2006, 04:15:53 PM
Find
return $chatText.' '; // hack: totally empty responses can break some browsers in the readChat function and replace the line with
return str_replace("\n","\n<hr>",$chatText.' '); // hack: totally empty responses can break some browsers

Hope that helps.
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 28, 2006, 04:44:32 PM
Thanks :D

Here is the Tiny Portal Version of this mod for those who want to use the shout box in a side block.

Demo of TP side block shoutbox can be seen here (http://goofy-goobers.com/forum)
you MUST be logged in to see it
user: test
pass: test

Instead of the normal yshout.php file please use this modified one to compensate for the side block --> download yshout.php (modified) (http://goofy-goobers.com/forum/yshout/yshout.zip)

Second thing you will need to do is carry out the modifications for index.template.php mentioned here (http://www.simplemachines.org/community/index.php?topic=137508.msg878923#msg878923) BUT DO NOT include this last part in your index.template.php:

// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END


INSTEAD put the code below in a PHP block (left ot right block) and activate it only for members (not for guests because they wont be able to see the shoutbox either ways!


// YSHOUT HERE
echo '<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...</div>';
// YSHOUT END
Title: Re: nneonneo's Shoutbox
Post by: Daniel15 on December 28, 2006, 08:47:40 PM
QuoteAFAIK I may have to totally rework the timestamp to make it local-time compatible.
I haven't looked at your code yet, but is it possible to use the SMF timestamp functions? The timeformat function (defined in Subs.php) is used by SMF to format timestamps. This takes into account the board's time offset, the user's timezone (as entered in their Profile), and also localisation (if they use another language, it uses month names in that language).
Title: Re: nneonneo's Shoutbox
Post by: TOOMUCH4MOST on December 29, 2006, 12:39:34 AM
I loaded the Mod... no problems... but all I get is :

Shout Box

...loading shoutbox... <--- Then this disappears and all I see is:

Shout Box

I am on php 5 server ...


Can't figure out what it could be.  Any help would be appreciated
Title: Re: nneonneo's Shoutbox
Post by: RvG on December 29, 2006, 01:09:52 AM
Quote from: TOOMUCH4MOST on December 29, 2006, 12:39:34 AM
I loaded the Mod... no problems... but all I get is :

Shout Box

...loading shoutbox... <--- Then this disappears and all I see is:

Shout Box

I am on php 5 server ...


Can't figure out what it could be.  Any help would be appreciated

i have the same status installed on a fresh smf 1.1.1 but I am using php4.4.x
Title: Re: nneonneo's Shoutbox
Post by: Greek on December 29, 2006, 04:24:07 AM
What about smilies? It would be very nice if some basic smilies exist.
Title: Re: nneonneo's Shoutbox
Post by: superboomz on December 29, 2006, 04:47:03 AM
and how can i make it appear on board index page ?
thanks
Title: Re: nneonneo's Shoutbox
Post by: YenLoWang on December 29, 2006, 05:02:44 AM
Hi!

I don't know, if someone asked this already - perhaps I just oversaw it somewhere... Do I have to activate the shoutbox anywhere after I installed the package?

Thanks in advance
Yen
Title: Re: nneonneo's Shoutbox
Post by: sunless on December 29, 2006, 05:42:19 AM
Fatal error: main() [function.require]: Failed opening required '/members/forum/yshout/../SSI.php' (include_path='.:') in /members/forum/yshout/yshout.php on line 4
Title: Re: nneonneo's Shoutbox
Post by: sasquatch on December 29, 2006, 07:25:36 AM
Although this is a great package, i can't see it on my forum with the orange-lto5 style!  >:(

Does anyone else have this problem, or have i had too much christmas spirit?
Title: Re: nneonneo's Shoutbox
Post by: LeGaS on December 29, 2006, 07:55:08 AM
If you want to use it with custom themes, you have to apply the modifications to those too.
See Manual Installation of Mods (http://docs.simplemachines.org/index.php?topic=402).
Title: Re: nneonneo's Shoutbox
Post by: YenLoWang on December 29, 2006, 09:08:48 AM
Okay, one more question...

After adding the Box to my custom Theme... is there any way to change the colors of the input-box and the input-text (as well as the colors of the username-box and -text).
When changing the css-code in yshout.css it does not change anything, and when changing it in index.template.php it is working fine for my Firefox, but it does not work for IE or Opera...

Thanks in advance for your help

Best regards
Yen
Title: Re: nneonneo's Shoutbox
Post by: TOOMUCH4MOST on December 29, 2006, 09:12:32 AM
I can't get it to work on any browser...need help!!!
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 29, 2006, 09:27:09 AM
Quote from: YenLoWang on December 29, 2006, 09:08:48 AM
Okay, one more question...

After adding the Box to my custom Theme... is there any way to change the colors of the input-box and the input-text (as well as the colors of the username-box and -text).
When changing the css-code in yshout.css it does not change anything, and when changing it in index.template.php it is working fine for my Firefox, but it does not work for IE or Opera...

Thanks in advance for your help

Best regards
Yen


the CSS is laid out in the index.template.php for the shoutbox
change that and viola :D
Title: Re: nneonneo's Shoutbox
Post by: YenLoWang on December 29, 2006, 09:35:11 AM
Quote from: akulion on December 29, 2006, 09:27:09 AM
Quote from: YenLoWang on December 29, 2006, 09:08:48 AM
Okay, one more question...

After adding the Box to my custom Theme... is there any way to change the colors of the input-box and the input-text (as well as the colors of the username-box and -text).
When changing the css-code in yshout.css it does not change anything, and when changing it in index.template.php it is working fine for my Firefox, but it does not work for IE or Opera...

Thanks in advance for your help

Best regards
Yen


the CSS is laid out in the index.template.php for the shoutbox
change that and viola :D

Sorry, I tried that, but it only works in firefox, but not in IE or Opera... :(
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 29, 2006, 10:16:26 AM
Quote from: Greek on December 29, 2006, 04:24:07 AM
What about smilies? It would be very nice if some basic smilies exist.

Smilies work as they would on your forum, it's just that I feel that smiley buttons would be too much clutter. Just use the smileys as you normally would (e.g. :), etc)

For anyone with the "loading shoutbox..." problem, please go to http://domain.com/path/to/your/forum/yshout/yshout.php in your browser (replacing the path with yours of course) and see what comes up. If it says "nothing to do" then your setup is correct, and I'll need more information. If any sort of PHP error appears, then there is a problem.
Also check your webserver error logs.

Quote from: YenLoWang on December 29, 2006, 09:35:11 AM
Quote from: akulion on December 29, 2006, 09:27:09 AM
Quote from: YenLoWang on December 29, 2006, 09:08:48 AM
Okay, one more question...

After adding the Box to my custom Theme... is there any way to change the colors of the input-box and the input-text (as well as the colors of the username-box and -text).
When changing the css-code in yshout.css it does not change anything, and when changing it in index.template.php it is working fine for my Firefox, but it does not work for IE or Opera...

Thanks in advance for your help

Best regards
Yen


the CSS is laid out in the index.template.php for the shoutbox
change that and viola :D

Sorry, I tried that, but it only works in firefox, but not in IE or Opera... :(
I was pretty sure to test the CSS in FF, IE, Opera, Safari and Konq and never saw a problem with the CSS rendering (I even installed the shoutbox to at least 4 different skins to test). If the CSS isn't changing, try force-refreshing the page (Shift+Reload in some browsers) to clear the cache.
Title: Re: nneonneo's Shoutbox
Post by: scorpiious on December 29, 2006, 10:19:38 AM
how do you make this appear on other themes?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 29, 2006, 10:29:10 AM
http://www.simplemachines.org/community/index.php?topic=137508.msg878923#msg878923
Title: Re: nneonneo's Shoutbox
Post by: YenLoWang on December 29, 2006, 10:43:21 AM
Quote from: nneonneo on December 29, 2006, 10:16:26 AM

...

I was pretty sure to test the CSS in FF, IE, Opera, Safari and Konq and never saw a problem with the CSS rendering (I even installed the shoutbox to at least 4 different skins to test). If the CSS isn't changing, try force-refreshing the page (Shift+Reload in some browsers) to clear the cache.

Perhaps you could take a look at my Implementation at my Forum (http://uni36.un.ohost.de/blacky)...

Thanks & Best regards
Yen
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 29, 2006, 10:59:02 AM
OK, I will have a look. I would also suggest that you check for guest status on the main div for the shoutbox: it isn't accessible to guests and looks rather odd if it is unable to load.

I also noted that there appears to be no header (i.e. no javascript, CSS or anything) related to the shoutbox on guest mode. Is that supposed to be the case?
Title: Re: nneonneo's Shoutbox
Post by: YenLoWang on December 29, 2006, 11:10:53 AM
Quote from: nneonneo on December 29, 2006, 10:59:02 AM
OK, I will have a look. I would also suggest that you check for guest status on the main div for the shoutbox: it isn't accessible to guests and looks rather odd if it is unable to load.

I also noted that there appears to be no header (i.e. no javascript, CSS or anything) related to the shoutbox on guest mode. Is that supposed to be the case?

ok, i corrected that one... thanks 4 the hint!

;)

and thanks again for taking a look at it!

Best regards
Yen
Title: Re: nneonneo's Shoutbox
Post by: RvG on December 29, 2006, 11:43:56 AM
For anyone with the "loading shoutbox..." problem, please go to http://domain.com/path/to/your/forum/yshout/yshout.php in your browser (replacing the path with yours of course) and see what comes up. If it says "nothing to do" then your setup is correct, and I'll need more information. If any sort of PHP error appears, then there is a problem.
Also check your webserver error logs.

wow! it works!!! "after saying nothing to do" I reload back the page then it works on my test board.

but when i installed it on my live board it shows "Internal Server Error"

error log:

[2006-12-29 11:58:45]: error: file is writable by others: (/home/******/public_html/v3/yshout/yshout.php)

these are my mods installed:

1.     TinyPortal      0.97       [ List Files ]  [ Delete ]
2.    Joined Date    1.0    [ Uninstall ] [ List Files ] [ Delete ]
3.    Post Count Warning    1.1    [ Uninstall ] [ List Files ] [ Delete ]
4.    Member Awards    1.0.2    [ Uninstall ] [ List Files ] [ Delete ]
5.    SMF Radio    1.0    [ Uninstall ] [ List Files ] [ Delete ]
6.    Inline Attachments    1.0.4.2    [ Uninstall ] [ List Files ] [ Delete ]
7.    Bear Tabs    1.0    [ Uninstall ] [ List Files ] [ Delete ]
8.    SMF Arcade    1.3.1-MOD-E1.5.1    [ List Files ] [ Delete ]
9.    Simple Blog    1.4.2    [ Uninstall ] [ List Files ] [ Delete ]
10.    SMF Staff Page    1.3    [ List Files ] [ Delete ]
11.    SMF TV    0.1    [ Uninstall ] [ List Files ] [ Delete ]
12.    Topic Ratings    1.03    [ Uninstall ] [ List Files ] [ Delete ]
13.    vReportBoard Mod    0.97    [ List Files ] [ Delete ]
14.    Custom Profile Field Mod    3.16    [ Uninstall ] [ List Files ] [ Delete ]
15.    Media Center    1.0    [ Uninstall ] [ List Files ] [ Delete ]
16.    Bookmark Mod By Leipe Po    1.3    [ Uninstall ] [ List Files ] [ Delete ]
17.    SMF 1.1.1 Update Package    1.1.1    [ Uninstall ] [ List Files ] [ Delete ]
18.    nneonneo's AJAX ShoutBox    1.03    [ Uninstall ] [ List Files ] [ Delete ]
19.    Tagging System    1.0.2    [ Uninstall ] [ List Files ] [ Delete ]
20.    SMF Gallery Lite    1.6.9    [ Uninstall ] [ List Files ] [ Delete ]
21.    SMF Shoutbox    1.15    [ List Files ] [ Delete ]
22.    Zodiac 13Moon    1.0    [ Uninstall ] [ List Files ] [ Delete ]
23.    Admin Notepad    1.0    [ Uninstall ] [ List Files ] [ Delete ]
24.    SMF Staff Page    1.5    [ Uninstall ] [ List Files ] [ Delete ]
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 29, 2006, 12:19:11 PM
if u need to uninstall it and the uninstall link isnt appearing
then do this:

in the Packages page (when ur on it)
put this in front of the address in the browser addressbar: ;version_emulate=1.1
it will get u the uninstall link back

Also if internal server error is occuring u just need to delete the package last uploaded in the Packages folder
Title: Re: nneonneo's Shoutbox
Post by: powerPT on December 29, 2006, 12:42:05 PM
After install (or not) this mod, the link /index.php?action=packages don´t works, When I click it shows:
QuoteInternal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Can you help me?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on December 29, 2006, 12:46:39 PM
This mod is working 100% for me. I think some of you need to do a fresh install of smf. Upload all your images and mods back up. Reinstall smf.

DEMO: http://brianjwilson.com
Username: test
Password: test
(this is a test account; please do not abuse this account)

Also it shout appear at the top of the page only in the themes alienation, smf default, and enterprise! You must be logged into see it!!!!
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 29, 2006, 01:19:26 PM
Quote from: RvG on December 29, 2006, 11:43:56 AM
For anyone with the "loading shoutbox..." problem, please go to http://domain.com/path/to/your/forum/yshout/yshout.php in your browser (replacing the path with yours of course) and see what comes up. If it says "nothing to do" then your setup is correct, and I'll need more information. If any sort of PHP error appears, then there is a problem.
Also check your webserver error logs.

wow! it works!!! "after saying nothing to do" I reload back the page then it works on my test board.

but when i installed it on my live board it shows "Internal Server Error"

error log:

[2006-12-29 11:58:45]: error: file is writable by others: (/home/******/public_html/v3/yshout/yshout.php)

these are my mods installed:

1.     TinyPortal      0.97       [ List Files ]  [ Delete ]
2.    Joined Date    1.0    [ Uninstall ] [ List Files ] [ Delete ]
3.    Post Count Warning    1.1    [ Uninstall ] [ List Files ] [ Delete ]
4.    Member Awards    1.0.2    [ Uninstall ] [ List Files ] [ Delete ]
5.    SMF Radio    1.0    [ Uninstall ] [ List Files ] [ Delete ]
6.    Inline Attachments    1.0.4.2    [ Uninstall ] [ List Files ] [ Delete ]
7.    Bear Tabs    1.0    [ Uninstall ] [ List Files ] [ Delete ]
8.    SMF Arcade    1.3.1-MOD-E1.5.1    [ List Files ] [ Delete ]
9.    Simple Blog    1.4.2    [ Uninstall ] [ List Files ] [ Delete ]
10.    SMF Staff Page    1.3    [ List Files ] [ Delete ]
11.    SMF TV    0.1    [ Uninstall ] [ List Files ] [ Delete ]
12.    Topic Ratings    1.03    [ Uninstall ] [ List Files ] [ Delete ]
13.    vReportBoard Mod    0.97    [ List Files ] [ Delete ]
14.    Custom Profile Field Mod    3.16    [ Uninstall ] [ List Files ] [ Delete ]
15.    Media Center    1.0    [ Uninstall ] [ List Files ] [ Delete ]
16.    Bookmark Mod By Leipe Po    1.3    [ Uninstall ] [ List Files ] [ Delete ]
17.    SMF 1.1.1 Update Package    1.1.1    [ Uninstall ] [ List Files ] [ Delete ]
18.    nneonneo's AJAX ShoutBox    1.03    [ Uninstall ] [ List Files ] [ Delete ]
19.    Tagging System    1.0.2    [ Uninstall ] [ List Files ] [ Delete ]
20.    SMF Gallery Lite    1.6.9    [ Uninstall ] [ List Files ] [ Delete ]
21.    SMF Shoutbox    1.15    [ List Files ] [ Delete ]
22.    Zodiac 13Moon    1.0    [ Uninstall ] [ List Files ] [ Delete ]
23.    Admin Notepad    1.0    [ Uninstall ] [ List Files ] [ Delete ]
24.    SMF Staff Page    1.5    [ Uninstall ] [ List Files ] [ Delete ]


It appears as if your server doesn't like having the permissions opened to all! It's rather odd that the server should check, but it could be a security thing.
Anyway, I recommend chmod'ing the file to "755" and see if that works.

@YenLoWang: The shoutbox looks fine (i.e. it looks like the CSS works) in all my browsers.
However, I think that it would be good if the shoutbox div did not show up at all for guests.
Title: Re: nneonneo's Shoutbox
Post by: Geoff Mendicino on December 29, 2006, 01:29:12 PM
Can you help me install this on the Babylon template? It doesn't show when I try to copy the code in.

My forum: http://mega64ums.exehq.com
Title: Re: nneonneo's Shoutbox
Post by: sasquatch on December 29, 2006, 01:33:56 PM
I'm getting something strange now... it constantly says "sorry, you must be logged in to post" - even though i'm logged in ?!?
Title: Re: nneonneo's Shoutbox
Post by: RvG on December 29, 2006, 02:06:01 PM
Quote from: nneonneo on December 29, 2006, 01:19:26 PM
Quote from: RvG on December 29, 2006, 11:43:56 AM
For anyone with the "loading shoutbox..." problem, please go to http://domain.com/path/to/your/forum/yshout/yshout.php in your browser (replacing the path with yours of course) and see what comes up. If it says "nothing to do" then your setup is correct, and I'll need more information. If any sort of PHP error appears, then there is a problem.
Also check your webserver error logs.

wow! it works!!! "after saying nothing to do" I reload back the page then it works on my test board.

but when i installed it on my live board it shows "Internal Server Error"

error log:

[2006-12-29 11:58:45]: error: file is writable by others: (/home/******/public_html/v3/yshout/yshout.php)

these are my mods installed:

1.     TinyPortal      0.97       [ List Files ]  [ Delete ]
2.    Joined Date    1.0    [ Uninstall ] [ List Files ] [ Delete ]
3.    Post Count Warning    1.1    [ Uninstall ] [ List Files ] [ Delete ]
4.    Member Awards    1.0.2    [ Uninstall ] [ List Files ] [ Delete ]
5.    SMF Radio    1.0    [ Uninstall ] [ List Files ] [ Delete ]
6.    Inline Attachments    1.0.4.2    [ Uninstall ] [ List Files ] [ Delete ]
7.    Bear Tabs    1.0    [ Uninstall ] [ List Files ] [ Delete ]
8.    SMF Arcade    1.3.1-MOD-E1.5.1    [ List Files ] [ Delete ]
9.    Simple Blog    1.4.2    [ Uninstall ] [ List Files ] [ Delete ]
10.    SMF Staff Page    1.3    [ List Files ] [ Delete ]
11.    SMF TV    0.1    [ Uninstall ] [ List Files ] [ Delete ]
12.    Topic Ratings    1.03    [ Uninstall ] [ List Files ] [ Delete ]
13.    vReportBoard Mod    0.97    [ List Files ] [ Delete ]
14.    Custom Profile Field Mod    3.16    [ Uninstall ] [ List Files ] [ Delete ]
15.    Media Center    1.0    [ Uninstall ] [ List Files ] [ Delete ]
16.    Bookmark Mod By Leipe Po    1.3    [ Uninstall ] [ List Files ] [ Delete ]
17.    SMF 1.1.1 Update Package    1.1.1    [ Uninstall ] [ List Files ] [ Delete ]
18.    nneonneo's AJAX ShoutBox    1.03    [ Uninstall ] [ List Files ] [ Delete ]
19.    Tagging System    1.0.2    [ Uninstall ] [ List Files ] [ Delete ]
20.    SMF Gallery Lite    1.6.9    [ Uninstall ] [ List Files ] [ Delete ]
21.    SMF Shoutbox    1.15    [ List Files ] [ Delete ]
22.    Zodiac 13Moon    1.0    [ Uninstall ] [ List Files ] [ Delete ]
23.    Admin Notepad    1.0    [ Uninstall ] [ List Files ] [ Delete ]
24.    SMF Staff Page    1.5    [ Uninstall ] [ List Files ] [ Delete ]


It appears as if your server doesn't like having the permissions opened to all! It's rather odd that the server should check, but it could be a security thing.
Anyway, I recommend chmod'ing the file to "755" and see if that works.

@YenLoWang: The shoutbox looks fine (i.e. it looks like the CSS works) in all my browsers.
However, I think that it would be good if the shoutbox div did not show up at all for guests.

it was already in 755. Since it worked on my test board on the same server means that there's a conflict on one of the mods.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 29, 2006, 02:41:53 PM
Hmm, weird. I can't really say which mod could interfere, seeing as the shoutbox has very little interaction with other mods.

Please check to see if there is a "SSI.php" file in the main forum directory - it may have been deleted by a mod (possibly)

@Geoff: what code did you try to copy in?
@sasquatch: Do you have cookies on? The shoutbox uses cookies to track logged-in status.
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 29, 2006, 02:58:21 PM
if urpackage manager is not accessible

download the LAST package u uploaded via package manager (use FTP to download it) this is just for backup.

Then using FTP delete the package from ur servers Packages folder
Title: Re: nneonneo's Shoutbox
Post by: Geoff Mendicino on December 29, 2006, 03:03:12 PM
Quote from: nneonneo on December 29, 2006, 02:41:53 PM
Hmm, weird. I can't really say which mod could interfere, seeing as the shoutbox has very little interaction with other mods.

Please check to see if there is a "SSI.php" file in the main forum directory - it may have been deleted by a mod (possibly)

@Geoff: what code did you try to copy in?
@sasquatch: Do you have cookies on? The shoutbox uses cookies to track logged-in status.

The same code that is inserted into the index.templates.php or whatever file, starting from //YSHOUT START to //YSHOUT END
Title: Re: nneonneo's Shoutbox
Post by: Geoff Mendicino on December 29, 2006, 03:03:40 PM
I was also wondering if it's possible to only have the Shoutbox appear when you're viewing a certain forum.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 29, 2006, 03:15:16 PM
It should be possible, just put in a check or something for the current board:
if(!empty($context['current_board']) && $context['current_board']==<board id>)
{
echo '<br><b>Shout Box.....[rest of that section]
}

There are 3 blocks of code that go from YSHOUT HERE to YSHOUT END; the first and the third are important (for Babylon, all three should be copied). See the modification file "install.xml" for details (Package Manager->"[List Files]"->install.xml) and for manual installation. Most of the elements should be in approximately the same place.
Title: Re: nneonneo's Shoutbox
Post by: Erle on December 29, 2006, 06:17:48 PM
How do I change the Timestamp  (German time)?

the rest works awesome great work?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 29, 2006, 07:03:06 PM
I am working on an update; I will release an update soon which will use forum settings for time.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 29, 2006, 07:48:00 PM
Updated the shoutbox to 1.04. Changes:
Made the shoutbox parse times according to forum and user settings (so it will parse differently for each person according to what they wish to see in their profile).

1.04 is a direct upgrade from 1.02 or 1.03; simply upload and install. Chats, history, etc. will be saved, but there *may* be problems during installation.

In particular, if you have changed the timezone from "America/Regina" you are recommended to change it back before upgrading to avoid problems. That section will be deleted during the upgrade, so you will not have any timezone problems after the upgrade (hopefully!)
Title: Re: nneonneo's Shoutbox
Post by: Daniel15 on December 29, 2006, 08:12:21 PM
QuoteIt's rather odd that the server should check, but it could be a security thing.
Anyway, I recommend chmod'ing the file to "755" and see if that works.
More specifically, it's something called phpsuexec (or suPHP, but they're basically the same thing). Essentially, it means that PHP scripts run as the user that owns them, rather than the Apache user 'nobody'. Because of this, you can't run world-writable scripts (there's no use anyway - you could CHMOD it to 770 and it would still work, because they're being run/written to by you)

Quote[2006-12-29 11:58:45]: error: file is writable by others: (/home/******/public_html/v3/yshout/yshout.php)
That's indeed what it sounds like - The /home/******/public_html/v3/yshout/yshout.php file is writable by others (CHMODded to 0777). CHMODding the file to 0755 should fix this.

QuoteMade the shoutbox parse times according to forum and user settings
Nice to see you took my advice... Nice work! :)
Title: Re: nneonneo's Shoutbox
Post by: starsong on December 29, 2006, 09:44:16 PM
Hi I am having trouble with this shout box.
I have  zipped teh main and the fixed indexes.
My theme is roses.

I cant seem to get passed the Shoutbox loading....

I would be grateful of any help. TY
jodi

[email protected]
Title: Re: nneonneo's Shoutbox
Post by: xyxis_fahim on December 29, 2006, 10:45:40 PM
Hey thanks nneonneo  for the help earlier. I'm set with sb all the way i guess.
But one last thing I want is to get rid of the long time set when posting..

Ex.... [December 29, 7:52 pm] King Lara_400: :)
to something like [Today, 7:52 pm]


This is what i've it set ... on www.truforum.org/smf

You may log in with
User: test
Pass: test
Title: Re: nneonneo's Shoutbox
Post by: Daniel15 on December 29, 2006, 11:37:46 PM
QuoteEx.... [December 29, 7:52 pm] King Lara_400:
to something like [Today, 7:52 pm]
In yshout.php, find:

    return timeformat(intval($matches[1]));

Replace with:

    return timeformat(intval($matches[1]), true);

Make sure the 'Today' feature is enabled in SMF (Admin Panel --> Features and Options --> Layout and Options).

Not tested by me, but should work :). I still haven't had an in-depth look at this mod, so I don't know that much about how the code works ;)
Title: Re: nneonneo's Shoutbox
Post by: RvG on December 30, 2006, 12:27:10 AM
Quote from: nneonneo on December 29, 2006, 02:41:53 PM
Hmm, weird. I can't really say which mod could interfere, seeing as the shoutbox has very little interaction with other mods.

Please check to see if there is a "SSI.php" file in the main forum directory - it may have been deleted by a mod (possibly)

@Geoff: what code did you try to copy in?
@sasquatch: Do you have cookies on? The shoutbox uses cookies to track logged-in status.

sorry nneonneo :)

I got it worked now... hahahhaa! thank you thank you.
Title: Re: nneonneo's Shoutbox
Post by: tapirul on December 30, 2006, 01:35:45 AM
looks great this mod... One thing I wish it had, the possibility to change settings from AP instead of changing codes in php files
good job
Title: Re: nneonneo's Shoutbox
Post by: tapirul on December 30, 2006, 01:40:34 AM
Quote from: akulion on December 29, 2006, 12:19:11 PM
if u need to uninstall it and the uninstall link isnt appearing
then do this:

in the Packages page (when ur on it)
put this in front of the address in the browser addressbar: ;version_emulate=1.1
it will get u the uninstall link back

Also if internal server error is occuring u just need to delete the package last uploaded in the Packages folder

Aku, could you be more explicit with this? I had same problem since updated to 1.1.1 (see pic); some packages, while up and running, do not have the "uninstall" link anymore:

(http://img.photobucket.com/albums/v505/tapirul/packages.jpg)
Title: Re: nneonneo's Shoutbox
Post by: RvG on December 30, 2006, 02:16:18 AM
ERROR: Prefix shout with "/" (slash character)! See "/help impersonate" for details.

It seems I crashed it using the impersonation command... how can I return it back?

bug?  8)
Title: Re: nneonneo's Shoutbox
Post by: RvG on December 30, 2006, 05:37:31 AM
Quote from: RvG on December 30, 2006, 02:16:18 AM
ERROR: Prefix shout with "/" (slash character)! See "/help impersonate" for details.

It seems I crashed it using the impersonation command... how can I return it back?

bug?  8)

OK. I got it worked again but I don't know how.  :D

I will not touch the features yet. But one thing I noticed, there's way to delete a "shout"?
Title: Re: nneonneo's Shoutbox
Post by: ChaosEnergy on December 30, 2006, 07:18:23 AM
QuoteWarning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /var/www/forum/yshout/yshout.php on line 232
History Commands ExtendedHistory HideBanLinks

Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /var/www/forum/yshout/yshout.php on line 512

I get this, after installation, no difference if I en or disable compression in server settings
Title: Re: nneonneo's Shoutbox
Post by: jasuk70 on December 30, 2006, 04:24:44 PM
Would it be possible to add a way to delete shouts (If you are a mod or admin). Just in case people post shouts that are not very "nice" to the shout box.

Cheers.
Title: Re: nneonneo's Shoutbox
Post by: Jereme Guenther on December 30, 2006, 06:07:57 PM
Hi nneonneo's, I just got finished testing three different shoutbox mods (SMF Shoutbox, Ultimate Shoutbox, and yours).  I think yours is head and shoulders above the others, great job.  My favorite feature is how you don't modify any files except the index, that is wonderful.

I agree with others that there are features it would be nice to have, but it is a great addition to the forum just the way it is, thanks.

Jereme
Title: Re: nneonneo's Shoutbox
Post by: khurrum on December 30, 2006, 06:43:24 PM
i am so much thankful to you for creating such a nice and useful mod. many many thanks and so nice of you.

i just want to ask whether it is possible that if anyone shouts something, we can hear a small sound. if not possible then it is fine but i just got this suggestion therefore i wanted to share here.

wish you best of luck and happy new year
khurrum.com
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 31, 2006, 05:15:43 AM
how about eid mubarak? :P

yes i think the sound feature would be cute
also the ability to delete shouts with a command instead of having to edit the files
Title: Re: nneonneo's Shoutbox
Post by: RvG on December 31, 2006, 08:34:20 AM
eid mubarak aku! :)

hhmmmmm this shoutbox will take the features like D21 of IPB?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 31, 2006, 11:57:40 AM
Quote from: ChaosEnergy on December 30, 2006, 07:18:23 AM
QuoteWarning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /var/www/forum/yshout/yshout.php on line 232
History Commands ExtendedHistory HideBanLinks

Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /var/www/forum/yshout/yshout.php on line 512

I get this, after installation, no difference if I en or disable compression in server settings
Remove every line in yshout/yshout.php starting with "ob_" (e.g. ob_start("ob_gzhandler") and ob_end_flush) to eliminate this warning.

Quote from: jasuk70 on December 30, 2006, 04:24:44 PM
Would it be possible to add a way to delete shouts (If you are a mod or admin). Just in case people post shouts that are not very "nice" to the shout box.

Cheers.
I will try to add it in the next revision :D

If you ever get "stuck" reading an error message, etc. use "/return" to go back (I should have made this more explicit). It's set up so that the error doesn't vanish on the next reload cycle.

Quote from: RvG on December 31, 2006, 08:34:20 AM
eid mubarak aku! :)

hhmmmmm this shoutbox will take the features like D21 of IPB?
What is D21?
Title: Re: nneonneo's Shoutbox
Post by: RvG on December 31, 2006, 02:29:40 PM
forget it... it was the ajax shoutbox of IPB :)

I am happy that this shoubox came into life!
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on December 31, 2006, 06:29:01 PM
OK, I tried posting a new version but it appears to keep rejecting my file (it appears on the "current files" list but not on the main page).

Meanwhile, I've attached the mod file, so if anyone wants to try the new mod out they can download it here (until the mod site is "fixed" I guess :P)

Changes in 1.05: Added a "del" option to shouts for administrators/moderators to allow for the deletion of shouts.
Added "$gzipCompression" option; this defaults to true but can be set to false if you experience issues.
Increased the security of a few functions as a precaution.
Fixed some bugs related to not using "home.txt" as the chat file. Now, it is possible to use a different file for each theme, or, if you're intrepid, a different file for different boards/users/etc. See index.template.php and search for "shoutFile".
Title: Re: nneonneo's Shoutbox
Post by: emilijano on December 31, 2006, 07:32:49 PM
i've got installed SMF 1.1.1 so i tried to download and install from package manager nneonneo's shoutbox but i'm getting this message:
An Error Has Occurred!
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
does anybody can help me?
Title: Re: nneonneo's Shoutbox
Post by: Gobo on December 31, 2006, 07:50:51 PM
package manager sometimes gives error with tgz files
try to unzip file (maintaining directory structure)
and then pack it back up as a Zip file and then try and upload
Title: Re: nneonneo's Shoutbox
Post by: superboomz on December 31, 2006, 09:54:53 PM
many thanks to you, nneonneo !!
great works .. i like it :D
Title: Re: nneonneo's Shoutbox
Post by: superboomz on January 01, 2007, 12:18:02 AM
uhm..
i'm having a problem with the new 1.05 version.
the time stamp didn't show me corrent characters. (i'm using Thai lang and using the 'Today mod')

sorry to bother you again, nneonneo.
Title: Re: nneonneo's Shoutbox
Post by: RvG on January 01, 2007, 12:47:42 AM
nneonneo, i am using ver 1.04:

there's an annoying firefox error below right my browser and it shows like this:

$A is not defined
prototype.js (line 52)

return __method.apply(object, args.concat($A(arguments)));

hmmmm anyway, upgrading to v1.05 now. :)
Title: Re: nneonneo's Shoutbox
Post by: RvG on January 01, 2007, 12:59:57 AM
version 1.05 is working super fine ;) (using tgz  ;D )

thanks a million!

hope you can add link to the "popup" smf smileys on your next version...
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 01, 2007, 03:51:19 AM
Quote from: superboomz on January 01, 2007, 12:18:02 AM
uhm..
i'm having a problem with the new 1.05 version.
the time stamp didn't show me corrent characters. (i'm using Thai lang and using the 'Today mod')

sorry to bother you again, nneonneo.
First thing to try is to click HideAdminLinks and see if the problem persists. I have not changed any of the timeformat handling code since 1.04.
Does 1.04 also have this problem?
Title: Re: nneonneo's Shoutbox
Post by: superboomz on January 01, 2007, 04:32:32 AM
Quote from: nneonneo on January 01, 2007, 03:51:19 AM
Quote from: superboomz on January 01, 2007, 12:18:02 AM
uhm..
i'm having a problem with the new 1.05 version.
the time stamp didn't show me corrent characters. (i'm using Thai lang and using the 'Today mod')

sorry to bother you again, nneonneo.
First thing to try is to click HideAdminLinks and see if the problem persists. I have not changed any of the timeformat handling code since 1.04.
Does 1.04 also have this problem?

tried click HideAdminLinks but nothing changed.
i haven't tested 1.04 (i jumped from 1.03 to 1.05) but i think it also have this prob too.

as you see in the picture above this post, the unreadable characters should be the word "Today" in Thai language but it doesn't.
so, if it can't be fixed to appear as my language,
is there the way to remove the date (only show the time) without changing timestamp in profile or smf options.

many thanks and sorry for my bad english :-X
Title: Re: nneonneo's Shoutbox
Post by: emilijano on January 01, 2007, 08:30:58 AM
Quote from: emilijano on December 31, 2006, 07:32:49 PM
i've got installed SMF 1.1.1 so i tried to download and install from package manager nneonneo's shoutbox but i'm getting this message:
An Error Has Occurred!
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
does anybody can help me?
Quote from: akulion on December 31, 2006, 07:50:51 PM
package manager sometimes gives error with tgz files
try to unzip file (maintaining directory structure)
and then pack it back up as a Zip file and then try and upload
where can i download v1.05 and how to install it manualy?
sorry for my bad english!
Title: Re: nneonneo's Shoutbox
Post by: pariofdreamz on January 01, 2007, 08:51:29 AM
iTS GREAT THANK U >:(
Title: Re: nneonneo's Shoutbox
Post by: Mark Thomas on January 01, 2007, 10:51:48 AM
Version 1.05 works very well! Many thanks nneonneo, my members will be very happy. :-)
Title: Re: nneonneo's Shoutbox
Post by: Flying Drupalist on January 01, 2007, 11:02:15 AM
Quote from: starsong on December 29, 2006, 09:44:16 PM
I cant seem to get passed the Shoutbox loading....

I have this same problem. It says shoutbox is loading... And then doesn't.
Title: Re: nneonneo's Shoutbox
Post by: RvG on January 01, 2007, 11:39:15 AM
Quote from: Miraploy on January 01, 2007, 11:02:15 AM
Quote from: starsong on December 29, 2006, 09:44:16 PM
I cant seem to get passed the Shoutbox loading....

I have this same problem. It says shoutbox is loading... And then doesn't.

try to chmod yshout.php to 755.  ;)
Title: Re: nneonneo's Shoutbox
Post by: kellygrape on January 01, 2007, 01:16:32 PM
I'm using PHP 4.4.4 and I know this chat doesn't work with PHP4 - but is there anything that can be done to MAKE it work?

I'm a fair coder, not good enought to figure out how to fix this but if you tell me that such and such line or this reference to this variable needs to be deleted or changed or something, I can usually do that.

The chat looks really great and I wish I could make it work - it seems like such a great mod!  Well done!
Title: Re: nneonneo's Shoutbox
Post by: RvG on January 01, 2007, 03:00:02 PM
It SHOULD work with php4 :)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 01, 2007, 04:08:37 PM
Quote from: kellygrape on January 01, 2007, 01:16:32 PM
I'm using PHP 4.4.4 and I know this chat doesn't work with PHP4 - but is there anything that can be done to MAKE it work?

I'm a fair coder, not good enought to figure out how to fix this but if you tell me that such and such line or this reference to this variable needs to be deleted or changed or something, I can usually do that.

The chat looks really great and I wish I could make it work - it seems like such a great mod!  Well done!
Yes, indeed it should work because all the PHP5-specific code has been removed already. Have you tried it out yet?

Quote from: superboomz on January 01, 2007, 04:32:32 AM
Quote from: nneonneo on January 01, 2007, 03:51:19 AM
Quote from: superboomz on January 01, 2007, 12:18:02 AM
uhm..
i'm having a problem with the new 1.05 version.
the time stamp didn't show me corrent characters. (i'm using Thai lang and using the 'Today mod')

sorry to bother you again, nneonneo.
First thing to try is to click HideAdminLinks and see if the problem persists. I have not changed any of the timeformat handling code since 1.04.
Does 1.04 also have this problem?

tried click HideAdminLinks but nothing changed.
i haven't tested 1.04 (i jumped from 1.03 to 1.05) but i think it also have this prob too.

as you see in the picture above this post, the unreadable characters should be the word "Today" in Thai language but it doesn't.
so, if it can't be fixed to appear as my language,
is there the way to remove the date (only show the time) without changing timestamp in profile or smf options.

many thanks and sorry for my bad english :-X
It may have to do with encodings. By default, the shoutbox uses "UTF-8" (Unicode, 8 bit) encoding. If there is a Thai-specific encoding, it may conflict with UTF-8, causing unrecognized characters to appear.
There are (AFAIK) a few ways around this.
First, you could try getting a Unicode version of the Today mod (Unicode is technically better because of its ability to display almost any language).
If that's not possible, you can manually edit yshout/yshout.php. Try to find out what encoding your forum or mod uses (not the shoutbox). This is probably "Thai (Windows)" or something; the code is "tis-620" for that I think. What you need to do is search for "utf-8" in yshout/yshout.php (without quotes) and replace every instance with tis-620 (or whatever encoding you find). That should remedy the problem (though it may render the existing history files rather strange looking).

If you are still getting a stuck "loading shoutbox..." message, please check your webserver error logs. There may be a conflict there, or perhaps some misconfiguration that prevents the shoutbox PHP code from running.


BTW: I'm going on vacation from the 2nd to the 8th of January, so I won't be here to answer queries. Please direct your questions to nneonneo {at} gmail *dot* com, or send them via PM here on the community forum.
Title: Re: nneonneo's Shoutbox
Post by: DVD_GR on January 01, 2007, 10:54:14 PM
1,05 is available for download?
Title: Re: nneonneo's Shoutbox
Post by: Daniel15 on January 01, 2007, 11:17:50 PM
QuoteOK, I tried posting a new version but it appears to keep rejecting my file (it appears on the "current files" list but not on the main page).

Meanwhile, I've attached the mod file, so if anyone wants to try the new mod out they can download it here (until the mod site is "fixed" I guess )
It should be working now... It looks like the mod site now needs each file to be approved.
Title: Re: nneonneo's Shoutbox
Post by: jg123 on January 01, 2007, 11:37:58 PM
Where would be a good place on my page to place this?  Can it be modified to have a black background and white writing like my forum here, www.wjnj.com/forum?

thanks
Title: Re: nneonneo's Shoutbox
Post by: Mark Thomas on January 02, 2007, 12:11:51 PM
A couple of things I've noticed thus far:
- moderators do not have the ability to delete shouts
- for some reason the mod(?) is looking for smiley's in /Smileys not /Smileys/default
Title: Re: nneonneo's Shoutbox
Post by: superboomz on January 02, 2007, 01:11:32 PM
Quote from: superboomz on January 01, 2007, 04:32:32 AM
Quote from: nneonneo on January 01, 2007, 03:51:19 AM
Quote from: superboomz on January 01, 2007, 12:18:02 AM
uhm..
i'm having a problem with the new 1.05 version.
the time stamp didn't show me corrent characters. (i'm using Thai lang and using the 'Today mod')

sorry to bother you again, nneonneo.
First thing to try is to click HideAdminLinks and see if the problem persists. I have not changed any of the timeformat handling code since 1.04.
Does 1.04 also have this problem?

tried click HideAdminLinks but nothing changed.
i haven't tested 1.04 (i jumped from 1.03 to 1.05) but i think it also have this prob too.

as you see in the picture above this post, the unreadable characters should be the word "Today" in Thai language but it doesn't.
so, if it can't be fixed to appear as my language,
is there the way to remove the date (only show the time) without changing timestamp in profile or smf options.

many thanks and sorry for my bad english :-X
It may have to do with encodings. By default, the shoutbox uses "UTF-8" (Unicode, 8 bit) encoding. If there is a Thai-specific encoding, it may conflict with UTF-8, causing unrecognized characters to appear.
There are (AFAIK) a few ways around this.
First, you could try getting a Unicode version of the Today mod (Unicode is technically better because of its ability to display almost any language).
If that's not possible, you can manually edit yshout/yshout.php. Try to find out what encoding your forum or mod uses (not the shoutbox). This is probably "Thai (Windows)" or something; the code is "tis-620" for that I think. What you need to do is search for "utf-8" in yshout/yshout.php (without quotes) and replace every instance with tis-620 (or whatever encoding you find). That should remedy the problem (though it may render the existing history files rather strange looking).

If you are still getting a stuck "loading shoutbox..." message, please check your webserver error logs. There may be a conflict there, or perhaps some misconfiguration that prevents the shoutbox PHP code from running.


BTW: I'm going on vacation from the 2nd to the 8th of January, so I won't be here to answer queries. Please direct your questions to nneonneo {at} gmail *dot* com, or send them via PM here on the community forum.
[/quote]

i tried change the language pack to unicode version.
so, it works fine now :D
thank you very much for your kindly support and for great mod !!
Title: Re: nneonneo's Shoutbox
Post by: Flying Drupalist on January 02, 2007, 02:58:40 PM
How do we set guests to view shoutbox? Thanks.
Title: Re: nneonneo's Shoutbox
Post by: DarioX on January 02, 2007, 03:50:24 PM
this is a wonderful shoutbox! great work nneonneo  ;)

I have just a small problem!
when I try to shout something something I get this problem:
Write error (writeLine); aborted

why? how can I solve it?

Thnk you very much :)
Title: Re: nneonneo's Shoutbox
Post by: starsong on January 03, 2007, 12:06:40 AM
Quote from: akulion on December 27, 2006, 11:13:46 PM
ok for those who want a demo u can see it on:
http://path-to-peace.com/forum
user: test
pass: test
Please note: kindly do not abuse this test account or post links using it!

As for custom theme modification, simply follow these instructions - Keep in mind! --> Not all themes are structured the same, so if the search for a code dosent give anything, try searching for a single line from that code until you find it and compare it to make sure it is pretty much the same! Small differences will exist!

This custom modification code is being posted up by reuest - im sure others will find it useful too.

Rule 1: Make a backup of your index.template.php file from your themes folder 1st!!!!

Then follow this:

Search for:

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';


ADD UNDER it:

// YSHOUT HERE
if($context['user']['is_logged'])
echo '
<script src="yshout/js/prototype.js" type="text/javascript"></script>
<script src="yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="yshout/js/behaviour.js" type="text/javascript"></script>
<script src="yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
',empty($options['collapse_header']) ? 'loadChat();':'','
}, { "yshout":"id"});

</script>
<script src="yshout/js/yshout.js?Oct112006" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END


Search for:

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";


here ur search is LIKELY to fail, so I recommend searching for // Guests don't have theme options!! and comparing the code until u get to the last line of the above posted code.

And the ADD AFTER it:

// YSHOUT HERE
document.getElementById("yshout").style.display = mode ? "none" : "";
if(!mode)
{
loadChat();
}
// YSHOUT END


Finally comes the tricky part.
In different themes you may or may not have a user info area!
So incase the top userinfo area dosent exist then u will have to compensate and add this code somewhere where you would like to show the shoutbox.
THIS is the code which will finally display the shoutbox

Search for:

if (!empty($context['user']['total_time_logged_in']))
{
echo '
', $txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}


Add after it:

// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END


THE END OF MODIFICATIONS!

Please note the colors for the text and all the rest of the stuff can be changed in the 1st part of the code posted - the css section specifies the colors.

enjoy

When trying to do the above I was unable to find any of the specified ares...
I have zipped the index.templete.php if anyone can help me...

TY

[email protected]
Title: Re: nneonneo's Shoutbox
Post by: Gobo on January 03, 2007, 12:31:42 AM
which version are u using jodi?

1.05 ?
Title: Re: nneonneo's Shoutbox
Post by: Gobo on January 03, 2007, 12:58:43 AM
anyways whichever version u may be using just be sure to make a backup of ur index.template.php file before trying out the one attached to my post

here i modified it for u:
Title: Re: nneonneo's Shoutbox
Post by: DarioX on January 03, 2007, 08:12:14 AM
Quote from: DarioX on January 02, 2007, 03:50:24 PM
this is a wonderful shoutbox! great work nneonneo  ;)

I have just a small problem!
when I try to shout something something I get this problem:
Write error (writeLine); aborted

why? how can I solve it?

Thnk you very much :)

Nobody can help me? :(
I'm using version 1.05
Title: Re: nneonneo's Shoutbox
Post by: starsong on January 03, 2007, 11:34:15 AM
Quote from: akulion on January 03, 2007, 12:58:43 AM
anyways whichever version u may be using just be sure to make a backup of ur index.template.php file before trying out the one attached to my post

here i modified it for u:


Ty so very much. I did do a backup.
And the version is 1.5

This works great!

Happy New year!

Now I just need to find out where to add the babblefish in this theme and I am set! wooot
I was told the Index templete.. but it doesnt seem to work....
I addded it at the bottom. They didnt say where to add it. LOl I need where when how and whys...Lmao
Title: Re: nneonneo's Shoutbox
Post by: Flying Drupalist on January 03, 2007, 12:32:57 PM
Is there no way to set guest viewing? Thanks.
Title: Re: nneonneo's Shoutbox
Post by: Mark Thomas on January 03, 2007, 02:31:09 PM
One more thing I've noticed. When someone uses the '/me' function the 'ban' option next to their shout is gone.

Mind you I am not complaining, just pointing these things out for the benefit of the creator.
Title: Re: nneonneo's Shoutbox
Post by: Naberius on January 03, 2007, 03:22:00 PM
This mod really slowed my forum down, to the point it where it was unusable. Sorry dude.
Title: Re: nneonneo's Shoutbox
Post by: RvG on January 04, 2007, 02:32:40 PM
Quote from: AMBA on January 03, 2007, 03:22:00 PM
This mod really slowed my forum down, to the point it where it was unusable. Sorry dude.

it seems yes it was... especially if you have onlined users 100+ but still I have to investigate further.  ;D
Title: Re: nneonneo's Shoutbox
Post by: powerPT on January 04, 2007, 05:38:32 PM
Wooooo, this mod slowed my forum down too! And with 1 or 2 users online!  :(
Title: Re: nneonneo's Shoutbox
Post by: powerPT on January 05, 2007, 08:00:10 AM
How I can dele some part of history file? I thing that is this that make the forum slowed! If the history.tct was reset x in x time was great, keeping some lines, the last ones  :D
Title: Re: nneonneo's Shoutbox
Post by: Gobo on January 05, 2007, 09:56:14 AM
everything runs fine for me with no problems or slowing down.

I think u guys need to poke ur host for some answers
Title: Re: nneonneo's Shoutbox
Post by: Tuut on January 05, 2007, 11:31:25 AM
my apache uses 60%-100%cpu with this mod installed.  that's why my forum is very slow :(.
Title: Re: nneonneo's Shoutbox
Post by: dmz_pt on January 05, 2007, 11:43:03 AM
Quote from: RvG on January 01, 2007, 11:39:15 AM
Quote from: Miraploy on January 01, 2007, 11:02:15 AM
Quote from: starsong on December 29, 2006, 09:44:16 PM
I cant seem to get passed the Shoutbox loading....

I have this same problem. It says shoutbox is loading... And then doesn't.

try to chmod yshout.php to 755.  ;)

Thanks man.
Nice work.
Title: Re: nneonneo's Shoutbox
Post by: Riotblade on January 05, 2007, 11:00:21 PM
Me and my buddy were playing around and she banned me.  We tried /banuser -u Riotblade and it said that I was unbanned but I wasn't.  Is there any other way to manage this?

Also, I see that it gets stuck at loading whenever I go to another page besides the main page.  This only occurs with the latest update of Firefox :(

Thanks
Title: Re: nneonneo's Shoutbox
Post by: buileminh on January 06, 2007, 01:14:33 AM
I have not installed it yet but in a demo, it is a vertical shoutbox. Is a horizontal version available? If not, please tell me how to change it to horizontal shoutbox. Thank you in advance.
Title: Re: nneonneo's Shoutbox
Post by: Gobo on January 06, 2007, 01:31:11 AM
by default its horizontal

in the demo i put its modified to be a vertical one
Title: Re: nneonneo's Shoutbox
Post by: dmz_pt on January 06, 2007, 01:35:38 PM
Hello again.

After using it for a couple of hours without problems i notice that connection to db are overloaded and in a few minutes a got the SMF message "Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later."

My Server Status report are:
Processes by CPU:     php (17) 88.3%, (other) (3) 0.0%
Memory usage:    68.273% (1415436k / 2073192k)
Swap: 0.398% (8148k / 2048276k)
MySQL processes
Total processes:    3 (2 sleeping, 1 running, 0 locked)

I will try other ShoutBox, maybe a lighter one.

Bottom Line: Nice work, it install and unistall very very easily and looks great. With me works on SMF 1.1.1 default theme and PHP 4.4.4.

Cheers
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on January 06, 2007, 04:44:10 PM
Hi! Nice work BTW!

Still I have problem with smilies, they don't show as a icon just as a tooltip :( What can I do to correct this? Link to forum  www.cromobilesound.com/forum/

tnx
Title: Re: nneonneo's Shoutbox
Post by: OrangeStar on January 07, 2007, 02:18:41 PM
I installed this and it didnt work it just says
Shout Box

...loading shoutbox...

so when I tryed uninstalled it, it still showed
Shout Box

...loading shoutbox...

and I deleted the package to see if it would go away but its still up there and it shows 2 shoutboxes that both say loading shoutbox. so how do I get them off?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on January 07, 2007, 08:06:47 PM
Quote from: Riotblade on January 05, 2007, 11:00:21 PM
Me and my buddy were playing around and she banned me.  We tried /banuser -u Riotblade and it said that I was unbanned but I wasn't.  Is there any other way to manage this?

Also, I see that it gets stuck at loading whenever I go to another page besides the main page.  This only occurs with the latest update of Firefox :(

Thanks
Be careful with playing around like that. I don't know why it will not actually unban u.
Anyway tell the admin to type /banlist in the chat then tell the admin to click on your username and it will unban you. If it doesnt work ask nneonneo
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 07, 2007, 09:43:22 PM
@DarioX: If you get a writeLine aborted error, it's probably PHP being unable to write the chat file. Try to chmod the yshout/chats folder to 777.

@<Anyone with speed/efficiency problems>: If it slows down significantly, I recommend getting a PHP-accelerator (eAccelerator, Turck, etc. will work fine; this has been tested on eAccelerator but any non-broken caching extension should work). This script is called very often, and with hundreds of members this can be many times a second. A PHP accelerator will ensure that it runs very fast (FYI my personal benchmarks suggest that you would get a 80% speed increase _at least_ over a non-accelerated installation). If you can't install an accelerator, then I'm afraid you will have to use a different shoutbox, as the AJAX functionality does demand a fair bit of processing power, I suppose.

@Miraploy: Guest posting is disabled for a few reasons; mainly it is because it is harder to track guests (though I guess I could use base36 IPs like other shoutboxes). If you want that, you might be better off with a different shoutbox.

@Mark Thomas: This behaviour is intentional. It results from the way "/me" shouts are written to file.

@Riotblade: I'm pretty sure the command is "/banuser u Riotblade" (no "-" before the "u"), so that might be the problem...I'm not 100% sure though.

@OrangeStar: Did it say "Test Failed" on any installation/uninstallation? I highly doubt that SMF's package manager would insert the code twice unless there is some sort of bug in the PM or my mod install file.
Title: Re: nneonneo's Shoutbox
Post by: Greengoat on January 08, 2007, 03:39:13 AM
Quote from: nneonneo on January 07, 2007, 09:43:22 PM
@<Anyone with speed/efficiency problems>: If it slows down significantly, I recommend getting a PHP-accelerator (eAccelerator, Turck, etc. will work fine; this has been tested on eAccelerator but any non-broken caching extension should work). This script is called very often, and with hundreds of members this can be many times a second. A PHP accelerator will ensure that it runs very fast (FYI my personal benchmarks suggest that you would get a 80% speed increase _at least_ over a non-accelerated installation). If you can't install an accelerator, then I'm afraid you will have to use a different shoutbox, as the AJAX functionality does demand a fair bit of processing power, I suppose.

Great mod.  I like the way it places itself inside the user box by default.  One thing, I fall under that "<Anyone with speed/efficiency problems>" category.  Not so much that the forum slows down but users running on dial-up experience a slowdown.  This is because of the constant 50 to over a 1000 bytes moving without doing a single thing other than having the window open.  As soon as you minimize the user box, thus effectively closing the shout box, the bandwidth draw drops down to zero.  Is there anyway to change the SB so that it only refreshes every 10-15 seconds?

Thanks.
Title: Re: nneonneo's Shoutbox
Post by: Gobo on January 08, 2007, 04:30:40 AM
i saw a feature on the IPB ajax shoutbox which could be helpful here if it can be implemented

If the user is idle for more than 1 minute, the shoutbox shutsdown displaying a message saying u have been idle for over 1 min and a button saying "click here to resume"

could come in handy
Title: Re: nneonneo's Shoutbox
Post by: OrangeStar on January 08, 2007, 07:04:21 AM
Quote from: nneonneo on January 07, 2007, 09:43:22 PM
@OrangeStar: Did it say "Test Failed" on any installation/uninstallation? I highly doubt that SMF's package manager would insert the code twice unless there is some sort of bug in the PM or my mod install file.
yeah it did but I ignored it and still installed it, I don't know what file it was thought
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 08, 2007, 11:20:16 AM
Probably index.template.php. If it fails, that means that it could not remove the code fragment, so you will have to restore that file from backup.

If you want to change the refresh rate, see yshout/js/yshout.js. Change the "1" in "var floodTime = 1;" to any other desired time, in seconds. Be warned that very high values will make the shoutbox hard to use for users (something like 1-5 is recommended, and anything over 10 seconds might be too high; though this is all up to the administrator anyway).

BTW: The shoutbox sends almost no data when inactive; most of the bandwidth drain will come from the requests to the server (since there is a lot of cookie data and stuff in the request headers).
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on January 08, 2007, 11:21:09 AM
hi again!

If any1 can spare some time to login to my forum and see whay smilyes don't showup. Tnx

login: tester pass: tester

In attch. is my history, in link to smiley are two // and between should be classic  :(
Title: Re: nneonneo's Shoutbox
Post by: buhaychat.com on January 08, 2007, 11:58:24 AM
I got it working on my 1.1.1 custom theme but I'm not too fond of the location of the shoutbox.

Great mod though! :)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 08, 2007, 12:07:37 PM
Quote from: Zwerko on January 08, 2007, 11:21:09 AM
hi again!

If any1 can spare some time to login to my forum and see whay smilyes don't showup. Tnx

login: tester pass: tester

In attch. is my history, in link to smiley are two // and between should be classic  :(


Check for any error messages; there might be a problem accessing the parser. I personally do not know what might cause this.
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on January 08, 2007, 12:30:42 PM
all clear, nothing related to shoutbox :(  I have tried completely erase/delete then fresh reinstall but no progress.. Can I send u any file to see if something in code is wrong? tnx
Title: Re: nneonneo's Shoutbox
Post by: bigmohi on January 08, 2007, 12:53:36 PM
why this mod show the members ip?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on January 08, 2007, 06:01:42 PM
Suggestions for future version
-Delete single posts from shoutbox itself with command or just a link like ban
I will edit this message and add more when i think of more. :D
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 08, 2007, 07:45:26 PM
@brianjw: Delete link already in 0.5
@bigmohi: Fixed in 0.5 (IP visible only to admins now)
Title: Re: nneonneo's Shoutbox
Post by: Greengoat on January 08, 2007, 08:52:20 PM
Nice mod.  I have turned the refresh rate down to 10, or up as it may.  Now the board seems to jump between 150 and high 600 bytes.  This is nothing to anyone on anything faster than dial-up.  But people on dial-up every little bit counts.  It's still worth it, believe me.  I really like the mod.  I was just wondering what would/could happen if you go beyond the 10 second mark?  And if I have it set to refresh every 10 seconds why is it a constant flow of data?  Just wondering.
Title: Re: nneonneo's Shoutbox
Post by: belaferon on January 09, 2007, 06:26:30 AM
how i can added this shoutbox in Dilber Multicolor theme?
Title: Re: nneonneo's Shoutbox
Post by: pariofdreamz on January 09, 2007, 07:14:40 AM
Its A nice one but can u pls tell me how can i use it with Dilber MC Theme by HarzeM :( PLSSSSSS:((

I want to add it on http://forums.parilok.org

:( :( :( :( :( :(
Title: Re: nneonneo's Shoutbox
Post by: belaferon on January 09, 2007, 09:32:19 AM
Quote from: pariofdreamz on January 09, 2007, 07:14:40 AM
Its A nice one but can u pls tell me how can i use it with Dilber MC Theme by HarzeM :( PLSSSSSS:((

I want to add it on http://forums.parilok.org

:( :( :( :( :( :(
Quote from: belaferon on January 09, 2007, 06:26:30 AM
how i can added this shoutbox in Dilber Multicolor theme?

Use this code in index.template.php

// YSHOUT HERE
if($context['user']['is_logged'])
echo '
<script src="yshout/js/prototype.js" type="text/javascript"></script>
<script src="yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="yshout/js/behaviour.js" type="text/javascript"></script>
<script src="yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
',empty($options['collapse_header']) ? 'loadChat();':'','
}, { "yshout":"id"});

</script>
<script src="yshout/js/yshout.js?Oct112006" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END




// YSHOUT HERE
document.getElementById("yshout").style.display = mode ? "none" : "";
if(!mode)
{
loadChat();
}
// YSHOUT END


and


// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END

Title: Re: nneonneo's Shoutbox
Post by: Zwerko on January 09, 2007, 03:15:46 PM
I found cause of my problem (smilies don't show up) - one of my admins has manually(over FTP) deleted file home.txt , and after this unthinking move box is no longer the same....
2 nneonneo : If this scenario help you to solve this "bug" it will be charm  ;D
Title: Re: nneonneo's Shoutbox
Post by: maxprofit on January 09, 2007, 03:27:35 PM
I tried the above code but I still can not make it work with Dilber MC Theme by HarzeM . Switching out of Dilber to SMF default theme works well.

As most, I like Dilber MC Theme best.

:(
Title: Re: nneonneo's Shoutbox
Post by: Cokeman on January 09, 2007, 04:52:46 PM
I just added this mod, love it so far. It's the only one that I got to work so thats a huge plus. Now if i could do 1 thing.

Is it possible to make it were it has a scrollong window? Instead of stretching the user area
or
Is it possible to move it to a location directly above the boards with a scrolling window?

i like the first idea best if thats possible. If I could have the window show the last 4 lines.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 09, 2007, 09:08:47 PM
@Cokeman: If you want last 4 lines, edit yshout/yshout.php and change $max_lines=12 to some other value ($max_lines=4).

For scrollbars, add this code to index.template.php before "#yshout":
#yshout #shouts {
overflow: auto;
height: 100px;
}

Height parameter can be anything you want (in pixels; px must follow). You can also add width, if you so desire, etc. etc.

@Greengoat: Well, I don't quite know why the constant stream of bandwidth occurs, but you could try changing yshout.js?Oct112006 to something like "yshout.js?Jan092007" which causes the page to be recached. Some browsers, like Opera, cache extensively, causing them to fail to see new changes. AFAIK, setting a refresh rate higher than 10 seconds would cause a lack of interactivity, which is something that I see frequently on my boards (e.g. using the SB as a quick and simple form of instant messaging, for example to ask quick questions to all available board members).

@Zwerko: So, is the smileys thing fixed? I looked at my code, and can find no reason for said problem. Check the forum error logs and PM/email any errors you see: some may not appear to be SB related, but they just might be. I suspect some kind of array index error, since PHP assumes default empty strings "" in cases of invalid indices.

@<Dilber MC users>: Follow the steps at http://www.simplemachines.org/community/index.php?topic=137508.msg878923#msg878923. I have checked the latest Dilber MC release and verified that this should work.
Title: Re: nneonneo's Shoutbox
Post by: Greengoat on January 09, 2007, 09:36:13 PM
Quote from: nneonneo on January 09, 2007, 09:08:47 PM
@Greengoat: Well, I don't quite know why the constant stream of bandwidth occurs, but you could try changing yshout.js?Oct112006 to something like "yshout.js?Jan092007" which causes the page to be recached. Some browsers, like Opera, cache extensively, causing them to fail to see new changes. AFAIK, setting a refresh rate higher than 10 seconds would cause a lack of interactivity, which is something that I see frequently on my boards (e.g. using the SB as a quick and simple form of instant messaging, for example to ask quick questions to all available board members).

First off, thanks for your patience with us all and taking the time to address each problem.

I now see what you are talking about with not going over 10 seconds.  It has nothing to do with a software incompatibility.  See, our board isn't very busy and we seldom get into quick discussions in the shout box.  We use it more for an open ended conversation about little things.  Seldom do we find the conversation going back and forth.  Out of 180 members only 50 are active daily and of those about 20 post on a daily basis.  So it doesn't matter if the SB isn't refreshing at an instant messenger level.

BTW I run Firefox 2.0 and if I understand it the cache should be almost empty since I just installed it the other day.

Thanks for the mod and the help.  :)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 09, 2007, 09:45:19 PM
If there's still a constant flow of data to the server, it could possibly indicate multiple asynchronous requests to the server from the client. If the browser is constantly requesting the page, as opposed to simply waiting 10 seconds between requests, then either my Javascript is wrong or Firefox has already cached the page.
If the client is making constant requests, try clearing the cache (Tools->Clear Private Data->Uncheck everything except Cache->Clear Private Data Now). Reload the page and see if that helps.
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on January 10, 2007, 11:15:53 AM
2 nneonneo: I will leave it for now, whitout smiley, thanks for trying
I have problem with chmod, I can change to 777(or any other) nothing in yshout directory. I have try editing history.home.txt but I can't upload it back to server :(
Title: Re: nneonneo's Shoutbox
Post by: texavery on January 10, 2007, 11:32:25 AM
Hello everybody

I've installd SMF forum and i would like to install Shoutbox.

I've installed nneonneo's Shoutbox but i've got a message like that in Shoutbox :

Shout Box


QuoteWarning: session_start() [function.session-start]: open(/mnt/125/sda/3/f/mysite/sessions/sess_d4b2392222bcf34934e856449521e50c, O_RDWR) failed: No such file or directory (2) in /mnt/125/sda/3/f/mysite/yshout/yshout.php on line 13

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /mnt/125/sda/3/f/mysite/yshout/yshout.php:13) in /mnt/125/sda/3/f/mysite/yshout/yshout.php on line 13

Warning: Cannot modify header information - headers already sent by (output started at /mnt/125/sda/3/f/mysite/yshout/yshout.php:13) in /mnt/125/sda/3/f/mysite/Sources/Subs-Auth.php on line 312

Warning: Cannot modify header information - headers already sent by (output started at /mnt/125/sda/3/f/mysite/yshout/yshout.php:13) in /mnt/125/sda/3/f/mysite/Sources/Subs-Auth.php on line 313

Warning: Cannot modify header information - headers already sent by (output started at /mnt/125/sda/3/f/mysite/yshout/yshout.php:13) in /mnt/125/sda/3/f/mysite/Sources/Subs-Auth.php on line 314
Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.
Warning: Unknown(): open(/mnt/125/sda/3/f/mysite/sessions/sess_d4b2392222bcf34934e856449521e50c, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/mnt/125/sda/3/f/mysite/sessions) in Unknown on line 0

Does somebody can help me?????
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 10, 2007, 08:23:35 PM
@texavery: looks like a permissions issue...maybe a server misconfiguration. I use session_start() to monitor certain aspects of the shoutbox operation. Contact your host and see if they know what is going on...

@Zwerko: Go to Admin-Packages->Options->Select "All files are writable." and hit Change File Permissions.
Title: Re: nneonneo's Shoutbox
Post by: sparky33 on January 11, 2007, 01:37:46 AM
Hi, I've instaled and it works fine on default theme, but how can I get it to work on Babylon theme?

Cheers
Title: Re: nneonneo's Shoutbox
Post by: The Re@l on January 11, 2007, 01:42:53 AM
Hello
I hope anyone can help me.
I installed the Shoutbox, The installation goes fast and easy, but I've got a little problem with the smilies.

As I type :) or :woot: , then I get no Smilie, in the preferences, I can see that the Link to the smilie is wrong.

It looks so ...... ....../smileys//smile.gif  .. the smile.gif lies in /smileys/default/smile.gif

Is there a solution, for the problem?

@ nneonneo, I like the shoutbox, it's a very nice Mod :)

P.S. sorry for my bad english, i hope you can understand what i mean...  ::)
Title: Re: nneonneo's Shoutbox
Post by: The Re@l on January 11, 2007, 01:46:44 AM
@ sparky.

http://www.simplemachines.org/community/index.php?topic=137508.msg878923#msg878923

I think this could help you. On this way i installed it on the manifest Theme.

cya
Title: Re: nneonneo's Shoutbox
Post by: sparky33 on January 11, 2007, 02:52:20 AM
Wahey, that worked, the instructions in the mod tell you to add the code before not after.
Title: Re: nneonneo's Shoutbox
Post by: livedown on January 11, 2007, 05:55:22 AM
Quote from: akulion on December 29, 2006, 09:27:09 AM
Quote from: YenLoWang on December 29, 2006, 09:08:48 AM
Okay, one more question...

After adding the Box to my custom Theme... is there any way to change the colors of the input-box and the input-text (as well as the colors of the username-box and -text).
When changing the css-code in yshout.css it does not change anything, and when changing it in index.template.php it is working fine for my Firefox, but it does not work for IE or Opera...

Thanks in advance for your help

Best regards
Yen


the CSS is laid out in the index.template.php for the shoutbox
change that and viola :D

Hi i tried to search for shoutbox in the index.template.php file but couldn't find anything about css styles. Please Help! I want to change the CSS Style.

here is my site LiveDown (http://www.livedown.us/forum)

The text inside the buttons and textbox look black and hard to see.
Title: nneonneo's AJAX ShoutBox
Post by: sparky33 on January 11, 2007, 07:20:21 AM
I've installed nneonneo's AJAX ShoutBox, and it works fine, to a point, when you enter a board it doesn't load and the bottom of the page says done but with errors on the page?
Title: Re: nneonneo's Shoutbox
Post by: Minare on January 11, 2007, 11:05:06 AM
I have installed the package, no error but no shoutbox as well

Do I have to do anything for my shoutbox to be seen on the board ?

Because nothing seems on the forum :D

Need help  :)
Title: Re: nneonneo's Shoutbox
Post by: sparky33 on January 11, 2007, 11:24:14 AM
You have to modify it manually, unzip the package file and open the install.xml file and follow the instructions.

Be warned though, I did this, and all seemed fine, but then it wouldn't load in threads and caused an error, it also slowed everything right down to a virtual stop, all was ok when I removed it, but the uninstall didn't remove it all and I had to use a back up to do it properly.
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on January 11, 2007, 12:03:24 PM
Quote from: nneonneo on January 10, 2007, 08:23:35 PM
@Zwerko: Go to Admin-Packages->Options->Select "All files are writable." and hit Change File Permissions.

Yesss that's it, u are THE man :)  Now i can manually insert missing folder in url in home.txt and history.home.txt
Title: Re: nneonneo's Shoutbox
Post by: Minare on January 11, 2007, 02:28:34 PM
Quote from: sparky33 on January 11, 2007, 11:24:14 AM
You have to modify it manually, unzip the package file and open the install.xml file and follow the instructions.

Be warned though, I did this, and all seemed fine, but then it wouldn't load in threads and caused an error, it also slowed everything right down to a virtual stop, all was ok when I removed it, but the uninstall didn't remove it all and I had to use a back up to do it properly.

Hımm, then it will be better for me to remove,Because I don't want to lose my forum,thanks for the warning ;)
Title: Re: nneonneo's Shoutbox
Post by: sparky33 on January 11, 2007, 02:49:23 PM
It could be that I did something wrong, though I'm sure I never, before making your mind up contact the author of the mod rather than take my experience as gospel, I'm a novice at this.
Title: Re: nneonneo's Shoutbox
Post by: Minare on January 11, 2007, 03:04:51 PM
Quote from: sparky33 on January 11, 2007, 02:49:23 PM
It could be that I did something wrong, though I'm sure I never, before making your mind up contact the author of the mod rather than take my experience as gospel, I'm a novice at this.

I see, but I smell some negativeness,that is maybe because I am also a novice and can't just throw my efforts after taking so much way ;)
Have a nice smf time
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on January 11, 2007, 05:10:01 PM
Quote from: Zwerko on January 11, 2007, 12:03:24 PM
Quote from: nneonneo on January 10, 2007, 08:23:35 PM
@Zwerko: Go to Admin-Packages->Options->Select "All files are writable." and hit Change File Permissions.

Yesss that's it, u are THE man :)  Now i can manually insert missing folder in url in home.txt and history.home.txt

Smileys thing is fixed, I hope :) After I have manually add missing folder the smileys jump again. Tnx nneonneo for this last tip ;)
Title: Re: nneonneo's Shoutbox
Post by: avidum on January 11, 2007, 09:11:42 PM
Can someone tell me what do you have to do after installing this, should there be a code? I don't have a clue what to do. Thanks.
Title: Re: nneonneo's Shoutbox
Post by: livedown on January 11, 2007, 10:03:50 PM
Quote from: akulion on December 29, 2006, 09:27:09 AM
Quote from: YenLoWang on December 29, 2006, 09:08:48 AM
Okay, one more question...

After adding the Box to my custom Theme... is there any way to change the colors of the input-box and the input-text (as well as the colors of the username-box and -text).
When changing the css-code in yshout.css it does not change anything, and when changing it in index.template.php it is working fine for my Firefox, but it does not work for IE or Opera...

Thanks in advance for your help

Best regards
Yen


the CSS is laid out in the index.template.php for the shoutbox
change that and viola :D

Hi i tried to search for shoutbox in the index.template.php file but couldn't find anything about css styles. Please Help! I want to change the CSS Style.

here is my site LiveDown (http://www.livedown.us/forum)

The text inside the buttons and textbox look black and hard to see.
Title: Re: nneonneo's Shoutbox
Post by: Beatrix on January 12, 2007, 09:10:17 AM
How can I change the position of the shoutbox? I would like to place it under the top horizontal menu (  Forum Help Search Profile My Messages Calendar Members Logout) and just above the forums.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on January 12, 2007, 11:12:25 AM
I am from the us and would like the time zone to say US Eastern.

How is this done and in which file?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 12, 2007, 02:41:03 PM
Quote from: brianjw on January 12, 2007, 11:12:25 AM
I am from the us and would like the time zone to say US Eastern.

How is this done and in which file?
The shoutbox determines the appropriate time to display (1.04 or later) by using the forum time and the user time. If you want to have US Eastern, set your personal preferences (Look and Layout prefs, I think) to the appropriate time offset.

Quote from: Beatrix on January 12, 2007, 09:10:17 AM
How can I change the position of the shoutbox? I would like to place it under the top horizontal menu (  Forum Help Search Profile My Messages Calendar Members Logout) and just above the forums.
In index.template.php, try to locate the <div id="yshout"> piece of code (in between //YSHOUT HERE and //YSHOUT END so you know where to cut). Move that piece to another location, wrapping it in a div/table/what-have-you if desired. Voila, a moved shoutbox.

Quote from: www.livedown.us on January 11, 2007, 10:03:50 PM
Quote from: akulion on December 29, 2006, 09:27:09 AM
Quote from: YenLoWang on December 29, 2006, 09:08:48 AM
Okay, one more question...

After adding the Box to my custom Theme... is there any way to change the colors of the input-box and the input-text (as well as the colors of the username-box and -text).
When changing the css-code in yshout.css it does not change anything, and when changing it in index.template.php it is working fine for my Firefox, but it does not work for IE or Opera...

Thanks in advance for your help

Best regards
Yen


the CSS is laid out in the index.template.php for the shoutbox
change that and viola :D

Hi i tried to search for shoutbox in the index.template.php file but couldn't find anything about css styles. Please Help! I want to change the CSS Style.

here is my site LiveDown (http://www.livedown.us/forum)

The text inside the buttons and textbox look black and hard to see.
Look for "yshout/js/yshout.js?Oct112006" in index.template.php; a few lines down is the CSS.

Quote from: avidum on January 11, 2007, 09:11:42 PM
Can someone tell me what do you have to do after installing this, should there be a code? I don't have a clue what to do. Thanks.
If you are not using default theme, try http://www.simplemachines.org/community/index.php?topic=137508.msg878923#msg878923

Quote from: minare on January 11, 2007, 03:04:51 PM
Quote from: sparky33 on January 11, 2007, 02:49:23 PM
It could be that I did something wrong, though I'm sure I never, before making your mind up contact the author of the mod rather than take my experience as gospel, I'm a novice at this.

I see, but I smell some negativeness,that is maybe because I am also a novice and can't just throw my efforts after taking so much way ;)
Have a nice smf time
Try the link I posted above (http://www.simplemachines.org/community/index.php?topic=137508.msg878923#msg878923) for installation to non-default themes.

Quote from: sparky33 on January 11, 2007, 07:20:21 AM
I've installed nneonneo's AJAX ShoutBox, and it works fine, to a point, when you enter a board it doesn't load and the bottom of the page says done but with errors on the page?
Are you using search engine friendly URLs? If so, this mod does not currently work on those URLs because of relative links. I will try to find a way around it; meanwhile I would suggest using a different mod or something. Sorry about the trouble :(
Title: Re: nneonneo's Shoutbox
Post by: sparky33 on January 12, 2007, 05:23:18 PM
I appreciate the hard work you put into developing these mods, but I've installed tiny portal now which has a shoutbox built in.
Title: Re: nneonneo's Shoutbox
Post by: rolli on January 13, 2007, 11:52:23 AM
Hi there, first of all thanxx for this great mod. Installation works fine, also the shoutbox selve for logged in user. But one question, how can i mange that guest can see the shoutbox ( not posting, yust viewieng )

Thanxx for your help,

Rolli
Title: Re: nneonneo's Shoutbox
Post by: iyeru42 on January 13, 2007, 02:54:37 PM
Modification says "...Loading Shoutbox..." but never loads, had to un-install.
Title: Re: nneonneo's Shoutbox
Post by: sparky33 on January 13, 2007, 03:29:19 PM
I'd recommend installing tiny portal, it's excellent and has a shoutbox built in, take a look at my site. www.coupe-club.org.uk/smf
Title: Re: nneonneo's Shoutbox
Post by: iyeru42 on January 13, 2007, 03:53:16 PM
Where's tiny portal download able for SMF? Doubtful the shoutbox is global though
Title: Re: nneonneo's Shoutbox
Post by: sparky33 on January 13, 2007, 05:15:05 PM
http://www.tinyportal.net/index.php?PHPSESSID=9cc02e7024a7be1eaa12e38882970f01;www

It's designed for SMF and it works with many themes, I use Babylon, it installs as a package
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 13, 2007, 06:04:34 PM
@rolli: I did not add guest functionality to the shoutbox; this will probably appear in a future version. For now, if yuo must have guest functionality, I would say that my shoutbox may not be best :(

@iyeru42: If you want to use TinyPortal, go ahead. If you wish to use mine, I would recommend checking the web server error logs; PHP is probably disliking my script somehow.
Title: Re: nneonneo's Shoutbox
Post by: iyeru42 on January 13, 2007, 06:18:13 PM
My PHP error logs are only accessed via FTP and I don't currently have an FTP client atm, nor do I have time to download one.

(Not only that, but my primary mode of Internet is Dial-up. Since I can't afford cable on just about 610 USD  /mo (before food/bills but after rent.))
Title: Re: nneonneo's Shoutbox
Post by: ss2man44 on January 13, 2007, 06:48:03 PM
Quote from: akulion on December 28, 2006, 12:26:03 AM

So to fix this theme glitch (we can call it)
do this:

the last part of the modification I gave, u shold add it as follows:

if ($context['user']['is_guest'])
echo'';
else
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END


and that will take care of that issue

A better way to do that is to use this code:

// YSHOUT HERE
if($context['user']['is_logged'])
{
echo '
<br /><b>Shoutbox</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
}
if($context['user']['is_guest'])
{
echo '
<br /><b>Shoutbox</b><br />
<i>You must be logged in to view the shoutbox.</i>';
}
// YSHOUT END


It will notify the guest that he/she needs to log in.
Title: Re: nneonneo's Shoutbox
Post by: d1m0n on January 14, 2007, 03:20:58 PM
Hello there, this shout box rulz ^^
Im using my custom theme "DilberMC"
But i have 1 little problem, that all alined to the left side  ::)

Screenshoot:
(http://img172.imageshack.us/img172/7277/01132007211523ou5.th.png) (http://img172.imageshack.us/my.php?image=01132007211523ou5.png)

index.template.php:
<?php
// Version: 1.1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
 echo '
 <link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>'
;

//This is for the pop menus
echo '
<script type="text/javascript">

/***********************************************
* Drop Down/ Overlapping Content- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function overlay(curobj, subobjstr, opt_position){
if (document.getElementById){
var subobj=document.getElementById(subobjstr)
subobj.style.display=(subobj.style.display!="block")? "block" : "none"
var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0) 
var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)
subobj.style.left=xpos+"px"
subobj.style.top=ypos+"px"
return false
}
else
return true
}

function overlayclose(subobj){
document.getElementById(subobj).style.display="none"
}

</script>'
;
echo '
</head>
<body>'
;

echo '
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="top-logo"><img src="'
$settings['images_url'], '/logo.jpg" width="358" height="91" alt="SlickPro Graphite" title="SlickPro Graphite" /></td>
</tr>
<tr>
<td width="100%" align="left" valign="top" style="padding:0 30px 0 30px;">'
;

echo '
<div class="tborder" '
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' '''>';


// display user name
echo '
<table width="100%" cellspacing="1" cellpadding="5" class="bordercolor" border="0" >
<tr>'
;

echo '
<td class="windowbg2" width="100%" valign="middle" align="left">
'
theme_linktree2(), '
</td>'
;

echo '
<td width="250" valign="top" class="windowbg"><span class="middletext" style="display:block;width:250px;">'
;

if($context['user']['is_logged'])
{
echo '
<strong>Welcome, '
$context['user']['name'] , '.</strong><br />';
}

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
{
echo ((isset($current_action) && $curent_action == 'pm') || $context['browser']['is_ie4']) ? '' '' '
<a href="'
$scripturl'?action=pm">Private Messages</a>: '$context['user']['unread_messages'], ' Unread, '$context['user']['messages'], ' Total.<br />';
}

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
$txt['totalTimeLogged1'], '<br />';

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<table border="0" cellpadding="1" cellspacing="0">
<tr>
<td>Username:</td>
<td><input type="text" name="user" size="10" /></td>
<td><select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="43200">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="passwrd" size="10" /></td>
<td><input type="submit" value="'
$txt[34], '" /></td>
</tr>
</table>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</span>
</td>
</tr>
</table>'
;

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ''' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;


echo '
<td width="90%" class="column-title">
'
template_menu(), '
</td>'
;
echo '
</tr>
</table>
</div>'
;


// The main content should go here.
echo '
<div id="bodyarea">'
;

// If you want to put some ads or something on your pages, add them in this.
echo '
<div id="blank-box"></div>'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="left" class="copyright-links">
Theme by <a href="http://www.m3talc0re.com/" target="_blank" style="font-size:10px;">m3talc0re</a>.
</td>
<td valign="middle" align="center" style="white-space: nowrap;" class="copyright-links">
'
theme_copyright(), '
</td>
<td width="28%" valign="middle" align="right" class="copyright-links">
<a href="http://www.mysql.com/" target="_blank" style="font-size:10px;">MySQL</a>&nbsp;|&nbsp;<a href="http://www.php.net/" target="_blank" style="font-size:10px;">PHP</a>&nbsp;|&nbsp;<a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a>&nbsp;|&nbsp;<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank" style="font-size:10px;">CSS</a>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div></td></tr></table>'
;

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// If the user is logged in, display stuff like their  new messages, etc...
function theme_newestlink()
{
global $context$settings$options$scripturl$txt;

if ($context['user']['is_logged'])
{
echo '
<a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a>&nbsp;|&nbsp;<a href="'$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a>';

}
// Otherwise they're a guest - send them a lovely greating...
else
echo $txt['welcome_guest'];
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".. THIS IS THE OLD ONE's FIX
function theme_linktree()
{
global $context$settings$options;

echo '<br />';
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".. THIS IS THE OLD ONE
function theme_linktreeOLD()
{
global $context$settings$options;

echo '<div class="nav-tree" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;text-align:center;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav-tree">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;&raquo;&nbsp;';
}

echo '</div>';
}

//Show a linktree (this one is a vB look alike, vB clone is below).
function theme_linktree2()
{
global $context$settings$options;

// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav-tree" style="font-size: smaller;">';

// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show pretty folder
if ($link_num == 0)
{
echo '<img src="' $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
}
else if ($link_num == 1)
{
echo '<img src="' $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" /><img src="' $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
}
else
{
echo '&raquo; ';
}

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav-tree">' $tree['name'] . '</a>' $tree['name'], '</b>';

if ($link_num == 0)
{
echo '<br />';
}
}

echo '</span>';
}

// Show a linktree (vB Clone).  This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree3()
{
  global $context$settings$options;

  // Folder style or inline?  Inline has a smaller font.
  echo '<span class="nav-tree">';

echo '<img src="' $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp;';

echo '<b><a class="nav-tree" href="http://www.webtechnica.com/">WebTechnica</a></b>&nbsp;&raquo;&nbsp;';

  // Each tree item has a URL and name.  Some may have extra_before and extra_after.
  foreach ($context['linktree'] as $link_num => $tree)
  {
 // Show something before the link?
 if (isset($tree['extra_before']))
echo $tree['extra_before'];

 if (($link_num == count($context['linktree']) - 1) && count($context['linktree'])>1)
echo '<br />
<img src="' 
$settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" /><img src="' $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp;';

 // Show the link, including a URL if it should have one.
 echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav-tree">' $tree['name'] . '</a>' $tree['name'], '</b>';

 // Show something after the link...?
 if (isset($tree['extra_after']))
echo $tree['extra_after'];

 // Don't show a separator for the last one.
 if ($link_num count($context['linktree']) - 2)
echo '&nbsp;&raquo;&nbsp;';

  }

  echo '</span>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>'
;

// Show the [home] button.
echo '
<td class="main-navigation"><a href="'
$scripturl'">' $txt[103] , '</a></td>';

// Show the [help] button.
echo '
<td class="main-navigation"><a href="'
$scripturl'?action=help">' $txt[119] , '</a></td>';

// How about the [search] button?
if ($context['allow_search'])
echo '
<td class="main-navigation"><a href="'
$scripturl'?action=search" onClick="return overlay(this, \'subcontent\',\'bottom\')">' $txt[182] , '<img src="'$settings['images_url'], '/search_down.gif" width="10" height="10" /></a>
<!--Do not remove outer most DIV tag with id="subcontent"-->
<DIV id="subcontent" style="position:absolute; border: 2px solid #3d3d3d; background-color: white; width: 210px; padding: 2px; display:none">
<table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td class="catbg" height="20" align="left" valign="middle" style="color:#ffffff;">Pesquisa rápida</td>
</tr>
<tr>
<td height="26" align="left" valign="middle" class="windowbg">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0;">
<input type="text" name="search" value="" style="width: 150px;" />&nbsp;
<input type="submit" name="submit" value="GO" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form></td>
</tr>
<tr>
<td height="20" align="center" valign="middle" class="windowbg"><a href="'
$scripturl'?action=search;advanced">Pesquisa Avançada</a></td>
</tr>
</table>
<div align="right" style="font-size:10px;"><a href="#" onClick="overlayclose(\'subcontent\'); return false">[Fechar]</a></div>

</DIV>
</td>'
;

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<td class="main-navigation"><a href="'
$scripturl'?action=admin">' $txt[2] , '</a></td>';

// The [calendar]!
if ($context['allow_calendar'])
echo '
<td class="main-navigation"><a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a></td>';

// the [member] list button
if ($context['allow_memberlist'])
echo '
<td class="main-navigation"><a href="'
$scripturl'?action=mlist">' $txt[331] , '</a></td>';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '
<td class="main-navigation"><a href="'
$scripturl'?action=login">' $txt[34] , '</a></td>';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '
<td class="main-navigation"><a href="'
$scripturl'?action=register">' $txt[97] , '</a></td>';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '
<td class="main-navigation"><a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a></td>';

// How about the [quick links] button?
if ($context['user']['is_logged'])
echo '
<td class="main-navigation"><a href="'
$scripturl'#quicklinks" onClick="return overlay(this, \'quicklinks\',\'bottomright\')">Links rápidos<img src="'$settings['images_url'], '/search_down.gif" width="10" height="10" /></a>
<!--Do not remove outer most DIV tag with id="quicklinks"-->
<DIV id="quicklinks" style="position:absolute; border: 2px solid #3d3d3d; background-color: white; width: 150px; padding: 2px; display:none">
<table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td class="catbg" height="20" align="left" valign="middle" style="color:#ffffff;">Links rápidos</td>
</tr>
<tr>
<td height="20" align="left" valign="middle" class="windowbg"><a href="'
$scripturl'?action=unread">Novos tópicos</a></td>
</tr>
<tr>
<td height="20" align="left" valign="middle" class="windowbg"><a href="'
$scripturl'?action=unreadreplies">Novas respostas</a></td>
</tr>
<tr>
<td class="catbg" height="20" align="left" valign="middle" style="color:#ffffff;">Configurações</td>
</tr>
<tr>
<td height="20" align="left" valign="middle" class="windowbg"><a href="'
$scripturl'?action=profile">Ver Perfil</a></td>
</tr>
<tr>
<td height="20" align="left" valign="middle" class="windowbg"><a href="'
$scripturl'?action=profile;u='$context['user']['id'], ';sa=account">Config da Conta</a></td>
</tr>
<tr>
<td height="20" align="left" valign="middle" class="windowbg"><a href="'
$scripturl'?action=profile;u='$context['user']['id'], ';sa=forumProfile">Editar Perfil</a></td>
</tr>
</table>
<div align="right" style="font-size:10px;"><a href="#" onClick="overlayclose(\'quicklinks\'); return false">[Fechar]</a></div>

</DIV>
</td>'
;

// The end of tab section.
echo '
</tr>
</table>'
;

}

// Generate a strip of buttons.
function TEXTLINKS_template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td height="40" valign="middle" class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>


Can anyone help me? thx.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on January 14, 2007, 04:34:03 PM
TP is good software but I have to say!!!!

I have to say that this shoutbox is way the hell better. The one on TP is not autorefreshing and u have to refresh manually to see new posts. I used the code akulion provided us to put this shoutbox in a block! :D
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 14, 2007, 05:33:38 PM
Quote from: d1m0n on January 14, 2007, 03:20:58 PM
Hello there, this shout box rulz ^^
Im using my custom theme "DilberMC"
But i have 1 little problem, that all alined to the left side  ::)

Screenshoot:
(http://img172.imageshack.us/img172/7277/01132007211523ou5.th.png) (http://img172.imageshack.us/my.php?image=01132007211523ou5.png)

index.template.php:
[snip]

Can anyone help me? thx.

I see that you've fixed the problem, great job! Forum looks nice ;)
Title: Re: nneonneo's Shoutbox
Post by: d1m0n on January 14, 2007, 05:36:27 PM
I solved my problem ^^ :P :D:D

Ok, who wants already edited index.template.php for Dilber MC theme its attached to this post ;)

Screenshoot:
(http://img207.imageshack.us/img207/4884/01142007223422qa9.th.png) (http://img207.imageshack.us/my.php?image=01142007223422qa9.png)

P.S: nneonneo I saw that you reply'ed fester than me :P thx anyway :) Good work m8 Keep It UP
Title: Re: nneonneo's Shoutbox
Post by: Daggers on January 15, 2007, 02:43:17 AM
Thanks to d1mon for the dilbur template  :D

But it just keeps saying 'You must be logged in to post' I have cleared cookies,etc but still nothing  :-[

Title: Re: nneonneo's Shoutbox
Post by: d1m0n on January 15, 2007, 05:07:36 AM
Daggers, no prob ^^

Now i have 1 prob too! Another 1...
in homedir/yshout/ apears file error_log

Error_log:
[15-Jan-2007 09:58:11] PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: open(/tmp/sess_a026b2d660323a050ef6bff5ca92f41d, O_RDWR) failed: Permission denied (13) in /myhome/mydir/public_html/yshout/yshout.php on line 13
[15-Jan-2007 09:58:11] PHP Warning:  Unknown(): open(/tmp/sess_a026b2d660323a050ef6bff5ca92f41d, O_RDWR) failed: Permission denied (13) in Unknown on line 0
[15-Jan-2007 09:58:11] PHP Warning:  Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0


Already CHMODED all stuff to 777... And created ...tmp/ directory, :o always the same, and the bad thing is that error_log file size is always rising! Always logging the same error :S
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 15, 2007, 03:18:37 PM
The webserver has no access to "/tmp" folder, where PHP keeps session data. I have no idea why that error might occur, but try creating "/tmp" (*not* tmp/) and chmod'ing it to 777.
Title: Re: nneonneo's Shoutbox
Post by: DJ Rg on January 16, 2007, 03:57:22 PM
I am liking this lite shout box and my members are liking it..

but how do i get rid of .... all history

thanks much..
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 16, 2007, 04:29:18 PM
Permanently, or temporarily? Temporarily, deleting yshout/chats/history.home.txt will do the trick.
Title: Re: nneonneo's Shoutbox
Post by: DJ Rg on January 16, 2007, 05:09:01 PM
Quote from: nneonneo on January 16, 2007, 04:29:18 PM
Permanently, or temporarily? Temporarily, deleting yshout/chats/history.home.txt will do the trick.

thanks nneonneo ..where do i find that?

EDIT: OK Found it ;)

Thanks again
Title: Re: nneonneo's Shoutbox
Post by: Gskellig on January 17, 2007, 02:36:04 AM
This is freaking awesome. I had like 8 problems to begin with, but after I worked out the bugs it worked BEAUTIFULLY! (This thread helped me a bunch).
Only thing that would be nice is a way for it to work with all themes without installation. Kinda forcing me to use one or two themes...
(I know it can't really be done I'm just throwing it out there)
If you guys want to preview... http://hatred.co.nr

Title: Re: nneonneo's Shoutbox
Post by: Vade on January 17, 2007, 10:14:41 AM
Hey, the mod looks amazing I've tried adding in it to the WoW-dk theme and managed to have it display however its crammed over on the right hand corner under the header, any ideas on how I could have it display on the left and preferably not tiny. :)
Title: Re: nneonneo's Shoutbox
Post by: Coronas on January 17, 2007, 06:41:36 PM
I love this mod...but...im getting an error when trying to install it. An error for the index.template.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 17, 2007, 07:06:05 PM
OK, can you send me your index.template.php (post, PM or e-mail)? I will try to see if any mods have modified the anchor code.
Title: Re: nneonneo's Shoutbox
Post by: chep on January 17, 2007, 09:43:35 PM
Quote from: akulion on December 27, 2006, 11:57:09 AM
installed and uninstalled for me just fine

but the position of the shoutbox is a bit awkward in my opinion


Amen - I dont want a shoutbox on the top of my page. Depending on the user community of course - but more mindless topics and discussions happen in the shoutboxes.

To me it would be a lot more suitable in the info center. How can I do that?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 18, 2007, 09:20:17 PM
OK, here is the code to put in BoardIndex.template.php. Find
// This is the "Recent Posts" bar.
Before that, add
// YSHOUT HERE
echo '
<tr>
<td class="titlebg" colspan="2">Shout Box</td>
</tr>
<tr>
<td class="windowbg2" id="yshout" colspan="2">...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
</td>
</tr>
';
// YSHOUT END


I have tested this on my forum and it does indeed work. Of course, you have to remove
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END
from index.template.php for this to work.
Make sure to backup the modified files.
Title: Re: nneonneo's Shoutbox
Post by: chep on January 19, 2007, 06:12:38 AM
Ok . That is where i want it.

Problem is that now it doesnt render a shoutbox.

Keep in mind I am using the black rain theme.

It just says "...loading shoutbox..."
Title: Re: nneonneo's Shoutbox
Post by: chep on January 19, 2007, 06:22:48 AM
Now I backed up my files and now I cannot uninstall this because of a problem in the default/index.template.php Weird. That's something on my end here... I'll have to restore back to last week's entire source backup now.

This paints a bigger picture for me though.

The mods are closely tied to the themes too much still. Hopefully future versions of SMF will allow code changes without too many theme changes for the most part. I've seen half a dozen threads declaring mods only work on default themes and such...
Title: Re: nneonneo's Shoutbox
Post by: Totosfo on January 19, 2007, 03:28:56 PM
Quote from: chep on January 19, 2007, 06:12:38 AM
Ok . That is where i want it.

Problem is that now it doesnt render a shoutbox.

Keep in mind I am using the black rain theme.

It just says "...loading shoutbox..."

I have the same problem as chep. My users would like to see the shoutbox below the board index in the info center as well. I implemented the changes you suggested (adding the lines to BoardIndex.template.php and removing them from index.template.php) and I now get the message ...loading shoutbox... only. The shoutbox worked perfectly before.

I'm using the default theme. Any help would be appreciated.

Thanks!

Thomas
Title: Re: nneonneo's Shoutbox
Post by: sparky33 on January 19, 2007, 07:30:17 PM
nneonneo, why don't you just put this in a box, would be so much better, it's too open and interfering, I appreciate the work you've put into it (I wouldn't even know where to start) but it seems it's not exactly user friendly
Title: Re: nneonneo's Shoutbox
Post by: chep on January 19, 2007, 07:56:39 PM
I truly think shoutbox, quick reply and gallery should just be out of the box features of any forum software. Something you can turn on if you want them :-) Maybe they will consider that some time. Just thinking out loud here. Also appreciating the efforts for free software. I am just a poor hack and dont have the time to invest writing entire mods even if I did have those skills.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 19, 2007, 10:18:12 PM
Hmm, I don't know why it might freeze or fail to load (it works on my forum but I did not test extensively).

Try this:
Change
<td class="windowbg2" id="yshout" colspan="2">...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
               </td>
To
<td class="windowbg2" colspan="2"><div id="yshout">...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
               </td>

and see if it works (some browsers may not like the first form)

FYI: errors in uninstallation are caused by the removal of the code fragment; undoing all changes (BoardIndex and index) will make it uninstallable.
Title: Re: nneonneo's Shoutbox
Post by: chep on January 20, 2007, 01:41:57 AM
I tried that too and it did not work for me. Oh well. Looks like a nice shout box.


Correct. I Could not un-install because I forgot where to replace this guy the first time.

Quote// YSHOUT HERE
      echo '
                     <br /><b>Shout Box</b><br /><br />
                     <div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
      // YSHOUT END
Title: Re: nneonneo's Shoutbox
Post by: Totosfo on January 20, 2007, 05:15:58 AM
Hi nneonneo,

it's working again, but maybe I've run into a bug (which occurs only when moving the sb to a different place):

If the header box (showing your stats, etc.) is visible, the shoutbox works well in the info center at the bottom. But as soon as the header box is collapsed, the sb in the info center displays '....loading shoutbox....' only again.

Somehow / somewhere there is still a link to the box at the top which needs to be broken or amended.

Thanks,

Thomas
Title: Re: nneonneo's Shoutbox
Post by: Daggers on January 20, 2007, 05:47:39 AM
I have loaded this into two themes, Dilbermc and AA_New_Damage with varying results.

I too prefer the shoutbox at the bottom and not at the top and have used the code from these forums to put it into place. I have come across 2 problems so far...

The ...loading Shoutbox... was only appearing when you were on the forums as a guest, once logged in this then displayed the posts.

Also, when it is working in AA_New_Damage, it is not completing the the path to the smileys  EG:  /Smileys//gbxsmile.gif when it should read /Smileys/{folder name}/gbxsmile.gif

I would really like to get this mod working within the themes because it looks like the best one out there.

Thanks in advance
Title: Re: nneonneo's Shoutbox
Post by: chep on January 20, 2007, 11:09:54 PM
Quote from: Totosfo on January 20, 2007, 05:15:58 AM
If the header box (showing your stats, etc.) is visible, the shoutbox works well in the info center at the bottom. But as soon as the header box is collapsed, the sb in the info center displays '....loading shoutbox....' only again.

Somehow / somewhere there is still a link to the box at the top which needs to be broken or amended.

About 80% of the time I have that closed. So that might be the reason why it didnt work for me earlier. I'll be waiting until it is figured out. Once it is, I will install it again. I like this shoutbox. It looks like it is better than the other ones for me. No offense to the other shout box crafters.
Title: Re: nneonneo's Shoutbox
Post by: xsharewarex on January 21, 2007, 09:46:14 AM
I have installed nneonneo's shoutbox successfully in my smf ver 1.1.1 but I am not sure how to activate it. I am not able to see the shoutbox in my forum above my boards.

Please help me out to activate this shoutbox.


Thanks & Regards
XsharewareX
Title: Re: nneonneo's Shoutbox
Post by: Daggers on January 21, 2007, 02:15:22 PM
I now have this fully working on two forums, one using Dilbermc an the other using AA_New_damage, and both are positioned in the info center without any problems at all :D

The third that I am trying to do will not display the smilies, in any theme. It does not pick up the folder which the smileys are in......   /Smileys//smile.gif
Also, when you enter a topic within the forum the browser detects a javascript error  :(

I have read through all of the posts here but nothing solves this problem

Any and all help would be appreciated



Title: Re: nneonneo's Shoutbox
Post by: chep on January 21, 2007, 03:13:12 PM
I now have it working on the info center as well on the black rain theme after carefully following instructions. I was inadvertently copying the <![CDATA[ into the php which doesn't help at all.

Correct it does not show the smileys. It would be nice to get that working.

Also, as mentioned above. When  you collapse the header it also collapses the shoutbox in the info center as a weird looking side effect. Can we get a working solution to that?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 21, 2007, 03:46:25 PM
I don't know why some forums fail to detect the smileys. I use the standard SMF BBC parsers, so there shouldn't be any problems. I will have to look more deeply into this (this has not been reported often, but often enough to suspect that there is a problem)...

As for the collapsing shoutbox problem, it's because the header code is still linked to it.
Quick fix:
Find ', empty($options['collapse_header']) ? '>' : ' style="display: none;">','
and replace it by a single >, so the line looks something like
<div id="yshout">...loading shoutbox...
That should fix the odd vanishing shoutbox.
Title: Re: nneonneo's Shoutbox
Post by: DLElement on January 21, 2007, 10:35:55 PM
This mod doesnt work for me
i install it but see no shoutbox
=[
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 21, 2007, 10:40:55 PM
@DLElement: this mod installs to the default theme; for other themes, you have to insert the code into the theme yourself (check main mod page for details)
Title: Re: nneonneo's Shoutbox
Post by: kichu on January 22, 2007, 02:06:33 AM
I installed This shoutbox . Working Excellent. I want to Delete the User information above the Shoutbox. that is " Show unread posts since last visit.
Show new replies to your posts.
Total time logged in: 4 days, 16 hours and 22 minutes.". I dont want to Display this above the Shoutbox. How to Delete that. I want to put that info in Portal Blocks.
Title: Re: nneonneo's Shoutbox
Post by: 3mrhythm on January 22, 2007, 02:52:10 PM
does this have permission on a groupmember basis i can set? i want to set it for my supporting members only... can that be done?
Title: Re: nneonneo's Shoutbox
Post by: Totosfo on January 22, 2007, 04:09:01 PM
Quote from: nneonneo on January 21, 2007, 03:46:25 PM
As for the collapsing shoutbox problem, it's because the header code is still linked to it.
Quick fix:
Find ', empty($options['collapse_header']) ? '>' : ' style="display: none;">','
and replace it by a single >, so the line looks something like
<div id="yshout">...loading shoutbox...
That should fix the odd vanishing shoutbox.

Hi nneonneo,

thanks for the hint, but unfortunately I cannot locate an exact match of the code you provided. I grepped through various files - could you give me the filename and an approx line number where to look?

Thanks again for your support!

Thomas
Title: Re: nneonneo's Shoutbox
Post by: xsharewarex on January 22, 2007, 07:33:09 PM
Quote from: nneonneo on January 21, 2007, 10:40:55 PM
@DLElement: this mod installs to the default theme; for other themes, you have to insert the code into the theme yourself (check main mod page for details)

I installed This shoutbox . Working Excellent.

Thanks nneonneo for creating this mod & thanks for your help.


Thanks & Regards
XsharewareX
Title: Re: nneonneo's Shoutbox
Post by: brianjw on January 22, 2007, 09:38:26 PM

Future Version Suggestions

1. Admin panel for nneonneo's shoutbox, view/edit/delete posts there. Access to history files :)

2. Online image next to users name; Lets them know if the user is online or offline. Just show the image and not the text.
(GOOD EXAMPLE: (http://www.simplemachines.org/community/Themes/default/images/useron.gif)Brianjw: Hey all whats up!)
(BAD EXAMPLE: (http://www.simplemachines.org/community/Themes/default/images/useron.gif)Online Brianjw: Hey all whats up! -Bad example because it shows online/offline text next to image)

Brianjw
Title: Re: nneonneo's Shoutbox
Post by: DLElement on January 23, 2007, 07:46:17 AM
still cant get it, and also future suggestion have it so it updates without having to refresh the page
Title: Googlebot & Spiders Conflict
Post by: mwmconsulting on January 23, 2007, 01:46:12 PM
Gday SMFers...

Just a note to say that the latest version of this mod (1.05) conflicts handily with the Googlebot & Spiders mod by Omar (http://custom.simplemachines.org/mods/index.php?mod=143).

The shout box works fine on the home page, or any page using index.php?.  But as soon as you enter into a discussion or post the shoutbox fails to load because the URL is rewritten and appears to the browser to be in a subdirectory (thus making the yshout directory up a level).

To fix this, you need to ensure the code looks for the yshout directory in the appropriate place.

So, after you install nneonneo's Shoutbox edit the files /Themes/default/index.template.php and /yshout/js/yshout.js and search for "yshout/" in each.  Where ever you find that bit of text, place a "/path/to/your/forum/" in front.  So, if the root path to your forum was "/forum/" you would change the text to "/forum/yshout/" in all instances.

Hope this helps some people out.  Great MOD nneonneo!  Thx!   :D

- Seppo
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on January 24, 2007, 07:34:36 AM
Ok question.. the shoutbox shows in the index of the board but it doesn't show up on any of the other boards? it just shows loading???

Is there a way to show the shoutbox on all boards? or a way to show it only on the index?
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on January 24, 2007, 07:39:29 AM
Wow I just read this thread and I find the answer :p

http://www.simplemachines.org/community/index.php?topic=137508.msg905190#msg905190

Search engine friendly is bad until you fix it.. thanks!

BTW my site is GRLevelXStuff.com (http://www.grlevelxstuff.com)
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on January 24, 2007, 07:46:59 AM
Ok Last question I promise!

I want to add this to the front page of my CMS in an iframe? Can you help me there nneonneo? http://www.grlevelxstuff.com

I will mess with it but if you have an idea please let me know.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 24, 2007, 11:01:25 AM
Quote from: brianjw on January 22, 2007, 09:38:26 PM

Future Version Suggestions

1. Admin panel for nneonneo's shoutbox, view/edit/delete posts there. Access to history files :)

2. Online image next to users name; Lets them know if the user is online or offline. Just show the image and not the text.
(GOOD EXAMPLE: (http://www.simplemachines.org/community/Themes/default/images/useron.gif)Brianjw: Hey all whats up!)
(BAD EXAMPLE: (http://www.simplemachines.org/community/Themes/default/images/useron.gif)Online Brianjw: Hey all whats up! -Bad example because it shows online/offline text next to image)

Brianjw
The online-offline thing I could probably handle, though the admin panel is a bit trickier.
I've been working on getting yShout v3 to work with SMF, but so far, I've found that it is too resource intensive: it will probably bring down the server on a high-user board. It has some very fancy features, so I will see if I can borrow some for use on this shoutbox (progress goes slowly though :P)

@WxChat.com: You can use this post (right above your first one): http://www.simplemachines.org/community/index.php?topic=137508.msg923303#msg923303 to make the shoutbox work with search-engine friendly URLs.
AFAIK to get it into a CMS, you need to add the JS includes (first block of code added by the mod to index.template.php) somewhere in the header (preferably also get the CSS for style):
// YSHOUT HERE
if(***CHECK FOR LOGGED IN USERS***)
echo '
<script src="yshout/js/prototype.js" type="text/javascript"></script>
<script src="yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="yshout/js/behaviour.js" type="text/javascript"></script>
<script src="yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});

</script>
<script src="yshout/js/yshout.js?Oct112006" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout span {
color: #141414;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END

Note that it is slightly different from the usual code: use whatever code the CMS uses to detect logged on users (in SMF, this is $context['user']['is_logged'], but this may not be the case on the CMS. Replace ***CHECK FOR LOGGED IN USERS*** with the proper code.

In the desired shoutbox location, place this code (you may have to mess around with the HTML to make it fit or look nice, though; also check the CSS)
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout">...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on January 24, 2007, 03:50:53 PM
Thanks.. seems fun!

OK I notice that the shouts are new on bottom how to make the new shouts on top.. I will look at the main file and see if I can find anything.. A CP for this would help alot..or find a way to incorp this in the SMF ACP

Thanks
Title: Re: nneonneo's Shoutbox
Post by: brianjw on January 24, 2007, 09:42:50 PM

Some more Future Version Suggestions

- Makes a sound when someone has posted in the Shoutbox (can be disabled in some file or admin if applicable)
- Clear all posts; This will automatically delete posts displayed in the shoutbox by time. As an example you can set it to clear all messages every Saturday at some time. (can be disabled and edited in some file or admin if applicable)


Brianjw ;)
Title: Re: nneonneo's Shoutbox
Post by: xsharewarex on January 25, 2007, 12:50:23 AM
Hi,

I have installed the shout box successfully & it works properly for approximately 15-20 mins & then suddenly it displays the following errors or disappears from the forum. I am not sure why.

Can some pls help me with this.

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home31a/sub001/sc26922-PGPV/xsharewarex.com/forum/Sources/Subs.php on line 321

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home31a/sub001/sc26922-PGPV/xsharewarex.com/forum/Sources/Errors.php on line 123

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home31a/sub001/sc26922-PGPV/xsharewarex.com/forum/Sources/Errors.php on line 124



Thanx & Regards
XsharewareX
Title: Re: nneonneo's Shoutbox
Post by: 3mrhythm on January 25, 2007, 03:09:07 AM
Quote from: 3mrhythm on January 22, 2007, 02:52:10 PM
does this have permission on a groupmember basis i can set? i want to set it for my supporting members only... can that be done?
?
Title: Re: nneonneo's Shoutbox
Post by: dawgstr on January 25, 2007, 04:01:44 PM
Great mod nneonneo's. Working fine in all my themes. I changed color on timestamps and raise fonts up to show better in some themes. Where is the code for del/ban text to change their colors and font size?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 25, 2007, 08:52:38 PM
@3mrhythm: Sorry for the late reply; I've posted a solution earlier (but I know crawling the thread is a pain; here's the link: http://www.simplemachines.org/community/index.php?topic=137508.msg879855;topicseen#msg879855). I hope that helps.
@dawgstr: Colors are set in
Code (index.template.php) Select
#yshout span {
color: #141414;
}

and the font size in
Code (yshout.php) Select
<span style="font-size: 6pt;">
(just search for either block of code in their respective files; you'll find it. I'm sorry it's so hard to find though; I am trying to find a suitable solution using only CSS, while aiming to ensure it works for all browsers!)
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on January 25, 2007, 11:39:26 PM
nneonneo is it possible to show the latest shouts on the TOP instead of on the bottom??
Title: Re: nneonneo's Shoutbox
Post by: k8jsl on January 26, 2007, 12:17:59 AM
nneonneo .. Im trying to assist WxChat in reversing the order,
which array function in the class.tail.php holds and creates the array for display,
so a array_reverse can be applied ....
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 26, 2007, 12:36:43 PM
Find each line that starts with "$output .= " in the for loop at the end of the output function in class.tail.php.
Change each line (there should be exactly three, one after another) from
$output .= <something>;
to
$output = <something> . $output;
This will cause the output to be reversed, since the lines will be added to the front rather than the back.

HTH,
nneonneo
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on January 26, 2007, 02:16:45 PM
guys help ! It's smiley's thing again  >:(  They don't work, but on top of that, in IE (TM) they look very ugly, in firefox they show as text like Wing or Cheesy but in IE grrrr  >:(  Is there any solution for this? I have attached screenshot.
Any1 can see at www.cromobilesound.com/forum/
user: tester
pass: tester
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on January 26, 2007, 07:14:11 PM
Quote from: nneonneo on January 26, 2007, 12:36:43 PM
Find each line that starts with "$output .= " in the for loop at the end of the output function in class.tail.php.
Change each line (there should be exactly three, one after another) from
$output .= <something>;
to
$output = <something> . $output;
This will cause the output to be reversed, since the lines will be added to the front rather than the back.

HTH,
nneonneo

Thanks nneonneo.. we will try that
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on January 26, 2007, 08:56:49 PM
These three lines?

$output .= $pre_line;
  $output .= ($this->regexpr == '')?$this->outputarray[$i]:str_replace($this->highlight, $highlight, $this->outputarray[$i]);
  $output .= $post_line;

changed to this
$output .= $pre_line. $output;
  $output .= ($this->regexpr == '')?$this->outputarray[$i]:str_replace($this->highlight, $highlight, $this->outputarray[$i]). $output;
  $output .= $post_line. $output;


I did that and it still shows new on bottom? I use UltraEdit 32 so if you can get me line numbers that would help :)
Title: Re: nneonneo's Shoutbox
Post by: k8jsl on January 26, 2007, 11:53:52 PM
I even pushed it into an array, then added a new array reverse function, it must be in the jscript somewhere ...
Title: Re: nneonneo's Shoutbox
Post by: Daggers on January 27, 2007, 05:01:02 AM
Quote from: mwmconsulting on January 23, 2007, 01:46:12 PM

The shout box works fine on the home page, or any page using index.php?.  But as soon as you enter into a discussion or post the shoutbox fails to load because the URL is rewritten and appears to the browser to be in a subdirectory (thus making the yshout directory up a level).

To fix this, you need to ensure the code looks for the yshout directory in the appropriate place.

So, after you install nneonneo's Shoutbox edit the files /Themes/default/index.template.php and /yshout/js/yshout.js and search for "yshout/" in each.  Where ever you find that bit of text, place a "/path/to/your/forum/" in front.  So, if the root path to your forum was "/forum/" you would change the text to "/forum/yshout/" in all instances.

Hope this helps some people out.  Great MOD nneonneo!  Thx!   :D

- Seppo

This worked for me with regard to the errors when viewing topics/posts. :)

But the smileys still dont work. I have deleted all custom Smileys and switched back to the default set, uninstalled, re-installed, etc, etc :(

If you change the Base URL to.... /forum/Smileys/default then the smileys will appear in the shoutbox.... but they wont appear in the posts :(

Title: Re: nneonneo's Shoutbox
Post by: Daggers on January 27, 2007, 05:14:56 AM
I have solved the Smileys problem  :D :D

In the admin panel change the Base URL and the Absolute Path to .... /Smileys/default

If you CPanel or ftp access to your website create another default folder inside the smileys default folder so the path would be.... Smileys/default/default

This then allows both the forum posts and the shoutbox smileys to appear.....

It worked for me  :D :D
Title: Re: nneonneo's Shoutbox
Post by: bobeq on January 27, 2007, 11:34:16 AM
I installed the mod and the only thing i can see is:

(http://img201.imageshack.us/img201/998/errorkn5.th.png) (http://img201.imageshack.us/my.php?image=errorkn5.png)

Really strange characters. ;) Do you think it's a problem with my host?
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on January 27, 2007, 11:36:40 AM
2 Daggers: Dude that's it !!! you have save the day :) If you ever come to zagreb/croatia send me pm/mail
Title: Re: nneonneo's Shoutbox
Post by: Daggers on January 27, 2007, 11:40:23 AM
Quote from: Zwerko on January 27, 2007, 11:36:40 AM
2 Daggers: Dude that's it !!! you have save the day :) If you ever come to zagreb/croatia send me pm/mail

thanks mate :)
Title: Re: nneonneo's Shoutbox
Post by: xsharewarex on January 27, 2007, 04:28:07 PM
Quote from: xsharewarex on January 25, 2007, 12:50:23 AM
Hi,

I have installed the shout box successfully & it works properly for approximately 15-20 mins & then suddenly it displays the following errors or disappears from the forum. I am not sure why.

Can some pls help me with this.

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home31a/sub001/sc26922-PGPV/xsharewarex.com/forum/Sources/Subs.php on line 321

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home31a/sub001/sc26922-PGPV/xsharewarex.com/forum/Sources/Errors.php on line 123

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home31a/sub001/sc26922-PGPV/xsharewarex.com/forum/Sources/Errors.php on line 124



Thanx & Regards
XsharewareX

Someone pls help me with this problem that I am facing with the forum...SMF Ver 1.1.1
Title: Re: nneonneo's Shoutbox
Post by: kirkie on January 27, 2007, 05:23:56 PM
I´m sorry but i´ve tried about everything and i can´t get a way to put my shoutbox working... I´ve read all the posts and tried all, and nothing... It keep sayngs ....Shoutboxloading..... and nothong appears!
Can anyone leave a final solution for this problem?




Thanks
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 27, 2007, 11:57:19 PM
Quote from: WxChat.com on January 26, 2007, 08:56:49 PM
These three lines?

$output .= $pre_line;
  $output .= ($this->regexpr == '')?$this->outputarray[$i]:str_replace($this->highlight, $highlight, $this->outputarray[$i]);
  $output .= $post_line;

changed to this
$output .= $pre_line. $output;
  $output .= ($this->regexpr == '')?$this->outputarray[$i]:str_replace($this->highlight, $highlight, $this->outputarray[$i]). $output;
  $output .= $post_line. $output;


I did that and it still shows new on bottom? I use UltraEdit 32 so if you can get me line numbers that would help :)
Lines are right; edit is wrong (slightly).
It's pretty hard to tell, but in my instructions, I said to use "$output =" not "$output .=" (.= is totally different :P).
Code should be (apologies for the complete change-over, but I think this may work better...):
$output = $pre_line .($this->regexpr == '')?$this->outputarray[$i]:str_replace($this->highlight, $highlight, $this->outputarray[$i]) .$post_line. $output;
You'll note it's just the right sides of each line, "." between each segment, with ". $output" at the end ("." is the string addition (concatenation) operator for PHP, for example, "a"."b" becomes "ab").
This causes each new line read to be read to the beginning of the output array, instead of the end as it would normally. Hope that works!

@kirkie: I need more information. Please find your web server/webhost log files, and PM them to me if you think there's nothing identifiable or personal there. Also visit "http://your/forum/path/yshout/yshout.php". If it says "Nothing to do" then shoutbox *should* work, its probably a configuration problem for the browser. Anything else is to be sent to me so I can see what's wrong and hopefully fix it.
Title: Re: nneonneo's Shoutbox
Post by: kirkie on January 28, 2007, 12:56:52 AM
Ok thanks  nneonneo's this is the error log:

[2007-01-28 02:42:50]: error: file is writable by others: (/home/kantotug/public_html/smf/yshout/yshout.php)



This is the path to my forum:

http://www.kantotuga.com/smf/yshout/yshout.php

It says "Nothing to do"



My Forum:

http://www.kantotuga.com/smf



My smf version is 1.1.1 


Thanks for the help nneonneo's i realy don´t no waht to do more  :'(
















Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on January 28, 2007, 08:01:54 AM
I changed this
// TODO render output
$output = $pre_output;
for ($i = $this->lines - $this->showlines; $i<$this->lines; $i++){
if (isset($this->outputarray[$i])) {
// format string
$output .= $pre_line . $output;
  $output .= ($this->regexpr == '')?$this->outputarray[$i]:str_replace($this->highlight, $highlight, $this->outputarray[$i]) . $output;
  $output .= $post_line . $output;
}
}
$output .= $post_output;
return $output;
}


to this

// TODO render output
$output = $pre_output;
for ($i = $this->lines - $this->showlines; $i<$this->lines; $i++){
if (isset($this->outputarray[$i])) {
// format string
$output = $pre_line .($this->regexpr == '')?$this->outputarray[$i]:str_replace($this->highlight, $highlight, $this->outputarray[$i]) .$post_line. $output;
  }
}
$output .= $post_output;
return $output;
}


and it still is showing the post in order Top to bottom. Did I code it wrong? If you have tested this and it works can you just send me the tail file? wxchat(at)gmail.com or post the code exactly as it should be.. thanks for all the help!
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 28, 2007, 04:09:26 PM
@WxChat.com: sorry, I misunderstood you the first time about what was needed. class.tail.php only handles history, not active shouts.
You should probably revert changes to class.tail.php, unless you want the history file to be upside down too.
In readChat(), find
$chatText = file_get_contents($chatPath)
replace that line with
$chatText = implode('',array_reverse(file($chatPath)));
and the chats should be reversed.

@kirkie: Please "chmod" yshout/yshout.php to 755 (or use Package Manager -> Options -> Cleanup File permissions -> All files are writable -> Change File Permissions). That *should* fix the problem.
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on January 28, 2007, 07:01:38 PM
THANK YOU NNEONNEO!
Title: Re: nneonneo's Shoutbox
Post by: Col on January 28, 2007, 07:09:51 PM
Anyone with a link to a site that still has this installed. I've been right through the thread and every preview takes me to site with no shoutbox! :(
Title: Re: nneonneo's Shoutbox
Post by: fritpa on January 28, 2007, 09:43:18 PM
How can i put this mod at the bottom of the forum?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on January 28, 2007, 10:02:35 PM
Quote from: Col on January 28, 2007, 07:09:51 PM
Anyone with a link to a site that still has this installed. I've been right through the thread and every preview takes me to site with no shoutbox! :(
I have a running shoutbox which is this shoutbox. It works.
Unfortunately my site will reopen on Friday.
If you would like to try out my website on Friday here is the info you need:

http://www.brianjwilson.com
Username: test
Password: test
(do not abuse the test account)
\\\\The shoutbox can be found on one of the left blocks ONCE LOGGED IN! :)\\\\

Brianjw

PS: isnt anyone going to reply to me about the latest suggestions ive made? ???
Title: Re: nneonneo's Shoutbox
Post by: Col on January 29, 2007, 05:08:06 AM
Thanks Brian,

I'm sure that I'll resist the temptation to abuse the account! ::)

Do you have your shoutbox within TP or similar?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 29, 2007, 12:25:51 PM
@Col: Shoutbox disables guest posting by default. You would need an account to access the shoutbox.
@fritpa: If you're referring to the info center (where a number of people decided to put it), see the thread about three pages back (there's a fair bit of discussion on putting it in the info center)

Quote from: Totosfo on January 22, 2007, 04:09:01 PM
Quote from: nneonneo on January 21, 2007, 03:46:25 PM
As for the collapsing shoutbox problem, it's because the header code is still linked to it.
Quick fix:
Find ', empty($options['collapse_header']) ? '>' : ' style="display: none;">','
and replace it by a single >, so the line looks something like
<div id="yshout">...loading shoutbox...
That should fix the odd vanishing shoutbox.

Hi nneonneo,

thanks for the hint, but unfortunately I cannot locate an exact match of the code you provided. I grepped through various files - could you give me the filename and an approx line number where to look?

Thanks again for your support!

Thomas
Totosfo: the code is in index.template.php; if you did not move the shoutbox from the original header position youdon't have to change the code, but if you moved it, it's in the block of code that was moved (<div id="yshout"[...]). Sorry for the late reply, i have to admit I must have skimmed over it...
Title: Re: nneonneo's Shoutbox
Post by: blez on January 29, 2007, 12:38:15 PM
is it possible to handle hungarian utf-8 characters, like őúűí ?
thx, blez
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 29, 2007, 12:42:45 PM
Shoutbox should already use utf-8 encoding by default.
Title: Re: nneonneo's Shoutbox
Post by: blez on January 29, 2007, 12:47:09 PM
One of my user looks like this (attachment), but his basically called Töki. What cause this prob? Can u help me?
Title: Re: nneonneo's Shoutbox
Post by: Col on January 29, 2007, 07:44:17 PM
SMF uses charset=ISO-8859-1 by default. Could this be the cause of the problem? Those square boxes show up when usual characters are used with the default charset, or at least I think they do.

I would have thought if you have switched to using utf-8, then those Hungarian characters should be displayed without a problem. Does the shoutbox definitely use utf-8? I don't pretend to really understand the issues with character sets.
Title: Re: nneonneo's Shoutbox
Post by: xsharewarex on January 29, 2007, 09:23:02 PM
Quote from: xsharewarex on January 27, 2007, 04:28:07 PM
Quote from: xsharewarex on January 25, 2007, 12:50:23 AM
Hi,

I have installed the shout box successfully & it works properly for approximately 15-20 mins & then suddenly it displays the following errors or disappears from the forum. I am not sure why.

Can some pls help me with this.

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home31a/sub001/sc26922-PGPV/xsharewarex.com/forum/Sources/Subs.php on line 321

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home31a/sub001/sc26922-PGPV/xsharewarex.com/forum/Sources/Errors.php on line 123

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home31a/sub001/sc26922-PGPV/xsharewarex.com/forum/Sources/Errors.php on line 124



Thanx & Regards
XsharewareX

Someone pls help me with this problem that I am facing with the forum...SMF Ver 1.1.1

nneonneo's pls help me with the problem that I am facing with the shout box
Title: Re: nneonneo's Shoutbox
Post by: brianjw on January 29, 2007, 09:23:47 PM
If you use like the TM after your name (which i do) it shows up with a box as well! ???
i dont like it that way... any way to fix thus ???


Thanks in advance.
Brianjw
Title: Re: nneonneo's Shoutbox
Post by: Pennine ARL on January 30, 2007, 01:50:32 PM
I am using a different theme and I have the shoutbox appearing and ready to use but when you submit a message I get this error code appearing in the shoutbox

Warning: fopen(chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /mounted-storage/home37a/sub003/sc29427-YCPC/www/guestbook/yshout/yshout.php on line 660
File error (writeLine); aborted

Can anyone help?
Title: Re: nneonneo's Shoutbox
Post by: fritpa on January 30, 2007, 01:57:06 PM
Any chance to put this shoutbox at the bottom of the page? and how can I limit de numbers of shout (lines)?

Thanks.
Title: Re: nneonneo's Shoutbox
Post by: Daggers on January 30, 2007, 04:52:21 PM
Read through the posts matey, both of your questions have already been answered  ;) :D
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on January 30, 2007, 04:58:19 PM
There's only 19 pages  ;D :D
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on January 30, 2007, 11:03:31 PM
@xsharewarex: not my fault. Shoutbox doesn't even use MySQL.
@brianjw: I am trying to resolve the problem, but my host is temporarily down (self hosted :P). I will see if the character encoding thing is related to SMF's default encoding (I'm guessing it does, but that's just a hunch)
@Pennine: Please chmod chats/home.txt to 755. If that fails, try 777.
@fritpa: See pages 15-16.
Title: Re: nneonneo's Shoutbox
Post by: livedown on January 31, 2007, 05:19:27 PM
NNeao can you please sendme the code thru PM or post it here for making my shoutbox appear inside a block in TP. I already have it installed in the default theme... so please give me step by step instructions. Thanks You!!!

Apreciate your help.

www.livedown.us   is my site if you want to take a look...
Title: Re: nneonneo's Shoutbox
Post by: Forfirith on January 31, 2007, 05:38:14 PM
Hi ^^
I dunno if this error has already been reported... but I find it very intriguing....
I, has a admin, can't see the shoutbox, it keeps saying ...loading shoutbox..., but my normal users can see and use it well ... :\
Help?
http://yproject.pt.vu
Title: Re: nneonneo's Shoutbox
Post by: xsharewarex on February 01, 2007, 08:07:50 AM
Quote from: nneonneo on January 30, 2007, 11:03:31 PM
@xsharewarex: not my fault. Shoutbox doesn't even use MySQL.

Thank you for your reply nneonneo's
Title: Re: nneonneo's Shoutbox
Post by: khurrum on February 02, 2007, 03:46:48 PM
censored words of forum are not working in shout. How can they be censored?
Title: Re: nneonneo's Shoutbox
Post by: daxar on February 03, 2007, 10:19:17 AM
i'have installed this mod on my smf 1.1.1. but i don't understand the way to appair the smiley.
Someone can helpme?
Title: Re: nneonneo's Shoutbox
Post by: xyxis_fahim on February 03, 2007, 04:15:21 PM
Quote from: daxar on February 03, 2007, 10:19:17 AM
i'have installed this mod on my smf 1.1.1. but i don't understand the way to appair the smiley.
Someone can helpme?

I manually user the smiley codes when submitting messages ;)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on February 04, 2007, 07:15:39 PM
Quote from: brianjw on January 24, 2007, 09:42:50 PM

Some more Future Version Suggestions

- Makes a sound when someone has posted in the Shoutbox (can be disabled in some file or admin if applicable)
- Clear all posts; This will automatically delete posts displayed in the shoutbox by time. As an example you can set it to clear all messages every Saturday at some time. (can be disabled and edited in some file or admin if applicable)


Brianjw ;)

nneonneo, what about these suggestions and I also... have more!!!

Suggestions...
- Do not keep history. Only keeps what is displayed in the shoutbox (turn on or off in admin panel or some file)
- Fix the shoutbox: All symbols can be used like: ™, (c), R, etc.
- Guest can post in shoutbox. They type there name in and they type (turn on or off in admin panel or some file)
- Options (how many posts show up, use BBC and Smileys, History on or off, symbols to use, etc.) should be kept in an admin area or a separate file like options.php that all the files link to for several options you can modify manually.
- Create an admin panel for the nneonneo's shoutbox!

Brianjw - suggestions is my thing :D
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on February 07, 2007, 09:35:35 PM
Hey nneonneo it is me again. I love your shoutbox and with the great mods that you have given me I have it looking pretty good. My question is you have Admins in red. How do I set to show mods in green and Global Mods in Blue?
For instance when I post my username is in Red since I am an admin. So can I set this up to work for my mods to show up in color as well? I am sure it can be done just don't know where to start.
Title: Re: nneonneo's Shoutbox
Post by: DASBEAN on February 08, 2007, 10:45:41 PM
How does one fully remove this mod? I applied it and didn't like it to much and now after uninstalling, it's still in my default theme ... I've attempted to manually remove it and I'm just messing things up.

Can you please tell me how to fully remove this?

Thanks
Title: Re: nneonneo's Shoutbox
Post by: Forfirith on February 10, 2007, 06:02:37 AM
Manually you just have to remove everything that is inside the YSHOUT tags.... on the index.template.php file

(I hope I didn't write something wrong ... I'm writing this from memory... but the YSHOUT tags is correct...)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on February 10, 2007, 10:49:13 AM
Ok nneonneo. I am using the shoutbox and since i have a rule that no one is allowed to use real names on my website, i censored the real names to their usernames. The shoutbox does not censor any of the words.... Is there a way you can add this to a future version, what code do I add and where?

Brianjw :)
Title: Re: nneonneo's Shoutbox
Post by: nielsrasmus on February 11, 2007, 09:24:54 AM
Hi all
I've just installed this mod, and it works perfectly as expected.

Right now i'm building a portalsite with heavy use of the SSI scripts that points to my SMF forum behind it.

I would like to have the shoutbox to appear on my frontpage as well, is this at all possible ???

/niels
Title: Re: nneonneo's Shoutbox
Post by: brianjw on February 11, 2007, 11:26:56 AM
Quote from: nielsrasmus on February 11, 2007, 09:24:54 AM
Hi all
I've just installed this mod, and it works perfectly as expected.

Right now i'm building a portalsite with heavy use of the SSI scripts that points to my SMF forum behind it.

I would like to have the shoutbox to appear on my frontpage as well, is this at all possible ???

/niels
If you are talking about TinyPortal...
You can get instructions in this topic: http://www.simplemachines.org/community/index.php?topic=137508.msg880188#msg880188
Just instead of a right or left block you put it in the frontpage block and integrate with other codes ;)
Title: Re: nneonneo's Shoutbox
Post by: circles122345 on February 12, 2007, 02:53:22 AM
hello im using BlackRain Themes, I already add this code in plainfully but nothing found even one letter..
pls help me this.

this is my error:

Template Parse Error!
There was a problem loading the /Themes/BlackRain1/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected '='


thanks,
Title: Re: nneonneo's Shoutbox
Post by: Calaad on February 12, 2007, 07:55:59 AM
Hello,

Your mod works perfectly except one caracter : "à".

I try to use charset=ISO-8859-1 instead of utf-8 for the same result...

All other special caracters (like â, ä, ù, €, etc) works without any problems...

In Firefox, "?" replace the "à" and in IE it's "&nbsp;".

If somebody got a solution...

Thank for this mod in any case !

Title: Re: nneonneo's Shoutbox
Post by: circles122345 on February 12, 2007, 09:57:01 AM
i tried many times to fix that..but nothing result.. :(
Title: Re: nneonneo's Shoutbox
Post by: circles122345 on February 12, 2007, 10:18:26 AM
Quote from: RvG on December 27, 2006, 11:39:13 PM
aku... thanks for the info. I would like to use it inside TP. Is it possible?

BTW, still it didn't work to me. Using smf 1.1.1 php 4.

Shout Box

...loading shoutbox...

only this and nothing shows thereafter.


same result here...

Title: Re: nneonneo's Shoutbox
Post by: nneonneo on February 12, 2007, 10:55:38 AM
@Calaad: I have no idea why. Maybe the accented a is not a UTF-8 character. I do not have anything specially set up to catch characters like that, though...

@circles: You made an error putting the code into index.template.php. PM me the code and I'll see what's up.
Title: Re: nneonneo's Shoutbox
Post by: buben06 on February 12, 2007, 11:20:27 AM
I have problem with encoding.

...when I change all instances of utf-8 in yshout.php to windows-1251 (russian) , it fixes datestamp and username (if russian) and shows them correctly, but the input text becomes all #$^@$%^&. (if typed in russian, english works fine either way)

Also, when I use default yshout.php (with utf-8), it's opposite: I can input text to shoutbox and see simbols in english and russian as well, but the datestamp and username is @#%$^#


any suggestions where I can change the input charset type to recognize windows-1251 ?

Note:
I use russian "windows-1251" charset in the forum settings in general and to switch to russian-utf , is not an option at the time. (too much to retype)

thanks,
Title: Re: nneonneo's Shoutbox
Post by: Calaad on February 12, 2007, 12:29:06 PM
Just an info :

The problems with the "à" caracter is on writing in "home.txt", it appaers like "Ã&nbsp;". When i write manually inside (with texte editor) and replace it by "&.#.224;" (without point), it appars to be good.

I'll try to search why... ;).

PS : Sorry for my bad english...
Title: Re: nneonneo's Shoutbox
Post by: richardz on February 12, 2007, 12:40:06 PM
Parse error: syntax error, unexpected '=' in .../Themes/default/index.template.php on line 203

194: echo $context['html_headers'], '
195:
196: <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
197: var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';
198:
199: function shrinkHeader(mode)
200: {';
201:
202: // YSHOUT HERE
203: document.getElementById("yshout").style.display = mode ? "none" : "";204: if(!mode)
205: {
206: loadChat();
207: }




Quote@circles: You made an error putting the code into index.template.php. PM me the code and I'll see what's up.

hmm...the install manual is only talking about the index.template....... are there more files to be changed?
Title: Re: nneonneo's Shoutbox
Post by: richardz on February 12, 2007, 03:32:54 PM
i used an index.template that was posted a few pages back and it worked. Now i have to analyze it to understand it ;)
Title: Re: nneonneo's Shoutbox
Post by: DarkVelocity on February 12, 2007, 06:20:33 PM
is it possible to add a scroll bar to your shoutbox?
it'd be alot better
Title: Re: nneonneo's Shoutbox
Post by: DASBEAN on February 12, 2007, 06:37:31 PM
Quote from: mrbean17 on February 08, 2007, 10:45:41 PM
How does one fully remove this mod? I applied it and didn't like it to much and now after uninstalling, it's still in my default theme ... I've attempted to manually remove it and I'm just messing things up.

Can you please tell me how to fully remove this?

Thanks

Hello again, hoping for an update.

Thanks
Title: Re: nneonneo's Shoutbox
Post by: richardz on February 13, 2007, 02:27:36 AM
Quote from: DarkVelocity on February 12, 2007, 06:20:33 PM
is it possible to add a scroll bar to your shoutbox?
it'd be alot better

for scrollbar see: http://www.simplemachines.org/community/index.php?topic=137508.msg900272#msg900272
Title: Re: nneonneo's Shoutbox
Post by: brianjw on February 13, 2007, 06:57:16 PM
I like the idea of the scrollbars. Anyway to display the entire shoutbox history inside and make it scroll? ???

Brianjw
Title: Re: nneonneo's Shoutbox
Post by: fritpa on February 13, 2007, 09:18:28 PM
How can i put emoticons in this shoutbox? is this possible?

Thank you.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on February 13, 2007, 10:42:43 PM
Quote from: fritpa on February 13, 2007, 09:18:28 PM
How can i put emoticons in this shoutbox? is this possible?

Thank you.
It has emotions. It uses the emotions you have on your SMF Smileys ;)
Title: Re: nneonneo's Shoutbox
Post by: Sarke on February 13, 2007, 11:39:19 PM
I have one concern with the this shoutbox.  I've been using it for a few days now, and my logs are filled with "404 /yshout/yshout.php".  I realise that this is how the shoutbox works, but it's quite significant.

Just today, I have about 115,000 error messages logged because of the 404 that the shoutbox uses, and that's about 87% of the total hits on my site (today).  Put another way, the amount of requests increased by about 650%.

Isn't there another way of doing this?  Can't the server contact the client when a new shout is made, instead of the client having to check in all the time?
Title: Re: nneonneo's Shoutbox
Post by: Calaad on February 14, 2007, 10:41:51 AM
Quote from: buben06 on February 12, 2007, 11:20:27 AM
I have problem with encoding.

...when I change all instances of utf-8 in yshout.php to windows-1251 (russian) , it fixes datestamp and username (if russian) and shows them correctly, but the input text becomes all #$^@$%^&. (if typed in russian, english works fine either way)

Also, when I use default yshout.php (with utf-8), it's opposite: I can input text to shoutbox and see simbols in english and russian as well, but the datestamp and username is @#%$^#

Same things here with iso-8859-1. It seems like changing encoding in yshout.php just change reading from home.txt not writing...  
Title: Re: nneonneo's Shoutbox
Post by: HexImaL on February 14, 2007, 11:18:44 AM
Hey, can you please update the mod, so we can install it on 1.1.2?
Title: Re: nneonneo's Shoutbox
Post by: Daggers on February 14, 2007, 12:05:41 PM
This will work in 1.1.2 but you have to add it manually  :o ;)

Title: Re: nneonneo's Shoutbox
Post by: DASBEAN on February 14, 2007, 05:27:05 PM
Quote from: mrbean17 on February 12, 2007, 06:37:31 PM
Quote from: mrbean17 on February 08, 2007, 10:45:41 PM
How does one fully remove this mod? I applied it and didn't like it to much and now after uninstalling, it's still in my default theme ... I've attempted to manually remove it and I'm just messing things up.

Can you please tell me how to fully remove this?

Thanks

Hello again, hoping for an update.

Thanks

Can anyone please help with a full clean removal of this mod? The uninstall did not remove from the default theme and I've had to disable that theme for the time being.

Any help is appreciated.

Thanks
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on February 14, 2007, 07:28:27 PM
Hey nnennoeo can you please read this post.. I think you missed it.. or I may have asked a question that can't be done.. but I doubt that.

http://www.simplemachines.org/community/index.php?topic=137508.msg948932#msg948932
Title: Re: nneonneo's Shoutbox
Post by: Rob_Ghost on February 14, 2007, 09:17:47 PM
This might have already been stated but... Is there anyway to remove / add commands? I'd just much rather not have users able to use the /impersonate command and would rather it not exist, but it would also be nice to be able to add and remove features.

It would be very nice to remove the impersonate feature though... >.<
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on February 14, 2007, 11:47:56 PM
nneonneo...Dude my DEDICATED server just hit 20% CPU usage and when we killled the shout box usage fell to 2% :(

It seems that you have a MAJOR memory leak in your script.

That shout box was so well loved we had 5-8 peeps litterally chatting on it in real time! But there is a major issue with memory on it and I have to kill it.. Can you look into this please..I would love to use your shout box as I have found it to be the best SMF shout thus far.
Title: Re: nneonneo's Shoutbox
Post by: Daggers on February 15, 2007, 02:21:31 AM
Quote from: mrbean17 on February 14, 2007, 05:27:05 PM
Quote from: mrbean17 on February 12, 2007, 06:37:31 PM
Quote from: mrbean17 on February 08, 2007, 10:45:41 PM
How does one fully remove this mod? I applied it and didn't like it to much and now after uninstalling, it's still in my default theme ... I've attempted to manually remove it and I'm just messing things up.

Can you please tell me how to fully remove this?

Thanks

Hello again, hoping for an update.

Thanks

Can anyone please help with a full clean removal of this mod? The uninstall did not remove from the default theme and I've had to disable that theme for the time being.

Any help is appreciated.

Thanks

The mod adds 3 section of code to index.template. Each section starts with //YSHOUT HERE and ends with //YSHOUT END

Open index.template, find the 3 sections and remove them.

Alternatively, IF you have no other mods which have installed into index.template then drop in the default file and overwrite.  ;)

Title: Re: nneonneo's Shoutbox
Post by: ProtoType on February 15, 2007, 10:40:17 AM
I see in the posts above, that this mod will work with 1.1.2 but requires manual installation. Could someone give some direction as to how this can be done. Type slow, I'm a newbie! :)
Thanks,
ProtoType
Title: Re: nneonneo's Shoutbox
Post by: circles122345 on February 15, 2007, 11:13:26 AM
Quote from: WxChat.com on February 14, 2007, 11:47:56 PM
nneonneo...Dude my DEDICATED server just hit 20% CPU usage and when we killled the shout box usage fell to 2% :(

It seems that you have a MAJOR memory leak in your script.

That shout box was so well loved we had 5-8 peeps litterally chatting on it in real time! But there is a major issue with memory on it and I have to kill it.. Can you look into this please..I would love to use your shout box as I have found it to be the best SMF shout thus far.

yah, its true coz they always refreshing the page until the visitors posting there msg
Title: Re: nneonneo's Shoutbox
Post by: WxChat.com on February 15, 2007, 11:30:10 AM
I can see it not being an issue with someone on a shared server having an issue but a dedicated one being taken to it's knees.. that tells me that this script, as good as it is, has major memory issues
Title: Re: nneonneo's Shoutbox
Post by: circles122345 on February 15, 2007, 11:35:59 AM
Quote from: WxChat.com on February 15, 2007, 11:30:10 AM
I can see it not being an issue with someone on a shared server having an issue but a dedicated one being taken to it's knees.. that tells me that this script, as good as it is, has major memory issues
yah, i guess thats the peak problem of that now, i hope they can find a way to solve that issue..
Title: Re: nneonneo's Shoutbox
Post by: binaryspiral on February 15, 2007, 03:06:36 PM
Quote from: WxChat.com on February 14, 2007, 11:47:56 PM
nneonneo...Dude my DEDICATED server just hit 20% CPU usage and when we killled the shout box usage fell to 2% :(

It seems that you have a MAJOR memory leak in your script.

That shout box was so well loved we had 5-8 peeps litterally chatting on it in real time! But there is a major issue with memory on it and I have to kill it.. Can you look into this please..I would love to use your shout box as I have found it to be the best SMF shout thus far.

My hosting provider disabled it because it was using so many resources that others on my server were experiencing poor performance. I highly recommend anyone using a shared host - not use this mod!

I was lucky that my host actually spent the effort to find the root cause of the performance issue and not just shutoff my site and notify me.  
Title: Re: nneonneo's Shoutbox
Post by: Daggers on February 15, 2007, 03:44:14 PM
I use this mod on 3 sites on shared hosting without any problems what so ever, two of those 3 sites have very active shoutbox's and I have checked both the server status and checked with my hosts and there is no problem at all  :D
Title: Re: nneonneo's Shoutbox
Post by: Rob_Ghost on February 15, 2007, 04:13:25 PM
Quote from: Rob_Ghost on February 14, 2007, 09:17:47 PM
This might have already been stated but... Is there anyway to remove / add commands? I'd just much rather not have users able to use the /impersonate command and would rather it not exist, but it would also be nice to be able to add and remove features.

It would be very nice to remove the impersonate feature though... >.<

Hate to bump my question up, but I really have to fix this quick. D:
Title: Re: nneonneo's Shoutbox
Post by: Sarke on February 15, 2007, 07:05:12 PM
Quote from: binaryspiral on February 15, 2007, 03:06:36 PM
Quote from: WxChat.com on February 14, 2007, 11:47:56 PM
nneonneo...Dude my DEDICATED server just hit 20% CPU usage and when we killled the shout box usage fell to 2% :(

It seems that you have a MAJOR memory leak in your script.

That shout box was so well loved we had 5-8 peeps litterally chatting on it in real time! But there is a major issue with memory on it and I have to kill it.. Can you look into this please..I would love to use your shout box as I have found it to be the best SMF shout thus far.

My hosting provider disabled it because it was using so many resources that others on my server were experiencing poor performance. I highly recommend anyone using a shared host - not use this mod!

I was lucky that my host actually spent the effort to find the root cause of the performance issue and not just shutoff my site and notify me. 

I would suggest changing the update value in /yshout/js/yshout.js from 1500 to something like 5000 or 10000 (ms). 

var refreshTime = 1500;

If you have something like 100 people viewing the shoutbox, by default that is 4000 requests per minute, but if you change the update to 5 seconds (5000 ms), that brings the number of shoutbox requests down to 1200 (600 if you change the update to 10 seconds).

Remember that the value is in milliseconds!  If you put something below 1000 (1 second), for example 5 by mistake (thinking it's 5 seconds), you'll end up with over a million requests a minute from just those 100 viewers.
Title: Re: nneonneo's Shoutbox
Post by: Col on February 15, 2007, 09:57:11 PM
I'd suggset disabling updates, and let refreshes take place with new clicks. Grudge's shoutbox suffered from the same problem.
Title: Re: nneonneo's Shoutbox
Post by: Sarke on February 15, 2007, 09:59:19 PM
Quote from: Col on February 15, 2007, 09:57:11 PM
I'd suggset disabling updates, and let refreshes take place with new clicks. Grudge's shoutbox suffered from the same problem.
I don't know if that's the best solution, because then users would just reload the whole page manually instead.   
Title: Re: nneonneo's Shoutbox
Post by: Col on February 15, 2007, 10:22:54 PM
I'm not suggesting that you advertise that member reload pages to see if the shoutbox has been updated. If you think your members will do this, I'd recommend that you instead install one of the of the excellent, supported, chat mods.
Title: Re: nneonneo's Shoutbox
Post by: circles122345 on February 16, 2007, 10:01:34 AM
how to make the first msg in shoutbox to be in a top?

coz, it always shows that the every entry is in lower, and i want it in top.

pls help with this,


thanks,
Title: Re: nneonneo's Shoutbox
Post by: Forfirith on February 16, 2007, 02:53:07 PM
http://www.simplemachines.org/community/index.php?topic=137508.msg936897#msg936897
Bumping my question... pls answer quickly :(
Title: Re: nneonneo's Shoutbox
Post by: Sarke on February 16, 2007, 04:58:18 PM
Quote from: circles122345 on February 16, 2007, 10:01:34 AM
how to make the first msg in shoutbox to be in a top?

coz, it always shows that the every entry is in lower, and i want it in top.

pls help with this,


thanks,

http://www.simplemachines.org/community/index.php?topic=137508.msg931355#msg931355
Title: Re: nneonneo's Shoutbox
Post by: kichu on February 16, 2007, 05:24:07 PM
How to Display the Moderators Color in Shoutbox...
Title: Re: nneonneo's Shoutbox
Post by: Rob_Ghost on February 16, 2007, 10:22:33 PM
Quote from: Rob_Ghost on February 15, 2007, 04:13:25 PM
Quote from: Rob_Ghost on February 14, 2007, 09:17:47 PM
This might have already been stated but... Is there anyway to remove / add commands? I'd just much rather not have users able to use the /impersonate command and would rather it not exist, but it would also be nice to be able to add and remove features.

It would be very nice to remove the impersonate feature though... >.<

Hate to bump my question up, but I really have to fix this quick. D:

*sigh* I'm suprised this isn't a bigger issue...
Title: Re: nneonneo's Shoutbox
Post by: Sarke on February 17, 2007, 03:26:44 AM
Quote from: Rob_Ghost on February 16, 2007, 10:22:33 PM
Quote from: Rob_Ghost on February 15, 2007, 04:13:25 PM
Quote from: Rob_Ghost on February 14, 2007, 09:17:47 PM
This might have already been stated but... Is there anyway to remove / add commands? I'd just much rather not have users able to use the /impersonate command and would rather it not exist, but it would also be nice to be able to add and remove features.

It would be very nice to remove the impersonate feature though... >.<

Hate to bump my question up, but I really have to fix this quick. D:

*sigh* I'm suprised this isn't a bigger issue...

You pretty much have to modify the code depending on what you want.  There's nothing built-in that will add commands.

Btw, only admins can use the /impersonate command.
Title: Re: nneonneo's Shoutbox
Post by: circles122345 on February 17, 2007, 09:34:49 AM
Quote from: nneonneo on January 28, 2007, 04:09:26 PM
You should probably revert changes to class.tail.php, unless you want the history file to be upside down too.
In readChat(), find
$chatText = file_get_contents($chatPath)
replace that line with
$chatText = implode('',array_reverse(file($chatPath)));
and the chats should be reversed.

i didn't see this code at that file..pls help me where to find it..

thanks
Title: Re: nneonneo's Shoutbox
Post by: Rob_Ghost on February 17, 2007, 01:21:36 PM
Thanks and is there a way to have this only show up on the Board Index?
Title: Re: nneonneo's Shoutbox
Post by: ProtoType on February 17, 2007, 03:49:05 PM
I saw in an earlier post that SB_1.05 will work with SMF 1.1.2, but must be loaded manually.
This does, in fact work, as I've done so on 2 forums, however it doesn't list in the packages this way, and would be difficult to remove if needed.
A possible temporary fix to this, until nneonneo has time to upgrade, is to change all references in package-info.xml, from 1.1.1 to 1.1.2. The package will now load with the package installer, lists in your packages, and can be uninstalled there if the need arises.
Hope this helps.
ProtoType
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on February 19, 2007, 02:35:10 PM
?! There's an SMF 1.12?

I'll get on updating the SB for 1.12.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on February 19, 2007, 03:00:14 PM
The shoutbox is messing up my website. I took it off so I cannot really show you but I will go into detail.
I use tinyportal, i used aku's way of integrating it.
When I do it the way it says it makes my center blocks in tinyportal be indented far away from the left blocks :(
Maybe aku can help me or nneonneo or someone who has tinyportal using this :)

Brianjw

==Edit=========================================================================
I know what I followed instructions were correct because it was working and when I went on my website it just made the entire page indent and im staring at it in shame :-\ NOW i love this shoutbox; but right now i have only the one for tinyportal that doesnt autorefresh. Please help :D
Title: Re: nneonneo's Shoutbox
Post by: sparky33 on February 20, 2007, 09:53:27 AM
Quote from: nneonneo on February 19, 2007, 02:35:10 PM
?! There's an SMF 1.12?

I'll get on updating the SB for 1.12.
Tut tut @ sarcasm @ typos
Title: Re: nneonneo's Shoutbox
Post by: emrys01 on February 21, 2007, 10:59:13 AM
Quote from: nneonneo on January 12, 2007, 02:41:03 PM

Quote from: Beatrix on January 12, 2007, 09:10:17 AM
How can I change the position of the shoutbox? I would like to place it under the top horizontal menu (  Forum Help Search Profile My Messages Calendar Members Logout) and just above the forums.
In index.template.php, try to locate the <div id="yshout"> piece of code (in between //YSHOUT HERE and //YSHOUT END so you know where to cut). Move that piece to another location, wrapping it in a div/table/what-have-you if desired. Voila, a moved shoutbox.

i know i'm joining this thread late, and maybe this is truly addressed later on in this thread, but doing what you suggest above doesn't really divorce the shoutbox from the top info box.  that box still has to be expanded for the shoutbox to appear.  (personally, i always keep that box closed... clutter.)

i'm currently in the process of incorporating it into the global footer provided by the "Global Headers & Footers" mod.  so far, it works just fine for top-level things like the member list, or the admin section, or the member map (another mod).  i'm still looking into fully disconnecting the shoutbox from the collapse-state of the top box.

(unless, of course, someone else has already come up with a solution... i believe i'll read thru the rest of this thread before hacking any more code.  and, no, simply using a '<div id="yshout"></div>' does not do the job... ;D)
Title: Re: nneonneo's Shoutbox
Post by: emrys01 on February 21, 2007, 01:50:37 PM
Quote from: Rob_Ghost on February 14, 2007, 09:17:47 PM
This might have already been stated but... Is there anyway to remove / add commands? I'd just much rather not have users able to use the /impersonate command and would rather it not exist, but it would also be nice to be able to add and remove features.

It would be very nice to remove the impersonate feature though... >.<

impersonate only works for admins.
Title: Re: nneonneo's Shoutbox
Post by: dado d.d. on February 24, 2007, 02:24:58 PM
hello i'm have made these changes to other template and it says loading shoutbox all the time,help?
Title: Re: nneonneo's Shoutbox
Post by: RoarinRow on February 24, 2007, 02:40:19 PM
Quote from: brianjw on February 19, 2007, 03:00:14 PM
The shoutbox is messing up my website. I took it off so I cannot really show you but I will go into detail.
I use tinyportal, i used aku's way of integrating it.
When I do it the way it says it makes my center blocks in tinyportal be indented far away from the left blocks :(
Maybe aku can help me or nneonneo or someone who has tinyportal using this :)

Brianjw

==Edit=========================================================================
I know what I followed instructions were correct because it was working and when I went on my website it just made the entire page indent and im staring at it in shame :-\ NOW i love this shoutbox; but right now i have only the one for tinyportal that doesnt autorefresh. Please help :D

I'd like to know the fix for TP, but to use in a right block instead of center block.
Title: Re: nneonneo's Shoutbox
Post by: welder on February 25, 2007, 04:02:52 AM
I'm using smf 1.1.2,the mod worked fine but due to host and database problems causing the forum to get slow i uninstalled this mod, for me it didn't uninstall properly, i had to edit the the "Themes/default/index.template.php" file and remove the code manually
Title: Re: nneonneo's Shoutbox
Post by: dado d.d. on February 25, 2007, 06:20:04 AM
Quote from: dado d.d. on February 24, 2007, 02:24:58 PM
hello i'm have made these changes to other template and it says loading shoutbox all the time,help?
anyone?
Title: Re: nneonneo's Shoutbox
Post by: Daggers on February 25, 2007, 01:22:29 PM
Quote from: dado d.d. on February 25, 2007, 06:20:04 AM
Quote from: dado d.d. on February 24, 2007, 02:24:58 PM
hello i'm have made these changes to other template and it says loading shoutbox all the time,help?
anyone?

Make sure the yshout folder has been chmod 755
Title: Re: nneonneo's Shoutbox
Post by: brianjw on February 25, 2007, 05:58:27 PM
Quote from: RoarinRow on February 24, 2007, 02:40:19 PM
Quote from: brianjw on February 19, 2007, 03:00:14 PM
The shoutbox is messing up my website. I took it off so I cannot really show you but I will go into detail.
I use tinyportal, i used aku's way of integrating it.
When I do it the way it says it makes my center blocks in tinyportal be indented far away from the left blocks :(
Maybe aku can help me or nneonneo or someone who has tinyportal using this :)

Brianjw

==Edit=========================================================================
I know what I followed instructions were correct because it was working and when I went on my website it just made the entire page indent and im staring at it in shame :-\ NOW i love this shoutbox; but right now i have only the one for tinyportal that doesnt autorefresh. Please help :D

I'd like to know the fix for TP, but to use in a right block instead of center block.
The way to make this possible for Tinyportal is here: http://www.simplemachines.org/community/index.php?topic=137508.msg880188#msg880188

It stopped working with my website. it indented all the centerblocks and the text box extended over the block. It is because of the index.template.php but dont know how to fix it. Nneonneo, please help. I would love to use this, if you need me to post the index.template.php and block code... I will :D
Title: Re: nneonneo's Shoutbox
Post by: TrueSatan on February 27, 2007, 09:15:43 PM
If you collapse the header area does it stop the shout box from polling the server and thus reduce server load? If not might this be considered a feature request?

Please could you also consider adding a timer as per IPB's shoutbox such that it shuts down after a predetermined period set by the admins?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on February 27, 2007, 09:37:08 PM
Next Version Tips (1 included)

Title: Re: nneonneo's Shoutbox
Post by: RoarinRow on February 28, 2007, 12:43:44 AM
Quote from: brianjw on February 25, 2007, 05:58:27 PM
Quote from: RoarinRow on February 24, 2007, 02:40:19 PM
Quote from: brianjw on February 19, 2007, 03:00:14 PM
The shoutbox is messing up my website. I took it off so I cannot really show you but I will go into detail.
I use tinyportal, i used aku's way of integrating it.
When I do it the way it says it makes my center blocks in tinyportal be indented far away from the left blocks :(
Maybe aku can help me or nneonneo or someone who has tinyportal using this :)

Brianjw

==Edit=========================================================================
I know what I followed instructions were correct because it was working and when I went on my website it just made the entire page indent and im staring at it in shame :-\ NOW i love this shoutbox; but right now i have only the one for tinyportal that doesnt autorefresh. Please help :D

I'd like to know the fix for TP, but to use in a right block instead of center block.
The way to make this possible for Tinyportal is here: http://www.simplemachines.org/community/index.php?topic=137508.msg880188#msg880188

It stopped working with my website. it indented all the centerblocks and the text box extended over the block. It is because of the index.template.php but dont know how to fix it. Nneonneo, please help. I would love to use this, if you need me to post the index.template.php and block code... I will :D

Thanks Brian.  I'm using other 3rd party shoutbox now   ;)
Title: Re: nneonneo's Shoutbox
Post by: c43 on February 28, 2007, 07:23:24 PM
Hello

Thanks for the mod but i have a problem

I want to delete the file history.home.txt but i can't do this on ftp. I have chmod the file to 777 but it automatically chmod to 644 and i can't delete and i can't replace the file.

What can i do please, because i want delete history.

Thanks

EDIT : it's possible to delete message by this example of url :

http://Your-Forum-url/yshout/yshout.php?file=history.home.txt&delete=XXXXXXXXXX%20|%20IP (http://your-forum-url/yshout/yshout.php?file=history.home.txt&delete=XXXXXXXXXX%20%7C%20IP)

XXXXXXXXXX is the number of the message and IP is the ip of the user. This information is available in the file history.home.txt for each message.

But i have another problem :

It's with the letter "à" its write "?" instead of "à". I don't have the problem with other letters like é, è, ù, î, etc.., so a solution please ?
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on March 01, 2007, 08:05:26 AM
Quote from: c43 on February 28, 2007, 07:23:24 PM
Hello

Thanks for the mod but i have a problem

I want to delete the file history.home.txt but i can't do this on ftp. I have chmod the file to 777 but it automatically chmod to 644 and i can't delete and i can't replace the file.

What can i do please, because i want delete history.


Go to Admin-Packages->Options->Select "All files are writable." and hit Change File Permissions
Title: Re: nneonneo's Shoutbox
Post by: Sarke on March 01, 2007, 09:25:15 AM
if you just want to clear the history, just type /clear
Title: Re: nneonneo's Shoutbox
Post by: c43 on March 01, 2007, 01:15:00 PM
Quote from: Sarke on March 01, 2007, 09:25:15 AM
if you just want to clear the history, just type /clear
No, the command /clear just clear the message on index but don't clear history. Thanks Zwerko for the solution.

But do you have a solution for letter "à" please ?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 01, 2007, 06:25:27 PM
I do not know. It must be some internationalization/encoding problem, but it is using UTF-8 by default. Maybe if it is set to another encoding it will work.

@TrueSatan: AFAIK the shoutbox does not have a shutdown feature, but closing the header will stop the polling (assuming the JS code is added, which it is by default to the index.template.php).

@emrys01: The header "bug" is due to the JS code used to poll for the header.
Remove the JS code (between // YSHOUT HERE and // YSHOUT END in the index.template.php), and it should work.
If it still doesn't, you need to simply use <div id="yshout">[loading text]</div> without the additional header check.

@c43: Strange bug, maybe the history file is being written to by the PHP script. Try doing a rename on it, and then deleting the renamed file (this way, a new file should be created by PHP and the old one will be released).

@brianjw: My knowledge of TinyPortal is very limited. Akulion posted a nice tip early on in this thread.

I am working on finalizing 1.06. The major feature of this release is guest posting.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 01, 2007, 06:32:38 PM
Quote from: nneonneo on March 01, 2007, 06:25:27 PM
@brianjw: My knowledge of TinyPortal is very limited. Akulion posted a nice tip early on in this thread.
I used that snippet of code and it worked for a long time until one day the entire center blocks centered and when typing it extended as if it was selected in an iframe with no scroll bars. Akulion might be able to help me but I am now using shoutmix due to these problems :-\
Title: Re: nneonneo's Shoutbox
Post by: kichu on March 02, 2007, 05:28:08 AM
Hey nneonneo , This shoutbox is really good but after some time it is showing the message like CPU of server is Overloaded, becoz of heavy script. I donno why it is showing like this. Solve this. I really need this SHoutbox, without having problems.
Title: Re: nneonneo's Shoutbox
Post by: Sarke on March 02, 2007, 06:27:21 AM
kichu, I would suggest you change the refresh rate, like so:

Quote from: Sarke on February 15, 2007, 07:05:12 PM
I would suggest changing the update value in /yshout/js/yshout.js from 1500 to something like 5000 or 10000 (ms). 

var refreshTime = 1500;

If you have something like 100 people viewing the shoutbox, by default that is 4000 requests per minute, but if you change the update to 5 seconds (5000 ms), that brings the number of shoutbox requests down to 1200 (600 if you change the update to 10 seconds).

Remember that the value is in milliseconds!  If you put something below 1000 (1 second), for example 5 by mistake (thinking it's 5 seconds), you'll end up with over a million requests a minute from just those 100 viewers.
Title: Re: nneonneo's Shoutbox
Post by: dado d.d. on March 02, 2007, 01:31:38 PM
Quote from: Daggers on February 25, 2007, 01:22:29 PM
Quote from: dado d.d. on February 25, 2007, 06:20:04 AM
Quote from: dado d.d. on February 24, 2007, 02:24:58 PM
hello i'm have made these changes to other template and it says loading shoutbox all the time,help?
anyone?

Make sure the yshout folder has been chmod 755


could you explain!please
Title: Re: nneonneo's Shoutbox
Post by: c43 on March 02, 2007, 01:42:47 PM
Quote from: nneonneo on March 01, 2007, 06:25:27 PM

@c43: Strange bug, maybe the history file is being written to by the PHP script. Try doing a rename on it, and then deleting the renamed file (this way, a new file should be created by PHP and the old one will be released).

I cannot rename, rewrite or delete the file history.home.txt from ftp (with filezilla), but i have find another solution. In my hosting there is an online file manager, so i can edit txt files directly from internet, so i just have to delete all text on this file.

For the letter "à" i have already try different encoding without results. Usually when there is a problem with "à", there also a problem with "é", "è", "ù", but here, there is just a problem with "à", and not for all other, so I don't understand that.

A suggestion also : Can you add an option to allow chat (reading &/or posting) just for some members not for all please?

Quotecould you explain!please
With filezilla software go to your ftp, click right on yshout folder, click on file attribute, and put 755 on Numeric Value
Title: Re: nneonneo's Shoutbox
Post by: buben06 on March 02, 2007, 03:45:24 PM
Quote from: buben06 on February 12, 2007, 11:20:27 AM
I have problem with encoding.

...when I change all instances of utf-8 in yshout.php to windows-1251 (russian) , it fixes datestamp and username (if russian) and shows them correctly, but the input text becomes all #$^@$%^&. (if typed in russian, english works fine either way)

Also, when I use default yshout.php (with utf-8), it's opposite: I can input text to shoutbox and see simbols in english and russian as well, but the datestamp and username is @#%$^#


any suggestions where I can change the input charset type to recognize windows-1251 ?

Note:
I use russian "windows-1251" charset in the forum settings in general and to switch to russian-utf , is not an option at the time. (too much to retype)

thanks,

Any updates on that?!
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 02, 2007, 04:17:43 PM
Quote from: buben06 on March 02, 2007, 03:45:24 PM
Quote from: buben06 on February 12, 2007, 11:20:27 AM
I have problem with encoding.

...when I change all instances of utf-8 in yshout.php to windows-1251 (russian) , it fixes datestamp and username (if russian) and shows them correctly, but the input text becomes all #$^@$%^&. (if typed in russian, english works fine either way)

Also, when I use default yshout.php (with utf-8), it's opposite: I can input text to shoutbox and see simbols in english and russian as well, but the datestamp and username is @#%$^#


any suggestions where I can change the input charset type to recognize windows-1251 ?

Note:
I use russian "windows-1251" charset in the forum settings in general and to switch to russian-utf , is not an option at the time. (too much to retype)

thanks,

Any updates on that?!
I think it was said somewhere on this topic that nneonneo was gonna make all the characters work in this shoutbox next version :)
Title: Re: nneonneo's Shoutbox
Post by: buben06 on March 02, 2007, 07:44:23 PM
Quote from: nneonneo on January 30, 2007, 11:03:31 PM
I will see if the character encoding thing is related to SMF's default encoding (I'm guessing it does, but that's just a hunch)
If this is what you have reffered to, it not, please explain, because I've been following this post for over a month and have not yet seen any respond.
Title: Re: nneonneo's Shoutbox
Post by: Daggers on March 03, 2007, 05:26:03 AM
My shoutbox has stopped refreshing  :(

You can post a message but you have to refresh the whole page for it to be displayed. Nothing has been altered.. it just happened yesterday afternoon.

Anybody got any ideas please
Title: Re: nneonneo's Shoutbox
Post by: Shy1 on March 03, 2007, 08:03:54 AM
Quote from: The Re@l on January 11, 2007, 01:42:53 AM
Hello
I hope anyone can help me.
I installed the Shoutbox, The installation goes fast and easy, but I've got a little problem with the smilies.

As I type :) or :woot: , then I get no Smilie, in the preferences, I can see that the Link to the smilie is wrong.

It looks so ...... ....../smileys//smile.gif  .. the smile.gif lies in /smileys/default/smile.gif

Is there a solution, for the problem?

@ nneonneo, I like the shoutbox, it's a very nice Mod :)

P.S. sorry for my bad english, i hope you can understand what i mean...  ::)

I am having this exact same problem except that I have had the mod installed for a while and the smilies worked perfectly but all of the sudden the problem described above began to happen.  I have uninstalled the mod and tried to reinstall it but still, the smiles will not show and has "//smiley.gif" rather than "/smiley.gif".
Title: Re: nneonneo's Shoutbox
Post by: Daggers on March 03, 2007, 08:35:02 AM
Quote from: Ashyra on March 03, 2007, 08:03:54 AM
Quote from: The Re@l on January 11, 2007, 01:42:53 AM
Hello
I hope anyone can help me.
I installed the Shoutbox, The installation goes fast and easy, but I've got a little problem with the smilies.

As I type :) or :woot: , then I get no Smilie, in the preferences, I can see that the Link to the smilie is wrong.

It looks so ...... ....../smileys//smile.gif  .. the smile.gif lies in /smileys/default/smile.gif

Is there a solution, for the problem?

@ nneonneo, I like the shoutbox, it's a very nice Mod :)

P.S. sorry for my bad english, i hope you can understand what i mean...  ::)

I am having this exact same problem except that I have had the mod installed for a while and the smilies worked perfectly but all of the sudden the problem described above began to happen.  I have uninstalled the mod and tried to reinstall it but still, the smiles will not show and has "//smiley.gif" rather than "/smiley.gif".

The answer to the smileys can be found here...

http://www.simplemachines.org/community/index.php?topic=137508.msg928954#msg928954

Title: Re: nneonneo's Shoutbox
Post by: Shy1 on March 03, 2007, 08:55:07 AM
Thanks Daggers, it's working but I'll prefer to know the line of code which needs to be repaired so that the additional default smiley folers doesn't have to exist twice within each other.  If anyone knows, please let me know.  Thanks.
Title: Re: nneonneo's Shoutbox
Post by: Daggers on March 03, 2007, 02:30:24 PM
Quote from: Ashyra on March 03, 2007, 08:55:07 AM
Thanks Daggers, it's working but I'll prefer to know the line of code which needs to be repaired so that the additional default smiley folers doesn't have to exist twice within each other.  If anyone knows, please let me know.  Thanks.

I appreciate that mate but nneonneo doesnt have the answer himself because this fault doesnt occur on all installations. The two folder directories can co-exist so you can display smilies in both the shoutbox and the posts
Title: Re: nneonneo's Shoutbox
Post by: baci on March 04, 2007, 09:11:59 AM
the install button does not appear in my acp! can I install it manually?
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on March 04, 2007, 10:53:13 AM
Quote from: Ashyra on March 03, 2007, 08:55:07 AM
Thanks Daggers, it's working but I'll prefer to know the line of code which needs to be repaired so that the additional default smiley folers doesn't have to exist twice within each other.  If anyone knows, please let me know.  Thanks.

If you could read page 9/10+ u will see that u are not the only1 with that problem. For now this is the only solution that woks thanks to daggers  :)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 04, 2007, 01:53:42 PM
Progress on 1.06:
1) Guest support fully functional. Please test at http://nneonneo.ath.cx/advforums/guinea_smf (no account required: guest posting enabled)
2) Encodings are fixed. It turns out to be a result of a bad JavaScript call!
3) Word filtering is enabled.
4) 1.1.2 support.

Some things I am still working on or considering:
1) TinyPortal fixes -- I believe it has more to do with CSS layout than it does with the code. I will continue to investigate. Test fora welcome.
2) Smilies -- I do not understand why some hosts have the problem. Could be due to subdirectories or something strange like that.
3) Shoutbox still inaccessible from certain search-engine friendly pages. I may need to rewrite sections of the JS and the PHP to use baseurl.

Anyway, if everything goes according to plan, a new release will be made today.

@baci: 1.1.2 support is forthcoming for 1.06 shoutbox release. Just hang on!

Note about guest posting: if you don't like guests choosing their own nicks, you can set an option to force all guests to use some standardized nick (default: "guest-" plus the first 4 characters of the MD5 hash of their IP)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 04, 2007, 04:38:28 PM
Quote from: nneonneo on March 04, 2007, 01:53:42 PM
Progress on 1.06:
1) Guest support fully functional. Please test at http://nneonneo.ath.cx/advforums/guinea_smf (no account required: guest posting enabled)
2) Encodings are fixed. It turns out to be a result of a bad JavaScript call!
3) Word filtering is enabled.
4) 1.1.2 support.

Some things I am still working on or considering:
1) TinyPortal fixes -- I believe it has more to do with CSS layout than it does with the code. I will continue to investigate. Test fora welcome.
2) Smilies -- I do not understand why some hosts have the problem. Could be due to subdirectories or something strange like that.
3) Shoutbox still inaccessible from certain search-engine friendly pages. I may need to rewrite sections of the JS and the PHP to use baseurl.

Anyway, if everything goes according to plan, a new release will be made today.

@baci: 1.1.2 support is forthcoming for 1.06 shoutbox release. Just hang on!

Note about guest posting: if you don't like guests choosing their own nicks, you can set an option to force all guests to use some standardized nick (default: "guest-" plus the first 4 characters of the MD5 hash of their IP)
I like the ideas you have got from many users here (including me lol) and um looking forward to the release. I just wanna give you a heads up nneonneo, you should make another smf (test forum) and download TinyPortal then you should try some codes for the blocks for this like aku has done but make it so you don't have to add codes to every index.template.php ;)

Brianjw
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 04, 2007, 05:12:52 PM
5) added finer control over commands (disable certain commands/block guest access/etc.)
6) added internationalization support through Modifications.<language>.php

I will look at TinyPortal.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 04, 2007, 05:33:53 PM
Sounds good to me 8)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 04, 2007, 06:22:16 PM
Hmm, it'll take a fair bit of work to do TinyPortal. The layout is different, so I'll have to think about the best way to resize the SB for a TP block, and other considerations.

Meanwhile, I think many problems could be resolved if I could access "board_url" from within the Javascript loading code. I will find out how...
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 04, 2007, 08:31:18 PM
7) fixed search-engine-friendly links stuff.

I will iron out a few last minute bugs, then post this thing.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 04, 2007, 09:48:30 PM
Updated to 1.06.
Title: Re: nneonneo's Shoutbox
Post by: ProtoType on March 04, 2007, 09:54:23 PM
You da man nneonneo!
Thanks.
ProtoType
Title: Re: nneonneo's Shoutbox
Post by: mama on March 05, 2007, 04:49:32 AM
gj...:)
Title: Re: nneonneo's Shoutbox
Post by: baci on March 05, 2007, 06:02:53 AM
mkay, just made the new version to install & installed it to my theme, but now I always get the message "Shoutbox loaded in another window. Retrying...". the yshout.php returns nothing...
(using PHP5)
Title: Re: nneonneo's Shoutbox
Post by: victima on March 05, 2007, 09:48:11 AM
how do i activate it ? I got it installed. And then ?
Im norwegian so i dont understand every word you are
saying :) It is sucesfully installed, but dont know what to
do now.
Title: Re: nneonneo's Shoutbox
Post by: Inaam on March 05, 2007, 12:08:26 PM
How can i make the shoutbox appear in a table with scrolling enabled. I have left it in the default position where it is installed. I dont want the shotbox area getting bigger. How do i make scrolling enabled?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 05, 2007, 02:06:36 PM
@victima: It should be activated by default on the default theme; other themes please see link on mod page.
@baci: try typing "javascript:delcookie();void(0);" into your browser window (without quotes) and hit enter. It should delete the temp cookie that the shoutbox uses in case it has become stuck.
Title: Re: nneonneo's Shoutbox
Post by: Inaam on March 05, 2007, 02:11:16 PM
how do i enable scrolling on the shoutbox, i cant get it to work
Title: Re: nneonneo's Shoutbox
Post by: Daggers on March 05, 2007, 03:08:07 PM
Quote from: Inaam on March 05, 2007, 02:11:16 PM
how do i enable scrolling on the shoutbox, i cant get it to work

Somewhere in this thread there is the ability to add scrollbars, have a look through  
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on March 05, 2007, 03:53:55 PM
Quote from: Inaam on March 05, 2007, 02:11:16 PM
how do i enable scrolling on the shoutbox, i cant get it to work

c/p from far far back:

For scrollbars, add this code to index.template.php before "#yshout":
Kod:

#yshout #shouts {
overflow: auto;
height: 100px;
}

Height parameter can be anything you want (in pixels; px must follow). You can also add width, if you so desire, etc. etc.

2 nneonneo: thank you for joining our small community  ;) I suppose you just wanted to see how SB work  :P For now everything is fine  ;)
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 05, 2007, 07:37:36 PM
Hey how do I disable bbc code. Not all codes, but some I dont like going to the site and there being annoying by posting random images.....

Also can someone type out exactly how to use the impercinate feature I cant get it to work.
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 05, 2007, 08:08:50 PM
Quote from: nneonneo on December 28, 2006, 04:15:53 PM
Find
return $chatText.' '; // hack: totally empty responses can break some browsers in the readChat function and replace the line with
return str_replace("\n","\n<hr>",$chatText.' '); // hack: totally empty responses can break some browsers

Hope that helps.

Where is the readchat function located?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 05, 2007, 09:36:22 PM
@Johnny:
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).
2) readChat is in yshout/yshout.php.
3) Type /help impersonate to get help on that command. [/list][/list]
Title: Re: nneonneo's Shoutbox
Post by: emrys01 on March 07, 2007, 12:22:20 AM
Quote from: nneonneo on January 12, 2007, 02:41:03 PM

Quote from: Beatrix on January 12, 2007, 09:10:17 AM
How can I change the position of the shoutbox? I would like to place it under the top horizontal menu (  Forum Help Search Profile My Messages Calendar Members Logout) and just above the forums.
In index.template.php, try to locate the <div id="yshout"> piece of code (in between //YSHOUT HERE and //YSHOUT END so you know where to cut). Move that piece to another location, wrapping it in a div/table/what-have-you if desired. Voila, a moved shoutbox.

that's not sufficient.  you also have to modify the domFunction in index.template.php, to wit:


    var myfunc = new domFunction(function()
    {
        loadChat();
    }, { "yshout":"id"});


to remove all reference to the open/close state of any boxes/areas on the page.

Title: Re: nneonneo's Shoutbox
Post by: kichu on March 07, 2007, 04:53:42 AM
How to Display the Moderators Colors in Shoutbox..
Title: Re: nneonneo's Shoutbox
Post by: emrys01 on March 07, 2007, 08:14:01 AM
Quote from: Sarke on February 13, 2007, 11:39:19 PM
I have one concern with the this shoutbox.  I've been using it for a few days now, and my logs are filled with "404 /yshout/yshout.php".  I realise that this is how the shoutbox works, but it's quite significant.

Just today, I have about 115,000 error messages logged because of the 404 that the shoutbox uses, and that's about 87% of the total hits on my site (today).  Put another way, the amount of requests increased by about 650%.

Isn't there another way of doing this?  Can't the server contact the client when a new shout is made, instead of the client having to check in all the time?

in my /etc/httpd/conf/httpd.conf file, inside the VirtualHost directive for the sites using this shoutbox, i replaced the line
CustomLog logs/my.access.log combined
   with
SetEnvIf Request_URI /yshout/yshout.php shout
CustomLog logs/amber-access_log combined env=!shout

  poof... no more /yshout/yshout.php 404s.
Title: Re: nneonneo's Shoutbox
Post by: tsmalmbe on March 07, 2007, 10:01:33 AM
I added my shoutbox to the Boardindex, and it works OK. But the links (history, commands, etc..) open fullsize in the same window, which is really ugly. Like having a href with target="_top" that is. Where can i fix this? Woulöd it be possible to open the shoutbox in a new window? If I create  a new php-file in my theme with the shoutbox-stuff, would it be possible?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 07, 2007, 02:19:25 PM
@Sarke: The "404" are due to a hack I had to do for Opera. Evidently, if I do not send a 404, but use a 302 (content not modified), Opera will repeatedly close and reopen the shoutbox. So, I had to resort to using 404 to prevent this behaviour. Also, sending the entire content of the shouts is a quick way to waste bandwidth, which is why I chose to use a 404 message (which uses much less bandwidth).

@tsmalmbe: Are you using 1.06? I thought I fixed that...
Title: Re: nneonneo's Shoutbox
Post by: tsmalmbe on March 08, 2007, 04:03:25 AM
Quote from: nneonneo on March 07, 2007, 02:19:25 PM
@tsmalmbe: Are you using 1.06? I thought I fixed that...

AMF 1.1.2 and SB1.0.6, yes.
Title: Re: nneonneo's Shoutbox
Post by: Sarke on March 08, 2007, 04:57:03 AM
Quote from: nneonneo on March 07, 2007, 02:19:25 PM
@Sarke: The "404" are due to a hack I had to do for Opera. Evidently, if I do not send a 404, but use a 302 (content not modified), Opera will repeatedly close and reopen the shoutbox. So, I had to resort to using 404 to prevent this behaviour. Also, sending the entire content of the shouts is a quick way to waste bandwidth, which is why I chose to use a 404 message (which uses much less bandwidth).

Thanks for being thorough and replying after such a long time, but you missed my point; a 304 (302 is "found" ;)) would still be logged, and it would still be a request to the server.  This can be very taxing on a server if there are lots of viewers of the shoutbox (as some replies in this thread show).  It is a resource heavy mod because of the short refresh rate.

My point was that it would be better if the server contacted the client instead.  Perhaps have a long timeout period where the client is waiting for info, and then the server can check on it's side if it receives a new shout and if it does send the new info.  If there's no new shout before the timeout period then just send a 404 and the client will send another request that starts a new timeout period.

Basically, put something like this in refreshChats().  I'm just thinking out loud and haven't really tested this, but you know what I mean:

<?php
$start_time time();
while (time() - $start_time 20 && $time == filemtime("$logDir/$chatFile"))
{
sleep(1);
clearstatcache();
}
?>


It would remove the need for a short refresh with the client since the checking would all be done server side.  Something like a timeout period of 60 sec would reduce the number of requests by a factor of 40.
Title: Re: nneonneo's Shoutbox
Post by: kichu on March 08, 2007, 06:39:24 AM
Hi Sarke, I think u can help me . I already asked 2 times and again asking 3rd time.

How to Display the Moderators color in Shoutbox

Only Admin (red colour ) is showing, i want to display all the membergroups color in Shoutbox.

Ty in Advance
Title: Re: nneonneo's Shoutbox
Post by: Sarke on March 08, 2007, 07:50:53 AM
Quote from: kichu on March 08, 2007, 06:39:24 AM
Hi Sarke, I think u can help me . I already asked 2 times and again asking 3rd time.

How to Display the Moderators color in Shoutbox

Only Admin (red colour ) is showing, i want to display all the membergroups color in Shoutbox.

Ty in Advance

Since you asked so nicely... ;)

In yshout/yshout.php, find:


    $p_class = "";

    if($user['is_admin']) $p_class = ' class="owner"';
    if($user['is_mod']) $p_class = ' class="moderator"';
    $shoutName=$user['name'];
    $userID=$user['id'];
    $writeText = "<p$p_class><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span> <a href=\"index.php?action=profile;u=$userID\">$shoutName</a>:</em> $newText</p>\n";


replace with:


    global $user_profile;
    loadMemberData(array($user['id']));
    if (!empty($user_profile[$user['id']]['member_group_color']))
       $color = ' style="color: ' . $user_profile[$user['id']]['member_group_color'] . '"';
    elseif (!empty($user_profile[$user['id']]['post_group_color']))
       $color = ' style="color: ' . $user_profile[$user['id']]['post_group_color'] . '"';
    else
       $color = '';

    $shoutName=$user['name'];
    $userID=$user['id'];
    $writeText = "<p><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span> <a href=\"index.php?action=profile;u=$userID\"><span $color>$shoutName</span></a>:</em> $newText</p>\n";



This will make the shoutbox use the forum group colours.
Title: Re: nneonneo's Shoutbox
Post by: kichu on March 08, 2007, 03:25:28 PM
its working Sarke .. Ty very much. You helped me in two times, one is CPU Overloading Problem, second is Membergroup color.  :D Thx a lot Sarke.
Title: Re: nneonneo's Shoutbox
Post by: DJ Rg on March 08, 2007, 04:44:46 PM
Hi

i just installed SB 106 ..where can i disable guest from reading or typing in the shoutbox?

Thanks much.

Rg
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 08, 2007, 05:10:34 PM
@DJ: in yshout/yshout.php, change allowGuests to false.
It should read
$allowGuests=false;
Title: Re: nneonneo's Shoutbox
Post by: DJ Rg on March 08, 2007, 05:24:46 PM
thanks nneonneo ..that seemed to do it ..do you have any other addons for smf ..you do great work..

:D

Title: Re: nneonneo's Shoutbox
Post by: JSizzal on March 08, 2007, 11:05:51 PM
Hi maybe im just weird but when I open up a new page I get this where the shoutbox should be:
QuoteShoutbox loaded in another window. Retrying...

Any help on what to do!!! Thanks in advance!
Title: Re: nneonneo's Shoutbox
Post by: DJ Rg on March 08, 2007, 11:15:15 PM
if your using tab browsing or have more than one browser/window open with more than one incident of the shout box ..it will say that in one incident. close the second incident.

hope that helps.
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on March 08, 2007, 11:18:44 PM
Yes I know, I meant if I wanted to have 2 (or more) different windows running the same shoutbox. How would I fix that.
Title: Re: nneonneo's Shoutbox
Post by: DJ Rg on March 08, 2007, 11:25:50 PM
sorry cant help ya there ..nneonneo or someone could tho..

Title: Re: nneonneo's Shoutbox
Post by: emrys01 on March 09, 2007, 10:25:27 AM
is anyone else having trouble getting the shoutbox to work when using IE7?  sadly, the redmond virus spreads like wildfire, and i'm sure more and more poor, misguided souls will be visiting my site via that hack-attractor... and i'd really like for them to be able to participate in chat/shouting, too!

(i suppose i should point out that i'm using 1.05 upgraded with the friendly-URLs fix from v1.06.  didn't do the full upgrade, because i had to hack it a lot to get it working where and how i wanted.)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 09, 2007, 07:37:29 PM
It seems to work AFAIK, I've got the guest posting working with IE7.

@ JSizzal: In yshout/js/yshout.js:
Find "function loadChat() {" (around line 116)
In there you see this:
if(get_cookie("yShout_open"))
{
$("yshout").innerHTML="Shoutbox loaded in another window. Retrying...";
setTimeout("loadChat()",Math.random()*1000+1000/*between 1 and 2 seconds*/);
return;
}
set_cookie("yShout_open","true",3/*seconds*/);

Remove all of the lines posted above, and the shout box will load in multiple windows. Note that without a PHP accelerator, this may cause high server load.



Anyway, I want to announce a fix for the smilies bug. I have finally located the source of this irritating bug, and have devised a fix.
Add the line
loadTheme();
immediately after
$user=ssi_welcome('nothing'); // ssi_welcome only does something IF the parameter is 'echo'; otherwise the user data is returned!
loadUserSettings();

in yshout/yshout.php and the problem should be fixed (note that existing smileys will not be fixed, only those for the new shouts).
I will post this fix on the mod main page until I post a 1.07 version (not this week, sorry; hopefully soon!)
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on March 09, 2007, 11:57:40 PM
Thanks, I got another "question" How would you make the chat's run the opposite way.!!

Instead of :
Quote1:21am - blah blah
                           1:22am - fkkdlf
                           1:24am - sjksd

to :
Quote1:24am - dsfkjsd
                1:22am - dsjfks
                1:21am - Yuppers
Title: Re: nneonneo's Shoutbox
Post by: emrys01 on March 10, 2007, 12:59:29 AM
Quote from: nneonneo on March 09, 2007, 07:37:29 PM
It seems to work AFAIK, I've got the guest posting working with IE7.


*sigh*... i suppose i'll have to retrofit all the other changes in 1.06 in, too, to see if that makes it work right.  at this point, every change is by hand, because i've hacked it so much to make it work the way i want on my sites.  (http://www.uru-amber-horizons.com/, for example.)

(edit: whoops, might be nice if i told you to use test/test to gain access.  everyone be nice when using that login, please.)
Title: Re: nneonneo's Shoutbox
Post by: Adolfo on March 10, 2007, 07:31:55 PM
Quote from: akulion on December 28, 2006, 04:44:32 PM
Thanks :D

Here is the Tiny Portal Version of this mod for those who want to use the shout box in a side block.

Demo of TP side block shoutbox can be seen here (http://goofy-goobers.com/forum)
you MUST be logged in to see it
user: test
pass: test

Instead of the normal yshout.php file please use this modified one to compensate for the side block --> download yshout.php (modified) (http://goofy-goobers.com/forum/yshout/yshout.zip)

Second thing you will need to do is carry out the modifications for index.template.php mentioned here (http://www.simplemachines.org/community/index.php?topic=137508.msg878923#msg878923) BUT DO NOT include this last part in your index.template.php:

// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END


INSTEAD put the code below in a PHP block (left ot right block) and activate it only for members (not for guests because they wont be able to see the shoutbox either ways!


// YSHOUT HERE
echo '<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...</div>';
// YSHOUT END


Link to modified yshout.php gives 404 error.
Anyone help please?
Title: Re: nneonneo's Shoutbox
Post by: nainnain6 on March 12, 2007, 09:57:43 PM
Hello i am french.
When i want post a text i read this message            Write error (writeLine); aborted
Can you help me plz?
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on March 13, 2007, 12:43:04 PM
Quote from: JSizzal on March 09, 2007, 11:57:40 PM
Thanks, I got another "question" How would you make the chat's run the opposite way.!!

Instead of :
Quote1:21am - blah blah
                           1:22am - fkkdlf
                           1:24am - sjksd

to :
Quote1:24am - dsfkjsd
                1:22am - dsjfks
                1:21am - Yuppers

anyone to help plz
Title: Re: nneonneo's Shoutbox
Post by: Sarke on March 13, 2007, 01:13:34 PM
JSizzal, the answer is already in this thread, just take a minute to read it.
Title: Re: nneonneo's Shoutbox
Post by: nainnain6 on March 13, 2007, 06:00:54 PM
Can you help me plz?
Title: Re: nneonneo's Shoutbox
Post by: bobbbb on March 13, 2007, 08:59:52 PM
This is an absolutely amazing shoutbox, thank you sir!
Title: Re: nneonneo's Shoutbox
Post by: Zetro on March 13, 2007, 10:16:29 PM
i read through the whole thread but i didnt really find a way to fix mines. Its on my site but it only says:

Shout Box
Shoutbox loaded in another window. Retrying...

or

Shout Box
...loading shoutbox...

i still dont really see a way to fix this. plz help
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 13, 2007, 10:35:03 PM
I wish there were a way to "mark" certain pages on this discussion.

@nainnain6: Check file permissions on yshout/chats/home.txt: it is not writable by your web-server.
@Reedeemer: This has in fact been discussed before. There are a few things to try:
1) check web server (not forum) error logs for some message about the script: it is likely not being executed correctly.
2) go to http://<your_forum>/yshout/yshout.php. It should say "Nothing to do.". If any other text appears, it's a probable error.
3) if server does NOT support GZip, change gzipCompression in yshout/yshout.php to false (it's one of the settings at the top)

@JSizzal: http://www.simplemachines.org/community/index.php?topic=137508.msg930132#msg930132
(plus the few messages before. The relevant bit is the modifications to class.tail.php)
Title: Re: nneonneo's Shoutbox
Post by: Zetro on March 13, 2007, 10:45:46 PM
Quote from: nneonneo on March 13, 2007, 10:35:03 PM
I wish there were a way to "mark" certain pages on this discussion.

@nainnain6: Check file permissions on yshout/chats/home.txt: it is not writable by your web-server.
@Reedeemer: This has in fact been discussed before. There are a few things to try:
1) check web server (not forum) error logs for some message about the script: it is likely not being executed correctly.
2) go to http://<your_forum>/yshout/yshout.php. It should say "Nothing to do.". If any other text appears, it's a probable error.
3) if server does NOT support GZip, change gzipCompression in yshout/yshout.php to false (it's one of the settings at the top)

@JSizzal: http://www.simplemachines.org/community/index.php?topic=137508.msg930132#msg930132
(plus the few messages before. The relevant bit is the modifications to class.tail.php)
Ill try that right now, thank you very much Neo and sorry for bothering.
Title: Re: nneonneo's Shoutbox
Post by: nainnain6 on March 14, 2007, 07:31:56 AM
thanks how move the file home.txt in root?
Title: Re: nneonneo's Shoutbox
Post by: nainnain6 on March 14, 2007, 07:46:21 AM
Is it possible to install this shoutbox in free.fr ?
Title: Re: nneonneo's Shoutbox
Post by: kichu on March 14, 2007, 10:57:58 AM
Onemore Problem @ nneonneo & Sarke.. When i use /me command in shoutbox, The total font color displaying in red color, i mean after using that command, Everyones Text displaying in red font. How to solve it :(  
Title: Re: nneonneo's Shoutbox
Post by: d3v1an7 on March 14, 2007, 12:23:10 PM
Firstly, huge shout out to nneonneo and the other few that have helped others in this thread.
I've just spent the last hour or so reading though the 28 pages, and a lot of you have shelled out a LOT of time to help others - so thanks.


Now for my bizarre problem :P



So! After reading and reading and reading, I haven't come across anything that is even remotely similar to my situation...

Any help would be greatly appreciated!
Thank you.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 14, 2007, 04:08:36 PM
@kichu: This behaviour is by design: the [me] tag in SMF does just that.
@nainnain6: I don't know anything about free.fr, sorry. Relocating the home.txt is not a great idea since the location is hardcoded (it shouldn't be, but I have not found a compelling reason to fix it and add complexity)
@d3v1an7: Correct me if I'm wrong, but I think you're missing the actual Javascript loading code, the part with all the CSS and JavaScript includes.

It looks like this in 1.06:
// YSHOUT HERE
global $boardurl;
echo '
<script src="',$boardurl,'/yshout/js/prototype.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/behaviour.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
',empty($options['collapse_header']) ? 'loadChat();':'','
}, { "yshout":"id"});
var board_url = "', $boardurl, '";

</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar42007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END

and is inserted in index.template.php. However, since you're using Joomla, I don't know where you'd want to put it.
Title: Re: nneonneo's Shoutbox
Post by: d3v1an7 on March 14, 2007, 06:49:35 PM
Interesting!
It's definately in there, just looking at it right now...I'll have a poke around in the Joomla! files and see if I can dig something out!

Thanks for your quick response.
(And for signing up to our site :))
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 14, 2007, 07:37:20 PM
Well, the problem is that I can't see the code from the client side. Therefore, the web browser isn't going to load the shoutbox if it doesn't have the code to do so!
Title: Re: nneonneo's Shoutbox
Post by: caryb on March 15, 2007, 07:46:11 AM
Hi, I love this mod! I upgraded to 1.1.2 yesterday & lost most of my mods & had to reload from scratch. the shoutbox I was using is not supported so i tried this one :D I have a couple of questions:-
1) Smileys I read they are not supported. My guys are missing them.
2) history scroll bar
3) increase font size in the shouts

Has anyone tackled any of these? I would appreciate any help! Please keep up the good work as this is the most used part of our forum/


Cary
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 15, 2007, 11:49:10 PM
@caryb:
1) Check main mod page for a quick fix for smilies. It is needed for some boards.
2) What about a history scroll bar? The history should open in a new blank page.
3) Edit the CSS block in index.template.php (between the first // YSHOUT HERE and // YSHOUT END lines)

@Sarke: (reference to http://www.simplemachines.org/community/index.php?topic=137508.msg996154#msg996154 which I must've missed when scanning for new replies :P)
I did in fact consider this when designing the mod (and I meant 304; I was pulling the number OTOH without checking it first :( ). However, I did not find a suitable implementation -- though the solution you posted does appear to work.
Title: Re: nneonneo's Shoutbox
Post by: TieuDieuTu on March 16, 2007, 03:42:06 AM
For some reason, I was able to install the Mod but in the Admin --> Features & Options, I don't have any settings for the Shoutbox show up. Therefore I cannot set permissions for my members and users.

Would someone enlighten me as to where I mess up. Thanks.
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 16, 2007, 04:13:32 PM
Quote from: nneonneo on March 05, 2007, 09:36:22 PM
@Johnny:
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).
2) readChat is in yshout/yshout.php.
3) Type /help impersonate to get help on that command. [/list][/list]

Thanks, is there a way to disble IMG commands only for users, but admins and mods can still use it?

Also on impersonate what is the point of user id and user level if when you impersonate someone it just comes out as text?
Title: Re: nneonneo's Shoutbox
Post by: Zetro on March 16, 2007, 05:33:24 PM
Thanks Nneon! Your new update yesterday fixed all my problems. My members love it. Thanks!
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 16, 2007, 09:18:10 PM
One more thing. It's really bugging me and my users that when the shoutbox load its on the first post. Can you make it so it always is at the last post. I am using a scroll bar by the way.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 16, 2007, 09:20:02 PM
@Tieu: Unfortunately, I do not know enough about SMF's admin code to add the mod there. I am planning on having settings for those soon, but there are a few things to work out. What kind of permissions do you need?
@Johnny: I don't think the BBC parser is able to distinguish different access levels, though if users have taken to abusing the image tag, you can add it to the BBC exclusion list (search for [left] in yshout/yshout.php)
Also, the purpose of userid and userlevel is to make a more "realistic" impersonation: the link color of the profile and the profile link itself.
I also don't quite understand the last reply you just made. Can you please clarify?
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 16, 2007, 10:29:07 PM
Register on my forums

www.silentkillops.com/forum/

login and check out the shout box. Each time you refresh the page it doesnt scroll down to the last post it scrolls to the very top again.

Also if I make it so no one can use the IMG tag does it come with an error message like "Sorry you are not permitted to use this code" or is it possible to make one?

I am also confused by your answer?

I don't think the BBC parser is able to distinguish different access levels, though if users have taken to abusing the image tag, you can add it to the BBC exclusion list (search for
in yshout/yshout.php)

Is that a yes? Cause it sounds different from the first answer or is that the same answer?

Also, the purpose of userid and userlevel is to make a more "realistic" impersonation: the link color of the profile and the profile link itself.

Mine doesnt show a profile link or anything.

I type this
/impersonate ferndogg03
  • [71.102.13x.x] [403] /WAS UP!!

    and I tried this

    /impersonate ferndogg03 0 71.102.13x.x 403 /WAS UP!!

    but they both end up like this

    [Today at 11:27:56 pm] del  ban ferndogg03: WAS UP!!

    the name is black. No link or anything. I even tried changing the userlevel and user ID.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 17, 2007, 12:11:24 AM
Oh, shoot! Sorry about that -- the guest modifications broke impersonation (I thought I fixed it, but I must've forgotten to copy the file from the test server to the mod package).

I'll come up with a fix -- thanks for noticing.
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 17, 2007, 03:16:22 AM
LOL 29 pages later and no one has noticed this? Can you help me with my other problems :( AWWW CRAP abandoned again...
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 17, 2007, 02:50:38 PM
Err, I said that this problem was only here since the 1.06 (guest) modifications.

Here's a fix until I get time to update the SB:
Find $fakeuser=array('id'=>$userid,'name'=>$name,'is_admin'=>($userlevel==2)?1:0,'is_mod'=>($userlevel==1)?1:0); // fake SMF $user array
in yshout/yshout.php
replace with
$fakeuser=array('id'=>$userid,'name'=>$name,'is_admin'=>($userlevel==2)?1:0,'is_mod'=>($userlevel==1)?1:0,'is_logged'=>($userlevel==-1)?0:1); // fake SMF $user array
Title: Re: nneonneo's Shoutbox
Post by: rayco on March 18, 2007, 07:22:13 AM
Is this MOD compatible with Col Atesi v3.0? theme??
Man i did follow all the instructions but still got no luck.
Can some1 help me....plz :)

SMF 1.1.2
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 18, 2007, 05:56:42 PM
Quote from: JohnnyMcKinney on March 16, 2007, 10:29:07 PM

Also if I make it so no one can use the IMG tag does it come with an error message like "Sorry you are not permitted to use this code" or is it possible to make one?

I am also confused by your answer?

I don't think the BBC parser is able to distinguish different access levels, though if users have taken to abusing the image tag, you can add it to the BBC exclusion list (search for
in yshout/yshout.php)

Is that a yes? Cause it sounds different from the first answer or is that the same answer?
Can you answer those question. Thanks for the fix on the shoutbox. I don't know the purpose of the impersonate, but its freaking funny when members say WTF I DIDNT SAY THAT!! Guess thats why you made it lol.
Title: Re: nneonneo's Shoutbox
Post by: jay.jarri on March 18, 2007, 06:21:14 PM
I am sorry if this has already been asked before, but have gone through all the pages and found nothing...

Is there a way to display this shoutbox some other place???

I would like it to show only on the main page (so i use boardindex.template.php) and i'd like to display it just under the menu bar (the one that has all those Home, Help, Search, Members etc buttons).

Can somebody help identify what codes do i need to put/modify?
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 19, 2007, 02:20:58 AM
No one can get this to work either man.
Title: Re: nneonneo's Shoutbox
Post by: majesticwish on March 19, 2007, 01:53:30 PM
The mod works ok for me. There's a few problems, and I REALLY want this mod to work, as NONE of the other chat mods work for my forum.

My main problem is that when I install it, it works fine for a few days. Then, when I come back, suddenly none of the admin features are there. I can't ban, clear, etc. I only see the History and Commands link, just as if i was a regular member. And it stays that way. What is wrong?

EDIT: I just deleted my cookies, and now it's working...maybe that's the problem?

Also, when i first go to the page it says this above the shoutbox: Warning: ob_start(): output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter' in /home/www/brewtech.freehostia.com/forum/yshout/yshout.php on line 604

Once I log in, it's gone...any solutions?
Title: Re: nneonneo's Shoutbox
Post by: Joris Meeus on March 19, 2007, 04:33:40 PM
i got the error Write error (writeLine); aborted

I chmodded that home.txt file to 777 but it doesn't work :(

Can som1 plz help me

Greetz Joris
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 19, 2007, 04:36:21 PM
@majesticwish: First bug: I know of the variant where the shoutbox appears to be "broken" temporarily, but never for extended periods of time. It probably has to do with the server not reading the response correctly, but I have never been able to pinpoint the problem due to its unpredictability. If that happens, I would try Shift+Refresh (depends on browser) to resend the request and clear any corrupted cache data.

Second (warning) bug: If you don't like the warning showing up, in yshout/yshout.php set gzipCompression to false. It has to do with whatever "URL-Rewriter" is -- it's overriding the GZip compression handler.

@Johnny: Please restate all your questions. I don't know which ones I've answered.

@jay: In your case, this should not be too difficult.
1) In index.template.php, remove both the short Javascript fragment (the second block, *not* the first) and the actual div (the third block). Leave the first intact.
2) Under the lines // YSHOUT HERE
global $boardurl;

add
if(empty($context['current_board']))
3) In BoardIndex.template.php, add the line
echo '<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
at the point in the code where you want the shoutbox to appear. In your case, this will probably be after "global $context, $settings ..." at the 6th line of BoardIndex.template.php.

@Joris: Try Admin->Packages->Options->Select All Files are Writable->Change File Permissions. If that doesn't help, PM me the board URL and I'll take a look.
Title: Re: nneonneo's Shoutbox
Post by: Joris Meeus on March 19, 2007, 04:39:47 PM
well, new news, others can post in the shoutbox but i can't  :(

I get the Write error (writeLine); aborted error

Others just can post a message in the SB
Title: Re: nneonneo's Shoutbox
Post by: majesticwish on March 19, 2007, 05:34:50 PM
thanks much!
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 19, 2007, 06:50:31 PM
@Joris: odd, I've never seen that bug before.
Locate the two places in yshout/yshout.php and change the messages to make them distinguishable. Then tell me which line causes the error.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 19, 2007, 08:54:50 PM
Maybe Joris, you should do a new install because it works for all these other people ;)
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 20, 2007, 01:18:03 AM
Ok if I make it so no one can use the IMG tag does it come with an error message like "Sorry you are not permitted to use this code" or is it possible to make one?

Second
I am also confused by your answer?

QuoteI don't think the BBC parser is able to distinguish different access levels, though if users have taken to abusing the image tag, you can add it to the BBC exclusion list (search for
in yshout/yshout.php)

Is that a yes? Cause it sounds different from the first answer or is that the same answer?

Lastly
Thanks for the fix on the shoutbox. I don't know the purpose of the impersonate, but its freaking funny when members say WTF I DIDNT SAY THAT!! Guess thats why you made it lol.  
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on March 20, 2007, 01:38:02 PM
How can I limit size of history? Can I set somewhere size in kB or how far back in days? tnx
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 20, 2007, 06:47:29 PM
@Zwerko: I've always used a cron job on my server, but if your server won't let you (and I just realized most don't), then you need to edit truncateChat function to your needs. I can't give you an exact guideline for that though.

@Johnny: If you want to disable [ img ] tag, then search for [left] in yshout/yshout.php (there are two occurences). In each occurrence, add [img (note lack of final "]") to the array.
Title: Re: nneonneo's Shoutbox
Post by: slvreagl on March 20, 2007, 08:35:42 PM
I have ver. 1.05 installed it appears there is no uninstaller is this correct? Should I just delete it from the packager? When I try to uninstall it from the packager it says This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information.

?? :-\ ??
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 21, 2007, 02:51:54 AM
So I can't make it so only admins and mods can use the IMG tag?
Title: Re: nneonneo's Shoutbox
Post by: bobbbb on March 21, 2007, 01:23:27 PM
Hello nneonneo,

Thank you sir for all your help and for your mod.

I would like to know, is it possible to disable HTML code the same way we can disable BBC code? I would like to disable the <IMG> tag, but it doesn't work in the BBC parsing line.

$newText = str_replace(array("[list]","[center]","[left]","[right]","[img]","[font]","[color]","[size]","[glow]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
preparsecode($newText); // gah, sanitize input!!
$newText = parse_bbc($newText); // w00t!
censorText($newText);



I'm not quite sure how this works.

And also, are you accepting donations? I would like to send you a Paypal donation for your efforts.

*EDIT*
Found the solution,

instead of putting in "<img" I entered the equivalent "&lt;img", and all <img text is successfully parsed out.
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on March 21, 2007, 01:27:35 PM
Quote from: nneonneo on March 20, 2007, 06:47:29 PM
@Zwerko: I've always used a cron job on my server, but if your server won't let you (and I just realized most don't), then you need to edit truncateChat function to your needs. I can't give you an exact guideline for that though.

Shout's are deleted automatically but back 10 days or so, I was thinking that u have somewhere in code line that I can change to only few days. If not never mind, I will delete it manually....What I have to do to edit truncateChat function?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 21, 2007, 04:38:56 PM
Nneonneo, I use the theme XD3Dv1 with SMF 1.1.2 and TinyPortal v0.9.8.3. :)
I am no longer gonna try to integrate this with the TinyPortal part, but I will integrate it as it should with SMF. OK, I want to make the shoutbox appear right before the copyright. What do I do? ???
Title: Re: nneonneo's Shoutbox
Post by: kichu on March 21, 2007, 04:49:42 PM
Hey nneonneo Thnaks for the Mod. Am using it in my site http://da-pirates.com and it is working good. I started my website 2 months back and now 12,500 members joined. All members liking Shoutbox so  Once again thaks to you nneonneo.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 21, 2007, 06:15:55 PM
@Johnny: Under
$newText = str_replace(array("[list]","[center]","[left]","[right]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
add
if(!$user['is_mod'] && !$user['is_admin']) $newText = str_replace("[img","",$newText)
and then admins/mods will be able to use [ img ], others won't (be sure to edit both locations)

@slvreagl: There's an uninstaller, but if you have upgraded to 1.1.2, then the Package Manager will not allow uninstall.
One solution is to manually uninstall it -- remove the yshout folder and modifications made to index.template.php (all three blocks of code between // YSHOUT HERE and // YSHOUT END)
Another is to uninstall 1.12 patch, uninstall shoutbox and reapply 1.1.2 patch (not recommended for a big forum, but it will probably work)
Finally, you can edit the package directly and change the uninstall versions in install.xml.

@bobbbb: I'm not accepting donations, but thanks for the kind thoughts :)

@Zwerko: something like
if(time() - filectime("$logdir/history.$chatFile") > (60*60*24*10)) unlink("$logdir/history.$chatFile");
right before the final "}" of the truncateChat method should do the trick.
So, that would go after fputs($handle, $oldText);
fclose($handle);
}

60*60*24 = one day, so *10 means ten days.

@brianjw: You mean the copyright at the bottom of the page? That would be in index.template.php in template_main_below() I think. You'd copy the first block of code between // YSHOUT HERE and // YSHOUT END (the CSS+JS includes) from the default theme to the new theme's index.template.php, ignore the second block (JS header collapse) and add
// YSHOUT HERE
echo '<div id="yshout">',$txt['yshout_loading'],'</div>';
// YSHOUT END

to whereever you wanted the shoutbox to appear in template_main_below(), probably right after the global line or perhaps about 3 lines after that.

@kichu: glad you like it :)
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 21, 2007, 06:50:35 PM
I must admit man. This is the best shoutbox around. I love how I can reply to something and the next time I check rather you're offline or not you've replied. I've been waiting 2 weeks for some other coder to actually reply. Maybe you can look into this and tell me if this is possible.

http://www.simplemachines.org/community/index.php?topic=158750.0

If so do you think you can stick to the task ;)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 21, 2007, 07:41:19 PM
@nneonneo: Thanks :) It's a little confusing, maybe ill do it tomorrow
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on March 22, 2007, 10:06:52 PM
I recently transfered my server and now all of a sudden I get this error:

Warning: fopen(chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /home/silentki/public_html/forum/yshout/yshout.php on line 715
File error (writeLine); aborted

Any advice?

EDIT: LOL I figured it out, I forgot when I transfered I had to edit the permissions back to 777 lol.

I did how ever add your code and there three different spots to add it... A little help. Do I add the code underneath the code above or inside of it?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 22, 2007, 10:29:05 PM
@nneonneo: you have already registered on my site a while back but let me know if your willing to do this:
QuoteBecome an admin on my site and you can set it up in the XD3Dv1 theme ;)
If you say yes, I will send you a PM to let you know a little more detail ;)
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on March 23, 2007, 02:04:35 PM
Quote from: nneonneo on March 21, 2007, 06:15:55 PM
@Zwerko: something like
if(time() - filectime("$logdir/history.$chatFile") > (60*60*24*10)) unlink("$logdir/history.$chatFile");
right before the final "}" of the truncateChat method should do the trick.
So, that would go after fputs($handle, $oldText);
fclose($handle);
}

60*60*24 = one day, so *10 means ten days.

It's working, thanks  ;) Keep up a good work  >thumbup up<
Title: Re: nneonneo's Shoutbox
Post by: barinov on March 23, 2007, 08:35:26 PM
Hi there people!
I just cant get working the shoutbox..I´ve got latest version 1.06 and SMF1.1.2
Appears like this :

(http://img162.imageshack.us/img162/4435/untitled2eo1.th.jpg) (http://img162.imageshack.us/my.php?image=untitled2eo1.jpg)


First I got that error, relating to refreshing etc, I edited as I saw trough the inicial topic, and now Just got Loading and nothing..
As some user posted before when I type yshout.php adress nothing appens, just white window, no error or something

Help please!!
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 23, 2007, 10:16:47 PM
@barinov: This has been discussed somewhere in this topic ;)

@nneonneo: have you seen my post before?

Title: Re: nneonneo's Shoutbox
Post by: barinov on March 23, 2007, 11:03:04 PM
I found that fixed index.template..does anyone still have it?
Title: Re: nneonneo's Shoutbox
Post by: jay.jarri on March 25, 2007, 06:14:49 AM
Quote from: nneonneo on March 19, 2007, 04:36:21 PM
@jay: In your case, this should not be too difficult.
1) In index.template.php, remove both the short Javascript fragment (the second block, *not* the first) and the actual div (the third block). Leave the first intact.
2) Under the lines // YSHOUT HERE
global $boardurl;

add
if(empty($context['current_board']))
3) In BoardIndex.template.php, add the line
echo '<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
at the point in the code where you want the shoutbox to appear. In your case, this will probably be after "global $context, $settings ..." at the 6th line of BoardIndex.template.php.


Thanks nneonneo, now i can see the shoutbox under the menu bar... BUT... as a guest, once i log in.. it shows a ...... loading shoutbox... for a split second and then disappears.
Title: Re: nneonneo's Shoutbox
Post by: jay.jarri on March 25, 2007, 06:24:32 AM
Quote from: jay.jarri on March 25, 2007, 06:14:49 AM
Quote from: nneonneo on March 19, 2007, 04:36:21 PM
@jay: In your case, this should not be too difficult.
1) In index.template.php, remove both the short Javascript fragment (the second block, *not* the first) and the actual div (the third block). Leave the first intact.
2) Under the lines // YSHOUT HERE
global $boardurl;

add
if(empty($context['current_board']))
3) In BoardIndex.template.php, add the line
echo '<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
at the point in the code where you want the shoutbox to appear. In your case, this will probably be after "global $context, $settings ..." at the 6th line of BoardIndex.template.php.


Thanks nneonneo, now i can see the shoutbox under the menu bar... BUT... as a guest, once i log in.. it shows a ...... loading shoutbox... for a split second and then disappears.


Sorry buds... it was an issue with my Theme Directory address being wrong... sorted it out and working perfectly fine..... THANK YOU VERY MUCH
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 25, 2007, 06:31:24 PM
@brianjw: I probably could do it without needing admin: just send the index.template.php and where you want it (PM?)

@barinov: If all you get upon entering the yshout/yshout.php URL is an empty page, then I strongly suggest checking your webserver (not forum) error log. Chances are it's a permissions thing on the script which is preventing execution (some servers will reject 755 chmod'ed scripts, while some require it)
Title: Re: nneonneo's Shoutbox
Post by: neolein2k on March 26, 2007, 09:43:15 AM
i also got the error "write line : abourted" .

If I excluded these lines it worked

/* while( !flock($handle, LOCK_EX) ) // just IN CASE two ppl write to it at once
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeLine); aborted'); // one second
}*/


could this be security risk?
Title: Re: nneonneo's Shoutbox
Post by: jay.jarri on March 26, 2007, 10:24:15 AM
Hey nneonneo

Thanks a lot brother for all your quick help... I am however seeing these strange warnings in the shoutbox and am unable to understand what should i do. Please help

QuoteWarning: session_start() [function.session-start]: open(/sessions/sess_e546439a618c38f91b7c13131d3e3e21, O_RDWR) failed: Permission denied (13) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 34

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php:34) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php:34) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 40
History Commands ExtendedHistory HideAdminLinks ReturnToShoutbox

Warning: session_start() [function.session-start]: open(/sessions/sess_e546439a618c38f91b7c13131d3e3e21, O_RDWR) failed: Permission denied (13) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 34

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php:34) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php:34) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 40

[Yesterday at 11:30:41 PM] del  ban playerofdeath11: then you can watch anything you want

[Yesterday at 11:39:19 PM] del  ban sumita_tripathy: this really helped me in, i m thankful

[Today at 12:40:45 AM] del  ban chachaji: hello 2 everyone yaar i wanna c NAMASTEY LONDON can u pls add it thnx

[Today at 01:57:15 AM] del  ban rockerkapil: www.0288.com

[Today at 01:57:23 AM] del  ban rockerkapil: for online wnglish movies

[Today at 03:27:52 AM] del  ban uzair: helloooo

[Today at 03:28:05 AM] del  ban uzair: star lus working or not??

[Today at 12:03:12 PM] del  ban sumita_tripathy: why no updates on saat phere n banoongi mei teri dulhan?

[Today at 12:19:14 PM] del  ban Udhav: hey is BLIC 2007 available?

[Today at 12:39:08 PM] del  ban jay.jarri: what is BLIC ? Udhav

[Today at 12:42:28 PM] del  ban jay.jarri: NAMASTAY LONDON posted in the ONLINE section


Warning: Unknown: open(/sessions/sess_e546439a618c38f91b7c13131d3e3e21, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/sessions) in Unknown on line 0

Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 26, 2007, 10:36:39 AM
@nneonneo: /me has pmd you.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 26, 2007, 05:38:41 PM
@neolein2k: It's designed to prevent PHP from attempting to access the file twice, which causes some severe errors on my server. If you are getting this problem, perhaps the file locking is broken or something, but I can't speculate. If it works without those two lines, then so be it.

@jay.jarri: if this is your own server, then I suggest fixing the session data path ("/sessions" is usually off-limits on a Linux/UNIX box). If not, then contact your host.
Also, are there errors like those in the forum error log?
Title: Re: nneonneo's Shoutbox
Post by: bobbbb on March 27, 2007, 02:43:47 AM
Hello nneonneo sir,

I would like to customize the timestamp output. The current output is:

[Today at 02:13:52 AM]

I would like to instead have [3/27 2:13 AM]

If I remove theselines, will I be able to customize the timestamp value?:

       function preg_timeformat($matches)
       {
          // format: <timeval=(value)>
          return timeformat(intval($matches[1]));
       }




   $chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);




        echo preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$text);


The yshout.php file is so confusing for me  :(

Thank you again for your help and hard work!
Title: Re: nneonneo's Shoutbox
Post by: rayco on March 27, 2007, 04:44:16 AM
Hello nneonneo's :)

I've asked this before but if you dont mind, would you put the code in colatesi v3.0? If so i'll send you the index.themplate.php. Sorry for the trouble and thank you kindly.


rayco
smf  1.1.2

Title: Re: nneonneo's Shoutbox
Post by: Trixter on March 27, 2007, 05:50:44 AM
Heres the error i get in Firefox and Seamonkey
Quote
Shoutbox loaded in another window. Retrying...

But i get this message in EI

Quote...loading shoutbox...

iv checked the GZ and the Yshout.php says nothing to do. i dont own the web server so i dont know how to check the error logs on it.

If you could please help me with this id be extreemly greatful.

PS iv checked all the pages on this thread but cant find any solution that works for the problem
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 27, 2007, 10:10:06 AM
@bobbbb: It's using the forum timestamp output. So, it outputs times in exactly the same format as the forum does. It would probably be better to change this in your profile options, unless you want to keep the forum timestamps the same.
If that's the case, then you would need to use http://ca3.php.net/strftime [strftime php function]

@rayco: I'm rather busy this week, so if I don't get to it immediately, don't be too surprised.

@Trixter: Clear your cookies. If that doesn't help, post a forum URL.
Title: Re: nneonneo's Shoutbox
Post by: Calaad on March 27, 2007, 02:14:45 PM
Thank for the update Nneonneo, it's work perfectly now :)

Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 27, 2007, 09:39:55 PM
So...whens the next version? ??? lol
/me thanks nneonneo for all his hard work and a personal thanks to him for getting my shoutbox setup.

Brianjw
;)
Title: Re: nneonneo's Shoutbox
Post by: Adolfo on March 28, 2007, 06:02:45 PM
Since instructions given in this message (http://www.simplemachines.org/community/index.php?topic=137508.msg880188#msg880188) seems to be broken (404 error), could please someone tell me how can I put the shoutbox in a side block or in a different page (i cannot leave it in frontpage for bandwidth problems)?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 28, 2007, 07:12:11 PM
@brianjw: the next version is whenever I say it will be. Currently, I've only got one major fix (correct me if I should have more): the loadTheme fix for smilies. It's not a big enough fix for me to run off and perform the rather rigorous testing and reloading procedure that I usually employ, so until I find something to fix, it's staying at 1.06.

@Adolfo: Are you wanting it to be in TinyPortal? I was working (intermittently) on a solution, but none has manifested itself so far.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 28, 2007, 07:22:30 PM
Quote from: nneonneo on March 28, 2007, 07:12:11 PM
@brianjw: the next version is whenever I say it will be. Currently, I've only got one major fix (correct me if I should have more): the loadTheme fix for smilies. It's not a big enough fix for me to run off and perform the rather rigorous testing and reloading procedure that I usually employ, so until I find something to fix, it's staying at 1.06.
These aren't bugs but there good feature ideas...
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 28, 2007, 07:31:51 PM
1) that integration is difficult. It's a long-long term goal...
2) I will probably add that (log rotations)
3) Perhaps. Probably in the file.
4) Typing notification was disabled after I discovered how incredible the strain on my server was. I have the files, if you want them; it's activated through Javascript.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 28, 2007, 07:34:58 PM
Quote from: nneonneo on March 28, 2007, 07:31:51 PM
1) that integration is difficult. It's a long-long term goal...
2) I will probably add that (log rotations)
3) Perhaps. Probably in the file.
4) Typing notification was disabled after I discovered how incredible the strain on my server was. I have the files, if you want them; it's activated through Javascript.
nah, i dont want my shoutbox to be different from the version that you have given us :)

Brianjw
Title: Re: nneonneo's Shoutbox
Post by: Poisonhearts on March 28, 2007, 09:10:12 PM
I installed it but it doesn't show up anywhere...
Title: Re: nneonneo's Shoutbox
Post by: Ryuoh on March 29, 2007, 12:55:55 AM
Quote from: akulion on December 28, 2006, 04:44:32 PM
Thanks :D

Here is the Tiny Portal Version of this mod for those who want to use the shout box in a side block.

Demo of TP side block shoutbox can be seen here (http://goofy-goobers.com/forum)
you MUST be logged in to see it
user: test
pass: test

Instead of the normal yshout.php file please use this modified one to compensate for the side block --> download yshout.php (modified) (http://goofy-goobers.com/forum/yshout/yshout.zip)

Second thing you will need to do is carry out the modifications for index.template.php mentioned here (http://www.simplemachines.org/community/index.php?topic=137508.msg878923#msg878923) BUT DO NOT include this last part in your index.template.php:

// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END


INSTEAD put the code below in a PHP block (left ot right block) and activate it only for members (not for guests because they wont be able to see the shoutbox either ways!


// YSHOUT HERE
echo '<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...</div>';
// YSHOUT END


Does This still work?
Title: Re: nneonneo's Shoutbox
Post by: Adolfo on March 29, 2007, 06:35:28 AM
Quote from: Ryuoh on March 29, 2007, 12:55:55 AM
Does This still work?

Nope :(
404 error
Title: Re: nneonneo's Shoutbox
Post by: Adolfo on March 29, 2007, 06:35:46 AM
Quote from: nneonneo on March 28, 2007, 07:12:11 PM
@Adolfo: Are you wanting it to be in TinyPortal? I was working (intermittently) on a solution, but none has manifested itself so far.

Yes, exactly, I'm wanting it for Tinyportal :)
If you find a solution, it would be sooooo fantastic :)
Title: Re: nneonneo's Shoutbox
Post by: Ryuoh on March 29, 2007, 07:24:12 AM
Quote from: Adolfo on March 29, 2007, 06:35:46 AM
Quote from: nneonneo on March 28, 2007, 07:12:11 PM
@Adolfo: Are you wanting it to be in TinyPortal? I was working (intermittently) on a solution, but none has manifested itself so far.

Yes, exactly, I'm wanting it for Tinyportal :)
If you find a solution, it would be sooooo fantastic :)
I would also love to be able to put it in a tinyportal center block
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 29, 2007, 10:22:11 AM
@Poisonhearts: You need to install it to your particular theme; see the link on the mod page for details.

@TinyPortal users: I will try to get it to work. Presently, I'm trying to put the code into a PHP block.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on March 29, 2007, 07:13:31 PM
Aku's way worked for a while but then I upgraded or something and it stopped working. :-\ So now we're waiting for a tinyportal way. :)

@nneonneo: See felblog because they have been able to integrate there blogging system in tinyportal. Maybe get permission from Bloc to make that an integration ;)
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on March 30, 2007, 03:44:12 PM
Is there a way to make the
Quotesection quote only what the member types and not take up the entire length of the shoubox.

!!

Thanks for all your help!
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on March 31, 2007, 08:06:01 PM
@brianjw: I'm working on it.
@JSizzal: I'm sorry, I do not understand the question.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 01, 2007, 02:21:30 AM
OK, sorry to doublepost, but I have managed to make it work in TinyPortal.
It can be seen at
http://nneonneo.ath.cx/advforums/guinea_smf/index.php?theme=3
(note that the default theme has the shoutbox installed in the header, like the default installation, and the Babylon theme has it in the TP block on the top, labelled SB_Test).

It's extremely easy to set up, but it looks horrendous (due to wrapping) in the right or left blocks. To make it work there would take a fair bit of appearance modification.
In the center, though, I think it looks OK.

Code: add a "phpbox" block, and put
echo '<div id="yshout"></div>';
in the box.
For the *default* theme (and other themes modified to use the SB), please find the lines which say "// YSHOUT HERE" in the index.template.php file and delete the data from the "// YSHOUT HERE" to the matching "// YSHOUT END". Note that this will prevent the mod uninstallation from working properly; the yshout files will be deleted but the modifications in index.template.php will stay.
There should be 3 (three) such blocks of code. Remove each block and save the file. This is to be done on the default theme and any SB-modified themes.

Next, find the index.template.php for that theme, and place the code
// YSHOUT HERE
global $boardurl;
echo '
<script src="',$boardurl,'/yshout/js/prototype.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/behaviour.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var board_url = "', $boardurl, '";

</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar42007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END

after
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';


This code is (currently) identical to the first block of code installed in index.template.php, but I may change the CSS to suit TP needs in the future (these instructions will be posted on the main mod site).

EDIT: Long overdue change to prevent the header check from breaking things.
Title: Re: nneonneo's Shoutbox
Post by: Adolfo on April 01, 2007, 07:47:15 AM
Thanks nneonneo for this tinyportal conversion!
Have you ever considered to transform your shoutbox in a true chat room?
I do not know if it's already possible, but it would be very cool to open the shoutbox in a separate page integrated with SMF (something like calendar or gallery) :)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 01, 2007, 09:11:35 AM
There are already chat mods there which seem to work just fine -- I'd prefer to keep my mod the way it is :)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 01, 2007, 04:14:33 PM
I will try this some time this afternoon. Thanks nneonneo :)
Title: Re: nneonneo's Shoutbox
Post by: Windwalker on April 01, 2007, 06:05:29 PM
With the standard theme, the shoutbox is working fine.
But although I made adjustments to index.template.php, I do not get it to work with another theme.

I always get the "...loading shoutbox..." message.

Has someone solved this problem?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 01, 2007, 06:40:29 PM
Have you forgotten to add all the parts? There are two blocks which *must* be added to another theme:
// YSHOUT HERE
global $boardurl;
echo '
<script src="',$boardurl,'/yshout/js/prototype.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/behaviour.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
',empty($options['collapse_header']) ? 'loadChat();':'','
}, { "yshout":"id"});
var board_url = "', $boardurl, '";

</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar42007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END

after
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';

and of course
echo '<div id="yshout">loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
where you want the SB to appear.
If either are missing, the loading will fail.
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 01, 2007, 06:55:18 PM
Oh I meant..

So the {quote} and {code} only quotes/codes what the user wrote not the entire line.

(http://i16.photobucket.com/albums/b15/blackthonboy/6fe7bd5f.gif)
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on April 01, 2007, 07:00:06 PM
I added your code and there three different spots to add it... A little help. Do I add the code underneath the code above or inside of it?

Also maybe you can look into this and tell me if this is possible.

http://www.simplemachines.org/community/index.php?topic=158750.0

If so do you think you can stick to the task ;)


Quote from: nneonneo on March 28, 2007, 07:31:51 PM
1) that integration is difficult. It's a long-long term goal...
2) I will probably add that (log rotations)
3) Perhaps. Probably in the file.
4) Typing notification was disabled after I discovered how incredible the strain on my server was. I have the files, if you want them; it's activated through Javascript.

I would like that, I dont have a server so its my hosts problem. Will it make users load up my webpage slower?
Title: Re: nneonneo's Shoutbox
Post by: greyknight17 on April 01, 2007, 07:17:08 PM
nneonneo, great mod. I just tried to test it out locally on Tiny Portal before using it Live and got this error:

Parse error: parse error, unexpected T_STRING in C:\wamp\www\smf112\Sources\Load.php(1735) : eval()'d code(35) : eval()'d code on line 1

In your Tiny Portal instructions, you say to delete ALL those // YSHOUT HERE to // YSHOUT END...except for the one we are copying right? I saw that the first one to copy after the other code is already in the correct place. I tried everything from the steps outlined but couldn't get it to work.

I have one more question. Is there any way to delete that first field and only allow members to post (so it will put in their names by default)?

Thanks.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 01, 2007, 08:12:20 PM
@JSizzal: It uses the BB parser. What do you want done differently?
@Johnny: I'm very busy ATM (who isn't?) so I don't really have time to look at the forms request...
The typers will probably cause lag. Until I figure out how to open a "listener" connection from the client, I won't really be able to support it.
Finally, what do you mean by three spots? There are three pieces of code, yes, but I don't really understand the question...
@greyknight17: The problem is with the PHP code you've inserted into the phpbox (I hope I didn't post it wrong =\), not with the index.template.php.
The phpbox block must read
echo '<div id="yshout"></div>';
and nothing else, or it will fail.
If you want members only, set allowGuests to false in yshout/yshout.php. That will disable the first field so it is the username, and also give guests an error message when they access the shoutbox ("You must be logged in to use the shoutbox!")
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 01, 2007, 09:34:01 PM
Brian, no offense, but the "/me" thing is getting a little irritating. Also, I can see when I get a PM, so I'd prefer if you didn't clutter this topic with PM notifications.

Thanks :)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 01, 2007, 09:35:44 PM
Sorry about that :) lol i just learned its a feature so i been messing with it. *Removed*
Title: Re: nneonneo's Shoutbox
Post by: Windwalker on April 02, 2007, 02:08:21 AM
Quote from: nneonneo on April 01, 2007, 06:40:29 PM
Have you forgotten to add all the parts? There are two blocks which *must* be added to another theme:

Yes of course.
I just followed the new instructions in http://custom.simplemachines.org/mods/index.php?mod=585 (http://custom.simplemachines.org/mods/index.php?mod=585) (it used to be the pieces of code to add, wasn't it?), but this doesn't help either.
Unfortunately, I can't show you my SMF 1.1.2 board, because it's locally running.
My real board on the webserver is still SMF 1.0.10, not yet upgraded...
Title: Re: nneonneo's Shoutbox
Post by: Con on April 02, 2007, 01:40:03 PM
Ok, I placed this thing at the bottom of my forum, is there any way I can put a box around it and make it look a bit decent around it?

and I have a problem with the type box, typed text isnt showing up like shown in attachment
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 02, 2007, 03:33:04 PM
@Windwalker: I recently updated the mod page for 1.06, since the old instructions were outdated. Have you tried the new instructions yet?

@Con: It depends entirely on what theme you're using. I can't tell you how to place a box around it, unless I know what kind of theme and what code is usually used for that purpose.
In **theory**, adding some kind of CSS declaration to the div would do it, like
<div id="yshout" style="border-style: solid;border-color: #0000ff;"> would produce a solid blue border (which would likely look ugly, so change the color!). However, that may not be the best way to do it -- I'd need to see the theme.
Second problem (typing box): perhaps the colors are wrong. If you type something and hit enter, does the text post? If so, then just edit the giant CSS block in index.template.php, specifically the part about "#yshout #shout-text".
Title: Re: nneonneo's Shoutbox
Post by: Con on April 02, 2007, 04:06:10 PM
Quote from: nneonneo on April 02, 2007, 03:33:04 PM
@Con: It depends entirely on what theme you're using. I can't tell you how to place a box around it, unless I know what kind of theme and what code is usually used for that purpose.
In **theory**, adding some kind of CSS declaration to the div would do it, like
<div id="yshout" style="border-style: solid;border-color: #0000ff;"> would produce a solid blue border (which would likely look ugly, so change the color!). However, that may not be the best way to do it -- I'd need to see the theme.
Second problem (typing box): perhaps the colors are wrong. If you type something and hit enter, does the text post? If so, then just edit the giant CSS block in index.template.php, specifically the part about "#yshout #shout-text".
I use the theme 'black22' I think it's called.
So I can just throw a div around the coding that posts the shoutbox? I never worked with php before so heh ^^;

and I tried editing those two parts in the CSS, it never changed the colors.. but it did post, you just have to type blind.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 02, 2007, 04:18:59 PM
Actually, you wouldn't throw a div around it;  just edit the div that's already there!
You edited this code, right?
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}

and changed the color, I'm assuming. It changes just fine on my forum when I edit that parameter...
Title: Re: nneonneo's Shoutbox
Post by: Col on April 02, 2007, 09:28:55 PM
Is there anyone who is actually using this mod? It would be nice to see it in action.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 02, 2007, 09:30:33 PM
http://nneonneo.ath.cx/advforums/guinea_smf/ for a demo (live demo; guest posting)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 02, 2007, 09:48:13 PM
Thanks again nneonneo ;) [for the pm].
Title: Re: nneonneo's Shoutbox
Post by: greyknight17 on April 02, 2007, 10:08:32 PM
Quote from: nneonneo on April 01, 2007, 08:12:20 PM
@greyknight17: The problem is with the PHP code you've inserted into the phpbox (I hope I didn't post it wrong =\), not with the index.template.php.
The phpbox block must read
echo '<div id="yshout"></div>';
and nothing else, or it will fail.
If you want members only, set allowGuests to false in yshout/yshout.php. That will disable the first field so it is the username, and also give guests an error message when they access the shoutbox ("You must be logged in to use the shoutbox!")
OK, I copied and pasted this line into the phpbox again. It seems to be a bit better this time around, but I only see the title bar (that I called ShoutBox) and no other field to type in.

Do I need to edit the index.template.php file if I don't want the ShoutBox to appear in the user info area?

I also changed allowGuests to false but now it asks me to login to shout even when I'm logged in already :(
Title: Re: nneonneo's Shoutbox
Post by: Trixter on April 03, 2007, 03:56:19 AM
Hi thanks for the new installation instructions they work great!! I love this shoutbox :)
Title: Re: nneonneo's Shoutbox
Post by: SinnerSaint on April 03, 2007, 05:13:13 AM
Hi nneonneo,

I'm just wondering what part of your shoutbox caused my host to report that the shoutbox script is using excessive CPU resources. Here is a part of their e-mail:

QuoteHi,

We have been forced to disable one of your scripts as it was excessive. Some
of the details are as follows:

User      Domain          %CPU %MEM %SQL
allpi3  allpinoystuff.net       10.72   9.76    0.5
Top Process     %CPU 18.0       [php5.bin]
Top Process     %CPU 14.0       [php5.bin]
Top Process     %CPU 13.0       [php5.bin]

203.**.***.*** - - [30/Mar/2007:18:40:56 -0700] "POST /forum/yshout/yshout.php
HTTP/1.1" 404 5 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11"
222.***.***.*** - - [30/Mar/2007:18:40:57 -0700] "POST
/forum/yshout/yshout.php HTTP/1.1" 200 732

The script has been disabled by means of chmod 000 .

----------  1 allpi3 allpi3 32310 Mar 26 02:34
/home/allpi3/www/forum/yshout/yshout.php

Please ensure that all of your scripts are up to date and to there latest
version. Please make sure that any material you beleave to be harmfull in
nature is removed and any files that are not yours removed as well.
You can re-enable the scripts by setting the permissions on the file back to
644.

Please note that the acceptable usage range for shared plans is
1.0% average %CPU or less, 1.0% average %Memory or less and Top Processes
below 20%. Currently, your usage far exceeds this range at your current %.

Can somebody help me in fixing the codes of the shoutbox? I just used the default values included in the shoutbox installer.

Thanks in advance.
Title: Re: nneonneo's Shoutbox
Post by: Con on April 03, 2007, 12:37:21 PM
Quote from: nneonneo on April 02, 2007, 04:18:59 PM
Actually, you wouldn't throw a div around it;  just edit the div that's already there!
You edited this code, right?
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}

and changed the color, I'm assuming. It changes just fine on my forum when I edit that parameter...
It does work in firefox, but not in IE..
http://transformers.twisted-spoon.com/index.php
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 03, 2007, 05:42:13 PM
@greyknight: Since I have not been able to extensively test the TP modifications, perhaps you could post/PM a board link for me to look at.
@dance66: Change the refreshTime in yshout/js/yshout.php to something higher, to increase the time between successive refreshes.
@Con: You have an error in your CSS:
color: #6808080;
There's an extra character there. It is possible that IE stopped parsing after that error, though I am not entirely sure.
EDIT: Bloody hell, IE has a bug, or maybe it's just me. IE fails to render a different text color.
I do *not* know how to fix this problem, as I am not a CSS expert. Bloody stupid IE >.<
Title: Re: nneonneo's Shoutbox
Post by: ictus on April 05, 2007, 03:20:02 PM
found a bug...

When using Joomla Bridge (the SMF official one) you get: Shoutbox loaded in another window. Retrying...

Even though it is the only window open, I'm using Firefox and Safari on a Mac, don't think its a mac issue though.

Other than that it works great.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 05, 2007, 04:07:54 PM
IE is a very popular browser but looks can be deceiving >:(
Title: Re: nneonneo's Shoutbox
Post by: Col on April 05, 2007, 06:09:12 PM
Quote from: nneonneo on April 02, 2007, 09:30:33 PM
http://nneonneo.ath.cx/advforums/guinea_smf/ for a demo (live demo; guest posting)

Thanks for the link. :)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 05, 2007, 06:54:06 PM
Hey my website has it up and running. *newer* then it was about 20 pages ago lol. :)
Thanks to nneonneo via pm gave me some helpful codes to make my shoutbox display but not allow posts to guests. :)
I really like that feature. If you would like the code, thank nneonneo and here it is:
Quote from: nneonneoOPEN [yshout/yshout.php]
Change allowGuests to true.
Then, find
<form id="shout-form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="25" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="125" value="',$txt['yshout_p_banned'],'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_banned'],'" disabled="true" />
</fieldset>
</form>';

Add after this
elseif(!$user['is_logged']) echo 'Notice: must be logged in to post.';

Find case "shout":
Add after
if(!$user['is_logged']) break;
and you're done.

Quote from: BrianjwFor this:
Notice: must be logged in to post.
I made it like this:
<color="orange">You must be logged in to use the shoutbox!</color>
[Guest View]: http://www.brianjwilson.com
[Member View] NOT AVAILABLE, due to abusers.

Brianjw
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 05, 2007, 10:26:20 PM
Hi again

I got this error when I uploaded my forum on a different host:
Warning: fopen(chats/home.txt): failed to open stream: Permission denied in /home/curlzspo/public_html/streetz/yshout/yshout.php on line 1417
File error (writeLine); aborted


How do I fix this, thanks!!
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 05, 2007, 11:24:23 PM
@JSizzal: you forgot to chmod the file to 755 (or something like that).
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 06, 2007, 12:11:34 AM
How do I do that!!
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 06, 2007, 08:29:22 AM
Quote from: JSizzal on April 06, 2007, 12:11:34 AM
How do I do that!!
Download an FTP, if you do not have one. Google, "SmartFTP", It works well :)
When using that ftp software, right click on the file, click "Properties / CHMOD" then where it says "Permissions:" you put "755" ;) (without the quotation marks )

Brianjw
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 06, 2007, 10:17:04 AM
Alright i did change that, but im still having the same error!!
Title: Re: nneonneo's Shoutbox
Post by: Zwerko on April 06, 2007, 12:05:10 PM
Try in Admin panel-Packages->Options->Select "All files are writable." and hit Change File Permissions.
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 06, 2007, 02:08:45 PM
That did it. It works. Thanks you guys.!

Have we figured out how to incorporate the forum smilies into a "pop-up" button on  the shoutbox.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 06, 2007, 08:21:23 PM
Quote from: JSizzal on April 06, 2007, 02:08:45 PM
Have we figured out how to incorporate the forum smilies into a "pop-up" button on  the shoutbox.
How do you do this? Can I have a demo link and possibly the code for this? :)
Brianjw
Title: Re: nneonneo's Shoutbox
Post by: greyknight17 on April 07, 2007, 12:35:26 AM
Quote from: nneonneo on April 03, 2007, 05:42:13 PM
@greyknight: Since I have not been able to extensively test the TP modifications, perhaps you could post/PM a board link for me to look at.
OK, I created a test board here (http://www.greyknight17.com/TEST/). If you go to the forums link, you will see the ShoutBox in the middle Block (right below the main menus).

Also, is the ShoutBox (default one in user panel) suppose to have just two links or a set of 5?

History Commands ExtendedHistory HideAdminLinks ReturnToShoutbox

I installed this locally and only see History and Commands. But I just installed a test forum right now and see the extra 3 links there.

I tried the yshout edit that brianjw posted and it doesn't seem to work. Guests still can post and even delete the shouts???
Title: Re: nneonneo's Shoutbox
Post by: ictus on April 07, 2007, 02:39:23 AM
I'll try again

found a bug...

When using Joomla Bridge (the SMF official one) you get: Shoutbox loaded in another window. Retrying...

Even though it is the only window open, I'm using Firefox and Safari on a Mac, don't think its a mac issue though.

Other than that it works great.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 07, 2007, 11:34:09 AM
The code works. and i didn't make the code so ask nneonneo because he told me to do it that way. It works on my site though... :)
Quote from: off topic
I want to show whos online but without showing the users online just saying how many, like this: 12 Members, 478 Guests
How can you do this? :)
Thanks,
Brianjw
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 07, 2007, 12:49:46 PM
I dont know @ brianjw I was hoping someone else had figured it out!!

One thing how would I change the amount of words/letters in can type in a single shout!!
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 07, 2007, 03:07:49 PM
Quote from: off topic
I want to show whos online but without showing the users online just saying how many, like this: 12 Members, 478 Guests
How can you do this? :)
Thanks,
Title: Re: nneonneo's Shoutbox
Post by: ictus on April 08, 2007, 10:14:56 AM
OK, found the problem but I don't know how to fix it...


My url for SMF is rpgRM.com/rmsmf/ but if I access the board through Joomla using the bridge it is just rpgRM.com/

Ultimate Shoutbox seems to have no problem with this change, but nneonneo's does, as it keeps the fixed rpgRM.com/rmsmf/ path.

Is there a simple way to change this so it works either way like UShout does?

It may be the code that checks for other windows running the shoutbox but I don't know, any help would be appreciated.
Title: Re: nneonneo's Shoutbox
Post by: Elmacik on April 09, 2007, 10:41:52 AM
Well all right, I installed this mod, but it says "...loading shoutbox..." and its all.
Nothing loads.. :-\
Title: Re: nneonneo's Shoutbox
Post by: greyknight17 on April 09, 2007, 10:49:02 AM
Quote from: Elmacik on April 09, 2007, 10:41:52 AM
Well all right, I installed this mod, but it says "...loading shoutbox..." and its all.
Nothing loads.. :-\
I think I had a similar issue before. Try uninstalling the mod and reinstalling it via the Package Manager.
Title: Re: nneonneo's Shoutbox
Post by: janiceihg on April 09, 2007, 06:51:35 PM
I don't know if anyone can help me or not - I am really pretty computer illiterate and I think I downloaded the shoutbox fine, installed it in the packages are - but I am clueless on how to edit my index.php template thing. I thought I followed the instructions for that but it didn't show up anywhere. does someone think they might be able to help me? Maybe??
Title: Re: nneonneo's Shoutbox
Post by: Titanio2006 on April 10, 2007, 01:43:05 PM
same problem as ictus
Shoutbox loaded in another window. Retrying...
with joomla smf bridge
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 10, 2007, 10:10:07 PM
@greyknight: 5 links for admins, and two for non-admins.
@ictus: Hmm, I've never tried to joomla bridge, since nobody has ever raised any issues. I do suspect that it is a cookies problem.

I think that, since the cookies always use the path of the forum, that the code is unable to delete cookies set for a different domain/path.

Clearing any cookies called "yShout_open" should be a temporary workaround, until I figure out how I'm going to permanently fix the problem.

@janiceihg: I believe there are tutorials on how to edit files on a server. Unfortunately, I don't have the time to walk you through myself.

@Titanio: see comment for ictus

@Elmacik: try this: http://www.simplemachines.org/community/index.php?topic=137508.msg1039887#msg1039887

@JSizzal: in yshout/yshout.php, find all instances of maxlength="125" and change 125 to something else.
If you are looking to increase the size of the username input box, find "25" instead of "125".
Title: Re: nneonneo's Shoutbox
Post by: Comeback on April 11, 2007, 08:56:03 AM
Hi nneonneo,

thx for your mail, my server hasn't accept and support the tgz file, so I have it anew packed in zip data and it has functioned. Everything functions perfectly. Thank you!

Now I have an other question, about the Shoutbox. Can I record all conversation? Can I edit the script, sothat it save everything in a txt data? And how can I build a scroll in the shouthbox, so that it don't delete the first messages.
If I write now in the shouthbox, then the upper ones will direct automatically extinguished.
I want that it still continues. It should originate scroll performs. And every evening I want about a key function that the news is stored away. Since to access always on the server and to edit, uses a lot. Or about another idea with same result I would also be glad.

THX!!!

cheers Comeback*

PS: My english ist not the best but i hope you can understand me  :P
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 11, 2007, 11:56:39 AM
Actually, if you hit the History link at the top, you should find all the old messages. They are stored in yshout/chats/history.home.txt
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 11, 2007, 05:49:47 PM
Ok thanks, have found out a way to intergrate a smilies button into the shoutbox??
Title: Re: nneonneo's Shoutbox
Post by: Comeback on April 12, 2007, 06:57:56 AM
Quote from: nneonneo on April 11, 2007, 11:56:39 AM
Actually, if you hit the History link at the top, you should find all the old messages. They are stored in yshout/chats/history.home.txt

Ah ok i have found it, thx!

greetz*
Title: Re: nneonneo's Shoutbox
Post by: NFM on April 12, 2007, 10:59:45 AM
Other than minimizing the header area...is there a way to minimize the shoutbox itself?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 12, 2007, 02:03:49 PM
@JSizzal: No, it's not a priority for me at the moment (I feel it would clutter the interface unnecessarily). If you want it very badly, there's probably a nice way to copy the code from the post box.

@NFM: Unfortunately, that's a no. I haven't found an easy way to do that.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 12, 2007, 06:50:41 PM
@nneonneo: Is there a way there doesn't have to be a home.history.txt file and there isn't extended history. I mean: When you use the command /clear I want it to clear everything including the overflow (aka History) ;)
How could your shoutbox do this?

Brianjw
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 13, 2007, 02:11:38 PM
Where the command handler is for /clear, have it also do something like unlink("$logDir/history.$chatFile"); and that will clear it up.

So, find case "/clear":
for($a=0;$a<$max_lines;$a+=1) truncateChat($chatFile,$logDir,0); // truncate $max_lines times, each approaching 0. This assumes that there aren't any shouts past $max_lines.

and add
unlink("$logDir/history.$chatFile");
Title: Re: nneonneo's Shoutbox
Post by: jawatkin on April 14, 2007, 01:07:27 AM
nneonneo - I'm wondering about server resources required to run this.  I put in smf_shoutbox into my forum last night (SMF 1.1.2, smf_shout 1.2.1) and it tripped out on me and brought my shared hosting service to its knees.  (I had the auto-refresh on) Took about 2 hours to fully recover once I'd removed the code, etc.  What would this package do with say 70-100 concurrent users or more?

1and1 is still trying to find the "root cause" but I suspect it was the shoutbox, along with the forum, and a good deal of SQL queries on my main site all at once... Check out the server log... Weird.. Put it up about midnight, but it started to really just take over around noon...?
Title: Re: nneonneo's Shoutbox
Post by: jespereh on April 14, 2007, 01:44:49 PM
Is it possible to edit this shoutbox, so it is a Shoutbox in the right side of the Index-page. It has to look something like this:
(http://img408.imageshack.us/img408/208/shoutboxjb3.jpg)

If it is possible. A list of corrections would be appreciated.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 14, 2007, 02:57:04 PM
@jawatkin: This shoutbox doesn't use MySQL, but it does use files for data storage. With 70-100 concurrent users, all using the shoutbox, with a refresh rate of 1.5 seconds (the default), that works out to 2400 requests per member per hour, or 168K - 240K requests per hour.
One thing to keep in mind is that the shoutbox will produce a blank page on unchanged refreshes, which will decrease bandwidth usage (if nobody posts, you'd use at most 1-3MB of bandwidth per hour). Also, if you use a PHP accelerator, the CPU usage is quite acceptable (though it depends on your host!). Without a PHP accelerator, I would *not* recommend this shout box as the 46 requests/sec would begin to lag quite bad.

So, in summary, with a higher delay between refreshes (yshout/js/yshout.js) and a PHP accelerator, it should not be a major problem.

@jespereh: Depends strongly on the theme. Some themes would be easier to modify, others more difficult. I am not an expert on modifying themes, though.
Also note that this shout box was designed to be laid out horizontally, and so far it looks rather terrible in a vertical narrowed space -- major modifications would be required to make it fully compatible and good-looking in a vertical manner.
Title: Re: nneonneo's Shoutbox
Post by: jawatkin on April 14, 2007, 03:02:24 PM
Yeah, I don't have a PHP accelerator on my host, but I plan on switching to a VPS shortly that will... Then your shoutbox will go up! Thanx!
Title: Re: nneonneo's Shoutbox
Post by: jespereh on April 14, 2007, 03:48:37 PM
Quote from: nneonneo on April 14, 2007, 02:57:04 PM
@jespereh: Depends strongly on the theme. Some themes would be easier to modify, others more difficult. I am not an expert on modifying themes, though.
Also note that this shout box was designed to be laid out horizontally, and so far it looks rather terrible in a vertical narrowed space -- major modifications would be required to make it fully compatible and good-looking in a vertical manner.

Ok, sounds like alot of work :( I'll try a looking at different shoutboxes then.
Title: Re: nneonneo's Shoutbox
Post by: greyknight17 on April 14, 2007, 11:16:09 PM
nneonneo, I got the ShoutBox working on my forum now. Just have one quick question (maybe it was asked earlier already, but there's just too many pages for me to go over). Is there a way to make the shoutbox show up on all new pages opened in the forum? If I open up a topic in a new window, the shoutbox doesn't work on that new window, only the original window I have opened. I like to open up multiple topics in my Firefox tab and want all of them to have the shoutbox show up.

Thanks.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 15, 2007, 01:58:10 AM
@greyknight: See the code if(get_cookie("yShout_open"))
{
$("yshout").innerHTML="Shoutbox loaded in another window. Retrying...";
setTimeout("loadChat()",Math.random()*1000+1000/*between 1 and 2 seconds*/);
return;
}
set_cookie("yShout_open","true",3/*seconds*/);
in yshout/js/yshout.js? Remove it.
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 15, 2007, 04:52:28 PM
Haha I asked that same question anywayz

Im wonderning why your shoutbox comes out like this on the Cerberus theme:

I tried inserting a width code in the yshout part of the index.template

when i did that it made the shoutbox bigger but the fourm also increased width too..

Any chance you could help me!!

(http://i16.photobucket.com/albums/b15/blackthonboy/07494a37.png)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 15, 2007, 05:40:38 PM
Quote from: jespereh on April 14, 2007, 03:48:37 PM
Quote from: nneonneo on April 14, 2007, 02:57:04 PM
@jespereh: Depends strongly on the theme. Some themes would be easier to modify, others more difficult. I am not an expert on modifying themes, though.
Also note that this shout box was designed to be laid out horizontally, and so far it looks rather terrible in a vertical narrowed space -- major modifications would be required to make it fully compatible and good-looking in a vertical manner.

Ok, sounds like alot of work :( I'll try a looking at different shoutboxes then.
Actually its quite easy. The new way on integrating the shoutbox anywhere in any theme is simple. Just look on this topic somewhere or on the mod page for this. :)
http://www.brianjwilson.com has it integrated and it didn't take alot of work at all. :D
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 17, 2007, 09:01:02 PM
Can anyone help me with my problem!!
Title: Re: nneonneo's Shoutbox
Post by: crazyASD on April 18, 2007, 08:07:35 AM
Hello all!! How about full integration with SMF? (Auto inserting username for registered users) Any ideas?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 18, 2007, 10:07:10 AM
The username is already automatically inserted for registered users. Any further integration is not a priority for me.
Title: Re: nneonneo's Shoutbox
Post by: rEvOhSaLf on April 18, 2007, 05:41:19 PM
Hi everybody,

Sorry for my bad english
I just installed the shoutbox but a have some problems

=> (http://img409.imageshack.us/img409/7214/shoutbb6.jpg)

I add the line
loadTheme();
after
$user=ssi_welcome('nothing'); // ssi_welcome only does something IF the parameter is 'echo'; otherwise the user data is returned!
loadUserSettings();

but with no results...

I use Joomla 1.12 with SMF Bridge.
How can i pls solve my problem ?
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 18, 2007, 06:00:24 PM
nneonneo can u help me with my prob!!
Title: Re: nneonneo's Shoutbox
Post by: crazyASD on April 18, 2007, 06:57:22 PM
Hmm... my SMF 1.1.1 version and 1.06 not still isert username...
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 18, 2007, 07:04:07 PM
@JSizzal: looks like you put the code in Cerberus wrong.
@rEvOhSaLf: Weird. Send me a link to your forum and a username/password (or I can sign up myself) and I will take a look!
@crazyASD: That's very strange, and probably wrong. Send me a link to your forum and a username/password I can use (like a test account).
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 19, 2007, 01:35:12 AM
Ok... How do i fix it
Title: Re: nneonneo's Shoutbox
Post by: rEvOhSaLf on April 19, 2007, 06:06:09 AM
Quote from: nneonneo on April 18, 2007, 07:04:07 PM

@rEvOhSaLf: Weird. Send me a link to your forum and a username/password (or I can sign up myself) and I will take a look!


Hi,

User: nneonneo
Pass: nneonneo
http://bde.istase.com/forum

Very thanks ;)
Title: Re: nneonneo's Shoutbox
Post by: jtonyj on April 19, 2007, 12:37:16 PM
I Install it and then uninstalled it, but this screen stays, (I am not a programmer or a developer.)  Can someone please help me.   Thanks

Show unread posts since last visit.
Show new replies to your posts.
Total time logged in: 1 days, 11 hours and 32 minutes.

Shout Box

...loading shoutbox...












There are currently 0" users in chat
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 19, 2007, 02:49:41 PM
@jtonyj:
1) Are you using the default theme?
2) Did you edit the file at all?
3) Were there any errors during uninstall?

@JSizzal: PM me the index.template.php
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on April 19, 2007, 09:58:52 PM
Hey nevermind. I don't need to only allow the [IMG] tag to just admins anymore that trend kind of died down. I do need a favor though. Is it possible to display the shouts from newest to old instead of oldest to new?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 19, 2007, 10:06:39 PM
FEATURE POSSIBLE FOR NEXT VERSION
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The ability for members to be allowed to delete there own shouts. Or maybe something in yshout.php to choose which member groups to allow to delete there own shouts. Admin is included no matter what is on the array. ;)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 19, 2007, 10:29:40 PM
@Johnny: http://www.simplemachines.org/community/index.php?topic=137508.msg931355#msg931355
In yshout/yshout.php, find the readChat function and change
$chatText = file_get_contents($chatPath)
to
$chatText = implode('',array_reverse(file($chatPath)));
and the chats should be reversed.

@brianjw: Since I am presently using a "dumb" regular expression to add delete links, it will take some work. Thanks for the idea, though.
Title: Re: nneonneo's Shoutbox
Post by: crazyASD on April 20, 2007, 06:20:39 AM
Hi! I`m manually install shoutbox on my local machine - it`s work fine!
I`m manually install on my site - this not work! What a hell? On my site I`m see an empty area and nothing more!
Well i`m try to enable debug mode - errors not shown...
Please help!
Title: Re: nneonneo's Shoutbox
Post by: crazyASD on April 20, 2007, 06:41:27 AM
Localhost screenshot
2. Srever screenshot
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 20, 2007, 03:08:57 PM
Try going to http://domain.com/path/to/forum/yshout/yshout.php and see what shows up. If it shows a blank page, the language modifications aren't installed (you'll have to copy Themes/default/languages/Modifications.english.php to Themes/default/languages/Modifications.<language>.php). If any errors show up, post them. If it just says "Nothing to do" then check the error logs in the web server, though by all indications it should work.

If none of that helps, give me a link to the forum.
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 20, 2007, 05:16:07 PM
Wow MAN THANKS A LOT!!!

OMG

IM IN SHOCK
Title: Re: nneonneo's Shoutbox
Post by: crazyASD on April 20, 2007, 07:04:00 PM
Yes, my language is not been correctly installed - i`m do it and now see:
http://softmachine.ru/forum/index.php Shoutbox shows!
http://softmachine.ru/component/option,com_smf/Itemid,174/ (Wrapped SMF into joomla) Shoutbox gives ...loading shoutbox... and won`t shows!
In my localhost both works fine!
Please help me!!
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 20, 2007, 07:52:29 PM
This has been a known problem for this shoutbox [in JOOMLA]
You will have to do without or with another until if/when its fixed.
REMEMBER: Browse the topic before posting your bug, error, or problem. Or Use the SEARCH! :D
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 20, 2007, 09:50:56 PM
@crazyASD: I think this is because you do not have the shoutbox properly installed into the Joomla theme.
Since I have never used the Joomla bridge, would it be possible to PM or upload the template file for Joomla (I am not familiar with the Joomla mod, so I don't know which one that is!). There is a section which must be added to allow the shoutbox to load.

If you added the mod to the theme yourself, then post/PM/upload whichever file you edited. The JS+CSS section is missing from the header.

Hint: If you name a file .phps in the webserver, the PHP source will be shown, so it is not hard to upload it (copy the file to <name>.phps and PM me the link)
Title: Re: nneonneo's Shoutbox
Post by: Tick on April 20, 2007, 11:58:35 PM
This is probably been mentioned before in this thread but as time is of the essence I did not have time to look through all 39 pages for this.  My regular members are seeing everyones ip address in the shout box.  Is there a way to hide this or is this a bug?
Title: Re: nneonneo's Shoutbox
Post by: Tick on April 21, 2007, 07:59:00 PM
Anyone having this issue with members being able to see the ip's of other members?
Title: Re: nneonneo's Shoutbox
Post by: JohnnyMcKinney on April 21, 2007, 08:03:00 PM
Thanks nneonneo my shoutbox is now reversed TY!
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 21, 2007, 08:47:16 PM
@tick: With older versions of the shoutbox (1.04 and before, I think) the IPs were shown to all members. With the inclusion of guests, time-parsing and the delete/ban links, I have changed it so only admins can see the IPs (mouse over the time stamp to see it); all other members get "1177156894 | logged" instead (admin will see 1177156894 | 1.2.3.4). So, if your regular members can see it and you are using 1.06, then there is a problem.

@JohnnyMcKinney: was that a question?
Title: Re: nneonneo's Shoutbox
Post by: Tick on April 21, 2007, 08:53:08 PM
Ok I see nneonneo.  I am actually doing some clean up work on a friends forum and I see know he is running the older version of the shout box.  I will update asap
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on April 23, 2007, 04:06:34 PM
Thats for helping me last time, now im working with the Amber theme and the shoutbox is cramped up near the right side, any way to put it back up top again, thanks, ive sent my index.template also..

Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 26, 2007, 07:22:34 PM
I need help. The shoutbox is giving me this error and wont stop...
Fatal error: Call to undefined function: tp_loadtheme() in /home/content/b/j/w/bjwilson/html/forum/Sources/Load.php on line 1141

PLEASE HELP :)
Brianjw
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 27, 2007, 12:06:54 AM
That's not my fault. I do not modify the Load.php file, so it is probably another file. Looks like the TinyPortal theme loading function...maybe a TP specific mod?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on April 27, 2007, 07:00:11 PM
I have no idea. All I did was replace the register.template.php and now every part of my ssi and your shoutbox is messed up :(
Title: Re: nneonneo's Shoutbox
Post by: nagr on April 28, 2007, 04:16:15 AM
I've searched a bit before asking this, but couldnt find answers...so I have two quick question:

1 - Which uses more server resources, this mod or SMF Shoutbox

2 - May I use nneonneo's shoutbox outside my forum, in an html page?

Thanks in advance
Title: Re: nneonneo's Shoutbox
Post by: Ouly on April 28, 2007, 08:13:43 AM
I think that the line 183 in file yshout.php :

loadUserSettings();

should be removed because this function is already called in file SSI.php on line 138.

This will fix smiley's url problem.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 28, 2007, 02:37:59 PM
@Ouly: Actually, it's loadTheme() that properly sets the smileys up (e.g. using default set if the user has no set selected), not loadUserSettings(). However, it would be good to reduce the load on the server (just a bit) by removing that line -- I will look into that

@nagr: This mod uses more resources, but if the refresh rate is turned down then they are comparable in efficiency.
Also, it can be used outside the forum. If you want it to be linked to the forum, then just use the code

<script src="http://domain.com/path/to/forum/yshout/js/prototype.js" type="text/javascript"></script>
<script src="http://domain.com/path/to/forum/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="http://domain.com/path/to/forum/yshout/js/behaviour.js" type="text/javascript"></script>
<script src="http://domain.com/path/to/forum/yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var board_url = "http://domain.com/path/to/forum";

</script>
<script src="http://domain.com/path/to/forum/yshout/js/yshout.js?Mar42007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#yshout .adminlink {
font-size: 6pt;
color: #141414;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>

in the <head> section of your page, where http://domain.com/path/to/forum is the path to your forum (relative links *may* work, but untested outside of the forum path).
Next, at the spot where you want the SB,
<b>Shout Box</b><br /><div id="yshout">Shoutbox Loading...</div>

If you do *not* want or need it to be linked to the forum, see http://yurivish.com/yshout/ to get yShout v4 which is probably nicer looking on a standalone page ;)
Title: Re: nneonneo's Shoutbox
Post by: katb on April 29, 2007, 09:01:10 AM
 :( :( How can i admiser my SB..not sowing any links under Admin panel
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 29, 2007, 12:24:53 PM
The shoutbox does not have any links under the Admin panel; rather, all the administrative functions are in the shout box itself as the links at the top and the "del" and "ban" links (as well as slash commands like /banuser).

If you cannot see these commands, then you need to copy a language pack: copy Themes/default/languages/Modifications.english.php to Themes/default/languages/Modifications.<your_forum_language>.php.
Title: Re: nneonneo's Shoutbox
Post by: Ouly on April 29, 2007, 02:44:02 PM
Quote from: nneonneo on April 28, 2007, 02:37:59 PM
@Ouly: Actually, it's loadTheme() that properly sets the smileys up (e.g. using default set if the user has no set selected), not loadUserSettings(). However, it would be good to reduce the load on the server (just a bit) by removing that line -- I will look into that
Yes, right but loadTheme() is already called in SSI.php too  ;) (just after loadUserSettings() )
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 29, 2007, 08:35:39 PM
Hmm, very strange...I checked that and it is there, as you said. Strangely, then, the loadTheme() fix should do nothing, but it *does* somehow fix smilies issues. That is quite puzzling.
Title: Re: nneonneo's Shoutbox
Post by: Ouly on April 30, 2007, 02:20:38 PM
The problem is that the function parsesmileys() (in file Subs.php) use $user_info['smiley_set'] which is erased with the second call of loadUserSettings() in yshout.php.

loadUserSettings() only set $user_info['smiley_set'] with some eventual user settings without checking if it has been already set (from line 481) :

$user_info += array(
...
'smiley_set' => isset($user_settings['smileySet']) ? $user_settings['smileySet'] : '',
...
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on April 30, 2007, 03:27:24 PM
OK, thank you for clarifying that. I will remove the duplicated calls in yshout.php.
Title: Re: nneonneo's Shoutbox
Post by: graziano on May 02, 2007, 06:15:36 AM
hello

I installed latest smf 1.1.2
Then I downloaded the package

When I try to install it I receive this


Type Action Description
1. Execute Modification install.xml&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Modification parse error  
2. Execute Modification - Modification parse error  
3. Extract Tree ./yshout&nbsp;


I am using SB_1.06 .

How to solve the problem please ?
Title: Re: nneonneo's Shoutbox
Post by: graziano on May 02, 2007, 06:20:07 AM
the problem was "safe_mode_on" on my server
Title: Re: nneonneo's Shoutbox
Post by: brianjw on May 03, 2007, 07:15:33 PM
@nneonneo: I have a question for you...

- I installed a new website but this doesn't include tinyportal, it is a normal php website (not smf) with smf inside of an iframe. How can I put all the settings and stuff inside of the smf forum folder and let it run through there but make it appear on the normal php website (not smf)?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on May 04, 2007, 12:11:53 AM
http://www.simplemachines.org/community/index.php?topic=137508.msg1072825#msg1072825
(hope that answers your question!)
Title: Re: nneonneo's Shoutbox
Post by: Con on May 08, 2007, 01:29:37 PM
I get an error while trying to uninstall this.

./Themes/default/languages/Modifications.english.php Test failed

how can i uninstall the script?
(I LOVE this shoutbox, but I was told its very bad without a php accelerator  :'()
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on May 08, 2007, 07:26:21 PM
Well, it cannot be used reliably *at high refresh rates* (i.e. low refreshTime value). If you set refreshTime higher, then it should be fine.
Hosts differ in their abilities, I recommend you try it out for a while, and tune the refreshTime value accordingly (in yshout/js/yshout.js).

If you still don't want to use it, uninstall it (ignoring that error), and then find that file (Themes/default/languages/Modifications.english.php), find
// ---- Begin modification - nneonneo's Shoutbox ----
and delete everything up to the line
// ---- End modification - nneonneo's Shoutbox ----.
Title: Re: nneonneo's Shoutbox
Post by: infonlinebr on May 09, 2007, 07:11:24 PM
in the navigation of mine yshout has some problem, when enters in description it opens a new window with link of "yshout/yshout.php? file=home.txt&history" instead of opening in the proper page.
thx.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on May 09, 2007, 07:33:11 PM
@infonlinebr: I don't quite understand what you mean, could you elaborate?
Title: Re: nneonneo's Shoutbox
Post by: brelwit on May 10, 2007, 07:56:13 AM
How do you let only the username of the currently logged-in user appear in the name field?
Title: Re: nneonneo's Shoutbox
Post by: infonlinebr on May 10, 2007, 03:38:33 PM
@nneonneo: acess www.annbr.com/bforum/ click in "Historico" this page open in new page, it would not have to open under?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on May 10, 2007, 08:25:58 PM
@infonlinebr: That behaviour (opening a new window for history) is by design: history can get very large and is not suited for viewing in a small window.
@brelwit: the shoutbox should do that for any logged in user. If it doesn't, then there is a bug (oh no!)
Title: Re: nneonneo's Shoutbox
Post by: infonlinebr on May 11, 2007, 09:27:26 AM
@nneonneo: more it would have as to open in the small window? I adjusted a "overflow: hidden" to limit a certain height.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on May 11, 2007, 07:16:24 PM
Yes, much more; history on my server is several thousand lines, only 200 of which are displayed in the history.
Title: Re: nneonneo's Shoutbox
Post by: infonlinebr on May 12, 2007, 06:29:41 PM
Then as I can make to open under and not in a new window?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on May 12, 2007, 09:07:15 PM
Modify the goTo function in yshout/js/yshout.js to your liking.
Title: Re: nneonneo's Shoutbox
Post by: infonlinebr on May 13, 2007, 05:36:56 PM
this is problem

dumb
function goTo(args) {
   document.location=yshout_php+'?'+args;
}

to ??
Title: Re: nneonneo's Shoutbox
Post by: hostman on May 21, 2007, 02:27:43 AM
Hi Guy I have problem in this picture

(http://img155.imageshack.us/img155/7205/capture05212007131413yg1.png)


Shoutbox display tex loading..... but it not work ..

I use Orange LT-07 theme in attachmaent are my index.template.php  plzzz help me ...
Title: Re: nneonneo's Shoutbox
Post by: DoA on May 21, 2007, 07:38:39 AM
help! This mod is great, but it dissapears as soon as I log in with an admin account - meaning I can't shout or admin in my own shoutbox!

It works perfectly fine for guests and standard users. what am I doing wrong?

I'm using 1.1.2 and helios-multi template
Title: Re: nneonneo's Shoutbox
Post by: mitch2k on May 21, 2007, 05:30:07 PM
I just received an email from my ISP that this yshout.php is causing PHP abuse... Anyone an idea what is wrong?
Title: Re: nneonneo's Shoutbox
Post by: PipeRain on May 24, 2007, 02:59:20 PM
Got it up and running on one of the forums I administer and it works great.  I added brianjw's "Guest Mod" listed on page 26, and it works well also.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on May 24, 2007, 07:04:30 PM
Quote from: PipeRain on May 24, 2007, 02:59:20 PM
Got it up and running on one of the forums I administer and it works great.  I added brianjw's "Guest Mod" listed on page 26, and it works well also.
It's not really mine, I just pm'd nneonneo for a little personal customization help and I asked how to do that. It's nneonneos just an open source posted by me ;)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on May 26, 2007, 08:06:55 PM
@infonlinebr: I don't really understand what you want...you can simply change it to do the desired action.
@hostman: This problem can be caused by a variety of reasons; check your server error log for some details, and if there's nothing pertaining to yshout there, post your forum URL.
@DoA: very strange. I have not encountered this issue before, it may be due to some theme quirk (also ensure that you are using a theme with the SB installed)
@mitch2k: turn up the refresh delay (in yshout/js/yshout.js change the refreshTime parameter to something higher; it's measured in milliseconds) -- it will produce fewer requests that way.
@PipeRain: glad to hear it!
Title: Re: nneonneo's Shoutbox
Post by: brianjw on May 26, 2007, 09:30:20 PM
/me wonders where nneonneo has been all this time.
nneonneo, you have done a great job with this shoutbox. It is fully customizable and with all its features it makes a great shoutbox. :)
Title: Re: nneonneo's Shoutbox
Post by: kissme on May 29, 2007, 07:48:47 AM
Hello i have smf 1.1.2 and i put the new version of shoutbox but i get blank space and i dont see the shoutbox... anyproblem?
Title: Re: nneonneo's Shoutbox
Post by: JSizzal on May 29, 2007, 11:05:38 AM
hi nneonneo member me, thanks for helping me out with my other themes.. I have two more if you can help me, idk why the shoutbox wont fit right

the themes are

smf aqua
corp

ive sent the two index.templates along with the site.!! Thanks
Title: Re: nneonneo's Shoutbox
Post by: hostman on May 29, 2007, 12:02:36 PM
Hi nneonneo I try check my server error log but there's nothing problem.

This is my url  http://hydrobrain.geo-mobile.com

User : testtest

Pass : 00000


Sorry I'm bad in English. T_T

Thanks

Title: Re: nneonneo's Shoutbox
Post by: brianjw on May 29, 2007, 06:33:48 PM
Quote from: hostman on May 29, 2007, 12:02:36 PM
Hi nneonneo I try check my server error log but there's nothing problem.

This is my url  http://hydrobrain.geo-mobile.com

User : testtest

Pass : 00000


Sorry I'm bad in English. T_T

Thanks


I can probably help you out with this. Since I asked nneonneo a little while back I kind of learned how to fix this.

Can you attach the following files:
- index.template.php (the theme you want the shoutbox to appear on)
- Modifications.english.php (default theme language folder)

From there I can attach a new version of each file and we'll see if that works ;)
Title: Re: nneonneo's Shoutbox
Post by: PipeRain on May 29, 2007, 08:50:47 PM
Quote from: brianjw on May 24, 2007, 07:04:30 PM
Quote from: PipeRain on May 24, 2007, 02:59:20 PM
Got it up and running on one of the forums I administer and it works great.  I added brianjw's "Guest Mod" listed on page 26, and it works well also.
It's not really mine, I just pm'd nneonneo for a little personal customization help and I asked how to do that. It's nneonneos just an open source posted by me ;)

Well, in any case, it did the trick, and I appreciate your posting what worked for you.  Too often folks only hear the gripes, so I figure a "+1" now and again can't hurt!  ;)

Quote from: nneonneo on May 26, 2007, 08:06:55 PM
@PipeRain: glad to hear it!

Thanks again for a great mod! :D
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on May 29, 2007, 09:31:23 PM
@hostman: you don't have the shoutbox installed...I can't find any of the usual files pertaining to it (e.g. http://hydrobrain.geo-mobile.com/smf/yshout/ does not exist, and none of the files are there). Did you simply copy the code into index.template.php, without installing the package through package manager first?
@kissme: are you using a different theme from default? Please check the web server error log, and failing that, give me a URL to the forum.
@JSizzal: I'm looking into it, thanks.
Title: Re: nneonneo's Shoutbox
Post by: hostman on May 29, 2007, 09:33:40 PM
Quote from: brianjw on May 29, 2007, 06:33:48 PM
Quote from: hostman on May 29, 2007, 12:02:36 PM
Hi nneonneo I try check my server error log but there's nothing problem.

This is my url  http://hydrobrain.geo-mobile.com

User : testtest

Pass : 00000


Sorry I'm bad in English. T_T

Thanks


I can probably help you out with this. Since I asked nneonneo a little while back I kind of learned how to fix this.

Can you attach the following files:
- index.template.php (the theme you want the shoutbox to appear on)
- Modifications.english.php (default theme language folder)

From there I can attach a new version of each file and we'll see if that works ;)


Thank Guy for help me This is my
- index.template.php
- Modifications.english.php
Title: Re: nneonneo's Shoutbox
Post by: hostman on May 29, 2007, 10:06:28 PM
Hi nneonneo  :D for easiness in the problem editing ,  I try uninstall Mod and reinstall it again I found in this pic  .yshout have a problem? when I check file .yshout in my ftp not found.  :'( This problem?



Title: Re: nneonneo's Shoutbox
Post by: nneonneo on May 29, 2007, 10:25:02 PM
the folder is called "yshout".
Title: Re: nneonneo's Shoutbox
Post by: brianjw on May 29, 2007, 10:36:26 PM
@hostman: It looks like nneonneo got you taken care of so I think I'll let him step in. He knows it all, hes the creator. BOW DOWN TO HIM lol :P
Title: Re: nneonneo's Shoutbox
Post by: mwmconsulting on May 30, 2007, 09:53:53 PM
Hey nneonneo.  Great mod!  Thx for making it available to us.

However, I'm having a new issue with it.  I just purchased FlashChat and installed it on my server.  I was using this FlashChat Integration mod to integrate it into my SMF forum:

http://custom.simplemachines.org/mods/index.php?mod=611

However, as soon as I installed the FlashChat Integration mod, my shout box stopped working.  It just sits there with the "...loading shoutbox..." message.

Any ideas why this might have happened?

I'm using version 1.05 of your shout box mod.

Cheers!

- MWM
Title: Re: nneonneo's Shoutbox
Post by: brianjw on May 30, 2007, 10:25:39 PM
@mwmconsulting:
1. You should upgrade your shoutbox to 1.06 because there have been bugfixes since the last version.

Modules can effect other modules. I suggest you open up your Modifications.english.php (whatever language) and see if the nneonneo code is there. Than use the new method of the shoutbox appearing. Does your website have the code in the index.template.php.

Also post your SMF forum link here. I searched your website in your sig and didn't see any connection to a forum there.

:)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on May 30, 2007, 11:08:34 PM
@mwmconsulting: Basically what brian said [thankyou ;)] -- though I might add that a forum link and a valid testing account (or open registration) would help greatly.

Unfortunately, I've seen at least 5 different reasons for loading failure, complicated by the fact that almost nobody (relatively speaking) has any sort of Javascript debugging support, so it's basically up to me to go to the website and diagnose it (but don't worry, it is usually pretty easy and fast for me ;) )

If you post a forum link, I'll do my best to get it sorted out.
Title: Re: nneonneo's Shoutbox
Post by: mwmconsulting on May 31, 2007, 12:05:41 AM
Ok.  Thx for the prompt replies.  The dev forum is http://dev.ultitalk.com.

Currently, I have nneonneo's Shout Box v1.06 installed (I just did this tonight), as well as, the FlashChat Integration I mentioned earlier.  Seems there is still a conflict even w/ v1.06 and the FlashChat Integration mod.

Feel free to create a test account on the system.

You'll see when you visit the forum that the Shout Box never loads.

Cheers!

- MWM
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on May 31, 2007, 04:05:10 PM
When I go to the page http://www.ultitalk.com/smf_dev/yshout/yshout.php I get a 500 "Internal Server Error", indicating that the script is failing somehow to run. This may have to do with FlashChat.

EDIT: I looked at the code for FlashChat integration, and it does modify the SSI.php file. Since yshout calls that script (but does not modify it) it is possible that the modification to SSI is not compatible or somehow breaks SSI functionality (I use SSI to access SMF, since it is slightly simpler for me to do). Please check the web server error log for some things regarding SSI or yshout.
Title: Re: nneonneo's Shoutbox
Post by: Daggers on May 31, 2007, 06:10:20 PM
I run both the Shoutbox and the Flashchat integration on one of my sites without any problems  :o
Title: Re: nneonneo's Shoutbox
Post by: mwmconsulting on May 31, 2007, 06:40:00 PM
QuoteI run both the Shoutbox and the Flashchat integration on one of my sites without any problems

What is your site Daggers?  What versions of each mod are you using?  Did you do anything special to make them user friendly?  What order did you install the mods?

Cheers.

- MWM
Title: Re: nneonneo's Shoutbox
Post by: mwmconsulting on June 01, 2007, 12:13:44 PM
Hmmmmmm....  Seems I've found the problem, but not sure why it's an issue.

The FlashChat mod adds some code to the Sources/Subs.php file.  The line of code (on line 3175 for me) that is causing yshout to fail is this:


$result = db_query("
SELECT
fc.userid, fc.state, fc.color, fc.lang, fc.roomid,
fr.name AS roomName, fr.ispublic,
mem.realName, mem.memberName, mem.showOnline, mg.onlineColor,
mg.ID_GROUP, mg.groupName
FROM {$GLOBALS['fc_config']['db']['pref']}connections AS fc
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = fc.userid)
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))
LEFT JOIN {$GLOBALS['fc_config']['db']['pref']}rooms AS fr ON (fc.roomid = fr.id)
WHERE fc.userid IS NOT NULL
AND mem.ID_MEMBER != 0
ORDER BY mem.realName ASC", __FILE__, __LINE__);


This bit of code is obviously attempting to query the database, using the db_query function already defined in the Subs.php file.  As soon as the db_query function attempts to return the db resource (line 329) ........ BZZZZZ .......  500 error.

Not sure why yshout has a problem with some other code querying the DB.   ???

Any ideas?

- MWM
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 01, 2007, 12:44:23 PM
I just visited your website mwmconsulting, and the shoutbox is working great. I even tested it ;)
Title: Re: nneonneo's Shoutbox
Post by: mwmconsulting on June 01, 2007, 01:32:25 PM
Yep...but I had to comment out the code I mentioned in my previous post.  That code is responsible for showing who is currently in the chatroom, as well as, the number of people in the chatroom (displayed next to the CHAT button in the navigation bar).

The chat works fine, but hopefully nneonneo will be able to figure out why the yshout mod fails when querying the DB.

- MWM
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 01, 2007, 08:14:49 PM
Have you checked the web server error log? SSI.php errors will not appear in the forum error log -- it's because SSI doesn't set up the SMF error logger.

Tell me what you find; the answer is in that log (I'm sure of it :) )
Title: Re: nneonneo's Shoutbox
Post by: Daggers on June 02, 2007, 04:26:40 AM
Quote from: mwmconsulting on May 31, 2007, 06:40:00 PM
QuoteI run both the Shoutbox and the Flashchat integration on one of my sites without any problems

What is your site Daggers?  What versions of each mod are you using?  Did you do anything special to make them user friendly?  What order did you install the mods?

Cheers.

- MWM

Unfortunately I cannot give out the web address as I am the webmaster not the owner and it is a strictly members only site so guests cannot use the shoutbox or flashchat.

Flashchat v0.1beta
Shoutbox v1.05 (it aint broke so dont fix it!!)

I installed the shoutbox first and then the flashchat running within the Dilber mc theme on SMF 1.1.2

All works great
Title: Re: nneonneo's Shoutbox
Post by: mwmconsulting on June 02, 2007, 04:48:39 AM
QuoteHave you checked the web server error log? SSI.php errors will not appear in the forum error log -- it's because SSI doesn't set up the SMF error logger.

Here is the error in the web server error log:

Quote[Sat Jun 2 02:45:27 2007] [error] [client 203.214.74.94] Premature end of script headers: /home/ultitalk/public_html/yshout/yshout.php

But, as I said earlier, the error is w/ yshout having difficulties with code that queries the database.  That is the conflict.

:( ???
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 02, 2007, 11:12:06 AM
Yes, I realize that, but there are many other queries running from SSI.php. What's bizarre is why just this one fails...

By the way, it looks as if you haven't provided enough of the log. The final error there is a message which amounts to "the script didn't finish processing the HTTP headers" (in this case, the script failed to finish executing). Are there errors before that?
Title: Re: nneonneo's Shoutbox
Post by: mwmconsulting on June 02, 2007, 12:39:44 PM
No other errors in the apache error log.

BUT, there is an error in the SUEXEC Error_Log that occurs at the very same time as the apache "premature end of headers" error:

QuoteSUEXEC error_log: [2007-06-02 10:35:09]: info: (target/actual) uid: (ultitalk/ultitalk) gid: (ultitalk/ultitalk) cmd: yshout.php

I googled this error and found this page that seems relevant:

http://www.serverwatch.com/tutorials/article.php/10825_1126991_7

Altho I'm still at a loss.

But no other errors to report aside from that.

???
Title: Re: nneonneo's Shoutbox
Post by: ekfaysal on June 02, 2007, 02:05:28 PM
i cant see it working
i installed but it only says loading on my forum
nothing happened
what is this
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 02, 2007, 02:52:37 PM
@mwmconsulting: Possibly a problem with the chmod permissions on yshout.php...try chmod 755 or chmod 700 on yshout.php (or use the Repair Permissions (across all files) in Package Manager)
@ekfaysal: many possible causes; easiest way to diagnose is to give me a board URL.
Title: Re: nneonneo's Shoutbox
Post by: mwmconsulting on June 02, 2007, 03:28:09 PM
Quote@mwmconsulting: Possibly a problem with the chmod permissions on yshout.php...try chmod 755 or chmod 700 on yshout.php (or use the Repair Permissions (across all files) in Package Manager)

Yep, tried that one nneonneo.  Didn't work.  But the file permissions on a PHP file shouldn't matter.  As long as readable by webserver acct.

I don't suppose you have your own dev / test forum that you could install these two mods on?  That way, you would see first hand the errors and such being generated...

Definitely traced it down to the Db_Query call, but not sure why yshout doesn't like it...

- MWM
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 02, 2007, 06:51:58 PM
I do in fact have a test forum (http://nneonneo.ath.cx/advforums/guinea_smf) but I don't have FlashChat, so I can't properly test (what's the point if the DB and files don't exist?)
Title: Re: nneonneo's Shoutbox
Post by: mwmconsulting on June 02, 2007, 07:55:26 PM
I don't think you need FlashChat to see the problem nneonneo...

Simply edit your Subs.php file, and on line 3195 add the following code:

$result = db_query("SELECT * FROM smf_attachments", __FILE__, __LINE__);

Or you can select from another table if you'd like.  The point is that yshout will eventually call that query upon loading and will fail as it is doing for me.

You'll then see the errors for yourself.

;)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 02, 2007, 11:03:33 PM
There is in fact a bug! (and kudos to you for discovering it).

SMF has a bug. If any DB errors occur in the function setupThemeContext() (or template_header() which calls setupThemeContext()), an infinite recursion will result!
Call stack (as shown by debug_backtrace()):

obExit()
fatal_error()
db_error()
db_query()
setupThemeContext()
template_header()
obExit()
fatal_error()
db_error()
db_query()
setupThemeContext()
template_header()
[...loops several *thousand* times more...]
db_query()
setupThemeContext()
[SSI.php main context]
[yshout.php main context]

Basically, the six functions noted actually loop recursively and cause massive failure.
On my server, this is represented in the error log with the line
[notice] child pid 4180 exit signal Illegal instruction (4)
which, in PHP's case, usually means a stack overflow (usually infinite recursion)
In the case of the code snippet you posted, the reason for db_error to be called in the first place was an innocent "no database selected" error...
... and that would be the same reason for FlashChat.

Why? Why would it fail so miserably? It is because no database is actually selected by SSI.php!
This is because it instead prepends the database name onto the prefix (if the prefix contains no periods)! FlashChat's code *assumes* that the database is already selected (via mysql_select_db).

Fix? Easy -- on line 76 of SSI.php change
if(strpos($db_prefix, '.') === false)
to
if(false && strpos($db_prefix, '.') === false)
and all will be solved.
Title: Re: nneonneo's Shoutbox
Post by: mwmconsulting on June 03, 2007, 03:05:19 AM
Hey Hey HEY!

That indeed fixed the problem nneonneo!  Excellent debugging on your part.

Well, hopefully others will receive benefit from your sleuthing work as well.  ;)

Bravo!  Bravo!!!  8)

Onwards and upwards I say...

- MWM
Title: Re: nneonneo's Shoutbox
Post by: bobbbb on June 06, 2007, 08:23:53 AM
Wow! I just discovered this problem yesterday and there is already a solution posted by nneonneo! Awesome!
Title: Re: nneonneo's Shoutbox
Post by: calicojackal on June 08, 2007, 10:34:28 AM
Ok I tried to figure out how to fix this on my own and can not figure it out. My shoutbox loads but has nothing there. I will post a link to the site. I hope someone can help me fix this. I had to manually install the SB because our dedicated server has problems with allowing ftp access for some reason. I will also post the server error log incase that is what is needed to fix the problem.

The website link is http://mydamnfurrysite.com

the error log is as follow:

[Fri Jun 08 07:27:52 2007] [error] [client 75.183.42.144] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/var/www/vhosts/mydamnfurrysite.com/httpdocs/yshout/../SSI.php' (include_path='.:') in /var/www/vhosts/mydamnfurrysite.com/httpdocs/yshout/yshout.php on line 36, referer: http://mydamnfurrysite.com/index.php?topic=9.msg2627;boardseen
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 08, 2007, 10:43:12 AM
Ok, I am really tired. I think I've seen the same problem like 1500 times. Try using the search here and search IN THIS TOPIC for your answer by using the search on this page :)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 08, 2007, 07:23:24 PM
Odd, calico, are there any other errors? This error sounds like the SSI.php file isn't loading for some reason.

What other mods are installed?
Title: Re: nneonneo's Shoutbox
Post by: calicojackal on June 08, 2007, 08:52:01 PM
the only other mod that is installed is a cash shop mod.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 08, 2007, 10:14:56 PM
OK, which one? There are many cash shop mods.
Also, does anything relating to SSI.php show up in either a) the webserver error log or b) the forum error log?
Title: Re: nneonneo's Shoutbox
Post by: calicojackal on June 09, 2007, 12:32:35 AM
Ok well I get these three error lines over and over again since I manually installed the SB.
[Fri Jun 08 21:11:56 2007] [error] [client 123.100.34.103] PHP Warning: require() [<a href='function.require'>function.require</a>]: SAFE MODE Restriction in effect. The script whose uid is 1008 is not allowed to access /var/www/vhosts/mydamnfurrysite.com/httpdocs/yshout/../SSI.php owned by uid 10001 in /var/www/vhosts/mydamnfurrysite.com/httpdocs/yshout/yshout.php on line 36, referer: http://mydamnfurrysite.com/index.php
[Fri Jun 08 21:11:56 2007] [error] [client 123.100.34.103] PHP Warning: require(/var/www/vhosts/mydamnfurrysite.com/httpdocs/yshout/../SSI.php) [<a href='function.require'>function.require</a>]: failed to open stream: Success in /var/www/vhosts/mydamnfurrysite.com/httpdocs/yshout/yshout.php on line 36, referer: http://mydamnfurrysite.com/index.php
[Fri Jun 08 21:11:56 2007] [error] [client 123.100.34.103] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/var/www/vhosts/mydamnfurrysite.com/httpdocs/yshout/../SSI.php' (include_path='.:') in /var/www/vhosts/mydamnfurrysite.com/httpdocs/yshout/yshout.php on line 36, referer: http://mydamnfurrysite.com/index.php


Also the cash shop mod I manually installed is SMFShop_3-0_Fresh_Install.
Title: Re: nneonneo's Shoutbox
Post by: calicojackal on June 09, 2007, 12:33:49 AM
Oh I also use the X7 forum chat system.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 09, 2007, 02:10:17 AM
How did you install the SB without FTP access?

You must uninstall it and install the script using Package Manager, or however you installed the rest of the forum.

The indicated error arises from a "file ownership" conflict -- the shoutbox and the SMF files are owned by different users (one's the webserver, the other probably the FTP/remote user). PHP has safe mode enabled, which prevents the scripts from communicating, which in turn means yshout cannot function.

Please install the script with Package Manager if at all possible, or however you managed to install the shop mod and the forum.
Title: Re: nneonneo's Shoutbox
Post by: calicojackal on June 09, 2007, 10:35:46 AM
Thanks for the advice. I manually installed the shop mod because package manager can not access the ftp for some reason and our dedicated server support will not help because they say its a problem on the smf side. I disabled php safe mode and it seems to work now. Thanks for all the help.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 09, 2007, 06:16:21 PM
No problem; glad it works.
Title: Re: nneonneo's Shoutbox
Post by: carlito on June 11, 2007, 05:35:07 AM
--solved. Cleared cache, closed, opened and voile.

I have installed in www.skifun.gr/forum and with ie works like a charm, with firefox worked for few messages, now nothing appears. Anybody has a good idea ?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 11, 2007, 08:35:20 AM
@nneonneo: Eventually you're gonna want to move all support to your website as you need an entire board for this big of a mod ;)
Title: Re: nneonneo's Shoutbox
Post by: bobbbb on June 11, 2007, 03:34:50 PM
Quote from: nneonneo on June 02, 2007, 11:03:33 PM
There is in fact a bug! (and kudos to you for discovering it).

SMF has a bug. If any DB errors occur in the function setupThemeContext() (or template_header() which calls setupThemeContext()), an infinite recursion will result!
Call stack (as shown by debug_backtrace()):

obExit()
fatal_error()
db_error()
db_query()
setupThemeContext()
template_header()
obExit()
fatal_error()
db_error()
db_query()
setupThemeContext()
template_header()
[...loops several *thousand* times more...]
db_query()
setupThemeContext()
[SSI.php main context]
[yshout.php main context]

Basically, the six functions noted actually loop recursively and cause massive failure.
On my server, this is represented in the error log with the line
[notice] child pid 4180 exit signal Illegal instruction (4)
which, in PHP's case, usually means a stack overflow (usually infinite recursion)
In the case of the code snippet you posted, the reason for db_error to be called in the first place was an innocent "no database selected" error...
... and that would be the same reason for FlashChat.

Why? Why would it fail so miserably? It is because no database is actually selected by SSI.php!
This is because it instead prepends the database name onto the prefix (if the prefix contains no periods)! FlashChat's code *assumes* that the database is already selected (via mysql_select_db).

Fix? Easy -- on line 76 of SSI.php change
if(strpos($db_prefix, '.') === false)
to
if(false && strpos($db_prefix, '.') === false)
and all will be solved.

Hello nneonneo, I tried this fix but it didn't work. I still get these errors in my error logs:

SUEXEC error_log:
[2007-06-11 13:31:57]: info: (target/actual) uid: (X/X) gid: (X/X) cmd: yshout.php

X = server user name

My website runs fast though... I don't think this error really affects anything. Does it? Any suggestions as to why your fix didn't work in my case?

Thank you again so much for your help!
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 11, 2007, 04:34:45 PM
It looks to me like its something with the permissions.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 11, 2007, 08:51:44 PM
@carlito: so it is solved? Excellent! You may also want to copy or localize the Modifications.english.php file (probably to Modifications.greek.php) to ensure that all the text shows up.
@bobbbb: You have a problem with suexec -- how did you install the mod? Was this the same way you installed SMF? Finally, are there any other errors?
Title: Re: nneonneo's Shoutbox
Post by: raymond8505 on June 13, 2007, 04:30:39 PM
It would seem that the shoutbox crashed my server today, I can only assume that it was lots of people logged on at the same time overloaded the server with calls to yshout.php any recommendations?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 13, 2007, 05:37:40 PM
If you mean it crashed your server like you can't access it and can't get to admin panel.. I would manually uninstall it by extracting the file you download and open the xml file via php editor (dreamweaver, frontpage, etc). And that will tell you files and code that was added now open those files and manually remove it, also delete the file from the Packages folder ;)
Then you can request support with it here. ;)

Hope this helps.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 14, 2007, 12:02:02 AM
@raymond8505: what is the size of your forum? If it is quite large (30+ active members on at some time in the day), then you will want to turn down the refresh rate. It's in yshout/js/yshout.js, near the top, in milliseconds.

Other things to try: get a PHP accelerator (if you can install one), and, if raising the refresh delay beyond 15 seconds (15000 ms) doesn't help, then it probably isn't my script.

Also make sure that in index.template.php that you change the ?Mar42007, to force cache updates in browsers (otherwise they may continue to refresh at the old rate)
Title: Re: nneonneo's Shoutbox
Post by: carlito on June 19, 2007, 08:13:27 AM
Quote from: nneonneo on June 11, 2007, 08:51:44 PM
@carlito: so it is solved? Excellent! You may also want to copy or localize the Modifications.english.php file (probably to Modifications.greek.php) to ensure that all the text shows up.

Done !

A little help please to the following matter. OK, everything is working nice but this little error script in internet explorer damage the good impressions. Everything is working fine both in firefox and IE, but in IE there is a script error. Trying to debug it with excellent web developer firefox extension  and here is the report:

error1 "Error: $("forum-name") has no properties
Source File: http://www.skifun.gr/forum/yshout/js/yshout.js?Mar42007
Line: 151"

error2 Error: $A is not defined
Source File: http://www.skifun.gr/forum/yshout/js/prototype.js
Line: 52

forum is www.skifun.gr/forum/index.php and any help is highly appreciated.
Title: Re: nneonneo's Shoutbox
Post by: adelshehadeh on June 19, 2007, 10:45:07 AM
hi
I tried to install this mod version 1.06 on the theme  Saf-Multicolor. and it simply didn't display. any ideas?

Only the title text : Shoutbox displayed

I follwoed the instruction here (http://custom.simplemachines.org/mods/index.php?mod=585)
Title: Re: nneonneo's Shoutbox
Post by: skase98 on June 19, 2007, 05:45:56 PM
I've been trying to uninstall this shoutbox and Package Manager SAYS it's uninstalled but it's still there and not working.  What did I do?  Or what should I do?  Thank you for any help!

Kathy
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 19, 2007, 08:28:08 PM
@carlito: I have no idea; I've never seen the error and I cannot reproduce it. Any more details about it?
@adelshehadeh: Have you checked the web server error log? The script may be failing to load (also possible: the first block of code is missing which prevents loading; I'd need to take a look at the forum if that was the case)
@skase98: If you installed the shoutbox to another theme then the modifications must be removed manually. Also, did any errors appear during installation?
Title: Re: nneonneo's Shoutbox
Post by: carlito on June 20, 2007, 01:56:49 AM
First of all thanks for quick response. OK, let's try to describe better the problem.

First of all shoutbox is working just fine both in IE and firefox. But (always there is a but) this little error script appears in IE (see attachment). I am using firefox mozilla web developer extension and trying to debug the error. From Web Developer,Tools, Error Console, I am getting the errors I posted above (see attachment also).

Since shoutbox is working fine it is not a great matter. But I am trying to get rid of that annoying IE error script since it spots overall image site. Using final version 1.6, followed the exact instructions to modify the theme template and did not face any error, just this little one. There are not any log errors, checked for web server logs, neither there. Anybody with IE has similar error script ? Any ideas ?
Title: Re: nneonneo's Shoutbox
Post by: skase98 on June 20, 2007, 09:49:59 AM
nneo, thank you for the reply!  I installed it in the default (basic blue) template.  When I added a new template, it didn't appear which worked out fine but if I go back to the default, it's still there.  However, it is not in my package manager list so I'm quite baffled!

I won't allow users to use any other template than the one where it doesn't show so it's more of an oddity than a serious functionality issue.  No one's going to accidentally find it but I want to give the options of other themes for folks with different viewing tastes.

Thank you again!
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 20, 2007, 10:36:53 AM
@carlito: How often can you reproduce the problem? Does it appear on every page load?
@skase98: OK, odd...though it sounds as if there was an error removing the mod. Also, if you installed other mods, that may have prevented correct uninstallation.
Title: Re: nneonneo's Shoutbox
Post by: carlito on June 20, 2007, 11:30:08 AM
Quote from: nneonneo on June 20, 2007, 10:36:53 AM
@carlito: How often can you reproduce the problem? Does it appear on every page load?

Yes nneonneo, everytime. You can reproduce it right now if you wish easily with web developer extension.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 20, 2007, 07:20:33 PM
Quote from: adelshehadeh on June 19, 2007, 10:45:07 AM
hi
I tried to install this mod version 1.06 on the theme  Saf-Multicolor. and it simply didn't display. any ideas?

Only the title text : Shoutbox displayed

I follwoed the instruction here (http://custom.simplemachines.org/mods/index.php?mod=585)
Also you may check Modifications.english.php (or other languages) for the nneonneos shoutbox code. and make sure that the yshout directory is there in your forum directory. Also make sure you have the new code that was originally for TinyPortal on the modsite for this mod page in your index.template.php (where you want it) :)
Title: Re: nneonneo's Shoutbox
Post by: rufen on June 21, 2007, 01:44:09 AM
Hello nneonneo!

your mod is great! we're transfering a forum from one server to the other, it works fine in the original one, but now i'm trying to install it to the new server, and I got this error.

8: Undefined index: yshout_loading
File: /home/rufenn/public_html/ldb/forum/Themes/Theme_LDB/BoardIndex.template.php (main sub template - eval?)
Line: 348

also, if I tryed your yshout/yshout.php, it give me that error.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

my board has only your mod installed so far, but it's not on the default theme. I have modifed the theme however reflecting the change.

thx in advance. :)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 21, 2007, 08:16:18 AM
What I would do is uninstall nneonneos shoutbox while you are transfering your server and then when you have completed that install it.
Title: Re: nneonneo's Shoutbox
Post by: rufen on June 21, 2007, 03:07:58 PM
yeah, that's what I plan to do, but I wanna know what to do if this error pop up, to have as little downtime as possible. (the user are attached to their shoutbox...)

Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 21, 2007, 03:29:16 PM
Quote from: rufen on June 21, 2007, 03:07:58 PM
yeah, that's what I plan to do, but I wanna know what to do if this error pop up, to have as little downtime as possible. (the user are attached to their shoutbox...)
This should fix any errors that are appearing to this shoutbox -
You should use nneonneos shoutbox version 1.06. You should use smf 1.1.2 or 1.1.1.
And make sure everything is installed correctly - meaning nneonneo code in Modifications.english.php, a yshout directory with a bunch of files in it. You may want to reinstall. Then manually install it. Next you are going to want to use the code meant for TinyPortal and place it on the theme anywhere - find this code on the modsite page.
/me wants you to post your sites url anytime you ask for support on anything / or brianjw wants you to put your url in your profile.
Title: Re: nneonneo's Shoutbox
Post by: rufen on June 21, 2007, 07:58:51 PM
well, tryed today.

created the database, loaded the backup, installed the shoutbox and did put in the code required, same error.

http://www.lendemaindebrosse.net/forum/index.php is my forum index.

Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 22, 2007, 08:04:04 AM
You need to go to the place where you have put the word shoutbox and under where there is that big space there needs to be this code: <div id="yshout"></div> and you must have the code that goes in the themes index.template.php. (ask nneonneo)
Title: Re: nneonneo's Shoutbox
Post by: rufen on June 22, 2007, 02:17:30 PM
I have all that already.

still got that error

8: Undefined index: yshout_loading
File: /home/rufenn/public_html/ldb/forum/Themes/Theme_LDB/BoardIndex.template.php (main sub template - eval?)
Line: 348

Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 22, 2007, 03:36:26 PM
Ask nneonneo.
Title: Re: nneonneo's Shoutbox
Post by: rufen on June 22, 2007, 06:31:38 PM
I though this topic was the place?

Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 23, 2007, 06:27:09 PM
It is, you have to wait for nneonneo to answer your question. ;)
Title: Re: nneonneo's Shoutbox
Post by: zandar on June 24, 2007, 07:27:58 AM
i installed it in to smf 1.1.2.
but i cant find shoutbox control panel.
i m using turkish language pack
:(
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 24, 2007, 11:21:04 AM
There is no control panel. Alot of the settings are in /forumroot/yshout/yshout.php :)

Just be careful with them ;)
Title: Re: nneonneo's Shoutbox
Post by: bobbbb on June 25, 2007, 04:52:51 AM
Quote from: bobbbb on June 11, 2007, 03:34:50 PM
Quote from: nneonneo on June 02, 2007, 11:03:33 PM
There is in fact a bug! (and kudos to you for discovering it).

SMF has a bug. If any DB errors occur in the function setupThemeContext() (or template_header() which calls setupThemeContext()), an infinite recursion will result!
Call stack (as shown by debug_backtrace()):

obExit()
fatal_error()
db_error()
db_query()
setupThemeContext()
template_header()
obExit()
fatal_error()
db_error()
db_query()
setupThemeContext()
template_header()
[...loops several *thousand* times more...]
db_query()
setupThemeContext()
[SSI.php main context]
[yshout.php main context]

Basically, the six functions noted actually loop recursively and cause massive failure.
On my server, this is represented in the error log with the line
[notice] child pid 4180 exit signal Illegal instruction (4)
which, in PHP's case, usually means a stack overflow (usually infinite recursion)
In the case of the code snippet you posted, the reason for db_error to be called in the first place was an innocent "no database selected" error...
... and that would be the same reason for FlashChat.

Why? Why would it fail so miserably? It is because no database is actually selected by SSI.php!
This is because it instead prepends the database name onto the prefix (if the prefix contains no periods)! FlashChat's code *assumes* that the database is already selected (via mysql_select_db).

Fix? Easy -- on line 76 of SSI.php change
if(strpos($db_prefix, '.') === false)
to
if(false && strpos($db_prefix, '.') === false)
and all will be solved.

Hello nneonneo, I tried this fix but it didn't work. I still get these errors in my error logs:

SUEXEC error_log:
[2007-06-11 13:31:57]: info: (target/actual) uid: (X/X) gid: (X/X) cmd: yshout.php

X = server user name

My website runs fast though... I don't think this error really affects anything. Does it? Any suggestions as to why your fix didn't work in my case?

Thank you again so much for your help!

@bobbbb: You have a problem with suexec -- how did you install the mod? Was this the same way you installed SMF? Finally, are there any other errors?


I installed the mod by uploading unzipped files to the package folder and installing via the admin pages. I installed SMF using the webinstall feature. There are no other noticeable errors besides the fact that whenever I look at the error logs this what I see.
Title: Re: nneonneo's Shoutbox
Post by: pongsak on June 25, 2007, 05:05:10 AM
How to reduce font size at the menu of the box as the picture, thanks.

(http://img214.imageshack.us/img214/3279/psk03fz2.jpg)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 28, 2007, 05:38:47 AM
@bobbbb: I suggest uploading the zipped file through the Package manager (remember to uninstall previous first!), and trying that.
@pongsak: Edit the CSS in the index.template.php file.
Title: Re: nneonneo's Shoutbox
Post by: funboy on June 29, 2007, 06:33:57 AM
Hello nneonneo,
I installed your shoutbox but the package manager raise this error:
"The package you are trying to download or install is either corrupt or not compatible with this version of SMF"

How can I fix this problem?
I try to download SB_1.06.tgz more and more time again but the problem is always present.


Can you help me, please??
Thanks
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 29, 2007, 06:06:20 PM
Ok give us some more information.
[What smf version are you using?]
[What other modules do you have installed?]
[What theme were you using when attempting to install? - works best with default theme]

You can always install this manually by opening the xml file in the tgz file and placing the code manually where it belongs. ;)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 29, 2007, 08:01:00 PM
No, it's because SMF 1.1.3 was just released. Oh well, I guess this means I'm releasing shoutbox 1.0.7 ;)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 29, 2007, 08:34:16 PM
Oh ya lol. But I thought this version could handle mods for 1.1.2. :)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 29, 2007, 08:37:43 PM
mmm? It probably doesn't. I wouldn't worry though, since 1.07 has just been uploaded and tested to work with my guinea pig 1.1.3 SMF. It should install fine over an unmodified or slightly modified 1.06, and requires no changes to other themes. Minor bugs are fixed, but no new features are introduced.

Enjoy!
Title: Re: nneonneo's Shoutbox
Post by: Crens on June 29, 2007, 09:42:52 PM
Hello!

First thanks for the best shoutbox mod available for SMF.

I am using the Gold Night Theme with SMF 1.1.3.  I have also integrated the shoutbox within the theme.  My question/problem is that whenever anyone uses the "/me" command it shows the "<color="red">" in the box instead of actually changing the color.  Could someone please tell me if there is an easy fix for this?  I have attached a screen shot to show what I am describing.  Any help would be gratefully appreciated.

Thanks,
Crens
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 30, 2007, 11:08:40 AM
Can you post a link to your website please... [always do this before asking for support]

Also have you tested this shoutbox with the default theme, does it do the same thing or is it just this theme?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on June 30, 2007, 02:17:35 PM
Hmm, very strange. It looks like something stripped the "font" portion of the tag away, leaving an unparseable tag (< color="red">; note the space).

Try typing "font" into the shoutbox directly, and see what comes up.

Also, look at the history and see if the problem exists there; also check the page source of the history if it is still broken.

Finally, if none of that checks out, post the forum URL :)
Title: Re: nneonneo's Shoutbox
Post by: SingingCrane on June 30, 2007, 04:28:43 PM
I had this mod installed a while back, but it overloaded the server...my forum is on a shared server, so if the running processes on the server go over 20%, it locks the site down for about 5 minutes (looking through the server log showed THOUSANDS of requests from the shoutbox itself). I suppose this is because I would need to set the refreshTime to something a bit longer so that the server does not get bogged down. Any suggestions on what I can do to eliminate this issue?

Also, how could I set the shoutbox so that only reg'd users can shout and see it? Can I do this with SSI?

Thanks for any help!
Title: Re: nneonneo's Shoutbox
Post by: brianjw on June 30, 2007, 05:01:54 PM
Quote from: SingingCrane on June 30, 2007, 04:28:43 PM
Also, how could I set the shoutbox so that only reg'd users can shout and see it? Can I do this with SSI?

Thanks for any help!
Look in /yshout/yshout.php it has all the settings incuding the one you speak of in that file ;)
Title: Re: nneonneo's Shoutbox
Post by: Daggers on July 01, 2007, 03:05:52 PM
Hi nneonneo,

I updated one of my boards today with 1.1.3 and also noticed your latest shoutbox and there was a new Flashchat Integration too.

Most of the updates went well thanks to previous posts with regard to the flashchat & shoutbox conflict and the bug in SSI.php

However, things did get a little hairy because I'm not using the default theme :( so the following problems raised there ugly heads..

On the download page for the mod it says...
QuoteSecond, find the desired location of the shoutbox and place at that location (in the index.template.php file!)

This didn't seem to work and to place the shoutbox at the bottom of the forum I had to place the code in boardindex.template.php


Once installed and working I was getting the javascript errors on the pages so I had to remove the following..

<script src="',$boardurl,yshout/js/domFunction.js" type="text/javascript"></script>

and put in the full URL path

Not sure if it is only me that has had this problem or if others are experiencing it? All working now .... fingers crossed!&nbsp; :o ;D

Still the best shoutbox out there, well done mate

EDIT:
Since posting the above I went back onto the forum and all it shows is ..
...loading shoutbox..
and I also get the javascript error in the bottom corner of IE

If I open a topic on the forum and then go back to the index the shoutbox will then appear??

Any Ideas?

Thanks
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 01, 2007, 06:37:43 PM
@SingingCrane: yshout/yshout.php has the guest setting; yshout/js/yshout.js has the refreshTime setting.
@Daggers: Hmm, the permission denied error is due to the shoutbox AJAX call trying to access another forum.
Here's the problem.

You're board URL is probably something like "http://mybestdomain.com/Bboard/...". However, in SMF, it's registered as "http://www.mybestdomain.com/Bboard/...". (or vice versa). Most modern browsers will see the two domains as different, and an access from "mybestdomain.com/Bboard/index.php" to "www.mybestdomain.com/Bboard/yshout/yshout.php" will be roundly denied (mybestdomain.com != www.mybestdomain.com).
Therefore, I would suggest that you change the board URL in SMF's settings.
Title: Re: nneonneo's Shoutbox
Post by: Daggers on July 01, 2007, 07:28:10 PM
Nice one nneonneo thats worked for me

Many Thanks  :D :D :D
Title: Re: nneonneo's Shoutbox
Post by: SingingCrane on July 01, 2007, 08:23:15 PM
Yes, but what refreshTime setting would you recommend for a shared server? The default is just way too much for my site.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 01, 2007, 10:55:15 PM
mmm, I don't know, actually. I have not been able to do a lot of testing.

Does your server have a PHP-Accelerator of some sort? yshout.php benefits a lot from acceleration (even simple bytecode-caching), because it is called so often. I have noted a 10 fold increase in run times with a PHP accelerator installed, under moderate to heavy load. If you have the authority to install one, you should do so.

Also, you can try to disable logging on yshout.php, since that may take resources to do (though not nearly as much as the main script!).

I would experiment a bit. Set the refreshTime higher (~10000 for 10 seconds is probably OK for a first run) and then see if that's responsive enough and sufficiently problem free.

If you find a happy refresh time, post it and see if it helps anyone else :)

Cheers,
nneonneo
Title: Re: nneonneo's Shoutbox
Post by: SingingCrane on July 01, 2007, 11:06:15 PM
Will do! Thanks for the info, and again, great shoutbox!
Title: Re: nneonneo's Shoutbox
Post by: Pranav on July 02, 2007, 08:29:37 AM
Cool! 8) Gonna install it at night. Let's see if it's good.
Title: Re: nneonneo's Shoutbox
Post by: Jack_40k on July 03, 2007, 09:45:30 AM
    Execute Modification     ./Themes/default/languages/Modifications.english-utf8.php     File not found

Help :)
Title: Re: nneonneo's Shoutbox
Post by: Jack_40k on July 03, 2007, 10:26:23 AM
Can I please get some help? Been waiting a few hours now, should be an easy fix?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 03, 2007, 11:01:41 AM
Some people don't hang around smf all day you know ;)
First of all do you have a file called Modifications.english-utf8.php anywhere?
Title: Re: nneonneo's Shoutbox
Post by: Jack_40k on July 03, 2007, 11:08:31 AM
no, that's what i want :)
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 03, 2007, 11:46:48 AM
Open up the xml file inside the file you downloaded (install.xml or something like it). Manually install the Modifications.english.php file since you have that file. ;)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 03, 2007, 06:04:37 PM
Yep, pretty much. I'd assumed (since most installs nowadays seem to be of the UTF8 variety) that people would have UTF8; guess not.

But yeah, as Brian said, just apply the mod manually to Themes/default/languages/Modifications.english.php. Then, you may safely ignore the warning and install the mod as normal.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 03, 2007, 06:48:58 PM
I don't use utf8. A tip Nneonneo: Add Modifications.template.php to the xml file with the same code along with Modifications.english-utf8.php. And you can tell people if they use UTF8 ignore the error with Modifications.enlish.php or if they don't use utf8 tell them to ignore the error with Modifications.english-utf8.php ;)

Brianjw
Title: Re: nneonneo's Shoutbox
Post by: SingingCrane on July 03, 2007, 09:43:31 PM
I just enabled what is called "FastCGI for PHP" on my host server. Here's what the gist of it is:

Quote
FastCGI for PHP makes all your PHP applications run through mod_fastcgi instead of mod_phpsusexec. This eliminates the overhead of loading the PHP interpretor on every hit. Since it is always in memory ready for the next hit, the responses will be generated faster. NO MODIFICATIONS to your existing PHP applications will be performed so you can easily enable and disable it at will.

Could this by any chance clear up the issues I was having with the server processor overloads? Just curious...I don't really expect it to, but thought I should ask. I'm still learning, though slow as it may be...
Title: Re: nneonneo's Shoutbox
Post by: ekfaysal on July 04, 2007, 07:38:12 AM
QuoteShout Box

Template Parse Error!
There was a problem loading the /Themes/default/languages/index.english.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

This error im facing please helpp me with this
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 04, 2007, 09:01:11 AM
Quote from: ekfaysal on July 04, 2007, 07:38:12 AM
QuoteShout Box

Template Parse Error!
There was a problem loading the /Themes/default/languages/index.english.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

This error im facing please helpp me with this
Open the file /Themes/default/languages/index.english.php and make sure if there is any apostraphe's then you have to \ them out like the following:
Brian\'s Website

Or you can attatch your index.english.php file here and I'll take a look for you.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 04, 2007, 10:30:23 AM
@SingingCrane: Yeah, that might help a bit.
@ekfaysal: I don't know if this is even related to the shoutbox; that file isn't modified AFAIK.
Title: Re: nneonneo's Shoutbox
Post by: ekfaysal on July 04, 2007, 01:31:03 PM
Quote from: ekfaysal on July 04, 2007, 07:38:12 AM

Open the file /Themes/default/languages/index.english.php and make sure if there is any apostraphe's then you have to \ them out like the following:
Brian\'s Website

Or you can attatch your index.english.php file here and I'll take a look for you.

File is attached
Plz check it for me
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 04, 2007, 02:20:04 PM
I couldn't find any problems with it, sorry!
Title: Re: nneonneo's Shoutbox
Post by: Daggers on July 04, 2007, 05:28:53 PM
Quote from: ekfaysal on July 04, 2007, 07:38:12 AM
QuoteShout Box

Template Parse Error!
There was a problem loading the /Themes/default/languages/index.english.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

This error im facing please helpp me with this

That is the generic error, the actual error is listed underneath that part of the text.. something like...

unexpected >
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 04, 2007, 06:51:41 PM
I can't find anything wrong with the file; running "php -f <file>" works fine, no errors; "php -l <file>" also works ("No syntax errors detected in <file>").

Therefore, I suggest the following fix: open the file in a text editor, make a change, undo that change, and save the file. This is intended to allow your text editor to fix the line breaks, in case they are inconsistent or wrong.

Alternately, I've seen bizarre errors appear when copying & pasting code off forums (especially SMF!) where the indentation is filled with Unicode spaces, which are not parsed correctly by PHP.

Finally, if none of that works, please post the full error (as Daggers mentions; you are not showing the full error, only the advice)
Title: Re: nneonneo's Shoutbox
Post by: jay.jarri on July 05, 2007, 04:37:47 AM
Hi nneonneo

The shoutbox was working amazingly well for the first 2 months of installation. But since a week it has jammed and now if somebody tries to make a post in the shoutbox he gets the below error.

File error (writeLine); aborted

Can you please advise what might be wrong...

Jarri
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 05, 2007, 02:35:08 PM
This error means that the script was unable to lock the chat file (chats/home.txt) for writing.

There are a few possible causes:
1) File doesn't exist, and permissions prevent the file from being created. Check the folder permissions on chats, and make sure home.txt is there (if not, upload a blank file and call it home.txt; then make sure it's writable)
2) File permissions deny writing (again, this would be a chmod issue)
3) File is locked by another process (some other script instance or program has it locked; this is unlikely as scripts are only permitted to run for a certain amount of time before being terminated)

So, then, here's what I recommend doing as a check. After each step, test to see if the shoutbox works again.
1) Create home.txt if it doesn't exist, and chmod 755 it (or 777)
2) Delete home.txt if it exists. If you are prevented from deleting it (perhaps it's "in use"), then another program has locked the file. Try restarting the web server if you have the authority to do so.
3) Re-create the file. If you aren't allowed to, check permissions on chats.
4) Reinstall yshout, making sure that the entire yshout directory is deleted prior to installation.
Title: Re: nneonneo's Shoutbox
Post by: Quester on July 06, 2007, 12:19:16 AM
I suggest to do not install this mod if you have very popular forum - SB overloads server !!

Sorry for my english. I hope that everyone understand me.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 06, 2007, 09:08:54 AM
That only happens if you have the serverloads error by your server. That is why you have to change a number to make it work for you.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 06, 2007, 11:05:38 AM
Quester: The defaults are suitable for a smaller forum; change the default settings in yshout/js/yshout.js and yshout/yshout.php to make it suitable for your forum. In most cases, changing them to appropriate values and adding a PHP-cache/accelerator will make it possible to run on even a very big forum.
Title: Re: nneonneo's Shoutbox
Post by: shadow82x on July 07, 2007, 07:44:44 PM
I would love to see this mod in its own area instead of on the welcome box (current location) is there a way to make it so its directly under that in its own box kind of instead of part of the welcome box. I hope theres a way to do this. :)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 08, 2007, 01:50:56 PM
Yes, there is a way to do that. The <div id=yshout> div is the important one; wherever it is placed, the shoutbox will appear (n.b. having more than one on a page is not a good idea!).

Simply move the code containing that div to another location within index.template.php (or even to another file, e.g. BoardIndex if you want it to only appear on the main page).

It looks like this in the default theme:
// YSHOUT HERE
echo '
<br /><b>',$txt['yshout_shoutbox'],'</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

(there will be two instances: one for guests, one for registered members).

For other themes, the code is posted on the main mod page.
Title: Re: nneonneo's Shoutbox
Post by: shadow82x on July 08, 2007, 02:00:13 PM
So do i move the big code or little. Also how do i get it directly below in index.template
Title: Re: nneonneo's Shoutbox
Post by: magnitude on July 08, 2007, 03:41:58 PM
Yeah nneonneo i did every possible things to move the shout box elsewhere in my forum first page
but i did nt succesfull at all my shout box is in the bottom of the forum i want to be at near about my forum title

Plss tell me which code to be edit and how to move the location of shout box to top of left side of forum which code to be move and where to be move

Thanks in advance


Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 08, 2007, 10:47:58 PM
@shadow82x: Big or little? I don't understand :-\

@magnitude (and shadow82x): Place the code
// 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

at the desired location.
Title: Re: nneonneo's Shoutbox
Post by: shadow82x on July 08, 2007, 10:49:26 PM
I'm not sure where I would place it. I want it where the normal shouts would be if you installed another mod like right above the boards but below the userbar..
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 08, 2007, 10:55:39 PM
Hmm...that would be in a separate div, basically. I'm guessing that you'd find the breadcrumb-trail in index.template.php (the thing that says My Forum -> Board -> Sub Board -> Topic), go up a bit and stick a wide div there.
Title: Re: nneonneo's Shoutbox
Post by: magnitude on July 09, 2007, 11:38:19 AM
Thanks NNEONNEO
i ve download SB_1.07.tgz and installed succesfully and all the given code are working fine but due to some reason i had to shut down dat forum in which shout box was installed and make new forum again i put these code(which i described below) into PHP now the admin controls and shout! text goes disapper i dont know how i also try this on another smf forum for double check but the error was remain same

(http://img452.imageshack.us/img452/3543/errortv5.jpg)

http://img452.imageshack.us/img452/3543/errortv5.jpg (http://img452.imageshack.us/img452/3543/errortv5.jpg)
This is large image


I Used This code
Installing to other themes (instructions updated for 1.06!):
In the theme's "index.template.php" file:
find
Code:
   /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)      Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.      Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.      Standards compliance mode happens when you use xhtml... */   if ($context['browser']['needs_size_fix'])      echo '   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';After that, add

Code:
// YSHOUT HERE
                  global $boardurl;
                    echo '
                    <script src="',$boardurl,'/yshout/js/prototype.js" type="text/javascript"></script>
                    <script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script>
                    <script src="',$boardurl,'/yshout/js/behaviour.js" type="text/javascript"></script>
                    <script src="',$boardurl,'/yshout/js/domFunction.js" type="text/javascript"></script>
                    <script type="text/javascript">
                    var myfunc = new domFunction(function()
                    {
                              loadChat();
                  }, { "yshout":"id"});
                  var board_url = "', $boardurl, '";
                  </script>
                  <script src="',$boardurl,'/yshout/js/yshout.js?Mar42007" type="text/javascript"></script>
                  <script type="text/javascript">var shoutFile = "home.txt";</script>
                  <style type="text/css">
                               #yshout {
                                            font-size: 10px;
                               }   
                               #yshout p {
                                             margin: 0 0 0; /* Top Bottom Linespacing */
                               }
                               .shout-invalid {
                                            background: #FFFDD1;
                               }
                               #yshout fieldset {
                                            border: none;
                               }      
                               #yshout em {         
                                            font-style: normal;
                               }
                               #yshout p {   
                                              line-height: 1;         
                                              margin-top: 0;
                               }      
                               #yshout {
                                             overflow: hidden;
                               }      
                               #yshout .shout-timestamp {
                                             font-weight: normal;
                                               color: #000;
                               }      
                               #yshout .adminlink {         
                                             font-size: 6pt;
                                             color: #141414;
                               }      
                               #forum-name, #shout-text, #shout-button {
                                             font-size: 9px;
                                             margin: 0;   
                                             padding: 0;
                               }      
                               #yshout #forum-name {         
                                            color: #666666;
                                            width: 70px;
                                            margin-right: 5px;
                               }      
                               #yshout #shout-text {
                                                  color: #000000;
                                                  width: 310px;
                                                  margin-right: 5px;
                               }      
                               #yshout #shout-button {
                                            width: 55px;
                               }      
                               #shouts .owner a {         
                                            color: #F00;                                                                               
                               }      
                               #shouts .moderator a {
                                             color: #00F;
                               }
                 </style>';                
                 // YSHOUT END



Second, find the desired location of the shoutbox and place at that location (in the index.template.php file!)

Code:
// 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

I Used Enterprise_smf11rc3 theme



thankss ya
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 09, 2007, 06:50:06 PM
Instead of deleting a whole forum. Try backing up files before modifying as smf suggests ;)
Title: Re: nneonneo's Shoutbox
Post by: contest25 on July 10, 2007, 08:38:59 AM
hi nneonneo's


i am newbie to smf
i successfully installed smf forum and i was looking shoutbox
came thru yours
but i donna where to place it
infact i tried placing the codes provided by your mods

but it always says something temperorary parser error

take a look at my forum hope u guide where files should be located and i need sb on front

my forum
http://www.kannadasiri.com/portal/index.php


thanks
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 10, 2007, 09:54:04 AM
@magnitude: You are probably not using english-utf8.

Find Themes/default/languages/Modifications.english.php
and add, right before the ?> at the end:
// ---- Begin modification - nneonneo's Shoutbox ----
$txt['yshout_shoutbox'] = 'Shout Box';
$txt['yshout_loading'] = '...loading shoutbox...';
$txt['yshout_rp_banned'] = "Sorry, you've been banned from the shoutbox.";
$txt['yshout_no_guests'] = 'Sorry, you must be logged in to use the shoutbox!';
$txt['yshout_ban_conf'] = 'Ban Confirmation';
$txt['yshout_select_mode'] = 'Select Ban Mode:';
$txt['yshout_rp'] = 'Reading and Posting';
$txt['yshout_p'] = 'Posting only';
$txt['yshout_error'] = 'ERROR: ';
$txt['yshout_no_user'] = 'User not found.';
$txt['yshout_del_success'] = 'Shout deleted.';
$txt['yshout_no_action'] = 'Nothing to do.';
$txt['yshout_history'] = 'History';
$txt['yshout_commands'] = 'Commands';
$txt['yshout_exthistory'] = 'ExtendedHistory';
$txt['yshout_hide'] = 'Hide';
$txt['yshout_show'] = 'Show';
$txt['yshout_admlinks'] = 'AdminLinks';
$txt['yshout_return'] = 'ReturnToShoutbox';
$txt['yshout_p_banned'] = 'You are banned from posting.';
$txt['yshout_banned'] = 'Banned';
$txt['yshout_shout_button'] = 'Shout!';
$txt['yshout_banlist_caption'] = 'Shout Box Bans (click to unban)';
$txt['yshout_ip_bans'] = 'IP Bans for ';
$txt['yshout_username_bans'] = 'Username Bans for ';
$txt['yshout_ban_type_error'] = 'use /banuser or /banip!';
$txt['yshout_ban_mode_error'] = 'Must have mode argument.';
$txt['yshout_imp_slash_error'] = 'Prefix shout with "/" (slash character)! See "/help impersonate" for details.';
$txt['yshout_imp_uname_error'] = 'No username given!';
$txt['yshout_imp_max4_error'] = 'Maximum 4 arguments!';
$txt['yshout_cmd_reference'] = 'Command Reference';
$txt['yshout_cmdlist'] = array( '/help'    => ' [command]: Help on a command, or all if no command is specified.',
'/return' =>    ': Go back to the Shout Box.',
'/pi' =>    ' [digits]: What is the value of pi to the nth digit?',
'/me' =>    ' &lt;message&gt;: Emotes the message (e.g. <font color="red"> * Nathaniel likes dogs</font>)');
$txt['yshout_cmdlistadmin'] = array('/clear' =>   ': Completely empty the Shout Box.',
'/help'    => ' [command]: Help on a command, or all if no command is specified.',
'/return' =>    ': Go back to the Shout Box.',
'/banlist'   => ': List all bans currently in place. Unban the users by clicking on their names.',
'/banuser'   => ' &lt;mode&gt; &lt;username&gt;: Ban a user by name. You should use the user\'s real username, otherwise the ban can be evaded. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/banip' =>   ' &lt;mode&gt; &lt;IP&gt;: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate'=>' &lt;user&gt; [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
&lt;user&gt;: Username to use<br />
[userlevel]: User Level to use. 0=normal, 1=mod, 2=admin<br />
[ip]: IP address to use, as 1.2.3.4<br />
[userid]: User ID from forum, to fix profile link</blockquote>');

// ---- End modification - nneonneo's Shoutbox ----

and things should work.

@contest25: A template parse error occurs when the code inserted isn't placed correctly and prevents PHP from reading the code correctly. Have you tried looking for the pieces of code specified, to place the shoutbox just underneath?
Title: Re: nneonneo's Shoutbox
Post by: contest25 on July 11, 2007, 12:00:28 AM
hi thanks for response

now i placed that codes

now wats happening is i cant see anything on front page except shoutbox title

first tellme where should downloaded files shud be located i mean which directory i shud place all downloaded files
and in index.template.php

i shud add 2 codes you are provided


Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 11, 2007, 02:09:46 PM
Err...you should've uploaded the shoutbox as a package (i.e. installed via Package Manager).
Incidentally, your site is giving a 404 for the forum.
Title: Re: nneonneo's Shoutbox
Post by: anD on July 11, 2007, 10:32:54 PM
Quote from: brianjw on July 03, 2007, 11:46:48 AM
Open up the xml file inside the file you downloaded (install.xml or something like it). Manually install the Modifications.english.php file since you have that file. ;)
i dont understand, sorry. but what do you mean by "install manually" ?

heres my error:

"Execute Modification     ./Themes/default/languages/Modifications.english-utf8.php     File not found"

and i clicked on the utf8 option upon installation. fresh install as well.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 12, 2007, 05:21:54 PM
Hmm, odd. I don't know why you wouldn't have that file.

Do you have a file called "Themes/default/languages/Modifications.english.php"? If so, then you can manually install to there.

Quote from: nneonneo on July 10, 2007, 09:54:04 AM
@magnitude: You are probably not using english-utf8.

Find Themes/default/languages/Modifications.english.php
and add, right before the ?> at the end:
// ---- Begin modification - nneonneo's Shoutbox ----
$txt['yshout_shoutbox'] = 'Shout Box';
$txt['yshout_loading'] = '...loading shoutbox...';
$txt['yshout_rp_banned'] = "Sorry, you've been banned from the shoutbox.";
$txt['yshout_no_guests'] = 'Sorry, you must be logged in to use the shoutbox!';
$txt['yshout_ban_conf'] = 'Ban Confirmation';
$txt['yshout_select_mode'] = 'Select Ban Mode:';
$txt['yshout_rp'] = 'Reading and Posting';
$txt['yshout_p'] = 'Posting only';
$txt['yshout_error'] = 'ERROR: ';
$txt['yshout_no_user'] = 'User not found.';
$txt['yshout_del_success'] = 'Shout deleted.';
$txt['yshout_no_action'] = 'Nothing to do.';
$txt['yshout_history'] = 'History';
$txt['yshout_commands'] = 'Commands';
$txt['yshout_exthistory'] = 'ExtendedHistory';
$txt['yshout_hide'] = 'Hide';
$txt['yshout_show'] = 'Show';
$txt['yshout_admlinks'] = 'AdminLinks';
$txt['yshout_return'] = 'ReturnToShoutbox';
$txt['yshout_p_banned'] = 'You are banned from posting.';
$txt['yshout_banned'] = 'Banned';
$txt['yshout_shout_button'] = 'Shout!';
$txt['yshout_banlist_caption'] = 'Shout Box Bans (click to unban)';
$txt['yshout_ip_bans'] = 'IP Bans for ';
$txt['yshout_username_bans'] = 'Username Bans for ';
$txt['yshout_ban_type_error'] = 'use /banuser or /banip!';
$txt['yshout_ban_mode_error'] = 'Must have mode argument.';
$txt['yshout_imp_slash_error'] = 'Prefix shout with "/" (slash character)! See "/help impersonate" for details.';
$txt['yshout_imp_uname_error'] = 'No username given!';
$txt['yshout_imp_max4_error'] = 'Maximum 4 arguments!';
$txt['yshout_cmd_reference'] = 'Command Reference';
$txt['yshout_cmdlist'] = array( '/help'    => ' [command]: Help on a command, or all if no command is specified.',
'/return' =>    ': Go back to the Shout Box.',
'/pi' =>    ' [digits]: What is the value of pi to the nth digit?',
'/me' =>    ' &lt;message&gt;: Emotes the message (e.g. <font color="red"> * Nathaniel likes dogs</font>)');
$txt['yshout_cmdlistadmin'] = array('/clear' =>   ': Completely empty the Shout Box.',
'/help'    => ' [command]: Help on a command, or all if no command is specified.',
'/return' =>    ': Go back to the Shout Box.',
'/banlist'   => ': List all bans currently in place. Unban the users by clicking on their names.',
'/banuser'   => ' &lt;mode&gt; &lt;username&gt;: Ban a user by name. You should use the user\'s real username, otherwise the ban can be evaded. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/banip' =>   ' &lt;mode&gt; &lt;IP&gt;: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate'=>' &lt;user&gt; [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
&lt;user&gt;: Username to use<br />
[userlevel]: User Level to use. 0=normal, 1=mod, 2=admin<br />
[ip]: IP address to use, as 1.2.3.4<br />
[userid]: User ID from forum, to fix profile link</blockquote>');

// ---- End modification - nneonneo's Shoutbox ----

and things should work.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 12, 2007, 07:41:25 PM
@nneonneo: Tip!: I have seen mods that ignore errors and you can make it so if they dont use utf8 then it will ignore the error and install with the other one. ;) and the other way around....
Title: Re: nneonneo's Shoutbox
Post by: Daggers on July 13, 2007, 03:05:59 AM
I didn't have that file when I installed your latest version, I downloaded it from the language packs...

http://www.simplemachines.org/download/?languages;lang=english_british

:)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 13, 2007, 11:54:19 AM
Err, I don't think my package uses English-British.

Nonetheless, I'm going to see if I can install to multiple language packs at once, preferably without duplicating code.
Title: Re: nneonneo's Shoutbox
Post by: Daggers on July 13, 2007, 12:11:23 PM
OOPS!! Wrong link...

http://www.simplemachines.org/download/?languages;lang=english

Title: Re: nneonneo's Shoutbox
Post by: magnitude on July 16, 2007, 02:41:16 PM
Thanksss nneonneo

now i get a new error i logged in as admin but i can only see 2 options in shout box that is history and command can't see the admin links ....
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 16, 2007, 07:38:41 PM
Hmm, that's quite strange. Try logging out and back in.
Title: Re: nneonneo's Shoutbox
Post by: Spike Saunders on July 16, 2007, 08:27:58 PM
This will sound like a wierd question, so bear with me here.

But is it possible to modify this so that the users may post into the chat anoynmously? Still have to be a registered member, but if they wish to, could click a checkmark box that says 'anonymous' so that nobody knows who posted it. And in the Admin CP perhaps the admin can see through that.

I want to offer my users the chatbox to voice their opinions on things, and not get yelled at for them. Easier when nobody knows who said it. :)

thanks
Title: Re: nneonneo's Shoutbox
Post by: pongsak on July 17, 2007, 06:05:21 AM
Coding below can limit smileys use in this ajax shout box.

Find in yshout.php

$newText = parse_bbc($newText); // w00t!

Add after.

//start modified here, limit smileys for 1 shout
  $smileyLimit = 3;  // how many u want to show.
  $prev = substr_count($newText, '[img') + substr_count($newText, '[IMG');
  $tempmsg = doUBBC($newText, true);
if (substr_count($tempmsg, '<img') > ($prev + $smileyLimit))
$newText = 'U can't use smileys >  '.$smileyLimit;
   // end here
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 17, 2007, 01:34:43 PM
@Spike Saunders: I suppose that would be possible, and I can understand why it would be needed. It would take some effort to make this work, though, as it would involve modifying the form, probably adding a new parameter and changing the guest check to include anonymous users. It can be done, though. (of course, if they *really* want to be anonymous, they can log out, post as guest (provided that feature isn't disabled), and log back in, but of course that's a pain in the neck to do)

@pongsak: yes, that could definitely come in handy when battling smiley spam...
Title: Re: nneonneo's Shoutbox
Post by: Spike Saunders on July 17, 2007, 05:01:14 PM
Quote from: nneonneo on July 17, 2007, 01:34:43 PM
@Spike Saunders: I suppose that would be possible, and I can understand why it would be needed. It would take some effort to make this work, though, as it would involve modifying the form, probably adding a new parameter and changing the guest check to include anonymous users. It can be done, though. (of course, if they *really* want to be anonymous, they can log out, post as guest (provided that feature isn't disabled), and log back in, but of course that's a pain in the neck to do)
Yep. I know it'd take alot to do.. which is why I asked if it was possible lol. I mean you woul think it could be easily done since you could maybe force a logout for the shoutbox usage... But most of my users use the log in forever option, heh. I know that a year or so ago i had a forum running with a shoutbox that allowed for anonymous chatting and such. Was pretty useful.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 17, 2007, 08:41:38 PM
I suppose, actually, that it wouldn't be so hard to do. Some quick modifications to yshout.php would do it...something like adding a checkbox, which adds an "anonymous" option to the request and fires off loadChat() again; and a little piece of code that unsets $user['is_logged'] if it finds the option.
Title: Re: nneonneo's Shoutbox
Post by: Devilsin on July 18, 2007, 03:47:22 PM
I need help, I installed the shoutbox, and it was working fine, then out of nowhere it shut off and then it said:

Download yshout.php
Your request to download yshout.php is being processed.

Please Wait...

and its been like that ever since. I tried reinstalling it and that doesn't work. Please help!
Title: Re: nneonneo's Shoutbox
Post by: Spike Saunders on July 18, 2007, 08:25:42 PM
Quote from: nneonneo on July 17, 2007, 08:41:38 PM
I suppose, actually, that it wouldn't be so hard to do. Some quick modifications to yshout.php would do it...something like adding a checkbox, which adds an "anonymous" option to the request and fires off loadChat() again; and a little piece of code that unsets $user['is_logged'] if it finds the option.
Saddly I know nothing of modifying SMF, lol. I used to do stuff on Invision before it went 'pay license', but it was simple stuff. I have no idea how to do this lol.  If by chance someone can write up how to do this, or something that'd be great. :)
Title: Re: nneonneo's Shoutbox
Post by: Devilsin on July 19, 2007, 10:21:52 AM
Ugh, I don't know what the heck is wrong, I just finished reinstalling the whole forum and it STILL gives me that yshout error after i installed the shoutbox. This is seriously stressing me out.
Title: Re: nneonneo's Shoutbox
Post by: th2mods on July 19, 2007, 03:12:08 PM
Quote from: Devilsin on July 18, 2007, 03:47:22 PM
I need help, I installed the shoutbox, and it was working fine, then out of nowhere it shut off and then it said:

Download yshout.php
Your request to download yshout.php is being processed.

Please Wait...

and its been like that ever since. I tried reinstalling it and that doesn't work. Please help!

dude, i get the same thing. iv tried everything. and when i unistalled it it corrupted my theme, so i need to reinstall the default theme. i am currently trying to fix this. please help us! my users want the shout box back!

(http://img113.imageshack.us/img113/3564/untitleduq3.jpg)

Big image:
http://img164.imageshack.us/img164/9217/untitledje4.jpg

im guessing i need that file, could you give it to us?



EDIT:
I download the "smf_1-1-3_english-utf8 " language: http://www.simplemachines.org/download/?languages;lang=english

then i put all the files in that folder to, Themes/default/languages/ then i got no errors... but now i get this, its back to my original problem, http://img522.imageshack.us/img522/7957/untitledgd8.jpg
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 19, 2007, 05:46:32 PM
You get the error for Modifications.english-utf8.php because you don't use utf. However, the Modifications.english.php installs fine. Just skip the error in the installation if one works and the other doesn't ;)

Brianjw
Title: Re: nneonneo's Shoutbox
Post by: th2mods on July 19, 2007, 06:46:19 PM
i just stated in my edit i got that error message to go away.. now i have a new problem like Devilsin gets
Title: Re: nneonneo's Shoutbox
Post by: kichu on July 20, 2007, 07:46:15 AM
Only 11 Messages Displaying in shout box .. How to Increase the Messages.. Like i want to Display 20 messages as Chat Room..
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 20, 2007, 06:09:59 PM
@kichu: Open up the ./yshout/yshout.php file and replace 11 to 20. Should be at the top ;)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 20, 2007, 07:12:15 PM
I've missed a lot, apparently -_-

Thanks brian for helping out :)

@Devilsin (and th2mods): I have *never* seen that error before. It almost sounds like an excessively broken web server...since the script yshout.php is queried through AJAX. It would help to know your hosting provider, and maybe any errors which appear in the web server logs.

I have added a note about the Modifications.*.php thing, so hopefully it won't confuse too many people.
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 20, 2007, 07:42:23 PM
Quote from: nneonneo on July 20, 2007, 07:12:15 PM
I have added a note about the Modifications.*.php thing, so hopefully it won't confuse too many people.
There is a way to make it so if there is an error it will ignore it. Let me see if I can find what it is....
Ok here it is.
This would be in the install xml file:

<file name="$languagedir/Modifications.english.php">
<operation error="ignore">

and

<file name="$languagedir/Modifications.english-utf8.php>
<operation error="ignore">

This would be at the beginning of the modification for those files ;)
This way should also keep users from confusion.
<operation error="ignore"> is the key.

Brianjw
Title: Re: nneonneo's Shoutbox
Post by: Iamok on July 20, 2007, 08:22:35 PM
Well, I added it like you said, but it stays as a large box (with no bg or anything) and it says shoutbox with the message ".....loading shoutbox...." but it never loads o.O
Title: Re: nneonneo's Shoutbox
Post by: th2mods on July 20, 2007, 09:22:45 PM
Quote from: nneonneo on July 20, 2007, 07:12:15 PM
I've missed a lot, apparently -_-

Thanks brian for helping out :)

@Devilsin (and th2mods): I have *never* seen that error before. It almost sounds like an excessively broken web server...since the script yshout.php is queried through AJAX. It would help to know your hosting provider, and maybe any errors which appear in the web server logs.

I have added a note about the Modifications.*.php thing, so hopefully it won't confuse too many people.

it was working perfectly for the first 3 days, then suddenly BAM and it doesn't work, My host is www.ulmb.com. and also when i go to the yshout.php file on my host, there is nothing in it. maybe thats the problem? so could you PM me the code that goes inside it, and ill tell you if it works.

EDIT, what directory is the default for it to be stored in, because its not in my "packages" folder. its in the root folder

EDIT, i just noticed that when i modified my other themes to load the shout box, guests dont view it. am i missing a code for a guest to use the shoutbox?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 21, 2007, 12:02:50 AM
@brianjw: I have never encountered this option in the docs. Where did you find such a gem?
@Iamok: There are a hundred and one causes for this, though most are pretty easy to fix. Have you visited http://domain.com/board/url/yshout/yshout.php directly? It should say "Nothing to do", or possibly blank (blank --> language files not installed)
@th2mods: If it's blank, usually that means the language modifications aren't installed. The usual symptoms of this are a lack of admin links and a blank submit button -- did you see that before the shoutbox died?
If you check your webserver error logs, I'm fairly sure something interesting will crop up.
Point by point:
QuoteMy host is www.ulmb.com. and also when i go to the yshout.php file on my host, there is nothing in it. maybe thats the problem?
Do you mean by going to it using your browser (http://domain.com/path/to/forum/yshout/yshout.php) and seeing blank (in which case the above comment on the language files holds), or that the file on FTP is blank (in which case something is very wrong)?
Quotemaybe thats the problem? so could you PM me the code that goes inside it, and ill tell you if it works.
There's a lot of code, so simply see the file yshout/yshout.php inside the mod .tar.gz file (if you have an archiver capable of opening it)
QuoteEDIT, what directory is the default for it to be stored in, because its not in my "packages" folder. its in the root folder
The entire mod, except for the SMF-side code, is housed in /<forum>/yshout. The PHP script lives in yshout/yshout.php, the JS is in yshout/js/. So, if it's in the forum root, that's normal.
QuoteEDIT, i just noticed that when i modified my other themes to load the shout box, guests dont view it. am i missing a code for a guest to use the shoutbox?
Yes, you'll have to insert the <div id="yshout"> piece of code twice if you placed it in a members-only part (once for members-only, once for guests). This varies a lot depending on theme; some themes have a nice spot to place it where both members & guests see it, others are very similar to the default theme and hence have two spots (in the header), etc.
Title: Re: nneonneo's Shoutbox
Post by: th2mods on July 21, 2007, 12:54:38 AM
http://domain.com/board/url/yshout/yshout.php  loads fine for me. im willing to give you my admin info to figure out this error. would you mind? pm me for further info

site is, http://cafe.ulmb.com just so you can see it in person
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 21, 2007, 09:52:51 AM
Quote from: nneonneo on July 21, 2007, 12:02:50 AM
@brianjw: I have never encountered this option in the docs. Where did you find such a gem?
I found it in another mod install file. It does work, you might try it. ;)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 21, 2007, 01:59:34 PM
@th2mods: When I load up yshout/yshout.php, I get the download request

Download yshout.php
Your request to download yshout.php is being processed.

Please Wait... (25 seconds remaining)



...that's so broken...
It seems that ULMB has detected yshout.php as a "downloadable file" and is forcing the countdown upon it (which honestly doesn't make sense, because it is a PHP script). Could be a permissions thing, I suppose.

@brianjw: I will add it to 1.07 and upload it. Thanks so much!
Title: Re: nneonneo's Shoutbox
Post by: th2mods on July 21, 2007, 03:59:43 PM
could i change the permissions for that file trough FTP, and maybe that will work??

EDIt... i think i found my problem...... http://forum.unlimitedmb.com/showthread.php?t=1690


can i bypass that in anyway?
Title: Re: nneonneo's Shoutbox
Post by: glxpa on July 21, 2007, 04:30:06 PM
Has anyone thought about a "popup" function for nneonneo's shoutbox?

I love it thus far, but my users are asking for the popup functionality a la Xoop's (crappy) shoutbox.

I gave it a shot by creating a php article and popping that up (in TinyPortal) but that didn't work.
Title: Re: nneonneo's Shoutbox
Post by: th2mods on July 21, 2007, 05:48:38 PM
is there anyway that i can upload the yshout files to another host then my member can access the shoutbox there? i tried but it doesn't work, is it tied with SMF?
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 21, 2007, 05:58:23 PM
Quote from: nneonneo on July 21, 2007, 01:59:34 PM
@brianjw: I will add it to 1.07 and upload it. Thanks so much!
Have you tested it? :) You're welcome. ;)
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 21, 2007, 08:35:38 PM
@brianjw: Yes, I just tested it on guinea and it seemed to like that.
@th2mods: Well, that really sucks...I suppose there would be a way to have manual refresh (actually, it would be pretty easy; remove the automatic timer in the JS and add a little link into the form which says "refresh"...
And yes, the functions are tied into SMF (e.g. administrative privs, BBCode parsing, usernames, profile links, etc.). If you want a shoutbox like it, I suppose you could go for the original yshout (http://yurivish.com/yshout), which, since the initial v1 (which I use) has undergone a lot of changes.
@glxpa: What kind of "popup" functionality are we talking about? I'm assuming you mean a separate window for yshout, which is in fact entirely possible. It consists of taking the code you would usually put in index.template.php and placing that in an HTML file instead, then adding a popup-link to your forum (as for functionality like Google's "Pop out", I think that would be a bit more difficult, but probably still doable).
Title: Re: nneonneo's Shoutbox
Post by: cru on July 21, 2007, 10:39:31 PM
hi! i installed it in the default 1.1.3 theme! this is so cool! I ignored the

"  ./Themes/default/languages/Modifications.english-utf8.php     File not found"

... and my shoutbox works good. i have some questions..

1. i would like to remove the "History" and "Commands" clickable texts above the shoutbox. h0w do i do it?

Title: Re: nneonneo's Shoutbox
Post by: Ryan on July 22, 2007, 11:18:31 AM
File attachmentment problem since installing Shoutbox.Ive installed this shoutbox on my forum since ive installed it when users that browse forum with Firefox and attach 2 small files to there post, after the post is submitted only 1 file is attached instead of what should have been 2 files attached...This is bizzare as it doesnt do it in Internet Explorer, IE attaches them fine.The reason i post this here is becuase when i uninstalled shoutbox the attachments were working fine in firefox.This leads me to thinking somthing added tot he index.template.php by shoutbox causes confliction with the multiple file upload javascript in the post box.Can anyone test this on there forum whosh running this shoutbox.. Remember use Firefox. 
Title: Re: nneonneo's Shoutbox
Post by: glxpa on July 22, 2007, 02:33:00 PM
Quote from: nneonneo on July 21, 2007, 08:35:38 PM
@glxpa: What kind of "popup" functionality are we talking about? I'm assuming you mean a separate window for yshout, which is in fact entirely possible. It consists of taking the code you would usually put in index.template.php and placing that in an HTML file instead, then adding a popup-link to your forum (as for functionality like Google's "Pop out", I think that would be a bit more difficult, but probably still doable).

Gave it a shot..

http://www.wiredjc.com/yshout/test.php

two issues - one is, if you do it as a "pop a new window" type link, you get

Shout Box


Shoutbox loaded in another window. Retrying...

which is understandable - but is there any way to disable that check (and have two going concurrently) or make the "new" one take over?

Second, when I try to shout from that popped page, I get an "Error on Page" error that says:

Line: 112
Char: 2
Error: Object Expected
Code: 0
URL: http://www.wiredjc.com/yshout/test.php

I put a copy of the php file I created to do the popup at http://www.wiredjc.com/yshout/test.php.src

Thanks for any help!
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 22, 2007, 02:55:44 PM
@cru: In yshout/yshout.php: find the line
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&amp;history\')">',$txt['yshout_history'],'</a>&nbsp;<a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
(about line 313). Remove or comment out this line (by adding "//" without quotes to the beginning) and the History and Commands links will not show up.
@M3THOD: I have not encountered this problem. On my forums, it works fine (I attached two images to the post, on the default theme where the shoutbox is installed, and the resulting page had both, and I am using FF 2.0.0.5.) I do not change post code at all, only adding a few JS includes and some inline CSS.
@glxpa: To disable the check, see yshout/js/yshout.js: in loadChat, there's a block of code starting with "if(get_cookie"; remove that block of code and also remove the set_cookie line.
As for the other problem, add the script "Themes/default/script.js" to the includes list, and it will work (this error is triggered by the missing "textToEntities" function defined in that script):
<script src="',$boardurl,'/Themes/default/script.js" type="text/javascript"></script>
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 22, 2007, 06:24:11 PM
[announce] 1.08 has been released, and it is a recommended upgrade for any users on large boards. (@th2mods: you _may_ be able to convince ulmb to accept this script now; see below)

There are a few minor bugfixes, but the major change is the way the shoutbox performs updates (and I owe all credit to Sarke, as he details here: http://www.simplemachines.org/community/index.php?topic=137508.msg996154;topicseen#msg996154). Instead of querying the server every 1.5 sec for data, the client now opens a connection, which the server holds open until new shouts arrive. This system should drastically reduce the CPU load of the shoutbox on your server, and should allow it to be run reliably without a PHP accelerator.

The controlling option for this "push" feature is $updateTimeout in yshout/yshout.php. Do NOT increase this past the maximum script execution time; if you don't know what this is, leaving it at 20 is probably safe. The default setting means that instead of a query every 1.5 seconds, even with no changes, yshout.php will now be queried only once every 20 seconds, which should be more than enough for most people.

Enjoy! As always, report bugs and I will do my best to eliminate them.

EDIT: I should, however, note a caveat: this feature will cause several server processes to be kept alive for up to 20 seconds (if there are 10 shoutboxes open, then 10 server processes will be opened). Some hosts may not like this, but, to be honest, it is a lot less stressful on servers than 10 requests every second ;)
Title: Re: nneonneo's Shoutbox
Post by: cru on July 22, 2007, 07:14:16 PM
i installed 1.08 today, and it worked well

i have a question: i would like to put it just above the footer, not in the default position. could that be possible?

im not good in coding... TIA
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 23, 2007, 05:20:20 PM
It's entirely possible.

There are four "blocks" of code which are inserted into index.template.php. They start with "// YSHOUT HERE" and end with "// YSHOUT END".

The first one is quite long: it is the JS+CSS block. Leave that one alone.
The second is the JS collapse code; remove it.
The third and fourth should be identical; remove them both.

Now, on the main mod page, I list a piece of code that needs to be placed at the desired location. I'm not too sure what you mean by footer (i.e. by the board stats, by the Powered by logos or elsewhere?) so you might have to experiment a bit.
The code you'll need to insert is
// 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
Title: Re: nneonneo's Shoutbox
Post by: Spike Saunders on July 23, 2007, 07:03:47 PM
Not sure what happened. I upgraded to 1.08, but got error sayin the shoutbox was open in another window. Error wouldn't go away to i uninstalled 1.08 and reinstalled 1.07. I still get that error. And in no way is my shoutbox open in another window! lol just using Firefox, nothing else opened.

Any idea what's up? It almost sounds like since it's being kept allive, it thinks the box is still open even after uninstalling?
Title: Re: nneonneo's Shoutbox
Post by: husmen73 (Gulhin) on July 24, 2007, 05:58:16 PM
~nneonneo

I have installed your modification, its working on default theme, but I didnt work on another theme. I added some codes from default/index.template.php to mytheme/index.template.php about Ajax Chat

Only seems,
Quote
Shout Box

...loading shoutbox...
Title: Re: nneonneo's Shoutbox
Post by: brianjw on July 24, 2007, 06:07:10 PM
husmen73: Did you use the custom theme instructions on the modsite page for this? I will post them here for you....


Find:

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';

Add After:

// YSHOUT HERE
global $boardurl;
echo '
<script src="',$boardurl,'/yshout/js/prototype.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/behaviour.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
',empty($options['collapse_header']) ? 'loadChat();':'','
}, { "yshout":"id"});
var board_url = "', $boardurl, '";

</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar42007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END

Find The Desired Location of Shoutbox and place:

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


And sometimes custom themes include there own modifications.english.php (if your theme doesn't have this then don't follow this step.
Add before ?>

// ---- Begin modification - nneonneo's Shoutbox ----
$txt['yshout_shoutbox'] = 'Shout Box';
$txt['yshout_loading'] = '...loading shoutbox...';
$txt['yshout_rp_banned'] = "Sorry, you've been banned from the shoutbox.";
$txt['yshout_no_guests'] = 'Sorry, you must be logged in to use the shoutbox!';
$txt['yshout_ban_conf'] = 'Ban Confirmation';
$txt['yshout_select_mode'] = 'Select Ban Mode:';
$txt['yshout_rp'] = 'Reading and Posting';
$txt['yshout_p'] = 'Posting only';
$txt['yshout_error'] = 'ERROR: ';
$txt['yshout_no_user'] = 'User not found.';
$txt['yshout_del_success'] = 'Shout deleted.';
$txt['yshout_no_action'] = 'Nothing to do.';
$txt['yshout_history'] = 'History';
$txt['yshout_commands'] = 'Commands';
$txt['yshout_exthistory'] = 'ExtendedHistory';
$txt['yshout_hide'] = 'Hide';
$txt['yshout_show'] = 'Show';
$txt['yshout_admlinks'] = 'AdminLinks';
$txt['yshout_return'] = 'ReturnToShoutbox';
$txt['yshout_p_banned'] = 'You are banned from posting.';
$txt['yshout_banned'] = 'Banned';
$txt['yshout_shout_button'] = 'Shout!';
$txt['yshout_banlist_caption'] = 'Shout Box Bans (click to unban)';
$txt['yshout_ip_bans'] = 'IP Bans for ';
$txt['yshout_username_bans'] = 'Username Bans for ';
$txt['yshout_ban_type_error'] = 'use /banuser or /banip!';
$txt['yshout_ban_mode_error'] = 'Must have mode argument.';
$txt['yshout_imp_slash_error'] = 'Prefix shout with "/" (slash character)! See "/help impersonate" for details.';
$txt['yshout_imp_uname_error'] = 'No username given!';
$txt['yshout_imp_max4_error'] = 'Maximum 4 arguments!';
$txt['yshout_cmd_reference'] = 'Command Reference';
$txt['yshout_cmdlist'] = array( '/help'    => ' [command]: Help on a command, or all if no command is specified.',
'/return' =>    ': Go back to the Shout Box.',
'/pi' =>    ' [digits]: What is the value of pi to the nth digit?',
'/me' =>    ' &lt;message&gt;: Emotes the message (e.g. <font color="red"> * Nathaniel likes dogs</font>)');
$txt['yshout_cmdlistadmin'] = array('/clear' =>   ': Completely empty the Shout Box.',
'/help'    => ' [command]: Help on a command, or all if no command is specified.',
'/return' =>    ': Go back to the Shout Box.',
'/banlist'   => ': List all bans currently in place. Unban the users by clicking on their names.',
'/banuser'   => ' &lt;mode&gt; &lt;username&gt;: Ban a user by name. You should use the user\'s real username, otherwise the ban can be evaded. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/banip' =>   ' &lt;mode&gt; &lt;IP&gt;: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate'=>' &lt;user&gt; [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
&lt;user&gt;: Username to use<br />
[userlevel]: User Level to use. 0=normal, 1=mod, 2=admin<br />
[ip]: IP address to use, as 1.2.3.4<br />
[userid]: User ID from forum, to fix profile link</blockquote>');

// ---- End modification - nneonneo's Shoutbox ----


Brianjw :)
Title: Re: nneonneo's Shoutbox
Post by: bobbbb on July 24, 2007, 10:49:49 PM
1.08 works well so far
Title: Re: nneonneo's Shoutbox
Post by: Spike Saunders on July 25, 2007, 02:27:26 AM
Guess I am the only one that is having issues with 1.08, lol.
Title: Re: nneonneo's Shoutbox
Post by: husmen73 (Gulhin) on July 25, 2007, 04:57:10 AM
~brianjw

I know manuel setup but I dont understand why it isnt working :S

You can look on attachment.

[if I upload default/index.template.php, its working]
Title: Re: nneonneo's Shoutbox
Post by: comptech on July 25, 2007, 12:33:32 PM
"Test Failed" on index.template.php when trying to apply this mod (v1.08) to SMF v1.1.3 on default theme.

Any idea why this is so?

to nneonneo:
I have emailed you my index.template.php file.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 25, 2007, 11:34:22 PM
@Spike: Very odd, considering that 1.08 has the code for duplication checking disabled by default, so this shouldn't happen at all, *unless* there is a very aggressive caching system on your server or client (which is caching the 1.07 Javascript).

I would try clearing the browser cache and see if that helps. I have also seen problems where intermediate proxy servers would cache the data, even if it was out of date, so try that as a "last resort".

Finally, the cookie "yshout_open" controls that duplication check; removing it may help.

@bobbbb: Good to hear :)

@husmen73: It may be a caching problem; change Mar42007 to Jun222007 and see if that works. I've also updated the instructions to reflect that change.

@ruelnov: Resend it as an attachment (it was truncated for some reason)
Title: Re: nneonneo's Shoutbox
Post by: Spike Saunders on July 26, 2007, 02:10:52 AM
Thank nneon, I've already decided to uninstall the mod manually as a whole. And then reinstall 1.07 and try the upgrade again afterwards. :) Haven't got around to taking the code out yet, just the template stuff so it quit showing on the board lol.
Title: Re: nneonneo's Shoutbox
Post by: cru on July 26, 2007, 05:11:30 AM
hi, i just installed 1.08. on the default theme of smf1.1.3. i have no other mod aside from pretty url.

but what i see on my shoutbox is

...loading shoutbox...

pls help me.
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 26, 2007, 11:14:58 AM
@Spike: there is no upgrade... 1.08 must be installed over SMF without 1.07. However, the linking code for 1.07 works for 1.08 (though browser caches should be cleared), with the minor change that "Mar42007" should be changed to "Jul222007" to force a cache update.

@cru: No idea -- have you checked server error logs?
Title: Re: nneonneo's Shoutbox
Post by: comptech on July 26, 2007, 12:21:10 PM
nneonneo:

resent as an attachment already.

hoping to get your reply then.

Thanks.
Title: Re: nneonneo's Shoutbox
Post by: Spike Saunders on July 26, 2007, 04:08:02 PM
Yeah I had to do a complete uninstall. Then installed 1.08. SEems to be all working now.

Any luck with adding an anonymous function?
Or scroll bars for the main chat window?

My users would like to be able to scroll the chat instead of checkin the history, since it's used so often. Heh. Maybe ability to scroll back the last 50 or so entries? The rest just have to go check the history?
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 26, 2007, 04:53:24 PM
For scroll bars, here's what you would do: Change the CSS in index.template.php.
Specifically, change #yshout {
overflow: hidden;
}

to
#yshout {
height: 200px;
}


This *should* force the height to be constant, while permitting scroll bars to appear. Then, just change max_lines in yshout.php.
This is entirely untested, and I don't know how usable it would be.

As for an anonymous function: I just realized the easiest way to do this would *probably* be to implement it as a command, so, for example, to be anonymous, the user would enter "/anon <message>". This can be implemented quite easily; just let me know if this is desirable.
Title: Re: nneonneo's Shoutbox
Post by: Spike Saunders on July 26, 2007, 07:29:07 PM
I tried the css you mentioned. Found that didn't do anything. But if you change overflow: hidden to overflow: scroll, the scrollbars appear. And if you add in the height as well, it works nicely. But... the problem is it makes the whole area scroll, and the chat entry box shouldn't, that should stay put. lol i might have to tinker with that.

As for the anonymous function, that would work well. Any way to make it so if you clicked a checkmark box next to the shout button, it would automatically add the /anon into the field, and then people just have to write after that? :)

Edit: Also, I don't know why, but permission is denied when trying to do anything inside the yshout folder, lol. I can't delete the files, edit them, or even replace them. The chmod's 755, which should still give that ability. So not sure why that's the only folder like that lol.
Title: Re: nneonneo's Shoutbox
Post by: jossanaijr on July 26, 2007, 08:49:08 PM
Hi,
just installed on 1.1.3 but I did not understand if I can limit shoutbox only to registered users.
Title: Re: nneonneo's Shoutbox
Post by: Zenboy on July 26, 2007, 09:10:53 PM
Cru:

I had the same issue on my live forum after bumping up to 1.0.8. So, I installed a brand new instance of SMF 1.1.3 in a new directory to try and figure out what was going on. This was the situation:

Brand new instance of SMF 1.1.3 (no mods)
Brand new install of nneonne's shoutbox 1.08
Installation via package manager (proper chmods in place)
Installer said it was successful, but all I saw was ....loading shoutbox...

I investigated the mod.english & englishUTF8 as well as the index.template. All looked well, but it just wasn't working. I removed the mod, which was successful. I know this because I went back through the previously mentioned files to make sure the entries had been removed.

I had at it one more time, this time using 1.07... NO LUCK. I used the same checks and balances to make sure the install had actually worked. It had, all entries were correct. I un-installed, and double checked the files to make sure 1.0.7 had been removed.

Now I moved onto a manual install. I ran 1.08 through the package parser to gain the instruction set. I followed the edits to the "T". As well, I created the "Yshout" directory myself and its subdirectories as well. I then individually uploaded each directories contents.

Bingo! The shoutbox was working. But why didn't this work for the package installer. I was still curious...
I removed the successful install and tried to use the package manager again. Interestingly enough, even though the chmod levels were correct, the yshout directories files were not being populated with the code that runs the program. Those files in the directory were completely empty...

I had to resolve that my server and the package installer are not happy with each other...

At the end of the day, I'm thinking this might help you as well... Do the install by hand, even creating the directory structure and populating those directories with the appropriate files.

Now if I could just figure out why it refreshes fine in Mozilla, but not at all in IE. All of my IE users have to manually refresh the shoutbox by entering a character. Again, Mozilla is fine, although the entire shoutbox window collapses in between new shouts...I wish it just stayed open.

FYI... I run SB 1.0.8 with Tinyportal... It's in a center block, which I really like...looks great. Thanks for the TP instructions and the excellent SB nneonne.

Best Regards,

Zenboy
Title: Re: nneonneo's Shoutbox
Post by: nneonneo on July 26, 2007, 09:30:48 PM
@Spike:
The folder might be 755, but are the files 755 as well?

I suppose, to make just the shouts work, you could try using
#yshout #shouts
instead of just #yshout (all shouts are contained in #shouts div)

For anonymous function, in processUserCommand, add the following code before "default:" (around line 550):
case "/anon":
$fakeuser=array('id'=>0,'name'=>"Anonymous",'is_admin'=>0,'is_mod'=>0,'is_logged'=>0); // fake SMF $user array
writeLine($chatFile, $logDir, $args, $fakeuser);
truncateChat($chatFile, $logDir, $max_lines);
echo readChat($chatFile, $logDir);
return true;

Then, after
<input id="shout-button" type="button" value="',$txt['yshout_shout_button'],'" />
add
<input id="anon-button" type="button" value="Shout Anonymously" onClick="$(\'shout-text\').value=\'/anon \'+$(\'shout-text\').value;doSend();" />

It's not a checkbox (it's a button), but hopefully that fulfills your need. You'll want to style the anon-button ID (#anon-button), if you've made modifications to the CSS for shout-button.

@jossanaijr: In yshout/yshout.php, change $allowGuests to false.

@Zenboy: Wow, that sounds very strange. I have tested the mod on IE (Windows; 6 and 7), Firefox (2, Mac and Windows), Safari (2 and 3, Mac), Opera (9, Mac) and it works fine on all four browsers (it autorefreshes, does not collapse between shouts, etc.). So, I do not know what is going on on your end -- some kind of server misconfiguration maybe?
Knowing what host you are on would be useful. The fourm root folder must be chmod 755 *if* it's owned by the web user, otherwise, try 777 (security hazard, yes, but if the folder isn't owned by the web user, then permissions will be wrong). I also suspect that doing the install half-manually: e.g. unpacking yshout manually, but using Package Manager to perform the theme modifications, should work.

I would like to help you resolve these issues; give me a URL and I'll hop over with Firebug :)

Oh, finally, I'd like to note that in a very early revision (never released to public) of this shoutbox, I had a problem where Opera would collapse b