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)
- Türkçe (Turkish) translation, provided by o2gr of http://www.ozgur.be/
- Ελληνικά (Greek) translation, from petr00kos of http://www.oink.gr/
- Português (Portuguese) translation from 4T3IG0
- Italiano (Italian) translation from Mystiquo
- Français (French) translation from Patriiick
- Hrvatski (Croatian) translation from ameo
1.20+ translations (also work for 1.16 and below)
- Polski (Polish) translation by Kangel
- Русский (Russian) translation by EugeneLoza
- Deutsch (German) translation by womble
- Български (Bulgarian) translation by amorphine
- Italiano (Italian) translation from leonardus
- Hrvatski (Croatian) translation from ameo
- Македонски (Macedonian) translation from Picobrain
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:
- $shoutFile can be edited to allow different themes to use different shout files
- CSS block in the <head> section (search for #yshout) allows customizable appearance
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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote><div>
<user>: 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' => ' <message>: 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.
Do you have a demo of this mod? :)
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
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
Ditto.
This will only work on PHP 5.1.0 or higher, as it's using date_default_timezone_set (A PHP 5 function) :(
Can the date part be edited to work for 4.4.4 ???
Could have said, really.
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 :)
installed and uninstalled for me just fine
but the position of the shoutbox is a bit awkward in my opinion
screenshots?
I have the same problem also
if ur host isnt offering the latest software then its time to say ba-bye to them
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!
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!
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)
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.
file SB_1.03.tgz (30KB) failed... it's no go decompress?
I used WinRAR :(
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.
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
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 ;)
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?
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
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.
yup u can use it inside TP as well
and I dont believe it will work with php 4 as mentioned earlier
the "loading shoutbox" is all I see on your site aku...
oh yes sorry I forgot to add something lol
just a min
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
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
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
Hmmm. I'm getting "Shoutbox is loading in another window. Retrying..." and it just sits there.
Shame...
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.
hey i wanted to ask can moderators have control over shoutbox functions as well?
also can I restrict it by membergroup basis?
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
thanks - this is a great shout box
thanks u very much for this wonderful contribution :D
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
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?)
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
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.
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
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).
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
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
What about smilies? It would be very nice if some basic smilies exist.
and how can i make it appear on board index page ?
thanks
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
Fatal error: main() [function.require]: Failed opening required '/members/forum/yshout/../SSI.php' (include_path='.:') in /members/forum/yshout/yshout.php on line 4
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?
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).
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
I can't get it to work on any browser...need help!!!
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
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... :(
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.
how do you make this appear on other themes?
http://www.simplemachines.org/community/index.php?topic=137508.msg878923#msg878923
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
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?
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
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 ]
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
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?
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!!!!
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.
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
I'm getting something strange now... it constantly says "sorry, you must be logged in to post" - even though i'm logged in ?!?
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.
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.
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
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
I was also wondering if it's possible to only have the Shoutbox appear when you're viewing a certain forum.
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.
How do I change the Timestamp (German time)?
the rest works awesome great work?
I am working on an update; I will release an update soon which will use forum settings for time.
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!)
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! :)
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]
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
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 ;)
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.
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
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)
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)
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"?
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
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.
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
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
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
eid mubarak aku! :)
hhmmmmm this shoutbox will take the features like D21 of IPB?
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?
forget it... it was the ajax shoutbox of IPB :)
I am happy that this shoubox came into life!
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".
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?
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
many thanks to you, nneonneo !!
great works .. i like it :D
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.
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. :)
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...
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?
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
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!
iTS GREAT THANK U >:(
Version 1.05 works very well! Many thanks nneonneo, my members will be very happy. :-)
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.
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. ;)
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!
It SHOULD work with php4 :)
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.
1,05 is available for download?
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.
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
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
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 !!
How do we set guests to view shoutbox? Thanks.
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 :)
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]
which version are u using jodi?
1.05 ?
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:
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
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
Is there no way to set guest viewing? Thanks.
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.
This mod really slowed my forum down, to the point it where it was unusable. Sorry dude.
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
Wooooo, this mod slowed my forum down too! And with 1 or 2 users online! :(
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
everything runs fine for me with no problems or slowing down.
I think u guys need to poke ur host for some answers
my apache uses 60%-100%cpu with this mod installed. that's why my forum is very slow :(.
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.
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
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.
by default its horizontal
in the demo i put its modified to be a vertical one
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
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
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?
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
@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.
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.
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
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
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).
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 :(
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! :)
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.
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
why this mod show the members ip?
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
@brianjw: Delete link already in 0.5
@bigmohi: Fixed in 0.5 (IP visible only to admins now)
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.
how i can added this shoutbox in Dilber Multicolor theme?
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: 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
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
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.
:(
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.
@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.
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. :)
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.
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 :(
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?????
@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.
Hi, I've instaled and it works fine on default theme, but how can I get it to work on Babylon theme?
Cheers
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... ::)
@ 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
Wahey, that worked, the instructions in the mod tell you to add the code before not after.
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.
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?
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 :)
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.
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
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 ;)
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.
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
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 ;)
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.
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.
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.
I am from the us and would like the time zone to say US Eastern.
How is this done and in which file?
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 :(
I appreciate the hard work you put into developing these mods, but I've installed tiny portal now which has a shoutbox built in.
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
Modification says "...Loading Shoutbox..." but never loads, had to un-install.
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
Where's tiny portal download able for SMF? Doubtful the shoutbox is global though
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
@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.
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.))
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.
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'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $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> | <a href="http://www.php.net/" target="_blank" style="font-size:10px;">PHP</a> | <a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a> | <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> | <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 ' » ';
}
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" /> ';
}
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" /> ';
}
else
{
echo '» ';
}
// 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" /> ';
echo '<b><a class="nav-tree" href="http://www.webtechnica.com/">WebTechnica</a></b> » ';
// 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" /> ';
// 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 ' » ';
}
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;" />
<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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td height="40" valign="middle" class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
Can anyone help me? thx.
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
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 ;)
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
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 :-[
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
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.
I am liking this lite shout box and my members are liking it..
but how do i get rid of .... all history
thanks much..
Permanently, or temporarily? Temporarily, deleting yshout/chats/history.home.txt will do the trick.
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
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
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. :)
I love this mod...but...im getting an error when trying to install it. An error for the index.template.
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.
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?
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.
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..."
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...
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
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
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.
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.
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
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
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
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.
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
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
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?
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.
This mod doesnt work for me
i install it but see no shoutbox
=[
@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. 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.
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?
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
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
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
still cant get it, and also future suggestion have it so it updates without having to refresh the page
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
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?
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)
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.
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
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
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 ;)
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
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?
?
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?
@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
#yshout span {
color: #141414;
}
and the font size in
<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!)
nneonneo is it possible to show the latest shouts on the TOP instead of on the bottom??
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 ....
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
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
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
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 :)
I even pushed it into an array, then added a new array reverse function, it must be in the jscript somewhere ...
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 :(
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
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?
2 Daggers: Dude that's it !!! you have save the day :) If you ever come to zagreb/croatia send me pm/mail
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 :)
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
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
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.
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 :'(
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!
@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.
THANK YOU NNEONNEO!
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! :(
How can i put this mod at the bottom of the forum?
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? ???
Thanks Brian,
I'm sure that I'll resist the temptation to abuse the account! ::)
Do you have your shoutbox within TP or similar?
@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...
is it possible to handle hungarian utf-8 characters, like őúűí ?
thx, blez
Shoutbox should already use utf-8 encoding by default.
One of my user looks like this (attachment), but his basically called Töki. What cause this prob? Can u help me?
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.
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
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
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?
Any chance to put this shoutbox at the bottom of the page? and how can I limit de numbers of shout (lines)?
Thanks.
Read through the posts matey, both of your questions have already been answered ;) :D
There's only 19 pages ;D :D
@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.
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...
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
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
censored words of forum are not working in shout. How can they be censored?
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?
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 ;)
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
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.
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
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...)
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 :)
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
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 ;)
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,
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 " ".
If somebody got a solution...
Thank for this mod in any case !
i tried many times to fix that..but nothing result.. :(
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...
@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.
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,
Just an info :
The problems with the "à" caracter is on writing in "home.txt", it appaers like "Ã ". 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...
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?
i used an index.template that was posted a few pages back and it worked. Now i have to analyze it to understand it ;)
is it possible to add a scroll bar to your shoutbox?
it'd be alot better
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
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
I like the idea of the scrollbars. Anyway to display the entire shoutbox history inside and make it scroll? ???
Brianjw
How can i put emoticons in this shoutbox? is this possible?
Thank you.
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 ;)
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?
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...
Hey, can you please update the mod, so we can install it on 1.1.2?
This will work in 1.1.2 but you have to add it manually :o ;)
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
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
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... >.<
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.
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. ;)
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
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
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
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..
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 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
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:
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.
I'd suggset disabling updates, and let refreshes take place with new clicks. Grudge's shoutbox suffered from the same problem.
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.
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.
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.msg936897#msg936897
Bumping my question... pls answer quickly :(
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
How to Display the Moderators Color in Shoutbox...
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...
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.
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
Thanks and is there a way to have this only show up on the Board Index?
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
?! There's an SMF 1.12?
I'll get on updating the SB for 1.12.
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
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
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)
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.
hello i'm have made these changes to other template and it says loading shoutbox all the time,help?
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.
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
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?
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
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
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?
Next Version Tips (1 included)
- The mod modifies the SSI.php and adds a code SSI_shoutbox and that could be entered on another page including the codes needed like <?php require_once etc
Brianjw
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 ;)
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 ?
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
if you just want to clear the history, just type /clear
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 ?
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.
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 :-\
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.
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.
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
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
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?!
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 :)
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.
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
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".
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
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.
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
the install button does not appear in my acp! can I install it manually?
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 :)
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)
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
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.
Sounds good to me 8)
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...
7) fixed search-engine-friendly links stuff.
I will iron out a few last minute bugs, then post this thing.
Updated to 1.06.
You da man nneonneo!
Thanks.
ProtoType
gj...:)
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)
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.
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?
@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.
how do i enable scrolling on the shoutbox, i cant get it to work
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
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 ;)
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.
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?
@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]
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.
How to Display the Moderators Colors in Shoutbox..
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.
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?
@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...
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.
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.
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
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.
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.
Hi
i just installed SB 106 ..where can i disable guest from reading or typing in the shoutbox?
Thanks much.
Rg
@DJ: in yshout/yshout.php, change allowGuests to false.
It should read
$allowGuests=false;
thanks nneonneo ..that seemed to do it ..do you have any other addons for smf ..you do great work..
:D
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!
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.
Yes I know, I meant if I wanted to have 2 (or more) different windows running the same shoutbox. How would I fix that.
sorry cant help ya there ..nneonneo or someone could tho..
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.)
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!)
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
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.)
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?
Hello i am french.
When i want post a text i read this message Write error (writeLine); aborted
Can you help me plz?
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
JSizzal, the answer is already in this thread, just take a minute to read it.
Can you help me plz?
This is an absolutely amazing shoutbox, thank you sir!
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
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)
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.
thanks how move the file home.txt in root?
Is it possible to install this shoutbox in free.fr ?
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 :(
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
- The only part that shows up in my shoutbox are the words "Shout Box"
- I'm running SMF wrapped in the Jommla! CMS
- SEO is enabled in Joomla! but not in SMF
- The site address is www.ohnd.net/home/forums
- It is a sub domain
- The "go to http://<your_forum>/yshout/yshout.php" test produces no error, but no text either, just a blank white page
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.
@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.
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 :))
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!
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
@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.
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.
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?
Thanks Nneon! Your new update yesterday fixed all my problems. My members love it. Thanks!
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.
@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?
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.
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.
LOL 29 pages later and no one has noticed this? Can you help me with my other problems :( AWWW CRAP abandoned again...
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
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
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.
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?
No one can get this to work either man.
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?
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
@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.
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
thanks much!
@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.
Maybe Joris, you should do a new install because it works for all these other people ;)
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?
SecondI 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?
LastlyThanks 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.
How can I limit size of history? Can I set somewhere size in kB or how far back in days? tnx
@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.
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.
?? :-\ ??
So I can't make it so only admins and mods can use the IMG tag?
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 "<img", and all <img text is successfully parsed out.
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?
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? ???
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.
@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 :)
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 ;)
@nneonneo: Thanks :) It's a little confusing, maybe ill do it tomorrow
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?
@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 ;)
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<
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!!
@barinov: This has been discussed somewhere in this topic ;)
@nneonneo: have you seen my post before?
I found that fixed index.template..does anyone still have it?
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.
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
@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)
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?
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
@nneonneo: /me has pmd you.
@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?
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!
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
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
@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.
Thank for the update Nneonneo, it's work perfectly now :)
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
;)
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)?
@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.
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...
- Shoutbox Admin section - To allow certain features or disable certain features.
- History Removal Date - You set how many days for the history to stay and then it will automatically remove, or placed in some kindof shoutbox archive section that admins can only view and they can choose to allow members to see archive as well.
- Disable - Allow the shoutbox to be disabled if activated (in file or admin section) and display a custom message that works just like maintenance mode. ;)
- Built In Whos Online - Where the history and commands links are you can put a link that says, "Online". It could display who was online and what they were doing.
----Also in the existing whos online and maybe the built in one [if there is one], if someone is typing in the shoutbox...On that user it would say "Typing in shoutbox" ;)
Let me know if these are good ideas because:/me wants to know if they're good or not and if there is one of these that will be used in a future version. :)
Brianjw
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.
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
I installed it but it doesn't show up anywhere...
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?
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 :)
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
@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.
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 ;)
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!
@brianjw: I'm working on it.
@JSizzal: I'm sorry, I do not understand the question.
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.
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) :)
There are already chat mods there which seem to work just fine -- I'd prefer to keep my mod the way it is :)
I will try this some time this afternoon. Thanks nneonneo :)
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?
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.
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)
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?
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.
@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!")
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 :)
Sorry about that :) lol i just learned its a feature so i been messing with it. *Removed*
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...
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
@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".
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.
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...
Is there anyone who is actually using this mod? It would be nice to see it in action.
http://nneonneo.ath.cx/advforums/guinea_smf/ for a demo (live demo; guest posting)
Thanks again nneonneo ;) [for the 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 :(
Hi thanks for the new installation instructions they work great!! I love this shoutbox :)
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.
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
@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 >.<
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.
IE is a very popular browser but looks can be deceiving >:(
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. :)
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
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!!
@JSizzal: you forgot to chmod the file to 755 (or something like that).
How do I do that!!
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
Alright i did change that, but im still having the same error!!
Try in Admin panel-Packages->Options->Select "All files are writable." and hit Change File Permissions.
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.
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
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???
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.
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
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!!
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,
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.
Well all right, I installed this mod, but it says "...loading shoutbox..." and its all.
Nothing loads.. :-\
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.
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??
same problem as ictus
Shoutbox loaded in another window. Retrying...
with joomla smf bridge
@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".
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
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
Ok thanks, have found out a way to intergrate a smilies button into the shoutbox??
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*
Other than minimizing the header area...is there a way to minimize the shoutbox itself?
@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.
@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
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");
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...?
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.
@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.
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!
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.
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.
@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.
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)
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
Can anyone help me with my problem!!
Hello all!! How about full integration with SMF? (Auto inserting username for registered users) Any ideas?
The username is already automatically inserted for registered users. Any further integration is not a priority for me.
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 ?
nneonneo can u help me with my prob!!
Hmm... my SMF 1.1.1 version and 1.06 not still isert username...
@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).
Ok... How do i fix it
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 ;)
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
@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
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?
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. ;)
@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.
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!
Localhost screenshot
2. Srever screenshot
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.
Wow MAN THANKS A LOT!!!
OMG
IM IN SHOCK
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!!
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
@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)
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?
Anyone having this issue with members being able to see the ip's of other members?
Thanks nneonneo my shoutbox is now reversed TY!
@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?
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
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..
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
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?
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 :(
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
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.
@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 ;)
:( :( How can i admiser my SB..not sowing any links under Admin panel
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.
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() )
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.
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'] : '',
...
OK, thank you for clarifying that. I will remove the duplicated calls in yshout.php.
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 Modification parse error
2. Execute Modification - Modification parse error
3. Extract Tree ./yshout
I am using SB_1.06 .
How to solve the problem please ?
the problem was "safe_mode_on" on my server
@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)?
http://www.simplemachines.org/community/index.php?topic=137508.msg1072825#msg1072825
(hope that answers your question!)
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 :'()
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 ----
.
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.
@infonlinebr: I don't quite understand what you mean, could you elaborate?
How do you let only the username of the currently logged-in user appear in the name field?
@nneonneo: acess www.annbr.com/bforum/ click in "Historico" this page open in new page, it would not have to open under?
@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!)
@nneonneo: more it would have as to open in the small window? I adjusted a "overflow: hidden" to limit a certain height.
Yes, much more; history on my server is several thousand lines, only 200 of which are displayed in the history.
Then as I can make to open under and not in a new window?
Modify the goTo function in yshout/js/yshout.js to your liking.
this is problem
dumb
function goTo(args) {
document.location=yshout_php+'?'+args;
}
to ??
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 ...
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
I just received an email from my ISP that this yshout.php is causing PHP abuse... Anyone an idea what is wrong?
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.
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 ;)
@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!
/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. :)
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?
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
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
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 ;)
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
@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.
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
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?
the folder is called "yshout".
@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
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
@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.
:)
@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.
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
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.
I run both the Shoutbox and the Flashchat integration on one of my sites without any problems :o
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
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
I just visited your website mwmconsulting, and the shoutbox is working great. I even tested it ;)
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
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 :) )
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
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.
:( ???
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?
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.
???
i cant see it working
i installed but it only says loading on my forum
nothing happened
what is this
@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.
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
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?)
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.
;)
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.
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
Wow! I just discovered this problem yesterday and there is already a solution posted by nneonneo! Awesome!
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
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 :)
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?
the only other mod that is installed is a cash shop mod.
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?
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.
Oh I also use the X7 forum chat system.
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.
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.
No problem; glad it works.
--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 ?
@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 ;)
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!
It looks to me like its something with the permissions.
@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?
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?
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.
@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)
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.
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)
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
@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?
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 ?
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!
@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.
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.
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) :)
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. :)
What I would do is uninstall nneonneos shoutbox while you are transfering your server and then when you have completed that install it.
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...)
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.
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.
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)
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
Ask nneonneo.
I though this topic was the place?
It is, you have to wait for nneonneo to answer your question. ;)
i installed it in to smf 1.1.2.
but i cant find shoutbox control panel.
i m using turkish language pack
:(
There is no control panel. Alot of the settings are in /forumroot/yshout/yshout.php :)
Just be careful with them ;)
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.
How to reduce font size at the menu of the box as the picture, thanks.
(http://img214.imageshack.us/img214/3279/psk03fz2.jpg)
@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.
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
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. ;)
No, it's because SMF 1.1.3 was just released. Oh well, I guess this means I'm releasing shoutbox 1.0.7 ;)
Oh ya lol. But I thought this version could handle mods for 1.1.2. :)
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!
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
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?
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 :)
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!
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 ;)
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! :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
@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.
Nice one nneonneo thats worked for me
Many Thanks :D :D :D
Yes, but what refreshTime setting would you recommend for a shared server? The default is just way too much for my site.
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
Will do! Thanks for the info, and again, great shoutbox!
Cool! 8) Gonna install it at night. Let's see if it's good.
Execute Modification ./Themes/default/languages/Modifications.english-utf8.php File not found
Help :)
Can I please get some help? Been waiting a few hours now, should be an easy fix?
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?
no, that's what i want :)
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. ;)
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.
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
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...
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
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.
@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.
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
I couldn't find any problems with it, sorry!
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 >
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)
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
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.
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.
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.
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.
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. :)
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.
So do i move the big code or little. Also how do i get it directly below in index.template
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
@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.
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..
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.
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
Instead of deleting a whole forum. Try backing up files before modifying as smf suggests ;)
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
@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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate'=>' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
<user>: 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?
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
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.
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.
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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate'=>' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
<user>: 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.
@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....
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
:)
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.
OOPS!! Wrong link...
http://www.simplemachines.org/download/?languages;lang=english
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 ....
Hmm, that's quite strange. Try logging out and back in.
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
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
@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...
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.
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.
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!
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. :)
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.
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
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
i just stated in my edit i got that error message to go away.. now i have a new problem like Devilsin gets
Only 11 Messages Displaying in shout box .. How to Increase the Messages.. Like i want to Display 20 messages as Chat Room..
@kichu: Open up the ./yshout/yshout.php file and replace 11 to 20. Should be at the top ;)
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.
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
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
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?
@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.
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
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. ;)
@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!
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?
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.
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?
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. ;)
@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).
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?
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.
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!
@cru: In yshout/yshout.php: find the line
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">',$txt['yshout_history'],'</a> <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>
[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 ;)
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
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
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?
~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...
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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate'=>' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
<user>: 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 :)
1.08 works well so far
Guess I am the only one that is having issues with 1.08, lol.
~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]
"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.
@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)
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.
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.
@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?
nneonneo:
resent as an attachment already.
hoping to get your reply then.
Thanks.
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?
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.
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.
Hi,
just installed on 1.1.3 but I did not understand if I can limit shoutbox only to registered users.
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
@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 between shouts; that was eventually resolved. I never had issues with Firefox though...
Quote@jossanaijr: In yshout/yshout.php, change $allowGuests to false.
Yes... already done. Working perfectly. Newbie... Thanks.
I have been trying to get this thing to work all night but it seems I'm a idiot.
SMF is 1.1.3 and I'm using Blocs Mesh theme.Doesnt matter because it doesnt work on base theme either.
When I used the Package manager to install this shoutbox it seemed to have went well.
I then added the lines to the Mesh theme refreshed the forum and I got nuttin.
I then looked for the yshout folder on ftp and it wasn't there, this I guess means the install puked or something.
I ftp'd up the Yshout folder and the other files along with it to my forum folder. Still nothing but a text line at top of the forum that says SHOUTBOX.
I'm about to back up 10 feet and punt.
How do I resolve the problem now? What other info do you need?
Here is what is showing on my forum.
If ya ask me that Package mangler is broke, Unless I can install something manually it ends up not working, such as this chatbox.
Are the files available so I can install manually? I much prefer it over the Package Mangler.
@jossanaijr: Good to hear :)
@crucify: Manual install instructions: upload all of yshout/ folder from archive to forum base, so it looks like /path/to/forum/yshout/...
Then, edit Themes/default/languages/Modifications.*.php as detailed on the mod page, and also edit Themes/*/index.template.php as detailed on the mod page (or, as detailed by install.xml).
Make sure the yshout folder has the right permissions -- chmod 755 is the usual value.
The package manager was clearly not able to unpack the yshout folder (for unknown reasons), so that is something that you (rightly) did manually. However, seeing that message even after the files are uploaded makes me suspect that the Javascript is either inaccessible or not linked in index.template.php.
@ Spike Saunders
I'm using:
#yshout {
height: 400px;
overflow-y: scroll;
overflow-x: hidden;
}
It's working fine, although I'd like for the scrollbar to start at the bottom initially.
@bobbbb (and Spike): For code to scroll to the bottom:
This code is adapted from http://radio.javaranch.com/pascarello/2006/08/17/1155837038219.html.
In yshout/js/yshout.js:
add var chatscroll = new Object();
chatscroll.Pane = function(scrollContainerId){
this.bottomThreshold = 20;
this.scrollContainerId = scrollContainerId;
this._lastScrollPosition = 100000000;
}
chatscroll.Pane.prototype.activeScroll = function(){
var _ref = this;
var scrollDiv = document.getElementById(this.scrollContainerId);
var currentHeight = 0;
var _getElementHeight = function(){
var intHt = 0;
if(scrollDiv.style.pixelHeight)intHt = scrollDiv.style.pixelHeight;
else intHt = scrollDiv.offsetHeight;
return parseInt(intHt);
}
var _hasUserScrolled = function(){
if(_ref._lastScrollPosition == scrollDiv.scrollTop || _ref._lastScrollPosition == null){
return false;
}
return true;
}
var _scrollIfInZone = function(){
if( !_hasUserScrolled ||
(currentHeight - scrollDiv.scrollTop - _getElementHeight() <= _ref.bottomThreshold)){
scrollDiv.scrollTop = currentHeight;
_ref._isUserActive = false;
}
}
if (scrollDiv.scrollHeight > 0)currentHeight = scrollDiv.scrollHeight;
else if(scrollDiv.offsetHeight > 0)currentHeight = scrollDiv.offsetHeight;
_scrollIfInZone();
_ref = null;
scrollDiv = null;
}
var divScroll;
somewhere in yshout/js/yshout.js (preferably right above "// Set off the AJAX call to load the chat form into the empty yShout div")
Add
var divScroll = new chatscroll.Pane('shouts');
after
function setupChat() {
Replace
function startRefresh() {
if (!refreshSet) {
setTimeout("doRefresh()", refreshTime);
refreshSet = true;
}
}
function schedRefresh() {
if (refreshSet) {
setTimeout("doRefresh()", refreshTime);
}
}
by
function startRefresh() {
if (!refreshSet) {
refreshSet = true;
schedRefresh();
}
}
function schedRefresh() {
if (refreshSet) {
divScroll.activeScroll();
setTimeout("doRefresh()", refreshTime);
}
}
I finally had the shout box installed thru manual install on SMF 1.1.3 default theme..
But it has no border on all 4 sides, and scroll bar is not visible. It also collapses into zero shouts after some period of inactivity.
Kindly let me know what border options to place under:
#yshout fieldset {
border: none;
And how to make the scroll bar visible, and how to toggle the auto-collpase.
Well Imade those modifications... but can't upload em lol.
I'm not sure why, but like I said the yshouts folders chmod'd 755, but I can't change it to 777, or anything inside it (files are 666). All I get is access denied errors, which is a first, since I've ran this site for the last two years with vB and never run into chmod denials. I can not delete the folder either... Only thing that would work, if I choose to, is uninstall the modification and then manually install it or add my edits into the existing package so that it will install like that.
@ruelnov: The shoutbox isn't supposed to auto-collapse. That would be a bug. Which browser, and what's the URL? If I have time before I leave (for vacation, probably no Internet for me next week) I will look at it.
@Spike: Strange...this is definitely a hosting thing :P
QuoteBut it has no border on all 4 sides, and scroll bar is not visible.
Does it? Mine not too...
It's not supposed to have a border on any side; it isn't supposed to have a scroll bar. Perhaps you are thinking of the other shoutbox.
I don't think it's hosting really.
I think it's the fact that the package installer sets up the folders itself, and something within doesn't allow for any edits... okay so maybe that is hosting lol. Still it's weird, and does not make a lick of sense! lol.
i have an error, i installed this mod, but i receive this error:
(http://img118.imageshack.us/img118/978/escubocamh2.th.gif) (http://img118.imageshack.us/my.php?image=escubocamh2.gif)
the shoutbox don't charge, i don't know why.... pls help me...
i installed all reading this:
http://custom.simplemachines.org/mods/index.php?mod=585
and i put the text on lenguaje file.... !
srry for my english
nneonneo is the best!
@Spike Saunders: Yes, I agree it is quite weird.
@bobbbb: Good to hear :)
@Reco-X: Again, this is a symptom of many potential problems. Have you checked the server error log?
...and just so everyone knows: I'm leaving (in an hour :P) for a vacation. I will thus not be checking this forum for about a week, so if something blows up, try reading this thread (a lot of various issues are covered and resolved here, but I realize it is quite long), or leave it/uninstall it until I can help you :)
See you all later!
I wondered how long it would be till you took a break from this. :) Have fun.
Hope to see 1.09 when you return!... Lol j/k.
Edit:
Just an update. I redid 1.08 again. This time it was manual, no package installer, so no chmod denial errors. I did the edits for the anonymous button and scroll. However the stuff you wrote down in this post (http://www.simplemachines.org/community/index.php?topic=137508.msg1177988#msg1177988), does not seem to do anything. The chat still doesn't want to scroll to the bottom after each new one lol. Oh well. :) Works like this for now.
Quote from: nneonneo on July 27, 2007, 07:41:12 PM
@ruelnov: The shoutbox isn't supposed to auto-collapse. That would be a bug. Which browser, and what's the URL? If I have time before I leave (for vacation, probably no Internet for me next week) I will look at it.
@Spike: Strange...this is definitely a hosting thing :P
Quote from: nneonneo on July 27, 2007, 07:41:12 PM
@ruelnov: The shoutbox isn't supposed to auto-collapse. That would be a bug. Which browser, and what's the URL? If I have time before I leave (for vacation, probably no Internet for me next week) I will look at it.
here's the url:
www.greenvalley-cebu.com/forum
Shout Box placed just above the Info Center, same result if placed at its default position, and same result with IE6 or Firefox.
What I mean by no borders on all 4 sides is that it doesn't look like a BOX indeed. It has shout lines, but no borders on its sides.
Quote from: nneonneo on July 28, 2007, 12:42:36 AM
...and just so everyone knows: I'm leaving (in an hour :P) for a vacation. I will thus not be checking this forum for about a week, so if something blows up, try reading this thread (a lot of various issues are covered and resolved here, but I realize it is quite long), or leave it/uninstall it until I can help you :)
I will also be here able to check the thread and maybe able to help with a few things ;)
Quote from: ruelnov on July 28, 2007, 06:30:45 AM
What I mean by no borders on all 4 sides is that it doesn't look like a BOX indeed. It has shout lines, but no borders on its sides.
Because this shoutbox is so customizable, you're able to put the shoutbox in any design. You can place it anywhere! Simply create a table that the borders are seen and put the shoutbox inside of the table ;)
Quote from: nneonneo on July 27, 2007, 07:41:12 PM
@ruelnov: The shoutbox isn't supposed to auto-collapse. That would be a bug. Which browser, and what's the URL? If I have time before I leave (for vacation, probably no Internet for me next week) I will look at it.
Border problem solved.
auto-collapse of shout box also resolved.
My remaining problem is the
lack of smileys, even after creating another default directory with smiley set under Forum/Smileys/Default directory.
Am using the latest version of nneonneo's shout box.
Nneonneo is on vacation...
Quote from: nneonneo on July 28, 2007, 12:42:36 AM
...and just so everyone knows: I'm leaving (in an hour :P) for a vacation. I will thus not be checking this forum for about a week, so if something blows up, try reading this thread (a lot of various issues are covered and resolved here, but I realize it is quite long), or leave it/uninstall it until I can help you :)
Bobbb, or Brian or anybody else.
Has anybody got the code modification to work? I'm still have the issue with the shoutbox not scrolloing to the nearest entry first. Once that's fixed this will be perfect for my usage. :)
I don't know how to do everything with this shoutbox and scrolling stuff is not one of them. I can help with making some code work. What code modification you need help with?
Basically
http://www.simplemachines.org/community/index.php?topic=137508.msg1177988#msg1177988
that whole modification isn't doiny anything for me lol.
Ok, you will have to see when nneonneo gets back. I've seen some nneonneo's shoutboxes scroll perfectly. You may want to use the search and select This Topic, when searcing.
I can help with making some things work but scrolling is one I don't do good at.
1. ~Try this
Quote from: nneonneo on January 09, 2007, 09:08:47 PM
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.
Yeah did that along with his other suggestion after.
Scrolling works fine.
It's the 'auto scroll to latest entry' that doesn't work. It would work if the shoutbox was reverseed with newest on top.
Right now until he is back, im kind of wanting to just reverse it. Any quick fix for that? (Im not at home, so don't have my files to look at, hence asking)
Hey guys..
ok.. so i installed this shoutbox.. checked my ftp to make sure all files went through. They did. I even added the required code for a custom theme! Yet...
...loading shoutbox...
is still showing up... -_- i installed the package using the package manager... and i've seen through some posts about manually installing it.. but i figured that since the package got uploaded successfully.. that i didn't need to?
Any help would be greatly appreciated...
-Running a custom theme... added in the 2 codes for the custom theme install
-Installed using package manager
Is there a way to disable History for guests?
@Spike Saunders: The JS modifications was only minimally tested :P
I will test it more thoroughly when I get home (still on vacation)
@ruelnov: Yes, under "history()" function place a check for guests.
Something like "if (!$user['is_logged']) return;" should work.
Lol thats fine man. Right now im just looking to reorder the chat entries so it's newest at top.. then it's all good till the scroll issue is fixable.
hello were do the other php files go
I've had a go at reversing the display order, and it's working on my board at least.
in /yshout/yshout.php
after
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
add
$chatText=implode("\n", (array_reverse(explode ( "\n", $chatText ))));
this code takes the $chatText string on it's way to be displayed in the shoutbox, converts it to an array using explode with a \n delimiter, reverses this array, then implodes it back to a string.
bear in mind that I only installed SMF today, don't really know PHP and it's now 1:30am so I'm not really thinking straight. Still, it seems to work for me :)
Quote from: nneonneo on August 03, 2007, 05:28:01 PM
@ruelnov: Yes, under "history()" function plac a check for guests.
Something like "if (!$user['is_logged']) return;" should work.
Did it, but also the History for logged in members is also rendered blank. Any idea how to to make it blank for Guests only?
Quote from: oz_Moses on August 04, 2007, 11:29:08 AM
I've had a go at reversing the display order, and it's working on my board at least.
in /yshout/yshout.php
after
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
add
$chatText=implode("\n", (array_reverse(explode ( "\n", $chatText ))));
this code takes the $chatText string on it's way to be displayed in the shoutbox, converts it to an array using explode with a \n delimiter, reverses this array, then implodes it back to a string.
bear in mind that I only installed SMF today, don't really know PHP and it's now 1:30am so I'm not really thinking straight. Still, it seems to work for me :)
Sounds good... but returns error on me about
Parse error: syntax error, unexpected '}' in /home/ewnweb/public_html/wth/yshout/yshout.php on line 916
[back from vacation]
@ruelnov: How did you fix auto-collapse? Post that so it can help others :)
The code I posted was correct, but I forgot to note that "$user" must be added to the "global" line in history() for it to work.
Modification: change
global $logDir,$boardurl,$gzipCompression,$defaultEncoding,$txt;
to
global $logDir,$boardurl,$gzipCompression,$defaultEncoding,$txt,$user;
if (!$user['is_logged'])
{
echo '<h3>Shoutbox history available to logged in users only!</h3>';
return;
}
@Fallen.One05: Not sure what could be the problem. Anything in the server error log?
@clocktower: What php files? There is only one: yshout.php (goes in /path/to/forum/yshout/yshout.php)
@oz_Moses: That's actually a very nice solution -- handy to remember.
@Spike Saunders:
Updated guide to scroll code:
This code is adapted from http://radio.javaranch.com/pascarello/2006/08/17/1155837038219.html.
In yshout/js/yshout.js:
Find
// Set off the AJAX call to load the chat form into the empty yShout div
Add BEFORE
var chatscroll = new Object();
chatscroll.Pane = function(scrollContainerId){
this.bottomThreshold = 20;
this.scrollContainerId = scrollContainerId;
this._lastScrollPosition = 100000000;
}
chatscroll.Pane.prototype.activeScroll = function(){
var _ref = this;
var scrollDiv = document.getElementById(this.scrollContainerId);
var currentHeight = 0;
var _getElementHeight = function(){
var intHt = 0;
if(scrollDiv.style.pixelHeight)intHt = scrollDiv.style.pixelHeight;
else intHt = scrollDiv.offsetHeight;
return parseInt(intHt);
}
var _hasUserScrolled = function(){
if(_ref._lastScrollPosition == scrollDiv.scrollTop || _ref._lastScrollPosition == null){
return false;
}
return true;
}
var _scrollIfInZone = function(){
if( !_hasUserScrolled() ||
(currentHeight - scrollDiv.scrollTop - _getElementHeight() <= _ref.bottomThreshold)){
scrollDiv.scrollTop = currentHeight;
_ref._isUserActive = false;
}
}
if (scrollDiv.scrollHeight > 0)currentHeight = scrollDiv.scrollHeight;
else if(scrollDiv.offsetHeight > 0)currentHeight = scrollDiv.offsetHeight;
_scrollIfInZone();
_ref = null;
scrollDiv = null;
}
var divScroll;
Find
function setupChat() {
Add AFTER
divScroll = new chatscroll.Pane('shouts');
objDiv = document.getElementById('shouts');
objDiv.scrollTop = objDiv.scrollHeight;
Find
function startRefresh() {
if (!refreshSet) {
setTimeout("doRefresh()", refreshTime);
refreshSet = true;
}
}
function schedRefresh() {
if (refreshSet) {
setTimeout("doRefresh()", refreshTime);
}
}
Replace with
function startRefresh() {
if (!refreshSet) {
refreshSet = true;
schedRefresh();
}
}
function schedRefresh() {
if (refreshSet) {
setTimeout("divScroll.activeScroll()", 5);
setTimeout("doRefresh()", refreshTime);
}
}
This *has* been tested (not extensively though), but requires that you use the CSS
#yshout #shouts {
height: 100px;
overflow: auto;
}
so that only the shout div gets a scrollbar, not the whole shoutbox. It should appear like this in index.template.php:
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout #shouts {
height: 100px;
overflow: auto;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
Cheers nneonneo, I appreciate the hack.
@Spike Saunders it seems strange to get an error on line 916, as my mod was on line 660.. also there weren't any } in my line of code. Any chance you can upload the original yshout/yshout.php and make the change again?
@oz_Moses Likely... lol not sure where the error came from even tho all i did was add your code lol.
@nneonneo Awesome. I'll have a check of it... eventaully. My site was hacked today. Everthing's gone on the file tree/directory. Yet the entire Database still remains. My server admin should have a backup of my domain tho so hopefully it'll be fixed shorttly.. otherwise ill just reinstall SMf and it's mods... and not worry about the 4 years of hsitory on the domain that are now gone heh. - oh and welcome back.
Quote from: nneonneo on August 04, 2007, 07:30:18 PM
[back from vacation]
@ruelnov: How did you fix auto-collapse? Post that so it can help others :)
The code I posted was correct, but I forgot to note that "$user" must be added to the "global" line in history() for it to work.
Modification: change
global $logDir,$boardurl,$gzipCompression,$defaultEncoding,$txt;
to
global $logDir,$boardurl,$gzipCompression,$defaultEncoding,$txt,$user;
if (!$user['is_logged'])
{
echo '<h3>Shoutbox history available to logged in users only!</h3>';
return;
}
Thanks for that correction, nneonneo. Shout Box history now turned OFF for Guests only.
Auto-collapse was fixed after I changed $updateTimeout=20; TO $updateTimeout=10; in yshout.php.
Also,
how do I change the Shout Box title found just above the History command?
Lastly,
what changes have to be done to the code below so that another instance of Shout Box will work just above the QUICK REPLY Box when a user is viewing a topic?
// 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 have placed above code at the correct location in Display.Template.php, but all I get is "...loading shoutbox....", but the 1st instance of shoutbox (default location) works fine.
@nneonneo
Awesme man. It worked. Had to reedit everything after the backup, but it's all good. Thanks. Lovely modification.
@ruelnov: To change "Shout Box" title, change $txt['yshout_shoutbox'] in Themes/default/languages/Modifications.<language>.php.
Second problem is a bit thornier. It requires changes to the Javascript to recognize multiple instances.
Right now I don't have the time to work out the details, but a fair bit of JS must be changed. The main issue is that the Javascript was only ever designed to support one instance. It can be hacked to support two, though.
Quote from: nneonneo on August 05, 2007, 01:49:58 PM
@ruelnov: To change "Shout Box" title, change $txt['yshout_shoutbox'] in Themes/default/languages/Modifications.<language>.php.
Second problem is a bit thornier. It requires changes to the Javascript to recognize multiple instances.
Right now I don't have the time to work out the details, but a fair bit of JS must be changed. The main issue is that the Javascript was only ever designed to support one instance. It can be hacked to support two, though.
@nneonneo: ShoutBox title not changed by doing above hint. Did this before also before asking you this question. Only the Shout Box word in title of History Page is changed. Any other approach?
And would a second instance mod be in your next version? But how soon? It would be great indeed if members wouldn't have to scroll to the top anymore to continue chatting with other members.
Also, I've noticed a bug when the shoutbox is enabled for Guests. Registered members can still continue shouting after logging out, but with the admin's username! Makes me worried, indeed, that they could access the Admin Panel, so I disabled it for guests at the moment.
Argh...looks like I forgot to use $txt there.
In
// 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
--> change the words Shout Box (between <b> tags).
Quote from: ruelnov on August 05, 2007, 03:20:28 PMAlso, I've noticed a bug when the shoutbox is enabled for Guests. Registered members can still continue shouting after logging out, but with the admin's username! Makes me worried, indeed, that they could access the Admin Panel, so I disabled it for guests at the moment.
Sure they can shout with an admin's username, because they can set their own usernames as guests. However, they show up as black text (not red like admins). You can set "$autoGuestName" in yshout.php to prevent them from picking their own usernames as guests.
Quote from: nneonneo on August 05, 2007, 05:09:44 PM
Argh...looks like I forgot to use $txt there.
In // 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
--> change the words Shout Box (between <b> tags).
@nneonneo: Thanks, it worked now.
And how do I move the shoutbox up 1 line closer to the Shout Box title? Need to save some space.
@ruelnov: Try changing
// 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
to
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br />
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END
Thanks, brianjw. It worked.
And how do I change the font color for Shout Box title to say GREEN or BLUE?
Change
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br />
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END
to
// YSHOUT HERE
echo '
<br /><b><font color="green">Shout Box</font></b><br />
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END
That code is in green, if you want it blue just change the word green to blue ;)
That was amazing, brianjw... Thanks a lot.
And by the way, how do I add a clickable button to the right of Shout button? I need to add a quick link to a certain childboard. There's still much room next to the Shout button anyway, so why don't we utilize that for quick links?
Quote from: ruelnov on August 06, 2007, 11:16:07 AM
That was amazing, brianjw... Thanks a lot.
And by the way, how do I add a clickable button to the right of Shout button? I need to add a quick link to a certain childboard. There's still much room next to the Shout button anyway, so why don't we utilize that for quick links?
No problem.
Talk to nneonneo about that one though ;)
Or, how do I change the link to the existing Shout button to point it to a certain popular childboard?
Members would not be using that most of the time, anyway. They would just press ENTER button to make a shout.
See <input id="shout-button" type="button" value="',$txt['yshout_shout_button'],'" />
in yshout/yshout.php.
Change to (or add after)
<input id="jump-button" type="button" value="Go to special place" onClick="document.location=\'$$$\'" />
where $$$ is the target URL.
Thanks, nneonneo.
It worked like a charm...
And if it's not so much to ask from you, a 2nd Button for quick link would, indeed, be cool.
Just add another one after (just change the id name like below)
<input id="jump-button2" type="button" value="Go to special place2" onClick="document.location=\'$$$\'" />
That was great, brianjw.
Would you know how to change the button color to GREEN, and the font color to WHITE?
OK well you're going to have to open the theme you're usings index.template.php file.
Find:
#yshout #shout-button {
width: 55px;
}
Add After:
input.btn {
color:#FFFFFF;
font-family:'trebuchet ms',helvetica,sans-serif;
font-size:84%;
font-weight:bold;
background-color:#006600;
}
Now, close the index.template.php.
Open yshout.php.
Find:
<input id="jump-button2" type="button" value="Go to special place2" onClick="document.location=\'$\'" />
Replace With:
<input id="jump-button2" type="button" value="Go to special place2" onClick="document.location=\'$\'" class="btn" />
NOTE: if you change the css name at all, the button style will not work ;)
Brianjw
Btw, this is easy html :)
What are the manual edits to install 1.08 instead of uninstalling 1.07 to install 1.08?
Also is it possible to make the anonymous function a checkbox? I need a checkbox ???
Thanks.
@brianjw:
Followed your last hint as above for changing background & font color of Shout Button, but it all resulted in parsing errors for index.template.php.
Any idea why this is so?
@ruelnov: Need to use
input.btn {
color:#FFFFFF;
font-family:\'trebuchet ms\',helvetica,sans-serif;
font-size:84%;
font-weight:bold;
background-color:#006600;
}
instead (brianjw: note that the whole thing is in an echo '...' block so you must escape the ' characters)
@brianjw: There were many changes, hence no upgrade. Attached is a "diff" format file describing all the changes.
"-" means to remove the line, "+" means to add the line.
Sorry I can't get you anything more meaningful, but for me to write up a full update mod or instructions would take me a lot more time.
What program do I open this in?
Quote from: nneonneo on August 07, 2007, 02:22:34 PM
@ruelnov: Need to use
input.btn {
color:#FFFFFF;
font-family:\'trebuchet ms\',helvetica,sans-serif;
font-size:84%;
font-weight:bold;
background-color:#006600;
}
instead
Thanks, nneonneo.
And how do I force a carriage return after Shout Button, so that additional buttons would appear at next line?
a what?
@brianjw: Open it in any text editor.
@ruelnov: Carriage returns (newlines) are represented in HTML by a break: <br /> tag.
I have installed nneonneo's shoutbox.
i´ve uploaded it in packages and edited my modifications.spanish.... and edited my index.template and it only display this:
Shout Box
...loading shoutbox...
:s
help please
Check the server error logs for information.
I cant understand the .diff file.
I forgot; I encoded it using the UNIX line encoding.
Reattached & fixed.
@nneonneo:
Is it possible to incorporate another box on top of the existing box with just 1 line, serving as announcement box for members themselves?
We need this announcement box since the shout lines in the regular shout box is changing fast with time, esp. on a big forum. And members usually have very urgent concerns that need the attention of other members, esp. if they are looking for a specific item to buy right away from other members, etc.
I would like to see a command in nneonneos shoutbox:
/lock
The /lock command would make it so no members could post in it until a staff member uses the command /unlock
.
This command could only be used by staff. The staff should be able to be defined in the yshout.php but not by members by group.
The members should still be able to see the shouts when it's locked but the text typing area should be disabled <input disabled type="text" name="textfield" />
(something like that). However, the typing area wouldn't be disabled for the defined staff groups in yshout.php.
Let me know what you think. I would definitely like to see this as a feature :)
@ruelnov: Editable news items perhaps? Doesn't sound like something which would be best done using the shoutbox.
@brianjw: If I implemented it, it probably would be very similar to the existing ban command (kind of like banning everyone with "p" restrictions, but saying "Locked!" instead of "Banned").
OK. When will it be implemented?
Also it wouldn't ban staff ;)
Is there a way to open nneonneo's Shoutbox in a new window or something like that?
Yes. You can create a php file in your forum root called "shoutbox.php" then use the include commands to include yshout.php and other files needed and add code.
Not much help. Just ask nneonneo for the details lol but I think i got the right idea ;)
but what files do i have to include into the php file? and how? just with: include('');?
Right idea, Brian, but not quite the right implementation.
No code is really required; it's just an HTML file with the board URL interpolated in a few places:
<?php
$boardurl = 'http://forum.com/path/to/forum';
echo '<html><head><title>Shoutbox</title>
<script src="',$boardurl,'/Themes/default/script.js" type="text/javascript"></script>
<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?Aug92007" 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>
</head>
<body>
<br /><b>Shout Box</b><br /><br />
<div id="yshout">Shoutbox loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></body></html>';
?>
As you can see, this is basically a thin HTML page wrapping the usual code from index.template.php. It causes the client to load all the necessary JS, and the client is then responsible for calling yshout.
All you need to do, odavilar, is change $boardurl up top (for such a simple script, I'm not going to run off to SSI just to check the board URL ;) ). Then, place the script in any web-accessible location and *boom* it's there.
This code is largely copied from glxpa's solution (http://www.simplemachines.org/community/index.php?topic=137508.msg1170765#msg1170765) and cleaned up somewhat to avoid missing variables. It has also been edited to include a small fix mentioned by me later in the thread.
*Note: Using a *relative* link (e.g. /forum/, instead of http://moo.com/forum/) for $boardurl is probably safer so that minor domain mismatches (www.xxx.yyy vs. xxx.yyy) don't prevent the script from working.
hi! this version works great. i would like to implememt it in my tiny portal block. is it possible to just paste a code on one of the blocks in tinyportals block manager? so that this shoutbox stays on any part of the page, easier to transfer as a block. the default tinyportal shoutbox relaods the whole webpage, so i think this one's better.
Yes, Tinyportal integration is possible.
http://www.simplemachines.org/community/index.php?topic=137508.msg1031509#msg1031509
great job guys, I was about to get an paid, premium shoutbox before I saw this
\
but one question
can i make the font biggeR? how?
@Pasaway:
There are two types of code in the index.template.php for this shoutbox, you will have one or the other.
1. If you're using <div id="yshout"></div>. Ask nneonneo.
2. If you're using a certain shoutbox code which is bigger than the div function search your index.template.php for Shout Box. Once you find it just add font tags around it.
<font size="10pt">Shout Box</font>
(you choose the size :))
I think he means the font for the shout text. To change that:
in Themes/<theme>/index.template.php, change the font-size parameter in
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
and
#yshout {
font-size: 14px;
}
That's it -- that's all that needs to be done to change the shout text font size.
There's a typo in the very first post:
var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var board_url = ;', $boardurl, '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Jul222007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
Line 5 should say
var board_url = "', $boardurl, '";
nneonneo hasn't updated the first post. I believe that is the code from the very first version.
You can find the original and current codes and mods on the modsite of this mod ;)
brianjw, I believe you are wrong ;)
QuoteNote: If you followed the instructions above to install to other themes, you will not need to update the other themes (since the above instructions already carry the correct 1.08 modifications).
That same error's in http://custom.simplemachines.org/mods/index.php?mod=585 (http://custom.simplemachines.org/mods/index.php?mod=585).
It seems to work anyway. Ask nneonneo.
Odd, I never noticed that. It could be the source of many bugs in alternate themes :-\
Fixed (in post & mod page): Thanks for the quick eye, spirit receiver! :)
is there a code that will put the smileys list on the shoutbox; ie.; so one does not have to know the code to post a smiley; like type a : and a ) to make a smiley??
I want to make it where there is a selection of smileys in the shoutbox they can just pick a smiley from the list; just like inside of this forum when you make a post??
I am using version 1.08 on a linux server
Wow... love all the tips here,
but I found one that is not quiet right...
Re: nneonneo's Shoutbox
« Reply #874 on: August 10, 2007, 02:08:15 PM »
Reply with quoteQuote
I think he means the font for the shout text. To change that:
in Themes/<theme>/index.template.php, change the font-size parameter in
Code:
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
That's it -- that's all that needs to be done to change the shout text font size.
====
that changes the size of the font in the buttons, and the type box, but not the scrolling text... if you want to change that, you must change this code in the same file:
#yshout {
font-size: 14px;
}
I'm new to explaining this; hope I posted it correctly :)
@nneonneo:
Is $updateTimeout setting the most "server-stressful" or "bandwidth-consuming" setting, esp. if set below the default value of 20?
I had it set to 10 to resolve the auto-collapse problem, but bandwidth utilization increases at an alarming rate of 2GB per day!
@ruelnov: Odd, bandwidth should not increase appreciably even with a setting of 10; this is equivalent to a usual refresh time of 10 seconds unless people are shouting _very_ often. Have you tried changing Jul222007 in index.template.php to something else, to force a cache update on the clients? An incorrect cached copy of yshout.js in a browser could severely tax the server.
For reference, if nobody shouts, the shoutbox uses about 360KiB/hour per client idling at your settings. This decreases significantly when combined with compression, so, unless you have 250 clients all idling 24/7, bandwidth usage _should_ not be 2GB/day (YMMV!)
@colorgoddess: About the first point: yes, I believe it is possible, but I do not know the SMF code I need for the smileys pane. On the second point: good catch; I've fixed that tip.
I have read this entire support thread and any of answers didn't helped me to solve my problem.
Im using SMF 1.1.3 and i wanted to add nneonneo's Shoutbox to Babylon theme. On my host PHP Version is 4.4.7.
I have done all necessary steps exactly as sad on mod's official page (http://custom.simplemachines.org/mods/index.php?mod=585). The Shoutbox simple wont work. Only this shows:
Quote
Shout Box
...loading shoutbox...
And after that nothing happens!
My test forum url is http://test.pancevo.ws (http://test.pancevo.ws), and login data is:
User name: test
Password: test
This is my index.template.php (http://test.pancevo.ws/Themes/babylon/index.template.rar) file.
I realy like this mod and I desperately need Shoutbox, can someone please help me to make this mod work for me.
Thank you in advance for your time.
@Spale: Visiting http://test.pancevo.ws/yshout/yshout.php gives me a 500 "Internal Server Error". You will have to check the webserver error logs.
Great shoutbox, just wondering hoe to increase the max number of charecters/words used. thanks
@nneonneo: It seams that the files were not transfered good to the host. I have overwrite them all, chmod yshout.php to 755 and the Shoutbox start working.
I have one more question, how to make that only register users can use Shoutbox?
Thanks for your quick answer, and thank you for making this great mod. Keep on with good work, best wishes from me. ;)
Some members at my forum complain that sometimes they
didn't seen the shout change cause they did something
elsewhere in that page.
Would U like to show me the code to add a ding dong sound when
the shout 's changed, please.
I just see someone want smiley to show at the shout box.
I've finished the mod last night, I'll post later about the trick.
Let's see the example picture
U can choose to slide down to show and up to hide.
(http://img138.imageshack.us/img138/1341/psk03za6.jpg)
(http://img141.imageshack.us/img141/7614/psk04pe1.jpg)
@pongsak
can't wait!! THANKS!
@Mongey: Find all instances of the number 125 and increase the value. It should occur twice as maxlength="125" and once in substr($shoutText,0,125).
@Spale: change $allowGuests in yshout.php to false.
@pongsak: in yshout/js/yshout.js, change function doRefresh() {
to var oldShouts = null;
function doRefresh() {
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
<PLAY SOUND>
}
oldShouts = $("shouts").innerHTML;
where "<PLAY SOUND>" is code for producing an audible sound; this varies widely from browser to browser. There are a number of sites on the Internet to find code to play sounds.
And the smileys menu looks nice -- I can't wait to find out how you did it :)
After try many ways for code <PLAY SOUND> . It does not work. :(
Can u show me an example? please.
Below 's the code i use but don't work.
function playMusic(nm) {
obj = document.embeds[nm];
if(obj.Play) obj.Play();
return true;
}
function schedRefresh() {
if (oldShouts != null && oldShouts != $("shouts").innerHTML){
playMusic("http://www.med17psu.com/forum/chat-inbound_GSM.wav");
}
if (refreshSet) {
setTimeout("doRefresh()", refreshTime);
}
}
PS: One suggestion , after i use delete for 1 line of shout it doesn't return to shout text ,but must to click "return to shout", why don't redirect to shout immediately? :)
For adding smiley .Let's go.
1. Adding 1 line of script between <head> and </head> index.template.php .
<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script>
This file will create sliding effect.
2. Create "mymod" dir in root forum dir and copy these code and safe as "animatedcollapse.js"
//Animated Collapsible DIV- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated June 27th, 07'. Added ability for a DIV to be initially expanded.
var uniquepageid=window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, "") //get current page path and name, used to uniquely identify this page for persistence feature
function animatedcollapse(divId, animatetime, persistexpand, initstate){
this.divId=divId
this.divObj=document.getElementById(divId)
this.divObj.style.overflow="hidden"
this.timelength=animatetime
this.initstate=(typeof initstate!="undefined" && initstate=="block")? "block" : "contract"
this.isExpanded=animatedcollapse.getCookie(uniquepageid+"-"+divId) //"yes" or "no", based on cookie value
this.contentheight=parseInt(this.divObj.style.height)
var thisobj=this
if (isNaN(this.contentheight)){ //if no CSS "height" attribute explicitly defined, get DIV's height on window.load
animatedcollapse.dotask(window, function(){thisobj._getheight(persistexpand)}, "load")
if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.visibility="hidden" //hide content (versus collapse) until we can get its height
}
else if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.height=0 //just collapse content if CSS "height" attribute available
if (persistexpand)
animatedcollapse.dotask(window, function(){animatedcollapse.setCookie(uniquepageid+"-"+thisobj.divId, thisobj.isExpanded)}, "unload")
}
animatedcollapse.prototype._getheight=function(persistexpand){
this.contentheight=this.divObj.offsetHeight
if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes"){ //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.height=0 //collapse content
this.divObj.style.visibility="visible"
}
else //else if persistence is enabled AND this content should be expanded, define its CSS height value so slideup() has something to work with
this.divObj.style.height=this.contentheight+"px"
}
animatedcollapse.prototype._slideengine=function(direction){
var elapsed=new Date().getTime()-this.startTime //get time animation has run
var thisobj=this
if (elapsed<this.timelength){ //if time run is less than specified length
var distancepercent=(direction=="down")? animatedcollapse.curveincrement(elapsed/this.timelength) : 1-animatedcollapse.curveincrement(elapsed/this.timelength)
this.divObj.style.height=distancepercent * this.contentheight +"px"
this.runtimer=setTimeout(function(){thisobj._slideengine(direction)}, 10)
}
else{ //if animation finished
this.divObj.style.height=(direction=="down")? this.contentheight+"px" : 0
this.isExpanded=(direction=="down")? "yes" : "no" //remember whether content is expanded or not
this.runtimer=null
}
}
animatedcollapse.prototype.slidedown=function(){
if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==0){ //if content is collapsed
this.startTime=new Date().getTime() //Set animation start time
this._slideengine("down")
}
}
}
animatedcollapse.prototype.slideup=function(){
if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==this.contentheight){ //if content is expanded
this.startTime=new Date().getTime()
this._slideengine("up")
}
}
}
animatedcollapse.prototype.slideit=function(){
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==0)
this.slidedown()
else if (parseInt(this.divObj.style.height)==this.contentheight)
this.slideup()
}
// -------------------------------------------------------------------
// A few utility functions below:
// -------------------------------------------------------------------
animatedcollapse.curveincrement=function(percent){
return (1-Math.cos(percent*Math.PI)) / 2 //return cos curve based value from a percentage input
}
animatedcollapse.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}
animatedcollapse.getCookie=function(Name){
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}
animatedcollapse.setCookie=function(name, value, days){
if (typeof days!="undefined"){ //if set persistent cookie
var expireDate = new Date()
var expstring=expireDate.setDate(expireDate.getDate()+days)
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()
}
else //else if this is a session only cookie
document.cookie = name+"="+value
}
3. download smiley.php and safe in mymod dir.
4. Search after in index.template.php or boardindex.template.php depend on where u put shout box.
<div style="padding: 1ex 25px 1ex 25px;"id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /></div>
add
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
5. Open yshout.php for namely some input.
find
<form id="shout-form" action="#">
replace to
<form id="shout-form" name="shout_form" action="#">
find
<input id="shout-text" style="color: #666666;" maxlength="125" value="" type="text" />
replace to
<input id="shout-text" style="color: #666666;" maxlength="125" value="" type="text" name="shout_text" />
That's it. :D
Quote from: nneonneo on August 15, 2007, 09:36:49 PM
@ruelnov: Odd, bandwidth should not increase appreciably even with a setting of 10; this is equivalent to a usual refresh time of 10 seconds unless people are shouting _very_ often. Have you tried changing Jul222007 in index.template.php to something else, to force a cache update on the clients? An incorrect cached copy of yshout.js in a browser could severely tax the server.
For reference, if nobody shouts, the shoutbox uses about 360KiB/hour per client idling at your settings. This decreases significantly when combined with compression, so, unless you have 250 clients all idling 24/7, bandwidth usage _should_ not be 2GB/day (YMMV!)
@nneonneo: no matter what settings changes I do in yshout.js or yshout.php, bandwidth usage is still between 1GB-2GB per day!
I have also changed Jul222007 to something else already. By the way, we have an average of 150 users online spread the whole day.
Any other idea how to trim the bandwidth usage of this shout box to less than 1GB per day?
Quote from: nneonneo on August 18, 2007, 11:56:39 AM
@Mongey: Find all instances of the number 125 and increase the value. It should occur twice as maxlength="125" and once in substr($shoutText,0,125).
@Spale: change $allowGuests in yshout.php to false.
@pongsak: in yshout/js/yshout.js, change function doRefresh() {
to var oldShouts = null;
function doRefresh() {
oldShouts = $("shouts").innerHTML;
and add
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
<PLAY SOUND>
}
after
function schedRefresh() {
where "<PLAY SOUND>" is code for producing an audible sound; this varies widely from browser to browser. There are a number of sites on the Internet to find code to play sounds.
And the smileys menu looks nice -- I can't wait to find out how you did it :)
I think your code make shout box don't auto update.
It'll show text change when i submitted new message.
Then i correct the code to the old one, it's ok.
pongsak, is there any way to use one image like the collapse image that changes when smileys are shoiwn. What I mean is showing one image to collapse and expand.
@pongsak: For sound, you can try SoundManager (http://www.boutell.com/newfaq/creating/scriptsound.html); it will take some setup work (if I get some time today I'll work out the details)
The smileys guide is quite nice; can I add this functionality into a future version of the shoutbox?
The reason why the "ReturnToShoutbox" is needed is mainly due to the new update code. A good way to fix this would be to add
echo readChat($chatFile, $logDir);
after
echo $txt['yshout_del_success'];
which would cause this to appear after a successful deletion:
Shout deleted.
[Thu Aug 16 3:24 PM] del ban nneonneo: test shout
<rest of shouts, minus the deleted one>
The reason why the shoutbox doesn't autoupdate is because the code you used to play the sound is broken. Thus, when the scheduler is executed, the incorrect code causes the function to quit before it schedules the next refresh. Using correct code (perhaps using SoundManager) will fix this problem.
@ruelnov: I suppose I should take a look at your forum and check out what it's doing.
@brianjw: Use the code from the [ + ]/[ - ] images in SMF (collapse/uncollapse).
Adding sound:
Get SoundManager2 (http://www.schillmania.com/projects/soundmanager2/)
Place soundmanager2.js in yshout/js
Place soundmanager2.swf in yshout/
Place the desired sound in yshout/ and change the URL below to match (MUST BE MP3!)
Place the following code after
<script src="',$boardurl,'/yshout/js/yshout.js?July062008" type="text/javascript"></script>
in index.template.php:
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">soundManager.url="',$boardurl,'/yshout/";
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function() {
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/sound.mp3", autoPlay:false});
}</script>
(if it does not work, you may have an older soundmanager2, try adding "soundmanager2.swf" after soundManager.url="',$boardurl,'/yshout/)
In yshout/js/yshout.js, after
function shoutDone() {
add
$('shouts').innerHTML = this.transport.responseText;
oldShouts = $('shouts').innerHTML;
(that step is optional, but it stops the sound when you shout, and only sounds when others shout)
Replace
var request;
// This gets called each refresh; it reloads the shoutboxes content.
by
function ltrim(text) {
return text.replace(/^\s*/g,'');
}
var request;
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML))
soundManager.play('sound');
oldShouts = $("shouts").innerHTML;
EDIT: Update for newer Soundmanager version (dated Mar 31 2008)
EDIT2: Complete instructions.
EDIT3: Update for new shoutbox versions (1.20+)
Quote from: nneonneo on August 19, 2007, 02:51:20 PM
The smileys guide is quite nice; can I add this functionality into a future version of the shoutbox?
Hopefully as an option in yshout.php ;)
Is there anyway to display only some of the smileys because I don't want that many smileys over the shoutbox. Just the basics ;) like
:) ;) :D :( :( :o 8) ??? ::) :P :-[ :-X :-\ :-* :'( ;D
Quote from: nneonneo on August 19, 2007, 03:39:56 PM
Adding sound:
Get SoundManager2 (http://www.schillmania.com/projects/soundmanager2/)
Place soundmanager2.js in yshout/js
Place soundmanager2.swf in yshout/
Place the desired sound in yshout/ and change the URL below to match (MUST BE MP3!)
Place the following code after
<script src="',$boardurl,'/yshout/js/yshout.js?Jul222007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
in index.template.php:
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">soundManager.url="',$boardurl,'/yshout/soundmanager2.swf";
soundManager.onload = function() {
soundManager.createSound("sound", "', $boardurl, '/yshout/sound.mp3");
}</script>
Replace <PLAY SOUND> by soundManager.play('sound')
It should work (hasn't been tested as my server is being odd today)
Do you have any good shout mp3 sounds like if you use aim that sound or any sound thats not annoying lol? :D
Quote
The smileys guide is quite nice; can I add this functionality into a future version of the shoutbox?
Sure. :)
About the sound after i try it, there's 2 thing annoying .
1. It alway shows message at the bottom of the page like this. http://img171.imageshack.us/img171/8360/psk01vw5.jpg
(http://img171.imageshack.us/img171/8360/psk01vw5.jpg)
2. Code may be miss somewhere cause it error in ie7 (the soundmanager page say it can use in ie)
(http://img521.imageshack.us/img521/5139/psk00rc2.jpg)
Ok, the first one i can correct it by open soundmanager.js and set this.debugMode = false; .
@brianjw: In smiley.php:
Change
elseif ($user_info['smiley_set'] != 'none')
{
if (($temp = cache_get_data('posting_smileys', 480)) == null)
{
$request = db_query("
SELECT code, filename, description, smileyRow, hidden
FROM {$db_prefix}smileys
WHERE hidden IN (0, 2)
ORDER BY smileyRow, smileyOrder", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
$row['code'] = htmlspecialchars($row['code']);
$row['filename'] = htmlspecialchars($row['filename']);
$row['description'] = htmlspecialchars($row['description']);
$context['smileys'][empty($row['hidden']) ? 'postform' : 'popup'][$row['smileyRow']]['smileys'][] = $row;
}
mysql_free_result($request);
cache_put_data('posting_smileys', $context['smileys'], 480);
}
else
$context['smileys'] = $temp;
}
to
// Load smileys - don't bother to run a query if we're not using the database's ones anyhow.
if ($user_info['smiley_set'] != 'none')
$context['smileys']['postform'][] = array(
'smileys' => array(
array('code' => ':)', 'filename' => 'smiley.gif', 'description' => $txt[287]),
array('code' => ';)', 'filename' => 'wink.gif', 'description' => $txt[292]),
array('code' => ':D', 'filename' => 'cheesy.gif', 'description' => $txt[289]),
array('code' => ';D', 'filename' => 'grin.gif', 'description' => $txt[293]),
array('code' => '>:(', 'filename' => 'angry.gif', 'description' => $txt[288]),
array('code' => ':(', 'filename' => 'sad.gif', 'description' => $txt[291]),
array('code' => ':o', 'filename' => 'shocked.gif', 'description' => $txt[294]),
array('code' => '8)', 'filename' => 'cool.gif', 'description' => $txt[295]),
array('code' => '???', 'filename' => 'huh.gif', 'description' => $txt[296]),
array('code' => '::)', 'filename' => 'rolleyes.gif', 'description' => $txt[450]),
array('code' => ':P', 'filename' => 'tongue.gif', 'description' => $txt[451]),
array('code' => ':-[', 'filename' => 'embarrassed.gif', 'description' => $txt[526]),
array('code' => ':-X', 'filename' => 'lipsrsealed.gif', 'description' => $txt[527]),
array('code' => ':-\\', 'filename' => 'undecided.gif', 'description' => $txt[528]),
array('code' => ':-*', 'filename' => 'kiss.gif', 'description' => $txt[529]),
array('code' => ':\'(', 'filename' => 'cry.gif', 'description' => $txt[530])
),
'last' => true,
);
@pongsak: Give me the URL to your page and I will check it using IE6/7. I am not the author of SoundManager2, so I can't say what the problem is without seeing it.
As for debug mode, I didn't know it was on by default; I have edited the tip posted 3 posts ago to fix this.
What does it say in debug mode before the IE error appears?
After correct code to your new edit , ie still show same problem.
My forum : http://www.med17psu.com/forum
user: test1
pwd: test1
Another problems except that one in ie is the sound can here with one who typing.
Such as if i type i here, but other type and show new text i didn't here anything.
The other side is same as me.The sound only heard for the one typing.
Sorry about ie problem, accidentally i 've used internet with ie in IT shop and found that it's no problem now. (The problem come when i use ff and ie in same computer , even different log in).
But the problem above persist.
Hi nneonneo
Long time
Your shoutbox has been working nice for me now i have a different question
Is there any way to make the shoutbox "pop-up-able" like when u first go to the site you wont see the shout box just the main forum and the on the menu bar i.e (home, help, search) you can click on the shoutbox and then it will pop up where it normally was
Speaking on the defualt theme, with nothing extra added, just arcade
Did u get wat i was asking for ...
Thanks man
@pongsak: So, now, what is the problem?
@JSizzal: See http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341 for an implementation. Make a new tab in the default theme with a link to the page you create (using target="_blank" or Javascript to make it open in a new window).
The problem now is there's the sound only for typer not the receiver.
Suppose u and me chat in shout box, If u type u hear but i don't hear , if i type i hear and u don't hear.
Ah, I will check it out.
>.< I posted the wrong instructions.
Fixed instructions at http://www.simplemachines.org/community/index.php?topic=137508.msg1206809#msg1206809 (edited the original post)
:) Thanks for help.
But something weird again :)
If anyone type and send a message he'll always hear 2 times.But if he recieve a message he'll the sound once.
Remove the code from schedRefresh :)
Ok, It's working very good now.
I think u should release new version include smiley & sound, cool.
Another suggestion.
At my forum, i've used ajax user online that update every 30 sec.
I've noticed that when users chat and not do anything else , users's name
will disappear from user online after 15 min.
This function call data from smf_log_online, my suggestion is there's a way
to write this table while user's chatting? may be every q 5 min for maintain user
in user online.
I have SMF 1.1.3 version of forum, and I have instaled 1.0.8 version of nneonneo's Shoutbox, and I have one annying problem...
...loading shoutbox...
And nothing happens... I looked the EROR log, instaled manualy the codes in the Index.template.php in my theme... And I still am geting this message....
Link to the forum... FEQTY (http://www.feqty.com)
@pongsak: Smileys will be added as an optional feature (though probably without the sliding animation); sound will be added to the main mod page as an add-on to the shoutbox.
I will also add brianjw's lock/maintenance mode idea as a command ("/lock <message>", "/unlock").
@feqty: When I visit http://www.feqty.com/forum/yshout/yshout.php I get a "406 Not Acceptable" error -- Apache's mod_security is preventing yshout.php from executing. yshout.php should be "chmod 755", if it's not, correct it and try again.
@nneonneo i erased this mod... I was tryning all day to install it, and then i gave up...
I'm sure that is a good MOD... but i can not spare any more time...
Thank's anyway ;D
The shoutbox is giving me a hard time and has for a while. I am using the latest version of this shoutbox (1.08).
It extends out of the TinyPortal block like the screenshot below. Also below I include the code for the css supposed to be in the index.template.php, what will I need to change or can you change it for me to make it fit in a width of 208 Pixels. Where the red line is accross the image below is where about the block is supposed to stop continuing, it also may be something in yshout.php.
// 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: 150px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END
Thanks,
Brianjw
@feqty: Thanks for letting me know.
@brianjw: Have you tried #yshout {
font-size: 10px;
width: 208px;
}
?
I am not a CSS expert, but this *should* work.
Would you like to tell me something about problem in http://www.simplemachines.org/community/index.php?topic=137508.msg1209995#msg1209995 ? please.
Ah, sorry, I forgot about that (thanks for the reminder).
I will fix it by adding a call to ssi_logOnline.
Quote from: nneonneo on August 21, 2007, 06:27:09 PM
@feqty: Thanks for letting me know.
@brianjw: Have you tried #yshout {
font-size: 10px;
width: 208px;
}
?
I am not a CSS expert, but this *should* work.
It made it fit in the block as it should except the admin links at the top like history etc are being cut off and they dont go to the next line. I just don't see half of the links. Can I make them continue to the next line?
Just a question... Where would I place the shoutbox code in the index.template.php if I wanted it under the menu but above forum posts and tinyportal blocks and above boards etc?
@brianjw: Odd, it appears to be a CSS bug of some sort. I will visit your site later today and see what I can do :)
[announce]Version 1.09 released.
Two options, "$maxShoutChars" and "$maxUsernameChars" have been added to control shout and username length, respectively. Username length control doesn't work on registered users, only on guests.
Addition of a maintenance/lock mode option to prevent posting to the shoutbox by anyone but admins/mods. This can be used to post frequently-changing announcements (without having to edit news) or to make changes to the forum/shoutbox without interference.
OK, well I am going to install your 1.09 version of the shoutbox sometime later today as well. You have a registered account on my site so you can login and everything there etc. ;)
Thanks,
If you need me to give you administrator access let me know.
I've installed this mod and everything went OK. On one moment the SB was gone, only the words Shout Box. I've delete the mod en installed them again. In the themes it's OK, but in de standaard theme the SB isn't working, I can only see the words Shout Box.
Can anybody help me? Thanks.
@brianjw: Easy fix: instead of between the commands, use a regular space (" "). nbsp stands for non-breaking space: i.e. a space that won't break when the width is insufficient.
@Puka: not sure what the problem is; I might have a bug in 1.09. Have you checked server error logs?
Hi,
I get this error in the log:
QuoteMKPortal is missing!! Urlobox requires MKPortal to function. Check http://www.mkportal.it
I tried to install with the portal on, now there's one different thing. The SB said : Shoutbox is loading
Try visiting /path/to/forum/yshout/yshout.php and see what comes up.
The error code (if anything) should tell you what the problem is.
If it says "Nothing to do", then the JavaScript is not correctly installed; if it's blank, you don't have the modifications.<language>.php edited; if it throws some kind of error (406, 403, 500, etc.) then it is failing to execute for some reason.
If you still can't figure out the problem, send me the link to your forum and I will take a look :)
Hi, I've browsed through this thread but I can't find the answer so I'd be really grateful for some help!
I've had 1.05 installed on SMF 1.1.3 for quite a while with no problems, over the last couple of days a problem has developed where shouts randomly disappear, both from the shoutbox and the history, it's then OK for a few hours. Very odd. The rest of SMF is working perfectly and I haven't changed anything.
I tried deleting the history but that had no effect.
So, I thought I'd upgrade to the latest version. However, I can't uninstall 1.05, package manager tells me "it has no uninstaller". I guess I'm going to have to uninstall it manually but have no idea how to go about it...
I don't suppose it's OK to just install the new version over the old one is it (he says hopefully)?
Thanks, Pops
nneo i love ur shoutbox man, its awesome!!! the only thing i want to tweak on my server is that the inactive interval... its currently set to stop refreshing after 15 minutes of inactivity. But, i want it to change it to like 5 minutes or something. Please tell me where i should edit to make that change. Thanks!!!
@popabawa: Odd, this is very strange behaviour. Do the entire lines vanish, or are fragments of HTML still present? If it is the latter, then it could be corruption; the former may be the result of tampering.
1.05 was built when SMF 1.1.1 was the newest version. Because of this, it only uninstalls on 1.1.1.
Attached is a modified package with the uninstaller extended to include 1.1.3. Delete the existing package (don't uninstall), upload this one and then uninstall the mod (a safer way to do this would be to FTP it directly to Packages/ replacing the existing file).
Manual uninstallation of 1.05 basically consists of removing each block of code between "// YSHOUT HERE" to "// YSHOUT END" (3 blocks total) in Themes/default/index.template.php.
@www.livedown.us: My shoutbox has no inactive interval. You are probably not using my shoutbox.
Nneonneo, that seems to have worked. Thanks :)
Also, I am going to use the smiley code too. How can I make it so guests cannot see the smileys also because it looks weird showing smileys but no shoutbox ;)
The /lock /unlock code I am not sure works. I cannot test it my self though (I think). Do I have to log out after locking the shoutbox to see the message and stuff?
Hey nneo,
Is it possible to implement that thing in your shoutbox? i know that interval thing i thought it was on your shoutbox (But i am using your shoutbox xD). Can u on your next release please implement a check so after a user is inactive for like 5 or 10 mins it stops refreshing and says (Are you still there? please click here!) or something like that. It would save a lot of refreshing for big forums and others alike. THanks!
@brianjw: You can hide it from guests by wrapping "if($user['is_logged'])" around the code in index.template.php.
Instead of
Quote from: pongsak on August 18, 2007, 11:10:08 PM4. Search after in index.template.php or boardindex.template.php depend on where u put shout box.
<div style="padding: 1ex 25px 1ex 25px;"id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /></div>
add
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
use
Quote4. Search after in index.template.php or boardindex.template.php depend on where u put shout box.
<div style="padding: 1ex 25px 1ex 25px;"id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /></div>
add
';
if($user['is_logged']) {
echo '<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
}
echo '
/lock and /unlock work AFAIK, but if you are an admin or mod you will not see the changes. In other words -- you need to have a regular user account or guest to test this feature. Once you lock the shoutbox, any users currently viewing the shoutbox will see no change, but all posts they make will fail. As soon as the shoutbox is reloaded (click new page, refresh whole page, etc.) they will see the locked message.
@www.livedown.us: Simple to implement.
In yshout/js/yshout.js:
Near the top somewhere add
var inactivePeriod = 600; // in seconds, 600s = 10 minutes
var lastActiveTime;
After
function startRefresh()
{
add
lastActiveTime = (new Date()).getTime() / 1000; // do in seconds
After
set_cookie("yShout_open","true",3/*seconds*/);
add
if (((new Date()).getTime() / 1000) - lastActiveTime >= inactivePeriod && refreshSet)
{
$("shouts").innerHTML += '<p><b>Refreshing stopped due to inactivity; click <a href="javascript:loadChat()">here</a> to resume refreshing.</b></p>';
refreshSet = false;
return;
}
As you can see, this feature is purely controlled by JS and requires no special help from the PHP script. The inactive timer resets when the user shouts (or otherwise interacts with the shoutbox, such as clicking the Commands link), or if the shoutbox is reloaded (which occurs on a page refresh, or upon clicking the resume-refresh link).
How can I give the moderators option to bann and delete posts in the shout box? This might have already been answered and I over looked it.
It has been answered before:
http://www.simplemachines.org/community/index.php?topic=137508.msg879855;topicseen#msg879855 (a long time ago, I don't blame you for not being able to find it :) )
Quote from: nneonneo on August 25, 2007, 12:04:01 AM
It has been answered before:
http://www.simplemachines.org/community/index.php?topic=137508.msg879855;topicseen#msg879855 (a long time ago, I don't blame you for not being able to find it :) )
Thank you so much.
Quote from: nneonneo on August 25, 2007, 12:04:01 AM
It has been answered before:
http://www.simplemachines.org/community/index.php?topic=137508.msg879855;topicseen#msg879855 (a long time ago, I don't blame you for not being able to find it :) )
I'm a newbie at this and I can't seem to find any of that to put that option in. Is there any way to explain it any better? Sorry. I'm using the DarkSter theme.
Eh? The code goes in the file /path/to/forum/yshout/yshout.php, not any specific theme file.
Find the line
$user=ssi_welcome('nothing'); // ssi_welcome only does something IF the parameter is 'echo'; otherwise the user data is returned!
and add after that
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;
}
}
replacing 2,3 with the IDs of moderators (usually 2 is Global Mod, 3 is Moderator) (code has been slightly updated).
Every some seconds... the shoutbox collapses on me... even while I am typing. I use a custom them with TP, shoutbox is placed in a php center block. Everything works perfect .. except it auto-collapses every some seconds... very annoying. I read many posts regarding this problem but have yet come pass a solution... unless I really missed it somewhere.
Please advise, and thank you for your hard work.
Never mind... I fixed it after reading whole bunch of posts again and came across ruelnov's post:
Quote
Auto-collapse was fixed after I changed $updateTimeout=20; TO $updateTimeout=10; in yshout.php.
i've one suggestion.
I want function "quote" before each line like the one when we click show admin links.
But if can use for everyone.
Sometimes several members use at the same time and when we respose
sometimes it confused.The quote will help this.
nneonneo, can you please or anyone... help me modify the function readChat so it can appear like this:
QuoteHistory Commands ExtendedHistory
ShowAdminLinks ReturnToShoutbox
USERNAME
date....
time....
Message
That way it can be inserted nicely into the left/right block of Tinyportal.
Function readChat:
function readChat($chatFile, $logDir) {
global $user;
if(isset($_SESSION['readingCmd']))
{
$c=$_SESSION['readingCmd'];
if($c[0]!='/') echo $c; // doMsg was used. Don't use doMsg with a slash unless you know what you're doing ;)
else
{
if($user['is_admin'] || $user['is_mod']) processCommand($_SESSION['readingCmd']); // execute the same command so the user gets to keep reading the message w/o interruption.
else processUserCommand($_SESSION['readingCmd']);
}
return ' ';
}
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$chatText = "";
if (file_exists($chatPath))
$chatText = file_get_contents($chatPath);
if ($user['is_admin'] || $user['is_mod'])
{
if (!isset($_COOKIE['yShout_hideadmlinks']))
{
$chatText = preg_replace('/<em title="(\\d+) \| ([^"]+)"><span class="shout-timestamp">\[<timeval=(\d+)>\]<\/span> ([^<])/','<em title="\\1 | \\2"><span class="shout-timestamp">[<timeval=\\3>]</span> <a href="javascript:ajaxGet(\'banid=\\2\')"><span class="adminlink">ban</span></a> \\4',$chatText);
$chatText = preg_replace('/<em title="(\\d+ \| [^"]+)"><span class="shout-timestamp">\[<timeval=(\d+)>\]<\/span>/','<em title="\\1"><span class="shout-timestamp">[<timeval=\\2>]</span> <a href="javascript:ajaxGet(\'file='.$chatFile.'&delete=\\1\')"><span class="adminlink">del</span></a> ',$chatText);
$chatText = preg_replace('/<a href="index\.php\\?action=profile;u=(\\d+)">/','<a href="javascript:ajaxGet(\'banid=\\1\')"><span class="adminlink">ban</span></a> <a href="index.php?action=profile;u=\\1">',$chatText);
}
}
else
{
$chatText = preg_replace('/<em title="(\d+) \| [0-9.]+"><span class="shout-timestamp">/','<em title="\\1 | logged"><span class="shout-timestamp">',$chatText);
}
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
return $chatText.' '; // hack: totally empty responses can break some browsers
}
@pongsak: Sure, I guess.
In yshout/yshout.php, in the writeLine function:
after
preparsecode($newText); // gah, sanitize input!!
add
$origText = str_replace(array('"',"'"),array('\\x22','\\x27'),$newText);
and after
$writeText="<p$p_class><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span> ";
add
$writeText.='<a href="javascript:$(\'shout-text\').value += \'[quote author='.strip_tags($shoutName).']'.$origText.'[/quote]\';void(0);"><span class="adminlink">quote</span></a>';
Note that this code is not tested, but it should work (barring any syntax errors).
@vno: You will want to modify two locations: preg_timeformat, and the stuff under 'case "init":'.
Under case "init": are the codes for the quick links (History, Commands, etc.). Insert a <br /> between ExtendedHistory and ShowAdminLinks to break them up.
So, at the end of
echo ' <a href="javascript:goTo(\'file=',checkName($chatFile),'&history&n=\'+prompt(\'How far back?\',200))">',$txt['yshout_exthistory'],'</a>';
just change '</a>' to '</a><br />'.
Change preg_timeformat to change the appearance of the datestamp. Something like "return strftime('%D<br />%T', intval($matches[1]));" should work (it will appear as
05/24/96
05:46:28
though you can tweak the strftime format to your liking; see http://ca.php.net/strftime).
Problem with this approach is that the users' local time settings are not respected; rather, only the server time offset will be taken into account. This may be problematic if you have users from around the world.
The final result:
History Commands ExtendedHistory
HideAdminLinks ReturnToShoutbox
date
time
username:
message
You can use CSS modifications to get the date/time and username to look like you want.
Hope that helps,
nneonneo
About quoting it's not work.
I paste the picture here. http://img337.imageshack.us/img337/4071/psk24fq3.jpg
(http://img337.imageshack.us/img337/4071/psk24fq3.jpg)
When mouse on the quote link , it shown
javascript:$('shout-text').value+='[quote author=<img src=
It seems that sb copy entire line below the original line and make sb more confused.
Just want
[Time 1] del ban quote [name1]:message1
[Time 2] del ban quote [name2]:message2
and so on...and quote can see by everyone not just the admin
Thanks a lot.
Hi neoneo, I already browsed this thread but cannot find the solution to my problem. My shoutbox's History, Commands, Extended History and other links are not working. Before I upgraded my SMF to 1.1.3 and Shoutbox to 1.08, everything is working fine. I'll appreciate if someone can help me. My forum's URL is http://www.allpinoystuff.net/forum/index.php. Test account is:
user name=test
password=test
Wondering if someone can work my index file for me. I tried about 6 times and can't get it right.
site is www.njsaltwaterfisherman.com/forums I'm having a lot of trouble entering the location code.
is it possible, to hide the sb for guests?
and if so, what must I change
thanks
Quote from: nneonneo on August 24, 2007, 02:34:45 PM
@popabawa: Odd, this is very strange behaviour. Do the entire lines vanish, or are fragments of HTML still present? If it is the latter, then it could be corruption; the former may be the result of tampering.
1.05 was built when SMF 1.1.1 was the newest version. Because of this, it only uninstalls on 1.1.1.
Attached is a modified package with the uninstaller extended to include 1.1.3. Delete the existing package (don't uninstall), upload this one and then uninstall the mod (a safer way to do this would be to FTP it directly to Packages/ replacing the existing file).
Manual uninstallation of 1.05 basically consists of removing each block of code between "// YSHOUT HERE" to "// YSHOUT END" (3 blocks total) in Themes/default/index.template.php.
The behaviour that I saw was that after clicking 'shout', the current contents of the shoutbox would be deleted and wouldn't be in the history file. Nothing else. I don't think it's tampering, we're an invite-only forum and I doubt any of the members has the necessary skills!!!
Many thanks for the uninstall script, that worked perfectly, I have upgraded to 1.09 so hopefully no more problems!
Quote from: elian on August 28, 2007, 03:22:46 AM
is it possible, to hide the sb for guests?
and if so, what must I change
thanks
Only use something like
if $context['user']['is_logged']{
--show sb--
}.
nneonneo, thanks for the advice, that helps a lot. I just need you to show me one more trick ( I think :D ) ... because the function readChat is too tricky for me.
This is what I have at the moment
[Today at xx:xxpm]vno: bla bla
bla bla bla
I want to center the time and date ..... Then have the "username" BREAK A NEW LINE instead of a continuous line with the time/date.... so it would be like this
>>>>> [Today at xx:xxpm]
Vno: bla bla bla bla bla bla bla bla bla
Thanks again... I really appreciate your contribution and your assistance to newbies... like myself. :D
@pongsak: Change .$shoutName.
to .strip_tags($shoutName).
, and "'"
by "'"
and the problem will be resolved (I did not think you would be using a username with HTML :P). I have modified the tip to include this. I have also just tested this on my forum; it works fine (as long as the fix is implemented, and the affected history and shout lines cleared). Quote is visible by all users.
@dence66: Turns out that some advertising code inserted from "adcode.adengage.com/js/ae_26704_adbox.js" also defines the "goTo" function (used by those links). To fix this, modify every instance of "goTo" in yshout/yshout.php and yshout/js/yshout.js to read "yshout_goTo".
@hotrod007: Where do you want it? First step is to find this code in index.template.php:
/* 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 add after it
// 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?Jul222007" 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
Next step depends entirely on where you want the shoutbox. The usual place is in the top header (near the time-logged-in information) -- this equates to somewhere in the "leftmenu" function in your index.template.php -- but you can also opt to place it somewhere else.
@elian: In yshout/yshout.php, change "$allowGuests" to false.
@popabawa: This appears to be a problem with truncateChat, from what you described. I wish I had more time to look over the problem; could be bad permissions, a script error or probably a dozen other causes. Best fix would be to delete the chats folder and recreate it with "home.txt" as the only file inside if this happens again.
@vno: In the preg_timeformat function (in yshout/yshout.php), change "return xxxx;" to "return '<center>'.xxxx.'</center><br />';" where xxxx is whatever is between return and the final semicolon (";"). This should cause the timestamp to be centered and on a line by itself.
Thanks nneonneo! :D
What about having the username BREAK into a different line rather continuing with the date/time. How can I modify that in the function readChat or where ever that is?
example:
[date,time]
Vno: bla bla bla
Thanks again, Sir!
Hmm? The <br /> in "return '<center>'.xxxx.'</center><br />';" should take care of that.
Thanks For the reply. Yea I'd like it at the very bottom of my forum. Under my google footer.
Quote from: nneonneo on August 28, 2007, 02:21:54 PM
Hmm? The <br /> in "return '<center>'.xxxx.'</center><br />';" should take care of that.
Ahhhh... I see and it works great! One small thing... :D ...
Changed mine to:
return '<center>'.timeformat(intval($matches[1]), true).'</center><br />';
now it looks like this:
Quote[
Date,Time
]
Vno: bla bla bla
I looked around but can't see where I can remove the [ ] .. can you point me direction as where to look. :) .. thanks
After correct the code for quote, it still have some bug.
1. The "quote" word is in a new line under the original line.
(http://img337.imageshack.us/img337/7507/psk27kk9.jpg)http://img337.imageshack.us/img337/7507/psk27kk9.jpg
2. When i click "quote" ,it redirect to a new page and there's only "[ quote author= writer ]s hout_text [ / quote ]" within.
I must copy that and go back to previous page and paste into sb instead.
3. If i paste that code (with [ quote ][ /quote ] tag) and shout , it'll show quote area as in the post.
It make sb look terrible cause the quote area is as wide as the whole page.
I'll make an example
[Time 1] quote [name1]:How r U? //then name2 click quote
[Time 2] quote [name2]:(How r U?) Oh, Fine thanks. //something like that.
Thanks nneonneo.
@hotrod007: Depends again on if you want the code to be in the "white area" or the "black area". For the white area, you should insert the code immediately after the global line in template_main_below; for the black area, it's a bit more complicated.
@vno: Wrap the timeformat function call with "substr(timeformat(...), 1, -1)" (so it appears as return '<center>'.substr(timeformat(intval($matches[1]), true), 1, -1).'</center><br />';
)
@pongsak: Try clearing out all the existing shouts (/clear), then try again. It should work better. As to why it opens a new window, I don't know; what browser are you using? Finally, to fix the other problem, I thought you wanted to use SMF's quoting. If that's not necessary, then you can simply change the [ quote ] ... part in the code to something else.
Sounds simple. Right after this right? template_main_below;
Right after this:
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
add
// 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
Assuming you've added the other code block (CSS+JS), the shoutbox should now function right under the Google ads.
it's there now.. I added the code under internet explore.... and the postion code.. I see it but I have this error showing on top of it
Fatal error: Call to undefined function: session_commit() in /vservers/hotrod007/htdocs/forums/yshout/yshout.php on line 651
You can see the error here.
www.njsaltwaterfisherman.com/forums
guest is at false, seems like it just hangs loading for guests..
Change session_commit to session_write_close in yshout/yshout.php.
Quote from: nneonneo on August 28, 2007, 08:21:35 PM
@pongsak: Try clearing out all the existing shouts (/clear), then try again. It should work better. As to why it opens a new window, I don't know; what browser are you using? Finally, to fix the other problem, I thought you wanted to use SMF's quoting. If that's not necessary, then you can simply change the [ quote ] ... part in the code to something else.
I use FF, and IE also open a new page too.
The word "quote" is in same line now, but the new page open when click quote still.
PS. I guess may be u 'll forget "writelog" 8-)
Quote from: nneonneo on August 28, 2007, 11:47:13 PM
Change session_commit to session_write_close in yshout/yshout.php.
Bingo!. All Good. Thanks For all the help..
Hotrod
@pongsak: Strange that it should open a new window. It worked for me in Safari and FF, though I did not test IE. Maybe something else on te page affects it. What is your forum URL?
@hotrod007: Good to hear :)
nneonneo,
I changed to what you recently advised:
return '<center>'.substr(timeformat(intval($matches[1]), true), 1, -1).'</center><br />';
And the result looks like this:
[
b>Today at 10:00:42 A
]
Vno: bla bla bla
... so it's still resulting with the "[]" ..... and I have no clue how the "b>" before the date and "A" after the time got there. :D
Thanks
D'Oh! Sorry, I told you the wrong instructions.
Revert the last change (i.e. remove the substr(...,1, -1)) (so it looks like
return '<center>'.timeformat(intval($matches[1]), true).'</center><br />';
again) and do the following change:
Find
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
replace with
$chatText=preg_replace_callback("/\[<timeval=(\d+)>\]/","preg_timeformat",$chatText);
and it should work
Quote from: nneonneo on August 29, 2007, 11:14:20 AM
@pongsak: Strange that it should open a new window. It worked for me in Safari and FF, though I did not test IE. Maybe something else on te page affects it. What is your forum URL?
http://www.simplemachines.org/community/index.php?topic=137508.msg1208692#msg1208692
That works PERFECT!
Thanks nneonneo! :)
One another question :D.
Some member request me to config yshout line specific for any person, then i'd added yshout_line column in smf_members and then read it in yshout.php with loadMemberData(id).
Suppose A = 15 lines; B = 10 lines, after /clear function.
if no one use yshout but A , A's 15 lines, and if only B use, B's 10 lines.
But if A and B use together, A's 15 lines and B's 15 lines too, Why? (i test in same computer but use A in FF and B in IE )
@pongsak: Reason why this happens is because it is reading the home.txt file in all cases, which contains a certain number of lines. If you want to avoid this behaviour, you can opt to set max_lines to a "global" maximum (e.g. 100), then use the tail library (included) to just get the last n lines according to preference.
Instead of
$chatText = file_get_contents($chatPath);
in readChat, you would use {
require_once("class.tail.php");
$mytail = new tail($chatPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines(<NUMBER OF LINES>);
$chatText=$mytail->output(PLAIN);
}
where, of course, <NUMBER OF LINES> is how many lines should be shown.
@vno: Good to hear :)
@pongsak (update): Yes, adding ";void(0)" to the end of the href in the quote should prevent it from opening a new window. I had forgotten that it returned a value.
The end of the line should look like
'[/quote]\';void(0);"><span class="adminlink">quote</span></a>';
To make it not use the SMF quoting style, you can make the line look like this:
$writeText.='<a href="javascript:$(\'shout-text\').value += \'\\x22'.$origText.'\\x22 \';void(0);"><span class="adminlink">quote</span></a>';
which will make the quote look like
nneonneo: arghblargh
otheruser: "arghblargh" seriously?
You can edit it however you like, but please make sure that single quotes are encoded as \\x27 and double quotes as \\x22 because otherwise they will be misinterpreted by either the HTML or the Javascript.
Thanks a lot, the quote it works well now.
For line numbers,
Quoteset max_lines to a "global" maximum (e.g. 100)
I didn't set it to fixed number cause i intend to give it flexible to member need.
This the code i used.
loadTheme();
// Set the maximum amount of lines to be displayed at a time
global $user_profile, $user;
loadMemberData(array($user['id']));
if (!empty($user_profile[$user['id']]['yshout_line']))
$max_lines = $user_profile[$user['id']]['yshout_line'];
else
$max_lines = 10;
$max_lines+=1;
after i chage the code to
if (file_exists($chatPath))
{
require_once("class.tail.php");
$mytail = new tail($chatPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines($max_lines);
$chatText=$mytail->output(PLAIN);
}
All the previous messages 'd disappear.
There's nothing appear in shoutbox after sending message.
PS: i use $max_lines cause i've set line settings individually (that read from database).
See, the reason why I told you to set $max_lines to a global maximum is because it controls the truncate option. The main shout file is truncated once it reaches a set number of lines -- $max_lines -- and, as it currently stands, this truncation limit varies from person to person. Setting max_lines to a reasonable maximum (to ensure tail doesn't take too long to run, but provide a high enough ceiling that any user will be satisfied) will ensure that the chat file always has enough lines to show anyone.
Using a different variable (e.g. $display_lines) and adding it to the globals list in readChat should fix this problem.
Change
function readChat($chatFile, $logDir) {
global $user;
to
function readChat($chatFile, $logDir) {
global $user, $display_lines;
and
$mytail->setNumberOfLines($max_lines);
to
$mytail->setNumberOfLines($display_lines);
(incidentally, the reason why the shoutbox is blank is because max_lines is not on the globals list).
Then, your own code looks like
loadTheme();
// Set the maximum amount of lines to be displayed at a time
global $user_profile, $user;
loadMemberData(array($user['id']));
if (!empty($user_profile[$user['id']]['yshout_line']))
$display_lines = $user_profile[$user['id']]['yshout_line'];
else
$display_lines = 10;
This should ensure that the line settings for all users are respected, that the history view is functional and that the chat file has enough entries (lines) to show for all users.
That probably wasn't the most clear explanation I could give; if you need clarification just ask.
I have looked in the thread, sorry if I missed it, LONG thread.
I love this mod though I have a problem, I use TP along with a created theme, and when people try to upshrink the header, it closed the shout box and won't open. It's in a center block and it may have been another mod, I am not sure but I can't find the problem at all.
Here is a screen shot. Thanks for the help, I am out of ideas!
(http://img444.imageshack.us/img444/3797/shoutboxyx7.jpg)
What do you mean by "broken"?
Did you insert the "upshrink" code (JS block which looks like // YSHOUT HERE
document.getElementById("yshout").style.display = mode ? "none" : "";
if(!mode)
{
loadChat();
}
// YSHOUT END
) into the theme? This code causes problems for forums which either don't use the usual location (pongsak, this applies to you too because you did not put the shoutbox in the usual header location) or which use custom themes.
If you did use this code, remove it from index.template.php, and remove ', empty($options['collapse_header']) ? '>' : ' style="display: none;"
as well.
If this isn't the case, let me have a look at your forum.
Great, work like a charm.
Quote from: nneonneo on August 29, 2007, 10:46:11 PM
What do you mean by "broken"?
It went up but won't go back down. The button is there but it just won't come back down.
I don't actually have that stuff in there, I added :
// YSHOUT HERE
global $boardurl;
echo '
<script src="http://justue.com/yshout/js/prototype.js" type="text/javascript"></script>
<script src="http://justue.com/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="http://justue.com/yshout/js/behaviour.js" type="text/javascript"></script>
<script src="http://justue.com/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="http://justue.com/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: #CCCCCC;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
color: #B7C3D0;
}
#yshout #forum-name {
color: #50729F;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #9AC0CD;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
color: #FFFFFF;
}
#shouts .owner a {
color: #50A6C2;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END
Besides what I have posted in the phpbox. Thank you for your help, let me PM you a url.
QuoteThis code causes problems for forums which either don't use the usual location (pongsak, this applies to you too because you did not put the shoutbox in the usual header location) or which use custom themes.
I've seen it but don't get any error when i shrink main user bar, sb in info area 's collapse too. It's nice, i think.
@pongsak: Excellent :)
As for the shrinking: if you like it, that's fine :)
@porcelainprincess: I've sent you a message.
Thanks to nneonneo again for a very cool mod. I am now quite satisfied with it's appearance on my TP's right php block.
My shoutbox now looks like this (from admin's view):
Quote
History Commands
ExtendedHistory
ShowAdminLinks
ReturnToShoutbox
_________________________
Date , Time
Username: message message
_________________________
I also modded so Guests can not shout nor able to see the message's typing content unless they login.
So to those that are using Tinyportal and want to implement nneonneo's shoutbox into a side block instead of the center... Here is my "newbie" instruction.
PLEASE BE ADVISED: Use my instructions only IF you want your shoutbox to appear like mine and you're not holding me responsible for any error occurs during your testing. :)
I never had a success installing this mod using admin's Package Uploading. All get a "Loading...." but nothing showed up.
To get it to work initially, I had to install it manually. Thus, I am using a custom theme. Therefore, installing it manually is required anyway. :)
Installing it manually is not hard at all. You just need to be patient and do a step at a time. The best way to add/edit a file/folder on your website root directory is by using an FTP software, such as CuteFTP.
Anyway... here we go....
STEP 1:::: You need to upload the "yshout" folder onto your forum main web directory.
STEP 2:::: You need to add a string of codes into your theme's index.template.php file. Open up your theme's index.template and look for this code (note: you can use ctrl-F):
/* 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" />';
Once you have located the code above, you need add this following string of codes right below it:
// 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?Jul222007" 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
That's ALL you need to do with your theme's index.template.php
STEP 3:::: You're almost done! Hang tight and take a deep breathe! :) Now you need to add another string of codes into your theme's languages/modifications.english.php file. In this file, open it up for editing. This time, you really don't have to find anything. All you have to do is just add the following string of codes. To make it more easier for you, in that file... scroll to the bottom of the page and you will see this "?>" ... without the quotes. Just right above that, add this string of codes:
// ---- 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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
<user>: 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>',
'/lock' => ' <message>: 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.';
// ---- End modification - nneonneo's Shoutbox ----
You're done with this step. You have 2 more steps to go! :D
STEP 4:::: Go back to the "yshout" folder in your forum's web root directory that you uploaded earlier. Open up that folder and you will see a "yshout.php" file. You need to edit this file so your shoutbox will appear as like mine. This is the easiest part! All you have to do is delete everything you see in this file and copy/paste mine onto yours. Here's mine... pre-modded:
<?php
// Version 1.09
// Editable Options (see yshout/js/yshout.js for more options)
// Set the maximum amount of lines to be displayed at a time
$max_lines = 12;
// Sets the directory to which to log
$logDir = "chats";
// Should we use GZip compression? If you are having trouble with the shoutbox, set this to false.
$gzipCompression=true;
// Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;
// Automatic Guest Usernames: should they be able to choose their own usernames?
// Set to some string (a prefix) if you want to disable guest choice of username
// Set to false if you want to allow guests to choose a username
$autoGuestName=false;//'guest-';
// Command options.
// If this is set to false, all typed commands are disabled.
// Admin functions, via admin links, are still available.
$allowCommands=true;
// If this is set to false, guests will be denied access to commands.
$guestCommands=true;
// How long should the script wait for the chats to update? (in seconds)
// If this is set to 0 the script will not wait at all,
// but this will be very detrimental to performance.
// Make sure this is less than the maximum script execution time
// on your server, or the shoutbox will never update.
$updateTimeout=10;
// User-defined array of commands to block.
// Example: $bannedCommands=Array('/impersonate');
// Note that since SMF recognizes /me by default, it can't be blocked.
$bannedCommands=Array();
// How many characters will be permitted in each shout.
$maxShoutChars=125;
// How many characters will be permitted in the username.
// This does not apply to SMF registered usernames.
$maxUsernameChars=25;
/* Documentation
Functions
Command Implementation:
doMsg(string $msg)
Causes the shoutbox to be replaced with $msg until they
use /return (useful for making error messages, etc.)
processCommand(string $text)
Process an admin command. If this function fails to find
a match, it defaults to the user commands.
processUserCommand(string $text)
Process a user command. This function attempts to match
against all known commands. If a valid command match
isn't found, the function will return false and the
shout ("command") will be displayed as a regular shout.
makeShout(string $text)
Produce a shout as if it was from the current user, but
having only a datestamp (and no profile link, etc)
help(string $command - default '')
Allows users to get help on a command. Use <arg> to
denote required arguments and [arg] to denote optional
ones. Note that all <> must be entered as < and >
or they will not work.
Make sure to add an entry in this function for any new
commands.
Shouting:
checkDir(string $logDir)
Check the target directory to make sure it exists.
checkName(string $chatFile)
Check the filename for invalidities.
readChat(string $chatFile,string $logDir)
Dump the contents of the chat file to the client. If the
client is viewing a special message or command, then
readChat simply executes that command or prints the
message back on screen (this command/message is stored
in $_SESSION['readingCmd'])
truncateChat(string $chatFile,string $logDir,integer $max_lines)
Move the first line of a file from the chat file to the
history as long as the chat file exceeds the set
maximum.
writeLine(string $chatFile, string $logDir, string $newText, array $user)
Write a shout to the chat file. $user is an SMF user
session array which determines the username and rank of
the poster.
writeBanList()
Write the current ban list to _banlist.php which is
require'd by this script at the beginning. This allows
for "dynamic" ban lists.
history()
Show the history file in a neat, formatted HTML style.
preg_timeformat(array $matches)
Function used to replace matched <timeval=[UNIX time offset]> with formatted times
as per SMF's timeformat function. Called through preg_replace_callback.
Important Globals
$_SESSION
readingCmd
The command (if it starts with /) or the message to be
read back to the user instead of the normal shoutbox
stuff.
$_GET
n
Used by the history() function to determine the # of
history lines to output.
help
If this is set, the shoutbox will output a full HTML
help message (using help()). Use as a standalone page.
history
If this is set, the shoutbox will output a full HTML
history page (with history()). Use as a standalone page.
banid
For the administrator's ban link: this is passed as the user
ID of the member to be banned.
delete
For deleting shouts; this is a string in the form
datecode | ip (this is the format used in the <em title>
unban
Username/identifier to unban (used by /banlist)
file
File to read for history and delete functions (will be checked)
$_POST
file
Chat file to use. Will be checked for bad characters.
reqtype
What function to carry out (shout, refresh, init)
shout
If reqtype is shout, then this is the shout to be made.
$_SERVER
REMOTE_ADDR
Used for $ip to determine their IP address.
Global Variables
$ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post
Ban variables. _ips or _names is the ban criteria (IP
address or username) while _readpost or _post is the ban
severity (banned from reading+posting or just posting)
$chatFile,$logDir
These determine the location of the chat file.
$chatFile comes from $_POST['file'] while $logDir is hardcoded.
$user
SMF user data array, gleaned from ssi_welcome as a hack.
This determines a lot of things about the user (like the username and status)
$max_lines
Maximum number of lines to have in the shoutbox. Used by truncateChat.
$ip
User's IP address. Gathered from $_SERVER['REMOTE_ADDR'].
$reqType
Request type; see $_POST['reqtype'].
Super-Duper Command Implementation
To add a command, first decide whether this command is *user* or
*admin/mod* level.
The general format of a command is "/command <reqargs>
[optargs]".
Commands are processed in processCommand or processUserCommand.
The former is for admin/mod commands, and the latter is for users.
Processing begins by parsing the args and then running through a
long switch/case block. In this block, you will add your command code.
Your code should begin with a "case '/commandname':" and end with a
return true; statement.
The two things you will have access to locally are $args and
$cmd. $args is a string containing all the arguments passed, and $cmd is
the exact command used. For example, with the command "/foo bar baz",
$cmd will be "/foo" and $args will be "bar baz". This will be handled by
the "case '/foo':" statement.
Globally, any of the superglobals are available, plus any
globals. All globals are declared already so there is no need to declare
them on your own.
To make a message appear on the client's shoutbox, set the
variable $_SESSION['readingCmd'] to $text (which is the main argument
for the processing function). This causes the exact text of the command
to be reparsed every time the user requests the shoutbox data, and your
information will be returned instead of the regular shouts.
Alternately, the doMsg function allows you to automatically set
a message that will stay up until they use /return.
Remember that whenever your function needs to exit, it must do
so with "return true;" so that the calling function will know not to
"shout" the command.
*/
session_start();
require(dirname(__FILE__) . "/../SSI.php");
require_once($sourcedir . '/Subs-Post.php');
require("_banlist.php");
if (!isset($maintenance)) $maintenance=false;
$defaultEncoding=(empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']);
header('Content-type: text/html; charset='.$defaultEncoding);
$ip = $_SERVER['REMOTE_ADDR'];
$max_lines+=1;
$user=ssi_welcome('nothing'); // ssi_welcome only does something IF the parameter is 'echo'; otherwise the user data is returned!
loadUserSettings();
loadTheme();
ssi_logOnline('nothing'); // don't want echo, so just use a nonexistant output method
function preg_timeformat($matches)
{
// format: <timeval=(value)>
return '<center>'.timeformat(intval($matches[1]), true).'</center><br />';
}
if (in_array($ip, $ban_ips_readpost) || in_array($user['username'], $ban_names_readpost) || in_array($user['name'], $ban_names_readpost))
die($txt['yshout_banned']); // exit;
if (!$user['is_logged'])
{
if(!$allowGuests)
die($txt['yshout_no_guests']);
if($autoGuestName!==false)
$user['username']=$user['name']=$autoGuestName.substr(md5($ip),0,4);
elseif(isset($_POST['username']))
$_COOKIE['username']=$user['username']=$user['name']=$_POST['username'];
elseif(isset($_COOKIE['username']))
$user['username']=$user['name']=$_COOKIE['username'];
}
// Do not edit below this line unless you know what you are doing
if(isset($_GET["history"]))
{
history();
exit;
}
if(isset($_GET["help"]))
{
help();
exit;
}
if(isset($_GET['banid']))
{
if (!isset($_GET['mode']))
{
global $boardurl;
doMsg(<<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<base href="$boardurl/">
<head>
<meta http-equiv="content-type" content="text/html; charset=$defaultEncoding" />
<title>{$txt['yshout_ban_conf']}</title>
</head>
<body>
<h1>{$txt['yshout_select_mode']}</h1>
<a href="javascript:ajaxGet('banid={$_GET['banid']}&mode=rp');">{$txt['yshout_rp']}</a>
<br />
<a href="javascript:ajaxGet('banid={$_GET['banid']}&mode=p');">{$txt['yshout_p']}</a>
</body>
</html>
EOF
);
exit;
}
if ($user['is_admin'] || $user['is_mod'])
{
if(!is_numeric($_GET['banid']))
{
// guest banning?
// ban by IP, since that's what will be listed for banning...
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_ips_',$_GET['mode'],$_GET['banid']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
exit;
}
if(loadMemberData(Array($_GET['banid']),false,'minimal')===false)
{
doMsg($txt['yshout_error'].$txt['yshout_no_user']);
exit;
}
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_names_',$_GET['mode'],$user_profile[$_GET['banid']]['memberName']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(isset($_GET['delete']))
{
if ($user['is_admin'] || $user['is_mod'])
{
global $logDir,$chatFile;
$chatFile=isset($_GET['file'])?$_GET['file']:"home.txt";
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$fileContents = '';
if (file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$fileContents=preg_replace('/<p[^>]*><em title="'.str_replace('|','\|',$_GET['delete']).'">.+\n/','',$fileContents);
$handle = fopen($chatPath, "w");
fputs($handle, $fileContents);
fclose($handle);
echo $txt['yshout_del_success'];
}
exit;
}
if(isset($_GET['unban']))
{
if ($user['is_admin'] || $user['is_mod'])
{
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_'.$_GET["type"].'s_','u',$_GET['unban']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(!isset($_POST["file"]) || !isset($_POST["reqtype"]))
die($txt['yshout_no_action']);
$chatFile = checkName($_POST["file"]);
$reqType = $_POST["reqtype"];
switch($reqType) {
case "init":
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
echo '<div style="text-align: center; margin-top: 5px; "><a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">',$txt['yshout_history'],'</a>   <a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a></div>';
if($user['is_admin'] || $user['is_mod'])
{
echo '<div style="text-align: center; margin-top: 5px; "><a href="javascript:goTo(\'file=',checkName($chatFile),'&history&n=\'+prompt(\'How far back?\',200))">',$txt['yshout_exthistory'],'</a></div>';
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo '<div style="text-align: center; margin-top: 5px; "><a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a></div>';
else
echo '<div style="text-align: center; margin-top: 5px; "><a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a></div>';
echo '<div style="text-align: center; margin-top: 5px; "><a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a></div>';
}
echo '<div id="shouts">';
echo readChat($chatFile, $logDir);
echo '</div>';
if (in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post))
echo '
<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>';
elseif(!$user['is_logged']) echo 'LOGIN to shout...';
elseif (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false)
echo '
<form id="shout-form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$maintenance,'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
else
{
echo '<form id="shout-form" action="#">
<fieldset>';
if (!$user['is_logged'] && $autoGuestName===false)
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" />';
else
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />';
echo '
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="" type="text" />
<input id="shout-button" type="button" value="',$txt['yshout_shout_button'],'" />
</fieldset>
</form>';
}
if($gzipCompression) ob_end_flush();
break;
case "shout":
if(!$user['is_logged']) break;
if (in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post)) break;
if (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false) break;
$shoutText = $_POST["shout"];
if($shoutText[0]=='/' && $allowCommands)
{
if($user['is_admin'] || $user['is_mod'])
{
if(processCommand($shoutText)) break;
}
elseif($user['is_logged'] || $guestCommands)
{
$shoutText=substr($shoutText,0,$maxShoutChars);
if(processUserCommand($shoutText)) break;
}
}
$shoutName = $user['name']; //$_POST["name"];
writeLine($chatFile, $logDir, $shoutText, $user);
truncateChat($chatFile, $logDir, $max_lines);
refreshChats(true);
break;
case "refresh":
refreshChats(false);
break;
case "autoshout":
if($user['is_admin'] || $user['is_mod'])
processCommand($_POST["shout"]);
break;
}
function doMsg($msg)
{
echo $msg; // tell user
$_SESSION['readingCmd']=$msg; // make sure user keeps seeing this message; see readChat
}
function processCommand($text) {
global $reqType, $chatFile, $logDir, $max_lines, $ip, $user, $bannedCommands, $txt, $maintenance;
global $ban_ips_readpost, $ban_ips_post, $ban_names_readpost, $ban_names_post;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces, duh!
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
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.
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat($chatFile, $logDir);
return true;
case "/lock":
if ($args=='')
{
doMsg($txt['yshout_error'].$txt['yshout_lock_arg_error']);
return true;
}
if($maintenance !== false)
doMsg(sprintf($txt['yshout_lock_changed'],$args));
else
doMsg(sprintf($txt['yshout_lock_success'], $args));
$maintenance = $args;
writeBanList();
return true;
case "/unlock":
if($maintenance === false)
{
doMsg($txt['yshout_error'].$txt['yshout_unlock_already']);
return true;
}
$maintenance = false;
writeBanList();
doMsg($txt['yshout_unlock_success']);
return true;
case "/banlist": // who's banned?
$_SESSION['readingCmd']=$text;
$temp=Array();
echo '<table>
<caption>',$txt['yshout_banlist_caption'],'</caption>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_ips_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_ips_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_names_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_names_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '</table>';
return true;
case "/ban": // need to be more specific!
doMsg($txt['yshout_error'].$txt['yshout_ban_type_error']);
return true;
case "/banuser": // go away, we don't like you!
case "/banip":
$type=($cmd=='/banip')?'ban_ips_':'ban_names_'; // prefixes for vars
$ar=explode(' ',$args,2); // true argument array. the "2" ensures that we cut only once: mode can't have spaces but user can.
if(count($ar)!=2) // whoops: only one argument?
{
doMsg($txt['yshout_error'].$txt['yshout_ban_mode_error']);
return true;
}
$mode=$ar[0]; // set up vars
$id=$ar[1];
doBan($type,$mode,$id);
return true;
case "/impersonate": // lets pwn some n00bs!
// <user> [userlevel] [ip] [userid] /[shout text]
$slashpos=strpos($args,' /'); // use ' /' as a separator, so we can see how many args came before
if($slashpos===false) // no shout? invalid formatting?
{
doMsg($txt['yshout_error'].$txt['yshout_imp_slash_error']);
return true;
}
$shout=substr($args,$slashpos+2);
$ar=explode(' ',substr($args,0,$slashpos));
$name='';
$userlevel=0;
$userid=0;
switch(count($ar)) // how many args did we get?
{
case 0: // no args--what are you doing?
doMsg($txt['yshout_error'].$txt['yshout_imp_uname_error']);
return true;
case 4: // reverse order to save space: we just set them from the back!
$userid=intval($ar[3]);
case 3:
$ip=$ar[2]; // corrupt the global >:D
case 2:
$userlevel=intval($ar[1]);
case 1:
$name=html_entity_decode($ar[0]);
break;
default:
doMsg($txt['yshout_error'].$txt['yshout_imp_max4_error']); // just so they know that we only have 4 params
return true;
}
$ip.='.'; // to set off the impersonated msgs
$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
writeLine($chatFile,$logDir,$shout,$fakeuser); // do it, write the line
truncateChat($chatFile, $logDir, $max_lines); // make sure to scroll it, or bad things will happen
echo readChat($chatFile, $logDir); // update admin's display
return true;
default: // it wasn't a command, n00b!
return processUserCommand($text);
}
return false;
}
function processUserCommand($text) {
global $reqType, $chatFile, $logDir,$max_lines, $ip,$ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$user,$bannedCommands,$func;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces, duh!
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
case "/help":
if(empty($args)) help();
elseif($args[0]!='/') help('/'.$args);
else help($args);
$_SESSION['readingCmd']=$text;
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat($chatFile, $logDir);
return true;
case "/pi":
$s_pi='141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609';
$n=5;
if($args!='') $n=intval($args);
$res=($n==0)?"PI IS EXACTLY 3!":'3.'.substr($s_pi,0,$n-1).(substr($s_pi,$n-1,1)+(substr($s_pi,$n,1)>=5?1:0));
// all that nasty little bit does is add the first n-2 chars, then add the last digit and increment if rounding is necessary.
makeShout($res);
return true;
case "/me":
checkDir($logDir);
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$newText = $args.' ';
$newText = $func['htmlspecialchars'](stripslashes($newText), ENT_QUOTES);
$newText = str_replace(array("[list]","[center]","[left]","[right]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
preparsecode($newText); // gah, sanitize input!!
$newText = parse_bbc($newText); // w00t!
censorText($newText);
$shoutName=$user['name'];
$userID=$user['id'];
$writeText = "<p><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span><font color=\"red\"> * $shoutName</em> $newText</p></font>\n";
$handle = fopen($chatPath, "a");
if($handle===false) die("File error (processing /me); aborted");
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two ppl write to it at once
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (processing /me); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
truncateChat($chatFile, $logDir, $max_lines);
refreshChats(true);
return true;
default:
return false;
}
return false;
}
function doBan($type,$mode,$id)
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$txt;
switch($mode)
{
case 'u': // nice guy
$r=$type.'readpost'; // need to search both ban arrays. Search this one first...
$index=array_search($id,$$r); // where is my little banned user?
if($index===false)
{
$r=$type.'post'; // ...and this one second on failure.
$index=array_search($id,$$r);
if($index===false) // whoops, both searches failed!
{
doMsg($txt['yshout_error'].'Couldn\'t find user to unban!');
return false;
}
}
array_splice($$r,$index,1); // cut the 1 element loose with splice. $$r is used because $r is the string variable denoting the target array.
doMsg("Success: unbanned $id.");
break;
case 'rp':
array_push(${$type.'readpost'},$id); // easy, huh!
doMsg("Success: banned $id from reading and posting.");
break;
case 'p':
array_push(${$type.'post'},$id);
doMsg("Success: banned $id from posting.");
break;
default:
doMsg($txt['yshout_error']."Invalid mode $mode! Use only 'u', 'rp' or 'p'!");
return false;
}
writeBanList(); // write the final report
return true;
}
function makeShout($text) {
global $chatFile,$logDir,$user,$max_lines;
writeLine($chatFile, $logDir, $text, $user);
truncateChat($chatFile, $logDir, $max_lines);
refreshChats(true);
}
function refreshChats($force=false) {
global $chatFile,$logDir,$user,$max_lines,$gzipCompression,$updateTimeout;
$time=file_exists("$logDir/$chatFile")?filemtime("$logDir/$chatFile"):0;
$start_time=time();
session_commit(); // so that future session requests succeed
while(!$force && (time() - $start_time < $updateTimeout) && $time && ($time==filemtime("$logDir/$chatFile")))
{
sleep(1);
clearstatcache();
}
if($gzipCompression) ob_start("ob_gzhandler");
echo readChat($chatFile, $logDir);
if($gzipCompression) ob_end_flush();
}
function checkDir($logDir) {
if (!is_dir($logDir))
mkdir($logDir);
}
function checkName($chatFile) {
$ret = $chatFile;
$ret = str_replace('/', '', $chatFile);
return $ret;
}
function readChat($chatFile, $logDir) {
global $user;
if(isset($_SESSION['readingCmd']))
{
$c=$_SESSION['readingCmd'];
if($c[0]!='/') echo $c; // doMsg was used. Don't use doMsg with a slash unless you know what you're doing ;)
else
{
if($user['is_admin'] || $user['is_mod']) processCommand($_SESSION['readingCmd']); // execute the same command so the user gets to keep reading the message w/o interruption.
else processUserCommand($_SESSION['readingCmd']);
}
return ' ';
}
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$chatText = "";
if (file_exists($chatPath))
$chatText = file_get_contents($chatPath);
if ($user['is_admin'] || $user['is_mod'])
{
if (!isset($_COOKIE['yShout_hideadmlinks']))
{
$chatText = preg_replace('/<em title="(\\d+) \| ([^"]+)"><span class="shout-timestamp">\[<timeval=(\d+)>\]<\/span> ([^<])/','<em title="\\1 | \\2"><span class="shout-timestamp">[<timeval=\\3>]</span> <a href="javascript:ajaxGet(\'banid=\\2\')"><span class="adminlink">ban</span></a> \\4',$chatText);
$chatText = preg_replace('/<em title="(\\d+ \| [^"]+)"><span class="shout-timestamp">\[<timeval=(\d+)>\]<\/span>/','<em title="\\1"><span class="shout-timestamp">[<timeval=\\2>]</span> <a href="javascript:ajaxGet(\'file='.$chatFile.'&delete=\\1\')"><span class="adminlink">del</span></a> ',$chatText);
$chatText = preg_replace('/<a href="index\.php\\?action=profile;u=(\\d+)">/','<a href="javascript:ajaxGet(\'banid=\\1\')"><span class="adminlink">ban</span></a> <a href="index.php?action=profile;u=\\1">',$chatText);
}
}
else
{
$chatText = preg_replace('/<em title="(\d+) \| [0-9.]+"><span class="shout-timestamp">/','<em title="\\1 | logged"><span class="shout-timestamp">',$chatText);
}
$chatText=preg_replace_callback("/\[<timeval=(\d+)>\]/","preg_timeformat",$chatText);
return str_replace("\n","\n<hr>",$chatText.' '); // hack: totally empty responses can break some browsers
}
// truncateChat function based on one written by Travis Roman (http://mapleglobal.mine.nu/)
function truncateChat($chatFile, $logDir, $max_lines) {
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$fileContents = '';
if (file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$lines = explode("\n", $fileContents);
if(count($lines) > $max_lines) {
$newText = substr($fileContents, strpos($fileContents, "\n") + 1);
$handle = fopen($chatPath, "w");
fputs($handle, $newText);
fclose($handle);
// History
$oldText = substr($fileContents, 0, strpos($fileContents, "\n") + 1);
$handle = fopen("$logDir/history.$chatFile", "a");
fputs($handle, $oldText);
fclose($handle);
}
}
function writeLine($chatFile, $logDir, $newText, $user) {
global $ip,$func;
checkDir($logDir);
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
// $ip = $_SERVER['REMOTE_ADDR']; // impersonate >:D
$newText .= " ";
$newText = $func['htmlspecialchars'](stripslashes($newText), ENT_QUOTES);
$newText = str_replace(array("[list]","[center]","[left]","[right]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
preparsecode($newText); // gah, sanitize input!!
$newText = parse_bbc($newText); // w00t!
censorText($newText);
// $newText = preg_replace("(http:\/\/(.+?) )is", "<a href=\"http://$1\" target=\"_blank\">http://$1</a> ", $newText);
$p_class = "";
if($user['is_admin']) $p_class = ' class="owner"';
if($user['is_mod']) $p_class = ' class="moderator"';
if(!$user['is_logged']) $p_class = ' class="guest"';
$shoutName=$user['name'];
$userID=$user['id'];
$writeText="<p$p_class><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span> ";
if($user['is_logged'])
$writeText.="<a href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
else
$writeText.="$shoutName";
$writeText.=":</em> $newText</p>\n";
$handle = fopen($chatPath, "a");
$failcount=0;
if($handle===false) die('File error (writeLine); aborted');
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
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
function help($command='')
{
global $user,$defaultEncoding,$txt;
$cmdlist=$txt['yshout_cmdlist'];
$cmdlistadmin=$txt['yshout_cmdlistadmin'];
if($user['is_admin'] || $user['is_mod'])
$cmdlist=array_merge($cmdlist,$cmdlistadmin);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<base href="/advforums/">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_cmd_reference']; ?></title>
</head>
<body>
<?php
if($command=='')
{
echo '<h1>',$txt['yshout_shoutbox'],' ',$txt['yshout_commands'],'</h1>';
foreach($cmdlist as $cmd=>$desc)
{
echo "$cmd$desc<br />\n";
}
}
else
{
if(isset($cmdlist[$command])) echo "$command{$cmdlist[$command]}<br />\n";
else echo "$command not found";
}
?>
</body>
</html>
<?php
}
function writeBanList() // generate our dynamic ban list, which is 'require'd at the start of this script
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$maintenance;
$writeText = "<?php\n"; // php header
$writeText .= '$ban_ips_readpost = '.var_export($ban_ips_readpost,true).";\n"; // bans
$writeText .= '$ban_ips_post = '.var_export($ban_ips_post,true).";\n";
$writeText .= '$ban_names_readpost = '.var_export($ban_names_readpost,true).";\n";
$writeText .= '$ban_names_post = '.var_export($ban_names_post,true).";\n";
$writeText .= '$maintenance = '.var_export($maintenance,true).";\n";
$writeText .= '?>'; // end tag
$handle = fopen("_banlist.php", "w");
if($handle===false) die('File error (writeBanList); aborted');
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two ppl write to it at once
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeBanList); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
function history()
{
global $logDir,$boardurl,$gzipCompression,$defaultEncoding,$txt,$user;
if (!$user['is_logged'])
{
echo '<h3>Shoutbox history available to logged in users only!</h3>';
return;
}
checkDir($logDir);
$chatFile=isset($_GET['file'])?$_GET['file']:"home.txt";
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$n=250;
if(isset($_GET['n'])) $n=intval($_GET['n']); // integers only!
if($gzipCompression) ob_start("ob_gzhandler");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<base href="<?php echo $boardurl,'/'; ?>">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></title>
<style type="text/css">
#yshout {
font-size: 8px;
font-style: normal;
FONT-FAMILY: arial, helvetica, verdana, sans-serif;
}
#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: #ffaa00;
text-align: center;
}
#yshout .adminlink {
font-size: 8pt;
color: #c00000;
}
#forum-name, #shout-text, #shout-button {
font-size: 10px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 140px;
margin-right: 5px;
}
#yshout #shout-button {
width: 60px;
}
#shouts .owner a {
color: #F00000;
}
#shouts .moderator a {
color: #00000F;
}
</style>';
</head>
<body>
<h1><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></h1>
<div id="yshout">
<div id="shouts">
<?php
global $user;
require_once("class.tail.php");
$mytail = new tail("$logDir/history.$chatFile");
$mytail->setGrep(".*");
$mytail->setNumberOfLines($n);
$text=$mytail->output(PLAIN).file_get_contents("$logDir/$chatFile");
if(!($user['is_admin'] || $user['is_mod']))
$text = preg_replace('/<em title="(\d+) \| [0-9.]+"><span class="shout-timestamp">/','<em title="\\1 | logged"><span class="shout-timestamp">',$text);
echo preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$text);
?>
</div>
</div>
</body>
</html>
<?php
if($gzipCompression) ob_end_flush();
exit;
}
?>
That's it for this step. Let's move to the final step:
STEP 5:::: Assuming you did not skip a step and everything was done correctly, go to your forum and inside TP's "manage block" panel, create a Left or Right "php" block. Inside that block you need to add this code:
echo '<div id="yshout"></div>';
That's it!!! You're pretty much done. Now if you want to change the color of the time/date stamp and text, you need to go back to your theme's index.template.php and edit them there.
Good luck and Happy testing! :D
Thanks again nneonneo ... couldn't have done it without you! ;)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
In addition:
If you want to add a scrollbar on your block, in your theme's index.template.php, add this:
#yshout #shouts {
overflow: auto;
width: 165px; /* the width you want to display */
height: 200px; /* the height you want to display */
}
before:
#yshout {
If you want to reverse the message display... say newest on top instead of bottom, in your yshout folder, open up your yshout.php file:
Find
$chatText=preg_replace_callback("/\[<timeval=(\d+)>\]/","preg_timeformat",$chatText);
Right after that, add this:
$chatText=implode("\n", (array_reverse(explode ( "\n", $chatText ))));
Thank you so much neoneo for the fix. My shoutbox can now display the history and other links at the top.
Anyway, I have a new problem with regards to the smiley mod of pongsak. I followed all steps carefully and put the codes correctly, however, I still got no luck running it. I have this error that prevents my forum from loading:
Parse error: syntax error, unexpected '<' in .../Themes/Black_Day/index.template.php on line 305
296:
297: // But, let's always show minutes - Time wasted here: 0 minutes ;).
298: echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'];
299: }
300:
301: // YSHOUT HERE
302: echo '
303: <br /><b>Shout Box</b><br /><br />
304: <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>';
305: <div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
306: require('mymod/smiley.php');
307: loadSmileys();
308: echo '
309: <div id="smiley_pic">';
I will really appreciate it if you can help me fix this.
Currently, I reverted to my old index.template.php so that I can use my forum. But whenever I try to upload the index.template.php in the zip file, the error message above appears.
Thank you so much in advance.
See the code <br /><br /><br /><br /></div>';
?
Remove the '; at the end.
Still lovin it!. great Job nneoooeo!!. Been able to add some things to it from all the great info here. and you timely responses. My hats off to you.
Wondering if I can make it blend in better on my forum.. Background and border?
also. I have it guest false. Did see you must register to be able to use the shout box. now I just see.. loading shout box.?
www.njsaltwaterfisherman.com/forums ( footer area)
Ah, this infamous bug.
As a guest, if you visit
http://njsaltwaterfisherman.com/forums/
you will see the message, but if you visit
http://www.njsaltwaterfisherman.com/forums/
you will not see it. How to fix? You either
a) tell users the first URL, not the second
b) fix your forum URL in server settings
c) force board_url to be "/forums" instead (probably ideal).
Doing c) requires that you edit index.template.php: change
var board_url = "', $boardurl, '";
to
var board_url = "/forums";
and that should fix the problem.
hey nneonneo,
can you help me installing this sbox to a custom skin?
no one wants to help me here. :(
I will be happy to help you. :)
Assuming you already have the mod installed please include the following file and some word of where you would like this to appear.
Include the file "index.template.php", depending on the theme you want you will find it in "/Themes/theme_name/". *please attach file*
And provide a somewhat detailed description on where you would like the shoutbox to appear.
Brianjw
thanks brianjw
but no, the mod is not installed yet, I'm having problems using upload package, im on windows server, so I cant set the chmod permission.
so I want to install manually. :o lol
can ya help ?
I have to wait another day now. *sigh*
Installing manually: upload the whole yshout folder from the package into forum root, make modifications to Modifications.<language>.php as noted on the main mod page and finally make the modifications to the custom theme(s).
Quote from: husam on August 31, 2007, 08:11:56 PM
I have to wait another day now. *sigh*
Why is that? Anyway I am logging off right now so attach that file and give descriptive location by tomorrow evening. NOTE: I am in eastern time, currently it is 8:31:02 PM
Quote from: brianjw on August 31, 2007, 08:31:02 PM
Quote from: husam on August 31, 2007, 08:11:56 PM
I have to wait another day now. *sigh*
Why is that? Anyway I am logging off right now so attach that file and give descriptive location by tomorrow evening. NOTE: I am in eastern time, currently it is 8:31:02 PM
nah cause most users reply back after days, slow support here.
*BUMP*
What are you bumping?
I need someone to tell me how to install this MANUALLY!
thats what I've been bumping for the last 4 days
and no one really cares to support
Nneonneo told you part of it above. The rest of it to manually install is looking in the xml file and reading the docs. Please don't yell....
I'm not yelling! lol
TBH I didn't notice his post, but I didn't understand what he wanted me to do.
so I need a step by step tut, or sum1 modify my files.
***READ your PMs brianjw
Quote from: nneonneo on August 31, 2007, 08:24:56 PM
Installing manually: upload the whole yshout folder from the package into forum root, make modifications to Modifications.<language>.php as noted on the main mod page and finally make the modifications to the custom theme(s).
In steps:
1) Upload yshout folder from package into forum root
2) Make modifications to Modifications.<language>.php as noted on the main mod page
3) Make modifications to custom theme(s) as noted on main mod page (two little pieces of code to insert)
Simple Question. I hope...
Noticed the shout box is blowing my page view stats out..
why is this?
does this mod uses the database of MYSQL? or does it use a html file as the database?
nneonneo:I am setting up the shoutbox for husam on my test site and husam has some things he would like removed....
1. The timestamp completely removed.
Also when I do a /me command it has a white ] in front of it like the following...
Any ideas? Thanks :)
husam: Do you want the shoutbox to scroll and show all the messages with the newest message on top or have it show only # messages at a time with newsest message on top or below?
Quote from: brianjw on September 02, 2007, 10:12:59 AM
husam: Do you want the shoutbox to scroll and show all the messages with the newest message on top or have it show only # messages at a time with newsest message on top or below?
newest message on below :) like yahoo messenger.
thanks
Quote from: husam on September 02, 2007, 01:06:39 AM
does this mod uses the database of MYSQL? or does it use a html file as the database?
This shoutbox doesn't use mysql to store anything. It uses the simple txt files which store messages and other things. Admins can delete and ban users. And through the txt files, admins (ftp able users) can modify messages and remove them manually through there.
Quote from: brianjw on September 02, 2007, 06:18:58 PM
Quote from: husam on September 02, 2007, 01:06:39 AM
does this mod uses the database of MYSQL? or does it use a html file as the database?
This shoutbox doesn't use mysql to store anything. It uses the simple txt files which store messages and other things. Admins can delete and ban users. And through the txt files, admins (ftp able users) can modify messages and remove them manually through there.
thx :)
nneonneo,
how do I remove the time stamps?
Hi,nneonneo.Do u have some idea what' the problem if one member told me that the sb just ..."loading"... while the other members 're fine.This happened sometimes .
He use Firefox , other part of smf borad 're ok.
So husam, are you satisfied with your shoutbox? :)
Does this Shout Box work with 1.1.3?
Quote from: brianjw on September 03, 2007, 09:04:19 AM
So husam, are you satisfied with your shoutbox? :)
chea! :) thx
just want to remove the time stamps.
That we can't do until nneonneo tells us how lol :D
yea lol, have you tried brian?
Yes. lol :D
Search for [<timeval=".time().">]
and remove it where it appears (twice).
Quote from: nneonneo on September 04, 2007, 10:24:00 AM
Search for [<timeval=".time().">]
and remove it where it appears (twice).
OK done, but something else man.
when we type /me
a ] appears before the line
example:
] * Husam w000000000000000ts
how do we remove the ] ?
That happened on my site too ;)
Hello,
No without difficulties, I've installed the mod, and have a few questions.
- I've modded to use the scrollbar, but when I'm over 200 ( in width), the scrollbar doesn't appear.... ( and the text in the shoutbox return to the line )
I would like the shoutbox to be larger.
Could someone help me ? :)
Thx a lot ( for the mods too )
@husam: Odd, there should not be a "]": maybe you did not remove the "]" at the end (just check quickly); if you can't resolve it, attach the modified yshout.php.
@forden: Browser bug, I suspect; try it on a different browser. Change the CSS code for width and/or height to change the shoutbox size.
nneonneo. I need to remove the shout box.. I understand how, But I had jem from the ad mode in it and he added somethings to my file. i cant seem to remove what i need. can you look at it.?
nneonneo, I 've a few problems to ask you, please.
1.if some members are still getting a stuck "loading shoutbox..." message, while the others don't.
What's may be the cause(s)? .
2. <b>Sometimes</b> sb stop to auto reload , i don't set the timer and must F5 then if ok again, why?
I found the "]" and removed it :)
@nneoneo : No, it's the same in Maxthon, IE, and Firefox.... :-(
When you write CSS, you mean in index.template.php ? And which parameter should I change, 'coz I changed a lot, and style too small. Plz help. :)
Thx a lot
All right. I modified it with success :)
Now, I'll try to change the username color in the shoubox, but I think someone should have speak of it those 52 pages.... :) I'll make a search
ok another thing lol..
can this be done?
screenshot:
http://img205.imageshack.us/img205/7486/wowla1.png
-------------------------------
oh and there's a problem, suddenly the (del) link for admins wont show anymore!
after I removed this line [<timeval=".time().">] from yshout.php
screenshot:
http://img526.imageshack.us/img526/7262/untitledyf6.png
--------------------------------
2 last things :p
How do I make the default font of chatting (bold) ?
And a line break on each post?
Thaaaaaanks! :p
How do I change the "me action" on the shout box. I changed it in my style.css but it doesn't change it in the shout. I also looked at these:
#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: #CCCCCC;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
color: #B7C3D0;
}
#yshout #forum-name {
color: #50729F;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #9AC0CD;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
color: #FFFFFF;
}
#shouts .owner a {
color: #50A6C2;
}
#shouts .moderator a {
color: #00F;
And unless I am blind, I don't see it :( Thanks for your help!
needed to remove the shout box. I uninstalled then removed what I pit in. but site is crashing with this error..??
Template Parse Error!
There was a problem loading the /Themes/rt_smf_versatility/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.
Parse error: parse error, unexpected '}' in .../Themes/rt_smf_versatility/index.template.php on line 401
392:
393:
394: echo '
395: <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
396: </script>
397: <script type="text/javascript">
398: _uacct = "UA-1570433-7";
399: urchinTracker();
400: </script></body></html>';
401: }
402:
403: // Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
404: function theme_linktree()
405: {
Did you try taking the } out of line 401?
Hi all:
I am having a very busy week -- it is the week before I start University. So, if I do not respond immediately, please don't be concerned.
With that said, I will try to answer your questions now (I have not yet set up a web server here, so I do not have the resources to test anything!).
@hotrod007: Remove everything between // YSHOUT HERE and // YSHOUT END; there are two (custom themes) or three (default theme) such pairs of tags in index.template.php.
@pongsak: Probably the domain name mismatch. In index.template.php, find ',$boardurl,'
(may not be exactly as shown) near "var board_url". Change that to /absolute/path/to/forum (so if your forum is at www.myforum.com/forum, use /forum). I don't understand the second question.
@husam: Should not be hard to do the line: add <hr style="border:0;height:1px;color:black" /><br /> after the commands. Second point: I think you should put the timeval thing back, but modify instead the place where timeval is replaced with a real timestamp. This should be where it says "preg_replace_callback" in readChat. Put [] around the <> in the timeval parameter, and modify the function preg_timeformat to "return '';" instead of whatever is currently in the function.
Linebreak after each post: just write "<br />" to log before "\n" of each chat in writeLine and /me.
Default font: modify CSS to say font-weight: bold.
@porcelainprincess: Look for case "/me": in yshout/yshout.php. The handling code is there.
Sorry for brief answers; I do not have the time to write lengthy details.
I read half of this enormous thread but still have the "loading shoutbox" error. I chmoded to 755, and is getting this error:
Premature end of script headers in the server error log.
My url is http://www.miydai.com.
Do you have the proper css code for the shoutbox inside the theme that you are using? This will cause the shoutbox to only show the things inside of the div which is ...loadingshoutbox...
AS a simple suggestion nneonneo I suggest moving the shoutbox location overall to something better. (Just a simple suggestion for a future version)
Most of the time I find they move it anyway. ;)
Quote from: brianjw on September 07, 2007, 08:45:53 PM
Do you have the proper css code for the shoutbox inside the theme that you are using? This will cause the shoutbox to only show the things inside of the div which is ...loadingshoutbox...
Yes, I have the css.
Quote from: nneonneo on September 07, 2007, 07:25:15 PM
@husam: Should not be hard to do the line: add <hr style="border:0;height:1px;color:black" /><br /> after the commands. Second point: I think you should put the timeval thing back, but modify instead the place where timeval is replaced with a real timestamp. This should be where it says "preg_replace_callback" in readChat. Put [] around the <> in the timeval parameter, and modify the function preg_timeformat to "return '';" instead of whatever is currently in the function.
Linebreak after each post: just write "<br />" to log before "\n" of each chat in writeLine and /me.
Default font: modify CSS to say font-weight: bold.
OK, I managed to add the break lines for both and it worked.
____________________________________________________________
I did the [] around the <> step
but can't really understand the return; step
-------
function preg_timeformat($matches)
{
// format: <timeval=(value)>
return timeformat (matches($matches[1]));
}
-------
what should i replace?
____________________________________________________________
about the css,
I think the CSS in the yshout.php is for the History page not the shoutbox
cause when I change to bold only in history page changes.
.
@Miraploy: The script is crashing, and I have no idea why. Do you have mod_security enabled? It is simply giving me a 500 error (the error "Premature end of script headers" means the script didn't get the chance to run, but quit instead for some reason before outputting anything).
@shadow82x: I don't know where it should go, anyway...
@husam: Change the return line to read
return '';
.
Yes, the CSS in yshout.php is for history only; the CSS for the shoutbox is in the index.template.php file (for customization to each theme).
Quote from: nneonneo on September 07, 2007, 07:25:15 PM
@porcelainprincess: Look for case "/me": in yshout/yshout.php. The handling code is there.
Sorry for brief answers; I do not have the time to write lengthy details.
Thank you as always ;) Don't worry take your time in answering, you're very helpful each time!
Quote from: nneonneo on September 08, 2007, 03:01:33 PM
@husam: Change the return line to read return '';
.
LOL!
http://img451.imageshack.us/img451/5598/loloe1.png
it's fooked now!
IT should have it's own private box IMO. Like a typical shoutbox.
Hi nneonneo, I asked my host and he turned it off. Can you take another look? Thanks.
@porcelainprincess: Glad to help when possible.
@husam: Reload and it should be fine. That's a symptom of random corruption as the page loads (unless I really did something wrong)
@shadow82x: I personally don't like adding more boxes to it, but I will consider that.
@Miraploy: Still doesn't work. Do you have the complete server error log? Remove any potentially private info (e.g. IP addresses) and post it (or PM it for privacy).
Quote from: nneonneo on September 08, 2007, 11:07:41 PM
@husam: Reload and it should be fine. That's a symptom of random corruption as the page loads (unless I really did something wrong)
I refreshed the page, still same error.
I attached the yshout.php without doing the changes, maybe you can find a better way?
I dunno.
This is really the only relevant error.
[Sun Sep 9 08:49:38 2007] [error] [client] Premature end of script headers: /home/gensun/public_html/yshout/yshout.php
Maybe I'm not looking in the right place, I'm looking at cpanel's
Last 300 Errors
This function will display the last 300 errors for your site. This can be very useful for determining what links are broken on your site, or what files do not exist that should. Checking this log frequently can help keep your site running smoothly.
Last 300 Error Log Messages in reverse order:
@husam: Post or PM the forum URL; I will check it out.
@Miraploy: Very strange. That should be the right place to get errors; maybe PM the whole log in case there is something you've missed.
Quote from: nneonneo on September 08, 2007, 11:07:41 PM
@porcelainprincess: Glad to help when possible.
@husam: Reload and it should be fine. That's a symptom of random corruption as the page loads (unless I really did something wrong)
@shadow82x: I personally don't like adding more boxes to it, but I will consider that.
@Miraploy: Still doesn't work. Do you have the complete server error log? Remove any potentially private info (e.g. IP addresses) and post it (or PM it for privacy).
Thanks - I hope its implemented because I don't find the current location good.
Perhaps I made a mistake with the index, here's the file.
@shadow82x: OK, I will consider this.
@Miraploy: No, nothing appears to be wrong with the index.template.php file. What version of PHP does your host have?
PHP version 5.2.3 according to cpanel.
Nneonneo, why when i copy link location and send.
The message from link such as http://www.... change to "log in" instead.?
But the link loacation is correct .
@Miraploy: OK, here's one. Try making a script with the following lines:
<?php session_start(); session_write_close(); ?>
and invoking it.
@pongsak: I don't know why the links would all change into login links. That's a bit weird. Try [url=http://www.google.com]Google[/url] and see if it works.
http://miydai.com/invokeit.php
Do you mean something like this?
Yes, that script works. I presume you have checked the yshout.php permissions: they are set to either 755 or 777 (try both); try pasting
echo 'test';exit;
at the top (in yshout.php), right after <?php tag to test if the script actually runs.
Quote from: nneonneo on September 10, 2007, 02:09:22 PM
@pongsak: I don't know why the links would all change into login links. That's a bit weird.
I've noticed that if the link 's the simple site ,no need to log in such as google , yahoo it works.
You can paste as http://www.google.com and everything's fine.
But if the link is need to log in, it come as "log in" such as my site, personal message page of smf.
May be involve to some function that parsing shout text .
Hi, done :P
Hello,
When I implement the smiley bar, it now appears well ( thx Pongsak ), but when I click a smiley it doesn't add to the shout-text....
What could be wrong ?
thx a lot
Do u include this line in boardindex.template.php
printSmileys('shout_form','shout_text');
@nneonneo: I used your 1.06 version and had no problem but after upgrading to version 1.09 and making the changes to the index.template.php my forum doesn't load at all! it just stays blank no error or anything. i take the yshout code out and my forum works fine but with no shoutbox.
please help I've included my index.template file if you need to look at it.
@pongsak: There is a mod which retrieves the page title from the URL, and posts that as the URL label. The shoutbox does BBCode parsing according to whatever the forum uses.
@Miraploy: Weird. Removing that line causes it to stop working, right? It's working right now...
@Trixter: It would probably be easier to see the forum, so post or PM your forum URL.
Yeah nneoneo. I just removed that line. :(
Yes removing that line causes the empty space to appear. Is there any other way you can help? I'm really sad that we cannot get it to work.
That line can be used for diagnostic purposes. Basically, it causes the script to quit but print a message before it does, to see if it is still running at that point.
By placing it at various points in the script, we might be able to isolate the problem line.
Place the line after "header('Content-type: text/html; charset='.$defaultEncoding);" and see if it works (if it works, it will print "test"; if not, nothing appears). Remove the line if it works, and place before "function preg_timeformat($matches)".
If that still works (i.e. it still prints "test"), place the line before "if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header".
This successive process should help me find the line which is incorrect.
Great idea, :P I failed at the first location. SSI problem possibly. Perhaps to do with flashchat integration? I know that messes with other functions as well.
I included subspost and ssi here.
How about trying every spot before the require?
Also, maybe the _banlist.php file is corrupt; clear it by resetting it to
<?php
$ban_ips_readpost = array (
);
$ban_ips_post = array (
);
$ban_names_readpost = array (
);
$ban_names_post = array (
);
$maintenance = false;
?>
Seems to be SSI... :(
Weird.
I visited http://www.miydai.com/SSI.php and I got the error
Fatal error: Out of memory (allocated 17039360) (tried to allocate 40961 bytes) in /home/gensun/public_html/Sources/Subs.php on line 2696
so, take a look at that line. It may be a mod which causes a general failure in the SSI script.
Thanks, I checked the line and I don't think it's a mod:
// Ends execution. Takes care of template loading and remembering the previous URL.
function obExit($header = null, $do_footer = null, $from_index = false)
{
global $context, $settings, $modSettings, $txt;
static $header_done = false, $footer_done = false;
// Clear out the stat cache.
trackStats();
$do_header = $header === null ? !$header_done : $header;
if ($do_footer === null)
$do_footer = $do_header;
// Has the template/header been done yet?
if ($do_header)
{
// Start up the session URL fixer.
ob_start('ob_sessrewrite');
// Just in case we have anything bad already in there...
if ((isset($_REQUEST['debug']) || isset($_REQUEST['xml']) || (WIRELESS && WIRELESS_PROTOCOL == 'wap')) && in_array($txt['lang_locale'], array('UTF-8', 'ISO-8859-1')))
ob_start('validate_unicode__recursive');
This is the area around there, the actual ine is ob_start('ob_sessrewrite');
I attached subs.php.
As you have PHP5, can you do this for me?
Place debug_print_backtrace();
right before that crashing line. This will cause a trace to be printed, hopefully before the script dies.
This may cause strange data to appear on your forum, so ignore that stuff and remove it once you get a successful backtrace.
I have a problem. I installed the mod and did all except putting the second part:
// 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 dont know where to put it in the index.template.php of my theme. I prefer the shoutbox to appear before the Info Center, i mean below all the forums. Is that possible?
This is my themes 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'] = true;
/* Show sticky and lock status seperate from topic icons? Leave true, icons don't exist for false.*/
$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" />';
// 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?Jul222007" 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
// 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 language="JavaScript" type="text/javascript"><!-- // --><![CDATA[';
echo '
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>';
//Change width to 100% if you want it fluid.
echo '
<div align="center">
<table id="widthControl" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="28" height="28"><img src="', $settings['images_url'], '/bc_topLeft.gif" width="28" height="28" alt="" /></td>
<td width="100%" height="28" background="', $settings['images_url'], '/bc_topBG.gif"><img src="', $settings['images_url'], '/spacer.gif" width="1" height="28" alt="" /></td>
<td width="29" height="28"><img src="', $settings['images_url'], '/bc_topRight.gif" width="29" height="28" alt="" /></td>
</tr>
<tr>
<td width="28" background="', $settings['images_url'], '/bc_leftBG.gif"><img src="', $settings['images_url'], '/spacer.gif" width="28" height="1" alt="" /></td>
<td width="100%" valign="top" style="background-color:#ffffff;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="67" align="left" valign="top" style="padding:0;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" height="67" width="527"><img src="', $settings['images_url'], '/logo.jpg" width="527" height="67" alt="MUSICONICA" title="MUSICONICA" /></td>
<td align="right" valign="top" height="67" width="100%"><img src="', $settings['images_url'], '/lcd.jpg" alt="" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" width="100%" align="left" valign="top" style="padding:0;">';
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'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $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']) ? '' : ' style=""', ' 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">
<a href="http://www.webtechnica.com/" target="_blank"><img src="', $settings['images_url'], '/88x31_banner_white.gif" width="88" height="31" alt="Theme by webtechnica.com" title="Theme by webtechnica.com" /></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> | <a href="http://www.php.net/" target="_blank" style="font-size:10px;">PHP</a> | <a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a> | <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>
</td>
<td width="29" background="', $settings['images_url'], '/bc_rightBG.gif"><img src="', $settings['images_url'], '/spacer.gif" width="29" height="1" alt="" /></td>
</tr>
<tr>
<td width="28" height="29"><img src="', $settings['images_url'], '/bc_bottomLeft.gif" width="28" height="29" alt="" /></td>
<td width="100%" height="29" background="', $settings['images_url'], '/bc_bottomBG.gif"><img src="', $settings['images_url'], '/spacer.gif" width="1" height="29" alt="" /></td>
<td width="29" height="29"><img src="', $settings['images_url'], '/bc_bottomRight.gif" width="29" height="29" alt="" /></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>
</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> | <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"..
function theme_linktree()
{
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 ' » ';
}
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" /> ';
}
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" /> ';
}
else
{
echo '» ';
}
// 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" /> ';
// 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" /> ';
// 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 ' » ';
}
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;">Quick Search</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;" />
<input type="submit" name="submit" value="GO" />
<input type="hidden" name="advanced" value="0" />';
// Search within current topic?
if (!empty($context['current_topic']['allow_search']))
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']['allow_search']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
if ($context['allow_search'])
echo '
</form></td>
</tr>
<tr>
<td height="20" align="center" valign="middle" class="windowbg"><a href="', $scripturl, '?action=search;advanced">Advanced Search</a></td>
</tr>
</table>
<div align="right" style="font-size:10px;"><a href="#" onClick="overlayclose(\'subcontent\'); return false">[Close]</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\')">Quick Links<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;">Quick Links</td>
</tr>
<tr>
<td height="20" align="left" valign="middle" class="windowbg"><a href="', $scripturl, '?action=unread">New Posts</a></td>
</tr>
<tr>
<td height="20" align="left" valign="middle" class="windowbg"><a href="', $scripturl, '?action=unreadreplies">New Replies</a></td>
</tr>
<tr>
<td class="catbg" height="20" align="left" valign="middle" style="color:#ffffff;">User Settings</td>
</tr>
<tr>
<td height="20" align="left" valign="middle" class="windowbg"><a href="', $scripturl, '?action=profile">View Profile</a></td>
</tr>
<tr>
<td height="20" align="left" valign="middle" class="windowbg"><a href="', $scripturl, '?action=profile;u=', $context['user']['id'], ';sa=account">Account Settings</a></td>
</tr>
<tr>
<td height="20" align="left" valign="middle" class="windowbg"><a href="', $scripturl, '?action=profile;u=', $context['user']['id'], ';sa=forumProfile">Edit Profile</a></td>
</tr>
</table>
<div align="right" style="font-size:10px;"><a href="#" onClick="overlayclose(\'quicklinks\'); return false">[Close]</a></div>
</DIV>
</td>';
// The end of tab section.
echo '
</tr>
</table>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td height="40" valign="middle" class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
Please give me a hand with this :D
can u make a new release with the corrects and quick fix u sujjested...caz lot of people doesnt know how to do them...so it will be helpfull for them...and u r shoutbox will definetly become world famous...its just a new release away...
@mourya: Which fixes are you talking about? Many are specific to the various edits and modifications made to the shoutbox; I don't think many (or any!) are for truly general use...
@PabloW: Placing it in index.template.php will cause it to appear on ALL pages. Since you are asking to put it under the forums list, I would try placing it into BoardIndex.template.php instead (it will show only on the board index).
Quote from: nneonneo on September 13, 2007, 09:00:28 AM
@mourya: Which fixes are you talking about? Many are specific to the various edits and modifications made to the shoutbox; I don't think many (or any!) are for truly general use...
@PabloW: Placing it in index.template.php will cause it to appear on ALL pages. Since you are asking to put it under the forums list, I would try placing it into BoardIndex.template.php instead (it will show only on the board index).
Thank you, it worked =D
But now I have another problem. The shoutbox never stops "loading" it always keeps on
Shout Box
...loading shoutbox...
do you what can it be?
THanks for answering!
PabloW
PD: this is my forum www.pawforum.com.ar
Solved! :D Ive just CHMOD the yshout.php to 755 and Walá :P
now i have to adapt it for my forum language, beacause the shout button its in blank, it doesnt show the text that says "shout"
Anyone get this to work with TinyPortal and Scribbles theme? I think they have to be loading some other ajax or something, because it works only once it seems... any ideas?
@PabloW: Good to see you have it working; see the main mod page for the text which needs to be put in Modifications.<language>.php, and feel free to translate it :)
@MegaTinkerCoder: What do you mean, "only once"?
I am sorry, what I should have said is.
When you are a guest it works fine, when you login it no longer works, but instead the div where the text would display disappears, the hard code text does show. Perhaps I will implement it again and send you a link to show you what I mean...
I installed shout box and everything was fine, but few days latter shout box didn't load. It says ...loading shout box...
and then everything disappear!
There is only command line now!
History Commands ExtendedHistory ShowAdminLinks ReturnToShoutbox
Quote from: nneonneo on September 13, 2007, 03:10:08 PM
@PabloW: Good to see you have it working; see the main mod page for the text which needs to be put in Modifications.<language>.php, and feel free to translate it :)
@MegaTinkerCoder: What do you mean, "only once"?
I have some questions now. Sometimes when a do a long shout that is larger than one line, the shout appears cutted. but sometimes it appear good, with the 2 lines.dont know why.
another thing. I prefer the last shouts to be in the top of the shoutbox instead of the bottom, the same with the text box to write the shouts. can this be done?
Thanks for reading :)
PabloW
@PabloW: To reverse shouts, add
$chatText=implode("\n", (array_reverse(explode ( "\n", $chatText ))));
before
return $chatText.' '; // hack: totally empty responses can break some browsers
;
to put the form on top, move
echo '<div id="shouts">';
echo readChat($chatFile, $logDir);
echo '</div>';
to before
}
if($gzipCompression) ob_end_flush();
As for lines being cutoff or broken, it would depend on the browser and the text (if there is a long word at the end, it may be cut off).
@rosoner: Odd, give me a URL. I will see to it...
@MegaTinkerCoder: Yes, a link would be nice; seeing is believing :)
@nneonneo Thank you very much :D Then ill try to add the smilies bar
i invite you to see how it looks, this is it www.pawforum.com.ar
Thanks nneonneo, I added the line.
You can see the result here.
http://www.miydai.com/SSI.php
I figured it out, well sorta... I found your directions for installing the shoutbox while using TP, but if you use the Scribbles 2* theme it didn't work for me... hey if it works for others with TP and Scribbles 2 great, but if it doesn't what worked for me was create the php block... and instead of just creating the div use this 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()
{
',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
echo '<div id="yshout"></div>';
DO NOT edit the index.template.php file if you do this phpblock.
What happens with scribbles 2 and TP is that the place you enter the code after the css line is loaded differently then other templates, or so it seems that the function call messes it up... well just in case someone else has the same problem as me try above... perhaps this code will keep any template in TP with the shout box without having to edit templates anymore as long as you have the php block set...
Well here is my page now:
http://www.christiansaflame.com/index.php (http://www.christiansaflame.com/index.php)
@MegaTinkerCoder: Ah, thanks for the tip!
@Miraploy: I get a 500 internal server error. Something is seriously f*cked up. Can I have a list of the mods you have installed?
Hi again -
Is there a way to get your own box shoutbox under the welcome box and before the treelink in it's own block. I can't seem to get the correct spot.
shadow82x, it's all in the templates, I'll walk you through it on IRC tomorrow.
nneonneo, ok:
1. Attachments layout 1.2 [ Uninstall ] [ List Files ] [ Delete ]
2. SSI Topic and Replies 0.1 [ Uninstall ] [ List Files ] [ Delete ]
3. Signature Settings Mod 1.0 [ Uninstall ] [ List Files ] [ Delete ]
4. SMF Sitemap 1.1.3 [ Uninstall ] [ List Files ] [ Delete ]
5. FlashChat Integration 1.0 [ Uninstall ] [ List Files ] [ Delete ]
6. Users Active in Last 24 Hours 1.0 [ Uninstall ] [ List Files ] [ Delete ]
7. Additional Membergroups on Profile 1.0 [ Uninstall ] [ List Files ] [ Delete ]
8. Profile Music 1.0 [ Uninstall ] [ List Files ] [ Delete ]
9. Sorted Package Manager Listing 0.1 [ Uninstall ] [ List Files ] [ Delete ]
10. Board News 1.0 [ Uninstall ] [ List Files ] [ Delete ]
11. SMFChess 0.1 [ Uninstall ] [ List Files ] [ Delete ]
12. SMFBlog 0.1 Beta [ Uninstall ] [ List Files ] [ Delete ]
13. audiblepm 1.5 1.5 [ Uninstall ] [ List Files ] [ Delete ]
14. Signature Settings Mod 1.0 [ Uninstall ] [ List Files ] [ Delete ]
15. SMF Links 1.6.5 [ Uninstall ] [ List Files ] [ Delete ]
16. Signature BBCode Bar 1.4 [ Uninstall ] [ List Files ] [ Delete ]
17. Topic description 1.1 [ Uninstall ] [ List Files ] [ Delete ]
18. YouTube BBC Tag (XHTML Compliant) 1.0 [ Uninstall ] [ List Files ] [ Delete ]
19. nneonneo's AJAX ShoutBox 1.09 [ Uninstall ] [ List Files ] [ Delete ]
20. Custom Action Mod 2.04 [ Uninstall ] [ List Files ] [ Delete ]
21. Ultimate Profile 0.7 [ Uninstall ] [ List Files ] [ Delete ]
22. Karma Description Mod 2.3 [ Uninstall ] [ List Files ] [ Delete ]
23. View Only Boards 1.1 [ Uninstall ] [ List Files ] [ Delete ]
24. MessagePreviewOnHover 1.5 [ Uninstall ] [ List Files ] [ Delete ]
25. Global Headers Footers 1.3 [ Uninstall ] [ List Files ] [ Delete ]
26. Show Multiple Badges (Aka Stars) 1.0 [ Uninstall ] [ List Files ] [ Delete ]
27. Welcome Topic Mod 1.0 [ Uninstall ] [ List Files ] [ Delete ]
28. ssi_boardNews Multiple Boards 1.0 [ Uninstall ] [ List Files ] [ Delete ]
29. SMFShop 3.0 [ Uninstall ] [ List Files ] [ Delete ]
30. SMFarticles 0.1 Beta [ Uninstall ] [ List Files ] [ Delete ]
31. Member Awards 1.0.2 [ Uninstall ] [ List Files ] [ Delete ]
Modification Packages — Can't install
Mod Name Version
1. SMF Archive 1.1 [ List Files ] [ Delete ]
2. Streaming 3 4.2.2a [ List Files ] [ Delete ]
Modification Packages — Installed - Not Uninstallable (no uninstall section for this version of SMF)
Mod Name Version
1. Profil Moderator Managment 1.0.0 [ List Files ] [ Delete ]
2. SMF Arcade 2.0.8 [ List Files ] [ Delete ]
3. SMF Staff Page 1.5.1 [ List Files ] [ Delete ]
4. Profile Comments 1.2.1 [ List Files ] [ Delete ]
5. Who Voted What? 1.1.2 [ List Files ] [ Delete ]
6. Member Color Link 2.0.0 [ List Files ] [ Delete ]
Modification Packages — unknown
Mod Name Version
1. SMF Links 1.6.3 [ List Files ] [ Delete ]
2. VisualWarning 1.33 [ List Files ] [ Delete ]
3. Tagging System 1.0.4 [ List Files ] [ Delete ]
Avatar Packages
Mod Name Version
1. Female Avatars Extra 5.0 [ Uninstall ] [ List Files ] [ Delete ]
I hope that helps!
I understand that FlashChat has a problem with SSI.
Try this:
On line 76 of SSI.php change
if(strpos($db_prefix, '.') === false)
to
if(false && strpos($db_prefix, '.') === false)
and see if that solves anything. Oh, and remove the backtrace code.
Thanks that did it the trick. If it's not too much trouble could you explain why that worked?
http://www.simplemachines.org/community/index.php?topic=137508.msg1114395;topicseen#msg1114395
Once I saw you were using FlashChat, I was reminded of this exploration I did a while ago.
The gist of the bug is that:
1) SSI.php has a bug where it fails to select a database, if some certain conditions hold true
2) FlashChat expects a database to be selected, and if it is not, the MySQL functions error out with "no database selected"
3) Errors which occur in setupThemeContext() (into which FlashChat integrates some DB query code) will cause an infinite recursion among the six functions noted in the linked post. The functions will continue to call each other, in cycle, until either a) PHP dies from memory exhaustion, from all the variables that are created for each call, or b) PHP dies from a stack overflow, from the recursion.
This fix fixes the SSI.php part, forcing SSI to select a database.
So flashchat out of the box is not bugged? It's not flashchat's fault but the SSI itself?
Flashchat is fine on it's own. However, Flashchat makes modifications which cause SSI to become unusable. The recursive loop is entirely possible to trigger in other ways, but again, there is a specific set of conditions which must hold to make this happen.
I somewhat understand, thanks!
i have sbox 1.1.6 on my forum and the fonts too small when i go into admin and layouts there is no link there
when i go to uninstall it it wont let me what can I do to make the font bigger please
when i go to uninstall it i get this error
8. Execute Modification ./Sources/ModSettings.php Test failed
@Baby Blue: I don't have a 1.1.6, this is evidently not my shoutbox.
Quote from: Baby Blue on September 14, 2007, 09:36:01 PM
i have sbox 1.1.6 on my forum and the fonts too small when i go into admin and layouts there is no link there
when i go to uninstall it it wont let me what can I do to make the font bigger please
when i go to uninstall it i get this error
8. Execute Modi
fication ./Sources/ModSettings.php Test failed
you have this shoutbox: http://custom.simplemachines.org/mods/index.php?mod=412
you want this thread here: http://www.simplemachines.org/community/index.php?topic=76344.1180
also note that the reason your getting errors is that the latest version of smf is 1.1.3 and this particualr shoutbox is only compatible with 1.1.2
It was working fine until today when I installed more 3 mods without errors.
Now It is showing this message & error Sorry, you must be logged in to use the shoutbox!, even when I`m logged. I did not notice when this errors starts to show.
I uninstall those others mods without problems but this did not fix this Shoutbox`s error.
Then I tried to uninstall Shoutbox but there is a ./Themes/default/index.template.php Test failed message.
Any help?
What mods did you install?
there is no reason what so ever that this should happen(the first error message) unless you were editing yshout but anyways...
try going into th cp of your hosting account, go to filemanager go into the forum dir then click on the yshout folder and click edit yshout.php folder
now find // Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=*;
and first if it is false set to true if that doesent work just try delting the whole // Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;
part
All our members kept getting this error after entering their shout messages:
Warning: fopen(chats/history.home.txt) [function.fopen]: failed to open stream: Permission denied in /home/.../public_html/forum/yshout/yshout.php on line 686
Warning: fputs(): supplied argument is not a valid stream resource in /home/.../public_html/forum/yshout/yshout.php on line 687
chmodding history.home.txt to 777 did not resolve the problem. Any idea how to fix this?
Quote from: go_roko on September 16, 2007, 02:41:20 AM
there is no reason what so ever that this should happen(the first error message) unless you were editing yshout but anyways...
try going into th cp of your hosting account, go to filemanager go into the forum dir then click on the yshout folder and click edit yshout.php folder
now find // Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=*;
and first if it is false set to true if that doesent work just try delting the whole // Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;
part
Not sure it was for me but worked!
First I set to false. Worked.
Then come back to true and it worked again!
@jossanaijr: Glad to hear it worked.
@ruelnov: Odd, have you tried chmodding the whole chats folder?
Quote from: jossanaijr on September 16, 2007, 10:44:14 AM
Quote from: go_roko on September 16, 2007, 02:41:20 AM
there is no reason what so ever that this should happen(the first error message) unless you were editing yshout but anyways...
try going into th cp of your hosting account, go to filemanager go into the forum dir then click on the yshout folder and click edit yshout.php folder
now find // Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=*;
and first if it is false set to true if that doesent work just try delting the whole // Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;
part
Not sure it was for me but worked!
First I set to false. Worked.
Then come back to true and it worked again!
good to hear mate, glad it worked, now it seems i sorta know what im doing! :P
Fellas, does anyone have an idea, how to get the commands for Global Moderators?
I tried this:
if (in_array(1, $GLOBALS['user_info']['groups']) || in_array(2, $GLOBALS['user_info']['groups']) || in_array(3, $GLOBALS['user_info']['groups']))
$user['is_mod'] = 1;
But user_info doesn't seem to be an array for me.
@phpchris: http://www.simplemachines.org/community/index.php?topic=137508.msg1215320;topicseen#msg1215320
(yes, this is a rather long thread. That's what I'm here for; to remember how to find previous solutions :) )
Cheers bud! That was it...
Copy the codes below to your Modifications.turkish.php before ?> for Turkish translation.
P.S: I didn't change original commands at translation.
Türkçe çeviri için aşağıdaki kodu Modifications.turkish.php dosyanızda ?> kodunun üstüne kopyalayın.
NOT: Çeviride komutların orijinal hallerini değiştirmedim.
// ---- Begin modification - nneonneo's Shoutbox - türkçe çeviri by o2gr @ www.ozgur.be ----
$txt['yshout_shoutbox'] = 'Hızlı Chat';
$txt['yshout_loading'] = '...hızlı chat yükleniyor...';
$txt['yshout_rp_banned'] = "Üzgünüm, chat yapmak için yasaklandınız.";
$txt['yshout_no_guests'] = 'Üzgünüm, chat yapabilmek için giriş yapmalısınız.';
$txt['yshout_ban_conf'] = 'Yasaklama Doğrulaması';
$txt['yshout_select_mode'] = 'Yasaklama Modu:';
$txt['yshout_rp'] = 'Okuma ve Yazma';
$txt['yshout_p'] = 'Sadece yazma';
$txt['yshout_error'] = 'HATA: ';
$txt['yshout_no_user'] = 'Kullanıcı bulunamadı.';
$txt['yshout_del_success'] = 'Mesaj silindi.';
$txt['yshout_no_action'] = 'İşlem yapılamadı.';
$txt['yshout_history'] = 'Geçmiş';
$txt['yshout_commands'] = 'Komutlar';
$txt['yshout_exthistory'] = 'Arşiv';
$txt['yshout_hide'] = 'Gizle';
$txt['yshout_show'] = 'Göster';
$txt['yshout_admlinks'] = 'Admin Linkleri';
$txt['yshout_return'] = 'Hızlı Chate geri dön ';
$txt['yshout_p_banned'] = 'Yazmak için yasaklanmışsınız.';
$txt['yshout_banned'] = 'Yasaklı';
$txt['yshout_shout_button'] = 'Gönder!';
$txt['yshout_banlist_caption'] = 'HızlıChat Yasaklıları (engeli kaldırmak için üstüne tıkla)';
$txt['yshout_ip_bans'] = 'IP Yasaklıları ';
$txt['yshout_username_bans'] = 'Kullanıcı Adı Yasaklıları ';
$txt['yshout_ban_type_error'] = ' /banuser ya da /banip komutunu kullanın';
$txt['yshout_ban_mode_error'] = 'Must have mode argument.';
$txt['yshout_imp_slash_error'] = 'Komut "/" (slash karakteri) ile başlamalıdır! Örneğin "/help impersonate" komutu
açıklamları gösterir';
$txt['yshout_imp_uname_error'] = 'Hiçbir kullanıcı adı verilmemiş!';
$txt['yshout_imp_max4_error'] = 'Maximum 4 karakter!';
$txt['yshout_cmd_reference'] = 'Komut Kaynağı';
$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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP.
Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' <user> [userlevel] [ip] [userid] /[shout
text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
<user>: 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>',
'/lock' => ' <message>: Lock the shoutbox for
maintenance with the specified message.',
'/unlock' => ': Release the shoutbox from maintenance.');
$txt['yshout_maintenance'] = 'Kilitli';
$txt['yshout_lock_arg_error'] = 'Bakım nedenini bildirmeniz gerekiyor.';
$txt['yshout_lock_changed'] = 'Bakım nedeni şu şekilde değiştirildi: "%s".';
$txt['yshout_lock_success'] = 'Hızlı chat şu nedenden dolayı kilitlendi: "%s".';
$txt['yshout_unlock_already'] = 'Kilidi kaldırma eylemi gerçekleştirilemedi: Çünkü hızlıchat kilitli değil!';
$txt['yshout_unlock_success'] = 'Hızlıchat başarıyla kilitlendi!';
// ---- End modification - nneonneo's Shoutbox - türkçe çeviri by o2gr @ www.ozgur.be ----
Thanks! I will make this into a mod and test it. Soon, it should appear on the main page :)
Turkish translation tested and made into a mod. Unfortunately, due to the way the mod system works, I can't add it to the main mod page. Instead, it has been attached to the first post in this thread.
Thanks to o2gr for the translation!
hi
there is a problem:
X-Antivirus-Status: Scanning HTTP/1.1 100 Continue X-Antivirus: avast! 4 X-Antivirus-Status: Clean HTTP/1.1 200 OK Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Type: text/html; charset=UTF-8 Content-Encoding: gzip Expires: Thu, 19 Nov 1981 08:52:00 GMT Vary: Accept-Encoding Server: Microsoft-IIS/6.0 X-Powered-By: PHP/4.4.7 X-Powered-By: ASP.NET X-Powered-By: PleskWin MicrosoftOfficeWebServer: 5.0_Pub Date: Thu, 20 Sep 2007 02:21:46 GMT Connection: close ���������Oo�0�;�║:�F�K���0!n������x��vF+�Ѹ��H���6�!u�]-?O����/I��HG�Bj*t�$���',NS��Y$D ."'�=o�����&(-}@mI��ݶ�����`���4ci���kAw�jb��B��$�x��vʆ�q�^�WgK5i{-�� ��:od'�,�l;{}g6Z�N�5��������8�`�F5��k��k�-U���ȶ�-�A�߽V>����<�8�p5���J]�B9��k=L^Nc�C�-BAm����&��>�E�/�(�|��`+.2���tVO{*�$T�Tk�a��2�/���'3:����gnt�N�>,��Jw�/����'ƻ?��J���$m6�4n0�ZEu��'=���6r�Ch�J��J- `Jr���w�t%ah�~�����������
using firefox 2.0.0.7. pls help...
It looks like your host is screwing something up. I'll want a URL to check it out.
Quote from: nneonneo on September 20, 2007, 08:56:03 AM
It looks like your host is screwing something up. I'll want a URL to check it out.
www dot turuncugemi dot com test / 123456
Umm, it works fine for me using FF 2.0.0.7 on Windows. Also works fine in IE 6.0.
wait 23 secs and thann happen... ;)
Nope, can't reproduce. The headers seem to suggest that Avast is screwing things up -- try turning off Avast and see if the problem comes up.
If it doesn't come up, turn $gzipCompression off in yshout/yshout.php. The messed up headers will continue to appear, but the shouts won't be garbled.
yes. thats avast. i turned off it. and the problem solved thanks alot nneonneo
Hello, First let me start out this post with the typical responce: Thank you so much for the time and effort you have put into making this mod for all of us. I love this mod and so do my members.
Now for my question:
Is there a way to modify the date display from the long version of the Month, Day, Year
[September 21, 2007, 12:19:07 PM]... to
[9-21-07] ?
That is really all I would like to see, everything else is more then perfect!
Thanks in advance,
Peace,
♥ Sarrene'
The display is dependent on your personal date/time settings.
With that said, if you want to make the change globally affect the shoutbox, then you can modify preg_timeformat to return something else.
Where it says return timeformat(intval($matches[1]));
in yshout/yshout.php, you can change this line to read
return strftime("%m-%d-%y", intval($matches[1]));
to make the changes apply globally.
Oh that is wonderful! thank you so much for that tip and the super fast reply!
I will try that in a bit once i get back from supper hehe
Peace,
♥ Sarrene'
I've read most posts of the thread but didn't find how to remove this error (using v1.09). :(
I've tried almost everything, including setting compression to false, and then trying to find the unexpected "}" at line n, and then n-1, n-2, etc..., but it still displays this error after "loading shoutbox" a second:
(http://img490.imageshack.us/img490/5571/sboxerrorrk9.jpg)
http://img490.imageshack.us/img490/5571/sboxerrorrk9.jpg
(I'm not master of php...)
Thank you in advance.
Also, awesome mod, best shoutbox i know for SMF. :D
Somehow, your session has become damaged; try logging out and back in.
If that doesn't work, remove the line "session_start();" right after the documentation comment.
This is the greatest shout box ever!! My members love this BUT I only open it during football games or I find that it is used as a chat rather than the rest of the board being used.
I can lock the shout box but it still shows as being there and my members bug me about this. Also, sometimes the box unlocks on it's own and I can not figure out why.
Is there any way possible to make a switch in the admin panel "Features & Options" where the box can be locked and made invisible rather than just locked?
I don't know why the box would unlock itself; this would evidently be some sort of bug.
As for making it totally invisible, that's possible.
See where it says
elseif (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false)
echo '
<form id="shout-form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$maintenance,'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
in yshout/yshout.php? Change this to
elseif (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false) echo ' ';
and the shoutbox will not appear. However, the "Shout Box" text may remain; to fix this, edit Themes/<theme>/index.template.php and take <br /><b>Shout Box</b><br /><br />
out. Put
<br /><b>Shout Box</b><br /><br />
before <form id="shout-form" action="#">
in yshout/yshout.php to keep the text when the shoutbox is operational.
Quote from: nneonneo on September 23, 2007, 05:37:56 PM
I don't know why the box would unlock itself; this would evidently be some sort of bug.
As for making it totally invisible, that's possible.
See where it says
elseif (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false)
echo '
<form id="shout-form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$maintenance,'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
in yshout/yshout.php? Change this to
elseif (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false) echo ' ';
and the shoutbox will not appear. However, the "Shout Box" text may remain; to fix this, edit Themes/<theme>/index.template.php and take <br /><b>Shout Box</b><br /><br />
out. Put
<br /><b>Shout Box</b><br /><br />
before <form id="shout-form" action="#">
in yshout/yshout.php to keep the text when the shoutbox is operational.
I am going to try this tonight & report back ASAP.
You support your mod better than any other modder here. Thanks for being there!!!!!
Quote from: Lew Cipher on September 23, 2007, 07:52:08 PM
I am going to try this tonight & report back ASAP.
You support your mod better than any other modder here. Thanks for being there!!!!!
Just tried this. It worked somewhat. The box went invisible BUT the command menu and the explanation of why the box was closed was still there (for regular members). I tried it twice to ensure that I didn't just make a copy/paste mistake.
Any ideas on how to get rid of the shout box command menu and closed text?
TIA!
Try this then:
Under
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
add
if (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false) { echo ' '; exit; }
Quote from: nneonneo on September 23, 2007, 08:25:46 PM
Try this then:
Under
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
add
if (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false) { echo ' '; exit; }
Thank you very much for your efforts but none of this has worked. I suppose I can live with it as-is.
I may try find help for making the box it's own collapsible bar. That would also serve the purpose.
Quote from: nneonneo on September 23, 2007, 10:14:49 AM
Somehow, your session has become damaged; try logging out and back in.
If that doesn't work, remove the line "session_start();" right after the documentation comment.
Thank you. Infact i now only get an error now (the one i said): "Unexpected "}" at mine 317" if i remember well. But there's no } at line 317 of yshout.php, so if i remove some elements from this line, it says unexpected } at line 316 and so on. ::)
Also it's not about the session because i tried 15 times of installing this awesome mod and all of my members always get those errors.
@Lew Cipher: I don't know why that wouldn't work, but I suppose if it doesn't then a workaround is in order :-\
@NewPie: Yeah, I think it's because your forum seems to use sessions differently.
Anyway, 1.1.4 has _just_ been released, and I will be testing and rolling out 1.10 soon. There won't be any major changes, though, unless I find some compelling feature to put in.
Request them now :)
Is it possible to change the position of this shout and put it inside one board (a new category called Shoutbox)?
If yes can you help me?
I'm using SMF 1.1.4 with default theme.
Thanks,
Yes, it should be possible.
Remove
// YSHOUT HERE
echo '
<br /><b>Shout Box</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
from Themes/default/index.template.php
and place
// YSHOUT HERE
if (!empty($context['current_board']) && $context['current_board']==9999) 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
where you want the shoutbox, where 9999 is the board ID which should specifically have the shoutbox.
Alternately, you may choose to insert a topic to the board with a hacked name -- i.e. add a topic and change the title *directly in the database*, containing the code
<div id="yshout">',$txt['yshout_loading'],'<br />
. This method is NOT recommended.
Lost my shoutbox! :-[
The cut and replace did not work, no idea what I did wrong. Then I tried to came back and it was not shown in the original place (it did not show anywhere). :-[ :-[
So I delete (uninstall) version 1.0.8 and tried to install a fresh one 1.0.9 version BUT it says the package is corrupted ? (I'm using SMF 1.1.4). So I tried to upload again 1.0.8 ; there is an error message too, but the package / files are shown as uploaded - BUT no shoutbox is shown in its original place! :-[ :-[ :-[
Slow down -- what happened? Did you use the correct board id in place of "9999"? The package shouldn't be corrupted; try it again.
Send me or attach index.template.php, it sounds like it's been severely damaged.
Attached my index.template.php. :-[
I'm using SMF 1.1.4 and I do not have shoutbox mod in my list of installed packages.
Tried to reinstall 1.0.8 and 1.0.9 without success.
Funny thing about your index.template.php -- the code for showing the shoutbox is only in the guest section of the file.
Right before
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
add
// 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
and the shoutbox will reappear. The important point is that the shoutbox does not (yet) work with SMF 1.1.4, but I am working on updating it.
Quote from: nneonneo on September 27, 2007, 02:59:58 PM
Funny thing about your index.template.php -- the code for showing the shoutbox is only in the guest section of the file.
and the shoutbox will reappear.
Thank you! Fixed.
QuoteThe important point is that the shoutbox does not (yet) work with SMF 1.1.4, but I am working on updating it.
But mine was and now is working fine with 1.14!
BTW: I would like to have the option to put the shoutbox in another place when installing (this is how my problems started...) Members of my forum frequently put their passwords in shoutbox because they think they are not logged yet and this is the place to put their password and try again! Thats why I was trying to move it. It would be nice to have the shoutbox inside one frame like a default theme board.
Well, it's not officially supported (as of 1.10, it is); 1.1.4 made changes which didn't actually affect the shoutbox's ability to function AFAIK.
I like this shotbox, it's lite and fast, but it seems it's impossible to run on my host: it keeps server CPU in 50% and I'm on a shared server. Anyone, any ideea?
Error:
Warning: fopen(chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /home/jalo/public_html/VS-online/smf/yshout/yshout.php on line 776
File error (writeLine); aborted
Why?
Hi nneonneo, how would I invoke the shoutbox in other sections of the site?
@exxocet: Odd, the newest revision should not put a CPU at 50%. Try increasing "updateTimeout" in yshout/yshout.php (do NOT increase this past the maximum script execution time, typically 30 seconds)
@jamppa: Try chmod'ding the chats folder to 777. Or, in Package Manager, go to Options, then under Cleanup Permissions select "All files are writable." and then hit "Change file permissions".
@Miraploy: Two instances cannot run simultaneously (I intend to have a fix for this, but due to the nature of the JS it may be a lot of work). That said, just using the code provided to install to other themes (the CSS and JS includes, and the <div id="yshout"> snippet) will work.
Hi nneonneo, long time not see you.
Now I've a new idea to you again.
Think when we use msn.
When the other side typing something, we'll see his status
on the status bar that he's typing something.
Could you do that?
Sometimes we don't know the other quit or typing anything?
Quote from: Miraploy on September 30, 2007, 09:42:54 AM
Hi nneonneo, how would I invoke the shoutbox in other sections of the site?
There're alrady a lot of answers of this type of question in this topic.
Actually, yes. I implemented this feature ages ago, but later removed it because it was an incredible resource hog.
It is probably not a great idea, unless you are on dedicated hosting, though presumably something could be done to make it somewhat more efficient.
When I try an dinstall this through package manager using SMF 1.1.4 I get parse errors.
Did it have any warnings before it installed? It should work properly, unless corrupted or another mod is installed which impedes proper performance.
Post the parse error and the index.template.php file.
Hi
Love this script, but i have one problem.
It only saves the last 12 "shouts", both in history and in the shoutbox....
12 is defined in:
// Set the maximum amount of lines to be displayed at a time
$max_lines = 12;
I want to show the last 12 messeges in the shoutbox and when the user press history, it will list all af the messages written.
How can this be ?
www.fg-forum.dk (http://www.fg-forum.dk)
[/center]
Hi nneonneo, thanks for this wonderful shoutbox. I only have a simple issue. I want the text in my shoutbox to be aligned left, not right as it is now. How can I do this? Here is a screen shot of my shoutbox so that you can figure out what I'm describing.
(http://www.ocnhs.net/site.jpg)
@fals: Make sure yshout/chats/history.home.txt is writable (correct permissions, exists, etc.), as it appears that information is not being written to the history file correctly. When I visited the page, I found the history file is not there; try to create a blank file called history.home.txt in /yshout/chats.
@dence66: Try changing '<div id="yshout"' to '<div id="yshout" align="left"' in index.template.php.
Thanks a lot neo.... i forgot that file (http://www.fg-forum.dk/smf/Smileys/fg/blushing0.gif)
Thank you so much nneonneo for the fix, it worked like a charm!
Quote from: ruelnov on July 28, 2007, 04:32:27 PM
Quote from: nneonneo on July 27, 2007, 07:41:12 PM
@ruelnov: The shoutbox isn't supposed to auto-collapse. That would be a bug. Which browser, and what's the URL? If I have time before I leave (for vacation, probably no Internet for me next week) I will look at it.
Border problem solved.
auto-collapse of shout box also resolved.
My remaining problem is the lack of smileys, even after creating another default directory with smiley set under Forum/Smileys/Default directory.
Am using the latest version of nneonneo's shout box.
How did you solve border and auto-collapse issue? I am getting them too. It's really frustrating, it collapses after 5 seconds of not doing anything. Can anyone help? This shoutbox looks really good otherwise.
edit: it was a case of changing $updateTimeout=20; to 10
hey nneonneo , thanx alot for the great shoutbox it installed smoothly but nothing appeared as i'm using custom theme , anyway i checked it on the default theme and it works just fine.
i did what you said in the first 2 pages of this topic for themes but all i got is --loading shoutbox--- and it never loads although i did the guest permission area correction too but all in vain
i used the SB_1.10.tgz edition and i have php 5 support
may be u could have a look on my index.template.php i PMed it to you
thanx and i appreciate your massive work
I have a strange problem on motohell.com
When I run the forum with the shoutbox with Firefox - everything is fine and it is working perfectly
When I run with IE7 - it's still fine, but I have a strange "lagging" problem. At first run everything works fine. However when you start browsing the forum (read topics and click on links) it suddenly starts to hang for few seconds until it load the next page... If I disable the shoutbox the lagging is not happening... I can't figure it out - can somebody look at the html code and check for something strange?
@wattie: Odd, it may be some bug in my Javascript which causes IE to be slow. I will need to test - to you have a test account?
@medflux: See PM
thnx for this mod,best SB i have cn till now
i have a small Q how do change the width of the SB i mean the whole sb itself
sorry if this is already answered
Quote from: vnoIf you want to add a scrollbar on your block, in your theme's index.template.php, add this:
#yshout #shouts {
overflow: auto;
width: 165px; /* the width you want to display */
height: 200px; /* the height you want to display */
}
Originally posted at http://www.simplemachines.org/community/index.php?topic=137508.msg1221413;topicseen#msg1221413
can someone post the package of this shout box which will work with 1.1.4
Hmm? 1.10 should work with 1.1.4.
when i upload thru the package manager it says the file is corrupted
Erm...try again (i.e. make sure it isn't corrupt); but if you've done that, try unpacking the file and repacking it as a .zip file (make sure that the package-info.xml file and other files aren't in a subfolder of the zip, or it won't work!).
Please could someone tell me how to change CHMOD premissions 755 for yshout.php file, which is compressed as .tgz ?
Thanks! :)
Quote from: Andrijachi on October 16, 2007, 03:07:35 AM
Please could someone tell me how to change CHMOD premissions 755 for yshout.php file, which is compressed as .tgz ?
Thanks! :)
You change the CHMOD on your server , i think.....
nneonneo!
Thnx this nice mod, but i have a little problem with this.
I tried more shoutbox, but this was the only one, that working with FF and IE too!
I have installed yesterday this mod, and i was very happy. It worked with FF and IE, and all is was OK, but today mornig, when i logen in my site, i saw a loading shoutbox... message on the shoutbox div, and not loaded the shoutbox.
Only the loading message is in the shoutbox window with FF end IE too....
Anyone can help me? I tried reading this topic for the solution, but the 59 page is not to easy...
Sorry for my weak english....
I use SMF 1.1.4 with Joomla 1.0.13(this ins't important i think), not default theme (acidtechbloodex)
Hmm, I see...... www. or http. .... Ok I understand this, hmmm.
Quote from: gjoe on October 16, 2007, 04:55:57 AM
You change the CHMOD on your server , i think.....
On server I can only change CHMOD for entire SB_1.10.tgz folder, but I cant enter in folder and change CHMOD only for yshout.php file :-[
Hi,
just installed this ShoutBox and i can see it's just good.
But i would like to load the shoutbox only on index.php.
In other words, during the forum navigation, i would like the ShoutBox disabled (and hiddend), and enabled only when the user click on "Home" button.
How can i do?
Thank you
@Andrijachi: The tgz should have been unpacked into yshout/ folder. If it is still as a tgz, then you should install it first, then chmod yshout/yshout.php.
@gjoe: It is probably a "www." vs. no www thing. The affected line is
var board_url = "', $boardurl, '";
Change this either to
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
or
var board_url = "/path/to/forum";
I recommend the first replacement because it is more general, but if it doesn't work let me know.
@tlen: Find
echo '
<br /><b>Shout Box</b><br /><br />
(it may occur twice)
and add before it
if (smf_main()=='BoardIndex')
After this, the shoutbox should not appear on board or topic pages.
*EDIT: Fixed the parse_url thing, I posted the wrong code.
It works in displaying only on "Home", but many errors appears in many pages, like texts dont appear, or admin box with dimension of 2 pix.
Something like that
(http://img220.imageshack.us/img220/6904/glgw7.gif)
That empty box should contain Uninstall, Delete.....
Apparently, SMF will not allow smf_main() to be executed twice.
Try this instead:
if(empty($_REQUEST['action']) && empty($context['current_board']) && empty($context['current_topic']))
This should be safer.
It works just great.
Thank you very much
Another thing.
I see the normal behaviour is to put the shouts one under another.
Like this
1
2
3
Where do i edit to do inverse behaviour, in order to put the shouts one over the others?
Like this
3
2
1
Thanks
Quote from: vnoIf you want to reverse the message display... say newest on top instead of bottom, in your yshout folder, open up your yshout.php file:
Find
$chatText=preg_replace_callback("/\[<timeval=(\d+)>\]/","preg_timeformat",$chatText);
Right after that, add this:
$chatText=implode("\n", (array_reverse(explode ( "\n", $chatText ))));
(from http://www.simplemachines.org/community/index.php?topic=137508.msg1221413;topicseen#msg1221413)
how do we make this shoutbox work in a center tinyportal block? I am having the same issue your test site has which is an empty box is displayed when the TP instructions are followed.
Well, you need to remove the existing instance from the theme (the one installed by default) or it will show a blank spot where the TP shoutbox should load, since the shoutbox can only load once on a page.
Also, if it refuses to load, let me know the board URL and I will check it out (most likely it is a domain mismatch; I've just found a way around, posted on the main mod page).
http://nemini.org (http://nemini.org/index.php?theme=1)
for now I am trying to make it work the non-TP way, if I get that working then I will change the location. Figure trying to fix one issue at a time is easier.
I did try changing to var board_url = "/home/neminiin/public_html";
but that made no difference.
trying:
var board_url = "', parse_url($boardurl)['path'], '";
gave me a parse error
tried:
var board_url = "', parse_url($boardurl ['path']), '";
but that didn't resolve anything either.
note: am only testing it on default theme for now, am not editing dilbermc until it works on default first (less inconvenience to my users since no one uses default on my site).
NEMINI, there's two things which are amiss.
First, you should set board_url to "/" (so that the line appears as
var board_url = "/";
)
Next, check your server error log. http://nemini.org/yshout/yshout.php throws a 500 Server Error, so the main script is failing to run somehow. It may be permissions (chmod 755 or 777 will fix that), server configuration or a bug/syntax error in my script.
When these are resolved, the shoutbox will work.
Quote from: nneonneo on October 16, 2007, 08:43:27 PM
Quote from: vnoIf you want to reverse the message display... say newest on top instead of bottom, in your yshout folder, open up your yshout.php file:
Find
$chatText=preg_replace_callback("/\[<timeval=(\d+)>\]/","preg_timeformat",$chatText);
Right after that, add this:
$chatText=implode("\n", (array_reverse(explode ( "\n", $chatText ))));
(from http://www.simplemachines.org/community/index.php?topic=137508.msg1221413;topicseen#msg1221413)
Sorry i had read only up to page 30.
Thanks!
Nah, it's alright. I remember most of what gets posted here, so I know what to search for ;)
Here again.
After doing the edit, the reverse works but the time is gone.
This
(http://img84.imageshack.us/img84/4382/10961548zg6.png)
How do i do?
You've got to place the line specified after the timeval replace (not before).
If that doesn't help, attach or PM yshout.php and I will look into it.
My fault. It works just good :)
Quote from: nneonneo on October 17, 2007, 01:24:55 PM
NEMINI, there's two things which are amiss.
First, you should set board_url to "/" (so that the line appears as var board_url = "/";
)
Next, check your server error log. http://nemini.org/yshout/yshout.php throws a 500 Server Error, so the main script is failing to run somehow. It may be permissions (chmod 755 or 777 will fix that), server configuration or a bug/syntax error in my script.
When these are resolved, the shoutbox will work.
did both of those. Still says loading ...
OK, I finally figured it out. You should set board_url to "", and it should resolve the issue (I have tested it and it will work). Hope that helps.
nneonneo, post above you've done this
if(empty($_REQUEST['action']) && empty($context['current_board']) && empty($context['current_topic']))
In order to enable (and completely hide elsewhere) the Shout only on the "Home" button.
Now i would extend this to Guest too.
In other words, a Guest doesn't view completely the shoutbox (identical to the behaviour posted above), both logged or not, and not even able to see the "You must be logged" or the "Shoutbox" title.
How do i do?
Thanks
Right after
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
in index.template.php is a block of shoutbox code (between // YSHOUT HERE and // YSHOUT END). Remove that whole block, and the shoutbox will become invisible to guests.
Also, set allowGuests to false in yshout/yshout.php, to avoid having people use an old or cached version of the page to access yshout.
thank you nneo. now to move it to a TP block. Now its working in a TP block too :D
Quote from: pongsak on August 18, 2007, 11:10:08 PM
4. Search after in index.template.php or boardindex.template.php depend on where u put shout box.
<div style="padding: 1ex 25px 1ex 25px;"id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /></div>
add
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
How would we add a smiley bar if we're using this shoutbox in a TP block? that code has been removed.
Quoteand the shoutbox will become invisible to guests
It works good. Thanks.
Now, i do i hide the input box containing the username (and the username itself inside it) occupying this additional space with the input text shoutbox?
Tks
I don't sure there's some bugs.
When i pressed extended history, it shows dialog box
how many lines i want and ok and cancel.
If i press cancel it still go to shout history instead of cancel
dialog box.
How to Display Membergroup colour in ShoutBox
@kichu: Sarke told you how: http://www.simplemachines.org/community/index.php?topic=137508.msg996336;topicseen#msg996336
Updated instructions for 1.10:
Replace
$p_class = "";
if($user['is_admin']) $p_class = ' class="owner"';
if($user['is_mod']) $p_class = ' class="moderator"';
if(!$user['is_logged']) $p_class = ' class="guest"';
$shoutName=$user['name'];
$userID=$user['id'];
$writeText="<p$p_class><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span> ";
if($user['is_logged'])
$writeText.="<a href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
else
$writeText.="$shoutName";
with
$p_class = "";
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 = '';
if(!$user['is_logged']) $p_class = ' class="guest"';
$shoutName=$user['name'];
$userID=$user['id'];
$writeText="<p$p_class><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span> ";
if($user['is_logged'])
$writeText.="<a href=\"index.php?action=profile;u=$userID\"><span$color>$shoutName</span></a>";
else
$writeText.="$shoutName";
@pongsak: Indeed a bug. Change the line with 'yshout_exthistory' on it to
echo ' <a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'file=',checkName($chatFile),'&history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>';
and it will properly show. This will be fixed in an upcoming release.
@NEMINI: The TP block currently looks like
echo '<div id="yshout"></div>';
Add pongsak's code right before the '; and it should work, since it's a phpbox.
@tlen: Delete every line in yshout/yshout.php starting with
<input id="forum-name" style="color: #666666;"
.
You Rock nneonneo :x thanks its working
thanks nneonneo that works.
One more question then I will stop being a pest. Is there a setting to change to stop the shoutbox from auto hiding/shrinking. ie: I want the last 10 shouts to always show.
Auto hiding? Hmm? It _should_ work, unless there is a bug with the auto-refresh.
If the shoutbox disappears every ~15 to 20 seconds, but only reappear after you shout, change $updateTimeout in yshout/yshout.php to 10.
Quote from: nneonneo on October 18, 2007, 09:10:09 PM
If the shoutbox disappears every ~15 to 20 seconds, but only reappear after you shout, change $updateTimeout in yshout/yshout.php to 10.
yes thats what its doing.
I will try your suggestion and let you know. it works. thanks again.
Apparently I lied ... I have another question to ask. Is there a way to add a command that will erase the history file? /clear empties the shoutbox but I'd like an easier way to erase the history as well. (it's easy for me to truncate the file on the server but my staff don't have access to the server).
for adding smileys bar... where i have to download smiley.php ??
can u please tell me nneo
smiley.php is attached to the post with the smiley bar instructions. http://www.simplemachines.org/community/index.php?topic=137508.msg1207408#msg1207408
@NEMINI: To add that function, place this somewhere (probably before
case "/clear":
) in processAdminCommand:
case "/clearhist":
$handle = fopen("$logDir/history.$chatFile", "w+");
fputs($handle, "");
fclose($handle);
return true;
then use /clearhist to clear out all the history (this isn't undoable, so use with caution!)
I suppose I can just edit the language file to add the command instructions to it. many thanks again.
Any plans to add the ability to edit an existing shout? Would be useful to fix typos and such.
Hey nneonneo am using smiley bar, but when i click on smiley it is not working.. i mean the shout code not inserting to shout text
@NEMINI: Yes, editing the language file is the "preferred" way to create command docs. As for a shout editing function, I don't see that being implemented too soon. If you are having a conversation via the shoutbox, it is typically not useful to retroactively edit an existing shout; probably better to say "I meant xxx" or something along those lines. Or, if not having a conversation, then you can delete and repost the message.
@kichu: I'm going to have to have a look at the forum, since I'm not an expert on the smiley code.
Quote@tlen: Delete every line in yshout/yshout.php starting with
Code:
<input id="forum-name" style="color: #666666;"
nneonneo, deleting entirely the line, the ShoutBox hangs on loading because (i think) the form array lenght is modified. But setting <type> to "hidden", it works good. Thanks btw.
Another thing, how do i do to show just the Hour,minutes and not even the date? But doing it so that the shoutbox clock doesn't depend on the forum clock/date setting?
Thanks
Well, you would change the preg_timeformat function. Currently, it is fixed to the forum; if you don't want that then a simple change from "return ..." to "return strftime('%H:%M',intval($matches[1]));" will work.
The Guests can see the Shoutbox but cant post...
How to do it
If you want them to post, set $allowGuests to true.
If you don't want them to see the shoutbox, hide the block to guests (if possible); otherwise it won't be possible to remove the shoutbox completely from view of guests.
Quote from: nneonneo on October 23, 2007, 09:32:41 AM
If you don't want them to see the shoutbox, hide the block to guests (if possible)...
Of course it's possible. It is always possible as long as you're on an SMF running forum. On the docs for smf it states several kinds of code that will either disable certain membergroups or allow all except guests ;)
[announce] petr00kos has sent me a Greek translation; if you are looking for one, check it out on the main mod page.
Release of 1.11 should be soon, so any feature requests or bug reports should be posted soon :) (and even if you've said it before, go ahead and repeat it, I may have neglected to make note of it).
Finally, the Turkish translation is updated for 1.10, which should alleviate any installation issues. Both language packs have been tested on both UTF-8 and non-UTF-8 language packs, on SMF 1.1.4.
I mean The Shoutbox must be visible for Guests.. they can see the shouts
but they have optiion to post the shout...
OK, just set $allowGuests to true in yshout/yshout.php.
[announce] Shoutbox version 1.11 is now out. This release is primarily a minor bugfix release.
Changes:
- Added allowGuestsPost for finer control of guest abilities. If this is false and allowGuests is true, then guests will be able to view but not post to the shoutbox.
- Fixed the ExtendedHistory bug where pressing "Cancel" would still go to a history page. Now, it simply cancels the dialog.
- Fixed loading bugs that could occur when loading the shoutbox on a domain other than the one specified by SMF. Now, the shoutbox should work for any domain.
Hi,
I just installed this mod which seems to perfectly fit my needs, but it isn't working.
It blocks on "...loading shoutbox..."
any advices?
Hmm, let me know your board URL and I'll check it out. The loading code was changed slightly in the last release.
Well, it is a private forum.
I've sent you a PM with the URL.
I've installed the shoutbox as per direction Version SB_1.10.tgz; compatible with smf 1.1.4 and also did all the needed alterations as per directed in the relevant section, but it is not at all appearing only showing that "loading shoutbox", what is the problem, where I'm going wrong?
www.cave-biology.org/forum
@jayant: Odd, there's no yshout/ folder -- maybe try coping the yshout folder from the package to your forum root.
@Shankirili: Try chmod'ding yshout.php to 755 - some hosts are configured with certain restrictions on script execution.
I just discovered that some members cannot use shoutbox! Even when they are logged the message;
Sorry, you must be logged in to use the shoutbox!
persists. Those members also cannot enter my CHAT automatically without having to enter their username and password in the chat loggin page (Flashchat) but after that they can chat.
I tried to change the membergroup to check but there is no effect.
Any idea? Is it a Shoutbox issue or some setting in my smf? Note that I tried to enter as one of this member in my pc and the error occurred so it is not a cache problem, I suppose.
This only happens for _some_ of your users? That's really odd...does it work for any non-admin/non-moderator users (i.e. perfectly "regular" members)?
I guess this is something I have to look into -- almost sounds like bad sessions (to clear sessions, just empty out the smf_sessions table) or something else is wrong.
One thing to try is to set $allowGuests to true and check if the username shows up. If it does not, or if it's not the right username, then this is indicative of a failure to load session data. Otherwise, something else is wrong.
Also check the server error log -- maybe PHP is producing warnings (it is also possible that the forum error log may catch some SMF-specific problems).
Quote from: nneonneo on October 26, 2007, 02:53:56 PM
(to clear sessions, just empty out the smf_sessions table)
How can I do that?
Do you have access to the database (e.g. phpMyAdmin)? If you do, just execute a "TRUNCATE TABLE smf_sessions" in the database. If not, then it is not so easy.
nneonneo, i tried to install in 1.1.4 and shootbox says loading all the time. I tried editting the file with the full address of my forum location as your guidlines said but still nothing. Is it because i run 1.1.4?
Quote from: nneonneo on October 26, 2007, 03:02:00 PM
Do you have access to the database (e.g. phpMyAdmin)? If you do, just execute a "TRUNCATE TABLE smf_sessions" in the database. If not, then it is not so easy.
Ok, I'm right now in my phpMyAdmin but I need to admit I do not know where should I put this command...
OK, head to the table smf_sessions (left panel navigation) and hit "Empty" on top. Make sure it says "TRUNCATE" in the dialog (NOT "DROP", or SMF will stop working!), and then the sessions table should be empty.
Quote from: nneonneo on October 26, 2007, 03:13:19 PM
OK, head to the table smf_sessions (left panel navigation) and hit "Empty" on top. Make sure it says "TRUNCATE" in the dialog (NOT "DROP", or SMF will stop working!), and then the sessions table should be empty.
Servidor: localhost Banco de Dados: mydata_smf1 Tabela: smf_sessions
Visualizar
Estrutura
SQL
Procurar
Inserir
Exportar
Importar
Operações
Limpa
Eliminar
Campo Tipo Collation Atributos Nulo Padrão Extra Ações
session_id varchar(32) utf8_general_ci Não
last_update int(10) UNSIGNED Não 0
data mediumtext utf8_general_ci Não
Marcar todos / Desmarcar todos Com marcados:
Mine is showing in portuguese...
Should I mark all 3: session id, last update, data?
Should I choose Limpa (Clear) or Eliminar (delete)?
Limpa - Clear. That should clear the table.
nneonneo, does your shoutbox works with 1.1.4? As i said, i tried installing it and faced problems (It kept saying "Loading"). Can you please tell me?
Session cleared but it did not worked...
I have to leave now. I will return to this issue later. Thanks.
@examino: It does work with 1.1.4, but the "loading" problem can be caused by a number of possibilities. Try chmod'ding the yshout/yshout.php file to 755.
@jossanaijr: Try checking the server and/or forum error logs.
Worked like a charm... CHMOD yshoot.php to 755. That was it.
Quote from: nneonneo on October 26, 2007, 01:56:01 PM
@jayant: Odd, there's no yshout/ folder -- maybe try coping the yshout folder from the package to your forum root.
@Shankirili: Try chmod'ding yshout.php to 755 - some hosts are configured with certain restrictions on script execution.
I failed to follow, what I've to do actually, so that the shoutbox should work properly.
Well I just checked it from another pc and it is working! Perhaps it some issue related to cache in my another pc.Thanks.
@jayant: How did you install the shoutbox? Was it through the package manager, or manually?
If you installed it manually, there is a folder called "yshout" in the package. This folder goes in the forum root (the folder where "Sources" "Themes" and other files/folders are).
@jossanaijr: Yeah, probably something on your own machine.
Me again...
I tried to update and install your last version but then I notice that this MOD does not appear in my "Browse Packages" !
Can I just install the new version?
EDIT:OK, reinstalled without problems. Now using the last version and it is listed in my packages page.
No.... not working fine...
When I'm logged everythings ok.
BUT when not logged, guest have this page:
Welcome, Guest. Please login or register.
Shout Box
History Commands
Shout Box
...loading shoutbox...
Here my index.template where I think I must made some changes...
(REMOVED SCRIPT: SOLVED)
Ok, I found some repeated scripts and deleted. It seems to be working fine for guest and for me when logged with only one problem:
When I'm logged, below the shoutbox it is showing the box to loggin as if I was not logged...:
Login with username, password and session length
I cannot find where should I fix it.
I broke my site!!!!!
I made a mess in my index.template.php and now it is not working anymore....
More I tried to fix it, I think more it is broken...
My index.template.php is now:
(REMOVED SCRIPT: SOLVED)
Please someone help me!
Can I ask you to edit your above post (both), and put the code in a [ code ] block? It is making this page huge.
As for your issue: post/PM the index.template.php, or attach it to your post. This is preferred, so that I can download it.
I do not know what's going on in this pc (or internet) I'm working now...
I cannot turn to code my first php I include in post above.
I will keep trying, sorry.
It's alright, I just don't want the page becoming so long, making it hard to read.
As for your problems:
1) Parse error.
Last five lines should read
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
You are missing a ' somewhere there, which causes the error.
2) Guest options when logged in:
After
// --- End FlashChat Integration ---
add
// YSHOUT HERE
echo '
<br /><b>Shout Box</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
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
Thank youuuuuuuuuuuuuu! so much!!!!!!
but guest now can post!!
Quote from: jossanaijr on October 27, 2007, 05:37:36 PM
but guest now can post!!
Ok fixed. I remembered to edit permissions.
Thank you again.
No problem :)
Now if you could just remove the big block of text to clean up the thread... :D
nneonneo, the only problem I have is the del link. I removed the [<timeval=".time().">] and it's taking the del link with it. Only the ban link is left. Javascript is new to me so I need your help. Everything is working perfectly though.
Sorry, I just found out one more thing. I allowed guests to shout and when guest hover over the names, it shows the IP's. I want admin and mods only to see IP's.
Thanks.
Hmm, on my personal testing forum as well as many forums I've visited, hovering only shows "1192... | logged" (the first half is a timestamp). I don't think you should remove the timeval part, since it is integral to the functioning of the del link (it allows yshout to reference shouts uniquely), and is also essential to the proper operation of the IP filter.
If you don't want a timestamp, the cleaner fix is to change "return ..." in preg_timeformat to "return ''" and then to change this line:
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
to
$chatText=preg_replace_callback("/\[<timeval=(\d+)>\]/","preg_timeformat",$chatText);
By the way: yshout.php is written in the PHP preprocessing language, not Javascript. The Javascript bits are in the yshout/js folder, if you wish to take a look :)
Wait a sec, maybe I am using an old version. I just don't want to display the date and time info. My members don't need them. It's taking space too.
Or is it too much to ask if the date and time be hidden too together with Admin links? That way, it still show up in the history file.
I thank you for the code and for the quick reply.
Hem...this is not hard to arrange.
Change
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
to
$chatText=preg_replace_callback("/\[<timeval=(\d+)>\]/",create_function('$matches','return "";'),$chatText);
nneonneo, you are an angel. It work perfectly. I thank you so much. It is working the way I want it. The IP I was talking about is now replaced with "logged". Now my members are asking me if there's a way to make the shouts scroll up so they won't use the scroll bar. argh!!
This is a very cool mod, and I appreciate it. I have it running in a right-hand TP block, and I would like to play with the layout a little. For example, I'd like the timestamp, username and shout text to be on three separate lines. Can you give me some idea where in the code I could add the <br /> code to make this happen?
Thanks, and great mod!
jb
Sure!
The function writeLine would be one place to do it -- this would commit the changes to history, which may not be a desired effect.
Alternatively, instead of doing that, you could modify readChat with a relatively simple find and replace right before it is sent to the browser -- this is slightly more challenging, but it will avoid the side effect of making the history file look odd.
To do the first, just add <br /> whereever you need it (as the shout is being assembled).
To do the second, immediately before the conclusion of readChat:
return $chatText.' '; // hack: totally empty responses can break some browsers
}
add
$chatText = preg_replace('/(<em title=[^<]+><span class="shout-timestamp">.+?<\/span>)(.+?:<\/em>)/',"\\1<br />\\2<br />",$chatText);
I've tested this and it ought to work. This also has the advantage that you can do whatever you like -- font changes, alignment, etc. by changing the HTML code in the second part, without having those changes reflect on the permanent history.
Thanks. I figured out a solution and played with the CSS a bit more to make your shoutbox look a bit more like the TP one (so as to avoid freaking out my users :) ).
If you want to take a look at it, you can log into www.vgrefugees.com as smfhelp, password smfhelp . I can't tell you everything I did to get there - I'm afraid I butchered your code, given that I know just enough to be dangerous. :)
Thanks again,
jb
Quote from: nneonneo on October 27, 2007, 01:13:07 PM
@jayant: How did you install the shoutbox? Was it through the package manager, or manually?
If you installed it manually, there is a folder called "yshout" in the package. This folder goes in the forum root (the folder where "Sources" "Themes" and other files/folders are).
@jossanaijr: Yeah, probably something on your own machine.
Thanks for kind cooperation, suddenly it started to work, may I know whether I can change its template or not?
@Jerri Blank: Isn't that just the TP shoutbox? It doesn't seem to carry any of my code :-\
@jayant: Of course you may modify the template; it's meant to be open & extensible. CSS (for appearance) is in index.template.php; PHP code (for behaviour) is in yshout/yshout.php. Go for it!
Belatedly replying: Yep, nneo, that's the TP shoutbox you see there now. Unfortunately, your shoutbox simply wasn't loading for some of my members, and rather than take up a lot of time troubleshooting, I put the old one back in.
I certainly like it, though, and would probably implement it instead of the TP shoutbox on a new site. My users were just a little too accustomed to doing things the old way.
jb
Heh, old habits die hard.
I'm curious as to why the shoutbox would not load for some members, since it would pretty clearly indicate a bug in my code.
Quote from: nneonneo on October 29, 2007, 02:37:04 PM
Heh, old habits die hard.
I'm curious as to why the shoutbox would not load for some members, since it would pretty clearly indicate a bug in my code.
Or could it be overly restrictive security settings in the user's browser? And don't forget that I mangled your code up pretty good, so I certainly could have introduced a bug.
jb
jb
I know that XMLHttpRequests (on which the shoutbox is founded) can only be sent to domains that exactly match the one you're on -- I thought I squished that bug in 1.11, by making sure the domain name always matched. Maybe I made an error.
ok I think I am missing something small... but not sure exactly what...... here is the story.... I have a working forum with a working (great) yshout box....
I have 2 (2 found for now) user that can not see the yshout box - they keep getting loading....
Tried on multiple computers... the common between them is that both of them are moderators of multiple sections of my forum. But the other moderators are working fine
What I did:
-checked both user profiles; created my own - with the same group; same membership; same number of posts (everything in phpmyadmin was set to the same) - the new user worked
- tested the issue on multiple computers - these 2 users do not work on any even after deleting the cache
-followed the instructions here to cleate the sessions table - did not help
At this point I have no other ideas.. please give me a hint :)
also checked - no ban exist in _banlist.php
Let me also provide you the phpmyadmin information for a working and broken user :
working:
dzola19801 1193723476 55 1 1193723794 dzola19801 0 0 xxxxxxxxxxxxxxxxxxxxxxxx
[email protected] 1 0001-01-01 238017330 1 1 0 1 0 0 1 1 0 2 89.25.12.3 89.25.12.3 0 1 3109 5 282374 e245 2
Broken user:
Road_to_Hell 1185035405 55 1 english 1193703057 Road_to_Hell 3 0 xxxxxxxxxxxxxxxxxxxxxxxx
[email protected] 1 0001-01-01 238017330 1 1 0 1 0 0 1 1 0 2 78.90.41.187 78.90.41.187 0 1 3109 5 282374 e245
the second not working one :
NecessaryPain 1185655465 34 0 bulgarian 1193724527 NecessaryPain 1 0 xxxxxxxxxxxxxxxxxxxxxxx
[email protected] 1 0001-01-01 http://cs.man1a.com http://cs.man1a.com Ñîôèÿ. 350272416 0 1 ! 0 http://i.data.bg/07/10/25/627738_orig.jpg 1 0 0 1 1 0 2 89.25.12.3 89.25.12.3 0 1 3153 5 20686 d18f
Quote from: nneonneo on October 27, 2007, 01:13:07 PM
@jayant: How did you install the shoutbox? Was it through the package manager, or manually?
If you installed it manually, there is a folder called "yshout" in the package. This folder goes in the forum root (the folder where "Sources" "Themes" and other files/folders are).
@jossanaijr: Yeah, probably something on your own machine.
Its suddenly started to work. Thanks for kind suggestions. Is there any way to modify its template?
@dzola: Thanks for your sleuthing. This is quite strange - I admit it does require some further exploration. Has anything appeared in the server error log? Also, while logged in as these users, visit the page yourforum.com/path.to.forum/yshout/yshout.php. Anything except "Nothing to do" indicates an error. (also try this as a regular non-broken user to make sure there's nothing wrong there).
@jayant: Of course you may modify the template; it's meant to be open & extensible. CSS (for appearance) is in index.template.php; PHP code (for behaviour) is in yshout/yshout.php. Go for it!
first - no no errors in the error_log for the domain - checked and double-checked
now doing the rest
ok did that with the broken user - "Nothing to do."
tried with mine - Nothing to do.
if you wish... I could PM with a user/pass so you can see that crazy case yourself...
Sure, at this point I think I will have to break out the debugging tools :)
ok :) sent... hope you will have any ideas... I am lost...
Heh, it turns out to be something quite simple :P
Because you are using the default theme, which usually has the shoutbox in the header section, users who collapse the header will not see the shoutbox load (since the shoutbox thinks it's still in the header).
So, here's the fix.
Remove this from index.template.php:
// YSHOUT HERE
document.getElementById("yshout").style.display = mode ? "none" : "";
if(!mode)
{
loadChat();
}
// YSHOUT END
and change
',empty($options['collapse_header']) ? 'loadChat();':'','
to
loadChat();
and all should be fixed :)
WOW thanks, now have to implement it...as soon as I do that (in few hours cos I need to go to work) I will thank you again :)
wow had time to do that fix before leaving!!! IT WORKED!! GREAT MAN THANKS!
Quote from: 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
hi there
nice shoutbox that ya have here and all works well BUT i not only have moderator and global moderator but also jnr admin and senior moderator that i would also like to have the option to delete/ban shouts.
is there a way that this can be done ?
thanks
Dave
@dzola: Glad it worked!
@mr_fix_it: See the line
if(in_array($group,array(2,3)))
? You can see the 2 and 3. They represent the group IDs of the moderators and global moderators.
Now, when you go to admin the membergroups, the modify link will point to a URL like
index.php?action=membergroups;sa=edit;group=10
where 10 is the group ID. Just add the group IDs of the various groups that should have admin-like access to the array.
I sincerely apologize that there isn't a better way. The admin interface will probably be different in SMF 2.0, so I am waiting for a release of that before I consider writing a cleaner yshout administration interface.
Quote@mr_fix_it: See the line
Code:
if(in_array($group,array(2,3)))? You can see the 2 and 3. They represent the group IDs of the moderators and global moderators.
Now, when you go to admin the membergroups, the modify link will point to a URL like
Code:
index.php?action=membergroups;sa=edit;group=10where 10 is the group ID. Just add the group IDs of the various groups that should have admin-like access to the array.
I sincerely apologize that there isn't a better way. The admin interface will probably be different in SMF 2.0, so I am waiting for a release of that before I consider writing a cleaner yshout administration interface.
WOW that works a treat thanks for that mate but they now all show up in blue like mods is there a way to put this right do you know or is it somthing i will just have to live with for now? :D
no probs if cant be made to work like this
thanks
Dave
Edit:- it's ok now thanks i found a tut you previously did which is here if anyone need to know
http://www.simplemachines.org/community/index.php?topic=137508.msg1278345;topicseen#msg1278345
dont know how i mist it the first time round :D
thanks again
Dave
Quote from: 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.
sorry to bother you again but i have added the code for the scrollbar BUT is there a way to swap it round as shouts come in at the bottom and the scroll works from the top so when we get a new shout we need to scroll down to see it.
thanks
Dave
See http://www.simplemachines.org/community/index.php?topic=137508.msg1277296;topicseen#msg1277296 for a method to reverse the order of shouts.
thinks nneonneo but i have already seen that tut and didn,t want to do that as my members like it the way it is. it would be nice if there was a way to swap the scrollbar round so it,s set to the bottom and not the top.
thanks
Dave
Hmm, this I believe I have done before.
http://www.simplemachines.org/community/index.php?topic=137508.msg1188746;topicseen#msg1188746
I added the code about moderators in yshout.php. But i don't want them to be able to see the IP. Is it possible and how?
IO? What are you referring to?
Sorry, Ip. My mistake.
Ah, OK.
Replace the "else" in
else
{
$chatText = preg_replace('/<em title="(\d+) \| [0-9.]+"><span class="shout-timestamp">/','<em title="\\1 | logged"><span class="shout-timestamp">',$chatText);
}
with
if(!$user['is_admin'])
EDIT: Also, replace
$text=$mytail->output(PLAIN).file_get_contents("$logDir/$chatFile");
if(!($user['is_admin'] || $user['is_mod']))
by
$text=$mytail->output(PLAIN).file_get_contents("$logDir/$chatFile");
if(!$user['is_admin'])
to prevent the IP from showing on the history.
Thanks. I figured it out.
Quote from: nneonneo on October 31, 2007, 04:06:39 PM
Hmm, this I believe I have done before.
http://www.simplemachines.org/community/index.php?topic=137508.msg1188746;topicseen#msg1188746
thanks for that nneonneo it works a treet.........your a star
regards
Dave
10 seconds after reloading page or shouting a new message all messages disappear from the shoutbox. This problem occurs only with me :/ it works fine for other users.
Whats the problem?
[ SMF 1.1.4 with polish language pack (utf-8) (i did the fixes nneonneo mentioned in mod description) ]
// FIXED - found older message about this error ;)
THANK YOU
Hi nneonneo,
how can I remove the message:
"
Shout Box
Sorry, you must be logged in to use the shoutbox! "
to guest?
In index.template.php, there are probably two yshout divs. One is shown to guests, if that is removed, then guests will not see it.
I did not find txt "Sorry, you must be logged in to use the shoutbox!"
Not the text; it's the div that holds the shoutbox.
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
After that snippet, in index.template.php, you can find a // YSHOUT HERE and // YSHOUT END pair; delete everything between these lines and guests will stop seeing the shoutbox.
If, instead, you are looking to _change_ the text, go to Themes/default/languages/Modifications.english.php and change it.
Thank you!
i can t see my history :(
when i click history button i see blank page...
ExtendedHistory...blank page...
in home.text and history.home.text is writen but i can t see when i click button??
I have an arcade on my site. I want to inject a shout when someone gets a highscore on the arcade. Does anyone have any suggestions on what code to use to inject a shout.
I know where to put the code and how to get thier name and other information. I just need a rough code for the shoutbox. Example if it was SQL based I would just say fill in the row with the appropriate information. With this shoutbox I am not sure what file and what to code.
Any help would be great thanks!
hi!
I would like to see this shoutbox translated to Portuguese. I can do that, if you tell me how and where!
Congrats, nice shoutbox, this one!
@adventurer: Hmm, odd. Have you checked the server error log?
@nightmist: That's a great idea! I would say -- there are two ways (AFAIK).
1) Edit the yshout/chats/home.txt file directly -- this probably works the best. The shoutbox doesn't use SQL, though I suppose a future rewrite would.
When you edit it, be sure to remove the first line, and place it at the end of the history file, otherwise you may end up with more lines than expected.
2) Call yshout.php with the appropriate requests; a lot of stuff will have to be forged -- not recommended.
I think that you should go with the first way. Now, I think that, presently, for efficiency reasons (the script is being pinged quite often, after all), I will keep a file DB, but once that efficiency question is resolved, this shoutbox will go to using SQL.
@okidokiss: See Themes/default/languages/Modifications.english.php. First step: copy that to Modifications.portuguese.php, then translate it.
Hi nneonneo. I want my moderators to be able to delete shouts too. My moderators group id is not number 2 or 3. Where can I change the settings? My members call your shoutbox a chatbox. They love it. Thanks.
Hmm, this has been done before.
I assume you've seen this guide: http://www.simplemachines.org/community/index.php?topic=137508.msg879855#msg879855
Now, replace 2 and 3 with the group IDs.
How to find group IDs?
When you go to edit member groups, pay attention to the URL; it will say something like "index.php?action=membergroups;sa=edit;group=4". The thing after "group=" is the group ID.
Thanks nneonneo. I really did what's in that topic. I just forgot to mention that it will only work with the primary group. I have couple of secret gm's and I also want them to be able to delete shouts. Your quick reply is greatly appreciated. Thanks nneonneo for your endless support.
I have a problem. Sorry about my English.
I'm Spanish and i have a forum in Spanish. I can delete messages from the shoutbox but my global moderators can't delete messages and ban users from the shoutbox. Can u help me?
Thank you.
@Sruc: See this topic:
http://www.simplemachines.org/community/index.php?topic=137508.msg879855#msg879855
Quote from: nneonneo on November 10, 2007, 11:39:56 AM
@Sruc: See this topic:
http://www.simplemachines.org/community/index.php?topic=137508.msg879855#msg879855
It does not work. Global moderators can see the 'del' and 'ban' buttons, but it doesn't work.
Excuse me for the inconveniences.
What happens when they press del or ban?
Quote from: nneonneo on November 07, 2007, 06:19:40 PM
@okidokiss: See Themes/default/languages/Modifications.english.php. First step: copy that to Modifications.portuguese.php, then translate it.
Thank you! I did that, and of course, works perfect. Only the special caracters don't show right, I.I á´é ã õ ...
How can I solve this?
Quote from: nneonneo on November 10, 2007, 03:03:24 PM
What happens when they press del or ban?
The log disappear, and when they update the page, appear already, but it doesn't work.
Hmm, I think it may be due to character encodings -- post, send or attach the file and I'll see what I can do.
[php]<?php
// Version 1.11
// Editable Options (see yshout/js/yshout.js for more options)
// Set the maximum amount of lines to be displayed at a time
$max_lines = 12;
// Sets the directory to which to log
$logDir = "chats";
// Should we use GZip compression? If you are having trouble with the shoutbox, set this to false.
$gzipCompression=true;
// Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;
// Guest usage for posting. Set to false if you don't want to let guests post to the shoutbox; if allowGuests is on, they will still see it.
$allowGuestsPost=true;
// Automatic Guest Usernames: should they be able to choose their own usernames?
// Set to some string (a prefix) if you want to disable guest choice of username
// Set to false if you want to allow guests to choose a username
$autoGuestName=false;//'guest-';
// Command options.
// If this is set to false, all typed commands are disabled.
// Admin functions, via admin links, are still available.
$allowCommands=true;
// If this is set to false, guests will be denied access to commands.
$guestCommands=true;
// How long should the script wait for the chats to update? (in seconds)
// If this is set to 0 the script will not wait at all,
// but this will be very detrimental to performance.
// Make sure this is less than the maximum script execution time
// on your server, or the shoutbox will never update.
$updateTimeout=20;
// User-defined array of commands to block.
// Example: $bannedCommands=Array('/impersonate');
// Note that since SMF recognizes /me by default, it can't be blocked.
$bannedCommands=Array();
// How many characters will be permitted in each shout.
$maxShoutChars=125;
// How many characters will be permitted in the username.
// This does not apply to SMF registered usernames.
$maxUsernameChars=25;
/* Documentation
Functions
Command Implementation:
doMsg(string $msg)
Causes the shoutbox to be replaced with $msg until they
use /return (useful for making error messages, etc.)
processCommand(string $text)
Process an admin command. If this function fails to find
a match, it defaults to the user commands.
processUserCommand(string $text)
Process a user command. This function attempts to match
against all known commands. If a valid command match
isn't found, the function will return false and the
shout ("command") will be displayed as a regular shout.
makeShout(string $text)
Produce a shout as if it was from the current user, but
having only a datestamp (and no profile link, etc)
help(string $command - default '')
Allows users to get help on a command. Use <arg> to
denote required arguments and [arg] to denote optional
ones. Note that all <> must be entered as < and >
or they will not work.
Make sure to add an entry in this function for any new
commands.
Shouting:
checkDir(string $logDir)
Check the target directory to make sure it exists.
checkName(string $chatFile)
Check the filename for invalidities.
readChat(string $chatFile,string $logDir)
Dump the contents of the chat file to the client. If the
client is viewing a special message or command, then
readChat simply executes that command or prints the
message back on screen (this command/message is stored
in $_SESSION['readingCmd'])
truncateChat(string $chatFile,string $logDir,integer $max_lines)
Move the first line of a file from the chat file to the
history as long as the chat file exceeds the set
maximum.
writeLine(string $chatFile, string $logDir, string $newText, array $user)
Write a shout to the chat file. $user is an SMF user
session array which determines the username and rank of
the poster.
writeBanList()
Write the current ban list to _banlist.php which is
require'd by this script at the beginning. This allows
for "dynamic" ban lists.
history()
Show the history file in a neat, formatted HTML style.
preg_timeformat(array $matches)
Function used to replace matched <timeval=[UNIX time offset]> with formatted times
as per SMF's timeformat function. Called through preg_replace_callback.
Important Globals
$_SESSION
readingCmd
The command (if it starts with /) or the message to be
read back to the user instead of the normal shoutbox
stuff.
$_GET
n
Used by the history() function to determine the # of
history lines to output.
help
If this is set, the shoutbox will output a full HTML
help message (using help()). Use as a standalone page.
history
If this is set, the shoutbox will output a full HTML
history page (with history()). Use as a standalone page.
banid
For the administrator's ban link: this is passed as the user
ID of the member to be banned.
delete
For deleting shouts; this is a string in the form
datecode | ip (this is the format used in the <em title>
unban
Username/identifier to unban (used by /banlist)
file
File to read for history and delete functions (will be checked)
$_POST
file
Chat file to use. Will be checked for bad characters.
reqtype
What function to carry out (shout, refresh, init)
shout
If reqtype is shout, then this is the shout to be made.
$_SERVER
REMOTE_ADDR
Used for $ip to determine their IP address.
Global Variables
$ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post
Ban variables. _ips or _names is the ban criteria (IP
address or username) while _readpost or _post is the ban
severity (banned from reading+posting or just posting)
$chatFile,$logDir
These determine the location of the chat file.
$chatFile comes from $_POST['file'] while $logDir is hardcoded.
$user
SMF user data array, gleaned from ssi_welcome as a hack.
This determines a lot of things about the user (like the username and status)
$max_lines
Maximum number of lines to have in the shoutbox. Used by truncateChat.
$ip
User's IP address. Gathered from $_SERVER['REMOTE_ADDR'].
$reqType
Request type; see $_POST['reqtype'].
Super-Duper Command Implementation
To add a command, first decide whether this command is *user* or
*admin/mod* level.
The general format of a command is "/command <reqargs>
[optargs]".
Commands are processed in processCommand or processUserCommand.
The former is for admin/mod commands, and the latter is for users.
Processing begins by parsing the args and then running through a
long switch/case block. In this block, you will add your command code.
Your code should begin with a "case '/commandname':" and end with a
return true; statement.
The two things you will have access to locally are $args and
$cmd. $args is a string containing all the arguments passed, and $cmd is
the exact command used. For example, with the command "/foo bar baz",
$cmd will be "/foo" and $args will be "bar baz". This will be handled by
the "case '/foo':" statement.
Globally, any of the superglobals are available, plus any
globals. All globals are declared already so there is no need to declare
them on your own.
To make a message appear on the client's shoutbox, set the
variable $_SESSION['readingCmd'] to $text (which is the main argument
for the processing function). This causes the exact text of the command
to be reparsed every time the user requests the shoutbox data, and your
information will be returned instead of the regular shouts.
Alternately, the doMsg function allows you to automatically set
a message that will stay up until they use /return.
Remember that whenever your function needs to exit, it must do
so with "return true;" so that the calling function will know not to
"shout" the command.
*/
session_start();
require(dirname(__FILE__) . "/../SSI.php");
require_once($sourcedir . '/Subs-Post.php');
require("_banlist.php");
if (!isset($maintenance)) $maintenance=false;
$defaultEncoding=(empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']);
header('Content-type: text/html; charset='.$defaultEncoding);
$ip = $_SERVER['REMOTE_ADDR'];
$max_lines+=1;
$user=ssi_welcome('nothing'); // ssi_welcome only does something IF the parameter is 'echo'; otherwise the user data is returned!
if (loadMemberData(Array($user['id']),false,'minimal')!==false)
{
$group=$user_profile[$user['id']]['ID_GROUP'];
if(in_array($group,array(2)))
{
$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!");
}
loadUserSettings();
loadTheme();
ssi_logOnline('nothing'); // don't want echo, so just use a nonexistant output method
function preg_timeformat($matches)
{
// format: <timeval=(value)>
return timeformat(intval($matches[1]));
}
if (in_array($ip, $ban_ips_readpost) || in_array($user['username'], $ban_names_readpost) || in_array($user['name'], $ban_names_readpost))
die($txt['yshout_banned']); // exit;
if (!$user['is_logged'])
{
if(!$allowGuests)
die($txt['yshout_no_guests']);
if($autoGuestName!==false)
$user['username']=$user['name']=$autoGuestName.substr(md5($ip),0,4);
elseif(isset($_POST['username']))
$_COOKIE['username']=$user['username']=$user['name']=$_POST['username'];
elseif(isset($_COOKIE['username']))
$user['username']=$user['name']=$_COOKIE['username'];
}
// Do not edit below this line unless you know what you are doing
if(isset($_GET["history"]))
{
history();
exit;
}
if(isset($_GET["help"]))
{
help();
exit;
}
if(isset($_GET['banid']))
{
if (!isset($_GET['mode']))
{
global $boardurl;
doMsg(<<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<base href="$boardurl/">
<head>
<meta http-equiv="content-type" content="text/html; charset=$defaultEncoding" />
<title>{$txt['yshout_ban_conf']}</title>
</head>
<body>
<h1>{$txt['yshout_select_mode']}</h1>
<a href="javascript:ajaxGet('banid={$_GET['banid']}&mode=rp');">{$txt['yshout_rp']}</a>
<br />
<a href="javascript:ajaxGet('banid={$_GET['banid']}&mode=p');">{$txt['yshout_p']}</a>
</body>
</html>
EOF
);
exit;
}
if ($user['is_admin'] || $user['is_mod'])
{
if(!is_numeric($_GET['banid']))
{
// guest banning?
// ban by IP, since that's what will be listed for banning...
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_ips_',$_GET['mode'],$_GET['banid']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
exit;
}
if(loadMemberData(Array($_GET['banid']),false,'minimal')===false)
{
doMsg($txt['yshout_error'].$txt['yshout_no_user']);
exit;
}
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_names_',$_GET['mode'],$user_profile[$_GET['banid']]['memberName']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(isset($_GET['delete']))
{
if ($user['is_admin'] || $user['is_Moderador Global'])
{
global $logDir,$chatFile;
$chatFile=isset($_GET['file'])?$_GET['file']:"home.txt";
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$fileContents = '';
if (file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$fileContents=preg_replace('/<p[^>]*><em title="'.str_replace('|','\|',$_GET['delete']).'">.+\n/','',$fileContents);
$handle = fopen($chatPath, "w");
fputs($handle, $fileContents);
fclose($handle);
echo $txt['yshout_del_success'];
}
exit;
}
if(isset($_GET['unban']))
{
if ($user['is_admin'] || $user['is_mod'])
{
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_'.$_GET["type"].'s_','u',$_GET['unban']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(!isset($_POST["file"]) || !isset($_POST["reqtype"]))
die($txt['yshout_no_action']);
$chatFile = checkName($_POST["file"]);
$reqType = $_POST["reqtype"];
switch($reqType) {
case "init":
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">',$txt['yshout_history'],'</a> <a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
if($user['is_admin'] || $user['is_mod'])
{
echo ' <a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'file=',checkName($chatFile),'&history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>';
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' <a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>';
else
echo ' <a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>';
echo ' <a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>';
}
echo '<div id="shouts">';
echo readChat($chatFile, $logDir);
echo '</div>';
if (in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post))
echo '
<form id="shout-form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$txt['yshout_p_banned'],'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_banned'],'" disabled="true" />
</fieldset>
</form>';
elseif (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false)
echo '
<form id="shout-form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$maintenance,'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
elseif (!$user['is_logged'] && !$allowGuestsPost)
echo '
<form id="shout-form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$txt['yshout_no_guests'],'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
else
{
echo '<form id="shout-form" action="#">
<fieldset>';
if (!$user['is_logged'] && $autoGuestName===false)
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" />';
else
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />';
echo '
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="" type="text" />
<input id="shout-button" type="button" value="',$txt['yshout_shout_button'],'" />
</fieldset>
</form>';
}
if($gzipCompression) ob_end_flush();
break;
case "shout":
if (in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post)) break;
if (!$user['is_logged'] && !$allowGuestsPost) break;
if (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false) break;
$shoutText = $_POST["shout"];
if($shoutText[0]=='/' && $allowCommands)
{
if($user['is_admin'] || $user['is_mod'])
{
if(processCommand($shoutText)) break;
}
elseif($user['is_logged'] || $guestCommands)
{
$shoutText=substr($shoutText,0,$maxShoutChars);
if(processUserCommand($shoutText)) break;
}
}
$shoutName = $user['name']; //$_POST["name"];
writeLine($chatFile, $logDir, $shoutText, $user);
truncateChat($chatFile, $logDir, $max_lines);
refreshChats(true);
break;
case "refresh":
refreshChats(false);
break;
case "autoshout":
if($user['is_admin'] || $user['is_mod'])
processCommand($_POST["shout"]);
break;
}
function doMsg($msg)
{
echo $msg; // tell user
$_SESSION['readingCmd']=$msg; // make sure user keeps seeing this message; see readChat
}
function processCommand($text) {
global $reqType, $chatFile, $logDir, $max_lines, $ip, $user, $bannedCommands, $txt, $maintenance;
global $ban_ips_readpost, $ban_ips_post, $ban_names_readpost, $ban_names_post;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces, duh!
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
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.
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat($chatFile, $logDir);
return true;
case "/lock":
if ($args=='')
{
doMsg($txt['yshout_error'].$txt['yshout_lock_arg_error']);
return true;
}
if($maintenance !== false)
doMsg(sprintf($txt['yshout_lock_changed'],$args));
else
doMsg(sprintf($txt['yshout_lock_success'], $args));
$maintenance = $args;
writeBanList();
return true;
case "/unlock":
if($maintenance === false)
{
doMsg($txt['yshout_error'].$txt['yshout_unlock_already']);
return true;
}
$maintenance = false;
writeBanList();
doMsg($txt['yshout_unlock_success']);
return true;
case "/banlist": // who's banned?
$_SESSION['readingCmd']=$text;
$temp=Array();
echo '<table>
<caption>',$txt['yshout_banlist_caption'],'</caption>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_ips_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_ips_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_names_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_names_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '</table>';
return true;
case "/ban": // need to be more specific!
doMsg($txt['yshout_error'].$txt['yshout_ban_type_error']);
return true;
case "/banuser": // go away, we don't like you!
case "/banip":
$type=($cmd=='/banip')?'ban_ips_':'ban_names_'; // prefixes for vars
$ar=explode(' ',$args,2); // true argument array. the "2" ensures that we cut only once: mode can't have spaces but user can.
if(count($ar)!=2) // whoops: only one argument?
{
doMsg($txt['yshout_error'].$txt['yshout_ban_mode_error']);
return true;
}
$mode=$ar[0]; // set up vars
$id=$ar[1];
doBan($type,$mode,$id);
return true;
case "/impersonate": // lets pwn some n00bs!
// <user> [userlevel] [ip] [userid] /[shout text]
$slashpos=strpos($args,' /'); // use ' /' as a separator, so we can see how many args came before
if($slashpos===false) // no shout? invalid formatting?
{
doMsg($txt['yshout_error'].$txt['yshout_imp_slash_error']);
return true;
}
$shout=substr($args,$slashpos+2);
$ar=explode(' ',substr($args,0,$slashpos));
$name='';
$userlevel=0;
$userid=0;
switch(count($ar)) // how many args did we get?
{
case 0: // no args--what are you doing?
doMsg($txt['yshout_error'].$txt['yshout_imp_uname_error']);
return true;
case 4: // reverse order to save space: we just set them from the back!
$userid=intval($ar[3]);
case 3:
$ip=$ar[2]; // corrupt the global >:D
case 2:
$userlevel=intval($ar[1]);
case 1:
$name=html_entity_decode($ar[0]);
break;
default:
doMsg($txt['yshout_error'].$txt['yshout_imp_max4_error']); // just so they know that we only have 4 params
return true;
}
$ip.='.'; // to set off the impersonated msgs
$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
writeLine($chatFile,$logDir,$shout,$fakeuser); // do it, write the line
truncateChat($chatFile, $logDir, $max_lines); // make sure to scroll it, or bad things will happen
echo readChat($chatFile, $logDir); // update admin's display
return true;
default: // it wasn't a command, n00b!
return processUserCommand($text);
}
return false;
}
function processUserCommand($text) {
global $reqType, $chatFile, $logDir,$max_lines, $ip,$ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$user,$bannedCommands,$func;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces, duh!
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
case "/help":
if(empty($args)) help();
elseif($args[0]!='/') help('/'.$args);
else help($args);
$_SESSION['readingCmd']=$text;
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat($chatFile, $logDir);
return true;
case "/pi":
$s_pi='141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609';
$n=5;
if($args!='') $n=intval($args);
$res=($n==0)?"PI IS EXACTLY 3!":'3.'.substr($s_pi,0,$n-1).(substr($s_pi,$n-1,1)+(substr($s_pi,$n,1)>=5?1:0));
// all that nasty little bit does is add the first n-2 chars, then add the last digit and increment if rounding is necessary.
makeShout($res);
return true;
case "/me":
checkDir($logDir);
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$newText = $args.' ';
$newText = $func['htmlspecialchars'](stripslashes($newText), ENT_QUOTES);
$newText = str_replace(array("[list]","[center]","[left]","[right]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
preparsecode($newText); // gah, sanitize input!!
$newText = parse_bbc($newText); // w00t!
censorText($newText);
$shoutName=$user['name'];
$userID=$user['id'];
$writeText = "<p><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span><font color=\"red\"> * $shoutName</em> $newText</p></font>\n";
$handle = fopen($chatPath, "a");
if($handle===false) die("File error (processing /me); aborted");
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two ppl write to it at once
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (processing /me); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
truncateChat($chatFile, $logDir, $max_lines);
refreshChats(true);
return true;
default:
return false;
}
return false;
}
function doBan($type,$mode,$id)
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$txt;
switch($mode)
{
case 'u': // nice guy
$r=$type.'readpost'; // need to search both ban arrays. Search this one first...
$index=array_search($id,$$r); // where is my little banned user?
if($index===false)
{
$r=$type.'post'; // ...and this one second on failure.
$index=array_search($id,$$r);
if($index===false) // whoops, both searches failed!
{
doMsg($txt['yshout_error'].'Couldn\'t find user to unban!');
return false;
}
}
array_splice($$r,$index,1); // cut the 1 element loose with splice. $$r is used because $r is the string variable denoting the target array.
doMsg("Success: unbanned $id.");
break;
case 'rp':
array_push(${$type.'readpost'},$id); // easy, huh!
doMsg("Success: banned $id from reading and posting.");
break;
case 'p':
array_push(${$type.'post'},$id);
doMsg("Success: banned $id from posting.");
break;
default:
doMsg($txt['yshout_error']."Invalid mode $mode! Use only 'u', 'rp' or 'p'!");
return false;
}
writeBanList(); // write the final report
return true;
}
function makeShout($text) {
global $chatFile,$logDir,$user,$max_lines;
writeLine($chatFile, $logDir, $text, $user);
truncateChat($chatFile, $logDir, $max_lines);
refreshChats(true);
}
function refreshChats($force=false) {
global $chatFile,$logDir,$user,$max_lines,$gzipCompression,$updateTimeout;
$time=file_exists("$logDir/$chatFile")?filemtime("$logDir/$chatFile"):0;
$start_time=time();
session_write_close(); // so that future session requests succeed
while(!$force && (time() - $start_time < $updateTimeout) && $time && ($time==filemtime("$logDir/$chatFile")))
{
sleep(1);
clearstatcache();
}
if($gzipCompression) ob_start("ob_gzhandler");
echo readChat($chatFile, $logDir);
if($gzipCompression) ob_end_flush();
}
function checkDir($logDir) {
if (!is_dir($logDir))
mkdir($logDir);
}
function checkName($chatFile) {
$ret = $chatFile;
$ret = str_replace('/', '', $chatFile);
return $ret;
}
function readChat($chatFile, $logDir) {
global $user;
if(isset($_SESSION['readingCmd']))
{
$c=$_SESSION['readingCmd'];
if($c[0]!='/') echo $c; // doMsg was used. Don't use doMsg with a slash unless you know what you're doing ;)
else
{
if($user['is_admin'] || $user['is_mod']) processCommand($_SESSION['readingCmd']); // execute the same command so the user gets to keep reading the message w/o interruption.
else processUserCommand($_SESSION['readingCmd']);
}
return ' ';
}
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$chatText = "";
if (file_exists($chatPath))
$chatText = file_get_contents($chatPath);
if ($user['is_admin'] || $user['is_mod'])
{
if (!isset($_COOKIE['yShout_hideadmlinks']))
{
$chatText = preg_replace('/<em title="(\\d+) \| ([^"]+)"><span class="shout-timestamp">\[<timeval=(\d+)>\]<\/span> ([^<])/','<em title="\\1 | \\2"><span class="shout-timestamp">[<timeval=\\3>]</span> <a href="javascript:ajaxGet(\'banid=\\2\')"><span class="adminlink">ban</span></a> \\4',$chatText);
$chatText = preg_replace('/<em title="(\\d+ \| [^"]+)"><span class="shout-timestamp">\[<timeval=(\d+)>\]<\/span>/','<em title="\\1"><span class="shout-timestamp">[<timeval=\\2>]</span> <a href="javascript:ajaxGet(\'file='.$chatFile.'&delete=\\1\')"><span class="adminlink">del</span></a> ',$chatText);
$chatText = preg_replace('/<a href="index\.php\\?action=profile;u=(\\d+)">/','<a href="javascript:ajaxGet(\'banid=\\1\')"><span class="adminlink">ban</span></a> <a href="index.php?action=profile;u=\\1">',$chatText);
}
}
else
{
$chatText = preg_replace('/<em title="(\d+) \| [0-9.]+"><span class="shout-timestamp">/','<em title="\\1 | logged"><span class="shout-timestamp">',$chatText);
}
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
return $chatText.' '; // hack: totally empty responses can break some browsers
}
// truncateChat function based on one written by Travis Roman (http://mapleglobal.mine.nu/)
function truncateChat($chatFile, $logDir, $max_lines) {
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$fileContents = '';
if (file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$lines = explode("\n", $fileContents);
if(count($lines) > $max_lines) {
$newText = substr($fileContents, strpos($fileContents, "\n") + 1);
$handle = fopen($chatPath, "w");
fputs($handle, $newText);
fclose($handle);
// History
$oldText = substr($fileContents, 0, strpos($fileContents, "\n") + 1);
$handle = fopen("$logDir/history.$chatFile", "a");
fputs($handle, $oldText);
fclose($handle);
}
}
function writeLine($chatFile, $logDir, $newText, $user) {
global $ip,$func;
checkDir($logDir);
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
// $ip = $_SERVER['REMOTE_ADDR']; // impersonate >:D
$newText .= " ";
$newText = $func['htmlspecialchars'](stripslashes($newText), ENT_QUOTES);
$newText = str_replace(array("[list]","[center]","[left]","[right]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
preparsecode($newText); // gah, sanitize input!!
$newText = parse_bbc($newText); // w00t!
censorText($newText);
// $newText = preg_replace("(http:\/\/(.+?) )is", "<a href=\"http://$1\" target=\"_blank\">http://$1</a> ", $newText);
$p_class = "";
if($user['is_admin']) $p_class = ' class="owner"';
if($user['is_mod']) $p_class = ' class="moderator"';
if(!$user['is_logged']) $p_class = ' class="guest"';
$shoutName=$user['name'];
$userID=$user['id'];
$writeText="<p$p_class><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span> ";
if($user['is_logged'])
$writeText.="<a href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
else
$writeText.="$shoutName";
$writeText.=":</em> $newText</p>\n";
$handle = fopen($chatPath, "a");
$failcount=0;
if($handle===false) die('File error (writeLine); aborted');
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
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
function help($command='')
{
global $user,$defaultEncoding,$txt;
$cmdlist=$txt['yshout_cmdlist'];
$cmdlistadmin=$txt['yshout_cmdlistadmin'];
if($user['is_admin'] || $user['is_mod'])
$cmdlist=array_merge($cmdlist,$cmdlistadmin);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<base href="/advforums/">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_cmd_reference']; ?></title>
</head>
<body>
<?php
if($command=='')
{
echo '<h1>',$txt['yshout_shoutbox'],' ',$txt['yshout_commands'],'</h1>';
foreach($cmdlist as $cmd=>$desc)
{
echo "$cmd$desc<br />\n";
}
}
else
{
if(isset($cmdlist[$command])) echo "$command{$cmdlist[$command]}<br />\n";
else echo "$command not found";
}
?>
</body>
</html>
<?php
}
function writeBanList() // generate our dynamic ban list, which is 'require'd at the start of this script
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$maintenance;
$writeText = "<?php\n"; // php header
$writeText .= '$ban_ips_readpost = '.var_export($ban_ips_readpost,true).";\n"; // bans
$writeText .= '$ban_ips_post = '.var_export($ban_ips_post,true).";\n";
$writeText .= '$ban_names_readpost = '.var_export($ban_names_readpost,true).";\n";
$writeText .= '$ban_names_post = '.var_export($ban_names_post,true).";\n";
$writeText .= '$maintenance = '.var_export($maintenance,true).";\n";
$writeText .= '?>'; // end tag
$handle = fopen("_banlist.php", "w");
if($handle===false) die('File error (writeBanList); aborted');
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two ppl write to it at once
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeBanList); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
function history()
{
global $logDir,$boardurl,$gzipCompression,$defaultEncoding,$txt;
checkDir($logDir);
$chatFile=isset($_GET['file'])?$_GET['file']:"home.txt";
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$n=250;
if(isset($_GET['n'])) $n=intval($_GET['n']); // integers only!
if($gzipCompression) ob_start("ob_gzhandler");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<base href="<?php echo $boardurl,'/'; ?>">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></title>
<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;
}
a:link {
color: #476C8E;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>
</head>
<body>
<h1><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></h1>
<div id="yshout">
<div id="shouts">
<?php
global $user;
require_once("class.tail.php");
$mytail = new tail("$logDir/history.$chatFile");
$mytail->setGrep(".*");
$mytail->setNumberOfLines($n);
$text=$mytail->output(PLAIN).file_get_contents("$logDir/$chatFile");
if(!($user['is_admin'] || $user['is_mod']))
$text = preg_replace('/<em title="(\d+) \| [0-9.]+"><span class="shout-timestamp">/','<em title="\\1 | logged"><span class="shout-timestamp">',$text);
echo preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$text);
?>
</div>
</div>
</body>
</html>
<?php
if($gzipCompression) ob_end_flush();
exit;
}
?>
[/php]
Thank you
Hmm? I meant the Modifications.portuguese.php file, sorry about the confusion.
Quote from: nneonneo on November 07, 2007, 06:19:40 PM
@adventurer: Hmm, odd. Have you checked the server error log?
nothing wrong ....
????
Hum? Nothing in the server error log, yet moderators can't ban or delete?
Anything in the forum error logs?
I find this error in forum error logs:
8: Undefined index: yshout_loading
Archivo: /homepages/11/d219923774/htdocs/Foro/Themes/Black22/BoardIndex.template.php (main_above sub template - eval?)
Línea: 288
I have searched the line 288:
return;
Only this.
Oh dear, my apologies (to everyone!). I missed a post, and now I've posted wrong advice >.<
Here:
@Sruc: Banning should work, but deletion doesn't work because you've modified this line:
if ($user['is_admin'] || $user['is_Moderador Global'])
This should read
if ($user['is_admin'] || $user['is_mod'])
As for the yshout_loading error, copy Themes/default/languages/Modifications.english.php to Themes/default/languages/Modifications.<yourlanguage>.php to fix that.
@adventurer: Yet, history will not show? Give me a URL to your forum and I will check it out.
@okidokiss: It's probably due to character encodings (the failure of the special characters to show). Post, PM or attach your Modifications.language.php file, and I'll see what I can do.
OMFG I'm a newbie >.<'
Excuse me already for the inconveniences and thank you very much.
How do I place the shoutbox directly below my boards and right before the info center?
Very effective shotbox, Unfortunately yshout.php is restricted by many shared server hosts, they say it uses too much resources on refresh.
@trekkie2444: For the default theme, everything you need to do is in Themes/default.
Edit index.template.php and do these three steps:
1) Change
',empty($options['collapse_header']) ? 'loadChat();':'','
to
loadChat();
2) Remove
// YSHOUT HERE
document.getElementById("yshout").style.display = mode ? "none" : "";
if(!mode)
{
loadChat();
}
// YSHOUT END
3) Remove
// YSHOUT HERE
echo '
<br /><b>Shout Box</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
This may appear twice.
The rest depends on where you want it exactly and how it should appear. You have many options:
1) as the first block in the info center
2) as a separate block styled like the info center
3) as a separate block styled like the blocks in the info center (e.g. Users Online block)
Also, it will only appear on the board index, and nowhere else, if this is what you want.
@exxocet: Hmm, I would suppose this is primarily due to my earlier versions being poor at efficiency. The new versions check for new shouts every 20 seconds, which is on par with most autorefresh shoutboxes, but more live because new shouts are near-instantly shown and the 20-second timer reset, instead of waiting for the shoutbox to refresh.
Quote from: nneonneo on November 12, 2007, 03:32:29 PM
The rest depends on where you want it exactly and how it should appear.
Is it difficult to change to a separete block style before my boards?
Nope. Follow the three steps outlined from before (these prevent the box from getting hit by strange collapse bugs).
Now, you have two options, because of where you want it.
a) On every page (this requires an edit to index.template.php)
b) On only the board index (this requires an edit to BoardIndex.template.php).
These two options produce vastly different locations in the code, but should result in approximately the same appearance. Let me know which one you want.
Only the board index.
By the way, the code which should be inserted looks like the following:
// YSHOUT HERE
echo '
<div class="tborder" style="margin-top: 0;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 5px 5px 5px 10px;">',$txt['yshout_shoutbox'],'
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr><td class="windowbg2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr></table>
</div><br />';
// YSHOUT END
This gets placed wherever you wish the shoutbox to appear. It will wrap the shoutbox with a category-like box, with the words Shout Box over the top.
For "only on the board index, before the first board", place this before
/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
and boards. (see below.) */
in BoardIndex.template.php.
For "on every page, after the tabs", put it after
// The end of tab section.
echo '
<td class="maintab_' , $last , '"> </td>
</tr>
</table>';
For "before the info center", put it before
// Here's where the "Info Center" starts...
in BoardIndex.template.php.
EDIT: Yeah, I think I've answered your recent post there jossanaijr, let me know if there is a problem.
Worked. Thanks AGAIN!!!!
I tried doing the ...loading shoutbox fix, but it still shows that problem.
@jossanaijr: Good to hear.
@iyeru42: Odd. If you give me a URL to your forum, I'll check it out.
Quote from: nneonneo on November 16, 2007, 12:02:31 AM
@jossanaijr: Good to hear.
@iyeru42: Odd. If you give me a URL to your forum, I'll check it out.
I can't seem to find your fix anymore, but here it is for the newest version:
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
change to
var board_url = "/home2/iyeru42/public_html/board";
Link to the Board (http://iyeru42.ryan444123.com/board/index.php)
I use the Scribbles theme, and PHP4... because my host's hoster won't upgrade to PHP5.
Is there a way I can stop guests from viewing the shoutbox?
Quote from: mandukar on November 16, 2007, 07:31:49 AM
Is there a way I can stop guests from viewing the shoutbox?
That's on it by default, unless the code was changed.
Hmm, that's not the fix I recommended. You should leave that as-is.
As for the shoutbox, it is giving me an error (http://iyeru42.ryan444123.com/board/yshout/yshout.php). Check the server/host error log for details.
Quote from: nneonneo on November 16, 2007, 08:04:24 AM
Hmm, that's not the fix I recommended. You should leave that as-is.
As for the shoutbox, it is giving me an error (http://iyeru42.ryan444123.com/board/yshout/yshout.php). Check the server/host error log for details.
That's because my host doesn't allow me to chmod executable scripts to 777/755 inside folders >>;
And since my hoster is not availible to fix it, I can't fix that problem, sorry.
then the codes been changed as guest can use the shout box.
@iyeru42: Well, in that case, is there anything in the server error log (if the host lets you see it)?
@mandukar: If you don't want guests to post to the shout box, set $allowGuestsPost to false in yshout/yshout.php.
If you don't want guests to _see_ the shoutbox, set $allowGuests to false.
Quote from: nneonneo on November 16, 2007, 01:08:21 PM
@iyeru42: Well, in that case, is there anything in the server error log (if the host lets you see it)?
PHP Error Log:
[Fri Nov 16 19:21:08 2007] [error] [client 76.204.90.122] File does not exist: /home2/iyeru42/public_html/favicon.ico
[Fri Nov 16 19:20:49 2007] [error] [client 74.6.26.163] File does not exist: /home2/iyeru42/public_html/wiki/index.php
[Fri Nov 16 19:18:00 2007] [error] [client 76.204.90.122] File does not exist: /home2/iyeru42/public_html/favicon.ico
[Fri Nov 16 18:52:34 2007] [error] [client 76.204.90.122] File does not exist: /home2/iyeru42/public_html/home2/iyeru42/public_html/board/yshout/yshout.php
[Fri Nov 16 18:52:34 2007] [error] [client 76.204.90.122] File does not exist: /home2/iyeru42/public_html/favicon.ico
[Fri Nov 16 17:51:17 2007] [error] [client 76.204.90.122] File does not exist: /home2/iyeru42/public_html/home2/iyeru42/public_html/board/yshout/yshout.php
[Fri Nov 16 17:51:08 2007] [error] [client 76.204.90.122] File does not exist: /home2/iyeru42/public_html/favicon.ico
[Fri Nov 16 17:01:34 2007] [error] [client 38.99.13.122] File does not exist: /home2/iyeru42/public_html/robots.txt
[Fri Nov 16 17:00:54 2007] [error] [client 38.99.13.122] File does not exist: /home2/iyeru42/public_html/robots.txt
Is the error log. Notice that yshout is calling the directory twice.
That's it? Hmm...are you sure there's nothing more?
I just called the script, and caused an error. It should show up in the error log.
ahh cool thanks I will try that out :D.
cool it works thanks.
next question is, is it possiable for the box to be moved onto its own page. e.g
http://www.rse-clan.com/smf/index.php?action=shout
btw thats not a working link just an example :P lol.
Hmm, yes, it is possible, but it will probably take some work.
The main reason for this mod is integration with the board; other mods (e.g. FlashChat) already do the job of putting the box outside on its own page.
pongsak - I still can't get this to work; on #4, there is no line of code stating this:
<div style="padding: 1ex 25px 1ex 25px;"id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /></div>
nor in the yshout.php is there this code to replace:
<input id="shout-text" style="color: #666666;" maxlength="125" value="" type="text" />
I'll keep trying.
thanks.
For the first line, look for
<div id="yshout"...
and the second,
<input id="shout-text"...
because of some recent changes in the shoutbox code.
Quote from: nneonneo on November 12, 2007, 04:39:57 PM
For "only on the board index, before the first board", place this before
/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
and boards. (see below.) */
in BoardIndex.template.php.
It's working fine but I just realize that the menu
History Commands ExtendedHistory ShowAdminLinks ReturnToShoutbox
does not update as it should be. For example, I have AdminLinks not shown. Even if I click ShowAdminLinks, or ReturnToShoutbox, or F5 it does not show the AdminLinks. Even when loggin and it says "loading shoutbox" , ShowAdminLinks does not work and it does not change to HideAdminLinks.
BTW History Commands ExtendedHistory commands are working fine.
Hmm, that's odd. Show/HideAdminLinks is based on cookies (and shoutbox reload); ReturnToShoutbox uses autoshout which is completely different.
I suspect a Javascript problem. I could visit your forum to check it out (username nneonneo).
Hi,
I asked my host to change PHP version from 4.4.7 to 5.2.3 but when they did that I had a lot of errors in shoutbox like those:
Warning: session_start() [function.session-start]: open(/tmp/sess_facf4ac425ef2e2e2c5f82f5443b2bad, O_RDWR) failed: Permission denied (13) in /home/mysite/public_html/forum/yshout/yshout.php on line 187
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/mysite/public_html/forum/yshout/yshout.php:187) in /home/mysite/public_html/forum/yshout/yshout.php on line 187
So we came back to the original 4.4.7
Any advice what I will have to do if I decide to change it again?
Nneonneo's shoutbox might not be compatible with PHP 5 yet... It is still new but I hear PHP is going to be releasing another version soon sometime this year or early next. PHP 5 is a good thing to have ;)
@brianjw: I use PHP5 on all the sites I run, and in fact, this was tested on PHP5.
@jossanaijr: It looks like a permissions issue on your host. My suggestion would be to log out and back in to reset your session, and hopefully fix the issue after upgrading to PHP5 (PHP5 may not have access to session data created by PHP4).
Quote from: brianjw on November 18, 2007, 08:39:07 AM
Nneonneo's shoutbox might not be compatible with PHP 5 yet... It is still new but I hear PHP is going to be releasing another version soon sometime this year or early next. PHP 5 is a good thing to have ;)
But not all people have the luck to have a host that has php5 (Like me.)
Well, if a host doesn't support php 5, I wouldn't use it as currently all things should be running on it and it is a stable release.
hmm alot of my members seem to be complaing of lag when trying to view a page, is there a way to stop the lag?
Lag? Odd, I don't know anything of lag, though if you were to load the shoutbox repeatedly and very often, I suppose it could lag a bit to load the shoutbox. The page should load normally, though...
SMF Version: SMF 1.1.4
hi
i want to know where i can change the shout box setting link how big the font i want or change color
can i one tell me where i have to go to change that
like Admin>
and the theme i am using is Ferry Tema
plzz help
Hmm? Most of the settings you want are in index.template.php. A bit of knowledge of CSS would be needed.
Font size:
Look for #yshout {
font-size: 10px;
}
and change 10px.
Font colour: look for #yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
and change color:.
ohk i though it was in admin panel
what code do i put
so guest can only see the posting and massages but they cant post on shoutbox
Set $allowGuestsPost to false in yshout/yshout.php.
in yshout.php i cant find this $allowGuestsPost
Version 1.11?
please help
History, Extended histiry, commands, etc is not shown :S
(http://img.icez.net/i/fz/shout.jpg)
Copy Themes/default/languages/Modifications.english.php to Modifications.<yourlanguage>.php.
I would like to give you my public thanks for your precious help my friend nneonneo, without that I would never get so far.
However it still doesn't work... I try do do that you tell me about "chmod" at Ftp, but yshout.php file was already at "755"... I also test from "750" to "759" but it stayed down...
Now I will let you here a image to analysis...
(http://i233.photobucket.com/albums/ee4/4T3IG0/yshout.jpg)
Waiting for your advise... 4T
It seems to work for me...I can see and post to the shoutbox now.
Quote from: nneonneo on November 22, 2007, 02:45:43 PM
It seems to work for me...I can see and post to the shoutbox now.
So why can't I see it?
I use internet explorer 7, should I install any program like Adobe Flash???
Well I check my Adobe Flash and I have the version 9,0,47,0 installed.
(http://i233.photobucket.com/albums/ee4/4T3IG0/AdobeFlash.jpg)
Hmm? Just use the default theme...it works for me.
Quote from: nneonneo on November 22, 2007, 06:56:44 PM
Hmm? Just use the default theme...it works for me.
You're meaning on your forum, or in mine???
I don't know why, but I just can't see it work... :'(
Are you using firefox???... ???
Yes, but it shouldn't matter. Default theme on _your_ board.
...EDIT: It is no longer working. Did you do something to it?
Well I didn't saw it at all, even at default theme.
...EDIT: It is no longer working. Did you do something to it? I only installed other Mods, but if you whant you can unistall them.
By the way, my Smf was pre-installed on the CP... do you think that can dificult the Shout to work correctly??? Should I install the "Full install of Download SMF 1.1.4"???
???
One question:
I had the 1.06 version installed some time ago and I'd want to know if the code added to actual forum files has been changed since that version.
'Cause if not, then I suppose that I can as well just replace the Yshout folder and any shoutbox-specific files that were added back then. But if not, then I'll need to search for all the added code and remove it manually before reinstalling the mod.
cya
Raziel-chan
EDIT:
And where do the differences between the installation file and what's posted here come from?
Installation file:
// YSHOUT HERE
document.getElementById("yshout").style.display = mode ? "none" : "";
if(!mode)
{
loadChat();
}
// YSHOUT END
Forum Topic:
// 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
There is also a change in one line in the larger fragment of code pasted into the index.template.php during installation. The file version does not work for me for some reason...
cya
Raziel-chan
Hi Neo,
i have used your mod for sometime, it is great!
but i'm having the same problem as Iyeru does..
I tried to change the board_url into "/" or "/home/chris/public_html/forum", but the shoutbox still "loading shoutbox" all the time..
i've check my error log and i found this.
mod_security: Access denied with code 403. Pattern match "yshout.php" at THE_REQUEST [hostname ....
and this
[Sun Nov 25 04:17:02 2007] [error] [client 222.124.1.56] File does not exist: /home/chris/public_html/forum/403.shtml
are these errors related to the "loading shoutbox" problem?
if so, how can i fix this?
thanks a lot Neo..
Nevermind, I installed it anyway.
But how can I change the font colour for text entered in the input box? My forum has a black background, so I can't see what I'm entering. I shuffled through the yshout.php and adjusted every colour possible, but that one could not find...
cya
Raziel-chan
Edit: Scratch that, I changed the values both in yshout.php and index.template.php.
My new problem is that while viewed in FF2.0.0.9 the input box text (but just the shout input, the user name one stays grey) is white, but under IE it's grey again.
cya
Raziel-chan
Edit2: Scratch that x2, missed the colour selectors in styles in yshout.php :-[
cya
Raziel-chan
Agh, tired of editing...
Well, two new questions:
1. What is the optimal value of updateTimeout.
2. Is there a way for the 'History', 'Extended History' and 'Commands' links to open in popups? 'Cause now they open new pages and users have to click back in their browsers to go back to the forum and, as they operate on Javascript, they can't be opened in a new tab/window by middle-clicking them.
cya
Raziel-chan
Hi my friend nneo... I find out what the problem was... the images of christmas on the top of the page were incompatible with the Shout. So now it's working very well, I thank your good help and congratulate you for your excellent job with this nice and good Shout.
Now I'm trying to add new great things like sound shouting and a smileys bar.
With the sound I'm having problems again, because I can't open the yshout/js/yshout.js... already installed the microsoft scripten_Js_Xp 5.7, and even then I receive this error:
(http://i233.photobucket.com/albums/ee4/4T3IG0/Som_Shout.jpg)
(http://img409.imageshack.us/img409/4200/somshout1er7.jpg)
Hope you can give me a little more help. ;D
Quote from: 4T3IG0 on November 24, 2007, 11:03:24 PM
Hi my friend nneo... I find out what the problem was... the images of christmas on the top of the page were incompatible with the Shout. So now it's working very well, I thank your good help and congratulate you for your excellent job with this nice and good Shout.
Now I'm trying to add new great things like sound shouting and a smileys bar.
With the sound I'm having problems again, because I can't open the yshout/js/yshout.js... already installed the microsoft scripten_Js_Xp 5.7, and even then I receive this error:
(http://i233.photobucket.com/albums/ee4/4T3IG0/Som_Shout.jpg)
(http://img409.imageshack.us/img409/4200/somshout1er7.jpg)
Hope you can give me a little more help. ;D
Go with any simple text editor. I use editplus. Notepad is fine as well, but it sucks at formatting, so it's harder to see things.
If it won't open in notepad, then it's corrupted.
cya
Raziel-chan
Umm, I looked through the code to add smileys and its instructions and only one question prevailed.
I'm using the shoutbox code provided on the first page of this thread, not the one in the package:
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Jul222007" 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
And the part that defines the shoutbox's location:
// 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
It's not exactly like the code used in that post describing how to add a smiley bar to it.
My question is - where in that second block of code am I supposed to add this:
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
Thanks in advance.
cya
Raziel-chan
EDIT: And where can I change the background colour for the history page?
in my forum i have a mod his color is green but in the shoutbox it show his color as the other members and my site admin color is red but the color does show in the shoutbox
but only works for the siteowner whicjh in me plzz help
Quote from: nneonneo on August 25, 2007, 12:56:04 AM
Eh? The code goes in the file /path/to/forum/yshout/yshout.php, not any specific theme file.
Find the line
$user=ssi_welcome('nothing'); // ssi_welcome only does something IF the parameter is 'echo'; otherwise the user data is returned!
and add after that
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;
}
}
replacing 2,3 with the IDs of moderators (usually 2 is Global Mod, 3 is Moderator) (code has been slightly updated).
WHAT IS THE ID ???
Sorry about the lack of replies; it's been an extremely hectic week for me.
I will try to answer everyone's questions.
@4T3IG0: I see that you have it working. For editing the yshout.js file, you can use any decent text editor (even Notepad is fine, but do NOT use Microsoft Word as it will screw up the file)
@Raziel-chan:
1) Differences between 1.06 and 1.11 are some slight changes to index.template.php (if the shoutbox loads fine for you, the changes will not affect you) and a lot of yshout.php changes (so replacing yshout folder will work fine).
2) Differences between posted changes and installation file is due to the (rather archaic) feature of not loading if the header is closed. This is an optimization for the default theme only, so the posted changes should be used on any other theme.
3) Optimal value of updateTimeout: depends on your server. It is optimal to set it as high as you can without exceeding the PHP script timeout on your server. This timeout is defaulted to 30 seconds (hence I use 20 seconds, though you can probably put that as high as 27 with no ill effects). If your host opts for a lower value, then you must decrease updateTimeout. The script will simply sleep until a new shout appears, and will use no resources (aside from a bit of memory) while it waits.
4) For adding smileys, place that block (the bit with the animatedcollapse) after
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
Note: it goes BEFORE the
';
bit.
5) For history background, look near the bottom of yshout.php.
@chris_lz: Have you tried chmod 755 or 777 on yshout.php?
Try using "/forum" for board_url.
Also, there's a chance, judging by the error, that the host has banned the shoutbox (this is probably because of the rather inefficient earlier versions of this shoutbox).
@AHMER: the ID of the group is what you see when you go to edit the group (action=membergroups;sa=edit;id=XXX)
sorr but the code doesnt work
if u dont mind can u do it my
i am the site owner my id is 1
my site admins id is 9
and site techteam id is 10 can u make the code plzz
Adding smileys...
@pongsak or @nneonneo, with the last version 1.11, I tried the next advise...
Quote from: nneonneo on November 17, 2007, 03:46:43 PM
For the first line, look for
<div id="yshout"...
and the second,
<input id="shout-text"...
because of some recent changes in the shoutbox code.
And after modifications it didn't work... I'm having this error: (http://img104.imageshack.us/img104/5712/smileyfi3.jpg)
Can you please help me??
By the way... does anyone have smileys working with this version?? In affirmative case... can you explain us how did you did it???
Thanks to all.
Edit: Here's my file Load.php
@AHMER:
if (loadMemberData(Array($user['id']),false,'minimal')!==false)
{
$group=$user_profile[$user['id']]['ID_GROUP'];
if(in_array($group,array(1,9,10)))
{
$user['is_mod']=1;
}
}
@4T3IG0: You need to actually have the smileys file installed on your forum.
@4T3IG0: You need to actually have the smileys file installed on your forum.
Hi again my friend nneo...
If you're meaning "smiley.php", I already have it intalled before... and I'm still receiving that error.
Can you please tell me wich one is it???
Tnks :)
Well... I find what was wrong... I Wrote Mymod instead of mymod, and that was enough to don't let it work...
;)
Hi my friend nneonneo... here's mine Portuguese translation. I only translated visible text, if you want any other part translated just say so.
8)
Nice! I'll make a language pack in the next week with this translation.
If you want, you could translate the locked messages (the five at the bottom), as well as the errors (yshout_..._error).
Thanks!
You're welcome... I will do that right away.
Here is the last Portuguese translation upgrade... lol. :)
Quote from: nneonneo on December 01, 2007, 09:12:43 AM
@AHMER:
if (loadMemberData(Array($user['id']),false,'minimal')!==false)
{
$group=$user_profile[$user['id']]['ID_GROUP'];
if(in_array($group,array(1,9,10)))
{
$user['is_mod']=1;
}
}
doesnt work plzz help i am using ferry tema
plzz help
argh, just post yshout.php.
And are those IDs the IDs of the GROUPS, or of the USERS?
i think group id bcz i go to admin cp and then click membergroups then click site owner and the url box it say group id is 1 and admin group id is 9 are those rite
I'm having troubles using this on the overview, can someone tell me where should i include the shoutbox?
put it in the main page
Ok, solved, i inserted it in a box matching the board, and made it to collapse (some users don't like to use)
but now i'm facing a problem:
if i use timeout of the shoutbox 20 or above, sometimes the shouts disappear, leaving only the shout form. (changed in yshout.php) but if i use 10 or bellow nothing disappear. although, if no one shout in 10 seconds it doesn't refresh anymore (i think, or i just misunderstood?)
So, i'll be grateful to anyhelp.
Timeout -- your server likely has a 15 second script timeout, which means that you need to have the updateTimeout less than that (10 is fine).
As for it not refreshing: if someone shouts, it should automatically update, otherwise it will simply wait. If that's not the case, and it fails to display new shouts, then there is a problem.
Try this: log on to the shoutbox with two different windows, and wait 15 seconds. Then shout with one window, and see if it shows up on the other.
sometimes it stops from updating, but that's all right.
Another problem, admins shouts are red, but mod one's aren't any special color...
See
http://www.simplemachines.org/community/index.php?topic=137508.msg879855#msg879855
Worked, but how do i change the color mod? It's buggin me...
The color of mods is not blue...
*edit*
I changed the moderator color, i changed the #shouts .moderator a {
color: #00F;
}
on the yshout.php, and nothing happens... Blue, blue, blue, color of mods is orange...
#shouts .moderator a: if you changed that, then it should work...that's the only place where colors are referenced.
Did you change it in index.template.php?
-_-
Thank you.
Great mod.
I only changed it in yshout.php.
Changing at index.template, solved it.
Thanks.
Nice little mod. Installed it and it works fine on the default Core theme, but all of my members use a custom skin. I tried to change the index.template.php file as indicated but when I uploaded it back up it came up with a parse error.
I've attached the index.template.php file so you can look as it to find out if it just won't work with this skin or if there's something I'm missing.
There's no yshout code in there, and it looks like it would be perfectly compatible with the shoutbox...upload the version with your modifications (parse error) and I'll see.
Couldn't there just be a code that depending on what the person's membergroup colors are set as, it would automatically display the colors without adding this...?
brianjw
I was just thinking of that. It would (AFAIK) require inclusion of database code, since there doesn't seem to be just one function to get a formatted member name; instead, the code to do that is repeated in every SMF source file needing that functionality, irritatingly enough...
Sorry, should have uploaded the edited file as well. I've tried to place the 2nd bit of code (that places it at the desired place) in a div called "blank-box" which is apparently used to add in other stuff like ads. Wasn't sure exactly where would be best to place it.
Ok, neoneo how do i change the color for regular users :\
Sorry to bother so much, or actually, how do i make it bold for all users. Cause the regular user's post with the same color.
*edit*
Ok solved... Thank you :P
@Chalk: You pasted something wrong; the header has some random junk in it.
First few lines should read
<?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/
*/
@De4thPr00f:
Add a font-weight: bold; to
#yshout p {
line-height: 1;
margin-top: 0;
}
in index.template.php
Actually i taked a look at the yshout.php and followed the $shoutuser (or something like that) and added the <b></b> tags before and after and it solved.
Not sure what happened. This should be the right file. Its from the "Themes/SlickPro_Graphite/index.template.php" which I then edited.
Aha.
The code you've entered isn't quite correct. Below is the code as it is in the file...
// If you want to put some ads or something on your pages, add them in this.
echo '
<div id="blank-box">
// 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
</div>';
...and how it probably should be.
// If you want to put some ads or something on your pages, add them in this.
echo '
<div id="blank-box">';
// 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
echo'
</div>';
Ah, I see what was wrong now. I'm still pretty new to some languages, like php for example.
Btw, is there a way to not let guests shout anything? I saw a few links that retricts it to membergroups but wasn't sure which one would achieve the thing I want. Basically all members can use it, but just not the guests.
$allowGuestsPost - set it to false and guests will be barred from posting.
If you set $allowGuests to false, then guests will be presented with "You must be logged in to use the shoutbox!" instead.
I'm using SMF 1.1.4 version and I Installed shoutbox in my forum and i installed SB_1.11.tgz package in my forum.. but my problem is that it only shows "Loading shoutbox" but the shoutbox doesnt loads.. how can i fix the problem.. please help me..
Odd, I thought I fixed that, though sometimes there are many causes.
First, try to chmod yshout/yshout.php to 755 or 777.
If that doesn't work, look in your server error logs for errors.
Finally, if neither of those turn up anything, post or PM your forum URL and I'll take a look.
Hi nneonneo. The shoutbox work perfectly and formatted the way I wanted. Shout messages scroll up which is ok. The only thing I wanted is to display the <hr> after the shout messages and not before. Is there a way to do that?
Thanks for the mod. It's great.
<hr> before and not after? Hmm...probably just a case of adjusting the \n<hr> or similar code.
Post your "readChat" function. It starts with
function readChat($chatFile, $logDir) {
and ends with
return $chatText.' '; // hack: totally empty responses can break some browsers
}
Thanks for the quick reply nneonneo. Here's part of the readChat function.
$chatText=preg_replace_callback("/\[<timeval=(\d+)>\]/",create_function('$matches','return "";'),$chatText);
// $chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
$chatText=implode("\n", (array_reverse(explode ( "\n", $chatText )))); // will reverse display from top to bottom
// return $chatText.' '; // hack: totally empty responses can break some browsers
return str_replace("\n","\n<hr>",$chatText.' '); // hack: totally empty responses can break some browsers
The "last line" (for now) is sorrounded with <hr>. It looks ok but I feel like it's not the right way.
return str_replace("\n","\n<hr>",$chatText.'<hr>'); // hack: totally empty responses can break some browsers
Merry Christmas!
The extra hr at the top is due to the trailing \n at the end of the file.
To fix, use
$chatText=implode("\n", array_reverse(explode ( "\n", trim($chatText)))); // will reverse display from top to bottom
trim will remove the extra newline.
Also, for a tiny efficiency boost, use
implode("\n<hr>"...
return $chatText...
It work! Thanks a lot nneonneo.
One last thing ;) I want the history in another page.
My members don't call this shoutbox. They call it chatbox. They use it for chatting which is great. Thanks again nneonneo.
The history in another page? Do you mean as in opening in a separate window?
If that's the case, then change (in yshout/js/yshout.js)
function goTo(args) {
document.location=yshout_php+'?'+args;
}
to
function goTo(args) {
window.open(yshout_php+'?'+args);
}
hi nneonneo,
thanks for this great mod. i ve been looking for it for a long time.
I have smf 1.1.4 and using 7dana theme in turkish.
I tried it at local, there was no problem. then uploaded the server. it works fine but
I am getting an error:
http://mydomain/index.php?action=viewErrorLog;desc
8: Undefined index: path
Dosya: /home/xxxxxxx/public_html/Themes/default/Errors.template.php (eval?)
Satır: 107
please help.
hmm...odd...
Try this: in Themes/<themename>/index.template.php, change
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
to
var board_url = "/";
(assuming your forum is at http://mydomain/ and not in a subdirectory)
I ve tried it
var board_url = "/";
but it gives error again..
then I tried
var board_url = "http://www.mydomain.com/";
it gives no error now. is the code ok? please inform me if anything I did wrong. thanks.
is there a way to delete all history. I mean without loggin in to server and deleting history.home file.
Did you actually put the brackets in? That doesn't seem right (without the brackets, it would work fine).
As for deleting all history: no, I don't have an option for that (mainly to avoid people accidentally zapping all their history when they meant to /clear)
The hr work like a charm nneonneo. Thanks a lot. It's working perfectly. One last thing... :P Just kidding. I am ok now. Great job and great support.
Hmm, I'm getting that error: "parent.document.sbox.ts is null or not an object" everytime I post in the shoutbox. What do I do to fix it?
@JohnyB: Glad to hear it all works.
@Andy134: I don't have "sbox" or "ts" in my shoutbox (an error like that would refer to "yshout"). Perhaps you have a different shoutbox installed?
Oops sorry. Lol, posted this in the wrong shoutbox mod topic :P. Meant to put it in the other one. Sorry xD
I could not find a way to delete history from server. how can I empty history.home.txt ? I used ftp client, cpanel file manager but it did not work. I cant change file permissions of this file also.
Huh? That's slightly odd.
Just deleting the file should work, but if the permissions are wrong...hmm.
Here's a possible fix:
In yshout/yshout.php, add
if(isset($_GET['clear_hist']))
{
if($user['is_admin'] || $user['is_mod'])
{
$chatFile=isset($_GET['file'])?$_GET['file']:"home.txt";
$chatFile = checkName($chatFile);
$chatPath = "$logDir/history.$chatFile";
$handle = fopen($chatPath, "w");
fclose($handle);
exit;
}
}
before
if(isset($_GET['banid']))
Then, point your browser at http://domain.com/path/to/forum/yshout/yshout.php?clear_hist. If it works, you'll get a blank page, and the history will be completely erased.
The Shout box is moving up and down... how to fix the fixed height of Shoutbox..
Up and down?
Maybe you wish to add a scroll bar - http://www.simplemachines.org/community/index.php?topic=137508.msg900272#msg900272
Yep Got it :) thx nneo
hello..
how can i set only selected membergroup can shout?
sorry if this already answered... i can't find
I think the easiest way to do this is to hide the shoutbox from those members:
In index.template.php, find (n.b. may not be exactly as shown)
// YSHOUT HERE
echo '
<br /><b>Shout Box</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
Add before
global $user_profile;
if (loadMemberData(Array($context['user']['id']),false,'minimal')!==false && in_array($user_profile[$context['user']['id']]['ID_GROUP'],array(9,10)))
where 9,10 are the membergroups that are allowed to shout.
Also, in yshout/yshout.php, after
$user=ssi_welcome('nothing'); // ssi_welcome only does something IF the parameter is 'echo'; otherwise the user data is returned!
add
if (!(loadMemberData(Array($context['user']['id']),false,'minimal')!==false && in_array($user_profile[$context['user']['id']]['ID_GROUP'],array(9,10))))
die("Sorry, you are not allowed to shout.");
where 9,10 is as before.
how can i do this (http://img444.imageshack.us/img444/4972/howlg6.png)
like if u r not logged in it say this
like can u tell me the coding thanx
There is a setting in the yshout.php file.
I'm using FerryTema theme. I believe I can see it on the forums when I first go there as a GUEST. However, when I sign in as administrator I can't see it at all.
It also appears to be centered and not aligned to the left.
I have a test forum I did with the default style so I "saw" basically where to install the second smaller section. However, not sure if thats really right or not as I guess it was loaded there automatically when I added this on?
// 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
This is an incredible thread and a little overwhelming for me I'm afraid. I've read many tut but not why its not working for my theme?
@AHMER: Yes, the $allowGuests setting (set to false to make that message appear for guests)
@zookeeper: There are *two* spots where that code must be inserted.
In index.template.php, change
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
to
// 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
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
// 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
echo ' </span>
Quote from: nneonneo on December 28, 2007, 01:17:30 PM
@AHMER: Yes, the $allowGuests setting (set to false to make that message appear for guests)
But where can i find this $allowGuest
yshout/yshout.php
can u make me the code like replace this with this
plzz that would be gr8
Umm, just set it to true.
theses things are set to ture
// Should we use GZip compression? If you are having trouble with the shoutbox, set this to false.
$gzipCompression=true;
// Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;
// Guest usage for posting. Set to false if you don't want to let guests post to the shoutbox; if allowGuests is on, they will still see it.
$allowGuestsPost=true;
// Automatic Guest Usernames: should they be able to choose their own usernames?
// Set to some string (a prefix) if you want to disable guest choice of username
// Set to false if you want to allow guests to choose a username
$autoGuestName=false;//'guest-';
// Command options.
// If this is set to false, all typed commands are disabled.
// Admin functions, via admin links, are still available.
$allowCommands=true;
// If this is set to false, guests will be denied access to commands.
$guestCommands=true;
but doesnt work
Sorry, sorry; I meant false...
$allowGuests=false;
i got it thanx
took me a bit but got it working, good work thanks.
had a heckuva time getting past 'shoubox loading..'
final error was from the server error logs, yshout.php was 777 which i did to test but server denied access till i made it 755
Hello there.
Im' sorry for not reading the (72!) pages of this thread, but i used the search and nothing came up.
Here it goes: i installed the mod and th eonly thing i see is
Shout Box
...loading shoutbox...
Does this mean my server does not have ajax support?
Thanks.
Hello FragaCampos:
This is a oft-discussed problem. If your browser supports AJAX (Firefox, IE 5.5+, ...) then this message means that your browser was unable to load the shoutbox -- usually, this means the server had some problem serving it up.
Try these:
1) Check server error logs -- errors like "denied due to write-attribute/777" or "file not writable [...]" on yshout/yshout.php typically indicate misconfigurations (usually, chmod'ding yshout.php 755 or the chats folder 777/755 fixes these)
2) Go to http://domain.com/forum/yshout/yshout.php and see what comes up:
a) "Nothing to do" -- shoutbox should be functional (probably client side issue -- easiest thing to do is give me the forum URL and let me check it out)
b) Nothing at all -- shoutbox lacks language files but should otherwise work
c) HTTP Error 500 -- shoutbox failed to load due to a server error (check error log)
d) HTTP Error 404 -- shoutbox isn't installed...
e) Anything else -- Something isn't right.
Hi... I have 2 members that all of a sudden cannot see the shoutbox... all they get is the shoutbox loading... thing. I logged in with their account and sure enough I see the same thing, What could cause only 2 members to have this problem??
Thanks for a great mod.
Quote from: nneonneo on January 02, 2008, 11:17:40 PM
Hello FragaCampos:
This is a oft-discussed problem. If your browser supports AJAX (Firefox, IE 5.5+, ...) then this message means that your browser was unable to load the shoutbox -- usually, this means the server had some problem serving it up.
Try these:
1) Check server error logs -- errors like "denied due to write-attribute/777" or "file not writable [...]" on yshout/yshout.php typically indicate misconfigurations (usually, chmod'ding yshout.php 755 or the chats folder 777/755 fixes these)
2) Go to http://domain.com/forum/yshout/yshout.php and see what comes up:
a) "Nothing to do" -- shoutbox should be functional (probably client side issue -- easiest thing to do is give me the forum URL and let me check it out)
b) Nothing at all -- shoutbox lacks language files but should otherwise work
c) HTTP Error 500 -- shoutbox failed to load due to a server error (check error log)
d) HTTP Error 404 -- shoutbox isn't installed...
e) Anything else -- Something isn't right.
Thanks for you reply.
I didn't receive any server errors. And i changed the chats folder to 777 andnothing changed.
Also, i went to the url you provided and saw nothing but a ordinary page. The only difference i see from http://www.domain.com/ is the icons on the top of the page :/
@YodaOfDarkness: See http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341 for a solution posted a while ago.
@TOOMUCH4MOST: If your theme has a header upshrink, try uncollapsing/showing the header
@FragaCampos: By http://domain.com I meant the real domain and path to your forum, not actually domain.com.
Just calling loadChat(); should've fixed that, unless yshout.php is somehow inaccessible...
If indeed yshout.php is inaccessible, then it's a server thing. Visiting /forum/yshout/yshout.php should say "Nothing to do"; anything else is a problem.
Hmm, that's odd. Got a URL I can check out?
Using Wireshark, I think that yshout.php is somehow outputting corrupted compressed data.
Try setting "$gzipCompression" to false.
EDIT: There's a spurious newline some time before ob_start("ob_gzhandler"); -- maybe an added "echo" or something. This causes the resulting GZip output to be corrupted, and thus unreadable to the browser.
Yeah, setting it to hidden should be fine. Just don't delete it ;)
Surprisingly, I don't think this is easily doable.
It may be possible with some JS hacks (for each <p> in $("shouts"), set alternating colors to the style sheet).
Sadly, no major browsers yet support :nth-child (except Konq AFAIK), so it's not a viable solution (otherwise, something like #shouts p:nth-child(even) {...} would work easily).
Probably best to count newlines, as those typically can't get arbitrarily inserted.
I still wish nth-child worked though.
FF3 should by release, but current trunk builds (like the one I am using from about 15 days ago) do not.
Opera supports most of the selectors, including nth-child, but not all.
Konqueror is still the only browser to support all of CSS3 AFAIK.
Hey neo, I have a odd problem.
When I try to add the shoutbox, it doesn't display anything but "Shout Box"
I'm using this theme:
http://custom.simplemachines.org/themes/index.php?lemma=256
Please help.
I have an issue as well...
The shoutbox is working, intermittently. Most of the time I get a "Nothing to do." message, which switches to the shouts here and there. Everything else seems to be working correctly. All the functions and commands work, the history is saved in chats.
Any ideas?
TJ
@SamrtWeirdo: Is your forum using a language other than English? If so, copy Modifications.english.php (in Themes/default/languages) to Modifications.<yourlanguage>.php. Note this *won't* fix the problem (AFAIK) but it should make something (an error? a message?) show up.
@tokinjoker: Strange. I'll probably need to take a look at it; give me a forum URL (or PM if it is private)
@tokinjoker: In their infinite wisdom, GoDaddy has added ads to yshout.php. This probably interferes with the presentation of the information.
Possible fix: Change gzipCompression to false in yshout.php (this disables compression but should prevent the ads from corrupting the data sent).
Thanks for the quick response Nneonneo. Tried turning off compression to no avail :( I think I'm gonna havta drop the shoutbox till I can get some ad free hosting. Great work though, looks and functions very well, when we see it, hehe.
Thanks again!
TJ
Well, here's the thing: I can see the shoutbox fine (using the username you provided); there appears (to me) to be no problem...
Yea, usually when the page first opens the shoutbox will stick around a little longer, but as you traverse the forum, it gets worse, until it only shows the shoutbox for a couple seconds every minute or so.
I just browsed your website for ~10 minutes, and the shoutbox is still functional.
are there any code for making this shoutbox only used for registered member ? i dont want any guest shout or spamming, thx ! ;)
Set $guestsAllowed to false in yshout/yshout.php.
Quote from: nneonneo on January 03, 2008, 02:52:48 PM
@FragaCampos: By http://domain.com I meant the real domain and path to your forum, not actually domain.com.
Ok, if i use http://docspt.com/index.php/yshout/yshout.php i get the main page in the palce where it should be the shoutbox.
If i use http://docspt.com/yshout/yshout.php i get the error 500 page not found.
I went to Forum error log and i see the following errors over and over:
"8: Undefined index: path
File: /home/docspt/public_html/Themes/default/BoardIndex.template.php (eval?)
Line: 111"
"8: Undefined index: path
File: /home/docspt/public_html/Themes/default/Errors.template.php (eval?)
Line: 111"
Looks like the shoutbox might not even be installed...
http://docspt.com/yshout/js/yshout.js <-- 404 not found
So you dont see the "Nothing to do" message at all? Perhaps it's something with my browser?
Maybe it is... I have AdBlock but I disabled it when viewing your site, yet I still got a working shoutbox :P
Yea, looks like it's an issue with IE7, works great in FF. :)
I think it's a problem with your host.
I noticed that whenever I login, I get a blank page; same thing happened when I tried to log out. This suggests that perhaps there is a bug on the server regarding certain requests -- this happens on SMF pages and is thus not restricted to just my script.
In this light, maybe the shoutbox will not work (and I fail to understand also why it would magically work under FF...).
I think that would work.
However, if you installed them both on the same page, it wouldn't work because they would both try to load to the same div.
I had problems with loading shoutbox but i finnaly fixd that.
Now my shoutbox is working but all shouts are centered and I want them to align on left side of the shoutbox, Shout! text on button isnt visible and I dont see admin commands on the top of the shoutbox....
Whats the problem? Tnx....
To fix the centering issue, change <div id="yshout" to <div id="yshout" style="text-align: left"
To fix the missing text, copy Themes/default/languages/Modifications.english.php as Modifications.<your language>.php
Quote from: nneonneo on January 06, 2008, 06:10:38 PM
Looks like the shoutbox might not even be installed...
http://docspt.com/yshout/js/yshout.js <-- 404 not found
Now it isn't, because when i install it, it doesn't appear but allocates the space on the top of the page, which doesn't look good.
I can't really help unless it is installed. You can install it briefly (e.g. now) and I will see to it right away.
Ok, i'm goint to install it. Please warn me when you see it, so that i can uninstall it.
Thanks.
PS: Maybe it's better if you choose english language on the forum.
http://docspt.com/yshout/yshout.php
I get a basic error 500.
Change the line
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
to
var board_url = "/";
in Themes/default/index.template.php (this trivially fixes the forum errors).
As for yshout, check the _server_ error logs.
Same error after editing the index.template.
Tell me, where do i look for server error logs?
I don't know. It varies from host to host.
Your host might have some sort of control panel where a log option is present.
Hello all :)
Firstly, sorry for my english, i'm french :P
I have problem with my shoutbox @ http://wow.raidisdead.free.fr
As you can see, the Shoutbox close itself automaticaly after 5 seconds :/ I have to click on "return to shoutbox" to see the chat.
I didn"t do anything, and the shoutbox works fine before this morning.
Thanks for help me :) (and really sorry for my bad english ;) )
EDIT : this bug appears only with Firefox ...
Change $updateTimeout in yshout/yshout.php to something less than 5.
Thank you :) It works !
I have added pongsaks code to the shoutbox.
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
Now i can't edit no smiley's anymore in CP. When i delete this code i can edit smiley's again.
The shoutbox is added in index.template.php and theme is Dilber MC.
What is wrong here?
Grtzz
DJ Bert
What exactly do you mean by "can't edit"?
In control panel/Smiley's & Avatars i can't add/delete/edit the smiley's, (smiley's not found). When i removed the code then i can add/delete/edit smiley's.
That's very odd, though I suppose it might have something to do with the shoutbox loading the smileys.
I'm going to try it out on my local forum, and let you know what happens.
Aha. Found it.
Of course, the problem is that the smiley.php file is overwriting some other variable.
Below are the two changes you need to make in order for this to work; make both changes to smiley.php.
Change
$context['smileys'] = array(
'postform' => array(),
'popup' => array(),
);
to
if(isset($context['smileys']))
{
$context['smileys']['postform'] = array();
$context['smileys']['popup'] = array();
}
else
{
$context['smileys'] = array(
'postform' => array(),
'popup' => array(),
);
}
Change
foreach (array_keys($context['smileys']) as $location)
to
foreach (array('postform','popup') as $location)
awesome! got it to work! just had to change the permission to 0755
This is an awesome shoutbox, and I really liked it (after I fixed the whole ...loading shoutbox... problem). I just have one slight problem I need to make it so only certain members can see this and others dont. I did not see a function that allows one group to view the shoutbox and another to see it blank. Is this possible?
@Theler -- probably by using http://www.simplemachines.org/community/index.php?topic=137508.msg1358011#msg1358011 or something similar.
Hi there, I just installed the shoutbox on my third forum, so I'm used to doing it and all, but this is the first time that it only appears on the homepage. I am using the 'bright forest' theme found at smf machines. I have never used this theme before so figure it must have something to do with that. Any ideas on how I can have the shoutbox visable on all pages.... Ah, another thing to mention is this theme using both the index.templete.php and boardtemplate.php So I had to install first code in the index.templete and the next go (to place shoutbox) in the boardtemplate file.
Thanks,
Tina
Quote from: nneonneo on January 13, 2008, 02:09:10 AM
@Theler -- probably by using http://www.simplemachines.org/community/index.php?topic=137508.msg1358011#msg1358011 or something similar.
Thanks for the quick response, I tried to follow that but it just made the shoutbox go away even for membergroups that I allowed to see it. (I went with the membergroup IDs listed in the panel. Such as ...action=membergroups;sa=members;group=1 I put in as the number 1. Also I was wondering if there was a way to display the shoutbox in an actual board of its own and not at all on the mainpage?
Quote from: nneonneo on January 12, 2008, 05:48:41 PM
Aha. Found it.
Of course, the problem is that the smiley.php file is overwriting some other variable.
Below are the two changes you need to make in order for this to work; make both changes to smiley.php.
Change
$context['smileys'] = array(
'postform' => array(),
'popup' => array(),
);
to
if(isset($context['smileys']))
{
$context['smileys']['postform'] = array();
$context['smileys']['popup'] = array();
}
else
{
$context['smileys'] = array(
'postform' => array(),
'popup' => array(),
);
}
Change
foreach (array_keys($context['smileys']) as $location)
to
foreach (array('postform','popup') as $location)
Thank you nneonneo.
I have made the changes and is working now. ;)
@colorgoddess: Do you mean the BoardIndex template? That controls only the home page (the listing of all boards), and not any other pages. Hence, to get the shoutbox on other pages too, install to index.template.php.
@Theler: Oops, I should have had
global $user_profile;
before the "if" statement.
Quote from: nneonneo on January 13, 2008, 09:41:48 PM
@colorgoddess: Do you mean the BoardIndex template? That controls only the home page (the listing of all boards), and not any other pages. Hence, to get the shoutbox on other pages too, install to index.template.php.
@Theler: Oops, I should have had
global $user_profile;
before the "if" statement.
Thanks a lot the script works as intended now. :)
Okay thanks, I had already tried that, and it either went way above the whole page (even the logo) or at the bottom. That is why I used the BoardIndex.... So I have chosen just to have the shoutbox on the bottom; at least it is on every page this way.
Tina
can this also been placed above the board index with a theme frame? and not in the Welcome area? please pm when you have the anwser.
greetz Satfiles
So i did some searching for how to disable bbc code, and found it in the yshout/yshout.php doing a kill some search, but when i add more to that list it does not stop users from using the bbc.. I dont know why
$newText = $args.' ';
$newText = $func['htmlspecialchars'](stripslashes($newText), ENT_QUOTES);
$newText = str_replace(array("[list]","[center]","[left]","[right]","[img]","[youtube]","[font]","[color]","[size]","[glow]","[quote]","[code]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
preparsecode($newText); // gah, sanitize input!!
$newText = parse_bbc($newText); // w00t!
Can someone help me with that? Forums is on 1.1.4 with the latest version of this mod. I am using a skin that is not default so... that could be one reason, I can get the mod to work very well in the boardindex.template.php
You can see my dev forums here (http://wii.bydice.com)
also it seems that guests are allowed to use the shout even though i turned it off... is there a different place for the restrictions?
Thanks for your help
Dice :)
I try modified own shout box, so it can turn off sound ;)
after you modified mod with sound...
in yshout.js, after
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
add
if(get_cookie("shoutSound") == "true")
{
soundManager.setVolume('sound',200); // my addition line, you can remove it
soundManager.play('sound');
}
and add this to first line of file
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
in yshout.php, add this to anywhare are you need
if(!isset($_COOKIE['shoutSound'])) {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24);delete_cookie(\'yShout_open\');loadChat();">Use Sound</a>';
} else {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();">No Sound</a>';
}
PS. I'm add that after...
case "init":
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">',$txt['yshout_history'],'</a> <a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
hey nneo is it possible for the shoutbox to appear only in the board index page instead of the index.template.php? if so wat edits should i make?
plz help me!!!
thank you very much! i love your shoutbox!!!!!!
Sorry for not responding to these recent posts.
@Satfiles: Yes. The following code should be used somewhere to make it work. (good place: right after the global line in theme_linktree in index.template.php):
// YSHOUT HERE
global $txt;
echo '
<div class="tborder" style="margin-top: 0;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 5px 5px 5px 10px;">Shoutbox Test
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr><td class="windowbg2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr></table>
</div><br />';
// YSHOUT END
Note that you must remove the existing location of the shoutbox, or it will not load.
@wiidice: To do this, you have to remove the ] from the matches: some tags take arguments (e.g. [ quote author=... ]). Also, to turn it off for guests, set $guestsAllowed in yshout.php to false.
@falconforce: That's very useful, and is certainly a nice addition for sound. I'll add it to the main mod page.
@www.livedown.us: Yes, but it will restrict the places you can put the shoutbox. First, remove the code from index.template.php leaving only the part in the <head> section (the one with many script tags and CSS).
Next, add the following to BoardIndex.template.php (I recommend before
/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
and boards. (see below.) */
):
// YSHOUT HERE
echo '
<div class="tborder" style="margin-top: 0;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 5px 5px 5px 10px;">Shoutbox Test
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr><td class="windowbg2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr></table>
</div><br />';
// YSHOUT END
I'm not able to download your mod. (Version 1.11 http://custom.simplemachines.org/mods/index.php?action=download;mod=585;id=42153). Coming from me or due to the recent crash of the server? Version until 1.08 can be downloaded. Could you upload it again, or give us a link ? Thx
Thank you for letting me know. 1.09 to 1.11 have been reuploaded.
EDIT: Also re-uploaded the language packs for the first post.
I'm reposting pongsak's smiley guide because the recent server crash has deleted the smiley.php attachment.
Quote from: pongsak on August 18, 2007, 11:10:08 PM
For adding smiley .Let's go.
1. Adding 1 line of script between <head> and </head> index.template.php .
<script src="',$boardurl,'/mymod/animatedcollapse.js" type="text/javascript"></script>
This file will create sliding effect.
2. Create "mymod" dir in root forum dir and put the attached animatedcollapse.js in that dir.
3. download smiley.php and safe in mymod dir. (download smiley_SMF2.php instead for SMF 2.x, but name it smiley.php)
4. Search after in index.template.php or boardindex.template.php depend on where u put shout box.
<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>
or
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
or
<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>
add
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
NOTE: Don't put it after the '; or it will not work!
5. Open yshout.php for namely some input.
find and replace (up to 4 times)
*id="shout-form"
with
*id="shout-form" name="shout_form"
find and replace (up to 4 times)
*id="shout-text"
with
*id="shout-text" name="shout_text"
That's it. :D
EDIT [Feb 4 2008]: Updated a few instructions. Changes are noted in red, changes to code marked with a red *.
EDIT [June 22 2008]: Clarified instructions.
EDIT [June 27 2008]: Add 1.20 instructions.
EDIT [June 29 2008]: Moved animatedcollapse.js to an attachment, added a version of smiley.php for SMF 2.x.
EDIT [July 15 2008]: Clarified a common error.
I have a problem..
after I tried to upgrade from version 1.05 to 1.11 I got the problem.
the message '...loading shoutbox...' is frozen and the shoutbox doesn't show up.
I tried chmod the yshout.php to 777 and access it directly, then it shown me 500 internal server error. but it never been like this since I install the version 1.11.
If you don't mind, here's url to my forums
http://www.nekojumpfan.com/webboard
you can access it using the information below
username: test
password: test
thank you very much.
Have you checked the server error logs?
today, everything is work fine now. thanks
Great Mod, thanks!
Is there any possible way to change the default line history for all users?
Line history?
Do you mean number of lines shown? In that case, set $max_lines in yshout/yshout.php.
Great, thanks.
Is it possible to limit shouts to lets say one per hour?
Once per _hour_? That's quite a long time.
Is this one shout per person per hour, or one shout per hour regardless of who does it?
For the former, I'd recommend putting some timer in the session global, but there is a possibility that someone could get around that by logging out and back in. Aside from that, I'm not familiar with the SMF methods for storing data long-term, so I can't answer your question if the shoutbox restriction must be strict.
For the latter, this is fairly easy: check the modification time on the chat file, and only allow shouts if the file is old enough.
Using this mod has been great, really. I' m having some issues with my host though and i was hoping you could help modifying the code to solve them. They say the sb causes problems with the server as it consumes too many system resources. Propably as of the Ajax function. Could this be solved in anyway? Any suggestions? Thanks in advance.
Also, please post me back the link where the process to make smilies appear on the sb is described. 76 pages now and i don't seem to be able to find it.
Plus, is there anyway to auto erase History? It takes time and webspace.
Thanks.
The link for smilies is on the main mod page.
As for reducing system load, I've done what I can to avoid having the shoutbox use too much load -- however, if it is still a problem, try to increase the $updateTimeout in yshout/yshout.php. Also, maybe consider increasing refreshTime in yshout/js/yshout.js (this does very little compared with updateTimeout).
The technique I am now using is one Sarge described a long time ago. It holds a connection open for several seconds, during which any updates will be immediately refreshed to the user and the connection reopened. This technique drastically lowers server usage, but is only present in recent versions of the shoutbox.
Quote from: nneonneo on January 23, 2008, 05:04:47 PM
The link for smilies is on the main mod page.
As for reducing system load, I've done what I can to avoid having the shoutbox use too much load -- however, if it is still a problem, try to increase the $updateTimeout in yshout/yshout.php. Also, maybe consider increasing refreshTime in yshout/js/yshout.js (this does very little compared with updateTimeout).
The technique I am now using is one Sarge described a long time ago. It holds a connection open for several seconds, during which any updates will be immediately refreshed to the user and the connection reopened. This technique drastically lowers server usage, but is only present in recent versions of the shoutbox.
I 'm using 1.09. Is this version considered as recent? Would you recommend an update in order to quite solve this problem? I already increased $updateTimeout, i'll try increasing refreshTime as well.
Thank you.
1.09 is recent enough (I think the new code went into effect at 1.08). I don't think any of the newer updates deal specifically with performance, so if it works for you, it's not necessary to upgrade.
I know versions prior to 1.08 had performance issues. This caused a few hosts to block or impede the shoutbox, and since hosts are usually slow to undo those kinds of changes, the shoutbox is not always well-accepted by hosts (though I can assure you that the newer version should put its refresh rate and resource consumption on par with other non-AJAX shoutboxes, aside from the potential opening of several server processes; usually, most hosts do not worry about that though in my experience).
Well, my host shot down the entire website. I thought whis was inexcusable but even so...
So, all i can do is increase some more $updateTimeout and refreshTime or change my server! ;)
Aiee, that's no fun.
I wonder why? Does your host provide some sort of monitoring? There should be some way to see what is going on.
$updateTimeout has a maximum, however! It cannot exceed the maximum script execution time. If it does, users will just get broken shoutboxes.
As for refreshTime, increasing that significantly will make it randomly laggy, which would also be quite strange. What I don't get is why this is a major problem.
With updateTimeout at 20 seconds (the default), the shoutbox updates less frequently on average than most other shoutboxes. If the resource usage of a few extra server processes is so much, then I think the host has problems (though that's not something we can really fix!).
Which host are you using?
Wow! I was very hesitant on uploading this mod for months as i feared it create errors but nope. It installed great,it works just perfect. Very cool.
One question 'tho...... is there a tutorial or a direct link on how to move the shoutbox to right under "users online" at the bottom of the forum page only?
Quote from: BlueDevil on January 24, 2008, 05:54:22 PM
Wow! I was very hesitant on uploading this mod for months as i feared it create errors but nope. It installed great,it works just perfect. Very cool.
One question 'tho...... is there a tutorial or a direct link on how to move the shoutbox to right under "users online" at the bottom of the forum page only?
Nevermind. I figured it out.
...also...how do i prevent guests from posting?
Quote from: BlueDevil on January 24, 2008, 07:29:33 PM
Quote from: BlueDevil on January 24, 2008, 05:54:22 PM
Wow! I was very hesitant on uploading this mod for months as i feared it create errors but nope. It installed great,it works just perfect. Very cool.
One question 'tho...... is there a tutorial or a direct link on how to move the shoutbox to right under "users online" at the bottom of the forum page only?
Nevermind. I figured it out.
...also...how do i prevent guests from posting?
LOL....nevermind. Got it.
I'm glad you like it.
As for moving the shoutbox: this is actually pretty easy.
In index.template.php, there are three blocks of code delimited by "// YSHOUT HERE" and "// YSHOUT END". Delete the last two, leaving the first one (the one with several script tags and CSS) intact.
In BoardIndex.template.php, put
// YSHOUT HERE
echo '<br />
<div class="tborder" style="margin-top: 0;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center; ">Shoutbox </div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr><td class="windowbg2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr></table>
</div>';
// YSHOUT END
immediately before
}
?>
at the very end of the file.
Voila, a shoutbox after Users Online.
EDIT: Darn it, I'm late with the reply. Oh well, I'll leave this here in case anyone else needs it.
Thanx for the reply anyways nneonneo but i have 1 question.
I want to extend to the right the "typing box" longer so i can read a sentence better before i shout.
Where i edit this? I want to double the lenght if its possible.
also.....is there an update for using member colors for 1.11? Someone posted one 50 pages back but i think is for the previous version.
Quote from: BlueDevil on January 24, 2008, 11:39:21 PM
Thanx for the reply anyways nneonneo but i have 1 question.
I want to extend to the right the "typing box" longer so i can read a sentence better before i shout.
Where i edit this? I want to double the lenght if its possible.
also.....is there an update for using member colors for 1.11? Someone posted one 50 pages back but i think is for the previous version.
Hahahaha!! Im bad.
I found it after playing a bit.
I changed the text area to look longer.
From:
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
to:
#yshout #shout-text {
color: #000000;
width: 750px;
margin-right: 5px;
}
much much better.
There's also an option $maxShoutChars to control the actual number of characters you can type into the box.
As for member colours: hmm, I'm trying to remember how that's supposed to be done.
OK, here goes nothing...Edit yshout/yshout.php
Find
$p_class = "";
if($user['is_admin']) $p_class = ' class="owner"';
if($user['is_mod']) $p_class = ' class="moderator"';
if(!$user['is_logged']) $p_class = ' class="guest"';
$shoutName=$user['name'];
$userID=$user['id'];
$writeText="<p$p_class><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span> ";
if($user['is_logged'])
$writeText.="<a href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
Replace with
$a_class = "";
global $user_profile;
if(loadMemberData(Array($user['id']),false,'profile')!==false)
$a_class = ' style="color: '.$user_profile[$user['id']]['member_group_color'].'"';
$shoutName=$user['name'];
$userID=$user['id'];
$writeText="<p><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span> ";
if($user['is_logged'])
$writeText.="<a$a_class href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
Find
$chatText = preg_replace('/<a href="index\.php\\?action=profile;u=(\\d+)">/','<a href="javascript:ajaxGet(\'banid=\\1\')"><span class="adminlink">ban</span></a> <a href="index.php?action=profile;u=\\1">',$chatText);
Replace with
$chatText = preg_replace('/<a([^>]*)href="index\.php\\?action=profile;u=(\\d+)">/','<a href="javascript:ajaxGet(\'banid=\\2\')"><span class="adminlink">ban</span></a> <a\\1href="index.php?action=profile;u=\\2">',$chatText);
The first causes the shoutbox to load the user's data, including their member group color, then outputs it to the <a> tag.
The second fixes the ban listing stuff to work with the new styling info.
This will be a standard feature of 1.12, which is up-and-coming and is currently in the feature/bugfix stage.
hi guys need some help i am using nneonneo's Shoutbox in my site but the shoutbox wont show different colours of of different mebergrouponly the colour of admin is coming in shoutbox please help
See post immediately above yours. This feature will be implemented in the upcoming 1.12 release.
Thanx nneonneo,that worked. You should link this member code to the 1st page.
Quote from: nneonneo on January 25, 2008, 08:55:23 AM
See post immediately above yours. This feature will be implemented in the upcoming 1.12 release.
Keshav is right. The member colors worked but when they post,nothing shows. Just their name is visible nothing else.
Quote from: nneonneo on January 25, 2008, 08:55:23 AM
See post immediately above yours. This feature will be implemented in the upcoming 1.12 release.
but the same shoutbox is been used in other sites and colour of different member groups are coming in shoutbox.....
Quote from: BlueDevil on January 25, 2008, 09:46:57 AM
Quote from: nneonneo on January 25, 2008, 08:55:23 AM
See post immediately above yours. This feature will be implemented in the upcoming 1.12 release.
Keshav is right. The member colors worked but when they post,nothing shows. Just their name is visible nothing else.
That's downright strange. Unless I posted the code wrong, it shouldn't do anything to their post text.
If it's happening on your board, I should go take a look, since I cannot reproduce it in either IE7 or Firefox.
Hi nneonneo,
10x gor a great mod, but I have a problem and can't get it running I would be glad if you can help... so here si the problem...
1) I installed the mod manually because it didn't work with the automatic install no matter what changes I did (just for info)
2) I got it runing (applouse) ;) but the shoutbox works ok only on the frontpage if you go inside a topic the content looks strange and I see only shoutbox loading...(the problem)
3) I tried fixing it by changing the var board_url but when I do so the shoutbox stops working even on the frontpage and I see only "shoutbox loading" everywhere
4) I see an error also "8: Undefined index: path
File: /path/to/myforum/Themes/default/Admin.template.php (eval?)
Line: 107"
no matter what is my board url the error is still there... here is my line 107:
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
I tried changing the var board_url to almost everything....
10x for your attention and great mod again ;)
Quick question about Smileys Addition. I did all described.
And thus, i managed to make the smileys appear on the SB but when i click on ANY of them, nothing happens. Any help would be appreciated.
@ByeVas: Do you have search-engine friendly URLs? That causes big problems for the script.
As for board_url, you can try
var board_url = "/";
@examino: Did you add "name=..." to *every* instance in yshout/yshout.php? The "name" tag is required for the smiley code to find the typing bar, and there are many instances of
id="shout-text"
in the yshout.php file. Each one needs to have a name attribute for it to work properly.
No, i didn't quite did that. But i'm not sure i understand exactly. It seems like i have to enter a name for each smiley in the code but where exactly? May I have an example?
EDIT:
Where do i add the "name" tag and how exactly?
If you are reffering to step 5 of the guide, i did it yes. But only for those two mentined there. Isn't it enough?
From http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091 step 5
Quote5. Open yshout.php for namely some input.
find
<form id="shout-form" action="#">
replace to
<form id="shout-form" name="shout_form" action="#">
find
<input id="shout-text" style="color: #666666;" maxlength="125" value="" type="text" />
replace to
<input id="shout-text" style="color: #666666;" maxlength="125" value="" type="text" name="shout_text" />
That's it. :D
I would recommend instead that you find
id="shout-text"
and add after
name="shout_text"
That, I did. That's two lines of code edited, right? Still not working though.
No, not just two lines. There are several instances of shout-text.
I added the name tag everywhere but still nothing. So I uploaded yshout.php and index.template.php for you to check if and when you have some time to spare. I' m trying for hours now. Nothing seems to make it work. Than you for all your help.
EDIT: Figured it out. Thank you again.
Quote from: nneonneo on January 26, 2008, 10:29:45 AM
@ByeVas: Do you have search-engine friendly URLs? That causes big problems for the script.
As for board_url, you can try
var board_url = "/";
Yes use SEF urls. I tried :
var board_url = "/";
but it shows only "loading shoutbox" while
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
This works only on the frontpage, on the other pages the content is scrambled and the soutbox does not load...
OK. Use the second code, and please turn SEF URLs off. That will fix the issue (AFAIK the major search engines don't have a problem crawling your site without SEF URLs)
Quote from: ByeVas on January 27, 2008, 05:08:53 AM
Quote from: nneonneo on January 26, 2008, 10:29:45 AM
@ByeVas: Do you have search-engine friendly URLs? That causes big problems for the script.
As for board_url, you can try
var board_url = "/";
Yes use SEF urls. I tried : var board_url = "/";
but it shows only "loading shoutbox" while var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
This works only on the frontpage, on the other pages the content is scrambled and the soutbox does not load...
Yep. I replaced it with this code:
var board_url = "/";
[/quote]
but it only shows "loading shoutbox".
....i get the same errors as well. Lots pages 'tho lol.
Err, BlueDevil, wasn't your shoutbox working before?
Quote from: nneonneo on January 27, 2008, 11:40:25 AM
Err, BlueDevil, wasn't your shoutbox working before?
It works just fine but i get lots of errors like this one:
8: Undefined index: path
File: /home/midwest9/public_html/Themes/OverView01_tp/index.template.php
Line: 131
I tried replacing to this:
var board_url = "/";
but the shoutbox goes on "loading shoutbox" and it stays like that.
well i deleted that code and pasted back the original.
I dont mind errors and never did. They dont slow down my forum so im not that worrired. I have to delete them every now and then. lol.
For what is worth i have 83 working mods installed hahahahahaha!!!!
Just out of curiosity, what happens if you use var board_url = ""; ?
Quote from: nneonneo on January 27, 2008, 12:09:16 PM
Just out of curiosity, what happens if you use var board_url = ""; ?
It goes to "loading shoutbox". and thats it.
That's really weird, because it's exactly what would result if 'path' were missing, like it says in the error log.
How would I cut the timestamp to only show the Hour and Minutes?
Thanks
In yshout/yshout.php, replace
return timeformat(intval($matches[1]));
by
return strftime("%I:%M%p", intval($matches[1]));
Thanks! I also noticed that the timestamp doesn't take the user setting offset into consideration. If it's not much to ask, can you give me a solution to this?
Thanks a lot!
Try this: (n.b. I haven't tested this but it should work)
global $user_info, $modSettings;
// Offset the time.
$time = intval($matches[1]) + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600;
return strftime("%I:%M%p", $time);
Thanks, works like a charm! I switched over from the non-ajax shoutbox and I'm loving this shoutbox.
I love this shoutbox too :)
However, it does seem to give off errors every now in then in the log and sometimes on the page if my hosts server is a little slow. But other than that it's great live IM box (thats what it gets used for on my site alot of the time)
Updated member administration code -- thanks to Danielv for motivating me to do it ;)
In yshout/yshout.php, find
// Do not edit below this line unless you know what you are doing
and add above it
$sb_mod_groups=array(2,3);
if(loadMemberData(Array($user['id']),false,'profile')!==false)
{
$group_membership=explode(',', $user_profile[$user['id']]['additionalGroups']);
$group_membership[]=$user_profile[$user['id']]['ID_GROUP'];
$group_membership[]=$user_profile[$user['id']]['ID_POSTGROUP'];
if (count(array_intersect($sb_mod_groups, $group_membership)) > 0)
$user['is_mod']=true;
}
where 2, 3 are the member groups allowed to moderate the shoutbox. Moderators have as much privilege as administrators with respect to shoutbox management.
Thx you, this is helpfull
this update give option like:
you create a group ( administrator of shoutbox )
then you put on it ( additional group ) thos who you want to moderate the shout box.
now, no need to update the code each time you want to add or remove someone from the admin of shout box.
just add him or remove them from the group.
Cheers
I'm almost done finalizing and testing 1.12. With any luck, it'll be out by Monday.
Can someone please give me example of puting second code in index.template.php file O:)
I want shoutbox to be on top.
On top where?
I wish there was a way to not allow guests to post.
Set $allowGuestsPost to false in yshout/yshout.php
When you say this -
QuoteFixing some kinds of "loading shoutbox..." errors: Some errors are caused by having the wrong domain; if you log on and go into a board, and the problem disappears, then the fix is to change
Code:
var board_url = "', $boardurl, '";
to
Code:
var board_url = "/path/to/forum";
where /path/to/forum is the *absolute* URL to your forum. For example, if your forum is at http://domain.com/myforum, use "/myforum" (NOT /home/domain/myforum!)
Fix for page duplication: If the entire page seems to be copied where the shoutbox is, the most likely culprit is Search-Engine Friendly URLs. You can either turn these off, or follow the steps outlined in the above fix (for loading shoutbox... issues)
Which file do I find (var board_url = "', $boardurl, '";) in? because at the moment im having the page duplication error which is fixed with turning off Search-Engine Friendly URLs, but I would rather have this turned on.
Whoops, it's in index.template.php. I should've noted this.
Quote from: nneonneo on February 04, 2008, 02:10:41 PM
Whoops, it's in index.template.php. I should've noted this.
:) now you do
When I open index.template.php and i search for that line i get
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
Is this the correct area I change?
also my forum is in the root as in its on www.fantasysquare.org so do i just put /home/fantasysquare.org ?
No, it has to be the URL or something. I recommend trying "/".
Ok and as i asked before do i change all of var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
and if not which bits do i change?
I only ask this because it shows differently to your instructions.
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
==>
var board_url = "<url>";
Quote from: nneonneo on February 04, 2008, 03:32:03 PM
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
==>
var board_url = "<url>";
Changed it and now its not loading at all just hangs with the msg ...loading shoutbox... :(
4. Search after in index.template.php or boardindex.template.php depend on where u put shout box.
Code:
<div style="padding: 1ex 25px 1ex 25px;"id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /></div>
add
code:
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
Hallo to all, I have a little problem to insert smiley on yshout, becouse i don't know where is the code that i quoted, and if is possible can you give me the file smiley.php, thank's for all to all, bye bye.
this is my 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'] = true;
/* 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.
if (!defined('_VALID_MOS')){
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['description']) ? ' - '. $context['description'] : '') , '" />', 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" />';
// 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?Jul222007" 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: #FF9900;
}
#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
// 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" : "";
// YSHOUT HERE
document.getElementById("yshout").style.display = mode ? "none" : "";
if(!mode)
{
loadChat();
}
// YSHOUT END
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>
<head>
<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script>
</head>
<body>';
}
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">';
if (empty($settings['header_logo_url']))
echo '
</td>
<td align="center" class="catbg">
<img src="', $settings['images_url'], '/smflogo.gif" style="margin: 1px;" alt="" />
</td>
</tr>
</table>';
// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>';
// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' , $context['current_time'], '</span>';
// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';
if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';
echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];
// 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'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $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'];
// 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 />';
}
// YSHOUT HERE
echo '
<br /><b>Shout Box</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
echo ' </span>';
}
// 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'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';
echo '
<table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
</td>';
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<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>
</table>
</div>';
// Show the menu here, according to the menu sub template.
template_menu();
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}
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="', !$context['right_to_left'] ? 'right' : 'left', '">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="', $settings['images_url'], '/powered-mysql.gif" alt="', $txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="', $settings['images_url'], '/powered-php.gif" alt="', $txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
', theme_copyright(), '
</td>
<td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'left' : 'right', '">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="', $settings['images_url'], '/valid-xhtml10.gif" alt="', $txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="', $settings['images_url'], '/valid-css.gif" alt="', $txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></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>';
// 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>
';
if (!defined('_VALID_MOS')){
echo'
</body></html>';
}
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';
// 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['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 ' > ';
}
echo '</div>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin','managegames', 'arcadesettings', 'arcadecategory', '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('gallery','arcade','tagged','search', 'downloads', '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'] == 'googlemap')
$current_action = 'googlemap';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
// Begin SMFShop code
if ($context['current_action'] == 'shop')
$current_action = 'shop';
if (in_array($context['current_action'], array('shop_general', 'shop_items_add', 'shop_items_edit', 'shop_cat', 'shop_inventory', 'shop_restock', 'shop_usergroup')))
$current_action = 'admin';
// End SMFShop code
// 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 cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' , $first , '"> </td>';
// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="http://www.risorsedirete.com/index.php">' , HOME , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Show the [forum] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
echo ($current_action == 'arcade' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'arcade' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=arcade">' , $txt['arcade'] , '</a>
</td>' , $current_action == 'arcade' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
</td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// How about the [download] button?
if ($context['allow_search'])
echo ($current_action == 'downloads' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'downloads' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=downloads">Download' , '</a>
</td>' , $current_action == 'downloads' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'admin' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>
</td>' , $current_action == 'admin' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
</td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Google Maps Mod
if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view')))
echo ($current_action == 'googlemap' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'googlemap' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=googlemap">' , $txt['googleMap'] , '</a>
</td>' , $current_action == 'googlemap' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
//Begin SMFShop code
//loadLanguage("shop");
echo ($current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'shop' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=shop">Shop</a>
</td>' , $current_action == 'shop' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
//END SMFShop code
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// the [SMF Gallery] button
if ($context['allow_smfgallery_view'])
echo ($current_action == 'gallery' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'gallery' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=gallery">' , $txt['smfgallery_menu'] , '</a>
</td>' , $current_action == 'gallery' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// The [GoogleTagged] Button
echo ($current_action == 'tagged' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'tagged' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=tagged">' , $txt['googletagged'] , '</a>
</td>' , $current_action == 'tagged' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// the [Downloads System] button
if ($context['allow_downloads_view'])
echo ($current_action == 'downloads' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'downloads' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=downloads">' , $txt['downloads_menu'] , '</a>
</td>' , $current_action == 'downloads' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'login' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
</td>' , $current_action == 'login' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'logout' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
</td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// The end of tab section.
echo '
<td class="maintab_' , $last , '"> </td>
</tr>
</table>';
}
?>
goto http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091 and scroll down under his msg the attachment smiley.php is there.
thank you so much for smiley.php, but can you help me about finder the file in index.template.php, becouse for me there isn't thanks more
@l.uca: Just look for
$txt['yshout_loading']
and add the prescribed code after the </div> which follows this snippet.
@Tricks: I think I have been dispensing bad advice. I believe that I have finally tracked down this bug, thanks to your tip. Set board_url to "". Then, in yshout/js/yshout.js, change
var yshout_php=(board_url?board_url+'/':'')+'yshout/yshout.php';
to
var yshout_php=(board_url?board_url:'')+'/yshout/yshout.php';
and that should fix it. This will definitely be added to 1.12, but at the downside of me taking a little while longer to post it.
I have this error :
Template Parse Error!
There was a problem loading the /Themes/default/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.
Parse error: syntax error, unexpected '<' in .../Themes/default/index.template.php on line 365
356: }
357: // YSHOUT HERE
358: echo '
359: 360: <br /><b>Shout Box</b><br /><br />
361: 362:
363: 364: <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>';
365: <div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
366: require('mymod/smiley.php');
367: loadSmileys();
368: echo '
369: <div id="smiley_pic">';
So, i find the code:
<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>';
and after i past this:
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
I don't know??????????? Where is the error?
Find
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
(line 364)
and remove the '; at the very end.
Thank you very much nneonneo, now i see the smaileys in my shout, but when i click it dont read, sure i insert the code to yshout.php in error position this is my code now can you check it please thank again ;D ;D
my yshout.php:
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
What you posted isn't yshout/yshout.php.
I'm sorry :-[ :-[ :-[ :-[
is this :
<?php
// Version 1.11
// Editable Options (see yshout/js/yshout.js for more options)
// Set the maximum amount of lines to be displayed at a time
$max_lines = 12;
// Sets the directory to which to log
$logDir = "chats";
// Should we use GZip compression? If you are having trouble with the shoutbox, set this to false.
$gzipCompression=true;
// Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;
// Guest usage for posting. Set to false if you don't want to let guests post to the shoutbox; if allowGuests is on, they will still see it.
$allowGuestsPost=true;
// Automatic Guest Usernames: should they be able to choose their own usernames?
// Set to some string (a prefix) if you want to disable guest choice of username
// Set to false if you want to allow guests to choose a username
$autoGuestName=false;//'guest-';
// Command options.
// If this is set to false, all typed commands are disabled.
// Admin functions, via admin links, are still available.
$allowCommands=true;
// If this is set to false, guests will be denied access to commands.
$guestCommands=true;
// How long should the script wait for the chats to update? (in seconds)
// If this is set to 0 the script will not wait at all,
// but this will be very detrimental to performance.
// Make sure this is less than the maximum script execution time
// on your server, or the shoutbox will never update.
$updateTimeout=20;
// User-defined array of commands to block.
// Example: $bannedCommands=Array('/impersonate');
// Note that since SMF recognizes /me by default, it can't be blocked.
$bannedCommands=Array();
// How many characters will be permitted in each shout.
$maxShoutChars=125;
// How many characters will be permitted in the username.
// This does not apply to SMF registered usernames.
$maxUsernameChars=25;
/* Documentation
Functions
Command Implementation:
doMsg(string $msg)
Causes the shoutbox to be replaced with $msg until they
use /return (useful for making error messages, etc.)
processCommand(string $text)
Process an admin command. If this function fails to find
a match, it defaults to the user commands.
processUserCommand(string $text)
Process a user command. This function attempts to match
against all known commands. If a valid command match
isn't found, the function will return false and the
shout ("command") will be displayed as a regular shout.
makeShout(string $text)
Produce a shout as if it was from the current user, but
having only a datestamp (and no profile link, etc)
help(string $command - default '')
Allows users to get help on a command. Use <arg> to
denote required arguments and [arg] to denote optional
ones. Note that all <> must be entered as < and >
or they will not work.
Make sure to add an entry in this function for any new
commands.
Shouting:
checkDir(string $logDir)
Check the target directory to make sure it exists.
checkName(string $chatFile)
Check the filename for invalidities.
readChat(string $chatFile,string $logDir)
Dump the contents of the chat file to the client. If the
client is viewing a special message or command, then
readChat simply executes that command or prints the
message back on screen (this command/message is stored
in $_SESSION['readingCmd'])
truncateChat(string $chatFile,string $logDir,integer $max_lines)
Move the first line of a file from the chat file to the
history as long as the chat file exceeds the set
maximum.
writeLine(string $chatFile, string $logDir, string $newText, array $user)
Write a shout to the chat file. $user is an SMF user
session array which determines the username and rank of
the poster.
writeBanList()
Write the current ban list to _banlist.php which is
require'd by this script at the beginning. This allows
for "dynamic" ban lists.
history()
Show the history file in a neat, formatted HTML style.
preg_timeformat(array $matches)
Function used to replace matched <timeval=[UNIX time offset]> with formatted times
as per SMF's timeformat function. Called through preg_replace_callback.
Important Globals
$_SESSION
readingCmd
The command (if it starts with /) or the message to be
read back to the user instead of the normal shoutbox
stuff.
$_GET
n
Used by the history() function to determine the # of
history lines to output.
help
If this is set, the shoutbox will output a full HTML
help message (using help()). Use as a standalone page.
history
If this is set, the shoutbox will output a full HTML
history page (with history()). Use as a standalone page.
banid
For the administrator's ban link: this is passed as the user
ID of the member to be banned.
delete
For deleting shouts; this is a string in the form
datecode | ip (this is the format used in the <em title>
unban
Username/identifier to unban (used by /banlist)
file
File to read for history and delete functions (will be checked)
$_POST
file
Chat file to use. Will be checked for bad characters.
reqtype
What function to carry out (shout, refresh, init)
shout
If reqtype is shout, then this is the shout to be made.
$_SERVER
REMOTE_ADDR
Used for $ip to determine their IP address.
Global Variables
$ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post
Ban variables. _ips or _names is the ban criteria (IP
address or username) while _readpost or _post is the ban
severity (banned from reading+posting or just posting)
$chatFile,$logDir
These determine the location of the chat file.
$chatFile comes from $_POST['file'] while $logDir is hardcoded.
$user
SMF user data array, gleaned from ssi_welcome as a hack.
This determines a lot of things about the user (like the username and status)
$max_lines
Maximum number of lines to have in the shoutbox. Used by truncateChat.
$ip
User's IP address. Gathered from $_SERVER['REMOTE_ADDR'].
$reqType
Request type; see $_POST['reqtype'].
Super-Duper Command Implementation
To add a command, first decide whether this command is *user* or
*admin/mod* level.
The general format of a command is "/command <reqargs>
[optargs]".
Commands are processed in processCommand or processUserCommand.
The former is for admin/mod commands, and the latter is for users.
Processing begins by parsing the args and then running through a
long switch/case block. In this block, you will add your command code.
Your code should begin with a "case '/commandname':" and end with a
return true; statement.
The two things you will have access to locally are $args and
$cmd. $args is a string containing all the arguments passed, and $cmd is
the exact command used. For example, with the command "/foo bar baz",
$cmd will be "/foo" and $args will be "bar baz". This will be handled by
the "case '/foo':" statement.
Globally, any of the superglobals are available, plus any
globals. All globals are declared already so there is no need to declare
them on your own.
To make a message appear on the client's shoutbox, set the
variable $_SESSION['readingCmd'] to $text (which is the main argument
for the processing function). This causes the exact text of the command
to be reparsed every time the user requests the shoutbox data, and your
information will be returned instead of the regular shouts.
Alternately, the doMsg function allows you to automatically set
a message that will stay up until they use /return.
Remember that whenever your function needs to exit, it must do
so with "return true;" so that the calling function will know not to
"shout" the command.
*/
session_start();
require(dirname(__FILE__) . "/../SSI.php");
require_once($sourcedir . '/Subs-Post.php');
require("_banlist.php");
if (!isset($maintenance)) $maintenance=false;
$defaultEncoding=(empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']);
header('Content-type: text/html; charset='.$defaultEncoding);
$ip = $_SERVER['REMOTE_ADDR'];
$max_lines+=1;
$user=ssi_welcome('nothing'); // ssi_welcome only does something IF the parameter is 'echo'; otherwise the user data is returned!
loadUserSettings();
loadTheme();
ssi_logOnline('nothing'); // don't want echo, so just use a nonexistant output method
function preg_timeformat($matches)
{
// format: <timeval=(value)>
return timeformat(intval($matches[1]));
}
if (in_array($ip, $ban_ips_readpost) || in_array($user['username'], $ban_names_readpost) || in_array($user['name'], $ban_names_readpost))
die($txt['yshout_banned']); // exit;
if (!$user['is_logged'])
{
if(!$allowGuests)
die($txt['yshout_no_guests']);
if($autoGuestName!==false)
$user['username']=$user['name']=$autoGuestName.substr(md5($ip),0,4);
elseif(isset($_POST['username']))
$_COOKIE['username']=$user['username']=$user['name']=$_POST['username'];
elseif(isset($_COOKIE['username']))
$user['username']=$user['name']=$_COOKIE['username'];
}
// Do not edit below this line unless you know what you are doing
if(isset($_GET["history"]))
{
history();
exit;
}
if(isset($_GET["help"]))
{
help();
exit;
}
if(isset($_GET['banid']))
{
if (!isset($_GET['mode']))
{
global $boardurl;
doMsg(<<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<base href="$boardurl/">
<head>
<meta http-equiv="content-type" content="text/html; charset=$defaultEncoding" />
<title>{$txt['yshout_ban_conf']}</title>
</head>
<body>
<h1>{$txt['yshout_select_mode']}</h1>
<a href="javascript:ajaxGet('banid={$_GET['banid']}&mode=rp');">{$txt['yshout_rp']}</a>
<br />
<a href="javascript:ajaxGet('banid={$_GET['banid']}&mode=p');">{$txt['yshout_p']}</a>
</body>
</html>
EOF
);
exit;
}
if ($user['is_admin'] || $user['is_mod'])
{
if(!is_numeric($_GET['banid']))
{
// guest banning?
// ban by IP, since that's what will be listed for banning...
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_ips_',$_GET['mode'],$_GET['banid']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
exit;
}
if(loadMemberData(Array($_GET['banid']),false,'minimal')===false)
{
doMsg($txt['yshout_error'].$txt['yshout_no_user']);
exit;
}
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_names_',$_GET['mode'],$user_profile[$_GET['banid']]['memberName']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(isset($_GET['delete']))
{
if ($user['is_admin'] || $user['is_mod'])
{
global $logDir,$chatFile;
$chatFile=isset($_GET['file'])?$_GET['file']:"home.txt";
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$fileContents = '';
if (file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$fileContents=preg_replace('/<p[^>]*><em title="'.str_replace('|','\|',$_GET['delete']).'">.+\n/','',$fileContents);
$handle = fopen($chatPath, "w");
fputs($handle, $fileContents);
fclose($handle);
echo $txt['yshout_del_success'];
}
exit;
}
if(isset($_GET['unban']))
{
if ($user['is_admin'] || $user['is_mod'])
{
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_'.$_GET["type"].'s_','u',$_GET['unban']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(!isset($_POST["file"]) || !isset($_POST["reqtype"]))
die($txt['yshout_no_action']);
$chatFile = checkName($_POST["file"]);
$reqType = $_POST["reqtype"];
switch($reqType) {
case "init":
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">',$txt['yshout_history'],'</a> <a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
if($user['is_admin'] || $user['is_mod'])
{
echo ' <a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'file=',checkName($chatFile),'&history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>';
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' <a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>';
else
echo ' <a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>';
echo ' <a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>';
}
echo '<div id="shouts">';
echo readChat($chatFile, $logDir);
echo '</div>';
if (in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post))
echo '
<form id="shout-form" name="shout_form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$txt['yshout_p_banned'],'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_banned'],'" disabled="true" />
</fieldset>
</form>';
elseif (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false)
echo '
<form id="shout-form" name="shout_form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$maintenance,'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
elseif (!$user['is_logged'] && !$allowGuestsPost)
echo '
<form id="shout-form""shout_form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$txt['yshout_no_guests'],'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="125" value="" type="text" name="shout_text" />
</fieldset>
</form>';
else
{
echo '<form id="shout-form" name="shout_form" action="#">
<fieldset>';
if (!$user['is_logged'] && $autoGuestName===false)
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" name="shout_text" />';
else
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />';
echo '
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="" type="text" />
<input id="shout-button" type="button" value="',$txt['yshout_shout_button'],'" />
</fieldset>
</form>';
}
if($gzipCompression) ob_end_flush();
break;
case "shout":
if (in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post)) break;
if (!$user['is_logged'] && !$allowGuestsPost) break;
if (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false) break;
$shoutText = $_POST["shout"];
if($shoutText[0]=='/' && $allowCommands)
{
if($user['is_admin'] || $user['is_mod'])
{
if(processCommand($shoutText)) break;
}
elseif($user['is_logged'] || $guestCommands)
{
$shoutText=substr($shoutText,0,$maxShoutChars);
if(processUserCommand($shoutText)) break;
}
}
$shoutName = $user['name']; //$_POST["name"];
writeLine($chatFile, $logDir, $shoutText, $user);
truncateChat($chatFile, $logDir, $max_lines);
refreshChats(true);
break;
case "refresh":
refreshChats(false);
break;
case "autoshout":
if($user['is_admin'] || $user['is_mod'])
processCommand($_POST["shout"]);
break;
}
function doMsg($msg)
{
echo $msg; // tell user
$_SESSION['readingCmd']=$msg; // make sure user keeps seeing this message; see readChat
}
function processCommand($text) {
global $reqType, $chatFile, $logDir, $max_lines, $ip, $user, $bannedCommands, $txt, $maintenance;
global $ban_ips_readpost, $ban_ips_post, $ban_names_readpost, $ban_names_post;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces, duh!
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
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.
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat($chatFile, $logDir);
return true;
case "/lock":
if ($args=='')
{
doMsg($txt['yshout_error'].$txt['yshout_lock_arg_error']);
return true;
}
if($maintenance !== false)
doMsg(sprintf($txt['yshout_lock_changed'],$args));
else
doMsg(sprintf($txt['yshout_lock_success'], $args));
$maintenance = $args;
writeBanList();
return true;
case "/unlock":
if($maintenance === false)
{
doMsg($txt['yshout_error'].$txt['yshout_unlock_already']);
return true;
}
$maintenance = false;
writeBanList();
doMsg($txt['yshout_unlock_success']);
return true;
case "/banlist": // who's banned?
$_SESSION['readingCmd']=$text;
$temp=Array();
echo '<table>
<caption>',$txt['yshout_banlist_caption'],'</caption>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_ips_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_ips_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_names_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_names_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '</table>';
return true;
case "/ban": // need to be more specific!
doMsg($txt['yshout_error'].$txt['yshout_ban_type_error']);
return true;
case "/banuser": // go away, we don't like you!
case "/banip":
$type=($cmd=='/banip')?'ban_ips_':'ban_names_'; // prefixes for vars
$ar=explode(' ',$args,2); // true argument array. the "2" ensures that we cut only once: mode can't have spaces but user can.
if(count($ar)!=2) // whoops: only one argument?
{
doMsg($txt['yshout_error'].$txt['yshout_ban_mode_error']);
return true;
}
$mode=$ar[0]; // set up vars
$id=$ar[1];
doBan($type,$mode,$id);
return true;
case "/impersonate": // lets pwn some n00bs!
// <user> [userlevel] [ip] [userid] /[shout text]
$slashpos=strpos($args,' /'); // use ' /' as a separator, so we can see how many args came before
if($slashpos===false) // no shout? invalid formatting?
{
doMsg($txt['yshout_error'].$txt['yshout_imp_slash_error']);
return true;
}
$shout=substr($args,$slashpos+2);
$ar=explode(' ',substr($args,0,$slashpos));
$name='';
$userlevel=0;
$userid=0;
switch(count($ar)) // how many args did we get?
{
case 0: // no args--what are you doing?
doMsg($txt['yshout_error'].$txt['yshout_imp_uname_error']);
return true;
case 4: // reverse order to save space: we just set them from the back!
$userid=intval($ar[3]);
case 3:
$ip=$ar[2]; // corrupt the global >:D
case 2:
$userlevel=intval($ar[1]);
case 1:
$name=html_entity_decode($ar[0]);
break;
default:
doMsg($txt['yshout_error'].$txt['yshout_imp_max4_error']); // just so they know that we only have 4 params
return true;
}
$ip.='.'; // to set off the impersonated msgs
$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
writeLine($chatFile,$logDir,$shout,$fakeuser); // do it, write the line
truncateChat($chatFile, $logDir, $max_lines); // make sure to scroll it, or bad things will happen
echo readChat($chatFile, $logDir); // update admin's display
return true;
default: // it wasn't a command, n00b!
return processUserCommand($text);
}
return false;
}
function processUserCommand($text) {
global $reqType, $chatFile, $logDir,$max_lines, $ip,$ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$user,$bannedCommands,$func;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces, duh!
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
case "/help":
if(empty($args)) help();
elseif($args[0]!='/') help('/'.$args);
else help($args);
$_SESSION['readingCmd']=$text;
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat($chatFile, $logDir);
return true;
case "/pi":
$s_pi='141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609';
$n=5;
if($args!='') $n=intval($args);
$res=($n==0)?"PI IS EXACTLY 3!":'3.'.substr($s_pi,0,$n-1).(substr($s_pi,$n-1,1)+(substr($s_pi,$n,1)>=5?1:0));
// all that nasty little bit does is add the first n-2 chars, then add the last digit and increment if rounding is necessary.
makeShout($res);
return true;
case "/me":
checkDir($logDir);
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$newText = $args.' ';
$newText = $func['htmlspecialchars'](stripslashes($newText), ENT_QUOTES);
$newText = str_replace(array("[list]","[center]","[left]","[right]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
preparsecode($newText); // gah, sanitize input!!
$newText = parse_bbc($newText); // w00t!
censorText($newText);
$shoutName=$user['name'];
$userID=$user['id'];
$writeText = "<p><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span><font color=\"red\"> * $shoutName</em> $newText</p></font>\n";
$handle = fopen($chatPath, "a");
if($handle===false) die("File error (processing /me); aborted");
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two ppl write to it at once
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (processing /me); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
truncateChat($chatFile, $logDir, $max_lines);
refreshChats(true);
return true;
default:
return false;
}
return false;
}
function doBan($type,$mode,$id)
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$txt;
switch($mode)
{
case 'u': // nice guy
$r=$type.'readpost'; // need to search both ban arrays. Search this one first...
$index=array_search($id,$$r); // where is my little banned user?
if($index===false)
{
$r=$type.'post'; // ...and this one second on failure.
$index=array_search($id,$$r);
if($index===false) // whoops, both searches failed!
{
doMsg($txt['yshout_error'].'Couldn\'t find user to unban!');
return false;
}
}
array_splice($$r,$index,1); // cut the 1 element loose with splice. $$r is used because $r is the string variable denoting the target array.
doMsg("Success: unbanned $id.");
break;
case 'rp':
array_push(${$type.'readpost'},$id); // easy, huh!
doMsg("Success: banned $id from reading and posting.");
break;
case 'p':
array_push(${$type.'post'},$id);
doMsg("Success: banned $id from posting.");
break;
default:
doMsg($txt['yshout_error']."Invalid mode $mode! Use only 'u', 'rp' or 'p'!");
return false;
}
writeBanList(); // write the final report
return true;
}
function makeShout($text) {
global $chatFile,$logDir,$user,$max_lines;
writeLine($chatFile, $logDir, $text, $user);
truncateChat($chatFile, $logDir, $max_lines);
refreshChats(true);
}
function refreshChats($force=false) {
global $chatFile,$logDir,$user,$max_lines,$gzipCompression,$updateTimeout;
$time=file_exists("$logDir/$chatFile")?filemtime("$logDir/$chatFile"):0;
$start_time=time();
session_write_close(); // so that future session requests succeed
while(!$force && (time() - $start_time < $updateTimeout) && $time && ($time==filemtime("$logDir/$chatFile")))
{
sleep(1);
clearstatcache();
}
if($gzipCompression) ob_start("ob_gzhandler");
echo readChat($chatFile, $logDir);
if($gzipCompression) ob_end_flush();
}
function checkDir($logDir) {
if (!is_dir($logDir))
mkdir($logDir);
}
function checkName($chatFile) {
$ret = $chatFile;
$ret = str_replace('/', '', $chatFile);
return $ret;
}
function readChat($chatFile, $logDir) {
global $user;
if(isset($_SESSION['readingCmd']))
{
$c=$_SESSION['readingCmd'];
if($c[0]!='/') echo $c; // doMsg was used. Don't use doMsg with a slash unless you know what you're doing ;)
else
{
if($user['is_admin'] || $user['is_mod']) processCommand($_SESSION['readingCmd']); // execute the same command so the user gets to keep reading the message w/o interruption.
else processUserCommand($_SESSION['readingCmd']);
}
return ' ';
}
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$chatText = "";
if (file_exists($chatPath))
$chatText = file_get_contents($chatPath);
if ($user['is_admin'] || $user['is_mod'])
{
if (!isset($_COOKIE['yShout_hideadmlinks']))
{
$chatText = preg_replace('/<em title="(\\d+) \| ([^"]+)"><span class="shout-timestamp">\[<timeval=(\d+)>\]<\/span> ([^<])/','<em title="\\1 | \\2"><span class="shout-timestamp">[<timeval=\\3>]</span> <a href="javascript:ajaxGet(\'banid=\\2\')"><span class="adminlink">ban</span></a> \\4',$chatText);
$chatText = preg_replace('/<em title="(\\d+ \| [^"]+)"><span class="shout-timestamp">\[<timeval=(\d+)>\]<\/span>/','<em title="\\1"><span class="shout-timestamp">[<timeval=\\2>]</span> <a href="javascript:ajaxGet(\'file='.$chatFile.'&delete=\\1\')"><span class="adminlink">del</span></a> ',$chatText);
$chatText = preg_replace('/<a href="index\.php\\?action=profile;u=(\\d+)">/','<a href="javascript:ajaxGet(\'banid=\\1\')"><span class="adminlink">ban</span></a> <a href="index.php?action=profile;u=\\1">',$chatText);
}
}
else
{
$chatText = preg_replace('/<em title="(\d+) \| [0-9.]+"><span class="shout-timestamp">/','<em title="\\1 | logged"><span class="shout-timestamp">',$chatText);
}
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
return $chatText.' '; // hack: totally empty responses can break some browsers
}
// truncateChat function based on one written by Travis Roman (http://mapleglobal.mine.nu/)
function truncateChat($chatFile, $logDir, $max_lines) {
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$fileContents = '';
if (file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$lines = explode("\n", $fileContents);
if(count($lines) > $max_lines) {
$newText = substr($fileContents, strpos($fileContents, "\n") + 1);
$handle = fopen($chatPath, "w");
fputs($handle, $newText);
fclose($handle);
// History
$oldText = substr($fileContents, 0, strpos($fileContents, "\n") + 1);
$handle = fopen("$logDir/history.$chatFile", "a");
fputs($handle, $oldText);
fclose($handle);
}
}
function writeLine($chatFile, $logDir, $newText, $user) {
global $ip,$func;
checkDir($logDir);
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
// $ip = $_SERVER['REMOTE_ADDR']; // impersonate >:D
$newText .= " ";
$newText = $func['htmlspecialchars'](stripslashes($newText), ENT_QUOTES);
$newText = str_replace(array("[list]","[center]","[left]","[right]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
preparsecode($newText); // gah, sanitize input!!
$newText = parse_bbc($newText); // w00t!
censorText($newText);
// $newText = preg_replace("(http:\/\/(.+?) )is", "<a href=\"http://$1\" target=\"_blank\">http://$1</a> ", $newText);
$p_class = "";
if($user['is_admin']) $p_class = ' class="owner"';
if($user['is_mod']) $p_class = ' class="moderator"';
if(!$user['is_logged']) $p_class = ' class="guest"';
$shoutName=$user['name'];
$userID=$user['id'];
$writeText="<p$p_class><em title=\"".time()." | $ip\"><span class=\"shout-timestamp\">[<timeval=".time().">]</span> ";
if($user['is_logged'])
$writeText.="<a href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
else
$writeText.="$shoutName";
$writeText.=":</em> $newText</p>\n";
$handle = fopen($chatPath, "a");
$failcount=0;
if($handle===false) die('File error (writeLine); aborted');
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
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
function help($command='')
{
global $user,$defaultEncoding,$txt;
$cmdlist=$txt['yshout_cmdlist'];
$cmdlistadmin=$txt['yshout_cmdlistadmin'];
if($user['is_admin'] || $user['is_mod'])
$cmdlist=array_merge($cmdlist,$cmdlistadmin);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<base href="/advforums/">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_cmd_reference']; ?></title>
</head>
<body>
<?php
if($command=='')
{
echo '<h1>',$txt['yshout_shoutbox'],' ',$txt['yshout_commands'],'</h1>';
foreach($cmdlist as $cmd=>$desc)
{
echo "$cmd$desc<br />\n";
}
}
else
{
if(isset($cmdlist[$command])) echo "$command{$cmdlist[$command]}<br />\n";
else echo "$command not found";
}
?>
</body>
</html>
<?php
}
function writeBanList() // generate our dynamic ban list, which is 'require'd at the start of this script
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$maintenance;
$writeText = "<?php\n"; // php header
$writeText .= '$ban_ips_readpost = '.var_export($ban_ips_readpost,true).";\n"; // bans
$writeText .= '$ban_ips_post = '.var_export($ban_ips_post,true).";\n";
$writeText .= '$ban_names_readpost = '.var_export($ban_names_readpost,true).";\n";
$writeText .= '$ban_names_post = '.var_export($ban_names_post,true).";\n";
$writeText .= '$maintenance = '.var_export($maintenance,true).";\n";
$writeText .= '?>'; // end tag
$handle = fopen("_banlist.php", "w");
if($handle===false) die('File error (writeBanList); aborted');
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two ppl write to it at once
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeBanList); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
function history()
{
global $logDir,$boardurl,$gzipCompression,$defaultEncoding,$txt;
checkDir($logDir);
$chatPath = "$logDir/$chatFile";
$n=250;
if(isset($_GET['n'])) $n=intval($_GET['n']); // integers only!
if($gzipCompression) ob_start("ob_gzhandler");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<base href="<?php echo $boardurl,'/'; ?>">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></title>
<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;
}
a:link {
color: #476C8E;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>
</head>
<body>
<h1><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></h1>
<div id="yshout">
<div id="shouts">
<?php
global $user;
require_once("class.tail.php");
$mytail = new tail("$logDir/history.$chatFile");
$mytail->setGrep(".*");
$mytail->setNumberOfLines($n);
$text=$mytail->output(PLAIN).file_get_contents("$logDir/$chatFile");
if(!($user['is_admin'] || $user['is_mod']))
$text = preg_replace('/<em title="(\d+) \| [0-9.]+"><span class="shout-timestamp">/','<em title="\\1 | logged"><span class="shout-timestamp">',$text);
echo preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$text);
?>
</div>
</div>
</body>
</html>
<?php
if($gzipCompression) ob_end_flush();
exit;
}
?>
You've made some wrong edits to the section described.
Change
switch($reqType) {
case "init":
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">',$txt['yshout_history'],'</a> <a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
if($user['is_admin'] || $user['is_mod'])
{
echo ' <a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'file=',checkName($chatFile),'&history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>';
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' <a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>';
else
echo ' <a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>';
echo ' <a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>';
}
echo '<div id="shouts">';
echo readChat($chatFile, $logDir);
echo '</div>';
if (in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post))
echo '
<form id="shout-form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$txt['yshout_p_banned'],'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_banned'],'" disabled="true" />
</fieldset>
</form>';
elseif (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false)
echo '
<form id="shout-form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$maintenance,'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
elseif (!$user['is_logged'] && !$allowGuestsPost)
echo '
<form id="shout-form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$txt['yshout_no_guests'],'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
else
{
echo '<form id="shout-form" action="#">
<fieldset>';
if (!$user['is_logged'] && $autoGuestName===false)
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" />';
else
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />';
echo '
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="" type="text" />
<input id="shout-button" type="button" value="',$txt['yshout_shout_button'],'" />
</fieldset>
</form>';
}
if($gzipCompression) ob_end_flush();
break;
to
switch($reqType) {
case "init":
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">',$txt['yshout_history'],'</a> <a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
if($user['is_admin'] || $user['is_mod'])
{
echo ' <a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'file=',checkName($chatFile),'&history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>';
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' <a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>';
else
echo ' <a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>';
echo ' <a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>';
}
echo '<div id="shouts">';
echo readChat($chatFile, $logDir);
echo '</div>';
if (in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post))
echo '
<form id="shout-form" name="shout_form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" name="shout_text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$txt['yshout_p_banned'],'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_banned'],'" disabled="true" />
</fieldset>
</form>';
elseif (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false)
echo '
<form id="shout-form" name="shout_form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" name="shout_text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$maintenance,'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
elseif (!$user['is_logged'] && !$allowGuestsPost)
echo '
<form id="shout-form" name="shout_form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" name="shout_text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$txt['yshout_no_guests'],'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
else
{
echo '<form id="shout-form" name="shout_form" action="#">
<fieldset>';
if (!$user['is_logged'] && $autoGuestName===false)
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" />';
else
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />';
echo '
<input id="shout-text" name="shout_text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="" type="text" />
<input id="shout-button" type="button" value="',$txt['yshout_shout_button'],'" />
</fieldset>
</form>';
}
if($gzipCompression) ob_end_flush();
break;
Also (unrelated), it looks like there could be a bug in the code.
$writeText .= ?>'; // end tag
should be
$writeText .= '?>'; // end tag
OK THANK YOU it work wery well, so for the history there is a problem because if a guest digit www.site.com/forum/yshout/yshout.php?file=home.txt&history not only read the shout but can see all user ip, can you see for this (bug), thank you again for averythink ;D ;D
As of 1.10 (and a few earlier versions) guests can no longer see IP addresses: all they get is
"1201288599 | logged" where 1201288599 is the time posted (reflected in the time stamp) and "logged" is where the IP address *would* go if the user had permission to see it (admins, mods)
Anyway to Block certain Member groups from even seeing the shoutbox?
Find
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
After the // YSHOUT HERE line, add
$loadit = true;
if(loadMemberData(Array($context['user']['id']),false,'profile')!==false)
{
global $user_profile;
$membergroups=explode(',', $user_profile[$context['user']['id']]['additionalGroups']);
$membergroups[]=$user_profile[$context['user']['id']]['ID_GROUP'];
$membergroups[]=$user_profile[$context['user']['id']]['ID_POSTGROUP'];
if (count(array_intersect(array(3,4), $membergroups)) > 0)
$loadit=false;
}
else $loadit=false;
if($loadit)
where 3,4 are the membergroups not allowed to see it.
Hello!
I have used the 1.06 version of the shoutbox for some time and was just recently informed by my hosting company that its causing undue server load.
When I went to uninstall using the "Package Parser" to see what edits needed to be perfomed, I was given the following error : "ERROR: The package-info.xml file is invalid!".
What do I need to do to uninstall v. 1.06 to upgrade to current?
Thanks for the halp!
There are only two things that need to be done.
1) In Themes/default/index.template.php, find // YSHOUT HERE. There are three of them, followed by matching // YSHOUT END comments. Remove the code between each pair -- the first is a block of JS includes and CSS, the second is Javascript and the third is a div (echo '<div id="yshout"...)
2) Delete the yshout folder, or, if you wish to save the chats, back up the yshout/chats folder and put it back after upgrading.
EDIT: To be safe, the third step is to remove the stuff in Themes/default/languages/Modifications.english.php between "// ---- Begin modification - nneonneo's Shoutbox ----" and "// ---- End modification - nneonneo's Shoutbox ----"
Quote from: nneonneo on February 05, 2008, 08:09:23 PM
There are only two things that need to be done.
Thanks Boss!
Quote from: nneonneo on February 05, 2008, 05:27:01 PM
Find
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
After the // YSHOUT HERE line, add
$loadit = true;
if(loadMemberData(Array($context['user']['id']),false,'profile')!==false)
{
global $user_profile;
$membergroups=explode(',', $user_profile[$context['user']['id']]['additionalGroups']);
$membergroups[]=$user_profile[$context['user']['id']]['ID_GROUP'];
$membergroups[]=$user_profile[$context['user']['id']]['ID_POSTGROUP'];
if (count(array_intersect(array(3,4), $membergroups)) > 0)
$loadit=false;
}
else $loadit=false;
if($loadit)
where 3,4 are the membergroups not allowed to see it.
Ok i put the line of code, but now admins can't see it. Maybe i put wrong membergroup numbers in? How can i find out membergroup numbers.
thanks for your time nneonneo
It works for me. The member group numbers are the ones shown in the URL when you edit them:
index.php?action=membergroups;sa=members;group=6
In that URL, 6 is the group ID you need to put there.
Hello and congratulations for the very nice mod
I have a question. My forum is very slow when the user uses Internet Explorer (v7 for sure, I don't know about previous versions). I think that the reason is the shoutbox. When I take it off the page loading time is much shorter. With Firefox there is no problem at all.
Is that an issue that you have come across before? What should I check?
Thank you in advance
This is an issue I have run across before.
I promised to release an update for it a few weeks back, but I have been so busy, I have not been able to fully test this version as of yet.
I have attached the mod below. I do not have the resources at this time to fully verify everything, but I have tested it to the extent that I can this week.
Changes:
* 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.
If you simply download this and apply the update, the changes should take effect immediately, though you may need to refresh the page to get the new JavaScript code.
SB_1.12.tgz installed sucessfully (first time instalation)
"...loading shoutbox..." problems continues.
Try to solve the problem with previous tips given in this topic, but can not solve it.
Huh. What's your forum address?
Quote from: nneonneo on February 12, 2008, 07:21:40 PM
Huh. What's your forum address?
www.freeridezone.net/smf/
Somehow, one of my files got truncated, and since that didn't happen to my development copy, I didn't catch that.
A corrected version is attached. The only file that has been modified is yshout/js/prototype.js, which is attached too. Just replace the existing prototype with this one, and it should work correctly.
Sorry about the trouble!
If I don't want this shoutbox to appear in SMF but want it to appear on my website, how can I call it?
Thanks!
great job by the way!
See http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341 for an implementation of this.
1.12 has been officially released. Changes in this version are detailed a few posts up: http://www.simplemachines.org/community/index.php?topic=137508.msg1422347#msg1422347
nneonneo thank you very much for your quick answer. I have installed the new version and still testing to see if things are ok. First impression is that it is better but still IE is a lot slower than Firefox when loading the pages that include the shoutbox.
Works for me; what's your forum URL? I will check it out when I have the time.
The new 1.12 version works pretty fine.
Will continue testing it.
thanks
Quote from: nneonneo on February 13, 2008, 04:03:07 PM
Works for me; what's your forum URL? I will check it out when I have the time.
We are now in the process of upgrading the look. The normal forum is www.modelteam.gr and the test forum where all the new features are installed is www.modelteam.com.gr
The normal forum still has v1.11 and I have installed v1.12 on the test forum. Oh, and one little detail. I am from Greece, so everything is based on the greek language :)
A side note: the text is missing, so you might want to consider installing the greek language pack.
Direct link:
http://www.simplemachines.org/community/index.php?action=dlattach;topic=137508.0;attach=47088
OK, I think that I may know the problem, but I cannot tell for sure.
Change the 2000 in setTimeout("schedRefresh()",2000); to something higher; 5000 should work (this is in yshout/js/yshout.js). Refresh the page (force-refresh if necessary) and see if that helps.
I should also add that unless someone knows of an event that fires when you refresh the page in Internet Explorer 7, I cannot fix the lag associated with refreshing the page, or using navigation buttons. Hopefully, this is relatively uncommon. AFAIK the onunload handler only fires when IE is just about to leave the page.
Quote from: nneonneo on February 13, 2008, 02:26:00 PM
See http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341 for an implementation of this.
thanks a lot!
will try it ASAP
ps: active999 I like the theme of your smf forum, where did you get it?
OK I've tried it, it is working but I have now a design problem.
When I put the sbox in the forum template it is appearing just fine.
However, with the coding in the website main page it is not keeping the format, names and posts are wrapping instead of appearing neatly one below the other...
I've put the code in a table, it helped, but the wrapping is still there.
How can I solve this? Maybe by taking out the "Today at..." part? How can I do this anyway?
Thanks for the support!
How wide is the space allotted to the shoutbox? If it's not enough, then things will have to wrap. If it's wrapping with a lot of space to spare, then something is broken in the CSS.
Try overflow: auto or overflow: scroll (this is in index.template.php, under #yshout { CSS block)
nneonneo thank you once again, I have installed the language pack (I don't think it existed when I first installed your mod, so I translated only what I thought was necessary). I also changed the number to 5000 and things seem better.
Quote from: pipo_il_primero on February 14, 2008, 05:56:47 AM
ps: active999 I like the theme of your smf forum, where did you get it?
Hi pipo_il_primero. The theme we use is ApolloBB:
http://www.smfthemes.org/index.php?PHPSESSID=0de192b54da4ed3d002ccf05aa51a43d&theme=96
It has color options and we are using black. The top of the page and some images are custom made by a friend.
Hi nneonneo. I want my invisible moderators to be detected as guest so they cannot use the shoutbox when guests are not allowed. I hope it is possible. I thank you so much.
I like the shout box verry much. Only strange thing is that i changed the max lines option in yshout.php to 7 but it still shows 12.
and i also experience problems with the refresh times in IE7, firefox works great.
It is oke now, only 7 lines apear after a time.
Slight modification to the package. I've increased the default IE7 delay, which should reduce the page move lag. Some will still exist and that's unavoidable due to the nature of the bug.
Hello everyone.
I installed the Auto Embed Video Clips mod. Whenever someone enters a video url, it embeds a video into the Shoutbox and ruins it. Is there any way I can prevent this? I tried replacing text, but it seems that the Auto Embed Video Clips mod processes the text before the shoutbox has a chance to scrub it.
Does the mod come with some sort of code you can add to temporarily disable embedding? Something like
$context['disable_auto_linking']=true;
If so, put that line above every instance of "parse_bbc();" in yshout/yshout.php -- you may need a declaration like "global $context;" above the inserted line, depending on what that disabling code is.
I have a big problem with this mod
When i try to put 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
in my theme didnt work , i use a HTML Editor and appear with other colors and say "Template error" in my page , what i can do?
It would depend where you are putting it.
If you are inserting it inside a quoted piece of HTML, for example at the spot marked:
...</div></table><br />
// YSHOUT HERE
...
// YSHOUT END
<table> ...
then this will not work. Instead, you would have to write the code
<!-- YSHOUT HERE -->
<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 -->
or something like that.
Quote from: nneonneo on February 16, 2008, 04:11:53 PM
It would depend where you are putting it.
If you are inserting it inside a quoted piece of HTML, for example at the spot marked:
...</div></table><br />
// YSHOUT HERE
...
// YSHOUT END
<table> ...
then this will not work. Instead, you would have to write the code
<!-- YSHOUT HERE -->
<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 -->
or something like that.
i insert taht code and works
but when i entry in my site:
www.mundo-se.com (http://www.mundo-se.com)
appear down of
(http://mundo-se.com/search.png)
SHoutbox
but nothing more , didnt appear the text or something more only that, what i can do?
i tryo to install with the modification of:
Fixing some kinds of "loading shoutbox..." errors:
but now only stay in that , only appear "loading shoutbox" nothing more
Hi i have installed this mod and it looks good but there doesnt appear to be anywhere in admin where you can alter features?
Hi,
is there a control panel for this mod?
Hey i got a prob
QuoteShout Box
...loading shoutbox...
Can somone tell me wot i have done wrong plz my url is http://www.thecommunitycafe.info/index.php
Many thx
Hi there neon, my problem is that when i add it to my custom template, it appears just where i want it, a Rectangle With the words Shout Box inside it, but thats it! Nothing else is there, please pm me with a response
hi there...i've just installed nneonneo's shoutbox, but i don't know where to put this:
// 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
in my index.template.php...i use dilbermc...i want it under:
hi, (username)
you've got etc...
i'm sorry, but i can't speak English very well...forgive me...
Is this mod dead?
I have a problem:
I just installed this mod and when I go in the statistics's page, and explode the month, I received an error with internet explorer that says:
The name can't have the character "(";
with firefox, the table of forum history (new topics, new posts...) when i click on month shrinks
This error is to reported to:
var myfunc = new domFunction(function()
I have see other site that have this mod and all site have this problem
Quote from: Chopper on February 21, 2008, 05:54:14 PM
It would appear so
???
Also to you it gives this problem?
Someone can help me.............please!
I too have the "...loading shoutbox.." prob.
this is what my index file says:
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
Im not sure where exactly to place the code to fix this.
this mod have a lot of problem for works in other themes (also i have problem with the default theme)
Quote from: ivpn on February 21, 2008, 05:25:25 PM
I have a problem:
I just installed this mod and when I go in the statistics's page, and explode the month, I received an error with internet explorer that says:
The name can't have the character "(";
with firefox, the table of forum history (new topics, new posts...) when i click on month shrinks
This error is to reported to:
var myfunc = new domFunction(function()
I have see other site that have this mod and all site have this problem
Can you tell me if entering the statistics section and clicking on the month you've got the same problem
???
Nope i dont have any probs with stats.
How can i make the defalt text bigger?
Quote from: Judgey on February 22, 2008, 11:35:36 AM<br />Nope i dont have any probs with stats.<br />
ok...thanks
I have
SMF 1.1.4 and
TinyPortal v0.9.8Quote from: Judgey on February 22, 2008, 11:35:36 AMHow can i make the defalt text bigger?<br />
in the code, there is:
#yshout {
font-size: 10px;
} ;D
i just have smf 1.1.4
I have edit that code still the same size :(
Have this forum an information about my question?
An Error Has Occurred!
This package cannot be uninstalled, because there is no uninstaller!
Please contact the mod author for more information.
................wht can i do now to uninstall the mod
plzz help me
Wow, I totally missed a page of replies. Sorry about that!!
I'm going to try to reply to everyone here.
@NIBOGO: If you're trying to put the shoutbox in the portal, you will have to do some things differently, though I am not familiar with the portal you are using. For the board index ("action=forum") it should work, since it appears to be the default theme.
@Chopper: Options are controlled (primarily) through settings in yshout/yshout.php; this is for efficiency because the script is frequently called. Hard-coding options (into the script, at the top) is more efficient than having to access config data every time.
@Judgey: Looks like it works.
@ivpn: I have not yet encountered this problem, and it doesn't do that on my personal test installation. If you give me a board URL, I can probably figure out the problem quickly.
@djgix19: It depends on where you want the shoutbox to appear.
@syndicate: See below.
@madman71: See below.
@ousu: Odd, I definitely included an uninstaller. Manual steps:
1) Remove the whole yshout/ folder
2) In Themes/default/languages/Modifications.english.php, remove the entire section marked with "// ---- Begin modification - nneonneo's Shoutbox ----" to "// ---- End modification - nneonneo's Shoutbox ----"
3) In Themes/default/index.template.php, find "// YSHOUT HERE" and delete to "// YSHOUT END" (there are three such blocks).
For madman71 and syndicate, and possibly others, I've made a change to the custom theme installation instructions. Specifically, the line
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo $boardurlparsed['path'], '";
is now
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
That *should* fix the problem. Let me know if it still does not work.
Hey mate for the imput,
Just one last thing, how can i make defalt text bigger (were should i edit)
Many thx :)
In Themes/default/index.template.php:
Change "10px" in
#yshout {
font-size: 10px;
}
to the desired size.
Quote from: djgix19 on February 21, 2008, 12:45:38 PM
hi there...i've just installed nneonneo's shoutbox, but i don't know where to put this:
// 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
in my index.template.php...i use dilbermc...i want it under:
hi, (username)
you've got etc...
i'm sorry, but i can't speak English very well...forgive me...
i wrote it...
thank you
Quote from: djgix19 on February 24, 2008, 02:08:14 PM
i wrote it...
Oops, sorry, I must've missed that when skimming over the posts.
Right after "you have n messages, n are new." is not a great spot. After "> Show new replies to your posts." is a better spot; is that OK?
For that location, you put that code right after
if($context['user']['is_logged'])
echo '
<br/>
<span class="middletext">'
, $context['allow_pm'] ? '<b>' . $txt[152] . ' <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'] . ' ' . ($context['user']['messages'] != 1 ? $txt[153] : $txt[471]) . '</a>' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']).'</b>' : '<br/>', '.<br/><br/>
> <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
> <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
</span>';
If you want it visible *only* to logged in members, add
if($context['user']['is_logged'])
above
echo '
<br /><b>Shout Box</b><br /><br />
so it looks like
// YSHOUT HERE
if($context['user']['is_logged'])
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
can you make a version of this shoutbox, but for puting it in the index of the forum. and it would be GREAT if the shoutbox would appear in a BOX ^^ i mean like the SMF Shoutbox modification. I dont like that modification because it doesnt uses AJAX, but the thing i dont like of this one is that i donw know how to put it easily on the forum index, and in a box :P
cya! =D
See this:
http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341
This page describes the code needed to put it on a separate page -- really, it is not much code.
Quote from: nneonneo on February 24, 2008, 11:49:31 AM<br />@ivpn: I have not yet encountered this problem, and it doesn't do that on my personal test installation. If you give me a board URL, I can probably figure out the problem quickly.
http://www.sanpietroinguarano.org
I have the problem in the statistic's page:
http://www.sanpietroinguarano.org/index.php?action=stats
Thanks for your support nneonneo
hi friends i want to install this excellent shout box on my diber mc theme...
please tell me in detail..
what i have to do....i am a newbie........
@ivpn: I can't see the problem.
@kcscm: See above: http://www.simplemachines.org/community/index.php?topic=137508.msg1440464#msg1440464 and also the main mod page http://custom.simplemachines.org/mods/index.php?mod=585#post_otherthemes for details on how to do it.
Quote from: nneonneo on February 25, 2008, 09:00:28 AM<br />@ivpn: I can't see the problem.
nneonneo if you go in the statistics's page and click on the month in order to explode the menu, with internet explorer return an error in the script of the page, with firefox the table is looked at badly (see the attach in the old post)
Thank
ps if I uninstall the shoutbox, this problem is not placed
Ah! Not surprisingly, the problems are related.
Thanks for finding this. The bug has been traced to the prototype.js library. I will have to do some trickery to get rid of the library (newer versions still have this bug).
In Firefox, the additional functions added by the library are misinterpreted as array elements, causing FF to add tons of extra cells to the stat row.
In IE, the additional functions confuse the JS system which promptly throws an error.
Either way, the library has to go (it's part of the base JS core). It may take a while for me to recode the necessary bits, so bear with me here for a short while. It should not be long before I can fix it, but I cannot do that today for I have a midterm to write.
Thanks for finding & reporting it.
@nneonneo
thanks dude.....
Quote from: nneonneo on February 25, 2008, 06:01:59 PM
Ah! Not surprisingly, the problems are related.
Thanks for finding this. The bug has been traced to the prototype.js library. I will have to do some trickery to get rid of the library (newer versions still have this bug).
In Firefox, the additional functions added by the library are misinterpreted as array elements, causing FF to add tons of extra cells to the stat row.
In IE, the additional functions confuse the JS system which promptly throws an error.
Either way, the library has to go (it's part of the base JS core). It may take a while for me to recode the necessary bits, so bear with me here for a short while. It should not be long before I can fix it, but I cannot do that today for I have a midterm to write.
Thanks for finding & reporting it.
Thanks for your support and professionality.
You are a big developer.
I am happy to give you this information to improve your script.
@nneonneo
hi dude....... i have installed shout box successfully.....
but i am having one problem...
shout button is appearing below the name not at actual position...
see the attachment below.....
The div isn't wide enough to hold the button too.
In index.template.php, try to decrease 310 in
#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;
}
and see if you can make it fit. 250 should work, but you might need even less.
thanks dude.......
250 worked great........
i am facing another broblem dude.......
when i want to put news...
then shout box is not loading..
when i remove news its loading perfectly.....
is this bug of this shout box....
News? That's a bit odd, since I run news on my testing forum and it always seems to work...
its true in my case dude....
i am using dibermc theme..
i installed
shotbox and recent posts top mods only...
could u please help me.
I have news in my DilberMC installation, and a shoutbox, and it's working fine. Where did you put the shoutbox?
i put the shout box right after..
if($context['user']['is_logged'])
echo '
<br/>
<span class="middletext">'
, $context['allow_pm'] ? '<b>' . $txt[152] . ' <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'] . ' ' . ($context['user']['messages'] != 1 ? $txt[153] : $txt[471]) . '</a>' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']).'</b>' : '<br/>', '.<br/><br/>
> <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
> <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
</span>';
@kcscm: Like this?
if($context['user']['is_logged'])
echo '
<br/>
<span class="middletext">'
, $context['allow_pm'] ? '<b>' . $txt[152] . ' <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'] . ' ' . ($context['user']['messages'] != 1 ? $txt[153] : $txt[471]) . '</a>' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']).'</b>' : '<br/>', '.<br/><br/>
> <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
> <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
</span>';
// 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
That's how I have it, and there are no problems. Do you have a board URL? This merits investigation.
@ivpn: Almost done making the prototype.js modifications; a little more testing and verification, and it should be ready to go.
@nneonneo
dude. i have placed exactly where u have put the shout box......
i am confusing that the problem is with u r shout box or recent post to topv2.0...
as far i am observed the problem is when i am putting news \then saving that news shout is showing like loadindg. and disappearing.......
Quote
@ivpn: Almost done making the prototype.js modifications; a little more testing and verification, and it should be ready to go.
I look forward your checks. When the file is ready I execute the test operation.
Many thanks nneonneo. :D
@kcscm: OK, best if I get your board URL and actually take a look.
@nneonneo
check u r pm dude..
You need to put a news item in, so that I can see why it does not work.
Hey mate,
Im having a prob again
http://www.judgey.info/index.php
Its just saying ...loading shoutbox...
Anyhelp plz my freind
alright I been looking around and can't find an answer. Can I remove the time stamp in the shout box?
If so where and how..
btw I have 1.12 running on 1.14SMF with IE7 with NO probs
@Judgey: I get a 500 Internal Server Error on http://www.judgey.info/yshout/yshout.php. Check the CHMOD permissions...
@mdrcracing: In yshout/yshout.php, change the preg_timeformat function. It looks like this:
function preg_timeformat($matches)
{
// format: <timeval=(value)>
return timeformat(intval($matches[1]));
}
Change the return line to "return '';"
Also, change
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
to
$chatText=preg_replace_callback("/\[<timeval=(\d+)>\]/","preg_timeformat",$chatText);
wow mate u so good, was because it was not set at 755.
Many thx :)
Quote from: nneonneo on February 24, 2008, 11:49:31 AM
Wow, I totally missed a page of replies. Sorry about that!!
I'm going to try to reply to everyone here.
@NIBOGO: If you're trying to put the shoutbox in the portal, you will have to do some things differently, though I am not familiar with the portal you are using. For the board index ("action=forum") it should work, since it appears to be the default theme.
i try to install in my forum , the link is:
http://mundo-se.com/foro/index.php
and the portal is:
http://mundo-se.com/foro/index.php?action=portal
i cant install this mod :(
Is the skin the default skin? It should work out-of-the-box...
To anyone interested: attached is a "beta" of 1.13. The major changes are the elimination of prototype.js (well, actually it is replaced with a stub providing the necessary functions), and the moving of CSS from index.template.php and yshout.php into their own files (yshout-style.css in the theme directory and yshout directory). This may make manual installations easier to comprehend as well as making upgrading, editing and uninstallation easier (since the CSS can now be modified without having to muck with index.template.php -- my hope is that after 1.13, nobody will have to touch that file except for manual installation).
Quote from: nneonneo on February 27, 2008, 10:30:13 PM
Is the skin the default skin? It should work out-of-the-box...
To anyone interested: attached is a "beta" of 1.13. The major changes are the elimination of prototype.js (well, actually it is replaced with a stub providing the necessary functions), and the moving of CSS from index.template.php and yshout.php into their own files (yshout-style.css in the theme directory and yshout directory). This may make manual installations easier to comprehend as well as making upgrading, editing and uninstallation easier (since the CSS can now be modified without having to muck with index.template.php -- my hope is that after 1.13, nobody will have to touch that file except for manual installation).
Is there an option in Admin to alter features??
thanks for the help... worked without a prob...
@Chopper: There isn't an admin-panel component. All settings are handled through editing one of yshout.php (most common), yshout.js (not so common) or index.template.php (for the layout; 1.13 will address this by splitting the CSS off to its own file).
Quote from: nneonneo on February 28, 2008, 09:18:21 AM
@Chopper: There isn't an admin-panel component. All settings are handled through editing one of yshout.php (most common), yshout.js (not so common) or index.template.php (for the layout; 1.13 will address this by splitting the CSS off to its own file).
Ok, i have installed but where is the admin for this?? Maybe im being stupid but i cant see it?
I already said there isn't an admin component. If you want to make a change, edit yshout/yshout.php.
As for *why* I've opted to leave an admin panel out, it's because of a few reasons: efficiency (it's called often, and having it check settings from a DB isn't the fastest way to do things) -- this has been largely negated by using a lot of SMF loading features, and secondly because SMF 2.0 will come out sometime (preferably sooner), and it will likely involve at least some changes to the admin panel, so I'd like to write one after the API is clear.
Can someone please explain me, how i can disable the BBcode in the Shoutbox?
I dont want that some users are posting extra large pictures with the IMG tag and other stuff, linking from other sites
thanks
Quote from: nneonneo on February 28, 2008, 11:53:47 AM
I already said there isn't an admin component. If you want to make a change, edit yshout/yshout.php.
As for *why* I've opted to leave an admin panel out, it's because of a few reasons: efficiency (it's called often, and having it check settings from a DB isn't the fastest way to do things) -- this has been largely negated by using a lot of SMF loading features, and secondly because SMF 2.0 will come out sometime (preferably sooner), and it will likely involve at least some changes to the admin panel, so I'd like to write one after the API is clear.
Sorry mate, i totally misread.
Disabling all BBCode?
Find both lines starting with
$newText = parse_bbc($newText);
and comment them out. This will disable all BBCode.
I tried to install it to my board, but it's still saying ...loading shoutbox...
I altered the board url, and it's still not working. Any idea why?
http://papigice.net/newforum
http://www.papigice.net/newforum/yshout/yshout.php gives a 500 server error. This likely means a permission problem; try setting the permissions of the folder to 755.
I checked it, it already is 755. :(
Odd. Check the server error log, then. Maybe there is a hint. Some hosts are set up funny :P
Hi all,
Am using the shoutbox on our new forum at www.chauffeursforum.eu (http://www.chauffeursforum.eu)
And so far we are happy with it, only what i wanted to ask is can i rename the shout box name?
It says now : shout box and i wanna replace it in something dutch like "kanaal 9" or something like that.
How do i do that? and the same thing goes for the shoutbox button can i chance the name to at that button?
Thanks so far.
Hi nneonneo,
I want to insert in the shoutbox' page this:
echo '<div id="useronline">'; ssi_whosOnline(); flush(); echo '</div>'; (view user online)
for refresh this div with your function doRefresh()...how i do???
thanks ;D
ps
For the previous issue ... You are able to solve?
Hello,
My page "shoutbox" is good.
If i add smileys bar :
Fatal error: Call to undefined function: loadlanguage() in /home4/b/barbarus/www/ant/forums/mymod/smiley.php on line 101
An idea?
link shoutbox: http://www.belgant.be/index.php?option=com_wrapper&view=wrapper&Itemid=77
Thank you
(i'm french, sorry for the error)
Can someone help me?
http://newengine.sam-clan.com/
The shoutbox only says "...loading shoutbox..."
Nothing happenz.
what if i dont want the shoutbox to show up on the tinyportal main page what do i do to take it off please help me
@ronnie42: All text is in Modifications.english.php, so if you copied that file to Modifications.dutch.php (for example), you can translate the texts appropriately.
@ivpn: I suppose there are two ways to do it; one is to make another PHP script and have doRefresh call it too (this is probably not the best way); the other is to edit readChat function in yshout/yshout.php to add that information to the bottom. So, right before return $chatText.' ';, you would add the echo line.
As for the other problem, I have tentatively posted 1.13 at http://www.simplemachines.org/community/index.php?topic=137508.msg1444735#msg1444735, though due to a serious lack of time this week, I will not be able to post it "officially" that soon :-\
@Barbarus: I don't know if this is the cause, but loadLanguage should have a capital L (PHP is not case sensitive, though, so this is probably not it...). It also depends on how you installed it; you may need to add the line
require('/<path to forum files>/Sources/Load.php');
right above the offending loadLanguage line.
@De4thPr00f: I get a 500 internal server error on http://newengine.sam-clan.com/yshout/yshout.php. Try chmod 755 on that file.
@devinrajaram1993: Hmm? I don't think the shoutbox installs to TP themes by default; maybe you are talking about the TP shoutbox?
nneonneo, same... Chmodded already...
Server error log?
it stucks at loading shoutbox.
Yes, I know; it's because the shoutbox script can't run. Have you checked the server error log?
@nneonneo
check u r pm dude......
news is on dude......
test that board please...
Yes, I have tested it.
Here's the problem. Some mod is throwing an error:
<b>Notice</b>: Undefined index: enableamazonlinks in <b>/mounted-storage/home34a/sub001/sc27813-WZXZ/studentsspot.com/Sources/Subs.php</b> on line <b>2374</b>
and the yshout script is not working correctly because of this. You will probably see a lot of errors in the error log because of this.
Now, there's a fairly easy fix. At the top of yshout.php right after <?php, put
error_reporting(0);
and it should suppress the error and let the shoutbox work.
thanks for u help dude...
but after adding that like <?php,error_reporting(0); or <?phperror_reporting(0); i am getting the error..
Fatal error: Call to undefined function phperror_reporting() in /mounted-storage/home34a/sub001/sc27813-WZXZ/studentsspot.com/yshout/yshout.php on line 1
by placing that like <?php error_reporting(0);
or
<?php
error_reporting(0);
i am getting same problem as before.....
Well, then I suggest you try to fix the other problem, regarding "enableamazonlinks". It probably came with a mod.
thanks dude...
i will uninstall that mod then i will give feedback...
uninstalled amazon links mod
and shout box working like a charm
thanks a lot friend for u r help....
i dont now why, but i did everithing and still apears "...loading shoutbox..."... any help please??
i have the 1.1.4 version and tryed with the SB_1.12.tgz and SB_1.11.tgz mod...
Have you followed all the steps on the main mod page? If so, post or PM a board URL and I'll see what I can do.
I've installed shoutbox and gotten the dreaded 'loading shoutbox' message.
I've checked the main mod page- i'm using the default theme -
I found the board_url declaration and replaced with var board_url = "' /'" (we are at the root) but its still not working.
i'm thinking i'm missing something but i don't know what.
Have you visited the yshout.php file itself? It may not have the right permissions, or might have some error which prevents it from working.
Quote from: nneonneo on March 03, 2008, 08:58:51 AM
Have you visited the yshout.php file itself? It may not have the right permissions, or might have some error which prevents it from working.
yes sir!
I've got a 500 and a 404. I was getting this on several SMF pages at some point and siteground changed my PHP version . Is this the same issue?
A 500 _and_ a 404? Which one is it? I'll assume the 500, in which case it is the script failing to run for some reason.
Look in your server error logs, and try to chmod the script to 755 if possible.
Quote from: nneonneo on March 03, 2008, 03:30:06 PM
A 500 _and_ a 404? Which one is it? I'll assume the 500, in which case it is the script failing to run for some reason.
Look in your server error logs, and try to chmod the script to 755 if possible.
Thank you for your kind help nneonneo
the server error log reads the following error:
[Mon Mar 3 14:44:18 2008] [error] [client 209.165.147.250] Premature end of script headers: /home/mommyram/public_html/yshout/yshout.php
the 404 i think has to do with having no 500 error page.
Is there nothing else? That error means that the server didn't finish running my script, which means some other error happened.
Can you try to chmod (change permissions) the script to 755? Most FTP clients have some way to do this.
AHA, much better but still not quite there -the page (at http://www.islandofmisfittoyz.net/yshout/yshout.php ) gives me a "nothing to do' which I think means its probably working!
The shoutbox however, still says loading shoutbox indefinitely. I have an error on line 25 character3
You can check out the source - at http://www.islandofmisfittoyz.net without logging in, I think
Thanks gain,
You need to undo the changes you made to index.template.php.
Right now, it looks like
// var board_url = "http://www.islandofmisfittoyz.net/yshout/js/yshout.js?Feb142008" type="text/javascript"></script>
(that's the output, so it might not look exactly as shown in the template). If you change that all back to what it should be, the shoutbox should start working.
dammit!! I messed with that to try and fix things and forgot
I'm a moron.
thank you VERY much.
you went above and beyond!
Quote from: nneonneo on March 01, 2008, 06:59:42 PM
@ivpn: I suppose there are two ways to do it; one is to make another PHP script and have doRefresh call it too (this is probably not the best way); the other is to edit readChat function in yshout/yshout.php to add that information to the bottom. So, right before return $chatText.' ';, you would add the echo line.
As for the other problem, I have tentatively posted 1.13 at http://www.simplemachines.org/community/index.php?topic=137508.msg1444735#msg1444735, though due to a serious lack of time this week, I will not be able to post it "officially" that soon :-\
Thanks nneonneo ;)
The refresh is ok...and the problem with statistic's page is resolved.
I just wanted to tell you my users are totally loving this mod.
Could you add also cURL instead of fopen? my host doesn't have fopen and I would like to use your shoutbox.
Thanks a lot!
Wait, what? This shoutbox is using strictly local fopen, so cURL isn't required. There are no remote fopen calls, thus it should work...
Well... I installed it manually and put it in a phpblock of TP and just added the folder and the modification to the index.template.php of my theme... and open Firefox and gave me the error for the fopen... I'll try it again tomorrow morning and I'll double check for everything.
Thanks a lot!
What error was it?
Any idea to auto scrolling to the bottom for each shout message? I found this resource http://radio.javaranch.com/pascarello/2006/08/17/1155837038219.html but really have no idea how to integrate it with this mod.
Any help would be greatly appreciated.
http://www.simplemachines.org/community/index.php?topic=137508.msg1188746;topicseen#msg1188746
It uses the code that you pointed out. I believe it should still work in the newer revisions of the mod.
The error that is saying is
Warning: fopen(chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /www/xxxxx/x/x/forocontrabasso/htdocs/yshout/yshout.php on line 793
File error (writeLine); aborted
And I did again the same thing, I used this message http://www.simplemachines.org/community/index.php?topic=137508.msg1031509#msg1031509 and extract to the root the yshout folder, weird isn't it?
Thanks Nneonneo!
OK, you need to make yshout/chats/home.txt writable (644 should work, but if it doesn't, try 666). That should fix it.
Great it fix it! Now, the minor thing is that the HideAdminLinks is not hiding and the commands window is not showing. But besides that everything is smooth!
Thanks again!
Edit
I installed it in the default and everything is working fine, now I think that my problem is all the java errors that I have in my theme and those conflict with the shoutbox, what a shame, because I don't know how to solve them... anyway thought to let you know that the problem is all mine... :P
Quote from: nneonneo on March 04, 2008, 12:29:26 PM
http://www.simplemachines.org/community/index.php?topic=137508.msg1188746;topicseen#msg1188746
It uses the code that you pointed out. I believe it should still work in the newer revisions of the mod.
Cool. It works like a charm. Thanks bunch, nneonneo! :D
My shared account was suspended two days after installing this mod, because of high CPU usage. Is there a way to make it more shared hosting friendly?
Hmm, I have heard this before, but it got a lot better after 1.08 I think.
How busy is the forum? The shoutbox script, by default, will run every 20 seconds for each connected user (too much higher and PHP's script timeout kills it). If someone shouts, the shoutbox will refresh for each user, so if people are shouting at a rate of one per second, constantly (this would be somewhat similar to what you'd see on a busy IRC channel, I suppose), then the script would certainly run a high cost in resources. However, that's a rather unlikely usage pattern unless your forum is _really_ busy.
If your host doesn't have a PHP accelerator installed, they really should get one; it speeds this script up by a lot, since the loading times are cut significantly (noting that the load time contributes much to the overall time to execute the script).
Some parameters you can change are:
1) [yshout/yshout.php] $updateTimeout: I usually suggest this be set as high as possible, without causing the script to die prematurely (from a PHP timeout). The wait loop queries the chats every second, and if nothing new is found, the script sleeps for another second. This is measured in seconds.
2) [yshout/yshout.php] The sleep time. As mentioned before, the script queries chats every second; this can be increased if required. Increase the "1" in "sleep(1);". This is measured in seconds.
3) [yshout/js/yshout.js] The refreshTime can be increased, which leads to a longer wait between client refresh requests. Increasing this has the largest effect on interactivity, which is something you may or may not need. This is measured in milliseconds.
That's all I can think of right now. If you don't need a very interactive shoutbox, you can raise refreshTime very high (~5000-10000 makes for 5-10 second refresh intervals) or even higher.
Potentially, your host may be complaining about the fact that the script is waiting at all, because that causes it to consume some resources (and multiple copies running simultaneously could be a problem for some hosts, particularly shared ones.). In this case, you should *reduce* updateTimeout to 0, and increase refreshTime to 5000-10000. You *must* in this case change Feb142008 in
<script src="',$boardurl,'/yshout/js/yshout.js?Feb142008" type="text/javascript"></script>
What this does is ensure that your users get a fresh copy of the shoutbox code immediately. Otherwise, the old versions will bring a heavy load upon the server.
Hope that helps. It would be wise to ask your host which of the two problems (CPU usage caused by constant access, or resource usage caused by constant waiting) is the culprit, so that you can apply the correct fix.
hi wanna thank nneonneo for this very nice script... but just a question... is there a possible way that the shout box be scrollable so that you don't always have to look at the history? I mean like 30 shouts will be stored always... and so the size will be fixed?
just a question though :) but if it's possible, it's a very big help. if this was already asked, please point me to the solution. Thanks...
Hi!
Thanks for the great mod again!
Is there a way to output the chat in a separate window?
@sherwinaval: Yes. See http://www.simplemachines.org/community/index.php?topic=137508.msg1221413#msg1221413 (after the ++++++ bar for the scrollbar). To change the number of lines, simply change the max_lines variable in yshout/yshout.php.
@ByeVas: See http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341 for instructions to that effect.
i am using pirates theme i did all the change coding in index template but still not working
it keep saying ',$txt['yshout_loading'],'
Huh? That's odd. It actually says ',$txt['yshout_loading'],' , not Shoutbox loading? This probably means you added a ' somewhere; check your code _carefully_.
check ur pm and i tried to put the code in tp main page this is what i see
(http://img442.imageshack.us/img442/3568/wsmu8.png)
Did you put that in a TP block? If so, then make sure it's a PHP block.
i dont know how to do that plzz check ur pm and relpy back
i cannt with this mod , the shoutbox stop in:
Shout Box
...loading shoutbox...
AHMER, is it in a TinyPortal block, or not?
NIBOGO: Have you checked the page <domain>/<path to forum>/yshout/yshout.php, and followed the advice on the main mod page?
yes its in tp
Use the TinyPortal instructions on the main mod page.
like on tp own website or in ur thing
ok i found it but i cant get it
http://www.simplemachines.org/community/index.php?topic=137508.msg1031509#msg1031509
dude i did that didnt work plzz add me at
[email protected] i have to talk to u i am nitish's friend plzz
I will not add you to MSN. Many other people have made it work with TinyPortal, including myself, on all sorts of themes. Please, read it carefully, and make sure you make it a PHPBOX.
ok i uninstalled tp now i am in reg one its not working in that too it only say ',$txt['yshout_loading'],'
plzz add me in ur msn plzz
Uninstall the mod. Reinstall it. Follow EVERY step of that guide. I will not answer further questions until you have. I am sorry.
in tp its not working plzz tell me
Thanks again nneonneo for that very helpful reply and yeah.. i was able to do it :)
another question :) how do i make the the text box, username box, and button at the top of the chat instead at the bottom? Thank you very much.
I don't have such a visitor intesive site, but it's perfect to grant my users wish :) thanks again.
Quote from: nneonneo on December 28, 2006, 01:26:03 PMNote 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)
Hi nneonneo, Just wondering if you know how to do that? Been having trouble hiding it.
@sherwinaval: In yshout/yshout.php, move these three lines:
echo '<div id="shouts">';
echo readChat($chatFile, $logDir);
echo '</div>';
all the way down to before
if($gzipCompression) ob_end_flush();
break;
case "shout":
This will cause the shouts to go after the form.
@14WORDS: Using code similar to the following. You would put this right after // YSHOUT HERE and before the echo statement.
$show_shoutbox=true;
if(loadMemberData(Array($context['user']['id']),false,'profile')!==false)
{
$membergroups=explode(',', $user_profile[$context['user']['id']]['additionalGroups']);
$membergroups[]=$user_profile[$context['user']['id']]['ID_GROUP'];
$membergroups[]=$user_profile[$context['user']['id']]['ID_POSTGROUP'];
if (count(array_intersect(array(<banned group numbers>), $membergroups)) > 0)
$show_shoutbox=false;
}
if($show_shoutbox)
Quote from: nneonneo on March 06, 2008, 09:33:04 AM@14WORDS: Using code similar to the following. You would put this right after // YSHOUT HERE and before the echo statement.
$show_shoutbox=true;
if(loadMemberData(Array($context['user']['id']),false,'profile')!==false)
{
$membergroups=explode(',', $user_profile[$context['user']['id']]['additionalGroups']);
$membergroups[]=$user_profile[$context['user']['id']]['ID_GROUP'];
$membergroups[]=$user_profile[$context['user']['id']]['ID_POSTGROUP'];
if (count(array_intersect(array(<banned group numbers>), $membergroups)) > 0)
$show_shoutbox=false;
}
if($show_shoutbox)
Thanks for the reply. I had no luck with that bit of code in the default theme. I have 4 instances of
// YSHOUT HERE in my index.template file and it worked with none.
You need to put it immediately before
echo '
<br /><b>Shout Box</b><br /><br />
You also need to change <banned group numbers> to something like
6, 7, 11
where those would be the membergroups who should not see the shoutbox.
Ok, I have no errors now but it's not hiding the shout box like it does for guests. The code is below and the 0,1,9 is usergroup numbers i don't want to be seeing the shoutbox.
// YSHOUT HERE
$show_shoutbox=true;
if(loadMemberData(Array($context['user']['id']),false,'profile')!==false)
{
$membergroups=explode(',', $user_profile[$context['user']['id']]['additionalGroups']);
$membergroups[]=$user_profile[$context['user']['id']]['ID_GROUP'];
$membergroups[]=$user_profile[$context['user']['id']]['ID_POSTGROUP'];
if (count(array_intersect(array(0,1,9), $membergroups)) > 0)
$show_shoutbox=false;
}
if($show_shoutbox)
echo '
<br /><b>Shout Box</b><br /><br />
Whoops, I forgot a line.
Before
$membergroups=explode(',', $user_profile[$context['user']['id']]['additionalGroups']);
add
global $user_profile;
and it will work. Sorry for the trouble.
Quote from: nneonneo on March 05, 2008, 08:11:11 PM
AHMER, is it in a TinyPortal block, or not?
NIBOGO: Have you checked the page <domain>/<path to forum>/yshout/yshout.php, and followed the advice on the main mod page?
yes i check that :(
So what does it say? 500? Nothing to do?
plzz help me
Would you mind detailing your problem? If you still have the same problem, with the ', $txt thing, then you have not listened to me at all.
You need to make a TinyPortal block, and set the type to phpbox.
no i dont have tp anymore bcz i liked a theme and it wasnt on tp so i dont have tp but still not working
Hello how can i make my text bold appearing in the shoutbox?, and also is it possible to insert a border around the shoutbox ?
Thanks
@AHMER
Quote from: nneonneo on March 06, 2008, 07:36:04 PM
Would you mind detailing your problem?
@tam2oo5: BBCode is supported, so using [b]Hello![/b] will make that text bold. As for a border, edit index.template.php, adding after the two occurrences of
<div id="yshout"
the code
style="border: 1px solid"
You can play around with the settings "1px" and "solid" (and different border css) to get different effects.
Quote from: nneonneo on March 06, 2008, 04:20:59 PM
Whoops, I forgot a line.
Before
$membergroups=explode(',', $user_profile[$context['user']['id']]['additionalGroups']);
add
global $user_profile;
and it will work. Sorry for the trouble.
Worked great and everything is working! Thank you very much for the support!
How could i make it so mods dont have admin in the shout box, as they are pretending to be other people, via the cmds or making that no one not even admins can use this.
Many thx
I still have the "...loading shoutbox..." problem.
I checked the error.log file and found two errors that come in pair:
SoftException in Application.cpp:231: File "/var/www/web46/web/newforum/yshout/yshout.php" is writeable by group
Premature end of script headers: yshout.php
755 yshout.php mate
@Judgey: In yshout/yshout.php, change $moderatorGroups (make it an empty array: array() )
@Diami: chmod yshout/yshout.php to 755.
many thx dude
It worked!
Thanks!
Can it be made to appear just on the index site, and not on open forums and themes?
Hi nneonneo,
Is it possible to put the shoutbox just above :
Powered by SMF 1.1.4 | SMF © 2006, Simple Machines LLC
instead of your default position?
Of course it is :)
First, you should effectively uninstall the mod from Themes/default/index.template.php, to make sure it is clean (there's some header-specific stuff there) -- remove the four code blocks between // YSHOUT HERE and // YSHOUT END.
Next, follow the "other theme" installation instructions on the main mod page.
If you are using 1.13, you are recommended to make this change:
<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;
}
</style>';
to
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/yshout-style.css" />';
so that the yshout-style.css file still works.
The location in the theme where you should put the div is right above
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
Now, you can also opt to put the shoutbox in a info-center-esque block, by using
// YSHOUT HERE
echo '<br />
<div class="tborder" style="margin-top: 0;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center; ">',$txt['yshout_loading'],'</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr><td class="windowbg2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr></table>
</div>';
// YSHOUT END
instead of the supplied <div> code.
Did that all make sense? If you need any more assistance, feel free to ask :)
Thanks a lot, when i'm ready i'll come back here :)
It will take some time cause i need to translate the mod to Bulgarian language 1st.
@nneonneo
Hey thanks for the reply, but mines still giving me problemz :'(
Heres a ss
Did you uninstall it? I can't get to http://aesl-gaming.com/forums/yshout/yshout.php; in fact, none of the JavaScript are loaded or available.
I used that package installer, and it showed this, then i put in the stuff that you wrote into the index.template file in the theme that i use.
(btw i am VERY noobie when it comes to this, that is my first mod that i tried to install aswell.)
Huh? Did you hit "Apply mod"?
Hi nneonneo,
I noticed that in the "Forum Error Log" there are many errors:
8: Undefined index: path that i resolved here (http://www.simplemachines.org/community/index.php?topic=211686.0)
And now I just another error:
"8: Undefined variable: boardurl"
Thanks for your support ;)
1. First, you should effectively uninstall the mod from Themes/default/index.template.php, to make sure it is clean (there's some header-specific stuff there) -- remove the four code blocks between // YSHOUT HERE and // YSHOUT END.
- If i remove all the mod code from index.template.php where shall i put it?
- Are you talking about those four code blocks?:
<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>
2. If you are using 1.13, you are recommended to make this change:
<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;
}
</style>';
to
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/yshout-style.css" />';
- shall i edit yshout-style.css or the code in index.template.php?
Could you be so nice, when you have time please attach modified index.template.php, so i can understand better - i have been playing for 3 hours but i probably do something wrong.
Thanks a lot!
@ivpn: I can't get those errors. The path error should be fixed as of 1.12, unless I did something wrong.
@ivo2296: Find the line "// YSHOUT HERE". There are four of them in index.template.php. Delete everything from // YSHOUT HERE to the matching // YSHOUT END line. One will have some script tags and some CSS. Another will be a short JS snippet. The last two will have a single echo statement with a "div".
Then, you install the mod "to another theme" as per the instructions on the main mod page.
Finally, ONLY if you have 1.13, make the change detailed in index.template.php.
Thanks,
One more thing - with Firefox all chat text hides in 5-6 seconds and i have to do refresh again to see it for another 5-6sec, in IE the chat text doesn't hide. What should be the right behavior?
Huh. Sounds like you need to set $updateTimeout (yshout/yshout.php) lower, probably to about 4 seconds.
Quote from: nneonneo on March 08, 2008, 04:09:57 PM@ivpn: I can't get those errors. The path error should be fixed as of 1.12, unless I did something wrong.
Recommendations?
the errors:
http://www.sanpietroinguarano.org/index.php
8: Undefined variable: boardurl
File: /public_html/Themes/default/TPortal.template.php (eval?)
Riga: 72
http://www.sanpietroinguarano.org/index.php?dummy=1;action=forum;
8: Undefined variable: boardurl
File: /public_html/Themes/default/BoardIndex.template.php (eval?)
Riga: 72
http://www.sanpietroinguarano.org/index.php?dummy=2&board=19.0
8: Undefined variable: boardurl
File: /public_html/Themes/default/MessageIndex.template.php (eval?)
Riga: 72
http://www.sanpietroinguarano.org/index.php?dummy=1&topic=161.0
8: Undefined variable: boardurl
File: /public_html/Themes/default/Display.template.php (eval?)
Riga: 72
and other....
Looks like in various places $boardurl is referenced, but not included in the global statement for the functions in question.
My script is using global $boardurl, so I don't know what is causing it. It might still be my fault, but I cannot reproduce it (nor can I locate any of my code on line 72, of any files I've modified :P)
It appears to be in eval'ed code.
I think you can jam a disableTemplateEval variable into modsettings or something like that to get it to stop doing the eval, so you get the actual error message.
I have no errors but i try to set bigger font px using yshout-style.css but nothing changes :)
That will be best shoutbox if nneonneo try to add some basic BBC menu to it in the next version :)
Quote from: nneonneo on March 06, 2008, 05:23:07 PM
So what does it say? 500? Nothing to do?
appear Nothing to do.
What i can do???
@ivo2296: BBC support is there. I am not going to add a BBC menu, since I think it simply clutters the interface. No need for more buttons and complexity than is necessary.
As for CSS, the two spots to watch are Themes/<theme>/yshout-style.css and inline CSS in index.template.php. yshout/yshout-style.css is only for history.
@NIBOGO: If it says Nothing to do, then by all means it should be working. Try version 1.12 or 1.13.
ok mine is working now
yes i did
@AHMER: Good to hear.
@syndicate: Hmm, so next to nneonneo's AJAX ShoutBox 1.13 in the Package Manager is a green dot? I still cannot access the yshout/yshout.php file. If it successfully installed, the folder should have been created.
If the package is indeed correctly installed and everything, and it still doesn't work, upload the yshout/ folder inside the package manually.
i had 1.12 there, i'll uninstall it and install 1.13 now and see what happens :/
Can you plz add me to msn?
[email protected] as it's easier
You can use the email in my sig, and I am on the GMail talk thing.
Quote from: nneonneo on March 08, 2008, 10:37:57 PM
You can use the email in my sig, and I am on the GMail talk thing.
I think i just sent a chat invite thingy, also, no change :'( i uninstalled 1.12 and installed 1.13, still looks the same :S
Quote from: CmptrWz on March 08, 2008, 05:31:11 PMLooks like in various places $boardurl is referenced, but not included in the global statement for the functions in question.
Quote from: nneonneo on March 08, 2008, 05:56:24 PMMy script is using global $boardurl, so I don't know what is causing it. It might still be my fault, but I cannot reproduce it (nor can I locate any of my code on line 72, of any files I've modified
If I delete all fields $boardurl inserted into your script and I put the full path?
Now I try and I say to you ;)
Quote from: ivpn on March 09, 2008, 07:00:31 AMIf I delete all fields $boardurl inserted into your script and I put the full path?
Now I try and I say to you
No other error in the registry
I have changed in the script:
<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script>
<script type="text/javascript" language="JavaScript" src=http://www.sanpietroinguarano.org/mymod/animatedcollapse.js"></script>
And now runs without errors (I hope) :P
Oh, I see. That's the smiley code -- I didn't realize that it had these errors on it. If I get time, I will fix it.
Hi Nneonneo
I keep getting File error (writeLine); aborted
I have set all the files to chmod 755
I can lock and unlock and run all the commands, but everytime I try write something I get the same error.
Have uninstalled and reinstalled a number of time with no success.
:(
Try to chmod yshout/chats/home.txt to 666.
Hi! Is it possible to make the chat open in new window, which stays on top while the users browse the forum?
Yes, it is. See http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341 for details on how to make a separate page. From there, it should be pretty easy to install some sort of link on your forum which simply pops open this separate page.
Still coming up with that error....
Delete that file. It should be recreated (hopefully with correct permissions) when you shout.
It did recreate the file with cmod 644
but the error still occurs after it was recreated....
<?php
$boardurl = 'http://mysite.com/forum/';
echo '<html><head><title>Shoutbox</title>
<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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Feb142008" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/yshout-style.css" />
</head>
<body>
<br /><b>Shout Box</b><br /><br />
<div id="yshout">Shoutbox loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></body></html>';
?>
I use this bit of code, however I get only shoutbox loading. The chat is working in the SMF but not in my chat.php
Moreover I can not delete previous post although I had the files CHMOD-ed to 777
@slayer69: That is beyond odd. Can you check your server error logs and see if there's a hint?
@ByeVas: You need to update this line:
$boardurl = 'http://mysite.com/forum/';
As for deleting, does it give you a "Shout deleted" message?
10x for the help, I know I need to update this line. I just did it wrong. Now it works fine.
As for deleting yes, I get the "Shout deleted" message
And there are no errors in the server error log?
I found no errors.
Now I am trying to put the shoutbox in rounded corners, and I am using this echo '<div id="shouts"><div class="roundedcornr_box_278698">
<div class="roundedcornr_top_278698"><div></div></div>
<div class="roundedcornr_content_278698">';
echo readChat($chatFile, $logDir);
echo '</div>
<div class="roundedcornr_bottom_278698"><div></div></div>
</div>
</div>';
It works for a few seconds and then the box goes away...
It gets stuck on "loading shoutbox" for me.
@ByeVas: You probably don't want to wrap the shouts div, since it rewritten on each refresh. Rather, you should consider wrapping the code in index.template.php (around the <div id="yshout"> part).
@Musicmad: see PM
nneonneo I am using a separate page. I have the code in my chat.php file the same way but it is still the same:
<div id="yshout"><div class="roundedcornr_box_278698">
<div class="roundedcornr_top_278698"><div></div></div>
<div class="roundedcornr_content_278698">
Loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div><br>
</div>
<div class="roundedcornr_bottom_278698"><div></div></div>
Wrap your rounded corner stuff around the yshout div, so the innermost div is yshout (otherwise, again, the yshout div contents are replaced)
Got it! Thanx a lot!
Quote from: nneonneo on August 18, 2007, 11:56:39 AM
@Mongey: Find all instances of the number 125 and increase the value. It should occur twice as maxlength="125" and once in substr($shoutText,0,125).
@Spale: change $allowGuests in yshout.php to false.
@pongsak: in yshout/js/yshout.js, change function doRefresh() {
to var oldShouts = null;
function doRefresh() {
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
<PLAY SOUND>
}
oldShouts = $("shouts").innerHTML;
where "<PLAY SOUND>" is code for producing an audible sound; this varies widely from browser to browser. There are a number of sites on the Internet to find code to play sounds.
And the smileys menu looks nice -- I can't wait to find out how you did it :)
This one stopped the chat from loading, any idea?
Well, you need actual code in place of <PLAY SOUND>; see http://www.simplemachines.org/community/index.php?topic=137508.msg1208212#msg1208212 for a specific implementation.
Quote from: nneonneo on March 15, 2008, 02:03:59 PM
Well, you need actual code in place of <PLAY SOUND>; see http://www.simplemachines.org/community/index.php?topic=137508.msg1208212#msg1208212 for a specific implementation.
Yes I put that code:
var oldShouts = null;function doRefresh()
{if (oldShouts != null && oldShouts != $("shouts").innerHTML){if(get_cookie("shoutSound") == "true") {soundManager.setVolume('sound',200); } soundManager.play('sound')} oldShouts = $("shouts").innerHTML;
Uploaded the sound.mp3
and soundmanager2.js
and soundmanager.swf,
changed the js
And it still didn't work? That's a bit weird. Post your whole yshout.js file...
sory my mistake I messed up the brakets.
THANX A LOT!
hey guys, im having an issue with a former member who keeps signing on to the shout as a guest.. is thier anyway that I can turn that option off.. I would like to have the shout private like the rest of my forum. thnx
In yshout/yshout.php, change $allowGuests to false.
hey nneonneo, if u remember me from today, www.aesl-gaming.com/forums, the shout box has disappeared?!?!?! ANd so has some topics/posts from today and previous days aswell :/
Looks like it's working to me...
yer now its back :S i think the forums has split itself up somehow into two different forums :/ because some posts are missing, but are back the next day but then those are gone and others appear :(
Quote from: nneonneo on August 19, 2007, 03:39:56 PM
Adding sound:
Get SoundManager2 (http://www.schillmania.com/projects/soundmanager2/)
Place soundmanager2.js in yshout/js
Place soundmanager2.swf in yshout/
Place the desired sound in yshout/ and change the URL below to match (MUST BE MP3!)
Place the following code after
<script src="',$boardurl,'/yshout/js/yshout.js?Jul222007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
in index.template.php:
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">soundManager.url="',$boardurl,'/yshout/soundmanager2.swf";
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function() {
soundManager.createSound("sound", "', $boardurl, '/yshout/sound.mp3");
}</script>
Replace <PLAY SOUND> by soundManager.play('sound')
It should work (hasn't been tested as my server is being odd today)
Scuse me but i don't understand how sound go with yshout this:
doidoinstall soundmanager2 full?
and
Place the desired sound in yshout/ and change the URL below to match (MUST BE MP3!) ?????my sound.mp3 is yshout/
and
Replace <PLAY SOUND> by
soundManager.play('sound')
where do i do this????
I don't listen any sound
Scuse me for my english but 'i'm italian, i will want too install a option muting sound
P.S. I have traslated in italian your shout box have you want it????
Thanks for all
EDIT: NOW PLAY
Quote from: falconforce on January 16, 2008, 10:20:09 AM
in yshout.php, add this to anywhare are you need
if(!isset($_COOKIE['shoutSound'])) {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24);delete_cookie(\'yShout_open\');loadChat();">Use Sound</a>';
} else {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();">No Sound</a>';
}
PS. I'm add that after...
case "init":
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">',$txt['yshout_history'],'</a> <a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
this 2 where do i must add?
EDIT: now the button there is but it's don't stop sound why????
I just installed the shout box and seems to work fine, great job!
Just 2 questions (I'm sure this has been asked before, but the thread is just way too long, sorry!)
1) How to put a "Shout Box" title, just like in the demo site?
2) The "Shout!" button has no text (I use SMF default theme but not english language)
Thanks for the help and the great mod :)
Hi All! Is it possible to make the chat history open in new window, and the txt box up instead of down?
Thnx from Holland.. ;)
Quote from: falconforce on January 16, 2008, 10:20:09 AM
I try modified own shout box, so it can turn off sound ;)
after you modified mod with sound...
in yshout.js, after
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
add
if(get_cookie("shoutSound") == "true")
{
soundManager.setVolume('sound',200); // my addition line, you can remove it
soundManager.play('sound');
}
and add this to first line of file
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
in yshout.php, add this to anywhare are you need
if(!isset($_COOKIE['shoutSound'])) {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24);delete_cookie(\'yShout_open\');loadChat();">Use Sound</a>';
} else {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();">No Sound</a>';
}
PS. I'm add that after...
case "init":
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">',$txt['yshout_history'],'</a> <a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
this
and add this to first line of file
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
Where can I put this? is it the problem?????????
The sound i hear, but Why do i stop sound?
EDIT: Now i stop but for change from sound at no sound i do refresh page It's normal use???? it's right???
But you Think is can something put the volume bar also?
@Syndicate: Well, that doesn't sound like a shoutbox problem; I advise you contact your host right away...
@Mystiquo: I'm not sure if refreshing is normal for turning on and off sound, since I didn't write that code. However, if that's what is needed, I don't expect it's that big of a deal. Also, an Italian translation would be appreciated; you should attach Modifications.english.php.
@rebus: Copy Themes/default/languages/Modifications.english.php to Modifications.<yourlanguage>.php, and both problems should be fixed.
@hotrod: On reversing the order of chats:
http://www.simplemachines.org/community/index.php?topic=137508.msg1276450#msg1276450
As for making the history in a new window, in yshout/yshout.php, change
'<a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">'
to
'<a href="javascript:window.open(yshout_php+\'?file=',checkName($chatFile),'&history\');void(0);">'
Thnx for the tip, the history is now a popup.
But:
Quote@hotrod: On reversing the order of chats:
http://www.simplemachines.org/community/index.php?topic=137508.msg1276450#msg1276450
is only the txt.. that was fixed. But i mean the txt box. Where you put the txt in.
regards for your work!!
Quote from: nneonneo on March 18, 2008, 09:43:15 AM
@rebus: Copy Themes/default/languages/Modifications.english.php to Modifications.<yourlanguage>.php, and both problems should be fixed.
That worked! Thanks again :)
Now i stop but for change from sound at no sound i do refresh page It's normal use???? it's right???
But you Think is can something put the volume bar also?
I'don't understand
i have attach italian version can you do control it
Quote from: hotrod on March 18, 2008, 10:01:37 AM
Thnx for the tip, the history is now a popup.
But:Quote@hotrod: On reversing the order of chats:
http://www.simplemachines.org/community/index.php?topic=137508.msg1276450#msg1276450
is only the txt.. that was fixed. But i mean the txt box. Where you put the txt in.
regards for your work!!
Found it.. thnx.
Next : How can i make de history 4 days? Instead of realtime ?
It displays history what in de shout stands. I want a history with days of info..
regards Hotrod
@Mystiquo: There is no volume bar, sorry. I don't know enough about SoundManager2 to effectively code one.
@hotrod: Do you mean to make the history show up after four days, or to be automatically deleted after four days? If the shoutbox history only shows the last few shouts, and deletes the ones afterwards, this indicates a problem with the history file (you should then apply chmod 755 or 777 to the chats folder, and delete history.home.txt if present)
[announce] Since SMF 2.0 has been released in beta, I have ported the shoutbox to work on the beta version.
PLEASE NOTE! SMF 2.0 is still a beta, and this port is quite simple (and thus may not account for the full range of differences between 1.1 and 2.0). I will provide support, but I can't guarantee it will work.
This is not an official release.
**EDIT: Please see main mod page for "official" release.
Nneonneo .. respect..
Also the history problem is solved .. thnx
Then my last question:
I did this: http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
And made no mistakes (i think) .. but i can not select the smileys. also its not sliding.
Open en close don't work ?
It's on the portal and on the forum of my site.
www.hotrodpage.nl and http://www.hotrodpage.nl/index.php?action=forum
Would you be so kind to look what goes wrong.. ?
or anny other sugestions..
Regards Hotrod
1)I also would like to know if it is poossibile set the history that save only 1 or 2 days so as not to have a large database
2) I did not understand where to put this :
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
it's the problem
Thank you all, if you need me to make me a translation or other whistle lol
@hotrod: It's very minor; there's an extra " after animatedcollapse.js.
@Mystiquo: Put that code at the very top of yshout.js.
Nothing to do but nothing I tried
If you want to contact me msn you step into my file as an audit trail together
I am sorry but where do you mean?
Quote@hotrod: It's very minor; there's an extra " after animatedcollapse.js.
Is that in the index or where els..? On the forum or portal?
Thnx again.. ;)
After upgrading to the lates version of SMF and the shoutbox I get the following error
Call to undefined function: () in /home/content/*********/html/smf/yshout/yshout.php on line 771
I installed a fresh copy of SMF and I still get the same error.
Any idea what would be causing this?
I've one trouble for a long time and intend to forget it.
But now it happens oftenly then i'll ask a question, please.
Overall the shoutbox is very fine, except that sometime
it gone for awhile (no any shout text) only have the line
"History Commands ปิดเสียง ExtendedHistory HideAdminLinks ReturnToShoutbox"
and the text box input , button only.
And then for ten seconds it comes again . Why?
(http://img141.imageshack.us/img141/7840/psk04wq2.jpg)
then
(http://img136.imageshack.us/img136/2830/psk05ic6.jpg)
This can happen for a couple times in one hour.
var floodTime = 1000;
var refreshTime = 150;
Quote from: Mystiquo on March 19, 2008, 09:15:41 AM
Nothing to do but nothing I tried
If you want to contact me msn you step into my file as an audit trail together
up
@hotrod: index.template.php, I think.
@waremock: Try the version made specifically for 2.0 beta; this error is due to a change in SMF's function system, which is fixed in the special 2.0 version.
@pongsak: What is updateTimeout? It's possible that in some rare cases, the yshout.php script runs out of time before managing to send an update. Also consider seeing if there's any information in the server error log.
@Mystiquo: I don't quite understand the question "up"...
nneonneo does this work fully in SMF2?
To the best of my knowledge, it will work with 2.0.
I tested it (I'm using a custom theme for SMF2.x)
It does not work. Are there separate instructions for getting this on a SMF2.x theme? I just notice it saying shoutbox on the top in bold. Also does this increase the load on the server/forum pages globally?
Oops!!! I uploaded the wrong package >:(
Updated the SMF2 package, this time with the right version of yshout.php and related files...
Any page with the shoutbox loaded will have the shoutbox in auto-refresh mode, which by default refreshes every 25 seconds (the refresh is server-side, and in essence will update when someone makes a shout or 25 seconds elapses, whichever comes first). The effect on your server should be minimal.
Hi,
I cannot make this mod work.
I get the ...loading shoutbox... that doesn't load and this error in my error logs and the "Premature end of script headers:"
How can I fix this?
SMF 2.0 or 1.1.4?
SMF 2.0
Have you tried chmod'ding the script to 755? This is probably caused by mod_security disliking the permissions on the file.
Aye. Tried it with yshout.php. and with the yshout file.
Quote from: nneonneo on March 19, 2008, 10:14:09 PMWhat is updateTimeout? It's possible that in some rare cases, the yshout.php script runs out of time before managing to send an update. Also consider seeing if there's any information in the server error log.
-Updatetimeout = 20
-no error shows in error log. for the shout box.
@sipko: Nothing else? Just "Premature end of script headers"? Usually, the error message comes with some other thing (maybe "mod_security: permission denied, file is writable by group" or something). This doesn't give me much to go on. Try visiting the yshout/yshout.php file directly -- see if there's anything useful there.
@pongsak: Two things to try (since this problem won't occur all the time, it might be difficult to accurately pin it down):
1) decrease updateTimeout to 15 (or maybe 17); if your host happens to have the timeout at 20 seconds, this might cause the problem (default 60, but many hosts will set it lower for safety)
2) set gzipCompression to false, which prevents the shoutbox from trying to compress the output
Thanks, I'll try 15 first.
code at the very top of yshout.js. it's no good
whould you like see my yshout.js????
// Flood control time in milliseconds:
var floodTime = 1000;
// Time between refreshes (minimum) in milliseconds:
// Note that since 1.08, this option will have less of an effect on performance,
// hence the default value is very low :)
var refreshTime = 150;
// Check for duplicate instances?
// This can improve performance in some cases.
var checkDuplicates = false;
// Internet Explorer 7 has a bug (feature?) which causes extreme lag when
// moving between pages. This delay controls "false alarms"; the amount
// of time between detecting a page move and reloading the shoutbox.
// If it is too high, users may experience laggy shoutboxes.
// If it is too low, users may experience lag moving to a new page.
// This bug only affects Internet Explorer 7 (not previous versions)
var falseAlarmDelay = 5000;
// Don't edit below this line, unless you know what you are doing ;)
username = "";
var yshout_php=(board_url?board_url:'')+'/yshout/yshout.php';
// Set up Behaviour
var myrules = {
'#shout-form' : function(element){
element.onsubmit = function(){
return false;
}
},
'#shout-text' : function(element){
element.onkeypress = function(evt){
return onKP(element, evt);
}
element.onfocus = function() {
onF(element);
}
},
'#shout-button' : function(element){
element.onclick = function(){
doSend();
}
}
};
var guest;
Behaviour.register(myrules);
// onKeyPress event handler for the two textboxes
function onKP (element, evt) {
evt = (evt) ? evt : (window.event) ? event : null;
var charCode;
if (evt)
charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
if (charCode == 13 || charCode == 3) {
doSend();
return false;
}
}
// onFocus event handler for the two textboxes
function onF (element) {
element.value = "";
defocus(element);
}
// Clear the onFocus event handler and set the foreground color to black.
function defocus(element) {
element.onfocus = null;
element.style.color = null;
}
// Set off the AJAX call to load the chat form into the empty yShout div
function loadChat() {
if ($("yshout").style.display=="none") return;
if(checkDuplicates)
{
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*/);
}
window.onunload = delcookie;
if ($("yshout") && shoutFile != "") {
new ajax (yshout_php, {
postBody: 'reqtype=init&file=' + shoutFile,
update: $('yshout'),
onComplete: loadDone
});
}
}
function delcookie() {
delete_cookie("yShout_open");
}
// Re-apply Behaviour after the chat loads
function loadDone() {
setTimeout("Behaviour.apply()", 5);
setTimeout("setupChat()", 5);
}
var oldNameBackgroundColor, oldTextBackgroundColor;
function setupChat() {
startRefresh();
username = $("forum-name").value;
if($("forum-name").disabled) guest=false;
else guest=true;
}
function complex_escape(text) {
return escape(textToEntities(text.replace(/&#/g, "&#"))).replace(/\+/g, "%2B");
}
// Send the message
function doSend() {
if (guest) {
if($("forum-name").value=='')
{
alert("Please enter a username.");
return;
}
username=complex_escape($F("forum-name"));
set_cookie("username",username,20*365*24*3600);
var toShout = complex_escape($F("shout-text"));
floodControl();
new ajax (yshout_php, {
postBody: 'reqtype=shout&shout=' + toShout + '&file=' + shoutFile + '&username=' + username,
update: $('shouts'),
onComplete: shoutDone
});
return;
}
if (formValidate() && $("shout-text").value) {
var toShout = complex_escape($F("shout-text"));
floodControl();
new ajax (yshout_php, {
postBody: 'reqtype=shout&shout=' + toShout + '&file=' + shoutFile,
update: $('shouts'),
onComplete: shoutDone
});
}
}
function autoShout(theText) {
new ajax (yshout_php, {
postBody: 'reqtype=autoshout&shout=' + theText + '&file=' + shoutFile,
update: $('shouts'),
onComplete: shoutDone
});
}
function ajaxGet(args) {
new ajax (yshout_php+'?'+args, {
update: $('shouts'),
onComplete: shoutDone
});
}
function goTo(args) {
if(request) request.transport.abort();
document.location=yshout_php+'?'+args;
}
// Start refreshing the chat after a message has been sent
function shoutDone() {
startRefresh();
}
var refreshSet = false;
function startRefresh() {
if (!refreshSet) {
setTimeout("doRefresh()", refreshTime);
refreshSet = true;
}
}
function schedRefresh() {
if (refreshSet) {
setTimeout("doRefresh()", refreshTime);
}
}
// Validate the form to ensure that the fields are filled
function formValidate() {
var shoutText = $F("shout-text");
var textValid = true;
if (shoutText == "Shout text" || shoutText == "")
textValid = false;
if (!textValid) {
changeClass($("shout-text"), "shout-invalid");
$("shout-text").focus();
return false;
} else {
changeClass($("shout-text"), "shout-valid-shout");
}
return true;
}
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
if(get_cookie("shoutSound") == "true")
{
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
soundManager.setVolume('sound',0); // my addition line, you can remove it
soundManager.play('sound');
}
soundManager.play('sound')
}
oldShouts = $("shouts").innerHTML;
if($("yshout").style.display == "none") {refreshSet = false; return;};
set_cookie("yShout_open","true",3/*seconds*/);
request=new ajax (yshout_php, {
postBody: 'reqtype=refresh&file=' + shoutFile,
update: $('shouts'),
onComplete: schedRefresh
});
// IE7 kludge: Abort transfers before navigating away, otherwise IE waits for completion
for (i=0;i<document.links.length;i++){
if(document.links.getAttribute("href").substring(11,0) != "javascript:")
document.links.setAttribute("onactivate",function(){request.transport.abort();setTimeout("schedRefresh()",falseAlarmDelay);});
}
}
function floodControl() {
$("shout-text").disabled = true;
$("shout-text").value = "";
Form.disable($("shout-form"));
setTimeout("enableShout()", floodTime);
}
function enableShout() {
Form.enable($("shout-form"));
$("shout-text").value = "";
if(!guest) $("forum-name").disabled = true;
$("shout-text").disabled = false;
setTimeout('$("shout-text").focus()', 0);
}
function changeClass(element, newClass) {
element.className = newClass;
}
function set_cookie( name, value, expires, path, domain, secure )
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );
/*
if the expires variable is set, make the correct
expires time, the current script below will set
it for x number of days, to make it for hours,
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000;
}
var expires_date = new Date( today.getTime() + (expires) );
document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}
// this function gets the cookie, if it exists
function get_cookie( name ) {
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
function delete_cookie ( cookie_name )
{
var cookie_date = new Date ( ); // current date & time
cookie_date.setTime ( cookie_date.getTime() - 1 );
document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
}
Works for me. You have to get rid of the second soundManager.play('sound') line.
yshout.js:
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
// Flood control time in milliseconds:
var floodTime = 1000;
// Time between refreshes (minimum) in milliseconds:
// Note that since 1.08, this option will have less of an effect on performance,
// hence the default value is very low :)
var refreshTime = 150;
// Check for duplicate instances?
// This can improve performance in some cases.
var checkDuplicates = false;
// Internet Explorer 7 has a bug (feature?) which causes extreme lag when
// moving between pages. This delay controls "false alarms"; the amount
// of time between detecting a page move and reloading the shoutbox.
// If it is too high, users may experience laggy shoutboxes.
// If it is too low, users may experience lag moving to a new page.
// This bug only affects Internet Explorer 7 (not previous versions)
var falseAlarmDelay = 5000;
// Don't edit below this line, unless you know what you are doing ;)
username = "";
var yshout_php=(board_url?board_url:'')+'/yshout/yshout.php';
// Set up Behaviour
var myrules = {
'#shout-form' : function(element){
element.onsubmit = function(){
return false;
}
},
'#shout-text' : function(element){
element.onkeypress = function(evt){
return onKP(element, evt);
}
element.onfocus = function() {
onF(element);
}
},
'#shout-button' : function(element){
element.onclick = function(){
doSend();
}
}
};
var guest;
Behaviour.register(myrules);
// onKeyPress event handler for the two textboxes
function onKP (element, evt) {
evt = (evt) ? evt : (window.event) ? event : null;
var charCode;
if (evt)
charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
if (charCode == 13 || charCode == 3) {
doSend();
return false;
}
}
// onFocus event handler for the two textboxes
function onF (element) {
element.value = "";
defocus(element);
}
// Clear the onFocus event handler and set the foreground color to black.
function defocus(element) {
element.onfocus = null;
element.style.color = null;
}
// Set off the AJAX call to load the chat form into the empty yShout div
function loadChat() {
if ($("yshout").style.display=="none") return;
if(checkDuplicates)
{
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*/);
}
window.onunload = delcookie;
if ($("yshout") && shoutFile != "") {
new ajax (yshout_php, {
postBody: 'reqtype=init&file=' + shoutFile,
update: $('yshout'),
onComplete: loadDone
});
}
}
function delcookie() {
delete_cookie("yShout_open");
}
// Re-apply Behaviour after the chat loads
function loadDone() {
setTimeout("Behaviour.apply()", 5);
setTimeout("setupChat()", 5);
}
var oldNameBackgroundColor, oldTextBackgroundColor;
function setupChat() {
startRefresh();
username = $("forum-name").value;
if($("forum-name").disabled) guest=false;
else guest=true;
}
function complex_escape(text) {
return escape(textToEntities(text.replace(/&#/g, "&#"))).replace(/\+/g, "%2B");
}
// Send the message
function doSend() {
if (guest) {
if($("forum-name").value=='')
{
alert("Please enter a username.");
return;
}
username=complex_escape($F("forum-name"));
set_cookie("username",username,20*365*24*3600);
var toShout = complex_escape($F("shout-text"));
floodControl();
new ajax (yshout_php, {
postBody: 'reqtype=shout&shout=' + toShout + '&file=' + shoutFile + '&username=' + username,
update: $('shouts'),
onComplete: shoutDone
});
return;
}
if (formValidate() && $("shout-text").value) {
var toShout = complex_escape($F("shout-text"));
floodControl();
new ajax (yshout_php, {
postBody: 'reqtype=shout&shout=' + toShout + '&file=' + shoutFile,
update: $('shouts'),
onComplete: shoutDone
});
}
}
function autoShout(theText) {
new ajax (yshout_php, {
postBody: 'reqtype=autoshout&shout=' + theText + '&file=' + shoutFile,
update: $('shouts'),
onComplete: shoutDone
});
}
function ajaxGet(args) {
new ajax (yshout_php+'?'+args, {
update: $('shouts'),
onComplete: shoutDone
});
}
function goTo(args) {
if(request) request.transport.abort();
document.location=yshout_php+'?'+args;
}
// Start refreshing the chat after a message has been sent
function shoutDone() {
startRefresh();
}
var refreshSet = false;
function startRefresh() {
if (!refreshSet) {
setTimeout("doRefresh()", refreshTime);
refreshSet = true;
}
}
function schedRefresh() {
if (refreshSet) {
setTimeout("doRefresh()", refreshTime);
}
}
// Validate the form to ensure that the fields are filled
function formValidate() {
var shoutText = $F("shout-text");
var textValid = true;
if (shoutText == "Shout text" || shoutText == "")
textValid = false;
if (!textValid) {
changeClass($("shout-text"), "shout-invalid");
$("shout-text").focus();
return false;
} else {
changeClass($("shout-text"), "shout-valid-shout");
}
return true;
}
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
if(get_cookie("shoutSound") == "true")
{
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
//soundManager.setVolume('sound',0); // my addition line, you can remove it
soundManager.play('sound');
}
//soundManager.play('sound');
}
oldShouts = $("shouts").innerHTML;
if($("yshout").style.display == "none") {refreshSet = false; return;};
set_cookie("yShout_open","true",3/*seconds*/);
request=new ajax (yshout_php, {
postBody: 'reqtype=refresh&file=' + shoutFile,
update: $('shouts'),
onComplete: schedRefresh
});
// IE7 kludge: Abort transfers before navigating away, otherwise IE waits for completion
for (i=0;i<document.links.length;i++){
if(document.links[i].getAttribute("href").substring(11,0) != "javascript:")
document.links[i].setAttribute("onactivate",function(){request.transport.abort();setTimeout("schedRefresh()",falseAlarmDelay);});
}
}
function floodControl() {
$("shout-text").disabled = true;
$("shout-text").value = "";
Form.disable($("shout-form"));
setTimeout("enableShout()", floodTime);
}
function enableShout() {
Form.enable($("shout-form"));
$("shout-text").value = "";
if(!guest) $("forum-name").disabled = true;
$("shout-text").disabled = false;
setTimeout('$("shout-text").focus()', 0);
}
function changeClass(element, newClass) {
element.className = newClass;
}
function set_cookie( name, value, expires, path, domain, secure )
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );
/*
if the expires variable is set, make the correct
expires time, the current script below will set
it for x number of days, to make it for hours,
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000;
}
var expires_date = new Date( today.getTime() + (expires) );
document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}
// this function gets the cookie, if it exists
function get_cookie( name ) {
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
function delete_cookie ( cookie_name )
{
var cookie_date = new Date ( ); // current date & time
cookie_date.setTime ( cookie_date.getTime() - 1 );
document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
}
Cant get it to work actually. Are the manually theme instructions the same on 2.x as 1.x? (On the mod page)
Is it the shoutbox installed at http://www.egadforums.com/? If so, then here's the problem: the yshout folder is missing.
Quote from: nneonneo on March 20, 2008, 05:47:38 PM
Is it the shoutbox installed at http://www.egadforums.com/? If so, then here's the problem: the yshout folder is missing.
I recently disabled it because it was not displaying I will enable it. :P But that folder was present chmodded correctly.
Disable gzipCompression. Also, there is some sort of warning:
http://egadforums.com/yshout/yshout.php
OK ill look into it in a few hours. Weird because thats a fresh copy of subs.php too.
OK its not subs.php I think its leading to boardindex.php anyway is there a way (once I get the error resolved) to make it so it only shows on the boardindex?
Yes. Instead of installing the <div id="yshout"... piece to index.template.php, install it to BoardIndex.template.php.
Quote from: nneonneo on March 20, 2008, 08:00:27 PM
Yes. Instead of installing the <div id="yshout"... piece to index.template.php, install it to BoardIndex.template.php.
Ahh thanks I thought it may cause an error because you put (in the index.template.php file!)
Anyway I'm it turns out the error is from something at my hosts end with subs.php. Hopefully I wont notice any speed impact installing this. It seems like an awesome mod. :D I would definitely recommend it.
i want to put the shoutbox on a separate page in boardindex.template.php
which code i use?
i want to display the shoutbox only the main page.
thank you
On a separate page, or on the board index?
For the former, see http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341
For the latter, install the second piece of code (on the main mod page) to BoardIndex.template.php instead of index.template.php.
i want o display the shoutbox only the main page
OK, then follow the second option.
i put the second piece of code in boardindex.template but the shoutbox not loaded.
display:
shoutbox loaded
Is this the default theme? If so, have you removed the existing modifications in index.template.php?
is default theme
but i make installation like a custom theme because i want to change colors letters ...
Err, you can always just edit Themes/default/[css/]yshout-style.css...
i try it but nothing happwn
Alright, let me know your forum address, and I'll stop by to check it out.
Wow, nneonneo, You are very generous and patient with all of us and that says much for your personal character. I thought you should know I noticed and thank you. Now , done with the kisses and time to get your brain working on a new and interesting challenge. Ready? hehe
2 issues for me...
#1 I use the shout box in my tiny portal center block. It shows up on all the pages in the forum at the top under the menu bar. This however has caused a real problem with my member map page. All the pins end up above the map (misaligned!) So it would seem that the shout box has caused the page to start at a position that the normal map page had not expected? Or else the module for the member map has not been coded right.
I know having the shout box causes other pages in a different theme to be misaligned as well... ie: Gallery headings are not correctly lined up well and I think the links page too. Anyway that led me to believe that it was perhaps a missing code or dash or dot or whatever it is you program people need in the shout box code and not the actual mods pages codes. Big deep breath,... soooooo. Can you help me figure out how to either ask tiny portal to not show the shout box on the member map page OR how to fix this little bug in the modification of that page? I don't mind making it unavailable in that page.
#2 - This one is going to really tax you. hehe
Because I have it in a center block and because I dont use the right and left side blocks in the actual forum pages, my shout box becomes very long with much blank space on those pages. My question therefore is, is there a way that on those particular pages that I could show an image in that blank space area?
If you are not offended by adult content please feel free to pop in and see for yourself what and why I wish to do this. www.frogn.com
I realize I'm asking a lot here and if it is too much please feel free to say so. FYI .. I know nothing about java script. Although am learning php.
Thank you for your time.
NIagra
http://www.firstradio.gr
Now it works because i put the code in index.template
Nice Work for Beta 2.0
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
if(get_cookie("shoutSound") == "true")
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
soundManager.setVolume('sound',0); // my addition line, you can remove it
soundManager.play('sound');
}
oldShouts = $("shouts").innerHTML;
if($("yshout").style.display == "none") {refreshSet = false; return;};
set_cookie("yShout_open","true",3/*seconds*/);
request=new ajax (yshout_php, {
postBody: 'reqtype=refresh&file=' + shoutFile,
update: $('shouts'),
onComplete: schedRefresh
});
Done but not go well, then I tried to change this
SoundManager.play ( 'sound');
In this
SoundManager.onstop ( 'sound');
Now if I click no sound on the sound not feel but if I put the sound I have to refresh the page
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
if(get_cookie("shoutSound") == "true")
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
soundManager.setVolume('sound',0); // my addition line, you can remove it
soundManager.onstop('sound');
}
oldShouts = $("shouts").innerHTML;
if($("yshout").style.display == "none") {refreshSet = false; return;};
set_cookie("yShout_open","true",3/*seconds*/);
request=new ajax (yshout_php, {
postBody: 'reqtype=refresh&file=' + shoutFile,
update: $('shouts'),
onComplete: schedRefresh
});
@Niagra: The member map is using onload events to position the pins. The shoutbox, however, loads after the page does, so the pins are placed before the shoutbox is completely setup.
The easiest thing to do is simply to disable the shoutbox on that page.
In yshout/js/yshout.js, under
function loadChat() {
if ($("yshout").style.display=="none") return;
add
if(document.location.href.indexOf("action=mm")!=-1) {$("yshout").style.display="none"; return;}
and the shoutbox will simply not load on that page.
For the second problem, presumably TinyPortal isn't even active on the other pages -- have you put the shoutbox in TP and in index.template.php? If so, then it is quite easy to make this change -- you just edit index.template.php, set a small table tag with two columns, putting the shoutbox in the left and whatever you want in the right.
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="50%">!!SHOUTBOXCODE!!</td>
<td>
!!OTHERTHING!!
</td>
</tr>
</table>
@Mystiquo: why did you need to use onstop?
I use onstop at least when I hit no sound remains without refresh the page, but unfortunately I have to put it back to refresh the page, I have the practical effect as opposed to the first.
I wanted to know firefox and ie7 not have the same color why?
Ie7 and then it is very slow to open the pages you can help me?
FF and IE7 have different colours? How different (and what colors are different)?
I posted my entire yshout.js file, which works fine (for me) a few posts ago:
http://www.simplemachines.org/community/index.php?topic=137508.msg1475479#msg1475479
The shoutbox works fine, but I got many errors like these in the log:
8: Undefined index: yshout_shoutbox
File: /home/davematt/public_html/forum/Themes/default/Display.template.php (eval?)
Linea: 301
8: Undefined index: yshout_loading
File: /home/davematt/public_html/forum/Themes/default/BoardIndex.template.php (eval?)
Linea: 302
Is that normal?
Not really, but they are easily fixed. Does the shoutbox appear to have no text? If so, then you simply have to copy Themes/default/languages/Modifications.english.php to Modifications.<yourlanguage>.php.
// Flood control time in milliseconds:
var floodTime = 1000;
// Time between refreshes (minimum) in milliseconds:
// Note that since 1.08, this option will have less of an effect on performance,
// hence the default value is very low :)
var refreshTime = 150;
// Check for duplicate instances?
// This can improve performance in some cases.
var checkDuplicates = false;
// Internet Explorer 7 has a bug (feature?) which causes extreme lag when
// moving between pages. This delay controls "false alarms"; the amount
// of time between detecting a page move and reloading the shoutbox.
// If it is too high, users may experience laggy shoutboxes.
// If it is too low, users may experience lag moving to a new page.
// This bug only affects Internet Explorer 7 (not previous versions)
var falseAlarmDelay = 5000;
// Don't edit below this line, unless you know what you are doing ;)
username = "";
var yshout_php=(board_url?board_url:'')+'/yshout/yshout.php';
// Set up Behaviour
var myrules = {
'#shout-form' : function(element){
element.onsubmit = function(){
return false;
}
},
'#shout-text' : function(element){
element.onkeypress = function(evt){
return onKP(element, evt);
}
element.onfocus = function() {
onF(element);
}
},
'#shout-button' : function(element){
element.onclick = function(){
doSend();
}
}
};
var guest;
Behaviour.register(myrules);
// onKeyPress event handler for the two textboxes
function onKP (element, evt) {
evt = (evt) ? evt : (window.event) ? event : null;
var charCode;
if (evt)
charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
if (charCode == 13 || charCode == 3) {
doSend();
return false;
}
}
// onFocus event handler for the two textboxes
function onF (element) {
element.value = "";
defocus(element);
}
// Clear the onFocus event handler and set the foreground color to black.
function defocus(element) {
element.onfocus = null;
element.style.color = null;
}
// Set off the AJAX call to load the chat form into the empty yShout div
function loadChat() {
if ($("yshout").style.display=="none") return;
if(checkDuplicates)
{
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*/);
}
window.onunload = delcookie;
if ($("yshout") && shoutFile != "") {
new ajax (yshout_php, {
postBody: 'reqtype=init&file=' + shoutFile,
update: $('yshout'),
onComplete: loadDone
});
}
}
function delcookie() {
delete_cookie("yShout_open");
}
// Re-apply Behaviour after the chat loads
function loadDone() {
setTimeout("Behaviour.apply()", 5);
setTimeout("setupChat()", 5);
}
var oldNameBackgroundColor, oldTextBackgroundColor;
function setupChat() {
startRefresh();
username = $("forum-name").value;
if($("forum-name").disabled) guest=false;
else guest=true;
}
function complex_escape(text) {
return escape(textToEntities(text.replace(/&#/g, "&#"))).replace(/\+/g, "%2B");
}
// Send the message
function doSend() {
if (guest) {
if($("forum-name").value=='')
{
alert("Please enter a username.");
return;
}
username=complex_escape($F("forum-name"));
set_cookie("username",username,20*365*24*3600);
var toShout = complex_escape($F("shout-text"));
floodControl();
new ajax (yshout_php, {
postBody: 'reqtype=shout&shout=' + toShout + '&file=' + shoutFile + '&username=' + username,
update: $('shouts'),
onComplete: shoutDone
});
return;
}
if (formValidate() && $("shout-text").value) {
var toShout = complex_escape($F("shout-text"));
floodControl();
new ajax (yshout_php, {
postBody: 'reqtype=shout&shout=' + toShout + '&file=' + shoutFile,
update: $('shouts'),
onComplete: shoutDone
});
}
}
function autoShout(theText) {
new ajax (yshout_php, {
postBody: 'reqtype=autoshout&shout=' + theText + '&file=' + shoutFile,
update: $('shouts'),
onComplete: shoutDone
});
}
function ajaxGet(args) {
new ajax (yshout_php+'?'+args, {
update: $('shouts'),
onComplete: shoutDone
});
}
function goTo(args) {
if(request) request.transport.abort();
document.location=yshout_php+'?'+args;
}
// Start refreshing the chat after a message has been sent
function shoutDone() {
startRefresh();
}
var refreshSet = false;
function startRefresh() {
if (!refreshSet) {
setTimeout("doRefresh()", refreshTime);
refreshSet = true;
}
}
function schedRefresh() {
if (refreshSet) {
setTimeout("doRefresh()", refreshTime);
}
}
// Validate the form to ensure that the fields are filled
function formValidate() {
var shoutText = $F("shout-text");
var textValid = true;
if (shoutText == "Shout text" || shoutText == "")
textValid = false;
if (!textValid) {
changeClass($("shout-text"), "shout-invalid");
$("shout-text").focus();
return false;
} else {
changeClass($("shout-text"), "shout-valid-shout");
}
return true;
}
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
soundManager.play('sound')
}
if(get_cookie("shoutSound") == "true")
{
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
soundManager.setVolume('sound',0); // my addition line, you can remove it
soundManager.onstop('sound');
}
oldShouts = $("shouts").innerHTML;
if($("yshout").style.display == "none") {refreshSet = false; return;};
set_cookie("yShout_open","true",3/*seconds*/);
request=new ajax (yshout_php, {
postBody: 'reqtype=refresh&file=' + shoutFile,
update: $('shouts'),
onComplete: schedRefresh
});
// IE7 kludge: Abort transfers before navigating away, otherwise IE waits for completion
for (i=0;i<document.links.length;i++){
if(document.links[i].getAttribute("href").substring(11,0) != "javascript:")
document.links[i].setAttribute("onactivate",function(){request.transport.abort();setTimeout("schedRefresh()",falseAlarmDelay);});
}
}
function floodControl() {
$("shout-text").disabled = true;
$("shout-text").value = "";
Form.disable($("shout-form"));
setTimeout("enableShout()", floodTime);
}
function enableShout() {
Form.enable($("shout-form"));
$("shout-text").value = "";
if(!guest) $("forum-name").disabled = true;
$("shout-text").disabled = false;
setTimeout('$("shout-text").focus()', 0);
}
function changeClass(element, newClass) {
element.className = newClass;
}
function set_cookie( name, value, expires, path, domain, secure )
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );
/*
if the expires variable is set, make the correct
expires time, the current script below will set
it for x number of days, to make it for hours,
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000;
}
var expires_date = new Date( today.getTime() + (expires) );
document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}
// this function gets the cookie, if it exists
function get_cookie( name ) {
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
function delete_cookie ( cookie_name )
{
var cookie_date = new Date ( ); // current date & time
cookie_date.setTime ( cookie_date.getTime() - 1 );
document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
}
Mystiquo, can you please try the yshout.js I posted?
Error when uploading to SMF 2.0 beta 3:
An Error Has Occurred!
The package you tried to upload either is not a valid package or has become corrupted.
Are you sure you are using the SMF2 version? I've seen that error come up when attempting to use the 1.1.4 version of the shoutbox with SMF 2.
Quote from: nneonneo on March 22, 2008, 03:23:20 PM
Are you sure you are using the SMF2 version? I've seen that error come up when attempting to use the 1.1.4 version of the shoutbox with SMF 2.
No....
Well I downloaded "SB_1.13_SMF2.tgz".
Hello,
I've installed it for 2.0 .
But I do not see any control panel for it in Admin area like it used to. Also, in shoutbox all it says "...loading shoutbox..."
Please suggest.
Thanks.
@jossanaijr: Have you ever been able to install .tgz packages? If you haven't tried, or haven't been able to, then I suggest using the attached package.
@xyxis_fahim: Assuming www.truforum.org is the site you installed it on, the JS files don't seem to be installed. Not sure why, but the way to fix it is to upload them again (js folder in the package goes in yshout/ folder). The file
http://www.truforum.org/yshout/js/yshout.js
should be accessible.
Ok, uploaded without problem.
But I'm the message "loading shoutbox" is freezing. I will try to find the problem.
Thanks.
Good to know it works. The SMF 2.0 version is probably going to have a few issues, mainly since it doesn't have the benefit of being tested on as many configurations. I'm hoping that soon I can have the majority of them correctly resolved.
Ok. Thanks.
Thanks nneonneo ,
I manually uploaded the files, now shoubox shows up properly. However if I input anything it encouters following error:
"Fatal error: Function name must be a string in /home/truforum/public_html/yshout/yshout.php on line 771"
Thanks.
Huh! I thought I fixed that...are you using SMF2, and if so, did you use the SMF2 package from the main mod page?
Yes sir.
I will try to reinstall it, if it makes changes.
Works ok I changed the code
if (set_cookie('shoutSound','true',3600*24))
{
delete_cookie('shoutSound');
}
so defaulted does sound and then you can remove.
1) the colors remain different ie7 and ff, I have a specific theme black and so I changed some strings such as # 000,
And if I click is that IE7 FF shout without writing anything window I become white, FF then I do not see what I write because it is always white IE7 rather see why I write in red
2)You can explain all the strings of what color they are and what each change?
3)I also wanted to know the story as hard and if I can set this
Thanks Many compliments I still
Post your CSS, I will take a look. As for #2, what do you mean by "story as hard"?
Hey I got it to working, But where do I control it in admin panel?
Sorry.
Thanks.
There is no admin panel component -- this is a deliberate design decision on my part. Most of what you'll want to do is in the yshout/yshout.php file -- change the settings there.
yshout-style.css
/* Default theme style. Modify to your taste. */
#yshout {
font-size: 13px;
}
#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: #FFFFFF;
}
#yshout .adminlink {
font-size: 6pt;
color: #141414;
}
#forum-name, #shout-text, #shout-button {
font-size: 13px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #FFFFFF;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #FFFFFF;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
yshout.php
if (in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post))
echo '
<form id="shout-form" name="shout_form" action="#">
<fieldset>
<input id="forum-name" style="color: #FF0000;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" name="shout_text" style="color: #FF0000;" maxlength="',$maxShoutChars,'" value="',$txt['yshout_p_banned'],'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_banned'],'" disabled="true" />
</fieldset>
</form>';
elseif (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false)
echo '
<form id="shout-form" name="shout_form" action="#">
<fieldset>
<input id="forum-name" style="color: #FF0000;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" name="shout_text" style="color: #FF0000;" maxlength="',$maxShoutChars,'" value="',$maintenance,'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
elseif (!$user['is_logged'] && !$allowGuestsPost)
echo '
<form id="shout-form" name="shout_form" action="#">
<fieldset>
<input id="forum-name" style="color: #FF0000;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" name="shout_text" style="color: #FF0000;" maxlength="',$maxShoutChars,'" value="',$txt['yshout_no_guests'],'" type="text" disabled="true" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
else
{
echo '<form id="shout-form" name="shout_form" action="#">
<fieldset>';
if (!$user['is_logged'] && $autoGuestName===false)
echo '
<input id="forum-name" style="color: #FF0000;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" />';
else
echo '
<input id="forum-name" style="color: #FF0000;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />';
echo '
<input id="shout-text" name="shout_text" style="color: #FF0000;" maxlength="',$maxShoutChars,'" value="" type="text" />
<input id="shout-button" type="button" value="',$txt['yshout_shout_button'],'" />
</fieldset>
</form>';
I would like to know how long the story, and if I can setting it
History you mean? The history length is unlimited. There's no automatic facility to set it, and most users won't have to unless the history file gets very, very big.
You need to post the CSS from the custom theme or whatever you are using.
cerberus style.css
/* Normal, standard links. */
a:link
{
color: #d0d0ff;
text-decoration: none;
}
a:visited
{
color: #d0d0e0;
text-decoration: none;
}
a:hover
{
color: #f0f0f0;
text-decoration: underline;
}
/* Navigation links - for the link tree. */
.nav , .nav:link , .nav:visited
{
font-family: tahoma, helvetica, serif;
font-size: 8pt;
color: #e0e0e0;
font-weight: bold;
text-decoration: none;
}
.nav:hover
{
font-family: tahoma, helvetica, serif;
font-size: 8pt;
font-weight: bold;
color: #fff080;
text-decoration: none;
}
/* Tables should show empty cells. */
table
{
empty-cells: show;
}
/* By default (td, body..) use Tahoma in black. */
body, td, th
{
color: #ffffff;
font-size: small;
font-family: tahoma, helvetica, serif;
}
/* The main body of the entire forum. */
body
{
background-color: #000000;
margin: 0px;
padding: 5px 20px 5px 20px;
}
/* Input boxes - just a bit smaller than normal so they align well. */
input,button
{
border: solid 1px #909090;
background-color: #282525;
font-size: 9pt;
color: #d0d0d0;
font-family: tahoma, helvetica, serif;
}
/* All input elements that are checkboxes or radio buttons. */
textarea
{
border: solid 1px #909090;
background-color: #282525;
font-size: 9pt;
color: #d0d0d0;
font-family: tahoma, helvetica, serif;
}
/* All input elements that are checkboxes or radio buttons. */
input.check
{
border: solid 0px #909090;
background-color: transparent;
color: black;
}
/* Selects are a bit smaller, because it makes them look even better 8). */
select
{
background-color: #202020;
font-size: 8pt;
font-weight: normal;
color: white;
font-family: tahoma, helvetica, serif;
}
/* Standard horizontal rule.. ([hr], etc.) */
hr, .hrcolor
{
height: 1px;
border: 0;
color: #808080;
background-color: #000000;
}
/* A quote, perhaps from another post. */
.quote
{
background-color: #000000;
border: 1px solid #a0a0a0;
padding: 6px;
font-size: x-small;
}
/* A code block - maybe even PHP ;). */
.code
{
color: #909090;
background-color: #000000;
border: 1px solid #d0d0d0;
padding: 1px;
font-family: "courier new", helvetica, "times new roman", serif;
font-size: x-small;
width: 99%;
margin: 1px auto 1px auto;
white-space: nowrap;
overflow: auto;
}
.forum_name
{
color: #e0e0e2;
font-size: 14px;
font-weight: bold;
}
.mybox
{
border-top: solid 1px #454545;
border-left: solid 1px #454545;
border-right: solid 1px black;
border-bottom: solid 1px black;
background-color: #282828;
padding: 5px;
margin-bottom: 10px;
}
.mybox2
{
border-top: solid 1px #555555;
border-left: solid 1px #555555;
border-right: solid 1px black;
border-bottom: solid 1px black;
background-color: #404040;
padding: 5px;
margin-bottom: 10px;
}
.bar_name
{
color: #c0c0c0;
font-size: 10px;
padding-left: 6px;
}
/* The "Quote:" and "Code:" header parts... */
.quoteheader, .codeheader
{
color: #ffffff;
text-decoration: none;
font-style: normal;
font-weight: bold;
font-size: x-small;
}
/* Generally, those [?] icons. This makes your cursor a help icon. */
.help
{
cursor: help;
}
/* /me uses this a lot. (emote, try typing /me in a post.) */
.meaction
{
color: #ff0000;
}
/* The main post box - this makes it as wide as possible. */
.editor
{
width: 96%;
}
/* Highlighted text - such as search results. */
.highlight
{
background-color: #807000;
font-weight: bold;
color: #ffffff;
}
/* Alternating backgrounds for posts, and several other sections of the forum. */
.windowbg
{
font-family: tahoma, helvetica, serif;
color: #ffffff;
background-color: #404040;
border-top: solid 1px #606060;
border-left: solid 1px #606060;
border-right: solid 1px black;
border-bottom: solid 1px black;
}
.windowbg2
{
font-family: tahoma, helvetica, serif;
color: #ffffff;
background-color: #505050;
border-top: solid 1px #707070;
border-left: solid 1px #707070;
border-right: solid 1px black;
border-bottom: solid 1px black;
}
.windowbg_sticky
{
font-family: tahoma, helvetica, serif;
color: #ffffff;
background-color: #454545;
border-top: solid 1px #606060;
border-left: solid 1px #606060;
border-right: solid 1px black;
border-bottom: solid 1px black;
}
.windowbg2_sticky
{
font-family: tahoma, helvetica, serif;
color: #ffffff;
background-color: #555555;
border-top: solid 1px #707070;
border-left: solid 1px #707070;
border-right: solid 1px black;
border-bottom: solid 1px black;
}
.windowbg_locked
{
font-family: tahoma, helvetica, serif;
color: #ffffff;
background-color: #353535;
border-top: solid 1px #606060;
border-left: solid 1px #606060;
border-right: solid 1px black;
border-bottom: solid 1px black;
}
.windowbg2_locked
{
font-family: tahoma, helvetica, serif;
color: #ffffff;
background-color: #454545;
border-top: solid 1px #707070;
border-left: solid 1px #707070;
border-right: solid 1px black;
border-bottom: solid 1px black;
}
.windowbg_sticky_locked
{
font-family: tahoma, helvetica, serif;
color: #ffffff;
background-color: #4a4a4a;
border-top: solid 1px #606060;
border-left: solid 1px #606060;
border-right: solid 1px black;
border-bottom: solid 1px black;
}
.windowbg2_sticky_locked
{
font-family: tahoma, helvetica, serif;
color: #ffffff;
background-color: #5a5a5a;
border-top: solid 1px #707070;
border-left: solid 1px #707070;
border-right: solid 1px black;
border-bottom: solid 1px black;
}
/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature
{
}
/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */
.titlebg, tr.titlebg td,.titlebg2, tr.titlebg2 td
{
background-color: #303030;
font-weight: bold;
color: #e0e0e0;
font-style: normal;
}
.titlebg a:hover,.titlebg2 a:hover
{
color: #f0e080;
}
/* This is used for categories, page indexes, and several other areas in the forum. */
.catbg, .catbg3
{
background-color: #383838;
}
/* This is used for a category that has new posts in it... to make it light up. */
.catbg2
{
}
.catbg, .catbg2,.catbg3
{
font-weight: bold;
color: #ffffff;
}
.catbg:link , .catbg2:link, .catbg3:link
{
font-weight: bold;
color: #ffffff;
}
.catbg:hover , .catbg2:hover, .catbg3:hover
{
font-weight: bold;
}/* This is used for tables that have a grid/border background color (such as the topic listing.) */
.bordercolor
{
border-top: solid 1px #454545;
border-left: solid 1px #454545;
border-right: solid 1px black;
border-bottom: solid 1px black;
background-color: #303030;
}
/* This is used on tables that should just have a border around them. */
.tborder
{
border-top: solid 1px #454545;
border-left: solid 1px #454545;
border-right: solid 1px black;
border-bottom: solid 1px black;
background-color: #303030;
padding: 0px;
}
/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext
{
font-size: 8pt;
font-family: tahoma, helvetica, serif;
}
/* Posts and personal messages displayed throughout the forum. */
.post, .personalmessage
{
width: 100%;
overflow: auto;
line-height: 1.3em;
}
/* All the signatures used in the forum. If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature
{
width: 100%;
overflow: auto;
padding-bottom: 3px;
line-height: 1.3em;
}
.normaltext
{
font-size: small;
}
.largetext
{
font-size: large;
}
/* No image should have a border when linked */
a img{
border: 0;
}
/* The AJAX notifier */
#ajax_in_progress
{
background: #363282;
color: white;
text-align: center;
font-weight: bold;
font-size: 18pt;
padding: 3px;
width: 100%;
position: fixed;
top: 0;
left: 0;
}
But if I want to wipe the history I do then? I would be happier if we could set example 2 days
Erm, I need the index.template.php css, which you modified for yshout. What you posted has no yshout css content.
As for history: it's rather expensive to have to truncate the history every time someone shouts, because it basically means that the server has to rewrite the whole history file each time. I could suggest an easier fix: have a fixed number of shouts to keep in the history, e.g. 10000 shouts (which should be plenty enough, but yet should take no more than 1MB to store, tops).
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">soundManager.url="',$boardurl,'/yshout/soundmanager2.swf";
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function() {
soundManager.createSound("sound", "', $boardurl, '/yshout/sound.mp3");
}</script>
<style type="text/css">
#yshout {
font-size: 13px;
}
#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: #FF0000;
}
#yshout .adminlink {
font-size: 6pt;
color: #FF0000;
}
#forum-name, #shout-text, #shout-button {
font-size: 12px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #FFFFFF;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #FFFFFF;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
</style>';
// YSHOUT END
For th history how do i do it?
thanks
thanks
To change the bg color when entering an invalid shout, change
.shout-invalid {
background: #FFFDD1;
}
As for the differences, that's IE7 being dumb. Nothing I can really do about it.
History: just edit truncateChat to appropriately truncate the history file too. A possible solution:
function truncateChat($chatFile, $logDir, $max_lines) {
$chatFile = checkName($chatFile);
$chatPath = "$logDir/$chatFile";
$fileContents = '';
if (file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$lines = explode("\n", $fileContents);
if(count($lines) > $max_lines) {
$newText = substr($fileContents, strpos($fileContents, "\n") + 1);
$handle = fopen($chatPath, "w");
fputs($handle, $newText);
fclose($handle);
// History
$oldText = substr($fileContents, 0, strpos($fileContents, "\n") + 1);
$handle = fopen("$logDir/history.$chatFile", "a");
fputs($handle, $oldText);
fclose($handle);
}
if (file_exists("$logDir/history.$chatFile"))
$fileContents = file_get_contents("$logDir/history.$chatFile");
$lines = explode("\n", $fileContents);
if(count($lines) > 10000) {
$newText = substr($fileContents, strpos($fileContents, "\n") + 1);
$handle = fopen("$logDir/history.$chatFile", "w");
fputs($handle, $newText);
fclose($handle);
}
}
OK got it on my SMF2 :D
So I banned myself first thing... lol How do I unban myself now. I checked the FTP files and nothing contained by username on it.
Also how do I disable guest shouting?
Remove your name from yshout/_banlist.php, or replace it with a clean copy:
<?php
$ban_ips_readpost = array (
);
$ban_ips_post = array (
);
$ban_names_readpost = array (
);
$ban_names_post = array (
);
$maintenance = false;
?>
By the way: what did you do to make it work?
Increased the memory usage. :P
Also ingnore the guest posting thing above. I did not really look into the code yet. And wow it looks very neat. :P
// Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=false;
Very well done!
Another thing Im trying to make this appear in the info center. By "Shout Box" I want it to be displayed with a titlebg background like everything else. How would I go about doing that?
// 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
Put this somewhere:
// YSHOUT HERE
echo '<tr>
<td class="titlebg" colspan="2">Shoutbox</td>
</tr><tr>
<td class="windowbg2" width="100%" colspan="2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr>';
// YSHOUT END
The best spot is probably right above
echo '
</table>
</div>
</div>';
in BoardIndex.template.php.
Quote from: nneonneo on March 23, 2008, 08:19:25 PM
Put this somewhere:
// YSHOUT HERE
echo '<tr>
<td class="titlebg" colspan="2">Shoutbox</td>
</tr><tr>
<td class="windowbg2" width="100%" colspan="2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr>';
// YSHOUT END
The best spot is probably right above
echo '
</table>
</div>
</div>';
in BoardIndex.template.php.
Wowser amazing. :D I got it. Its also working fine. Great mod. Probably one of the first mods I will be using for a bit. :P Hopefully this was my last question. :)
Wait no... I'm back! :D
Is there anyway to manage the shouts displayed by default.
Manage as in how?
Well not manage but just display the number of shouts at a time...
Searched all the settings...
max_lines
Quote from: nneonneo on March 23, 2008, 11:13:55 PM
max_lines
I tried that but perhaps its not working. Lets try I set 5 lines... it will show 10 shouts.
Did a hard refresh too.
Clear the shoutbox -- it might need a few clears to properly handle the change.
I have two questions:
1. From time to time i have on my server(not the forum error log) that error:
[Tue Mar 25 15:22:22 2008] [error] [client 87.*.*.*] Execute of /home/xxx/public_html/yshout/yshout.php stopped because of load 25.21
2. My shout box shows on every page, even on the forum's admin page. How do i make it to shows on main forum's page only?
I'm using some extra code of yours:
QuoteNow, you can also opt to put the shoutbox in a info-center-esque block, by using
// YSHOUT HERE
echo '<br />
<div class="tborder" style="margin-top: 0;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center; ">',$txt['yshout_loading'],'</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr><td class="windowbg2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr></table>
</div>';
// YSHOUT ENDinstead of the supplied <div>
QuoteDid that all make sense? If you need any more assistance, feel free to ask :)
Thanks!
To show it only on the main forum page, put that code on BoardIndex.template.php.
As for the error -- I don't know, but you may want to lower $updateTimeout in yshout/yshout.php.
Quote from: nneonneo on March 20, 2008, 02:38:11 AM
@pongsak: Two things to try (since this problem won't occur all the time, it might be difficult to accurately pin it down):
1) decrease updateTimeout to 15
2) set gzipCompression to false
I do both but still the same.
Nothing in the server error log, script is randomly failing to show the chats...I'm stumped (and dead tired). I think a visit to your forum is in order. I will see to it tomorrow (or today -_- it is far too late here)
I have a trouble. I Put the Smiles, but when I clik on someone smile not shout the smile.
Sorry for my English
Quote from: nneonneo on March 26, 2008, 02:12:21 AM
Nothing in the server error log, script is randomly failing to show the chats...I'm stumped (and dead tired). I think a visit to your forum is in order. I will see to it tomorrow (or today -_- it is far too late here)
left if for a period, may be found.
Thanks
@Krato: Did you make the appropriate edits to yshout/yshout.php?
@pongsak: I think it is best that you PM me those details, and also a URL (I cannot remember it :'( )
Yes, I edit 4 times the sentence and another 4 times the another sentences, but the smile not shout
Quote from: nneonneo on March 25, 2008, 07:25:51 PM
To show it only on the main forum page, put that code on BoardIndex.template.php.
As for the error -- I don't know, but you may want to lower $updateTimeout in yshout/yshout.php.
Thanks a lot!
Hey guys, i put my chat on a seperate page, but i want it to go below the menubar. help? thanks.
http://www.codetalk.b3ta.org
@Krato: No idea, please post yshout.php (in code tags, please)
@Ricardo-san: In index.template.php are four blocks of code starting with "// YSHOUT HERE" and ending with "// YSHOUT END". Remove all of them. Next, follow the instructions for installing to a custom theme (see main mod page), and when it comes time to insert the yshout div, instead add this:
// YSHOUT HERE
global $txt;
echo '
<div class="tborder" style="margin-top: 0;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 5px 5px 5px 10px;">Shoutbox</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr><td class="windowbg2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr></table>
</div><br />';
// YSHOUT END
right before the end of either the theme_linktree function (to put it after the link tree) or after the template_menu function (to put it before the link tree). You may wish to add <br /> tags to adjust the layout.
If you only want it on the main page, and not every page, you should put that code in BoardIndex.template.php instead, right above /* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
and boards. (see below.) */
Hi, I can't seem to find a place to put it in at all. I just wanted to add it right under the Nav bar but it never seems to work right..
Hi! Is it possible to make the chat hide, just like it is with the smileys???
Stef.
nneonneo,
I just had my site temporarily pulled offline because it was hogging resources.
Im gonna assume that the cause was this:
http://www.simplemachines.org/community/index.php?topic=137508.msg879828#msg879828
I guess i missed that part and had the shotbox on every single page of my forum. LOL
So if i edit the script to what you have suggested in the above link, all should be better on resources, right?
also, is there anything else i can do to prevent this awesome script of yours from taxing CPU/ram resources??
@Normally: In the default theme, with the default position, etc., using upshrink will hide the shoutbox. To hide it in general would require some more code, which will depend on what hiding you want to do, etc.
@madman71: The newer revisions of the script allow users to open multiple shoutbox instances. This may not be desirable. Set checkDuplicates to true in yshout/js/yshout.js (hmm, I've forgotten about this as a perf improvement). That will re-enable that check, and prevent users from having more than one shoutbox open.
As for general performance: a PHP accelerator will make this script vastly more efficient, owing to the fact that it is loaded fairly frequently. Ask your host what the script timeout is, and set $updateTimeout to a few seconds less than that value. The script will run for exactly that length of time, and then quit (and be re-requested) if no new shouts occur during that time. This, unfortunately, will trade CPU usage for memory usage: the script will use less CPU (being requested much less often) but will use more memory (as many instances of it may be running at once). Different hosts have different limits on this.
In general, decreasing updateTimeout biases the script to use more CPU and less memory (and vice-versa). If you decrease updateTimeout to below about 10 seconds, please increase refreshTime in yshout/js/yshout.js (default 150 milliseconds, higher means a laggier shoutbox).
If you don't need a high refresh rate, it is safe to set refreshTime to about 10000 (10 seconds), and have updateTimeout to around 2-5 seconds. Your mileage may vary (wildly), so there's no hard-and-fast rule for making this script more efficient.
Thanks for your quick reply, Nneonneo.
I'll try what you suggest :)
Quote from: nneonneo on April 03, 2008, 12:47:27 PM
@Normally: In the default theme, with the default position, etc., using upshrink will hide the shoutbox. To hide it in general would require some more code, which will depend on what hiding you want to do, etc.
Thanks for the quick reply,
I use the classic theme and only the smileys are upshrink.
Is it possible to do the same with the while shoutbox.
So that there is something like open shoutbox - close shoutbox.
Anyone?
Sorry I know its a really stupid question, but when I tried putting it in it always gets the template parse error. I am just trying to find the location right below the navigation bar
@Normally: I suppose you could adapt the animatedCollapse.js stuff to make it work. I don't know enough about that library (pongsak wrote the original smiley code) to do anything serious with it.
@WRABBIT: See this post: http://www.simplemachines.org/community/index.php?topic=137508.msg1487885#msg1487885. It describes what you need to do, plus the locations for where you want it.
Nevermind.
Quote from: nneonneo on April 03, 2008, 05:32:45 PM
@Normally: I suppose you could adapt the animatedCollapse.js stuff to make it work. I don't know enough about that library (pongsak wrote the original smiley code) to do anything serious with it.
nneonneo thanks for the reply,
Is there someone else who knows how i can make the whole Schoutbox collapse in the classic theme?
Thanks,
Stef.
When install shoutbox into wrapped in joomla forum i got this error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://***/forum/yshout/js/moo.ajax.js :: anonymous :: line 26" data: no]
source: http://*****.ru/forum/yshout/js/moo.ajax.js
Line: 26
(Error reporter from firefox says this)
Please help me!
Huh? That's really bizarre! In index.template.php, change the line
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
to
var board_url = "/forum";
and see if that fixes it.
I try to install SB_1.13_SMF2.tgz on a fresh copy of SMF 2 but got this error instead. Please advise.
The package you tried to upload either is not a valid package or has become corrupted.
Try the .zip file I just uploaded. It is identical, except that it uses ZIP format instead of TAR.GZ. Perhaps some hosts can't use .tgz.
Thanks for the speedy reply. I can install it now, however I cant locate the settings for it in the ACP.
There are none :o
All major settings are done via the yshout/yshout.php file, and minor settings via yshout/js/yshout.js. There's a historical reason for this, though I am intending to write an ACP component for SMF 2.0 Final.
Quote from: nneonneo on April 04, 2008, 05:57:55 PM
Huh? That's really bizarre! In index.template.php, change the line
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
to
var board_url = "/forum";
and see if that fixes it.
I tried to change it to
var board_url = "/forum";
or
var board_url = "http://softmachine.ru/forum";
And it not takes any effect :(
In not wrapped forum it works fine.
It also fine works on another page:
http://softmachine.ru/forum/chat.php
Please help!
I don't know what's going on. Have you tried it on another computer, another browser, Firefox 1/2/3, etc? It might be a Firefox bug (judging from the Google search results).
Just wanted to say what a fantastic mod this is. I installed it on SMF 2.0 with no problems whatsoever. After a few customizations in appearance and location, it's perfect.
@nneonneo
I read all 98 pages and cannot believe the amount of patience you have and the willingness to help. A huge thanks.
fyi with the shoutbox turned on in php5 on smf 2 you get an error when in a strict environment.
Quote
Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Denver' for 'MDT/-6.0/DST' instead in /home/christj8/public_html/Sources/Subs.php on line 805
Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Denver' for 'MDT/-6.0/DST' instead in /home/christj8/public_html/Sources/Subs.php on line 818
History Commands ExtendedHistory HideAdminLinks ReturnToShoutbox
Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Denver' for 'MDT/-6.0/DST' instead in /home/christj8/public_html/Sources/Subs.php on line 805
Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Denver' for 'MDT/-6.0/DST' instead in /home/christj8/public_html/Sources/Subs.php on line 818
The explanation of this error is at:
http://us2.php.net/manual/en/function.date-default-timezone-set.php
I am looking into manually setting the timezone in code.
I got rid of the error in my implementation by adding to the top of the yshout.php file
date_default_timezone_set("America/New_York");
You might want people to select a time zone when they load the shout box?
right after the php opened... errors gone
Back in the 1.02 days I had that line, but it doesn't work in PHP 4. Besides, that error is coming from Subs.php, so it's not strictly my fault (unless I forgot to include some other file :-\ )
On that link I posted above (in the comments) someone posted a method to make declaring the time zone work in php4 as well.
The shout box worked fine till my host forced upgrades to php 5.
In fact even with the error you can still use the box its just the error is prepended to the top of the shout box.
Quote from: nneonneo on April 05, 2008, 11:37:06 AM
I don't know what's going on. Have you tried it on another computer, another browser, Firefox 1/2/3, etc? It might be a Firefox bug (judging from the Google search results).
No, i check it from another computer and IE 6-7, Firefox 2,3 Safari for win. And it not work for me...
None of those worked?
AFAIK the status property returns an error if it's not possible to get the status, i.e. it hasn't loaded. However, it checks readyState first, so that shouldn't be a problem :S
Sorry if this is very dumb question.
I have done following:
1. Uploaded the package SB_1.13.tgz and applied the mod.
2. Updated index.template.php by adding the
// YSHOUT HERE
global $boardurl;
... (as given at home page of mod)
// YSHOUT END
after
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
3. Now I have to add
// 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 desired location however I am not very familiar with php and templates.
Can someone suggest me where to add by giving some code after which I can add this.
My site is http://www.ping4help.com/
I am using Waltz theme and if possible, I would like to add this below menu bar on left hand side of search button.
Thanx in advance.
Im trying to get my SB to only show in the index page of my forum. I've read what nneonneo has said here http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341
But to me, it's not that clear.
Can someone help plz :)
nneonneo, when I click shout in my shoutbox nothing happens. any idea why is that, and how to fix it?
I've got all up, and looking good, but still, it won't show a word.
ameo,
Are you installing it in a modded theme? or the basic(default) theme?
modded theme.
sorry ameo,
i misread your post.
However, i had the same prob that you did when i tried to install the smilie pack :(
@sunita: so, you want it in that little box which has the user info? No problem.
Put that code right after
else {
echo $txt['welcome_guest'];
}
in index.template.php. I think that should do it.
@madman71: To make it only show up on the board index, you have two options.
1) You can add a check for the current page on index.template.php, so the shoutbox code is only generated on the index page.
2) You can install it to BoardIndex.template.php, but that will make it impossible to put it in the default location (you will have to put it elsewhere, e.g. under the menubar, near the info center, etc.)
@ameo: Any errors in the server error log? It sounds like either
1) chats/home.txt isn't writable
2) shout button JS is broken
The server error log should make it clear which problem it is. As a first step, try chmodding that file to 644 or 666.
You can add a check for the current page on index.template.php, so the shoutbox code is only generated on the index page.
------------------------------------------------------------------------------
I'd like to go this method, however what do you mean by adding a check for the current page?
thanks again nneon
Before
echo '
<br /><b>Shout Box</b><br /><br />
add
if($context['current_action']=='')
That should do it.
I'm looking right now in home.txt and it's 777, so it's not that.
Server log says totally nothing concerning yshout
EDIT:
problem solved - thanks 2 nneonneo.
just in case anyone else has similar troubles:
Admin panel, Themes and Layout, Themes and Settings, Attempt to reset all themes.
I'm guessing it's a JS error, then. It's probably easiest if I hop on your board to take a look.
Really appreciate your quick reply. I manage to put this however I was getting only "...loading shoutbox...". Then I moved it to BoardIndex.template.php just before echo '
</table>
</div>
</div>';
}
as advised by you in other reply. Still I am getting same "...loading shoutbox...".
I have checked that http://ping4help.com/yshout/js/yshout.js is accessible as asked by you in still another reply.
Not sure what I am doing wrong. Can you plz help. Thanx a bunch.
Quote from: nneonneo on April 05, 2008, 03:42:21 PM
@sunita: so, you want it in that little box which has the user info? No problem.
Put that code right after
else {
echo $txt['welcome_guest'];
}
in index.template.php. I think that should do it.
http://www.ping4help.com/yshout/yshout.php
It says that this file is writable by group. Easy fix: chmod it to 755.
Reallyyyyyyyyyyyyyyyyyyyyyyyyy appreciate. Such a quick response. My shoutbox is up and running.
Thanx a ton.
Quote from: nneonneo on April 05, 2008, 05:01:01 PM
http://www.ping4help.com/yshout/yshout.php
It says that this file is writable by group. Easy fix: chmod it to 755.
Quote from: nneonneo on March 21, 2008, 12:28:36 PM
@Niagra:
For the second problem, presumably TinyPortal isn't even active on the other pages -- have you put the shoutbox in TP and in index.template.php? If so, then it is quite easy to make this change -- you just edit index.template.php, set a small table tag with two columns, putting the shoutbox in the left and whatever you want in the right.
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="50%">!!SHOUTBOXCODE!!</td>
<td>
!!OTHERTHING!!
</td>
</tr>
</table>
Thanks very much for your help. I have not tried to tackle java script yet so I need the extra help. In the is second solution my imput portion would be to give the other side of the table an image file .. so would I input only this .. http://www.frogn.com/Photos/nameofimage.com
And also will that only cause the table to show when the shout box is not in a tiny portal module? I spose the answer is a resounding yes and you were correct I had placed it in both TP block and in the index template as well. Thanks.
NEW Question!! to add..
3. Please give me the code for admin or certain membergroups to have a color name or text in shout box. In other words my chat manager membergroup needs to have a colored text and myself as well. Thank you for everything!! xx
@sunita: No problem :)
@Niagra: For the image: yes, but you'd need to put the image in an image tag, so !!OTHERTHING!! would be
<img src="http://www.google.com/intl/en_ALL/images/logo.gif" />
Making that change affects non-TP shoutbox instances.
For Question 3: use 1.13. Membergroup colors are enabled by default.
nneonneo
I've added this to my index.template.php
and this shout box still shows up on all of my pages.
// YSHOUT HERE
if($context['current_action']=='')
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
Im using a theme other than the default theme.
any other suggestions?
Hi nneonneo...
Clicking sound to new/incoming posts.
As you must know... I had it working before. But now I upgrade my forum to TinyPortal v1.0.5; SB 1.13. and it doesn't work anymore... I tried some modifications, but nothing.
Guess I need your precious help once more. Tks.
Hi, how to remove smileys/emoticons on shoutbox? ::)
i have open error console of firefox, there 'is a error:
Errore: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://www.xxxxxxxxxx.org/xxxxxx/forums/yshout/js/moo.ajax.js :: anonymous :: line 27" data: no]
File sorgente: http://www.xxxxxxxxxx.org/xxxxx/forums/yshout/js/moo.ajax.js
Riga: 27
what do i do?
@madman71: Worked for me...did you put that code in front of every instance in the custom theme index.template.php?
@4T3IG0: Try using the yshout.js posted a few pages back.
@Smugller: Do you mean removing the smiley bar, or preventing people from using smileys?
@Mystiquo: crazyASD reported the same problem, but I am having trouble pinning down the cause of it, since I am unable to reproduce this error. Visiting your forum might be the best option.
Quote from: nneonneo on April 06, 2008, 09:56:15 AM
@Smugller: Do you mean removing the smiley bar, or preventing people from using smileys? <-- this ;)
In yshout/yshout.php, search for
$newText = parse_bbc($newText); // w00t!
replace with
$newText = parse_bbc($newText,false); // w00t!
and smileys will not be parsed.
Thx nneonneo ;) This is my modified shoutbox: http://www.gtamscripting.info :P
Btw. How to add button which after pressing it will refresh shoutbox?
You shouldn't need a refresh button, since the shoutbox is automatically refreshed when new shouts arrive.
@nneonneo if you were meaning this one... I already tried lots off ways and don't know what I'm doing wrong.
Quote from: nneonneo on March 20, 2008, 12:30:20 PM
Works for me. You have to get rid of the second soundManager.play('sound') line.
yshout.js:
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
// Flood control time in milliseconds:
var floodTime = 1000;
// Time between refreshes (minimum) in milliseconds:
// Note that since 1.08, this option will have less of an effect on performance,
// hence the default value is very low :)
var refreshTime = 150;
// Check for duplicate instances?
// This can improve performance in some cases.
var checkDuplicates = false;
// Internet Explorer 7 has a bug (feature?) which causes extreme lag when
// moving between pages. This delay controls "false alarms"; the amount
// of time between detecting a page move and reloading the shoutbox.
// If it is too high, users may experience laggy shoutboxes.
// If it is too low, users may experience lag moving to a new page.
// This bug only affects Internet Explorer 7 (not previous versions)
var falseAlarmDelay = 5000;
// Don't edit below this line, unless you know what you are doing ;)
username = "";
var yshout_php=(board_url?board_url:'')+'/yshout/yshout.php';
// Set up Behaviour
var myrules = {
'#shout-form' : function(element){
element.onsubmit = function(){
return false;
}
},
'#shout-text' : function(element){
element.onkeypress = function(evt){
return onKP(element, evt);
}
element.onfocus = function() {
onF(element);
}
},
'#shout-button' : function(element){
element.onclick = function(){
doSend();
}
}
};
var guest;
Behaviour.register(myrules);
// onKeyPress event handler for the two textboxes
function onKP (element, evt) {
evt = (evt) ? evt : (window.event) ? event : null;
var charCode;
if (evt)
charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
if (charCode == 13 || charCode == 3) {
doSend();
return false;
}
}
// onFocus event handler for the two textboxes
function onF (element) {
element.value = "";
defocus(element);
}
// Clear the onFocus event handler and set the foreground color to black.
function defocus(element) {
element.onfocus = null;
element.style.color = null;
}
// Set off the AJAX call to load the chat form into the empty yShout div
function loadChat() {
if ($("yshout").style.display=="none") return;
if(checkDuplicates)
{
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*/);
}
window.onunload = delcookie;
if ($("yshout") && shoutFile != "") {
new ajax (yshout_php, {
postBody: 'reqtype=init&file=' + shoutFile,
update: $('yshout'),
onComplete: loadDone
});
}
}
function delcookie() {
delete_cookie("yShout_open");
}
// Re-apply Behaviour after the chat loads
function loadDone() {
setTimeout("Behaviour.apply()", 5);
setTimeout("setupChat()", 5);
}
var oldNameBackgroundColor, oldTextBackgroundColor;
function setupChat() {
startRefresh();
username = $("forum-name").value;
if($("forum-name").disabled) guest=false;
else guest=true;
}
function complex_escape(text) {
return escape(textToEntities(text.replace(/&#/g, "&#"))).replace(/\+/g, "%2B");
}
// Send the message
function doSend() {
if (guest) {
if($("forum-name").value=='')
{
alert("Please enter a username.");
return;
}
username=complex_escape($F("forum-name"));
set_cookie("username",username,20*365*24*3600);
var toShout = complex_escape($F("shout-text"));
floodControl();
new ajax (yshout_php, {
postBody: 'reqtype=shout&shout=' + toShout + '&file=' + shoutFile + '&username=' + username,
update: $('shouts'),
onComplete: shoutDone
});
return;
}
if (formValidate() && $("shout-text").value) {
var toShout = complex_escape($F("shout-text"));
floodControl();
new ajax (yshout_php, {
postBody: 'reqtype=shout&shout=' + toShout + '&file=' + shoutFile,
update: $('shouts'),
onComplete: shoutDone
});
}
}
function autoShout(theText) {
new ajax (yshout_php, {
postBody: 'reqtype=autoshout&shout=' + theText + '&file=' + shoutFile,
update: $('shouts'),
onComplete: shoutDone
});
}
function ajaxGet(args) {
new ajax (yshout_php+'?'+args, {
update: $('shouts'),
onComplete: shoutDone
});
}
function goTo(args) {
if(request) request.transport.abort();
document.location=yshout_php+'?'+args;
}
// Start refreshing the chat after a message has been sent
function shoutDone() {
startRefresh();
}
var refreshSet = false;
function startRefresh() {
if (!refreshSet) {
setTimeout("doRefresh()", refreshTime);
refreshSet = true;
}
}
function schedRefresh() {
if (refreshSet) {
setTimeout("doRefresh()", refreshTime);
}
}
// Validate the form to ensure that the fields are filled
function formValidate() {
var shoutText = $F("shout-text");
var textValid = true;
if (shoutText == "Shout text" || shoutText == "")
textValid = false;
if (!textValid) {
changeClass($("shout-text"), "shout-invalid");
$("shout-text").focus();
return false;
} else {
changeClass($("shout-text"), "shout-valid-shout");
}
return true;
}
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
if(get_cookie("shoutSound") == "true")
{
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
//soundManager.setVolume('sound',0); // my addition line, you can remove it
soundManager.play('sound');
}
//soundManager.play('sound');
}
oldShouts = $("shouts").innerHTML;
if($("yshout").style.display == "none") {refreshSet = false; return;};
set_cookie("yShout_open","true",3/*seconds*/);
request=new ajax (yshout_php, {
postBody: 'reqtype=refresh&file=' + shoutFile,
update: $('shouts'),
onComplete: schedRefresh
});
// IE7 kludge: Abort transfers before navigating away, otherwise IE waits for completion
for (i=0;i<document.links.length;i++){
if(document.links[i].getAttribute("href").substring(11,0) != "javascript:")
document.links[i].setAttribute("onactivate",function(){request.transport.abort();setTimeout("schedRefresh()",falseAlarmDelay);});
}
}
function floodControl() {
$("shout-text").disabled = true;
$("shout-text").value = "";
Form.disable($("shout-form"));
setTimeout("enableShout()", floodTime);
}
function enableShout() {
Form.enable($("shout-form"));
$("shout-text").value = "";
if(!guest) $("forum-name").disabled = true;
$("shout-text").disabled = false;
setTimeout('$("shout-text").focus()', 0);
}
function changeClass(element, newClass) {
element.className = newClass;
}
function set_cookie( name, value, expires, path, domain, secure )
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );
/*
if the expires variable is set, make the correct
expires time, the current script below will set
it for x number of days, to make it for hours,
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000;
}
var expires_date = new Date( today.getTime() + (expires) );
document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}
// this function gets the cookie, if it exists
function get_cookie( name ) {
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
function delete_cookie ( cookie_name )
{
var cookie_date = new Date ( ); // current date & time
cookie_date.setTime ( cookie_date.getTime() - 1 );
document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
}
I have my shoutbox set up so it shows on every page. I also have it set up to play a sound each time a shout is posted. However, as you navigate through the site, the sound plays at every page load. Is there a way to have it play only when there is a new shout?
www.empireofthesun.net (http://www.empireofthesun.net/forum/index.php?action=refer;sa=smf)
hi all ;)
seen in a shoutbox on a site run with vb that they have a drop down color picker that can be seen in the pic that i have attached. can this be done with nneonneo's shoutbox and if so how ?
thanks
regards
Dave
That's part of the BBCode bar, and SMF has one too. My shoutbox doesn't have a BBCode bar. I'm not sure how easy it is to add a BBCode bar to the shoutbox, nor if it will look good.
Quote from: crazyASD on April 05, 2008, 05:53:40 AM
Quote from: nneonneo on April 04, 2008, 05:57:55 PM
Huh? That's really bizarre! In index.template.php, change the line
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
to
var board_url = "/forum";
and see if that fixes it.
I tried to change it to
var board_url = "/forum";
or
var board_url = "http://softmachine.ru/forum";
And it not takes any effect :(
In not wrapped forum it works fine.
It also fine works on another page:
http://softmachine.ru/forum/chat.php
Please help!
same problem...
my forum is installed in the root. how do i change it? i have tried to put my url and my folder location but don't work.
if i put "/" a Firefox script (Firebug) give me back this error:
Error: uncaught exception: Access Deined at calling method XMLHttpRequest.open
sorry for double posting: solution found
first of all you must ser chmod on /yshout/yshout.php to 755
then change
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
in
var board_url = "../";
cheers :)
How can i set moderators to admin on the chat?
nneonneo if you enter with IE7 you open other page you will are stop, with the firefox if you do error console you have this
Errore: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://www.abclan.org/IAB/forums/yshout/js/moo.ajax.js :: anonymous :: line 27" data: no]
File sorgente: http://www.abclan.org/IAB/forums/yshout/js/moo.ajax.js
Riga: 27
@Icchan: Your error is a bit different; it stems from having different domains for the forum, so the board_url fix works fine.
@Mystiquo: I presume you have tried Icchan's idea (replacing the path with your own, relative path). I can't reproduce the error -- your shoutbox works for me. If nothing else works, purge your cache and try again :-\
@Tricks: Use $moderatorGroups in yshout/yshout.php.
can someone please help me uninstall smf shoutbox from my forum please
SMF shoutbox? This isn't the thread for it, sorry.
How do I delete the history in this shout box.........
im sorry but for some reason i cant create a new thread. can someone please help i just want to delete smf shoutbox.
@FullDraw: erase the yshout/chats/history.home.txt file.
@The_Guardian: Uninstall from Package Manager, and follow the instructions from the mod page in reverse.
Many thanks nneonneo for sorting that out for me. It works flawlessly.
Quote from: nneonneo on April 07, 2008, 05:54:45 PM
@FullDraw: erase the yshout/chats/history.home.txt file.
Thank you, very simple I just did not want to be in there messing with things I knew nothing about.......
Hello again,
Tis is the code in a Tiny Portal block. But i can only see the smileybar?
I am the owner en Global moderator. But mi wife at a different adres and IP can see the whole shout?
Olso some members and moderators can see the shout. Any idea ?? Thnx
echo '<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>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
Change
'<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">'
to
'<div id="yshout">'
Quote from: nneonneo on April 08, 2008, 12:24:33 PM
Change
'<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">'
to
'<div id="yshout">'
Thnx.. who is the best?
nneonneo 8)
Its working thnx again!! ;D
since I reinstalled forum on my other server shoutbox won't upload properly.
it says package is corrupted and something else. i downloaded it twice from here,
and still the same result appears. I'm using smf 1.1.4 and trying to upload proper
version for it 1.13.
so, is it possibly to install it manually??
It might be because your server doesn't like .tgz files. Try the attached file.
Excellent shoutbox, my friend. I just have a simple question. I might have overlooked it in the php file, but I'm interested in changing colors of two parts of the shoutbox: the area that you enter in the message, and the color of the display of who is speaking. I've attached a picture to illustrate what I mean:
(http://scribefarm.com/shout.jpg)
CSS is in index.template.php or yshout-style.css.
Yes, but is there a way to change it only for the shoutbox, and not the entire forum? If so, which setting in the CSS for y-shout do I change? I'm just not sure. Sorry for my ignorance. I've never really been good at this.
On a custom theme, you should have the CSS in index.template.php. There are settings that apply only to the shoutbox in the CSS block, under // YSHOUT HERE.
Ah, I see it now. Thank you my friend.
any idea how to add a scroll bar in the shoutbox rather than the extended history option...???
also keeping the shoutbox for registered mems ???
and also an option to pop it out into different window ???
do reply fast ! :)
Quote from: optimushunk on April 10, 2008, 11:26:51 AM
any idea how to add a scroll bar in the shoutbox rather than the extended history option...???
also keeping the shoutbox for registered mems ???
and also an option to pop it out into different window ???
do reply fast ! :)
you can pop it in a different window by doing this http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341 (http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341)
But i just wanted to ask how do you make so it still looks like its part of your forum, its just plain white. I want it too look like my forum, how would i do that?
@optimushunk: Check your email, I believe I already replied to all of the questions.
@UTM-MaKaVeLi: Depends to what extent you want it to look like your forum. First step should be to include the forum's style.css, by adding a line like this:
<link rel="stylesheet" type="text/css" href="', $boardurl, '/Themes/default/style.css?fin11" />
before the script tags, using the desired theme in place of default. That should add the right background color to the page. Next, you should edit the code below the body tag to say
<body>
<table class="bordercolor" width="100%" cellspacing="1" cellpadding="8" border="0" style="margin-top: 1px;"><tr><td width="100%" valign="top" class="windowbg2"><span class="middletext">
<b>Shout Box</b><br /><br />
<div id="yshout">Shoutbox loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></span></td></tr></table></body></html>';
This is for the default theme; other themes may have slightly different HTML required.
[announce] 1.14 released. This is a minor bugfix release, fixing a refresh bug that could cause performance issues with certain configurations.
The 1.14 package integrates the SMF 1.1x and SMF 2 versions, so anyone using SMF2 can now use the same package.
yep got it thanks...
yep, thanks nneonneo. Works a treat ;D cheers :)
Quote from: nneonneo on January 19, 2008, 11:01:07 AM
I'm reposting pongsak's smiley guide because the recent server crash has deleted the smiley.php attachment.
Hi nneonneo..
I've installed your SB and it works great on my site. I didn't put it on the board index, instead pop-up it to a new window.
my problem is with the smileys, I followed the instruction you given but the forum's default smiley is not visible below the shout area, I can click on the "x" image (using IE this denotes a missing image) and the code is appear on the shout area/ it seems it pointing to wrong location (http://wink.gif).
How can we set it to the default location as the forum's smileys?
If the question is already answered elsewhere, please point me to there.
TIA.
I think you will need to load some of the SMF source files to make it work.
Stick the line
require('SSI.php');
above
require('mymod/smiley.php');
and it should work.
:D you're right adding SSI.php did the trick!
thanks! :D
Quote from: crazyASD on April 05, 2008, 05:53:40 AM
Quote from: nneonneo on April 04, 2008, 05:57:55 PM
Huh? That's really bizarre! In index.template.php, change the line
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
to
var board_url = "/forum";
and see if that fixes it.
I tried to change it to
var board_url = "/forum";
or
var board_url = "http://softmachine.ru/forum";
And it not takes any effect :(
In not wrapped forum it works fine.
It also fine works on another page:
http://softmachine.ru/forum/chat.php
Please help!
just to confirm I am also having this same issue. everything works well until I try and view it through a joomla wrapper. i have tried the change in URL and still does not work. it works fine if i view the forums directly but as soon as i view it through joomla it does not work.
joomla 1.0.15
smf 1.1.4
Does it also show the Mozilla JS error?
Quote from: nneonneo on April 11, 2008, 03:38:34 PM
Does it also show the Mozilla JS error?
no error. just the good ole loading ...loading shoutbox... message.
@Toklas: Look on the main mod page. There's a bunch of steps that should resolve the problem.
I was just trying out the scroll bar thing....if i follow from 1st step its Installing or its the scroll bar thing ????
coz i have already installed...
so do i follow from the step 6 ??
and i dont get the step 5....coz i am using smf...so idk what to do....please help out fast.....thanks
and even can you tell me in a more simple language that how to make the shoutbox come out of the theme by using a link under the shoutbox saying "Get Bigger" or saying "Open Shoutbox in New Window". As I am kinda new to this php things... i m still learning...
thanks..
Quote from: nneonneo on April 11, 2008, 05:06:43 PM
@Toklas: Look on the main mod page. There's a bunch of steps that should resolve the problem.
ive already gone through the various troubleshooting steps on the first page. including changing the url path to all the various suggestions.
is there anything else I can provide to help remedy this?
@optimushunk: Read instructions after the +++++++++++ on http://www.simplemachines.org/community/index.php?topic=137508.msg1221413;topicseen#msg1221413 for scrollbars.
For a separate window, make the file as described, then add some code in yshout.php next to History or something that says
<a href="path/to/shoutbox.php" target="_blank">SeparateWindow</a>
@Toklas: Well, I don't know what else to say. At this point, I think a visit to your forum is in order. If you post or PM your forum URL, I will check it out.
yea thats fine..but i am confused that the steps at the start is installing the shoutbox ??? or its the step of creating the scroll bars ??
The steps above are for TinyPortal integration.
hm...so what do i have to do for the smf thing...
What SMF thing?
like i ment...i have installed the shoutbox in smf forums....by using the the smf praser...
so i am quite confused at the moment...that how to add a scroll bar in the shoutbox which is installed in the smf forums...sorry you have to help me form like start coz i am new...but i would try to learn it as fast as i can..:)
Hello
1st of all i would like to congrat ya for this great shoutbox! ;D
Now, i have a doubt and i hope you can help me with it; the thing is, i had the mod installed and runnin good, although, server problems, forced me to uninstall it for sometime. :-[
After server been fixed, i re-installed the Mod and here's where my question starts:
After instalation, shoutbox runs again without problem but now there is something different and that i want to change: the shoutbox is now visible and acessible to users in general, i mean, when you are logged out you still see the shoutbox and what members inside the forum are writing. What i have to do to put things runnin well again (hide shoutbox from beeing visible to anyone outside the forum)?
Tx in advance!
@optimushunk: All it is is a simple CSS modification. If you can't find the CSS to do it, try Themes/default/yshout-style.css.
@Psycat34: Set allowGuests to false in yshout/yshout.php. Wasn't that easy?
Quote from: nneonneo on April 11, 2008, 08:20:15 PM
@Psycat34: Set allowGuests to false in yshout/yshout.php. Wasn't that easy?
Tx for reply
ok, i guess that needs ''webmaster'' work!
Sorry for the dumbness but i'm really only an Owner/Admin of a forum and the webmaster is away now and i dont see any option that sugest it in the Admin Panel, or there is? I can see in the contents and yes there it is...$allowGuests=true;, but i can't edit it. how can i change that value to false?
I'm not a noob with pc's but i am with php; don't know anything about ''programming''... can you please enlight me a bit more... ;)
Tx in advance for help!
Please help me :'(
I installed this wonderful shoutbox in my test server (SMF + TP: http://www.bottegal.net/test (http://www.bottegal.net/test)) and it worked fine in the default theme (I put it in a php center block, following author's instruction).
However, like others, I had problems to run it on a different theme. I'm using Dilber Multicolor: a quite popular theme, so maybe someone could help to find out where I have to put this code:
// YSHOUT HERE
global $txt;
echo '
<div class="tborder" style="margin-top: 0;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 5px 5px 5px 10px;">Shoutbox</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr><td class="windowbg2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr></table>
</div><br />';
// YSHOUT END
I'd like to put in a center (or in a front) block and I really couldn't figure out where I have to put that code. I cannot understand the meaning of right before the end of either the theme_linktree function (to put it after the link tree) or after the template_menu function (to put it before the link tree). You may wish to add <br /> tags to adjust the layout.
Please...
can you take a look at mine at http://www.mydoodlepals.com/forum/ and tell me how to make the box not take up so much page height ---it's especially bad when shouters use the smileys on our board. also i have tried editing both the yshout style sheet and the yshout.js but i still have tiny text??? other than this my guests and users are crazy over it....thank YOU!!! so much!! O:)----- oh and looking at my index.template.php file.......it seems the shout box is called on twice but in reality it is only showing once though I would love for it to actually be below the row of menu buttons i just can't figure out where to in the file :P
ok i think i actually took care of the height problem....now if i could just fix my fonts...........
@Psycat34: Are you able to edit files on the forum? Perhaps you've been given FTP access or something. If not, then there is little you can do to change the setup of the shoutbox, since the majority of options are controlled through the settings embedded in the file itself.
@Adolfo: I assume you mean putting it in an SMF block, and not a TP block?
In index.template.php, you will find the line
function theme_linktree()
and a little further on
function template_menu()
The linktree is the thing that looks like "TEST > Forum > Forum > Annunci". If you want the shoutbox right after that, then you simply need to put the code you posted at the end of the theme_linktree function, i.e. before the } that ends that function (in Dilber, that's right before the template_menu function).
I suggest that you not put the shoutbox in template_menu for DilberMC. It works for the default theme, but in Dilber, things are a bit different -- you may find the shoutbox sharing space with the tab bar, which will probably look quite strange.
@scsmilin: Err, could you explain that again? I didn't understand. Also, if you could use a normal sized font for your posts, it would be appreciated.
hi there and thank you! i have tried editing both the yshout style sheet and the yshout.js but my fonts are still tiny.......any suggestions
Find
#yshout {
font-size: 10px;
}
Increase 10 and it should make the fonts bigger.
i can't find that in neither the yshout style sheet, yshout.js, nor the index.template.php .... so I'm not sure where to look for it???
It's definitely in yshout-style.css, at the very top.
Quote from: nneonneo on April 11, 2008, 11:18:29 PM
@Adolfo: I assume you mean putting it in an SMF block, and not a TP block?
No, I'd like to put it in a TP block.
I created a phpblock with
echo '<div id="yshout"></div>';
However the shoutbox doesn't appear because I don't know where to put the code
// YSHOUT HERE
global $txt;
echo '
<div class="tborder" style="margin-top: 0;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 5px 5px 5px 10px;">Shoutbox</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr><td class="windowbg2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr></table>
</div><br />';
// YSHOUT END
thanks for your help :)
Quote from: mr_fix_it on April 06, 2008, 04:45:51 PM
hi all ;)
seen in a shoutbox on a site run with vb that they have a drop down color picker that can be seen in the pic that i have attached. can this be done with nneonneo's shoutbox and if so how ?
thanks
regards
Dave
Quote from: nneonneo on April 06, 2008, 05:20:32 PM
That's part of the BBCode bar, and SMF has one too. My shoutbox doesn't have a BBCode bar. I'm not sure how easy it is to add a BBCode bar to the shoutbox, nor if it will look good.
thanks neonneo but there as to be a way of doing this as with the smileys. i would like this if it can be done so if there is anyone out there that knows how or would like to try and work out how as i'm trying to do at the min then please get back
regards
Dave
Quote from: nneonneo on April 11, 2008, 11:18:29 PM
@Psycat34: Are you able to edit files on the forum? Perhaps you've been given FTP access or something. If not, then there is little you can do to change the setup of the shoutbox, since the majority of options are controlled through the settings embedded in the file itself.
Yes i have access to that file via ftp and i can open it!
Solved bro!
Tx for help!!
:)
Here is what my changed style sheet looks like....as you can see every font has been sized UP but on my board they are still TINY..
/* Default theme style. Modify to your taste. */
#yshout {
font-size: 14px;
}
#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: 12pt;
color: #141414;
}
#forum-name, #shout-text, #shout-button {
font-size: 13px;
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;
}
Quote from: nneonneo on January 01, 2007, 04:08:37 PM
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.
I'm having a problem with the shoutbox... the characters like "ñ" or "á" are being written out like the image below...
I tried to change the encoding in the yshout.php but nothing.
Any ideas?
Thanks a lot!
@Adolfo: The php-block is fine. The second piece of code that you wanted to add is actually the same thing, but with a SMF-centerblock-style box around it. I believe you are actually missing the first piece of code, which contains all the JavaScript and CSS stuff to make it work.
@mr_fix_it: At the moment, I haven't the time to figure that out, since it's Finals time. If you look at the smiley code, perhaps you can find a way to do it.
@scsmilin: Not according to http://mydoodlepals.com/forum/Themes/default/yshout-style.css
@dannbass: Might have something to do with htmlentities... I will get back to you on that.
Quote from: nneonneo on April 12, 2008, 06:01:55 PM
@Adolfo: The php-block is fine. The second piece of code that you wanted to add is actually the same thing, but with a SMF-centerblock-style box around it. I believe you are actually missing the first piece of code, which contains all the JavaScript and CSS stuff to make it work.
Mate, you were right! Now it works properly.
Thanks a lot :)
dannbass, could you let me know if the attached update works correctly? It works for my limited testing, so if it works for you, I will post it as a replacement for the current 1.14 package.
Thanks!
Yep, it works! and I speak on behalf of everybody, THANKS A LOT for all the great support!!
You're the man!
[announce] 1.14b released. This release fixes a bug with non-ASCII characters, reported by dannbass.
The package contains upgraders for 1.13 and 1.14, so if you are using those versions, you can simply upload the package and apply it.
You should be able to just upload the package and install/update it as usual.
EDIT: OK, I used the wrong term there. Fixed.
Quote from: nneonneo on April 12, 2008, 07:51:41 PM
You should be able to just upload the package and install/update it as usual.
EDIT: OK, I used the wrong term there. Fixed.
Thanks again :)
ok i thought that I only had to do that for the one in the yshout folder.... thank you I will go try again!!!
nneonneo, one last thing: is there a way to avoid people to load multiple instances of your shoutbox because of tabbed browsing?
@Adolfo: Set checkDuplicates to true in yshout/js/yshout.js. It is also recommended that you update the date after yshout.js (to anything you want; it doesn't have to be a date) in index.template.php to prevent caching (which would cause the change to not take effect)
Quote from: nneonneo on April 12, 2008, 08:15:29 PM
@Adolfo: Set checkDuplicates to true in yshout/js/yshout.js. It is also recommended that you update the date after yshout.js (to anything you want; it doesn't have to be a date) in index.template.php to prevent caching (which would cause the change to not take effect)
I updated the date to Apr172008 but users can still open multiple istance of the shoutbox if they use tabbed browsing.
Maybe because I'm using a TP central block?
In two spots in yshout/js/yshout.js, change
3/*seconds*/
to
20/*seconds*/
That should fix it (it's working for me).
Quote from: nneonneo on April 12, 2008, 08:41:02 PM
In two spots in yshout/js/yshout.js, change
3/*seconds*/
to
20/*seconds*/
That should fix it (it's working for me).
Yeah, it's working with IE (not with Firefox, but that is not a problem) :)
Thanks again
Is it possible to make it so that you can make a usergroup that are capable of modding the shoutbox, but nothing else. Basically a shoutbox moderator but they wouldn't be able to Moderate the forums or anything else like that?
Set moderatorGroups in yshout/yshout.php.
Have a strange problem to report. Was using this mod with the DoD theme, and it was working just fine. Then all of a sudden, it just sort of stopped working. I can enter text just fine, but when I hit enter to send it, nothing happens, as well as when you click the "submit" button. Mod works on other installed themes as well as default. And like I said, it worked earlier, just sort of stopped working. I've not installed or made any changes since it was working. Ideas?
Just...stopped working? Does the shoutbox still show?
Yeah, shows just fine. And like I said, it works in all the other themes. But for some reason, it just stopped responding. I mean, you can see when someone else, using a different theme, posts a message, but it doesn't do much in the way of posting messages in DoD theme now. I've tried removing the code from that theme, and putting it somewhere else, just doesn't work...
*Edit* - Installed the original index.template.php, then applied the mod code again, and that seems to have fixed the problem, whatever it might have been. What I don't understand was that I hadn't changed anything since its installation...
Was it just a problem for you? If so, it could've been browser caching. Occasionally, one of the support files gets somehow corrupted (this has happened to me a few times), and your browser saves the bad copy, which then causes the shoutbox to not work. In that case, if you force-refresh the page (Shift-Refresh on Firefox, not sure about other browsers), then it causes the files to be reloaded, usually resolving the problem.
How can it show only the messages for last 24 hrs?
In the history, or the shoutbox?
That's a pretty tricky question, I think. The easiest way to do it would be to modify the preg_replace which uses preg_timeformat (so that instead of just matching the timestamp, it matches the whole shout), then let preg_timeformat delete the whole shout (return nothing) if it is too old.
Ok i thought this was the forum itself but I was advised to come here and repost...sorry about that.......
From time to time my shout box suddenly fills with things like....
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 321
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 391
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 392
Notice: Undefined index: BAN_CHECK_IP in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 492
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 321
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1186
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1196
Notice: Undefined index: theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1217
Notice: Undefined index: images_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1218
Notice: Undefined index: theme_dir in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1219
Warning: array_unshift() [function.array-unshift]: The first argument should be an array in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1383
Notice: Use of undefined constant WIRELESS - assumed 'WIRELESS' in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1395
Notice: Use of undefined constant WIRELESS_PROTOCOL - assumed 'WIRELESS_PROTOCOL' in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1397
Notice: Undefined index: theme_dir in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1472
Notice: Undefined index: default_theme_dir in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1484
Notice: Undefined index: default_theme_dir in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1492
Notice: Undefined index: theme_dir in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1472
Notice: Undefined index: theme_dir in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1560
Notice: Undefined index: theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1560
Notice: Undefined index: theme_dir in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1561
Notice: Undefined index: theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1561
Notice: Undefined index: default_theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1572
Notice: Undefined index: default_theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1573
Notice: Undefined index: theme_language_error in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1592
Notice: Undefined index: theme_dir in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1560
Notice: Undefined index: theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1560
Notice: Undefined index: theme_dir in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1561
Notice: Undefined index: theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1561
Notice: Undefined index: default_theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1572
Notice: Undefined index: default_theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1573
Notice: Undefined index: theme_dir in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1560
Notice: Undefined index: theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1560
Notice: Undefined index: theme_dir in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1561
Notice: Undefined index: theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1561
Notice: Undefined index: default_theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1572
Notice: Undefined index: default_theme_url in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 1573
Notice: Undefined index: lastActive in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 2556
Notice: Undefined index: lastActive in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 2586
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 321
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 321
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 321
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/SSI.php on line 662
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/SSI.php on line 695
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 321
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 896
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Load.php on line 914
Notice: Undefined index: time_offset in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 835
Notice: Undefined index: todayMod in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 842
Notice: Undefined index: time_offset in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 835
Notice: Undefined index: todayMod in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 842
Notice: Undefined index: time_offset in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 835
Notice: Undefined index: todayMod in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 842
Notice: Undefined index: time_offset in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 835
Notice: Undefined index: todayMod in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 842
Notice: Undefined index: time_offset in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 835
Notice: Undefined index: todayMod in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 842
Notice: Undefined index: time_offset in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 835
Notice: Undefined index: todayMod in /hermes/web06/b987/pow.unigirl1972/htdocs/forum/Sources/Subs.php on line 842
and that's just part of it as it will just as suddenly return to normal. The thing is, none of this actually points to the shoutbox--- just forum and forum 'sources' ....any idea what's wrong here? I'm using the 1.1.4 version- no beta.
I think all the errors are caused by the first few -- the ones relating to mysql_query. It looks like SMF can't connect to the database, and since the shoutbox isn't set up to catch such errors, they simply fall through to output.
It's possible that the shoutbox is exceeding the maximum connection limit, the "flood" limit, or some other limit on your database, or that the database server/process is busy doing other things. Whatever the cause, it's certainly related to the database in some way.
My shoutbox doesn't directly use the database, but SSI.php loads a lot of SMF files, which in turn use the database to load settings, etc.
What do you have the maximum # set at? Is that something ok for me to raise higher- this flood limit? We are having more and more visitors all the time so yes it is being hit more.
Quote from: nneonneo on April 14, 2008, 12:15:29 PM
In the history, or the shoutbox?
I mean the shoutbox.
May you show the code? Thanks.
Ahh i love this shoutbox but its bringing my server to it's knees. I'm running on lighttpd and I keep getting 403 errors from this. Any idea how i can fix it? =/
@scsmilin: Flood limit? I believe you want the refresh timeout limit, which is usually 20 seconds -- on most hosts, making it much more will cause the shoutbox to be stopped for exceeding time limits (it waits until a new shout is made, or the timeout expires, before refreshing). That's controlled in $updateTimeout in yshout/yshout.php. If, instead, you want to control the interval between the shoutbox receiving a refresh and requesting another, change refreshTime in yshout/js/yshout.js.
@pongsak:
1) Change
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
to
$chatText=preg_replace_callback("/(.+)<timeval=(\d+)>(.+)/","preg_timeformat",$chatText);
2) Change
function preg_timeformat($matches)
{
// format: <timeval=(value)>
return timeformat(intval($matches[1]));
}
to
function preg_timeformat($matches)
{
// format: <timeval=(value)>
if(count($matches)==2) return timeformat(intval($matches[1]));
$time=intval($matches[2]);
if(time()-60>$time) return '';
return $matches[1].timeformat($time).$matches[3];
}
Change 60 (seconds) as appropriate; one day is 86400 or 60*60*24.
@runitzme: Hmm, I'm not sure. I have nil experience with lighttpd. Is there any PHP acceleration software available for it? I know for a fact that they improve performance by a large amount, but might not be available for lighttpd.
Quote from: nneonneo on April 14, 2008, 03:24:31 PM
It's possible that the shoutbox is exceeding the maximum connection limit, the "flood" limit, or some other limit on your database, or that the database server/process is busy doing other things. Whatever the cause, it's certainly related to the database in some way.
Yes you mentioned that the shoutbox might be exceeding the maximum connection limit, the 'flood' limit ==== so I was asking what that maximum # is?? and is this something that I could set higher than it's now default and maybe clear up all those bad warnings/notices??
You said the refresh rate was set at 20 and not go much higher......what would happen if that was cut in half.....lowered rather than raised?
@scsmilin: I have no idea what those limits may be. Your host probably knows.
As for the refresh rate (updateTimeout), setting that lower will cause the shoutbox to update more often. If you have nothing else to go on, just try it. It'll be readily apparent if it works or not.
I do have a php accelerator called xcache. I use it with lighttpd and i set a max connection of 2 per ip on my server tho. I think that may be a limit but when i turned the limit off, pages take forever to load =/.
Is it possible to make the shoutbox scroll instead of just cutting off messages into the history. I would like it to store roughly the last 20+ messages before it deletes and sends them into the history, is this possible?
@runitzme: I have no idea what I can do about it, sorry :(
@footypro: See http://www.simplemachines.org/community/index.php?topic=137508.msg1221413;topicseen#msg1221413, after the ++++++++++++.
Hmm, I added the scroll and it works but it Narrows the shoutbox big style. Then when you widen it the scrollbar goes away.
I've just realised this is because that scrollbar is for if you want to get the shoutbox on a sidebar on the portal.
Thanks.
Don't add the "width" line.
sorry if this has been answered before but i set up the shoutbox on my site http://motomoddinguk.info then i tried to add the smilies but all i get is Open Smiley | Close under the shoutbox but nothing else in ff you click open and nothing doing in i.e you click open it slides down but no smilies
Is there a way for a single user to disable the shoutbox?
Quote from: rebus on April 17, 2008, 02:29:18 AM
Is there a way for a single user to disable the shoutbox?
I don't think so, rebus. Only if you have some other themes to choose, which don't have it installed.
Try choosing some other theme, from your Profile > Look and Layout preferences > Current theme > Change
I think this is the only possible way to make it not showing if you're not admin.
You can only hope other themes don't have it installed. [p.s. - and they probably don't]
Quote from: ameo on April 17, 2008, 04:48:22 AM
Quote from: rebus on April 17, 2008, 02:29:18 AM
Is there a way for a single user to disable the shoutbox?
I don't think so, rebus. Only if you have some other themes to choose, which don't have it installed.
Try choosing some other theme, from your Profile > Look and Layout preferences > Current theme > Change
I think this is the only possible way to make it not showing if you're not admin.
You can only hope other themes don't have it installed. [p.s. - and they probably don't]
Mmmm... you're right, that should work. At this moment I've got only one theme in my board, I will try adding another one. Thanks a lot!
hi there!
unknownscape.com/forums now has blue vista theme as default, i tryed to add it in, it just said shoutbox
I checked blackrain v2(old default) and it went the same
any clues?
(index.template attached)
http://unknownscape.com/forums/yshout/yshout.php
404?
no idea whats happened
Reinstall it. Looks like it got deleted somehow?
is there a way to up the size of the text in history for this shoutbox ?
regards
Dave
Quote from: nneonneo on April 19, 2008, 05:10:20 PM
Reinstall it. Looks like it got deleted somehow?
got an error
@mr_fix_it: Yes, edit the CSS in yshout/yshout-style.css or yshout.php.
@pimper12: All your PHP files are having some code injected; this will severely affect the ability for the shoutbox to function correctly. Either remove the added code if possible, or turn off gzipCompression in yshout/yshout.php (the injected HTML will show up on top of the shoutbox and above the shouts div, so it will likely appear twice in the shoutbox).
I have installed chat in smf 1.1.4 default theme. The installation correct, but I would like to chat just outside LOGGED visible to users. Today is visible to visitors without logging, appearing on page logging and recording.
Is it possible to make it visible only to users currently logged in?
Change $allowGuests to false in yshout/yshout.php.
Quote from: nneonneo on April 21, 2008, 10:21:59 PM
@mr_fix_it: Yes, edit the CSS in yshout/yshout-style.css or yshout.php.
thanks for that nneonneo it worked a treet
Quote from: vno on August 30, 2007, 12:52:49 AM
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
In addition:
If you want to add a scrollbar on your block, in your theme's index.template.php, add this:
#yshout #shouts {
overflow: auto;
width: 165px; /* the width you want to display */
height: 200px; /* the height you want to display */
}
before:
#yshout {
I cant find that piece of code (underlined) so I can place the added code for the scroll bar, and size the shoutbox. Any help?
my index. file shows and the only possible places I can think to add the scroll code are at bottom of this post:
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" 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;
}
</style>';
// YSHOUT END
#yshout { font-size: 10px; }.....or.....#yshout { overflow: hidden; }
Before either of those will work.
hi nneonneo
dude i couldnt under stood this
For adding smiley .Let's go.
1. Adding 1 line of script between <head> and </head> index.template.php .
<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script>
please tell me in detail
i am newbie
In Themes/<theme>/index.template.php, there are about four lines of <script type="text/javascript".... Insert that line somewhere nearby.
thanks dude..
Quote from: falconforce on January 16, 2008, 10:20:09 AM
I try modified own shout box, so it can turn off sound ;)
after you modified mod with sound...
in yshout.js, after
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
add
if(get_cookie("shoutSound") == "true")
{
soundManager.setVolume('sound',200); // my addition line, you can remove it
soundManager.play('sound');
}
and add this to first line of file
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
in yshout.php, add this to anywhare are you need
if(!isset($_COOKIE['shoutSound'])) {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24);delete_cookie(\'yShout_open\');loadChat();">Use Sound</a>';
} else {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();">No Sound</a>';
}
PS. I'm add that after...
case "init":
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">',$txt['yshout_history'],'</a> <a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
it's doesnt work? its never mute... why?
hi there what a great mod and support pages so far brilliant.. My only thing is I have my forum wrapped in mambo and so would like to reduce the maximum size of the yshout if possible. Could someone please point me to this setting in the .php please
@renkliforum: Can you be any more specific? It works for me, so I can only assume that you missed some instruction(s).
@mjltigger: $max_lines
thank you for looking... what happens is when users start sending messages with shout out it doesn't start scrolling until 12 lines are visible on screen. Becasue there is already a banner at the top for mambo and the screen width is reduced by the side menu i would like to reduce this to about 6 lines. I am working through the code but was hoping someone could point out the setting for me
thanks
mjltigger, just change $max_lines to 6. Then, clear the shoutbox a few times using /clear.
thank you.. that works great... and right at the top.. how did i miss it... i know how.. expected it to be complicated :)
i am trying to add this to my theme but i can't seem to do it myself. I'm so horrible at PHP it isn't funny. Can you help me? This is the index.template for Starlight theme.
ruaduck, your problem is unfortunatelly more complex than you think,
if you want to use shoutbox in this theme, this is what you have to do:
1. replace index.template of Starlight with the one attached in my post.
2. change text color of shoutbox or change background of forum
because otherwise you won't see a thing.
I have just added the smileys to the shoutbox and followed the instructions correctly. The open/close does not appear to work.
collapse1 is undefined
The animatedcollapse.js is in the mymod folder which is in the root of the forum
Any help would be appreciated :)
I'm having massive problems to add the smileysbar.
Where exactly do i have to add the following code?
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>
I cant get that to work. I always get the following error:
Quote
Parse error: syntax error, unexpected '<' in .../Themes/blueglass/index.template.php on line 751
747:
748:
749: // YSHOUT END
750:
751: <div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>
752:
753:
...
I install this mod in my board, and is ...loading shoutbox... all time.
I know that the problem is de "board_url" becouse i'm using a subdomain "foro.elsantuario.es" (when i use "elsantuario.es/foro" is all ok). What can i put in the board_url in order to correct the problem?.
thanks a lot, great mod!.
@Nascarfan: The actual code to search for is this one...
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>
You then add the smiley code so it looks like this....
// 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><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>';
// YSHOUT END
Hope that helps :)
@Daggers: See this code in step 4?
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
This is where collapse1 is defined. If it's missing or changed, then it will say collapse1 is undefined.
@Kjeldor: Since you are using SEO URLs, the URL http://foro.elsantuario.es/yshout/yshout.php redirects back to the main forum page! This would certainly make the shoutbox not work. So, you need to disable search-engine URLs.
nneonneo, got that mate...
// 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><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>';
// YSHOUT END
But still it says undefined :(
All on one line? That won't work, the comment will make it invisible...
Quote from: nneonneo on April 26, 2008, 03:44:23 PM
All on one line? That won't work, the comment will make it invisible...
Please advise
How did all the code end up on one line?
Daggers (and NascarFan), it should be
// 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>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
// YSHOUT END
Quote from: nneonneo on April 26, 2008, 05:21:46 PM
How did all the code end up on one line?
He did it ------->
;)
I have entered all of the above on seperate lines and it still does not work. It now says..
collapse1 is null or not an object
:(
Did you put
<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script>
in the header?
If it still doesn't work, post/PM a board URL and I'll take a look.
So.. This is messing with the user's actions on the "Who's Online List," it always has users as viewing the board index, is there a way to fix this?
I don't know -- I'm not sure where the online info is set. Presumably, this is happening because the shoutbox loads some file, which eventually sets the online info (incorrectly), but I'm not sure how I can fix it :-\
Quote from: nneonneo on April 26, 2008, 01:38:19 PM
@Kjeldor: Since you are using SEO URLs, the URL http://foro.elsantuario.es/yshout/yshout.php redirects back to the main forum page! This would certainly make the shoutbox not work. So, you need to disable search-engine URLs.
Your work running on another website, thanks ;)
I installed this shoutbox but I can't find in admin panel place where I could modify shoutbox.
In attachment you can also see that the place for shoutbox was created but there is no place where to write in shout.
Also I didn't say that I'm using croatian language, and default theme. ;)
@W. Riker: There's no admin panel; settings are changed by editing the file yshout/yshout.php, and a few changed in yshout/js/yshout.js. Some text seems to be missing, so you should probably copy Themes/default/languages/Modifications.english.php to Modifications.croatian.php.
OK.
Now it is there text ...loading shoutbox... and just stay all the time.
I one more thing... I wish that guests can not shout. :D
I fixed this problem with loading shoutbox. ;)
Now I'm just interested in two things...
1) Is it possible to make that guests on forum don't see (and can't use shout)? And what should I do to make so?
2) How could I make that the newest shout goes to the top, and not to the bottom?
Thanks! O:)
1) set $allowGuests to false in yshout/yshout.php
2) http://www.simplemachines.org/community/index.php?topic=137508.msg1276450#msg1276450
Thanks a lot. O:)
Now everything works just fine. 8)
It is me again. :P
I wonder is it possible to make shouts in history as same as on forum... the newest on the top?
Yes and I done so... but in the history the newest post still goes to the bottom.
Right, sorry.
Change
echo preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$text);
to
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$text);
echo implode("\n", (array_reverse(explode ( "\n", $chatText ))));
Thanks! 8)
forgive, I do not speak English, I speak Spanish
install chat nneonneo's Shoutbox
used as 755 and 777 permits each user of the forum run chmod
to have 500 users online permits and many are hosting collapses because spends a lot of ram, is automated and now I dropped to all permits to 644 including the forum
my site is very slow because it uses many permits
badwtih the ends very quickly
The automated program of hosting me change the permissions to 644 and my forum stops working
I recommend?
can you tell me how can I do to chat only be updated by pressing "F5"
modifacion can you tell me that I need to do so chatting only has 50 lines? where I have to change
can you tell me as I chat that is visible to visitors but could only write if they are registered in the forum
can you tell me the permissions of files and folders chat?
thank you very much, forgive not speak English
chek my web foroceleste.com
Is it possible to modify shoutbox somehow that it is visible only the 8 newest shouts on forum and not 12 as it is set in default?
i have problem, look there http://www.hhhoo.yoyo.pl/smf_1/ , shoutbox works right, but there shoutbox doesn't work (http://img137.imageshack.us/img137/1007/32eadsfms6.jpg) http://hakov.ovh.org/smf_1/index.php , anyone knows how to repair it??
hmm now i haven't ....loading shoutbox.... , but blank screen in place where should be shoutbox....
@arranka: In your case, it looks like permissions aren't really the thing you need to worry about. If you have 500 users (online at the same time), then it is quite likely you will need a more powerful hosting system to handle the load.
@W. Riker: $max_lines, then /clear a few times to make the change take effect
@hoo: I can't see the shoutbox (not access yshout/yshout.php) at either location. Is it installed?
nneonneo, please see now http://hakov.ovh.org/smf_1/index.php, cause before i tried many times install and uninstall.
I read first post ,and in troubleshotting it was something with board dir,path, if it cause shoutbox doesn't appear, i don't know what to change, please help me.
hoo, look here (error 500): http://hakov.ovh.org/smf_1/yshout/yshout.php
Try the suggestions (making the file and directory permissions 705).
please can you go on msn i need fast to repair it, i gave now already permission to yshout.php and yshout (705)
Thanks nneonneo! 8)
EDIT:
Is it possible to change shoutbox somehow that shoutbox have permanent size (example: 5 centimeter in height) but that is visible last 20 shouts... by method scroll down ???
hey, can you help me? i get an error:
Notice: Undefined index: ID_POSTGROUP in /home/webXXX/html/XXX/yshout/yshout.php on line 230
Thank You!!
See email.
let me try it
hi im new to this, and i was wondering if it was possible to make it so that guest cant post in the shoutbox.
Hi nneonneo, i have a strange problem with your shoutbox...
I have installed it on my forum (http://nintendo-meyf.eu/forum), on the theme Musiconica, with manual installation and it was ok, worked very fine,but after i have tried to change the position and the layout of it, it's disapeared!
Now with the code all in the right place, or maybe i think so, the shoutbox doesn't appear...
I have also tried with the default theme and in this case the shoutbox doesn't load, i can see only the 'shoutbox is loading...' notice
Hiii I have smf 1.1.4 + TinyPortal v0.9.8
I have not history & refresh, sorry for my bad engish :(
(http://img120.imageshack.us/img120/9958/shoutboxmh5.th.gif) (http://img120.imageshack.us/my.php?image=shoutboxmh5.gif)
Is there a way to turn off the timestamp in the shoutbox?
if so, what files do i need to edit?
also which file do i need to edit in order to make the shoutbox the size that i want.
I dont need the details, i just need to know which files to edit.
my search has failed me for these 2 questions.
thanks
i get this error wen try to install the smileys (im on smf 2.0)
(http://img219.imageshack.us/img219/2974/dibujozn6.th.png) (http://img219.imageshack.us/my.php?image=dibujozn6.png)
someone can help? thx
@Pills: set $allowGuestsPost to false in yshout/yshout.php
@guidoku310: I can't see any code related to the shoutbox except
// YSHOUT HERE document.getElementById("yshout").style.display = mode ? "none" : ""; if(!mode) { loadChat(); } // YSHOUT END
which shouldn't be there (it's for the default theme only).
The header section (with the JS includes and CSS) is missing, as is the actual shoutbox div.
@Prischy: Copy Themes/default/languages/Modifications.english.php as Modifications.<your language>.php.
@madman71: Of course. In yshout/yshout.php, to remove timestamps, you just have to make two changes:
preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
->
preg_replace_callback("/\[<timeval=(\d+)>\]/","preg_timeformat",$chatText);
return timeformat(intval($matches[1]));
->
return '';
As for font size/box size, try index.template.php or yshout-style.css; for # of lines, use $max_lines in yshout/yshout.php.
@ALEJO: I think you installed them incorrectly. Post the resulting code (which makes it not work)
Quote from: W. Riker on April 28, 2008, 07:53:22 PM
Is it possible to change shoutbox somehow that shoutbox have permanent size (example: 5 centimeter in height) but that is visible last 20 shouts... by method scroll down ???
Is it possible or not?
Yes, simply fix the height in yshout-style.css or index.template.php, and set "overflow: auto".
I can't get the membergroups working.
I want to make it so Global Moderators and Shoutbox moderator's can see and use the admin links.
I don't understand how to add membergroups though.
I tried like 10 things but nothing worked
Thank you nneonneo, now it work again! ;D
So should i remove the code
// YSHOUT HERE document.getElementById("yshout").style.display = mode ? "none" : ""; if(!mode) { loadChat(); } // YSHOUT END
from index.template.php of my theme?
I have other questions:
1. How i can change the format of timestamp?
2. How i can change the format of shout messages?
Yes, best if you removed it.
Format of timestamp: this is controlled by your user preferences -- it's the same as the forum. If you change it, it will affect everyone. See preg_timeformat in yshout/yshout.php for more information.
As for the format, I'm not sure what you are referring to.
I can't get the membergroups working.
I want to make it so Global Moderators and Shoutbox moderator's can see and use the admin links.
I don't understand how to add membergroups though.
I tried like 10 things but nothing worked
I'm using SMF2 BETA 3
You need to know the IDs of the groups, which you can get by observing the URL when you go to edit them.
Then, just plug those IDs into moderatorGroups.
Quote from: nneonneo on April 30, 2008, 04:11:37 PM
Yes, simply fix the height in yshout-style.css or index.template.php, and set "overflow: auto".
I couldn't fine this option in mentioned files. Can you please specify. O:)
Quote from: nneonneo on May 01, 2008, 12:16:05 AM
You need to know the IDs of the groups, which you can get by observing the URL when you go to edit them.
Then, just plug those IDs into moderatorGroups.
I know but when i try plugging them in it doesn't work
@W. Riker: http://www.simplemachines.org/community/index.php?topic=137508.msg1221413#msg1221413
See after the "++++++" bar.
@MrMoney: $moderatorGroups=array(4, 7);
is the way to do it. If it still isn't working, I probably broke something :P
@MrMoney: OK, so it is my fault. I forgot that SMF2 changed a few variable names :P
I will post an updated version some time today.
Oh ok i was like wtf?? Cause when i was using 1.1.4 i was able to change it. Ok i'll be looking out for the new version
Quote from: nneonneo on May 01, 2008, 09:58:25 AM
@W. Riker: http://www.simplemachines.org/community/index.php?topic=137508.msg1221413#msg1221413
See after the "++++++" bar.
There is no
#yshout {
in my index.template.php ::)
I love the shout box and it works great but are there some real admin functions like I want to type more than the characters allowed by defualt. Is there a way to let people type more than it is set to? If so, where do I make these changes.
Thank you.
Hi,
i have any problem. i remove the "welcome guest" and "member login" in the index.template.php.
after that;
(http://img291.imageshack.us/img291/427/chatab5.jpg) (http://imageshack.us)
What can i doing?
Here is a screenshot from the (index.template.php) in editplus3.
is anything wrong?
(http://img379.imageshack.us/img379/6672/tempvg1.jpg) (http://imageshack.us)
nneonneo fixed the smf2 glitch yet?
Quote from: W. Riker on May 01, 2008, 02:58:29 PM
There is no
#yshout {
in my index.template.php ::)
it's in your 'yshout-style.css' file.
I still have problems with nneonneo shoutbox
ends the fast badwith 40 gigas in 7 days
has a solution for this?
also uses a lot of ram server and exhausts their resources
Is there a way to put it into an external server and embedded?
If not remove spent chatting badwith
hire a dedicated server and pay over 1200 dollars just to use the chat I feel somewhat excessive
I'm doing something wrong? I can indicate that I am doing wrong?
thank you very much
omg :S today i got a email of my hosting saying that i over-charged the hosting or something like that :S it can be for the shoutbox?
they send me this
590 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 4940 Length: 20
591 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 4953 Length: 147
592 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 5100 Length: 20
593 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 5104 Length: 16
594 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 4940 Length: 20
595 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 4953 Length: 147
596 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 5100 Length: 20
597 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 5104 Length: 16
598 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_log_online.MYD SUCCESS Offset: 8304 Length: 20
599 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_log_online.MYD SUCCESS Offset: 8308 Length: 221
600 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_membergroups.MYD SUCCESS Offset: 140 Length: 20
601 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_membergroups.MYD SUCCESS Offset: 153 Length: 15
602 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_membergroups.MYD SUCCESS Offset: 360 Length: 20
603 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_membergroups.MYD SUCCESS Offset: 364 Length: 13
604 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_log_online.MYD SUCCESS Offset: 8304 Length: 20
605 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_log_online.MYD SUCCESS Offset: 8308 Length:
Quote from: ALEJO on May 02, 2008, 07:38:51 PM
omg :S today i got a email of my hosting saying that i over-charged the hosting or something like that :S it can be for the shoutbox?
they send me this
590 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 4940 Length: 20
591 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 4953 Length: 147
592 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 5100 Length: 20
593 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 5104 Length: 16
594 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 4940 Length: 20
595 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 4953 Length: 147
596 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 5100 Length: 20
597 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_members.MYD SUCCESS Offset: 5104 Length: 16
598 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_log_online.MYD SUCCESS Offset: 8304 Length: 20
599 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_log_online.MYD SUCCESS Offset: 8308 Length: 221
600 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_membergroups.MYD SUCCESS Offset: 140 Length: 20
601 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_membergroups.MYD SUCCESS Offset: 153 Length: 15
602 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_membergroups.MYD SUCCESS Offset: 360 Length: 20
603 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_membergroups.MYD SUCCESS Offset: 364 Length: 13
604 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_log_online.MYD SUCCESS Offset: 8304 Length: 20
605 8:03:47 PM mysqld.exe:7636 READ G:\FerozoDatabases\mysql\w1020359_fosmf\smf_log_online.MYD SUCCESS Offset: 8308 Length:
Ya uhhm i don't think so...
Quote from: nneonneo on April 30, 2008, 11:00:41 PM
Yes, best if you removed it.
Format of timestamp: this is controlled by your user preferences -- it's the same as the forum. If you change it, it will affect everyone. See preg_timeformat in yshout/yshout.php for more information.
As for the format, I'm not sure what you are referring to.
I'm refferring to the text formatting
Hey nneonneo, I sent u a PM with a problem.
Well i have installed the things onto the site much properly...
the problem i am facing is this....
all the text which is typed comes according to the sentence length
just see the image u will get it....
AND
also is there anything by which there can be buttons instead of links for the extended history and commands and other stuff ??? it would look much better...:)
also if you know...like when the chats are deleted at the end the previous msges mostly should appear...
but when you delete the chat the previous things dont appear up....
like in the sense if i delete all that chat the chat before will not appear up...
the chat box will be blank...
help out soon...!
1.15 is now being tested. The primary fix is compatibility with SMF2. Release should be later today if I don't find anymore bugs :P
@W. Riker: Try yshout-style.css.
@www.BoxingHumor.Net: yshout/yshout.php: $maxShoutChars.
@renkliforum: Did you reinstall it by some accident? Is there only one when logged out? I think that if you edit index.template.php and remove the second "duplicated" section it should be all fine. The section you showed in the screenshot has nothing to do with your problem (it's the upshrink code, which I will take out in 1.15 because it is causing problems).
@arranka, ALEJO: This shoutbox was never designed for a large server. The limitations of PHP make it difficult, if not impossible to implement real chatting features.
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/js/yshout.js to something higher, like 20000 (milliseconds). Then, you must change what comes after "/yshout/js/yshout.js?" in index.template.php (if you don't, some people will still have the old JS file, and that will cause problems).
After maybe a day or so, you can reduce $updateTimeout in yshout/yshout.php to 10 seconds or less (0 will make the shoutbox behave like an autorefreshing shoutbox with a 20 second delay).
@optimushunk: You installed it in a place where "center" alignment applies. Add something like <div style="text-align: left"> around the shoutbox, or add "text-align: left" to the yshout-style.css file.
Also, because of the way the shoutbox works, deleting displayed shouts won't bring back old ones -- the old ones are stored in history.
yea i know the old once arent possible to be brought back...but as they are stored in the history then can the code be written that the past 10 posts come back ??
and what about the buttons thing instead of the links onto the shoutbox...?
It's doable.
Attached is 1.15. I'll post a full changelog and update it on the main mod page tomorrow.
i am an idiot...how do i install this shoutbox using cpanel...i've made the changes to the ./Themes/default/index.template.php files...i don't understand where or what the following means..
Move the included directory "yshout" to "the root directory".
Move the included file "yshout/yshout-style.css" to "./Themes/default".
i DL'd the zip file and extracted...i don't know where to put this stuff...can it all load automatically?
on edit:i'm using SMF 1.1.4 at
http://www.sincitydoxies.org/forums/
PLEASE READ NEXT POST :)
somehow i got it...i think.. ::) only thing it doesn't have is any text in the "submit" button....nor is there anything above the box (History, Commands, Extended History, etc.), as shown in the screen shot in the first post of this thread...
can anyone look? am i still missing something?
thanks again..
william
http://www.sincitydoxies.org/forums/
Today i banned someone (from the forum and from the shoutbox) and he still posted in the shoutbox :S
@william_04_x: Package manager -- should be able to automatically install it by uploading the zip file!
@ALEJO: How did you ban him? Did you use the link provided, or did you ban him by display name? It's possible to evade a display name ban, but not a username ban.
Is it possible to make it scrolling instead of disappearing? Also, can you input a custom number to make it display # of shouts in that box? Next, i want to limit the # of shout it shows on history.
is possible change the dimension of text wrote in the shoutbox?
@Enders: Scrolling, yes. http://www.simplemachines.org/community/index.php?topic=137508.msg1221413#msg1221413
See after the "++++++" bar.
History: yes. In function history(), reduce 250 in $n=250;.
@edi67: what do you mean by dimension?
[announce] 1.15 released. This release is primarily to improve compatibility with SMF2, and enable the Package Manager. Among the features which were updated to work with SMF2 are the member groups ($moderatorGroups) and member banning via the "ban" button (the traditional /ban* interface was not affected).
Adding a scroll bar (credits to vno (http://www.simplemachines.org/community/index.php?topic=137508.msg1221413#msg1221413) for this; reworked for 1.14+)
In your theme's index.template.php or yshout-style.css, add this:
#yshout #shouts {
overflow: auto;
width: 165px; /* the width you want to display */
height: 200px; /* the height you want to display */
}
before:
#yshout {
For a nice autoscroll effect:
Quote from: nneonneo on August 04, 2007, 07:30:18 PM
This code is adapted from http://radio.javaranch.com/pascarello/2006/08/17/1155837038219.html.
In yshout/js/yshout.js:
Find
// Set off the AJAX call to load the chat form into the empty yShout div
Add BEFORE
var chatscroll = new Object();
chatscroll.Pane = function(scrollContainerId){
this.bottomThreshold = 20;
this.scrollContainerId = scrollContainerId;
this._lastScrollPosition = null; /* fixed 2008-05-27: changed from 100000000 to null */
}
chatscroll.Pane.prototype.activeScroll = function(){
var _ref = this;
var scrollDiv = document.getElementById(this.scrollContainerId);
var currentHeight = 0;
var _getElementHeight = function(){
var intHt = 0;
if(scrollDiv.style.pixelHeight)intHt = scrollDiv.style.pixelHeight;
else intHt = scrollDiv.offsetHeight;
return parseInt(intHt);
}
var _hasUserScrolled = function(){
if(_ref._lastScrollPosition == scrollDiv.scrollTop || _ref._lastScrollPosition == null){
return false;
}
return true;
}
var _scrollIfInZone = function(){
if( !_hasUserScrolled() ||
(currentHeight - scrollDiv.scrollTop - _getElementHeight() <= _ref.bottomThreshold)){
scrollDiv.scrollTop = currentHeight;
_ref._isUserActive = false;
}
}
if (scrollDiv.scrollHeight > 0)currentHeight = scrollDiv.scrollHeight;
else if(scrollDiv.offsetHeight > 0)currentHeight = scrollDiv.offsetHeight;
_scrollIfInZone();
_ref = null;
scrollDiv = null;
}
var divScroll;
Find
function setupChat() {
Add AFTER
divScroll = new chatscroll.Pane('shouts');
objDiv = document.getElementById('shouts');
objDiv.scrollTop = objDiv.scrollHeight;
Find
function startRefresh() {
if (!refreshSet) {
setTimeout("doRefresh()", refreshTime);
refreshSet = true;
}
}
function schedRefresh() {
if (refreshSet) {
setTimeout("doRefresh()", refreshTime);
}
}
Replace with
function startRefresh() {
if (!refreshSet) {
refreshSet = true;
schedRefresh();
}
}
function schedRefresh() {
if (refreshSet) {
setTimeout("divScroll.activeScroll()", 5);
setTimeout("doRefresh()", refreshTime);
}
}
EDIT: Fixed a small bug in the autoscroll code.
Quote from: nneonneo on May 05, 2008, 11:17:14 AM
@edi67: what do you mean by dimension?
i means font size more big
yeah! 1.1.5 compatibility, i will try it
ty!
Anyway to to hide the shoutbox from a certain membergroup?
Hello, I loaded up the Shoutbox for the SMF v1.1.5 today and attempted to follow the instructions to correct the box saying just, "Loading Shoutbox". I failed to get it to work. I do have alterations to my index.template.php file so I don't know if this was the cause.
Anyway, in the process to uninstall it I got the red Warning but let it uninstall anyway. Well that failed also and I have a permanent shoutbox.
So where do I look to get this uninstalled 100%?
Quote from: Slug1 on May 05, 2008, 02:42:04 PM
Hello, I loaded up the Shoutbox for the SMF v1.1.5 today and attempted to follow the instructions to correct the box saying just, "Loading Shoutbox". I failed to get it to work. I do have alterations to my index.template.php file so I don't know if this was the cause.
Anyway, in the process to uninstall it I got the red Warning but let it uninstall anyway. Well that failed also and I have a permanent shoutbox.
So where do I look to get this uninstalled 100%?
Yes uninstall is not working.
You will have to manually edit your index.template.php and remove the 2 script blocks that start and finish with /yshout
Also I notice that the directory yshout was not removed so I did it manually.
Quote from: nneonneo on May 05, 2008, 12:47:34 AM
@ALEJO: How did you ban him? Did you use the link provided, or did you ban him by display name? It's possible to evade a display name ban, but not a username ban.
i banned him on the shoutbox with the button at the left of the name, and i banned him from the froum too...
Quote from: Slug1 on May 05, 2008, 02:42:04 PM
Hello, I loaded up the Shoutbox for the SMF v1.1.5 today and attempted to follow the instructions to correct the box saying just, "Loading Shoutbox". I failed to get it to work. I do have alterations to my index.template.php file so I don't know if this was the cause.
Anyway, in the process to uninstall it I got the red Warning but let it uninstall anyway. Well that failed also and I have a permanent shoutbox.
So where do I look to get this uninstalled 100%?
I had the same problem, It all installed ok but would not work..........and uninstall gives a Parser error. I just uploaded a backup of my index.template.php and deleted the yshout manually.
OK, fixed it now. Thanks allot!
@edi67: font-size in yshout-style.css or index.template.php
@Slug1, jossanaijr, Cobra97: I included a broken package-info.xml file. That's now been fixed; thanks for noticing it!
@RobXduffy: One way: after
if (count(array_intersect($moderatorGroups, $membergroups)) > 0)
$user['is_mod']=true;
in yshout/yshout.php, add
if (count(array_intersect(array(<membergroup IDs not allowed to access>), $membergroups)) > 0)
die('Sorry, you can't access the shoutbox.');
This has the disadvantage that the shoutbox is still visible, but disabled. To completely hide it, you would have to edit index.template.php and add code like this:
if(loadMemberData(Array($context['user']['id']),false,'profile')!==false)
{
global $user_profile;
$userData=$user_profile[$context['user']['id']];
$membergroups=$userData['additionalGroups']; // use additional_groups for SMF2
$membergroups=explode(',', $membergroups);
$membergroups[]=$userData['ID_GROUP']; // use id_group for SMF2
$membergroups[]=$userData['ID_POSTGROUP']; // use id_post_group for SMF2
if (count(array_intersect(array(<membergroup IDs not allowed to access>), $membergroups)) == 0)
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>';
}
In my forum i can see the shoutbox but when i make a click in "History" nothing happend what i can do?
and
i want to add the scroll but when i open: yshout-style.css and put the:
#yshout #shouts {
overflow: auto;
width: 165px; /* the width you want to display */
height: 200px; /* the height you want to display */
}
dindt work appear the same thing
i don't have any text in the "submit/shout" button....nor is there anything above the box (History, Commands, Extended History, etc.), as shown in the screen shot in the first post of this thread...
am i still missing something?
@william_04_x: Copy Modifications.english.php to Modifications.<yourlanguage>.php.
@NIBOGO: It's yshout-style.css *or* index.template.php for a custom theme.
Hello! I want these features if possible.
-Add a bbc code on top.
-Seperate the panel (history, commands, extended history, so on..) from messages using hr. Also display it neater like history | commands | so on..|
-How do you show more shouts (ex: last 20 using scroll instead of last 10) without going to the full history.
Quote from: nneonneo on March 21, 2008, 12:28:36 PM
@Niagra: The member map is using onload events to position the pins. The shoutbox, however, loads after the page does, so the pins are placed before the shoutbox is completely setup.
The easiest thing to do is simply to disable the shoutbox on that page.
In yshout/js/yshout.js, under
function loadChat() {
if ($("yshout").style.display=="none") return;
add
if(document.location.href.indexOf("action=mm")!=-1) {$("yshout").style.display="none"; return;}
and the shoutbox will simply not load on that page.
For the second problem, presumably TinyPortal isn't even active on the other pages -- have you put the shoutbox in TP and in index.template.php? If so, then it is quite easy to make this change -- you just edit index.template.php, set a small table tag with two columns, putting the shoutbox in the left and whatever you want in the right.
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="50%">!!SHOUTBOXCODE!!</td>
<td>
!!OTHERTHING!!
</td>
</tr>
</table>
@Mystiquo: why did you need to use onstop?
Hi there... well i tried this in my index template and its giving a parse error on the line that says width 100% padding and border stuff at the top of this code. anyway here is what change I made Let me know what th problems are ok?
<table width="100%" cellpadding="0" cellspacing="0" border="none">
<tr>
<td width="30%"><img src="http://www.frogn.com/Photos/fansign.jpg" /></td>
<td>
//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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Feb242008" 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.5;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #ccc;
}
#yshout .adminlink {
font-size: 6pt;
color: #afffe9;
}
#forum-name, #shout-text, #shout-button {
font-size: 10px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #000000;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #fff;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
</style>';
//YSHOUT END
</td>
</tr>
</table>
Thanks by the way ..
Hi, i installed the SB and its a really nice mod, but at me it makes often errors..., sometimes comes:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/forum/host1/board/Sources/Subs.php on line 321
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/forum/host1/board/Sources/Errors.php on line 123
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/forum/host1/board/Sources/Errors.php on line 124
and after refresh comes something with "SMF could not connect to database....".
How can i fix it? thanks for your help
Quote from: nneonneo on May 05, 2008, 08:02:32 PM
@RobXduffy: One way: after
if (count(array_intersect($moderatorGroups, $membergroups)) > 0)
$user['is_mod']=true;
in yshout/yshout.php, add
if (count(array_intersect(array(<membergroup IDs not allowed to access>), $membergroups)) > 0)
die('Sorry, you can't access the shoutbox.');
This has the disadvantage that the shoutbox is still visible, but disabled. To completely hide it, you would have to edit index.template.php and add code like this:
if(loadMemberData(Array($context['user']['id']),false,'profile')!==false)
{
global $user_profile;
$userData=$user_profile[$context['user']['id']];
$membergroups=$userData['additionalGroups']; // use additional_groups for SMF2
$membergroups=explode(',', $membergroups);
$membergroups[]=$userData['ID_GROUP']; // use id_group for SMF2
$membergroups[]=$userData['ID_POSTGROUP']; // use id_post_group for SMF2
if (count(array_intersect(array(<membergroup IDs not allowed to access>), $membergroups)) == 0)
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>';
}
I'm not having any luck with this.
I got the following error in the shoutbox:
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/content/r/o/b/robxduffy/html/forum/yshout/yshout.php on line 234
Can i email you my index.template.php and you can change it up so membergroup 4 sees nothing?
Do you take donations? I'd be willing to do a paypal donation or something of the sort for your time.
Hi nneonneo,
I just discovered something dangereous.
In your script, there are some security risk.
In your shoutbox's History button, there some ways to execute very malicious code.
./yshout/yshout.php?file=home.txt&history
I can't imagine if someone change the 'home.txt' file with some very dangereous php script.
Thanks for your reply.
Quote from: nneonneo on May 05, 2008, 08:02:32 PM
@edi67: font-size in yshout-style.css or index.template.php
i change this data but nothing appear everything remain the same :(
#yshout {
font-size: 16px;
Quote from: nneonneo on February 25, 2008, 06:01:59 PM
Ah! Not surprisingly, the problems are related.
Thanks for finding this. The bug has been traced to the prototype.js library. I will have to do some trickery to get rid of the library (newer versions still have this bug).
In Firefox, the additional functions added by the library are misinterpreted as array elements, causing FF to add tons of extra cells to the stat row.
In IE, the additional functions confuse the JS system which promptly throws an error.
Either way, the library has to go (it's part of the base JS core). It may take a while for me to recode the necessary bits, so bear with me here for a short while. It should not be long before I can fix it, but I cannot do that today for I have a midterm to write.
Thanks for finding & reporting it.
Hi.
Do you have any idea solution to a problem?
Quote from: master2oo8 on May 06, 2008, 08:00:46 AM
Hi, i installed the SB and its a really nice mod, but at me it makes often errors..., sometimes comes:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/forum/host1/board/Sources/Subs.php on line 321
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/forum/host1/board/Sources/Errors.php on line 123
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/forum/host1/board/Sources/Errors.php on line 124
and after refresh comes something with "SMF could not connect to database....".
How can i fix it? thanks for your help
somebody here who can help me with this problem? :)
Quote from: nneonneo on May 06, 2008, 12:49:22 AM
@william_04_x: Copy Modifications.english.php to Modifications.<yourlanguage>.php.
@NIBOGO: It's yshout-style.css *or* index.template.php for a custom theme.
i use the default theme :s
Thanks
@Enders: You can edit the yshout/yshout.php file after the case "init": line. All the header stuff right before the shouts is printed in that section. For number of lines, use $max_lines.
@Niagra: The problem is that you put that in the middle of a PHP string, so it will not work.
1) <td>
//YSHOUT HERE
change to
<td>';
//YSHOUT HERE
2) //YSHOUT END
</td>
change to
//YSHOUT END
echo '</td>
@master2oo8: This means that your host has a low maximum connection limit. Try to see if it can be increased, or try the performance tips on the main mod page if you have a large forum.
@RobXduffy: Post an index.template.php. Donations can be posted to nneonneo [AT] gmail [DOT] com.
@kwilyan: Can you be more specific? I don't think there's a problem, since $chatFile and $logDir are both sanitized, and the script doesn't execute any of the contents (it just passes the contents through a few text filters to make it cleaner), but there's always a chance that I've missed a spot. If you could PM a URL or something which is potentially dangerous, I'd really appreciate it.
@edi67: custom theme?
@denio: That problem was resolved in version 1.13 by stripping prototype.js.
@NIBOGO: Default theme -- Themes/default/yshout-style.css.
Quote
@master2oo8: This means that your host has a low maximum connection limit. Try to see if it can be increased, or try the performance tips on the main mod page if you have a large forum.
i have a dedicated server, what/where i must change to fix this?
I don't know, cPanel, maybe.
I added scrolling to my shoutbox and everytime a new message is sent, it doesn't auto scroll down to that post. It also happens when it first loaded. Also, stop the auto scroll if the scroll bar isnt all the way down.
@nnenneo
i added the shoutbox in the board description with this code:
<div id="yshout">',$txt['yshout_loading'],'<br />
[/quote]
but you have written that this method is NOT recommended. maybe is that the error?
btw i wanted to change the refresh time, so i edited the yshout.js and changed "var refreshTime = 30000;", but it dont have effect :(
I made sort of guide for dummies, or something like that, to place this shoutbox in News field, and make it look cool on forum.
Personally, I believe this is the best position for shoutbox, and if you don't need News on your forum you could place shoutbox instead.
NOTE: I wrote tutorial and it works for 1.17 !!!
NOTE 2: With nneonneo's help - this works like a charm with version 1.21 also :)
For 1.21 installation see step 4 (http://postthatpic.com/files/2526/4.png) instead of step 1(http://postthatpic.com/files/2526/1.png), and then
follow all other steps normally.
(http://postthatpic.com/files/2526/1.png)STEP 1
First steps you already know, but I'll repeat it just in case;
First download yShout and install it.
If you're using different theme than default one after
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
you must add this code into your index.template.php :
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" 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;
}
</style>';
// YSHOUT END
(http://postthatpic.com/files/2526/2.png)
Then do this:
Of course you need news box to be displayed in order to see shoutbox in your index page.
To do that go to Theme options and click to:
1. DISABLE eNews (http://postthatpic.com/files/2526/inflame.gif) [it is very dangerous to leave it enabled, so if it is checked,
you must uncheck it]
&[/]
2. Show news fader on board index [check it]
3. fading delay - set to 0
Click save, then in News box put this code
a) for 1.15-1.17 <div id="yshout">',$txt['yshout_loading'],'
b) for 1.21 <div id="yshout">Loading shoutbox...</div>
instead of putting second code somewhere else:
And save it.
(http://postthatpic.com/files/2526/3.png)
If you wish to change News to Shout box or Shoutbox you'll need to find file index.english-utf8.php / index.english.php or of any other language file you're using. They are stored under Forum/Themes/default/languages/ In there you'll need to edit string $txt[102] = 'News';
to $txt[102] = 'Shoutbox'; and re-upload that file to it's place. You'll need to replace old file with that new-one if you didn't delete old one first.
// GUIDE FOR DUMMIES IS FINISHED // I guess that's it. I hope it shall be helpful to at least someone.[/]
Step 4 is actually step 1 FOR 1.21 installation
(http://postthatpic.com/files/2526/4.png)
In index.template.php, after
// 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" />';
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
Best of luck 2 everyone[/hr]
@ nneonneo Here it is. Can you make it so membergroup 4 cant see the shoutbox. thank you nneonneo
I got a big issue. After i uninstall the shoutbox and all the files are gone, i still keep getting a
SHOUT BOX
Loading Shoutbox at the top of my page! Why is this so? How can i remove it?? Its irritating as hell!
Kindly help me
Hi I now have the blank index.htm and no shoutbox appearing on my pages at all.. I am using English, smf 1.1.5 and the Dilber Multicolor theme
I'd like to know if there is any way to change the font color for the box where it says [Today at 05:06:44 PM] Right now it's black and I have a darkgray background and it's ver hard to see.
I couldn't find it in the style.css
Thanks
nnenneo i dont know what i have to modify in that file to have the scroll
i can upload my yshout-style.css and you can modify that part????
thanks
Quote from: NIBOGO on May 07, 2008, 07:15:59 PM
nnenneo i dont know what i have to modify in that file to have the scroll
i can upload my yshout-style.css and you can modify that part????
thanks
Why not just read? It says what you need to change
How do you put it under the stats box with a bar labeling shoutbox?
Quote from: Cobra97 on May 07, 2008, 06:25:31 PM
I'd like to know if there is any way to change the font color for the box where it says [Today at 05:06:44 PM] Right now it's black and I have a darkgray background and it's ver hard to see. I couldn't find it in the style.css
In the first code you added to your index.php, to display shoutbox, is actually some .css.
Here is the line you need to edit:
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
Today is a good day. :D
I have been struggling with an "upshrink" for the shoutbox for a while and I have seen others ask for it once or twice. I finally managed to get it to work so it only takes up space if the viewer is using it. See it here (http://www.empireofthesun.net/forum/index.php?action=refer;sa=smf).
It's nothing more than an alteration of the Info Center upshrink. (After quite a while of scratching my head as to why it wouldn't work, I finally noticed that I had never added the proper variable to the database! :P )
Maybe nneonneo can add it to this fantastic mod as an option. ;D
SunKing, could you maybe post some instructions how to do it?
I will certainly try. :P
My theme is a butchered version of the default them, so with that in mind, there may need to be some adjustments to make it work in your particular case. My code is also chopped up bits I've assembled to fit my needs. Don't expect it to be pretty. ;D
[EDIT]: This is for SMF2.0+. SMF 1.x does not support smfToggle which is what is used to make the shoutbox collapse. Sorry for any confusion. :P
in the index.template.php
find this
</head>
and before it add this
// script for shoutbox upshrink
echo'<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the shoutbox header object.
var sbHeader = new smfToggle("upshrinkSB", ', empty($options['collapse_shoutbox']) ? 'false' : 'true', ');
sbHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
sbHeader.setOptions("collapse_shoutbox", "', $context['session_id'], '");
sbHeader.addToggleImage("upshrinkSB", "/upshrink.gif", "/upshrink2.gif");
sbHeader.addTogglePanel("upshrinkSBHeader");
sbHeader.addTogglePanel("upshrinkSBHeader2");
// ]]></script>';
find this
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
and before it add this
function shoutbox()
{
global $txt, $options, $settings;
echo'<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;"><a href="#" onclick="sbHeader.toggle(); return false;"><img id="upshrinkSB" src="', $settings['images_url'], '/', empty($options['collapse_shoutbox']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" /></a> ';
// Block Title
echo'<span width="100%"></span><span>ShoutBox</span>';
echo'</div><div id="upshrinkSBHeader"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
echo '<div>
<div id="yshout"><table height="306px"> </table></div>';
echo'</div>';
// SHOUTBOX END
echo' </td>
</tr>
</table></div></div>';
echo '
<table id="upshrinkSBHeader2"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';
}
finally, find this
// Show the menu here, according to the menu sub template.
template_menu();
and add before it this
echo' </table>', shoutbox(), '</div></table>';
In my theme layout, this puts the shoutbox neatly tucked between the user info area and the menu buttons. Depending on your theme, for that last step, you simply put shoutbox(); wherever you want the shoutbox to appear. You may have to alter things such as <table>'s or <div>'s to get it to come out desireable for you. Mine was through simple trial and error.
Oh, and I almost forgot (again), mine didn't seem to work right until I added the variable to my database. I just went in and manually INSERTed the info (1, 1, collapse_shoutbox, 1) into smf_themes. I have no idea how to write a script for that but I am sure the gurus in here can. My coding knowledge is hopelessly small.
Hope this helps.
[EDIT] I removed the "minimize by default" setting -- it minimized on every page load/refresh...
[EDIT] Thanks to ameo for bringing a few errors to my attention (now corrected).
Quote from: ameo on May 08, 2008, 03:50:37 AM
Quote from: Cobra97 on May 07, 2008, 06:25:31 PM
I'd like to know if there is any way to change the font color for the box where it says [Today at 05:06:44 PM] Right now it's black and I have a darkgray background and it's ver hard to see. I couldn't find it in the style.css
In the first code you added to your index.php, to display shoutbox, is actually some .css.
Here is the line you need to edit:
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
Thank You ameo.............That did the trick!
@Enders: There's an autoscroll mod somewhere in this thread. Unfortunately, the search feature on this topic seems to be a bit broken, so I can't locate it.
EDIT: Found it. See http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028 for reposted guide.
As for your second question: the following puts it under Forum Stats, but above Users Online.
In Themes/default/BoardIndex.template.php, before
// "Users online" - in order of activity.
echo '
<tr>
add
// YSHOUT HERE
echo '<tr>
<td class="titlebg" colspan="2">Shoutbox</td>
</tr><tr>
<td class="windowbg2" width="100%" colspan="2"><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></td></tr>';
// YSHOUT END
@master2oo8: refreshTime is only half of the refresh system. The other half is controlled by $updateTimeout.
You need to change refreshTime, then update what comes after yshout.js? in index.template.php (if you don't, cached copies of the JS will cause problems).
After a day or so, to let the changes be visible, reduce $updateTimeout and you should notice the reduction in refresh speed.
@ameo: Nice guide! I will make a note of it on the mod page. As for the shout button, I think the Modifications.english.php file should have the right text for yshout_shout_button...
@RobXduffy: Use
// YSHOUT HERE
if(loadMemberData(Array($context['user']['id']),false,'profile')!==false)
{
global $user_profile;
$userData=$user_profile[$context['user']['id']];
$membergroups=$userData['additionalGroups']; // use additional_groups for SMF2
$membergroups=explode(',', $membergroups);
$membergroups[]=$userData['ID_GROUP']; // use id_group for SMF2
$membergroups[]=$userData['ID_POSTGROUP']; // use id_post_group for SMF2
if (count(array_intersect(array(4), $membergroups)) == 0)
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
in place of the original block.
Note that this doesn't entirely revoke access, but it merely hides the shoutbox.
To completely disable it for these users, you must also do the changes suggested for yshout.php:
after
if (count(array_intersect($moderatorGroups, $membergroups)) > 0)
$user['is_mod']=true;
add
if (count(array_intersect(array(4), $membergroups)) > 0)
die('Sorry, you can't access the shoutbox.');
@markvon: If you want to completely remove the shoutbox, go to index.template.php and remove the three or four blocks of code between // YSHOUT HERE and // YSHOUT END.
@mjltigger: Blank index.htm? You need to manually install the shoutbox for Dilber MC. This has been covered before, and it is a matter of following the directions on the main mod page for installing to other themes.
@edi67: Should be in index.template.php of the custom theme, per the instructions on the main mod page. There's a large CSS block there.
hi dear,
ShoutBox does not fully load.
it says
Shout Box
...loading shoutbox...
But nothing end up
what to do?
thanks
See main mod page for things you can do to fix the problem, or at least determine the cause.
How i can have a collapsable shoutbox???
I put a "how-to" just a few posts up of how I managed to make my shoutbox collapsible. It works smoothly for me. My shoutbox is integrated into the upper portion of the main page and is set up basically for the default theme. But the code is there and would probably work on the majority of other themes with a little bit of shuffling around.
Hi nneonneo, your shoutbox has been working fine for me in the Black Day theme. However, we decided to change the theme of our site to DarkBreak and since then, I cannot make the shoutbox work. What I have is overlapping shoutbox with the Board index. The same issue happens with OverView theme, also created by the same maker of DarkBreak (http://www.dzinerweb.com).
Can you help me check where is the proper placement of the YSHOUT codes in my index.template.php file? The shoutbox is working fine in these themes except for the fact that they are overlapping with other portions of the board, thus making it unreadable. Here is a screenshot of my site.
(http://img187.imagevenue.com/loc476/th_52822_Shoutbox_Error_122_476lo.jpg) (http://img187.imagevenue.com/img.php?image=52822_Shoutbox_Error_122_476lo.jpg)
(http://img208.imagevenue.com/loc211/th_52827_Shoutbox_Error_-_Highlighted_122_211lo.jpg) (http://img208.imagevenue.com/img.php?image=52827_Shoutbox_Error_-_Highlighted_122_211lo.jpg)
I have attached the index.template.php file here.
@dence66: The header area, where the shoutbox usually lives, is constrained to a certain size because of the background images. It won't be possible to put it in that spo without modifying the background images and redoing a large chunk of the theme.
I can, however, suggest an alternate placement: right above the linktree -- the thing that says
All Pinoy Stuff > Forum > Subforum > Topic
There, it should look more natural. To put it there, just put the shoutbox code right at the end of the template_main_above function, i.e. right before
}
function template_main_below()
Thanks nneonneo. I will try out your suggestion. However, I don't know which of the original 4 blocks of code will be put in your suggested location before function template_main_below(). May I ask which of the following 4 blocks of codes or how do I put all these codes in my index.template.php?
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Apr122008" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/yshout-style.css" />';
// YSHOUT END
// YSHOUT HERE
document.getElementById("yshout").style.display = mode ? "none" : "";
if(!mode)
{
loadChat();
}
// YSHOUT END
// 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
// 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
Quote from: nneonneo on May 06, 2008, 07:53:36 PM
@denio: That problem was resolved in version 1.13 by stripping prototype.js.
Thanks for reply :)
I have 1.15 version and my sb disappear aprox 2 disappear / 1 minute (Firefox and IE)
@dence66: 3rd or 4th (they're the same).
@denio: Reduce $updateTimeout in yshout/yshout.php.
hi nneonneo, thx for the wonderful mod.
i think my problem is the history has gotten too big. it is now 6.7MB so whenever I click on history, it will give out this error
Fatal error: Allowed memory size of 14680064 bytes exhausted (tried to allocate 237 bytes) in /home/acc/public_html/forum/yshout/class.tail.php on line 228
What can I do to trim the file? I cant open this file under windows now.
thanks for the awesome mod nneonneo..
i also read how to disable all bbcodes to prevent posting of images.. however my smileys vanished as well...
can i just disable a specific bbcode like [img] among others for instance...?
thanks!
EDIT: I found it exactly in page 20.... although why is list, center, etc... getting blank but when i include img in the array it leaves the closing ] in image... what is the difference between left and img just curious... lolz
this shoutbox works fantastic! thanks!
Quote from: SunKing on May 08, 2008, 10:15:14 PM
I put a "how-to" just a few posts up of how I managed to make my shoutbox collapsible. It works smoothly for me. My shoutbox is integrated into the upper portion of the main page and is set up basically for the default theme. But the code is there and would probably work on the majority of other themes with a little bit of shuffling around.
where is that how-to??
QuoteI will certainly try.
My theme is a butchered version of the default them, so with that in mind, there may need to be some adjustments to make it work in your particular case. My code is also chopped up bits I've assembled to fit my needs. Don't expect it to be pretty.
in the index.template.php
find this
Code: [Select]
<body>
and before it add this
Code: [Select]
// script for shoutbox............................etc, etc.
just click here (http://www.simplemachines.org/community/index.php?topic=137508.msg1536064#msg1536064) to go straight to it. ;)
Quote from: nneonneo on May 09, 2008, 08:51:57 PM
@SinnerSaint: 3rd or 4th (they're the same).
@denio: Reduce $updateTimeout in yshout/yshout.php.
Thank you so much nneonneo for your suggestion, the shoutbox is now working for the DarkBreak theme of my site. I just have follow up questions. Is there a way to change the line spacing of the shouts? It seems they are occupying double spaces and it makes the shoutout area extremely large. How can I also modify the codes so that the space used for typing the shouts can be much wider than the current width? I have attached the screenshot of the shoutbox now. Again thank you very much for this wonderful shoutbox.
(http://img80.imageshack.us/img80/3279/63216542hw3.jpg) (http://imageshack.us)
Here is a french translation for the Shoutbox:
// ---- Begin modification - nneonneo's Shoutbox ----
$txt['yshout_shoutbox'] = 'Zone d\'expression libre';
$txt['yshout_loading'] = '...chargement de la Zone d\'expression libre...';
$txt['yshout_rp_banned'] = "Désolé, vous avez été banni de la Zone d\'expression libre.";
$txt['yshout_no_guests'] = 'Désolé, vous devez être connecté pour utiliser la Zone d\'expression libre!';
$txt['yshout_ban_conf'] = 'Confirmation de bannissement';
$txt['yshout_select_mode'] = 'Sélectionnez le mode de bannissement:';
$txt['yshout_rp'] = 'Lire et poster';
$txt['yshout_p'] = 'Poster seulement';
$txt['yshout_error'] = 'ERREUR: ';
$txt['yshout_no_user'] = 'Utilisateur introuvable.';
$txt['yshout_del_success'] = 'Message supprimé.';
$txt['yshout_no_action'] = 'Aucune action à appliquer.';
$txt['yshout_history'] = 'Historique';
$txt['yshout_commands'] = 'Commandes';
$txt['yshout_exthistory'] = 'Historique Étendu';
$txt['yshout_hide'] = 'Cacher';
$txt['yshout_show'] = 'Afficher';
$txt['yshout_admlinks'] = 'LiensAdmin';
$txt['yshout_return'] = 'Retour à la Zone d\'expression libre';
$txt['yshout_p_banned'] = 'Vous avez été interdit de postage.';
$txt['yshout_banned'] = 'Banni';
$txt['yshout_shout_button'] = 'Publiez !';
$txt['yshout_banlist_caption'] = 'Bannissements de la Zone d\'expression libre (cliquez pour réintégrer)';
$txt['yshout_ip_bans'] = 'Bannissements d\'IP pour ';
$txt['yshout_username_bans'] = 'Bannissements d\'Utilisateur pour ';
$txt['yshout_ban_type_error'] = 'utilisez /banuser ou /banip !';
$txt['yshout_ban_mode_error'] = 'Un argument de mode doit être fourni.';
$txt['yshout_imp_slash_error'] = 'Préfixez le message avec un "/" (barre oblique) ! Postez "/help impersonate" pour plus de détails.';
$txt['yshout_imp_uname_error'] = 'Aucun nom d\'utilisateur fourni !';
$txt['yshout_imp_max4_error'] = '4 arguments maximum !';
$txt['yshout_cmd_reference'] = 'Référentiel des Commandes';
$txt['yshout_cmdlist'] = array(
'/help' => ' [command] : Aide à propos d\'une commande, ou toutes si aucune commande n\'est spécifiée.',
'/return' => ' : Retour à la Zone d\'expression libre.',
'/pi' => ' [digits] : Quelle est la valeur de pi à la <i>x</i><sup>e</sup> décimale ?',
'/me' => ' <message> : Personnalise le message (ex. <span style="color: red;">* Nathaniel aime les chiens</span>)');
$txt['yshout_cmdlistadmin'] = array(
'/clear' => ' : Efface complètement la Zone d\'expression libre.',
'/help' => ' [command] : Aide à propos d\'une commande, ou toutes si aucune commande n\'est spécifiée.',
'/return' => ' : Retour à la Zone d\'expression libre.',
'/banlist' => ' : Liste tous les bannissements en cours. Réintégrez les utilisateurs en cliquant sur leur nom.',
'/banuser' => ' <mode> <utilisateur> : Bannit un utilisateur par son nom d\'utilisateur. Vous devriez utiliser le nom réel de
l\'utilisateur, autrement le bannissement peut être contourné. Le mode peut être "u" pour réintégrer un membre, "rp" pour appliquer un bannissement de
lecture et postage ou "p" pour un bannissement de postage seulement.',
'/banip' => ' <mode> <IP> : Bannit un utilisateur par son adresse IP. Le mode peut être "u" pour réintégrer un membre, "rp" pour appliquer
un bannissement de lecture et postage ou "p" pour un bannissement de postage seulement.',
'/impersonate' => ' <utilisateur> [niveau] [ip] [id] /[message]: Usurper l\'identité d\'un utilisateur. Le message doit être préfixé d\'une "/" ou
l\'envoi échouera.<blockquote>
<utilisateur> : Nom d\'utilisateur dont on prend l\'identité<br />
[userlevel] : Niveau d\'utilisateur à utiliser. 0=normal, 1=modérateur, 2=administrateur<br />
[ip] : Adresse IP à utiliser, comme 1.2.3.4<br />
[id] : ID d\'utilisateur du forum, pour créer un lien vers le profil</blockquote>',
'/lock' => ' <message> : Bloque la Zone d\'expression libre en mode maintenance, avec un message spécifique.',
'/unlock' => ' : Débloque la Zone d\'expression libre du mode maintenance.');
$txt['yshout_maintenance'] = 'Bloquée';
$txt['yshout_lock_arg_error'] = 'Vous devez spécifier une raison pour la maintenance !';
$txt['yshout_lock_changed'] = 'Raison de la maintenance changée pour "%s".';
$txt['yshout_lock_success'] = 'Zone d\'expression libre bloquée pour maintenance pour la raison suivante : "%s".';
$txt['yshout_unlock_already'] = 'Échec du déblocage : la Zone d\'expression libre n\'est pas bloquée !';
$txt['yshout_unlock_success'] = 'Zone d\'expression libre débloquée avec succès.';
// ---- End modification - nneonneo's S
Quote from: SunKing on May 10, 2008, 12:40:15 PM
QuoteI will certainly try.
My theme is a butchered version of the default them, so with that in mind, there may need to be some adjustments to make it work in your particular case. My code is also chopped up bits I've assembled to fit my needs. Don't expect it to be pretty.
in the index.template.php
find this
Code: [Select]
<body>
and before it add this
Code: [Select]
// script for shoutbox............................etc, etc.
just click here (http://www.simplemachines.org/community/index.php?topic=137508.msg1536064#msg1536064) to go straight to it. ;)
Thanks but how i can do the same thing in my boardindex.template.php???
@toohow: Try Wordpad; Notepad isn't good at opening big files. I'd suggest either saving and compressing the old history if it's useful, or deleting it outright if it's not useful.
@jpveneracion: Add "(http://"%20and%20")" to the list instead of "[img" and see if that fixes it.
@dence66: It all has to do with CSS. First, copy yshout-style.css from Themes/default/yshout-style.css to Themes/<themename>/yshout-style.css to fix all the spacing and width issues, then tweak that file to your liking.
@Patriiick: Thanks very much! I will include it on the first page of this thread.
@NIBOGO: Except for the last part (about adding "echo' </table>', shoutbox(), '</div></table>';"), do the instructions for index.template.php; the last bit, you add to boardindex.template.php (n.b. you *may* need to add the shoutbox function to BoardIndex.template.php depending on what order the files get loaded). Of course, SunKing knows his code best, so if I'm mistaken, please let me know :)
(http://img301.imageshack.us/img301/4756/shoutly9.png)
how can i make it look like the old shoutbox?
nneonneo thanks for updating it I got other moderator groups working :)
Quote from: ALEJO on May 10, 2008, 07:30:51 PM
(http://img301.imageshack.us/img301/4756/shoutly9.png)
how can i make it look like the old shoutbox?
Yeah, I want to old shoutbox back. The new shoutbox is freakin ugly and WAY TO HUGE!
Please give me url to 1.13, I don't have it anymore and I love this mod, just not the latest version...
Quote from: Jelle Mees on May 10, 2008, 08:23:54 PM
Quote from: ALEJO on May 10, 2008, 07:30:51 PM
(http://img301.imageshack.us/img301/4756/shoutly9.png)
how can i make it look like the old shoutbox?
Yeah, I want to old shoutbox back. The new shoutbox is freakin ugly and WAY TO HUGE!
Please give me url to 1.13, I don't have it anymore and I love this mod, just not the latest version...
indeed is ugly...
here u have all the links http://custom.simplemachines.org/mods/index.php?mod=585
DO NOT INSTALL 1.15
Do not install 1.15 people, the interface is horrible. I uninstalled it and tried to install an older version, they didn't work. I installed 1.15 again and that one didn't work anymore either.
The 1.15 uninstallation changes something permanent, something that shouldn't have changed.
Don't install Southbox buggy edition ( = 1.15 ).
Because I updated the mod, I can now never use the mod again:
http://www.tm-belgium.info/index.php
Can someone help me uninstall this manually??? Please help me. I've already got 4 PM's about this...
open index.template.php and remove everything between
// YSHOUT HERE
and
// YSHOUT END
it will be in there three times
then open Modifications.english.php and remove everything between
// ---- Begin modification - nneonneo's Shoutbox ----
and
// ---- End modification - nneonneo's Shoutbox ----
then open Modifications.english-utf8.php and remove everything between
// ---- Begin modification - nneonneo's Shoutbox ----
and
// ---- End modification - nneonneo's Shoutbox ----
then all that's left is deleting the yshout folder from your board directory. That's it. No more shoutbox.
Now that was pretty painless, huh?
Thanks Sunking.
Currently working on my own shoutbox based on a very old chatscript I found on my computer. Also AJAX. The downside is that it's less advanced then this one, the positieve thing is that it requires only 16% of the space required by nneonneo's mod and it's about 1000x faster. You can have 15 people talking at the same time and it will still load as fast as an MSN conversation, in fact, it loads faster.
Preview:
http://i27.tinypic.com/121wwpl.jpg
Another positive thing is that it works on every single SMF version ever released. :)
Gonna release it next month, still need to work on stuff like url's, smileys, etc...
Quote from: nneonneo on May 10, 2008, 05:56:46 PM
@dence66: It all has to do with CSS. First, copy yshout-style.css from Themes/default/yshout-style.css to Themes/<themename>/yshout-style.css to fix all the spacing and width issues, then tweak that file to your liking.
on behalf of dence66 as co-admin Thanks!!! it works great ;)
@ALEJO, Jelle Mees: Looks like a problem with my package-info.xml file, which I thought I'd fixed. The style file isn't being copied, as it should be. I will try to fix this and post an amended package ASAP.
Quote from: nneonneo on May 10, 2008, 05:56:46 PM
@toohow: Try Wordpad; Notepad isn't good at opening big files. I'd suggest either saving and compressing the old history if it's useful, or deleting it outright if it's not useful.
@jpveneracion: Add "(http://"%20and%20")" to the list instead of "[img" and see if that fixes it.
@dence66: It all has to do with CSS. First, copy yshout-style.css from Themes/default/yshout-style.css to Themes/<themename>/yshout-style.css to fix all the spacing and width issues, then tweak that file to your liking.
@Patriiick: Thanks very much! I will include it on the first page of this thread.
@NIBOGO: Except for the last part (about adding "echo' </table>', shoutbox(), '</div></table>';"), do the instructions for index.template.php; the last bit, you add to boardindex.template.php (n.b. you *may* need to add the shoutbox function to BoardIndex.template.php depending on what order the files get loaded). Of course, SunKing knows his code best, so if I'm mistaken, please let me know :)
Thanks but i see of my problem is this:
"Oh, and I almost forgot (again), mine didn't seem to work right until I added the variable to my database. I just went in and manually INSERTed the info (1, 1, collapse_shoutbox, 1) into smf_themes. I have no idea how to write a script for that but I am sure the gurus in here can. My coding knowledge is hopelessly small."
I dont know how i can do it :(:(
THanks
Again, I have no idea how to make a script to do this automatically.
But to clarify what I did manually, in (1, 1, collapse_shoutbox, 1) the first entry is the member ID, the second is the theme ID, the third is the variable name (that is used in the above example) and the last is whether it is collapsed (1) or expanded (0). Hope that helps sort this out better so that maybe someone can just right a script to do this. :D (I can't even spell SQL.) :P
Quote from: Jelle Mees on May 10, 2008, 08:53:52 PM
DO NOT INSTALL 1.15
Do not install 1.15 people, the interface is horrible. I uninstalled it and tried to install an older version, they didn't work. I installed 1.15 again and that one didn't work anymore either.
The 1.15 uninstallation changes something permanent, something that shouldn't have changed.
Don't install Southbox buggy edition ( = 1.15 ).
Because I updated the mod, I can now never use the mod again:
http://www.tm-belgium.info/index.php
lol... that was so dramatic xD
Quote from: ALEJO on May 11, 2008, 03:07:29 PM
Quote from: Jelle Mees on May 10, 2008, 08:53:52 PM
DO NOT INSTALL 1.15
Do not install 1.15 people, the interface is horrible. I uninstalled it and tried to install an older version, they didn't work. I installed 1.15 again and that one didn't work anymore either.
The 1.15 uninstallation changes something permanent, something that shouldn't have changed.
Don't install Southbox buggy edition ( = 1.15 ).
Because I updated the mod, I can now never use the mod again:
http://www.tm-belgium.info/index.php
lol... that was so dramatic xD
hehe, it was, but if you encounter as much bugs as I do every day, it gets to you after a while.
I can't figure out why yshout-style.css isn't being copied to the right place -- it used to work, and I haven't changed a thing :-\
Attached is a modified index.template.php for the Mystic Jade theme by DzinerStudio (in SMF2.0 B3.1).
It is modified from a clean install of that theme, but otherwise ready to use.
It places the collapsible shoutbox just underneath the main menu buttons [HOME][ADMIN].... provided your shoutbox is installed into the default location of {boarddir}/yshout. The only other thing to be done is adjusting the line height of each shout. But the location+collapsible part is set up for you. ;)
Quote from: nneonneo on May 11, 2008, 03:47:34 PM
I can't figure out why yshout-style.css isn't being copied to the right place -- it used to work, and I haven't changed a thing :-\
can u tell us how to fix it manually?
I hope this is the right place to ask this as you can see by my post count im really new to this
I have followed pongsak smiley guide and have accomplished (page 45 i believe)all except the following:
<div style="padding: 1ex 25px 1ex 25px;"id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /></div>
I cant seem to find where that is so i can add the next info
all other steps are done
If anyone can direct me to where this would be it would be greatly appreciated
search for the text $txt['yshout_loading']
that string should be in your index.template.php
ALEJO: Copy yshout-style.css to Themes/default.
WOW! Sunking
I had read all the 114 pages thruout the day and you have just made that info more than worth it thank you!! 8)
oh oh they are there but i cant seem to use them tired and eyes are red will try tommarrow i gues thanks all for your time
when i mouse over them i get javascript:void (0);
Quote from: nneonneo on May 11, 2008, 08:31:08 PM
ALEJO: Copy yshout-style.css to Themes/default.
didnt workd... i replaced with the css from 1.13 but is the same...
For SMF2, you should put it in Themes/default/css instead.
Quote from: nneonneo on May 11, 2008, 09:29:59 PM
For SMF2, you should put it in Themes/default/css instead.
thx, works now :)
I have the box up and running, have the lines set to 4 (cause i cant get the scroll working) and even have the smilies at the bottom but i cannot use them. Has anyone ran into this before and if so could you please pass a lil info along
thanx in advance
could it have something to do with
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" name="shout_text" />';
i dont have a value in maxlength and i have that particular line in a few spots in yshout?
@nneonneo
Look at this:
version of SB 1.15
1 shot: http://g4g.pl/forum/ (http://g4g.pl/forum/) ->
(http://g4g.pl/menu1.jpg)
2 shot: http://g4g.pl/forum/index.php?action=help (http://g4g.pl/forum/index.php?action=help)
(http://g4g.pl/menu2.jpg)
On second shot i have no shoutbox on the page.
Where is my css styles in main menu of the forum on main page ?
In IE -> no problems describe above. !
Of course i have yshout-style.css in Themes/default
Any idea ?
Aha.. no JS errors.
This error only in SMF v 1.1.5
I would love to put this on my site.... but I need some help adding it to the Blue Vista theme and the Shiny Blue theme.
The edit I'm having trouble with (SMF 2) is:
// YSHOUT HERE
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
Thanks in advance for any help.
I have the box up and running, have the lines set to 4 (cause i cant get the scroll working) and even have the smilies at the bottom but i cannot use them. Has anyone ran into this before and if so could you please pass a lil info along
thanx in advance
could it have something to do with
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" name="shout_text" />';
i dont have a value in maxlength and i have that particular line in a few spots in yshout?
the page error is as follows:
line 99
char 1
error document.forms.shout_form.shout_text is null or not an object
code 0
@captain_jack: please be patient. It's been what, one hour since you posted? Now, the problem is: you need to add the name parameter to *all* instances of <input id="shout-text" ... (not "forum-name", as you have it).
@wiciu: You have search-engine URLs or something else installed. Paths for the shoutbox are relative to the forum root, but URLs like http://g4g.pl/forum/help/ can cause problems. If you can, try to keep the URLs like http://g4g.pl/forum/index.php?action=help.
@lax.slash: Where do you want the shoutbox to go? That's where you need to put it :P
General notice: 1.15 package updated to fix the missing style bug.
ShoutBox still disappear in Firefox and Internet Explorer.
My settings:
yshout.php
<?php
// Version 1.15
// Editable Options (see yshout/js/yshout.js for more options)
// Set the maximum amount of lines to be displayed at a time
$max_lines = 12;
// Sets the directory to which to log
$logDir = "chats";
// Should we use GZip compression? If you are having trouble with the shoutbox, set this to false.
$gzipCompression=true;
// Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;
// Guest usage for posting. Set to false if you don't want to let guests post to the shoutbox; if allowGuests is on, they will still see it.
$allowGuestsPost=false;
// Automatic Guest Usernames: should they be able to choose their own usernames?
// Set to some string (a prefix) if you want to disable guest choice of username
// Set to false if you want to allow guests to choose a username
$autoGuestName=false;//'guest-';
// Command options.
// If this is set to false, all typed commands are disabled.
// Admin functions, via admin links, are still available.
$allowCommands=true;
// If this is set to false, guests will be denied access to commands.
$guestCommands=true;
// Shoutbox moderator groups. By default, only administrators and global
// moderators can moderate the shoutbox. By setting some groups up here
// (IDs only please), other groups (including additional membergroups)
// can be permitted to moderate it.
$moderatorGroups=array(2);
// How long should the script wait for the chats to update? (in seconds)
// If this is set to 0 the script will not wait at all,
// but this will be very detrimental to performance.
// Make sure this is less than the maximum script execution time
// on your server, or the shoutbox will never update.
$updateTimeout=60;
// User-defined array of commands to block.
// Example: $bannedCommands=Array('/impersonate');
// Note that since SMF recognizes /me by default, it can't be blocked.
$bannedCommands=Array();
// How many characters will be permitted in each shout.
$maxShoutChars=300;
// How many characters will be permitted in the username.
// This does not apply to SMF registered usernames.
$maxUsernameChars=25;
yshout.js
// Flood control time in milliseconds:
var floodTime = 1000;
// Time between refreshes (minimum) in milliseconds:
// Note that since 1.08, this option will have less of an effect on performance,
// hence the default value is very low :)
var refreshTime = 250;
// Check for duplicate instances?
// This can improve performance in some cases.
var checkDuplicates = false;
// Internet Explorer 7 has a bug (feature?) which causes extreme lag when
// moving between pages. This delay controls "false alarms"; the amount
// of time between detecting a page move and reloading the shoutbox.
// If it is too high, users may experience laggy shoutboxes.
// If it is too low, users may experience lag moving to a new page.
// This bug only affects Internet Explorer 7 (not previous versions)
var falseAlarmDelay = 5000;
// Don't edit below this line, unless you know what you are doing ;)
username = "";
Reduce $updateTimeout. It needs to be less than the script timeout on your server.
many appologies nneonneo
update still have error but will keep reading and many thanx O:)
I reduce $updateTimeout to "10" and sb still disappear.
[edit]
I irritate and I reduce $updateTimeout to "0" and sb still disappear but sb less dissappear.
@denio: That's slightly odd. What browser? If it does that on IE or Firefox, then I think there's something weird going on (a visit to your forum may be useful).
@captain_jack: Post or PM yshout/yshout.php.
Well...
Shoutbox disappear in Mozilla Firefox 2.0.0.14 (newest) and in IE7 sb none visable, I can see "shoutbox loading" (in my language)
Board powered on SMF 1.1.5. I have install nneonneo sb v1.15.
URL for my board:
[link]
thanx nneonneo
Hey All,
I've been using nneonneo's SB for a while now, and my forum users and I are enjoying it thoroughly (thanks nneonneo). However, an issue has developed since upgrading SMF from 1.14 to 1.15. It seems now when you change the language of the forum from English to XXXXX, the SB no longer displays.
Basically, it shows the "...loading shoutbox..." msg and then it disappears and nothing remains. I did some testing by copying the yshout.php to a test file and making a few modifications do that it would display the SB. In the test file, i can replicate the issue. When the forum is in "English" language mode, the test file displays the shoutbox. When in "XXXX" language mode, it displays nothing.
I placed some echo statements in my test file and noticed the page displays some crazy characters (). After doing some more testing, it seems that the issue might stem from the /SSI.php file (perhaps around the "loadtheme()" function call on line 145.
Again, this only happened after upgrading from SMF from 1.14 to 1.15 and perhaps after I upgraded nneonneo SB to 1.14b (not sure if the problem existed after that upgrade or not). It should also be noted that all of my Modifications.XXXX-utf8.php language files have the nneonneo SB language code added.
Anyone else having any trouble getting this to work w/ non-English languages on SMF 1.15?
- MWM
@denio: What is $updateTimeout currently set at? It looks like it's set at 0 or something.
@captain_jack: You weren't supposed to add name="shout_text" to *every* form field...only the "middle" field in each form. Also, you should not have changed their "id" parameters.
@mwmconsulting: Those crazy characters () are the UTF-8-encoded representation of the Unicode byte order marker (BOM). They should not be in the output. Saving files with Windows Notepad commonly causes those characters to be added to the beginning of the file (they are invisible in Notepad, and are only visible in a text editor that either doesn't understand them, or a hex editor).
I've checked my files and I can't find the BOM characters (though it's possible that it's in another file I didn't check, or an older version). If you manually edited any of the files with Notepad, it's likely that that's the source of the problem.
Try turning off gzipCompression. My guess is that these characters are output before the gzip stream, causing the stream to become corrupted -- this results in a blank shoutbox, since the browser can't decode the compressed data.
Nneonneo, you're amazing my friend. Not only a SUPER FAST reply, but also the correct one. Turning off gzipcompression did the trick. ;D
Thanks so much for your help, and the awesome mod. Where is your paypal donation link mate? I'm happy to support the cause.
Cheers!
- MWM
[email protected]. Thanks!
@denio: There's a huge amount of ads on yshout.php. I don't know if that has anything to do with it, but it may cause problems. For example, see http://cinqg.freens.pl/yshout/yshout.php; the HTML source is very long.
Perhaps try turning off $gzipCompression, if you haven't already.
middle field wow no im really confused hehe
(you need to add the name parameter to *all* instances of <input id="shout-text" ... (not "forum-name)?
captain_jack, I've done the modifications for you and attached the file.
I set $updateTimeout currently set at "0" and shoutbox disappear but more rarely
I $updateTimeout set at 60, 20, 100, 200 and sb still disappear. There is best when i set $updateTimeout at 0.
give a man a fish and he eats for a day
teach him to fish and he will never go hungry
this is true but i really was so hungry
thank you and if you dont mind i would like to use your paypal link as well to thank you for your patience :P
denio, what's your hosts' PHP script timeout? Try 10. The timeout might be 15 seconds. 0 is too short -- it may overload the server!
captain_jack: Thanks. What I did was take an unmodified yshout.php, added your settings and shout reversal, then followed step 5 of the smiley guide. Hope that helps!
I know but I no exit, 80% users my forum have Firefox and I set timeout more than 0 shoutbox in firefox there will be disappearing.
PS Sorry if my English is not good.
Hello,
I am using the theme phobos from tinyportal for my smf forum...
i need to know what the theme edits are....
in smf package praser there is no option for 1.1.5 hence i dont know what are the theme edits....
please let me know what are they and what changes i have to make....
Thanks...
Using 2.0 Beta 3 public , I just installed it and all the tests passed etc... , i also followed the advice on the mod site for the loading shoutbox error but its still there , it doesnt move at all it just says loading shoutbox any ideas on whats wrong?
I just installed this in minutes to a custom theme right into the news box
VERY happy thank
GMC
Quote from: nneonneo on August 09, 2007, 07:22:07 PM
Right idea, Brian, but not quite the right implementation.
No code is really required; it's just an HTML file with the board URL interpolated in a few places:
<?php
$boardurl = 'http://forum.com/path/to/forum';
echo '<html><head><title>Shoutbox</title>
<script src="',$boardurl,'/Themes/default/script.js" type="text/javascript"></script>
<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?Aug92007" 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>
</head>
<body>
<br /><b>Shout Box</b><br /><br />
<div id="yshout">Shoutbox loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></body></html>';
?>
As you can see, this is basically a thin HTML page wrapping the usual code from index.template.php. It causes the client to load all the necessary JS, and the client is then responsible for calling yshout.
All you need to do, odavilar, is change $boardurl up top (for such a simple script, I'm not going to run off to SSI just to check the board URL ;) ). Then, place the script in any web-accessible location and *boom* it's there.
This code is largely copied from glxpa's solution (http://www.simplemachines.org/community/index.php?topic=137508.msg1170765#msg1170765 (http://www.simplemachines.org/community/index.php?topic=137508.msg1170765#msg1170765)) and cleaned up somewhat to avoid missing variables. It has also been edited to include a small fix mentioned by me later in the thread.
*Note: Using a *relative* link (e.g. /forum/, instead of http://moo.com/forum/ (http://moo.com/forum/)) for $boardurl is probably safer so that minor domain mismatches (www.xxx.yyy (http://www.xxx.yyy) vs. xxx.yyy) don't prevent the script from working.
Hi There!
Ive been trying to get this working for a while now, buy i still cant :(
My idea es to have the shoutbox load on another window.
I copied the exact same code as above on a php page, The shoutbox loads and I can see the "shouts". My problem is that whenever I try to shout, nothing happens :(! I write some text and then clicked on the "shout!" button, but there is no reaction :(
Any Ideas?
Im using 2.0 beta 3.1
Quote from: Alan S on May 14, 2008, 05:56:53 PM
Using 2.0 Beta 3 public , I just installed it and all the tests passed etc... , i also followed the advice on the mod site for the loading shoutbox error but its still there , it doesnt move at all it just says loading shoutbox any ideas on whats wrong?
I had the same problem. Look at the yshout folder via FTP. Look for a "js" and a "chats" folder. If they are not there, the shoutbox will keep on saying "loading" forever. If the folders aren't there, extract them from the .zip file and upload them manually to the yshout folder.
Quote from: ameo on May 07, 2008, 11:46:19 AM
I made sort of guide for dummies, or something like that, to place this shoutbox in News field, and make it look cool on forum.
Personally, I believe this is the best position for shoutbox, and if you don't need News on your forum you could place shoutbox instead.
(http://postthatpic.com/files/2526/1.png)
First steps you already know, but I'll repeat it just in case;
First download yShout and install it.
If you're using different theme than default one after
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
you must add this code into your index.template.php :
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" 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;
}
</style>';
// YSHOUT END
(http://postthatpic.com/files/2526/2.png)
Then do this:
In News box put this code instead putting second code somewhere else:
<div id="yshout">',$txt['yshout_loading'],'
And save it.
Of course you need news box to be displayed in order to see shoutbox in your index page.
To do that go to Theme options and click to:
1. DISABLE eNews (http://postthatpic.com/files/2526/inflame.gif) [it is very dangerous to leave it enabled, so if it is checked, you must uncheck it]
&
2. Show news fader on board index [check it]
3. fading delay - set to 0
Click save and you're ready to go.
(http://postthatpic.com/files/2526/3.png)
If you wish to change News to Shout box or Shoutbox you'll need to find file index.english-utf8.php / index.english.php or of any other language file you're using. They are stored under Forum/Themes/default/languages/ In there you'll need to edit string $txt[102] = 'News';
to $txt[102] = 'Shoutbox'; and re-upload that file to it's place. You'll need to replace old file with that new-one if you didn't delete old one first.
(http://postthatpic.com/files/2526/4.png)
I guess that's it. I hope it shall be helpful to at least someone.
This is great and I love it
Anyone know how to make the News Box collapsible
Thanks
GMC
OK. I see that some of you people are trying to put shoutbox on different page.
Really proper way to do it is only one, and includes one more mod. This mod is called
custom actions mod (http://custom.simplemachines.org/mods/index.php?mod=331) and will make your life so much more easier.
(http://postthatpic.com/files/2526/1.png)
When you download it, and upload it, then install it, go to
Configuration » Features and options » Custom Actions
There you'll see - Add an action
Click on it.
Under name write: shoutbox
Under type choose: PHP
Under page title: shoutbox
Under code you shall use code that is written by creator of this shoutbox itself - one and only - nneonneo:
Please note first line: YOU NEED TO EDIT IT 2 MATCH NAME OF YOUR WEB-PAGE:
$boardurl = 'http://www.webpage.com/forum/yshout.php';
echo '<html><head><title>Shoutbox</title>
<script src="',$boardurl,'/Themes/default/script.js" type="text/javascript"></script>
<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?Aug92007" 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>
</head>
<body>
<br /><b>Shout Box</b><br /><br />
<div id="yshout">Shoutbox loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></body></html>';
?>
Now click on SAVE, then click Go to page. Shoutbox should now be displayed.
If it's not, you should read first post of this theme for usual troubleshooting (http://www.simplemachines.org/community/index.php?topic=137508.0)
(http://postthatpic.com/files/2526/2.png)
Now go to Configuration » Current theme » Themes and settings
Choose Modify the index template:
Find something like this:
// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
Add THIS:
//Show the [Shoutbox] button
echo '<li><a href="', $scripturl, '?action=shoutbox.php">Shoutbox</a></li>';
If you want it to be displayed before help;
// Show the [help] button.
echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
Don't forget to save changes.
And this is it people. I believe it shall do the trick perfectly.
If it doesn't you can kill me or PM me. :P
hey is there any way to restrict guests from posting in shoutbox???
In yshout.php find this and do what it says:
// Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;
change to
$allowGuests=false;
oh thanx. you rock...is there any way to show it in a board? i mean just like you did into news. but not into news coz i want to show news too. and i have 4 news and they show randomly. so is there any way to sho it like a board?
yes there is, and that depends on the theme you're using. you should say what theme you're using, or just post link to your forum. you can also have it on separate page, if you wish, [or not if you don't wish to]. usual instructions for displaying shoutbox and troubleshooting are on first post of this thread.
With very little effort, you can put the shoutbox pretty much wherever you want it. There are, of course, going to be exceptions, depending on which theme your are wanting to integrate it into. I have the shoutbox and the news both in the user info area. See here. (http://www.empireofthesun.net/forum/index.php?action=refer;sa=smf)
Great mod, huh?
i tried putting this some where else but its showing error..
// 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 i m using DarkBreak by DzinerStudio theme.
what error is it showing you?
template pharser error or something like that....i can give you my index.template.php if you want ...
Edit: i attached my file here
Well, I guess the easiest thing to try to fix it would be to add '; on the line before // YHSOUT HERE
and add echo' on the line after // YSHOUT END.
If that doesn't do the trick, you may want to attach your file you are trying to edit so someone could take a look at it. :D
i already attached my file here....you can take a look at it if you want to...
The file that you attached has no errors as far as I can test. It also does not have the code you posted above, so I cannot test what errors it is giving you. Add that code back to the file (to where you were getting the parse error) then reattach the file and I will be more than happy to look at it for you.
oh actually i removed it to get it work again :D
i just want to show the shout box as a category like news and announcement or anything.. coz on the default theme its showing it on just up to the admin link. so its good if you can make it work.
OK. I believe I have accomplished what you wanted. ;) It is in it's own category just above the News category. It may require some fine tuning, but I will leave that entirely up to you. :P
Hope that was what you were looking for.
(aah! too many responses!)
@denio: In that case, to avoid overloading the server, set refreshTime in yshout/js/yshout.js to something higher (in milliseconds).
@optimushunk: Package Parser should be working now for SMF 1.1.5.
@Pratt: Works for me. Did you set $boardurl to the *full* URL to your forum?
Thanks very much to ameo and SunKing for helping out :)
Not a problem at all. :D
After all, you have finals...
I have installed this mod but cannot edit the settings due to the mod not showing up in the admin panel, I can see it under installed packages just fine, but there is no links to get to the settings, I have attached a couple screenshots to show what I am talking about, a few mods I have installed are the same way, is it an SMF bug or is it the mods?
@SunKing: Finals are over, thankfully (ended a few weeks back), but now I have a full-time job, making it harder for me to make timely responses like I used to.
@Gunstra: Not all mods have admin options. This one in particular does not, so it doesn't even install any other options to your admin panel. Options are controlled in the yshout/yshout.php file.
I'm trying "something else" and I can't seem to find width of shoutbox.
Help?!?
is it possible to have the shoutbox only accessible by certain forum groups?
I've moved to a new server, AND upgraded the board, AND upgraded the shoutbox, AND am using a custom theme. *whew* Needless to say, it broke.
The forum it resides on (http://www.theunforgivingblade.com/forum/index.php)
The yshout/yshout.php file (http://www.theunforgivingblade.com/forum/yshout/yshout.php)
It also continues to show a login form no matter what.
I made sure the yshout.php has 755 permissions, I made sure I copied the code into my custom theme correctly.. because it's complaining about errors in the forum's code, I really don't know what to do. It was working fine before I moved servers.
Someone who wants to look at it can use "TestAccount" pw "testaccount"
Thank you for your time! I've really enjoyed using the shoutbox in the past, and don't want to lose it!
@ameo: Width? Should be in the CSS block of index.template.php or yshout-style.css; if it's not there, you need to add it.
If you're talking about the number of characters that can be entered, that's in yshout.php.
@jarhead9952: See http://www.simplemachines.org/community/index.php?topic=137508.msg1532734#msg1532734 and http://www.simplemachines.org/community/index.php?topic=137508.msg1536275#msg1536275 (you want my responses to RobXduffy in both posts). In your case, since you want a list of "allowed" groups, rather than "banned" groups, change
if (count(array_intersect(array(4), $membergroups)) == 0)
to
if (count(array_intersect(array(4), $membergroups)) > 0)
and vice-versa.
@sashafiero: I think the forum language is not set somehow: the first error is "Undefined index: lang_character_set". This probably means that either the language pack for your language isn't installed, or that the global language isn't set. All the other errors relate to this one.
If you had some language packs on the old forum, you should install them on the new forum to avoid trouble. To dismiss the warnings, you can add "error_reporting(0);" right before session_start(); in yshout/yshout.php; this will silence all the notices, but doesn't fix their cause.
nneonneo when r u going to do another great mod? :D
Quote from: nneonneo on May 10, 2008, 05:56:46 PM
@NIBOGO: Except for the last part (about adding "echo' </table>', shoutbox(), '</div></table>';"), do the instructions for index.template.php; the last bit, you add to boardindex.template.php (n.b. you *may* need to add the shoutbox function to BoardIndex.template.php depending on what order the files get loaded). Of course, SunKing knows his code best, so if I'm mistaken, please let me know :)
i dot it but the shoutbox is not collapsable:
http://www.mundo-se.com/foro/index.php?action=forum (http://www.mundo-se.com/foro/index.php?action=forum)
Did you INSERT the SQL line into your database as posted above? It will not collapse unless you do this. You will need to use phpMyAdmin or similiar to INSERT it. Here (http://www.empireofthesun.net/forum/index.php?topic=1402.0) is my tutorial on exactly how to do it.
Quote from: nneonneo on January 19, 2008, 11:01:07 AM
I'm reposting pongsak's smiley guide because the recent server crash has deleted the smiley.php attachment.
Quote from: pongsak on August 18, 2007, 11:10:08 PM
For adding smiley .Let's go.
1. Adding 1 line of script between <head> and </head> index.template.php .
<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script>
This file will create sliding effect.
2. Create "mymod" dir in root forum dir and copy these code and safe as "animatedcollapse.js"
//Animated Collapsible DIV- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated June 27th, 07'. Added ability for a DIV to be initially expanded.
var uniquepageid=window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, "") //get current page path and name, used to uniquely identify this page for persistence feature
function animatedcollapse(divId, animatetime, persistexpand, initstate){
this.divId=divId
this.divObj=document.getElementById(divId)
this.divObj.style.overflow="hidden"
this.timelength=animatetime
this.initstate=(typeof initstate!="undefined" && initstate=="block")? "block" : "contract"
this.isExpanded=animatedcollapse.getCookie(uniquepageid+"-"+divId) //"yes" or "no", based on cookie value
this.contentheight=parseInt(this.divObj.style.height)
var thisobj=this
if (isNaN(this.contentheight)){ //if no CSS "height" attribute explicitly defined, get DIV's height on window.load
animatedcollapse.dotask(window, function(){thisobj._getheight(persistexpand)}, "load")
if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.visibility="hidden" //hide content (versus collapse) until we can get its height
}
else if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.height=0 //just collapse content if CSS "height" attribute available
if (persistexpand)
animatedcollapse.dotask(window, function(){animatedcollapse.setCookie(uniquepageid+"-"+thisobj.divId, thisobj.isExpanded)}, "unload")
}
animatedcollapse.prototype._getheight=function(persistexpand){
this.contentheight=this.divObj.offsetHeight
if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes"){ //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.height=0 //collapse content
this.divObj.style.visibility="visible"
}
else //else if persistence is enabled AND this content should be expanded, define its CSS height value so slideup() has something to work with
this.divObj.style.height=this.contentheight+"px"
}
animatedcollapse.prototype._slideengine=function(direction){
var elapsed=new Date().getTime()-this.startTime //get time animation has run
var thisobj=this
if (elapsed<this.timelength){ //if time run is less than specified length
var distancepercent=(direction=="down")? animatedcollapse.curveincrement(elapsed/this.timelength) : 1-animatedcollapse.curveincrement(elapsed/this.timelength)
this.divObj.style.height=distancepercent * this.contentheight +"px"
this.runtimer=setTimeout(function(){thisobj._slideengine(direction)}, 10)
}
else{ //if animation finished
this.divObj.style.height=(direction=="down")? this.contentheight+"px" : 0
this.isExpanded=(direction=="down")? "yes" : "no" //remember whether content is expanded or not
this.runtimer=null
}
}
animatedcollapse.prototype.slidedown=function(){
if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==0){ //if content is collapsed
this.startTime=new Date().getTime() //Set animation start time
this._slideengine("down")
}
}
}
animatedcollapse.prototype.slideup=function(){
if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==this.contentheight){ //if content is expanded
this.startTime=new Date().getTime()
this._slideengine("up")
}
}
}
animatedcollapse.prototype.slideit=function(){
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==0)
this.slidedown()
else if (parseInt(this.divObj.style.height)==this.contentheight)
this.slideup()
}
// -------------------------------------------------------------------
// A few utility functions below:
// -------------------------------------------------------------------
animatedcollapse.curveincrement=function(percent){
return (1-Math.cos(percent*Math.PI)) / 2 //return cos curve based value from a percentage input
}
animatedcollapse.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}
animatedcollapse.getCookie=function(Name){
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}
animatedcollapse.setCookie=function(name, value, days){
if (typeof days!="undefined"){ //if set persistent cookie
var expireDate = new Date()
var expstring=expireDate.setDate(expireDate.getDate()+days)
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()
}
else //else if this is a session only cookie
document.cookie = name+"="+value
}
3. download smiley.php and safe in mymod dir.
4. Search after in index.template.php or boardindex.template.php depend on where u put shout box.
*<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>
or
*<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
add
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
5. Open yshout.php for namely some input.
find (up to 4 times)
*id="shout-form"
replace to
*id="shout-form" name="shout_form"
find (up to 4 times)
*id="shout-text"
replace to
*id="shout-text" name="shout_text"
That's it. :D
EDIT [Feb 4 2008]: Updated a few instructions. Changes are noted in red, changes to code marked with a red *.
First, I'd like to say that this mod is great. Once I started reading the mod site info and the links you put there, things worked like a breeze.
Now, I am trying to implement this change and I've run into a problem.
I have the shoutbox in a TP Block (BTW, that works great for denying guests and other groups access), I have made all the changes as described and put the code that goes after the <div> that points to where you want the shoutbox to be in the same block. I get an error in Load.php and everything comes to a crashing halt.
Could you help me get the correct code into the TP block that will point correctly to the rest of the modified code?
A note.
I made a change to externalize the .css and used the yshout-style.css file to control the file. It was a very simple change and I like having external .css files.
One request, I would like to make a change to have the entry line at the top of the box instead of the bottom, can you give me some pointers on how to do that? That will help with folks who have different resolutions on different computers and the use of the scroll bar.
Again, great mod. Thanks in advance for your help.
Quote from: SunKing on May 16, 2008, 07:07:27 PM
Did you INSERT the SQL line into your database as posted above? It will not collapse unless you do this. You will need to use phpMyAdmin or similiar to INSERT it. Here (http://www.empireofthesun.net/forum/index.php?topic=1402.0) is my tutorial on exactly how to do it.
I do the modification but the shoutbox is not appear:
http://www.mundo-se.com/foro/index.php?action=forum (http://www.mundo-se.com/foro/index.php?action=forum)
@ALEJO: I don't run my own forum anymore, which was my main source of "what-do-my-members-need" mods. Maybe if someone makes a good suggestion I may consider :)
@faminsk: The block is a phpblock, right? The code should look like
echo '<div id="yshout"></div><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
For putting the form up top instead of on the bottom, you will want to move this code in yshout/yshout.php
echo '<div id="shouts">';
echo readChat($chatFile, $logDir);
echo '</div>';
to right before
if($gzipCompression) ob_end_flush();
break;
case "shout":
That will output the shouts after the form. Then, you may wish to reverse the shout order: there's a link on the main mod page or first page of this thread for that.
@NIBOGO: Two errors in my JS console:
1) smfToggle not defined. I think this is only defined for SMF 2, not SMF 1.
2) set_cookie is redefined by global.js. This is a minor issue, and you can probably fix it by replacing "set_cookie" in yshout/js/yshout.js by something else (like create_cookie or similar) to avoid the name clash.
@SunKing: Your code is using smfToggle, which isn't in SMF1. Unfortunately, SMF1 lacks a coherent upshrink system like the one in SMF2, which makes it fairly difficult to get a decent upshrink in SMF1. For example, the code for the default header upshrink in SMF1:
<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>
It might be possible to adapt this code (plus modifications to the main block) to support SMF1.
Sorry. I didn't realize there was a difference between the two versions of SMF in regard to the toggle. Thank you for bringing that to my attention. I've edited the original post to reflect this.
Quote@sashafiero: I think the forum language is not set somehow: the first error is "Undefined index: lang_character_set". This probably means that either the language pack for your language isn't installed, or that the global language isn't set. All the other errors relate to this one.
If you had some language packs on the old forum, you should install them on the new forum to avoid trouble. To dismiss the warnings, you can add "error_reporting(0);" right before session_start(); in yshout/yshout.php; this will silence all the notices, but doesn't fix their cause.
I'm afraid I'm still at a loss... I DIDN'T have any languages installed previously, and I put in the error_reporting(0); where you said, but the errors are still displaying.
Also, in addition to that login box always being there, I don't have the History and other links. D: My poor shoutbox is imploding...
I thank you again for your help!
Where can I change the font size of the HISTORY text?
Here is my index template - I am damned if I can get it to work
Thanks in advance for all those that help
GMC
Quote from: SunKing on May 16, 2008, 07:07:27 PM
Did you INSERT the SQL line into your database as posted above? It will not collapse unless you do this. You will need to use phpMyAdmin or similiar to INSERT it. Here (http://www.empireofthesun.net/forum/index.php?topic=1402.0) is my tutorial on exactly how to do it.
This is to add it collapsible?
Does it work with smf2?
I have it but it would be cool to make it collapsible.
@GMC your (fixed) index.template.php is attached.
@MrMoney It only works on SMF 2 beta 3.1 as of yet
Aww, Ok SunKing. I will just wait till it is.
Quote from: SunKing on May 16, 2008, 11:48:56 PM
@GMC your (fixed) index.template.php is attached.
@MrMoney It does not work with SMF2.0 as of yet.
I am gonna have to awsk what I did wrong - I have spent hours on this :(
BTW
THANK YOU... heaps
Quote from: nneonneo on May 16, 2008, 08:54:11 PM
@faminsk: The block is a phpblock, right? The code should look like
echo '<div id="yshout"></div><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
For putting the form up top instead of on the bottom, you will want to move this code in yshout/yshout.php
echo '<div id="shouts">';
echo readChat($chatFile, $logDir);
echo '</div>';
to right before
if($gzipCompression) ob_end_flush();
break;
case "shout":
That will output the shouts after the form. Then, you may wish to reverse the shout order: there's a link on the main mod page or first page of this thread for that.
Yes, it is a phpblock. Thanks for the quick answers. I'll give this a try.
Can anyone make it so it is in a better position like on NIBOGO's but for smf 2 beta 3.1?
Like this (http://www.empireofthesun.net/forum/index.php?action=refer;sa=smf)?
That is in SMF 2 Beta 3.1.
Shouting videos? when someone posts up a video, u cant delete it nor watch it because it refreshes.
@sashafiero: I have no idea what's going on :-\ *Maybe* you could try installing the english-utf8 package and seeing if that makes a difference, but I really don't know.
@MothMan: yshout.php, near the bottom: there's a CSS block for modifying the history appearance.
@Enders: Hmm, that's a good point. I would suggest just posting a link to the video -- this is a low-tech way to make it work. To delete it, use the del link: if that doesn't work, then the video is probably using multiline code, which would break things :P
Del link doesn't work at all. Is there a way to just restrict it only from the shoutbox?
As copied from my board:
[Today at 01:25:28 AM] del ban Sasha Fiero: Hey, alright, I uploaded fresh language files, as nneonneo suggested, and that did fix the errors
[Today at 01:25:57 AM] del ban Sasha Fiero: But the History and such links are still gone, and there's still that unusual login box down there
[Today at 01:26:21 AM] del ban Sasha Fiero: And I think that has to do with the links, it's like it thinks I'm half a valid user. My name should be red because I'm an admin, but it's not
[Today at 01:26:49 AM] del ban Sasha Fiero: And the button to the right of the text box has no label. But we have PROGRESS
Thank you so much for the help you've provided thus far!
I managed to get the collapsible shoutbox to work under SMF 1.1.4. I spent a few hours on it and it is now 5:00 in the morning here. I will try and post the index.template.php here soon so maybe someone can make use of the edits.
Does the shoutbox still work in the boardindex.template.php file? because i tryed but it comes up with
The shoutbox shows but when you try to shout a message it says
Write error (writeLine); aborted
@sashafiero: Check Modifications.english(-utf8).php. If either are empty, copy the following into them:
<?php
// Version: 1.1; Modifications
// ---- 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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
<user>: 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>',
'/lock' => ' <message>: 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.';
// ---- End modification - nneonneo's Shoutbox ----
?>
As for the login thing, I think that might just be an accident when you installed the shoutbox to the custom theme (note the login bar doesn't appear if you are a guest :P). So, just look in index.template.php for the login bar after the shoutbox, and move it to where it should be.
@UTM-MaKaVeLi: chmod yshout/chats and yshout/chats/home.txt to 755 or 777 and try again. The error would probably occur no matter where the shoutbox was installed.
nnenneous how i can use the TP modification:
http://www.simplemachines.org/community/index.php?topic=137508.msg1031509#msg1031509
with the smileys modification:
http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
Thanks
Pretty easy, actually. Do the smiley guide as usual, but instead of step 4, change your phpblock to
echo '<div id="yshout"></div><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
Quote@MothMan: yshout.php, near the bottom: there's a CSS block for modifying the history appearance.
Thank you. :)
Quote from: nneonneo on May 18, 2008, 07:18:01 PM
Pretty easy, actually. Do the smiley guide as usual, but instead of step 4, change your phpblock to
echo '<div id="yshout"></div><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
look:
http://www.mundo-se.com/foro/index.php?action=forum (http://www.mundo-se.com/foro/index.php?action=forum)
appear the smileys and i can close the smileys but the shoutbox not appear
You still have SunKing's upshrink system installed, but since TinyPortal has its own, it's causing some problems. Easy to fix -- just remove SunKing's upshrink code and it should work.
Quote from: nneonneo on May 18, 2008, 07:59:41 PM
You still have SunKing's upshrink system installed, but since TinyPortal has its own, it's causing some problems. Easy to fix -- just remove SunKing's upshrink code and it should work.
i remove the sunking code but appear the same error:
http://www.mundo-se.com/foro/index.php?action=forum
I didn't see the actual call to the shoutbox script in your index.
I think you should have something like this:
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?May022008" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">
soundManager.url="',$boardurl,'/yshout/soundmanager2.swf";
soundManager.debugMode = false;soundManager.consoleOnly = false;
soundManager.onload = function()
{
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/chat.mp3", autoPlay:false});
}
</script>';
// YSHOUT END
in the <head> section of your index.template.php (somewhere before the </head>).
Ah, I see the problem.
mymod/animatedcollapse.js">
needs a </script> after it.
QuoteWarning: require(/mounted-storage/home95c/sub006/sc26341-IINL/www/FlemishArmySite/Trackmania/cache/data_b97f31ac399967546a83a7046dd5603a-SMF-modSettings.php) [function.require]: failed to open stream: No such file or directory in /mounted-storage/home95c/sub006/sc26341-IINL/www/FlemishArmySite/Trackmania/Sources/Load.php on line 2401
Fatal error: require() [function.require]: Failed opening required '/mounted-storage/home95c/sub006/sc26341-IINL/www/FlemishArmySite/Trackmania/cache/data_b97f31ac399967546a83a7046dd5603a-SMF-modSettings.php' (include_path='.:/usr/local/lib/php/') in /mounted-storage/home95c/sub006/sc26341-IINL/www/FlemishArmySite/Trackmania/Sources/Load.php on line 2401
This error shows up somethimes, it clears up on a page refresh. Any idea what is causing this error?
I did a search of the thread but I did not find the answer to this.
I have been searching for the line of code to limit the shouts shown from 12 to 8. The only reference I have seen to 12 lines is:
// Set the maximum amount of lines to be displayed at a time
$max_lines = 12;
This is in the yshout.php. I have changed the value to 8 but I still get 12 lines. Any ideas?
@Jelle Mees: I don't know what's causing it. Looks like a caching setting of sorts (might be serverside).
@insanemime: Clear the shoutbox to make the change take effect.
wow..how simple was that...lol :D
When a user put a image between img tags, the shout deforms.
What happen if users put more than one image, or if the users put a high resolution image?.
Can you make a function thath restricts the user of certain tags such as the [ img ] or [ youtube ] tags ?
that's interesting thinking emonk. function that restricts pictures and youtube would be useful.
you can also say it's forbidden to post big images and flash files in shoutbox, and ban everyone who does that.
this is of course, another way of dealing with things, but sometimes the best. rules must be obeyed, otherwise admin kicks a** [bans] people :P
Quote from: YodaOfDarkness on January 06, 2008, 03:39:41 AM
I've almost got the alternating colors working, but there's one thing stopping it from being done. The settings say to keep 12 lines, but for some reason only 7.5 or 8 are being kept in the home.txt file, which means the first <p> tag is getting pushed into the history file. Any ideas on how to fix it?
EDIT: Fixed it by modifying the truncateChat function to use </p>\n instead of \n and changing anything that had to deal with that. I made the opening <p> encapsulate the entire new shout, instead of just the first part, so I think I'm ready to plug in the alternating code :)
EDIT2: It's finished :) I'm not sure if I can extract it from the rest of the code, seeing as I was theming it for my forum along the way... I also added a /clearall command that deletes every single shout in the history and the shoutbox.
Yoda, did you ever get this working? Do you have a code snippet anywhere?
This functionality would be awesome...
Thanks
Anyone know how I can have the it re-focus on the text box again after refresh?
Thanks
nenneous your code didnt work i put the </script> but nothing happend
SunKing your code just gives me a parse error on line 220
If you want to look at my index.template here it is
http://uppit.com/4QRD1S
NIBOGO: This is the exact error I get.
smfToggle is not defined
http://www.mundo-se.com/foro/index.php
Line 55: var sbHeader = new smfToggle("upshrinkSB", false);
I'm also not seeing an actual shoutbox.
Quote from: MrMoney on May 19, 2008, 09:43:01 PM
SunKing your code just gives me a parse error on line 220
If you want to look at my index.template here it is
http://uppit.com/4QRD1S
look at the index and find :
echo '
// script for shoutbox upshrink
echo'<script language=...
remove the first
echo' before the // script for shoutbox...
and then add an
echo' just before </head>
Ok I will try it
Quote from: nneonneo on May 19, 2008, 09:57:17 PM
NIBOGO: This is the exact error I get.
smfToggle is not defined
http://www.mundo-se.com/foro/index.php
Line 55: var sbHeader = new smfToggle("upshrinkSB", false);
I'm also not seeing an actual shoutbox.
i hide the shoutbox ^^
ok i will try something
Is there a way to alter the colour of the usernames of people in the shoutbox?
From what I can see in the yshout style info, the usernames are being coloured by the yshout 'a:link' style... which colours any links within the shoutbox the same (including the commands links, etc).
I'd like to be able to format the usernames seperately (as well as the command links for that matter).
Is there a way to make the shout box only visible and useable by registered members? I don't want guests to see it or be able to use it.
dgandy, if you searched the topic you'd find the answer (http://www.simplemachines.org/community/index.php?topic=137508.msg1544802#msg1544802). please use search before asking that kind of questions in the future. O:)
Thank you for the link, ameo. I did use search for this topic but, must not have used the correct search phrase.
I have a question about the shoutbox. Can it be implemented on its own PHP page with out the smf forums?
@MothMan: By default, it uses the membergroup colors (style override in the shout text itself).
@chrismtz: Yes: it's the first tip on the main mod page: http://www.simplemachines.org/community/index.php?topic=137508.msg1195341#msg1195341
hey, bro, this time i got a weired error with me.
The text like, "history, commands, "shout" on the button" are not appearing when the user is logged in, how ever its working perfectly fine when we see the shoutbox as a guest.Any clues?
I have set up the shoutbox on my forum here: warriorsmovie.co.uk/forum and on the whole it is working well and is really great. However, I am experiencing some strange behaviour:
When I am signed in as myself (administrator), I cannot see the shoutbox title, the links across the top, or the "Shout" on the shout button. This is the same for my moderators. However, the shoutbox functions normally.
If I sign in as a regular user, it displays fine.
If I create an administrator user or moderator, it works fine.
I have checked that it is not a font colour issue masking the links, they just don't seem to load.
I am baffled and so any help would be appreciated.
Quote from: nitishthelegendkiller on May 21, 2008, 12:43:14 AM
hey, bro, this time i got a weired error with me.
The text like, "history, commands, "shout" on the button" are not appearing when the user is logged in, how ever its working perfectly fine when we see the shoutbox as a guest.Any clues?
It looks like we are together on this - maybe it is a new thing.
What language are you using? If you are using a language other than English, try changing the language to English and see if the text then displays.
Quote from: SunKing on May 21, 2008, 06:37:34 AM
What language are you using? If you are using a language other than English, try changing the language to English and see if the text then displays.
You were right in the end - I am using "British English" and not "English". Thanks for your help!
The next question is: can I create a new language file for British English for all my users who use it? I imagine it is a straight copy as the two languages are not vastly different - only semantics!
Ok, I answered my own question by playing around.
I simply copied over the yshout information from the Modifications.english-utf8.php file to the Modifications.english_british-utf8.php file.
The language files start at // ---- Begin modification - nneonneo's Shoutbox ----
Quote from: nneonneo on May 18, 2008, 02:01:59 PM
@UTM-MaKaVeLi: chmod yshout/chats and yshout/chats/home.txt to 755 or 777 and try again. The error would probably occur no matter where the shoutbox was installed.
I cant change the permissions? I try to change it but it says I don't have permission. Is it a bug you've seen before with the shoutbox or do you think it is my website host. Because all my other folders i can change permissions exempt "yshout" folder
I need some help.
I tried to install it in Kelo-It (http://custom.simplemachines.org/themes/index.php?lemma=586) theme, but the shoutbox doesn't load.
I tried to do this:
QuoteFixing some kinds of "loading shoutbox..." errors: Some errors are caused by having the wrong domain; if you log on and go into a board, and the problem disappears, then the fix is to change
Code: [Select]
var board_url = "', $boardurl, '";to
Code: [Select]
var board_url = "/path/to/forum";in Themes/<theme>/index.template.php where /path/to/forum is the *absolute* URL to your forum. For example, if your forum is at http://domain.com/myforum, use "/myforum" (NOT /home/domain/myforum!)
But I don't find var board_url = "', $boardurl, '"; in my index.template.
The absolute url to my forum is "/www".
Here is the index.template code:
<?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.5';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
$settings['use_image_buttons'] = true;
/* 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, $language, $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 ?finll 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" />
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/ie6lte.css?fin11" />
<![endif]-->';
/* 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" />';
// 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 = "'; $boardurlparse = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?May122008" 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;
}
</style>';
// YSHOUT END
// 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']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// 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>
</head>
<body>
<div id="wrapper">
<div id="header-l">
<div id="header-r">
<div id="header">
<div id="logo">';
if (empty($settings['header_logo'])){
echo '<a href="'.$scripturl.'" title="" class="logo-txt">', $context['forum_name'], '</a>';
}
else {
echo '<a href="'.$scripturl.'" title="" class="logo"> </a>';
}
echo'
</div>
</div>
</div>
</div>
<div id="mainnav-l">
<div id="mainnav-r">
<div id="mainnav">
',template_menu(),'
</div>
</div>
</div>';
echo'
<div id="userbar-l">
<div id="userbar-r">
<div id="userbar">
<div id="topbar">';
// The information that will be shown to the member when he/she is logged on
if($context['user']['is_logged'])
{
echo '
<div id="loggedin">
<b>', $txt[248], '</b> ', $context['user']['name'];
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ',<br />', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'], '.';
echo '
</div>
<div id="loggedin2">
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>
</div>';
}
// The login box which will only be shown to the guests
else
{
echo '
<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" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input name="user" type="text" onfocus="if(this.value==\'', $txt[35], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[35], '\';" value="', $txt[35], '" />
<input name="passwrd" type="password" onfocus="if(this.value==\'', $txt[36], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[36], '\';" value="', $txt[36], '" />
<input name="sa" class="submit" src="', $settings['images_url'], '/custom/go_icon.png" type="image" value="', $txt[34], '" />
<input type="hidden" name="cookielength" value="-1" />
</form>';
}
echo'
</div>
<div id="searcharea">
<form action="', $scripturl, '?action=search2" method="post">
<input name="search" type="text" onfocus="if(this.value==\'', $txt[182], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[182], '\';" value="', $txt[182], '" />
<input name="sa" class="submit" src="', $settings['images_url'], '/custom/go_icon.png" type="image" value="', $txt[182], '"/>';
// 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>
</div>
</div>
</div>
</div>';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo'
<div id="footer-l">
<div id="footer-r">
<div id="footer">
' ,theme_copyright(),' | Theme kelo-lt by <a href="http://padexx.de">panic</a>
</div>
</div>
</div>';
echo'
<div id="footer2">';
// Show the load time?
if ($context['show_load_time'])
{
echo '
<p class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</p>';
}
// 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
// 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>
</div>
</div>
</body>
</html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $txt, $options;
echo '
<div class="pathway-l">
<div class="pathway-r">
<div class="pathway">';
// 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'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '">' . $tree['name'] . '</a>' : $tree['name'] , ' » ';
else
echo $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
}
echo '</div></div></div><span style="display: none">kelo-lt Theme designed by <a href="http://padexx.de/" target="_blank" title="SMF Themes & webdesign solutions">padexx</a></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';
}
// Start of the tab section.
echo '
<ul>';
// Show the default [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'home' ? 'current' : '' , '"><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
// Show the [help] button.
echo ($current_action=='help' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'help' ? 'current' : '' , '"><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo ($current_action=='search' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'search' ? 'current' : '' , '"><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action=='admin' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'admin' ? 'current' : '' , '"><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action=='profile' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'profile' ? 'current' : '' , '"><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action=='pm' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'pm' ? 'current' : '' , '"><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action=='calendar' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'calendar' ? 'current' : '' , '"><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action=='mlist' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'mlist' ? 'current' : '' , '"><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action=='login' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'login' ? 'current' : '' , '"><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action=='register' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'register' ? 'current' : '' , '"><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action=='logout' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'logout' ? 'current' : '' , '"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
// The end of tab section.
}
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
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> </td>';
echo '
<td class="buttons">', implode('</td><td class="buttons">', $button_strip) , '</td>';
}
function showcase()
{
global $settings, $buttons, $context, $txt, $scripturl;
// personal info etc.
echo '
<div class="userinfo">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '<h3>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</h3>';
echo '
<div id="useropts">
<ul>';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a> ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>', $txt[616], '</b></li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
echo '
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
</ul>
</div>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
', $txt['welcome_guest'], '
<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'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" />
<input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />';
}
echo ' </div>';
echo '
<div class="searchfield">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 4px 0;">
<input type="text" name="search" value="" size="30" style="margin-bottom: 4px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="margin-bottom: 4px;" /><br />
<b><a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a></b>
<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><br />
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '- ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span> -
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>
<div class="clr"></div>
';
}
?>
What I must change?
Thanks for your help.
Quote from: SunKing on May 21, 2008, 06:37:34 AM
What language are you using? If you are using a language other than English, try changing the language to English and see if the text then displays.
I am using ENGLISH only man..i know about it as english is the best language for all the mods..thats why its pretty confusing.
Quote from: emonk on May 19, 2008, 03:52:06 PM
When a user put a image between img tags, the shout deforms.
What happen if users put more than one image, or if the users put a high resolution image?.
Can you make a function thath restricts the user of certain tags such as the [ img ] or [ youtube ] tags ?
Quote from: ameo on May 19, 2008, 05:16:03 PM
that's interesting thinking emonk. function that restricts pictures and youtube would be useful.
you can also say it's forbidden to post big images and flash files in shoutbox, and ban everyone who does that.
this is of course, another way of dealing with things, but sometimes the best. rules must be obeyed, otherwise admin kicks a** [bans] people :P
Sometimes users are u friends and u cant ban them :)
sry, the function already exists and i found that in yshout.php
just search with ur text editor for "bbc" word and u see this line 2 times in the file, and add ur tags for restrict (such as [img])
$newText = str_replace(array("[list]","[center]","[left]","[right]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
Quote@MothMan: By default, it uses the membergroup colors (style override in the shout text itself).
*headsmack* Doh, you're right. Hadn't even thought of that.
But... can you explain what you mean by "style override in the shout text itself" ?? Does that mean it's possible to add in my own style info into the shoutbox coding to over-ride the name colours? If so, could someone please give me some explanation of how? I know a little bit about styles, but don't know what 'variable' to assign the style to for the usernames, nor for the commands links above the shout (History, Extended History, etc) in order to change the style of those links as well.
Thanks.
Quote from: War Chief on May 21, 2008, 06:29:30 AM
I have set up the shoutbox on my forum here: warriorsmovie.co.uk/forum and on the whole it is working well and is really great. However, I am experiencing some strange behaviour:
When I am signed in as myself (administrator), I cannot see the shoutbox title, the links across the top, or the "Shout" on the shout button. This is the same for my moderators. However, the shoutbox functions normally.
If I sign in as a regular user, it displays fine.
If I create an administrator user or moderator, it works fine.
I have checked that it is not a font colour issue masking the links, they just don't seem to load.
I am baffled and so any help would be appreciated.
I'm still having an issue similar to this. I don't have the History, etc, links, and the text on the Submit button isn't showing up, and it constantly prompts me to log in below the shout box, when I am logged in on the forum. It doesn't seem to believe me that I am an admin, either, as my name isn't in red like it used to be.
I double checked my language setting, and it is already set to "english.
Quote from: Sruc on May 21, 2008, 12:02:15 PM
I need some help.
I tried to install it in Kelo-It (http://custom.simplemachines.org/themes/index.php?lemma=586) theme, but the shoutbox doesn't load.
I tried to do this:
QuoteFixing some kinds of "loading shoutbox..." errors: Some errors are caused by having the wrong domain; if you log on and go into a board, and the problem disappears, then the fix is to change
Code: [Select]
var board_url = "', $boardurl, '";to
Code: [Select]
var board_url = "/path/to/forum";in Themes/<theme>/index.template.php where /path/to/forum is the *absolute* URL to your forum. For example, if your forum is at http://domain.com/myforum, use "/myforum" (NOT /home/domain/myforum!)
But I don't find var board_url = "', $boardurl, '"; in my index.template.
The absolute url to my forum is "/www".
Here is the index.template code:
<?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.5';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
$settings['use_image_buttons'] = true;
/* 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, $language, $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 ?finll 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" />
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/ie6lte.css?fin11" />
<![endif]-->';
/* 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" />';
// 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 = "'; $boardurlparse = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?May122008" 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;
}
</style>';
// YSHOUT END
// 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']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// 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>
</head>
<body>
<div id="wrapper">
<div id="header-l">
<div id="header-r">
<div id="header">
<div id="logo">';
if (empty($settings['header_logo'])){
echo '<a href="'.$scripturl.'" title="" class="logo-txt">', $context['forum_name'], '</a>';
}
else {
echo '<a href="'.$scripturl.'" title="" class="logo"> </a>';
}
echo'
</div>
</div>
</div>
</div>
<div id="mainnav-l">
<div id="mainnav-r">
<div id="mainnav">
',template_menu(),'
</div>
</div>
</div>';
echo'
<div id="userbar-l">
<div id="userbar-r">
<div id="userbar">
<div id="topbar">';
// The information that will be shown to the member when he/she is logged on
if($context['user']['is_logged'])
{
echo '
<div id="loggedin">
<b>', $txt[248], '</b> ', $context['user']['name'];
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ',<br />', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'], '.';
echo '
</div>
<div id="loggedin2">
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>
</div>';
}
// The login box which will only be shown to the guests
else
{
echo '
<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" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input name="user" type="text" onfocus="if(this.value==\'', $txt[35], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[35], '\';" value="', $txt[35], '" />
<input name="passwrd" type="password" onfocus="if(this.value==\'', $txt[36], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[36], '\';" value="', $txt[36], '" />
<input name="sa" class="submit" src="', $settings['images_url'], '/custom/go_icon.png" type="image" value="', $txt[34], '" />
<input type="hidden" name="cookielength" value="-1" />
</form>';
}
echo'
</div>
<div id="searcharea">
<form action="', $scripturl, '?action=search2" method="post">
<input name="search" type="text" onfocus="if(this.value==\'', $txt[182], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[182], '\';" value="', $txt[182], '" />
<input name="sa" class="submit" src="', $settings['images_url'], '/custom/go_icon.png" type="image" value="', $txt[182], '"/>';
// 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>
</div>
</div>
</div>
</div>';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo'
<div id="footer-l">
<div id="footer-r">
<div id="footer">
' ,theme_copyright(),' | Theme kelo-lt by <a href="http://padexx.de">panic</a>
</div>
</div>
</div>';
echo'
<div id="footer2">';
// Show the load time?
if ($context['show_load_time'])
{
echo '
<p class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</p>';
}
// 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
// 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>
</div>
</div>
</body>
</html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $txt, $options;
echo '
<div class="pathway-l">
<div class="pathway-r">
<div class="pathway">';
// 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'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '">' . $tree['name'] . '</a>' : $tree['name'] , ' » ';
else
echo $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
}
echo '</div></div></div><span style="display: none">kelo-lt Theme designed by <a href="http://padexx.de/" target="_blank" title="SMF Themes & webdesign solutions">padexx</a></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';
}
// Start of the tab section.
echo '
<ul>';
// Show the default [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'home' ? 'current' : '' , '"><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
// Show the [help] button.
echo ($current_action=='help' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'help' ? 'current' : '' , '"><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo ($current_action=='search' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'search' ? 'current' : '' , '"><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action=='admin' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'admin' ? 'current' : '' , '"><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action=='profile' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'profile' ? 'current' : '' , '"><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action=='pm' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'pm' ? 'current' : '' , '"><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action=='calendar' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'calendar' ? 'current' : '' , '"><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action=='mlist' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'mlist' ? 'current' : '' , '"><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action=='login' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'login' ? 'current' : '' , '"><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action=='register' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'register' ? 'current' : '' , '"><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action=='logout' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'logout' ? 'current' : '' , '"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
// The end of tab section.
}
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
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> </td>';
echo '
<td class="buttons">', implode('</td><td class="buttons">', $button_strip) , '</td>';
}
function showcase()
{
global $settings, $buttons, $context, $txt, $scripturl;
// personal info etc.
echo '
<div class="userinfo">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '<h3>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</h3>';
echo '
<div id="useropts">
<ul>';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a> ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>', $txt[616], '</b></li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
echo '
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
</ul>
</div>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
', $txt['welcome_guest'], '
<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'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" />
<input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />';
}
echo ' </div>';
echo '
<div class="searchfield">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 4px 0;">
<input type="text" name="search" value="" size="30" style="margin-bottom: 4px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="margin-bottom: 4px;" /><br />
<b><a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a></b>
<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><br />
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '- ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span> -
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>
<div class="clr"></div>
';
}
?>
What I must change?
Thanks for your help.
Help me please :(
Hi there, i've installed the SMF 2.0 Beta 3 & i'm using other theme named Overview.
here is my board path.
http://www.project-bb.org/
I want to add the chat tab to the main forum top & link it to index.php?action=chat
& want that link go to the page of the chat depending on that theme. I'm new here & please help me.
Also if you want index.template.php, i'm attaching it here.
Thanks in advance...!!! :)
@ SwapsRulez - I believe that what you're trying to do is THIS (http://www.simplemachines.org/community/index.php?topic=137508.msg1544760#msg1544760)
Jut follow instructions and you will be OK.
p.s. By the way, I wrote the guide for 1.1.5 but it may work for 2.0.3 also.
Hi nneonneo,
trying to install shoutbox in a new forum ;)
search some 120 pages of this topic... ???
but did not find answers ... so sorry to ask:
#1 The problem:
Fixing some kinds of "loading shoutbox..." errors: ...
In my index.template I have this:
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
so I changed to var board_url = "/forum"; but it did not solve it.
#2 I'm using SMF 2.0 Beta 3.1 Public in brazilien portuguese language. If I set to english I have this "loading shoutbox..." error above. If I change to portuguese it is blank.
This is my Modifications.brazilien.php file:
<?php
<![CDATA[ // ---- Begin modification - nneonneo's Shoutbox ----
$txt['yshout_shoutbox'] = 'Shoutbox ';
$txt['yshout_loading'] = '...a carregar shoutbox...';
$txt['yshout_rp_banned'] = "Expulso da shoutbox.";
$txt['yshout_no_guests'] = 'Quer ter acesso à shout? Para isso só tem de se registar!';
$txt['yshout_ban_conf'] = 'Confirmação de expulsão';
$txt['yshout_select_mode'] = 'Seleccione expulção:';
$txt['yshout_rp'] = 'Ler e Postear';
$txt['yshout_p'] = 'Apenas Postear';
$txt['yshout_error'] = 'ERRO: ';
$txt['yshout_no_user'] = 'Membro não encontrado.';
$txt['yshout_del_success'] = 'Apagar Shout.';
$txt['yshout_no_action'] = 'Não fazer nada.';
$txt['yshout_history'] = 'Historia';
$txt['yshout_commands'] = 'Comandos';
$txt['yshout_exthistory'] = 'Historia completa';
$txt['yshout_hide'] = 'Esconder';
$txt['yshout_show'] = 'Mostrar';
$txt['yshout_admlinks'] = 'Links da Admin';
$txt['yshout_return'] = 'Voltar a Shoutbox';
$txt['yshout_p_banned'] = 'Está impedido de postear.';
$txt['yshout_banned'] = 'Expulso';
$txt['yshout_shout_button'] = 'Enviar!';
$txt['yshout_banlist_caption'] = 'Shout Box Bans (click para tirar o banimento)';
$txt['yshout_ip_bans'] = 'IP para Bans ';
$txt['yshout_username_bans'] = 'nome de membro a banir ';
$txt['yshout_ban_type_error'] = 'use /ban membro ou /ban ip!';
$txt['yshout_ban_mode_error'] = 'Tem de ter um motivo de argumento.';
$txt['yshout_imp_slash_error'] = 'Prefixe a shout com "/" (slash character)! veja "/help impersonate" para detalhes.';
$txt['yshout_imp_uname_error'] = 'Não introduziu o seu nome de membro!';
$txt['yshout_imp_max4_error'] = 'Maximo 4 argumentos!';
$txt['yshout_cmd_reference'] = 'Comando de Referencia';
$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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
<user>: 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>',
'/lock' => ' <message>: Lock the shoutbox for maintenance with the specified message.',
'/unlock' => ': Release the shoutbox from maintenance.');
$txt['yshout_maintenance'] = 'Fechada';
$txt['yshout_lock_arg_error'] = 'Motivo de encerramento da shout!';
$txt['yshout_lock_changed'] = 'mudar motivo de manutenção para "%s".';
$txt['yshout_lock_success'] = 'shoutbox encerrada para manutenção "%s".';
$txt['yshout_unlock_already'] = 'Falha a desbloquiar a shoutbox: shoutbox não está fechada!';
$txt['yshout_unlock_success'] = 'shoutbox desbloquiada.';
// ---- End modification - nneonneo's Shoutbox ----
?>
Thanks for your mod.
I have tested adding a smiley bar according to this link:
http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
I want to report that bar is working only with Firefox.
If you use IE 7 the webpage stops loading after shoutbox.
Regards,
Pablo.
IE 7 is a terrible web browser and just restrict access to it if the connecting browser is Ie.
Quote from: ameo on May 23, 2008, 12:26:22 PM
@ SwapsRulez - I believe that what you're trying to do is THIS (http://www.simplemachines.org/community/index.php?topic=137508.msg1544760#msg1544760)
Jut follow instructions and you will be OK.
p.s. By the way, I wrote the guide for 1.1.5 but it may work for 2.0.3 also.
Thanks soo much mate.... i'm running my shoutbox successfully.
see here...
http://www.project-bb.org/index.php?action=chat
But still there is one problem, whenever i'm on shoutbox page, still it shows the
Home Tab selected. I want
Chatbox tab to be selected. I figured out which code is responsible for that, but still not getting how to change that.
this is the code for that & i added the code for the Chatbox tab there...
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// 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 '
<div id="topmenu">
<ul>';
foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a ', $button['active_button'] ? ' class="current"' : '' , ' href="', $button['href'], '"><span>', $button['title'], '</span></a></li>';
echo '<li><a ', $button['active_button'] ? ' class="current"' : '' , ' href="', $scripturl, '?action=chat"><span>', "Chatbox", '</span></a></li>';
// The end of tab section.
echo '
</ul></div>';
}
Current is the class i think used for the selected tab, but donno how to set it to Chatbox tab when that page is opened. Please help me.
Thanks in advance...!!! :)
Quote from: SwapsRulez on May 24, 2008, 03:58:28 AM
Quote from: ameo on May 23, 2008, 12:26:22 PM
@ SwapsRulez - I believe that what you're trying to do is THIS (http://www.simplemachines.org/community/index.php?topic=137508.msg1544760#msg1544760)
Jut follow instructions and you will be OK.
p.s. By the way, I wrote the guide for 1.1.5 but it may work for 2.0.3 also.
Thanks soo much mate.... i'm running my shoutbox successfully.
see here...
http://www.project-bb.org/index.php?action=chat
But still there is one problem, whenever i'm on shoutbox page, still it shows the Home Tab selected. I want Chatbox tab to be selected. I figured out which code is responsible for that, but still not getting how to change that.
this is the code for that & i added the code for the Chatbox tab there...
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// 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 '
<div id="topmenu">
<ul>';
foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a ', $button['active_button'] ? ' class="current"' : '' , ' href="', $button['href'], '"><span>', $button['title'], '</span></a></li>';
echo '<li><a ', $button['active_button'] ? ' class="current"' : '' , ' href="', $scripturl, '?action=chat"><span>', "Chatbox", '</span></a></li>';
// The end of tab section.
echo '
</ul></div>';
}
Current is the class i think used for the selected tab, but donno how to set it to Chatbox tab when that page is opened. Please help me.
Thanks in advance...!!! :)
It just says shoutbox loading for me :o
I wish I could tell you why, SwapsRulez, but I took a look at the code and can't figure out why that happens. {It may have something to do with Custom Actions mod} It's not such error, that should bother me, so I left it that way, but if someone figures out why that happens, please let us know. :P
P.S. Loading shoutbox errors have been discussed many times,
and most usual fixes are on first page of this topic !!!
This scrolling addon doesn`t work well... I put all code properly... Changed lines to show to 35, and everytime it refresh it scroll in the middle of SB... Don`t know why... Are you sure the code is good?
How to change the way of display shouts? Where to change it?
And last thing... Have u thought about making mod to use mysql? :D
I have no idea why, but yesterday - as admin - I saw the delete and ban links. Today, I only see the delete link! Any idea why? The one thing I changed was I no longer allow guests to post.
Thanks in advance - COOL mod!
digit
Hey i been trying to add a sound for when a user makes a new post in the shoutbox, but i can not find wot files to edit its just says wot to put in as code. Could somone plz help me and explain wot files to edit.
Many many thx :)
Quote from: ameo on May 24, 2008, 12:51:17 PM
I wish I could tell you why, SwapsRulez, but I took a look at the code and can't figure out why that happens. {It may have something to do with Custom Actions mod} It's not such error, that should bother me, so I left it that way, but if someone figures out why that happens, please let us know. :P
P.S. Loading shoutbox errors have been discussed many times,
and most usual fixes are on first page of this topic !!!
Thanks mate.... Resolved. :D
Gah! I didn't get the SMF notification emails, so I'm sorry for the extremely late response >.<
@nitishthelegendkiller: Again, a language problem; check Modifications.english.php and Modifications.english-utf8.php to make sure the text is there.
@UTM-MaKaVeLi: It's possible that your host has disabled the shoutbox :(. Also possible that the folder is owned by another user for some reason, though I don't know why that would happen.
@Sruc: What does visiting http://www.domain.com/<forum path>/yshout/yshout.php show?
@MothMan: The magic line is
$a_class = ' style="color: '.$user_profile[$user['id']]['member_group_color'].'"';
That sets the color.
Under
case "init":
is all the links and shout form stuff.
I should've added a class to the links up top. That will be something to add in 1.16.
@jossanaijr: I think file should be named Modifications.portuguese.php.
@Jennahan: It might be a bug with the scroll code. Did you add the scroll bar (height: and overflow: CSS) to #shouts?
I am considering MySQL, but it would make the installation a bit more work.
@digit: Hmm, not too sure why that would happen; doesn't happen for me. Maybe you changed something else too?
@Judgey: All changes go in yshout/js/yshout.js.
@Everyone: If I missed you, please let me know. I'm sorry the responses are so short; today, I am quite pressed for time (even though it is a Sunday :( )
Anyone have a good beep mp3 sound I can have?
You missed me, but that's okay! You had a bunch to go through! :)
Quote from: sashafiero on May 22, 2008, 11:17:10 PM
Quote from: War Chief on May 21, 2008, 06:29:30 AM
I have set up the shoutbox on my forum here: warriorsmovie.co.uk/forum and on the whole it is working well and is really great. However, I am experiencing some strange behaviour:
When I am signed in as myself (administrator), I cannot see the shoutbox title, the links across the top, or the "Shout" on the shout button. This is the same for my moderators. However, the shoutbox functions normally.
If I sign in as a regular user, it displays fine.
If I create an administrator user or moderator, it works fine.
I have checked that it is not a font colour issue masking the links, they just don't seem to load.
I am baffled and so any help would be appreciated.
I'm still having an issue similar to this. I don't have the History, etc, links, and the text on the Submit button isn't showing up, and it constantly prompts me to log in below the shout box, when I am logged in on the forum. It doesn't seem to believe me that I am an admin, either, as my name isn't in red like it used to be.
I double checked my language setting, and it is already set to "english.
I really appreciate your time.
Hi,
I've installed this mod and love it. I just have one issue.
For some reason when I try and reupload yshout.php back onto the site it won't let me......
I can't even change the permissions for it.
nneonneo: Thanks for the responses. Definitely appreciate you taking the time to answer all our questions.
Unfortunately, I think the coding involved to modify the appearance of the shoutbox is beyond my level/ability... hopefully with future releases, things might be a bit easier to customize for us novices. :)
I've seen some very cool customized versions of your shoutbox, so I know it's possible, it's just beyond my abilities.
Hey nneonneo me and SunKing messed around with your shoutbox and well we were just oging to give it to you so here it is.
Please note it only works with smf2
Me and him are working on a version for smf 1.1.x
Quote from: nneonneo on May 25, 2008, 05:42:10 PM
@UTM-MaKaVeLi: It's possible that your host has disabled the shoutbox :(. Also possible that the folder is owned by another user for some reason, though I don't know why that would happen.
Ok ill look into it ;).
Thanks for your reply. I know yourve had a lot to reply to :)
Autoscrolling doesn't seem to work with me and SunKing's shoutbox.
If anyone want to figure it out I uploaded the package with all the code edit it all you wnat.
Just found a bug in the latest version I think. I click on "Del" as admin, I get the message "Shout deleted" but when I refresh, the shout is still there...
Quote from: nneonneo on May 25, 2008, 05:42:10 PM
@jossanaijr: I think file should be named Modifications.portuguese.php.
It did not work.
I know I read it a long time ago, but I cannot find it anywhere... I'm having issues with the duplication, it's set to true but it doesn't do anything, I tried with Firefox, IE6 and IE7 and for a second it says that the it's open in another window but then it loads normally.
Could you point me to where it was discussed?
Thanks a lot!
I installed your Mod... but all i could see is
Shout Box
...loading shoutbox...
and it never loads.. why ?
Quote from: Elia on May 26, 2008, 10:31:11 PM
I installed your Mod... but all i could see is
Shout Box
...loading shoutbox...
and it never loads.. why ?
Look at prior replies to fix that
Hi,
I apologize if this has already been asked, I have looked but couldn't find anything.
I am just wondering if I can stop guest access to the shout box at all.
thanks
Kirsty
Quote from: Kirsty on May 27, 2008, 05:21:39 AM
Hi,
I apologize if this has already been asked, I have looked but couldn't find anything.
I am just wondering if I can stop guest access to the shout box at all.
thanks
Kirsty
Editable Options
in yshout/yshout.php: read the comments at the top of the PHP file
@MrMoney: Sorry, I don't have any really good beep sounds.
@sashafiero: It's possible that you've placed the shoutbox in the wrong spot (if you are using a custom theme), or your forum is using sessions in URLs instead of cookies (the shoutbox doesn't get the session if the URL looks like index.php?action=xxxx;session=xxxxxxxxxxxx...).
@Kirsty: This seems to have become more of a problem recently, though I have no idea why. If I get more information, I will let everyone know.
@MrMoney, SunKing: Thanks so much! I think it looks great. I will post this mod (though I will use a different name to distinguish it in the Package Manager: what do you want to call it?)
As for autoscrolling: that's a bug in the original code which is quite easy to fix. Just change 100000000 to null (I have just made this change in http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028).
@Jelle Mees: If you've changed the <em section, it might not work. This is a result of me using regexes for the deletion; I suspect there's a better way (maybe go line-by-line looking for the deletion code?).
@jossanaijr: *perhaps* you could try writing "error_reporting(E_ALL);" after <?php in yshout/yshout.php; it should cause a lot of errors to appear, but perhaps give a clue to the problem (if the shoutbox loads).
@dannbass: You mean that the duplicates check doesn't work? Try increasing 20 in
set_cookie("yShout_open","true",20/*seconds*/);
and see if that fixes it (30 might be OK)
Hi and thanks for helping :)
Just wondering how I would bold the usernames within the shoutbox.
Thanks
Kirsty
Quote from: nneonneo on May 28, 2008, 12:03:32 AM
@sashafiero: It's possible that you've placed the shoutbox in the wrong spot (if you are using a custom theme), or your forum is using sessions in URLs instead of cookies (the shoutbox doesn't get the session if the URL looks like index.php?action=xxxx;session=xxxxxxxxxxxx...).
Nope, I do use cookies, and it's been in the same spot this whole time, but I will double check.
Call it Super Shoutbox?
I'd appreciate if someone would upload his index.template.php with shoutbox which has smileys integrated, because, to tell the truth, I did try, but I'm lost. I get only errors.
The file you tried to save generated the following error:
Parse error: syntax error, unexpected '}', expecting ',' or ';' in index.template.php
Or if anyone can help me with this, nneonneo, or someone with php knowledge, I'd appreciate it.
Quote@jossanaijr: *perhaps* you could try writing "error_reporting(E_ALL);" after <?php in yshout/yshout.php; it should cause a lot of errors to appear, but perhaps give a clue to the problem (if the shoutbox loads).
Should I add :
error_reporting(E_ALL); or "error_reporting(E_ALL);" ?
I add error_reporting(E_ALL);
and nothing changed.
If I use in English: loading message...
If i use in Brazilien Portuguese: blank board
Images attached.
My shout box wont load!!! :o
EDIT: I got it to work by changing seting home.txt to 777 and other files to 555
Avoid this Mod!!! the instructions on the main page contain error code, when I copy in the first bit all the colors go messed up in Dreamweaver after that, that means it aint proper PHP, you wrote the code not me
Quote from: leet8845 on May 29, 2008, 07:30:41 AM
Avoid this Mod!!! the instructions on the main page contain error code, when I copy in the first bit all the colors go messed up in Dreamweaver after that, that means it aint proper PHP, you wrote the code not me
This is one of the best MODs available and supported!
BTW Dreamweaver is not a good option to edit php files...
Quote from: leet8845 on May 29, 2008, 07:30:41 AM
Avoid this Mod!!! the instructions on the main page contain error code, when I copy in the first bit all the colors go messed up in Dreamweaver after that, that means it aint proper PHP, you wrote the code not me
Avoid Dreamweaver!!! It's bloated and shows errors when there aren't any.
You really shouldn't jump to the conclusion that a mod doesn't work simply because a program doesn't render it properly. I have used many different editors/builders and
ALL of them render differently. This mod works fine for 99.9% of the users and the other .1% can have it up and running with minor alterations. I personally have set it up on
several sites, both SMF1.1.x and SMF2.0 with only very small manual modifications.
Pffft. :P
Just wondering if someone could help me on how to bold the usernames within the shoutbox.
Thanks
Kirsty
Quote from: jossanaijr on May 29, 2008, 09:15:04 AM
Quote from: leet8845 on May 29, 2008, 07:30:41 AM
Avoid this Mod!!! the instructions on the main page contain error code, when I copy in the first bit all the colors go messed up in Dreamweaver after that, that means it aint proper PHP, you wrote the code not me
This is one of the best MODs available and supported!
BTW Dreamweaver is not a good option to edit php files...
Quote from: SunKing on May 29, 2008, 05:29:54 PM
Quote from: leet8845 on May 29, 2008, 07:30:41 AM
Avoid this Mod!!! the instructions on the main page contain error code, when I copy in the first bit all the colors go messed up in Dreamweaver after that, that means it aint proper PHP, you wrote the code not me
Avoid Dreamweaver!!! It's bloated and shows errors when there aren't any.
You really shouldn't jump to the conclusion that a mod doesn't work simply because a program doesn't render it properly. I have used many different editors/builders and ALL of them render differently. This mod works fine for 99.9% of the users and the other .1% can have it up and running with minor alterations. I personally have set it up on several sites, both SMF1.1.x and SMF2.0 with only very small manual modifications.
Pffft. :P
Ok so although Dreamweaver may not be the best to edit PHP, the code desnt crash my forum like I thought it would, I followed these instructions, and I know what im doing cause I have added my own mods to the index.template.php file, still the shoutbox isnt there??? My code is below, If this Mod is so good it will be easy to tell me why it doesnt work, wont it? ;)
<?php
// Version: 1.1.3; 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'] = true;
/* 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="UK Garge Mix supply free downloads for UK Garage, uk garage forum, 4x4, UKG, Bassline, Old Skool, free garage mixes" />
<meta name="robots" content="index,follow" />', '
<meta name="keywords" content="UK Garage, old skool, 2-step, speed garage, bassline, 4x4, uk garage forum - free uk garage downloads , ukg mp3, free garage mixes, uk garage mixes, uk garage 2008 download, niche, download uk garage for free" />
<meta name="revisit-after" content="7 days">
<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" />';
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '"; </script> <script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" 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; } </style>'; // YSHOUT END
// 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>
</head>
<body>';
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">';
if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Georgia, serif; font-size: 160%; ">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';
echo '
</td>
<td align="right" class="catbg">
<a href="'.$scripturl.'"><img src="', $settings['images_url'], '/smflogo.gif" style="margin: 1px;" title="'.$context['forum_name'].'" alt="'.$context['forum_name'].'" /></a>
</td>
</tr>
</table>';
// display header
echo '
<table width="100%" border="1" bordercolor="#000000">
<tr>
<td bgcolor="393939"><div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-2959730448776069";
//728x15, created 27/01/08
google_ad_slot = "0525089466";
google_ad_width = 728;
google_ad_height = 15;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></td>
</tr>
</table>
';
// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>';
// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' , $context['current_time'], '</span>';
// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';
if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';
echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';
// 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
// Display manual registration
if($context['user']['is_logged'])
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';
else
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="79%">If you have any trouble registering an account, please click <a href="http://ukgaragemix.co.uk/manual_registration.html">here</a></td>
<td width="21%"> </td>
</tr>
';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];
// 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'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $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'];
// 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 />';
}
echo ' </span>';
}
// 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'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';
echo '
<table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
</td>';
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" /></a>
<input type="text" name="search" value="" style="width: 130px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<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>
</table>
</div>';
// Show the menu here, according to the menu sub template.
template_menu();
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}
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%;' : '', '">
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="left" class="copyright-links">
<small><strong>Back-n-Black</strong> by</small> <a href="mailto:[email protected]?subject=Your+Back-n-Black+Theme" target="_blank" style="font-size:10px;">Crip</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> | <a href="http://www.php.net/" target="_blank" style="font-size:10px;">PHP</a> | <a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a> | <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'])
{
// 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";
}
}';
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>';
// 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>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: -1ex;">';
// 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['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 ' > ';
}
echo '</div>';
}
// 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';
}
echo '<div id="tabs6">';
// How about the [home] button?
echo '<ul><li', $current_action == 'home' ? ' id="active"' : '', '><a href="', $scripturl, '"><span>'.$txt[103].'</span></a></li>';
// How about the [main_site] button?
echo '<li', $current_action == 'main_site' ? ' id="active"' : '', '><a href="http://ukgaragemix.co.uk/index.html" ><span>', $txt['main_site'], '</span></a></li>';
// How about the [download] button?
echo '<li', $current_action == 'download' ? ' id="active"' : '', '><a href="', $scripturl, '?action=downloads" ><span>', $txt['downloads_menu'], '</span></a></li>';
// How about the [music_player] button?
echo '<li', $current_action == 'music_player' ? ' id="active"' : '', '><a href="http://www.ukgaragemix.co.uk/music_player_free_uk_garage_downloads.html" target="_blank" ><span>', $txt['music_player'], '</span></a></li>';
// How about the [help] button?
echo '<li', $current_action == 'help' ? ' id="active"' : '', '><a href="', $scripturl, '?action=help" ><span>', $txt[119], '</span></a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li', $current_action == 'admin' ? ' id="active"' : '', '><a href="', $scripturl, '?action=admin"><span>', $txt[2], '</span></a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li', $current_action == 'profile' ? ' id="active"' : '', '><a href="', $scripturl, '?action=profile"><span>', $txt[467], '</span></a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li', $current_action == 'pm' ? ' id="active"' : '', '><a href="', $scripturl, '?action=pm"><span>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></li>';
// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '<li', $current_action == 'login' ? ' id="active"' : '', '><a href="', $scripturl, '?action=login"><span>', $txt[34], '</span></a></li>
<li', $current_action == 'register' ? ' id="active"' : '', '><a href="', $scripturl, '?action=register"><span>', $txt[97], '</span></a></li>';
}
// Otherwise, they might want to [logout]...
else
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>', $txt[108], '</span></a></li>';
echo '</ul></div>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
@Kirsty: Something like #shouts a { font-weight: bold; }
in the CSS block in index.template.php should do the trick.
@leet8845: Hmm, Dreamweaver should've let you know that all the code you added is on the same line. Unfortunately, the first line is a comment, so the entire shoutbox loading code is commented out...
// YSHOUT HERE global $boardurl...
@MrMoney: Sounds OK. Maybe "Super AJAX Shoutbox" sounds a little snappier? :P
@ameo: If you attach an unmodified index.template.php, I'll modify it and post it back.
@jossanaijr: I still don't know what's going on. I've probably asked you for a board URL (indeed, I remember doing so), but I'm going to need it again to check it out :-\
Quote from: nneonneo on May 30, 2008, 01:51:14 PM
@MrMoney: Sounds OK. Maybe "Super AJAX Shoutbox" sounds a little snappier? :P
How about "Nneonneo's Advanced AJAX Shoutbox"? ;D
Quote from: nneonneo on May 30, 2008, 01:51:14 PM
@jossanaijr: I still don't know what's going on. I've probably asked you for a board URL (indeed, I remember doing so), but I'm going to need it again to check it out :-\
That's was for my FIRST forum and it is working fine... ;D
Now I created a NEW one with SMF 2.0... :-[
I agree with SunKing's name!
Quote from: nneonneo on May 30, 2008, 01:51:14 PM
@leet8845: Hmm, Dreamweaver should've let you know that all the code you added is on the same line. Unfortunately, the first line is a comment, so the entire shoutbox loading code is commented out...
// YSHOUT HERE global $boardurl...
Thanks for that, it worked ok.
Only problem I got now is loading shoutbox... so I done direct to yshout.php in browser but got http 500, I cant set the permissions on yshout .php to 755 it's currently 666 and it wont change for some reason, Is there anyway round this?
WHy won't it change?
Quote from: nneonneo on May 30, 2008, 01:51:14 PM
@Kirsty: Something like #shouts a { font-weight: bold; }
in the CSS block in index.template.php should do the trick.
Thanks heaps for that :) worked great!
Quote from: MrMoney on May 30, 2008, 07:47:42 PM
WHy won't it change?
I asked my PC the same question but it didn't reply ;)
@ nneonneo - here's my index.template.php {about those smileys ;) }
nnenneo or some member:
could you please check my files?
Still the problems that I reported before (see pictures above).
Thanks!
Quote from: leet8845 on May 31, 2008, 04:51:45 AM
Quote from: MrMoney on May 30, 2008, 07:47:42 PM
WHy won't it change?
I asked my PC the same question but it didn't reply ;)
I mean does it give like an error message?
Okay, I just finished installing this mod - so far everything works great. :D However, I don't want guests to be able to post in my shoutbox, so how do I enable it so that members can only post?
Thanks in advance.
Quote from: bradymac on May 31, 2008, 02:41:51 PM
Okay, I just finished installing this mod - so far everything works great. :D However, I don't want guests to be able to post in my shoutbox, so how do I enable it so that members can only post?
Thanks in advance.
Editable Options
in yshout/yshout.php: read the comments at the top of the PHP file
@ameo: Attached; should work (if it doesn't, let me know!)
@jossanaijr: Your Modifications.brazilian.php file is a single line; it looks like
<?php// Version: 2.0 Beta 2.1; Modifications// ---- Begin modification - nneonneo's Shoutbox ----...
A fixed version is attached.
As for the "loading shoutbox" bug, I don't know what could be causing it. index.template.php doesn't have a yshout div, but the <head> code looks alright (you might need yshout-style.css, but that shouldn't cause the shoutbox to fail outright). You could always try shift-refresh in case the JS files are cached incorrectly.
@ jossanaijr - Thanks! :)
Almost there... I think...
Well I just discovered that it was missing /chats and /js in my site...
Installation problem? I did not know. Ok, I copied directories.
Now it shows shout in english but when I post I have this error:
"Warning: fopen(chats/home.txt) [function.fopen]: failed to open stream: Permission denied in ..."
Fix the permissions? chmod 777 (or 755) for chats and chats/home.txt should work.
Quote from: nneonneo on May 31, 2008, 06:27:30 PM
Fix the permissions? chmod 777 (or 755) for chats and chats/home.txt should work.
Yes, thank you. Working in English.
Now just need to fix the portuguese brazilien language option.
I had already installed Modifications.brazilien.php file.
When in brazilien language I can post and it is working but it still does not show the "Shoutbox" title or commands line or the "Shout" inside the button (image attached).
Thanks for your help,
hi
i am having problems with the shoutbox in that the loading chat is always there i have sumone on my forum who deals with all these thing like my tech support and he has tried all u guys say but cant get it working anyone got any idea what i can do
(http://i25.tinypic.com/2yjvpxi.jpg)
sorry for small image theres link to the main one http://tinypic.com/view.php?pic=2yjvpxi&s=3
Is there a way to make it so there are only so many shouts saved? Cause if a lot of shouts are made wouldn't it make the site run slower.
Still get this message ...loading shoutbox... after reading every post here and nothing has changed, what could be causing this on 1.1.5?
@jossanaijr: There's no Brazilian language per se; the file must be named "Modifications.portuguese.php".
@Danyo1: One of your mods has malfunctioned: http://danyo1.freehostia.com/smf/yshout/yshout.php
It should only say "Nothing to do.". You can try disabling $gzipCompression in yshout/yshout.php.
@asktb93: $max_lines for the main shoutbox; if you want to reduce the size of the history, you can add a periodic check to clear the history or archive it somehow.
@JF3000: Visit yshout/yshout.php in your browser; if it doesn't say "Nothing to do.", then follow the steps on the main mod page for what to do (e.g. if it's a 404 or 500 error)
Quote from: nneonneo on June 01, 2008, 03:33:15 PM
@jossanaijr: There's no Brazilian language per se; the file must be named "Modifications.portuguese.php".
Yes, you had already told me that and send me a file Modifications.brazilien.php that I copied to Modifications.portuguese.php and uploaded BOTH but still it is not showing the board name "Shoutbox" neither the command lines, but it is working. Picture already attached in my post before. Thanks.
Maybe portuguese-utf8? You should also check what other language files are there -- there should be several other files like "index.<language>.php" in Themes/default/languages, and for each <language> you should have a Modifications.<language>.php with the shoutbox texts.
I will check it now but this is SMF 2.0 and I just upload brazilien option.
EDIT: I do not think it is utf-8. Image attached.
nneonneo did you put the mod up? :)
nneonneo I have already been through the file and red the comments in the file, the message still appears and just hangs, I dont get any error messages, just the message that its always loading.
I have the exact same problem, SMF v1.1.5, default skin, English language, paid server with no restrictions (no safe mode, etc.), set correct permissions to yshout.php, tried every trick I can think of with no luck. I have Ajax chat installed and it runs perfectly. Any suggestions?
@JF3000, scanmaster: You should visit yshout/yshout.php in your web-browser, not from reading it. The main mod page (http://custom.simplemachines.org/mods/index.php?mod=585#post_troubleshooting) has a few things you should try first.
Hi every body, good my problem with shoutbox ajax is this:
I insert code in index.template.php
i insert code for visual shoutbox in boardindex.template, down with calendar
and my shoutbox is visual, but my error is a line 792 in yshout.php
the screen is add and the php's
pls help
pd: Or somebody can instal this shoutbox and i pay for this work =)
Quote from: nneonneo on June 01, 2008, 05:52:25 PM
@JF3000, scanmaster: You should visit yshout/yshout.php in your web-browser, not from reading it. The main mod page (http://custom.simplemachines.org/mods/index.php?mod=585#post_troubleshooting) has a few things you should try first.
I tried everything on your troubleshooting page and it still says "loading shoutbox". And I get the "Internal Server Error, The server encountered an internal error or misconfiguration and was unable to complete your request" error when going to yshout/yshout.php. I'm stumped!
@ nneonneo: Today I've finally tried your modified index.template.php
It's like this: In one theme shoutbox doesn't show [that's the one with idex.template.php you modified], and in other shoutbox shows, and smileys are displayed, but they wont go away on close.
p.s. - I've deleted one unnecessary 'echo which you could still find in previously attached template, but that didn't fix the problem.
@pumpituplive
you need to chmod your files to either 777 or 755 as stated just a few posts up.
Quote from: nneonneo on May 31, 2008, 06:27:30 PM
Fix the permissions? chmod 777 (or 755) for chats and chats/home.txt should work.
That should fix your shoutbox. ;) And it didn't cost you a thing.....
Hi, I have installed nneonneo's Shoutbox and I want it so only members can see it and type in it
Quote from: nneonneo on June 01, 2008, 03:33:15 PM
@asktb93: $max_lines for the main shoutbox; if you want to reduce the size of the history, you can add a periodic check to clear the history or archive it somehow.
Do you know how you would do that?
@scanmaster: You need to check your server error logs, since it's the Internal Server Error (500) which is causing the problem.
@ameo: Which unnecessary echo? According to the file, the shoutbox should be right under the link tree. Also, in the index.template.php I sent, there are yshout5 scripts, which might conflict with the existing shoutbox code.
Try adding the animatedcollapse.js to your other theme:
<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script>
@tvchaos: see yshout/yshout.php; you want "$allowGuests" to be false.
@asktb93: Hmm, one thing you could try is to use the truncateChat function with every write to the history file, but modify it so it doesn't write to history.history.home.txt, effectively erasing old archived information, so something like
function truncateHistory($max_lines) {
$chatPath = "chats/history.home.txt";
$fileContents = '';
if (file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$lines = explode("\n", $fileContents);
if(count($lines) > $max_lines) {
$newText = substr($fileContents, strpos($fileContents, "\n") + 1);
$handle = fopen($chatPath, "w");
fputs($handle, $newText);
fclose($handle);
}
}
then call
truncateHistory(1000);
in truncateChat. This certainly isn't the nicest solution; I'm sure better ones exist.
@tvchaos
there are guest options for viewing/posting toward the top of yshout.php (read comments there for usage).
@asktb93
$max_lines is for the number of lines shown in the actual shoutbox (and is located at the very top of yshout.php.
As for the history, I have mine (extended history) set up to only keep 10000 lines. It simply trims off the top lines to maintain 10000. This number, of course, could be whatever you desire. The code for it is found about a third of the way down in yshout.php and should look like:
<a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'file=',checkName($chatFile),'&history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>
You can try changing the 200 to a number more appropriate to your needs.
If the answer to my question has been answered, please don't flip out. Just tell me what page it's on lol.
My question is, that when I add the scroll bar it reduces the width of the text so badly that there's barely 4 chars per line. The scroll part works fine, but it looks proper ****** because it squishes everything and leaves a big blank space where the text used to fill. How do I move the scroll bar to the right.. like 3 inches lol 8)
@LinK187: You can change or delete the width: parameter in the code you added to fix that.
@SunKing: Thanks for the help! I really appreciate it. As for the custom shoutbox, I will get it posted today when I get back home.
What file and what line.
Cool I can't wait for people to use our modified shoutbox :)
Well, have have recently added more features like muting of sound... And He added smileys bar which I can't seem to get working on mine :P
Take your time with posting it. I didn't really even expect you to post it. I just wanted to show what it what it was like with all of the options enabled. MrMoney and I just kind of ran with it. :P
@LinK187: From http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028 was some code to add a scroll bar. Now, there's a width and a height parameter in that code, which you should alter to suit your forum.
I recently upgraded my smf 1.1.4 to smf 1.1.5 and installed 2 mods (pretty urls & googlebot).
Now I am having an error in the status bar of my browser saying: done, but with errors on page
When I click on the error icon it says:
Line: 23
Char: 2
Error: 'domfunction' is undefined
Code:0
I am using nneonneo shoutbox 1.04, & I think it caused the problem & I needed to uninstall it to get the latest one (1.15), but unfortunately in modifcation backage no uninstall link for the shoutbox, it only shows "list files" and "delete" link.
my questiosns are: how I can fix this problem? & How can I uninstall this old version to get the last one? because updating is for 1.14 and above.
Thanks in advance
To uninstall, you should remove the three blocks of code between // YSHOUT HERE and // YSHOUT END in index.template.php, then delete the yshout folder.
If the error persists, try disabling pretty URLs and/or search engine URLs.
How would I go about deleting the Extended History of the Shout Box? Also, about how long should I go until deleting the Extended History? The more extended history, the heavier load on the server?
Quote from: nneonneo on June 02, 2008, 07:57:46 PM
To uninstall, you should remove the three blocks of code between // YSHOUT HERE and // YSHOUT END in index.template.php, then delete the yshout folder.
If the error persists, try disabling pretty URLs and/or search engine URLs.
I did that and the error disappeared then installed shoutbox 1.15 but it shows only blank window. [even it doesn't show if it's loading or not]
I am using dilber theme
my shotbox located inside the shirinkable header.
Very Ver thnanks my shoutbox is run.
but one question more.
For change size character? where is the code?
Saludos!!
Find
#yshout {
font-size: 10px;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
in yshout.css (or possibly in index.template.php). Change the 10px to a size of your liking. Enjoy.
@bradymac: Just delete or archive yshout/chats/history.home.txt.
@SomaliDoc: Any errors during installation? Have you copied the Modifications.english.php file to the right language?
nneonneo, you rule! everything is good now :)
ummm...
always one more thing - this has probably been asked before, but how do i change how much posts shall be displayed?
i actually want more previous posts to be seen.
thanx in advance.
$max_lines
nneonneo please help me! :'(
I saw today this post: http://www.simplemachines.org/community/index.php?topic=137508.msg1534963#msg1534963
And i wanted to know the new header only accept html not php. How can i add this go to the news header, so it show like like php (html doesnt show good):
// YSHOUT HERE
echo '
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>';
// YSHOUT END
Thanks
Hello all.
I used the shoutbox for the 1.1.4 version with no problems.
I install yshout for 1.1.5 version and I get the following error.
The yshout is working fine, but I don't see the text for the shout (I only see the grey box) and also I don't see the upper links (History, etc...)
I only modified the index.template.php
Should I modify the language ones? Because you mention they are not needed for the mod to work.
Thanking you in advance for your help
@sorosh1: If the new news header only accepts HTML, you should use
<div id="yshout">Loading shoutbox...</div>
but smileys will not work because they need PHP to run (though if you use only one theme, I suppose you could *hard-code* the smileys HTML...probably not the best idea though...
@vkterminal: Yes, Modifications.<language>.php needs to be fixed (not sure what the problem is, but I will certainly have to check...)
@SunKing/MrMoney: I haven't posted the modified shoutbox yet because you said you were going to add a few new features, but if you want me to post the one that you've already released, that's fine too.
Quote from: vkterminal on June 04, 2008, 10:39:37 AM
Hello all.
I used the shoutbox for the 1.1.4 version with no problems.
I install yshout for 1.1.5 version and I get the following error.
The yshout is working fine, but I don't see the text for the shout (I only see the grey box) and also I don't see the upper links (History, etc...)
I only modified the index.template.php
Should I modify the language ones? Because you mention they are not needed for the mod to work.
Thanking you in advance for your help
This is still my problem.
Quote from: nneonneo on June 04, 2008, 11:50:21 AM
@sorosh1: If the new news header only accepts HTML, you should use
<div id="yshout">Loading shoutbox...</div>
but smileys will not work because they need PHP to run (though if you use only one theme, I suppose you could *hard-code* the smileys HTML...probably not the best idea though...
Thanks for your help.
Quote from: nneonneo on June 04, 2008, 11:50:21 AM
@SunKing/MrMoney: I haven't posted the modified shoutbox yet because you said you were going to add a few new features, but if you want me to post the one that you've already released, that's fine too.
Go ahead and release that one.
We will update a mod package every now and then ;)
Hi there, since I've installed the shoutbox all ie users get insane lag or the page never loads. Firefox users have no problem. Don't lecture me on how everyone should use firefox, because well, I agree 8) However a number of my users don't believe so and use IE. Do you know what causes it? Code in the mod? An option(s) in ie? Any help you can provide is much appreciated.
IE just is a very laggy web browser.
Block them if they are using IE
and make them use ff or opera or something
Like I said. I would like a solution, not IE bashing. As far as I can tell IE works the same as FireFox for me on every website except my own, and only after installing the shoutbox. So please, constructive feedback please.
IE has really been awfully bogged down lately, and on many different sites. I noticed when on my forum, IE seemed to have to download each image every time I visited a page, instead of caching them like normal. The shoutbox isn't image-laden, so I don't suspect it to be the root of my IE lagging. It may just be coincidence that MS's latest upgrade to IE and your installing the shoutbox happened around the same time. You may check some of the cache options in IE. Maybe not the perfect answer :P but a starting point anyway.....
I have had the shoutbox installed for a while now, and it ran great under all 4 major browsers. But, like I said, recently, IE just takes forever to load a page. Firefox, Opera, and Safari don't have any problems.
And if worse came to worse, you could always gently ignore the shoutbox in IE (at least until a better solution is found) and only have it show to other browsers while still allowing ALL of your members access to your site. You don't have to ban anyone just because they use IE. ;)
I doubt it has anything to do with cache. It's something in how ie processes the site as a whole. Almost like the coding in the mod overloads ie somehow.
How would I descriminate ie users from other browser users, and furthermore how would I make the shoutbox load/not load based on the browser the user is using. I also have only tested with ie7, I have not tested in ie6.
I have a question... everything was working just fine. Then this morning, whenever I try to shout something it doesnt so up...
I've checked the refresh time and everything. I asked some other people to check as well and they are having the same issue.
I tried to uninstall it and reinstall it... but i get this error:
Installing this package will perform the following actions:
1. Execute Modification install.xml Modification parse error
2. Execute Modification - Modification parse error
Is there a manual way to uninstall the shoutbox?
@xtnod: http://www.simplemachines.org/community/index.php?topic=137508.msg1565734#msg1565734
@LinK187: It's possible that my IE-specific hack has either stopped working, or it's not working well enough.
Basically, IE doesn't stop AJAX calls when you click a link, and simply sits there, waiting for the call to finish. I fixed this by attaching "transport.abort" to *every* link.
Was that included in what i downloaded? Or something you did after applying the mod?
I added it back in 1.12, then tweaked it. From my experience, it works, but I don't have the necessary resources to test all configurations (plus, it is a blatant hack which should not be required...).
One thing you may try: increase refreshTime in yshout/js/yshout.js (recommend above 10000 milliseconds), change "May122008" in index.template.php to something else (to force the file to be reloaded, instead of cached), then reduce $updateTimeout in yshout/yshout.php to 2 seconds or less, and see if the lag goes away.
ok so:
yshout.js --> refreshTime = 10000
index.template.php --> "May122008" to ?
yshout.php --> $updateTimeout = 2000
$updateTimeout = 2 (it's in seconds). You can change May122008 to anything you want (suggest Jun42008 or something)
I'm kinda confused about the date thing. How does it effect overall functionality? Why June? Will I have to change it next month?
You could change it to anything you wanted: "Fluffybunnies" would be just as good. What it does is it prevents browsers from caching the file, which forces browsers to download it again and apply the changes to the yshout.js file (if you don't do this, some browsers will retain the old refresh rate of 150 milliseconds, which could be disastrous).
I've been trying for ages but i can't seem to find how to change the text colour of what the people type in
(its white, which is un-see able on my forum :( )
Strange problem... the test forum I use to test ****** before I apply it to my actual forum was fixed by the changes to those 3 files. My actual forum is missing "May122008" on index.template.php?? Would it possible be set to anything else?
I"ve the same problem that LinK187 ...The chat doesn't work with IE ! :'( :'(
Please, nneonneo, can you find a solution ?
Thanks
I've the 1.1.5 version
He did find a solution.. except for some reason I can't find the "May122008" value on my main forum's index.template.php ... however it is present on my test forum's index.template.php ... proper wierd... ???
In index.template.php, in the #yshout { block, you add something like
color: blue
(you can also use hex colors like #FF00CC).
ok, i found the line, i guess it had a diff date in it. Seems to be working fine now. however it's still a wee bit laggy. Bearable, but still a tiny bit lagier than before I installed the chat box. Will increasing/decreasing any of the values you mentioned further increase IE browsing speed?
Decreasing $updateTimeout further (1 or 0) may help.
Does lowering this value take away from anything else? Or does it have little to no effect except in making ie work proper?
Quote from: nneonneo on June 05, 2008, 04:47:12 PM
In index.template.php, in the #yshout { block, you add something like
color: blue
(you can also use hex colors like #FF00CC).
Thanks alot :D
I have some scolling issues. When you use bbc codes like or even add a picture, it doesn't scroll all the way down.
@LinK187: It sets the length of time that the server will hold the connection open for, which is to improve response times and interactivity. As I mentioned, though, IE's bug means that it waits for the server to close the connection, rather than aborting the connection, which is what FF and other browsers do (hmm, thought: does that keep PHP running until the time is up? must test, might be a serious performance issue)
@Enders: Are you referring to autoscrolling?
So would lowering it impact anything other than ie functionality?
It would make the shoutbox a bit less responsive, but otherwise should not have a major effect.
Thank you very much for your help. I was abble to make it work so far, except for the smileys bar:
Erro: objDiv is null
Ficheiro de origem: http://xxxxxxx/smf/yshout/js/yshout.js?May122008
Linha: 277
Erro: animatedcollapse is not defined
Ficheiro de origem: http://xxxxxxx.com/smf/
Linha: 209
Please help me a little more i'll attach my files.
By the way is it possible to place an image to the right of the shout?
yes I'm referring to auto scroll..
@v@leriunix: OK, I think you may need to add animatedcollapse.js to your <head> section (step 1 on the smiley guide).
@Enders: I will check it out; it is likely a bug in the autoscroll script that I am using.
A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again.
that message shows ^^ how i fix?
If your refering to overwriting a .js file in the js folder, you'll have to use ur cpanel to edit the file or change the folder permissions.
[announce] Bugfix release 1.16 posted, along with SunKing and MrMoney's Advanced AJAX Shoutbox (finally! :P).
Main bugs fixed:
1) Usernames were being double-escaped in some cases, leading to bizarre output (affects guest posting)
2) A typo (oops) in the code caused numerous shoutbox failures; this has now been corrected.
Thanks, nneonneo.
You are great! :P
I don't know about other people, but I got error message upon installation of Advanced shoutbox:
Execute Modification ./Themes/default/index.template.php Test failed
ameo, it's only for SMF 2.0 now (hopefully it can be made compatible with 1.1.x soon).
really??? I've been running it on 1.1.5 this entire time...
nneonneo, I am using smf 1.1.5 and theme pdx-dk115v1, I checked everything, but the error remains.
Please help me. I'll send my index, if you need to check it.
Thanks for this great Mod.
@LinK187: That only applies to the Advanced Shoutbox posted by SunKing and MrMoney, not to the basic SB_ shoutbox.
@v@leriunix: OK, I looked at animatedcollapse.js from your earlier post, and it is not correct. Please copy the code again from http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091.
Thanks a lot. It was indeed an error in js, since copy paste doesn't work every time, ill leave the file for anyone who would want to see it.
Cool you posted ours
Thanks
could you help why does it show like that on top of my site .
here's the link ~> http://hadesms.elementfx.com/ (http://hadesms.elementfx.com/)
@Hades™
The code for displaying the shoutbox is at the very beginning of your file. It is even outside of the <html> tags. So the very very first thing the page does is show the shoutbox code.
This 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
needs to be placed where you want the shoutbox to appear (but between the <body> and </body> tags.
I just installed the shoutbox onto SMF with TP. The top command bars appear with the "x" picture. Did I miss something in the download?
Installing this package will perform the following actions:
Type Action Description
* 1. Execute Modification ./yshout/yshout.php Test failed
1. Replace ./yshout/yshout.php Test failed
2. Replace ./yshout/yshout.php Test failed
* 2. Execute Modification ./yshout/js/yshout.js Test successful
I currently have 1.15, upgrade script doesn't seem to work. And before anyone asks, I am using the default shoutbox mod ( no modifications what so ever ).
Quote from: 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
That last bit that I need to search for in the index.template.php is not coming up in the search !!
What should I do ?? :(
Please help :(
@VestigeL: Are you referring to the Advanced Shoutbox?
@Jelle Mees: I can't reproduce the bug. If you post yshout.php, I may know more.
The changes in yshout.php are really simple -- bump the version number in the second line, and replace "ID_POSTGROUP" by "ID_POST_GROUP".
@Old Lynx: Different themes may have different code, so it's possible that that piece of code isn't in your custom theme.
Hi nneonneo
Thanks for the reply. So what can I do to make this Shoutbox appear ?
30 minutes ago. I sent you an e-mail to
[email protected] did you recieve it ? (I wrote the e-mail like that on purpose LOL don't think I'm that stupid)
Let me know what you think please
Thanks man
Quote from: nneonneo on June 08, 2008, 06:23:43 PM
@Jelle Mees: I can't reproduce the bug. If you post yshout.php, I may know more.
The changes in yshout.php are really simple -- bump the version number in the second line, and replace "ID_POSTGROUP" by "ID_POST_GROUP".
Uploaded yshout.php . Thanks for your time.
Here is my theme
and that Red Box is where I want to add the Shoutbox. So It would be great if whatever is there now moves down the page and the Shoutbox goes in its place !
(http://i31.tinypic.com/2m6wfa9.jpg)
Someone please help :(
just put this in the first news slot:
<div id="yshout">',$txt['yshout_loading'],'
then erase all other news entries.
Quote from: SunKing on June 08, 2008, 10:04:46 AM
@Hades™
The code for displaying the shoutbox is at the very beginning of your file. It is even outside of the <html> tags. So the very very first thing the page does is show the shoutbox code.
This 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
needs to be placed where you want the shoutbox to appear (but between the <body> and </body> tags.
sry i dont understand what your saying . could you help me do it ? i could give you my cpanel pass cause i really dont understand all this
It's easier (and probably safer :)) to just upload your index.template.php here and ask someone to modify it for you. I will gladly do the mods, but I will need to know exactly where you want it to display and what theme you are using specifically.
Someone told me to post this here instead of where I had it (SMF Coding Discussion)
Ok, I downloaded the rar for this shout box: nneonneo's Shoutbox
What do I do with the rar files? I am new to this and my forum is requesting some new stuff. I guess that is good, it means I am growing! lol
Anyway, I copied my index.template.php file into notebook as a back up in case I mess up.
That is all the farther I have gotten. I don't want to mess this up.
My default theme is gunsmoke if that matters. Which from what I read it does matter, ALOT.
Thankyou.
upload the archive to your packages folder, then in the admin menu goto the packages section or whatever it's called, and install the mod. Easy as pie. OR if you want manual instructions they're on the first page of this thread i think...
Quote from: SunKing on June 08, 2008, 10:39:56 PM
It's easier (and probably safer :)) to just upload your index.template.php here and ask someone to modify it for you. I will gladly do the mods, but I will need to know exactly where you want it to display and what theme you are using specifically.
Alright . First of all this is my site ~> hadesms.elementfx.com (http://hadesms.elementfx.com)You can see what theme im using there . ( Its Aa_New_Damage anyway )
Second of all this is my index.template.php file :
<?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'] = true;
/* 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>
<script language="javascript" type="text/javascript" src="', $settings['images_url'], '/preloader.js"></script>
</head>
<body>';
// header goes below here
echo '
<!-- Added Header -->
<a name="top"></a>
<div align="center">
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="45" height="192"><img src="', $settings['images_url'], '/forum_body_01.jpg" width="45" height="192" alt="" /></td>
<td width="910" height="192" align="left" valign="top">
<table width="910" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="910" height="139" background="', $settings['images_url'], '/forum_body_02.jpg" align="center" valign="bottom">
<div class="title-text" style="padding:0 0 18px 0;">', $context['forum_name'], '</div>
</td>
</tr>
<tr>
<td width="910" height="18" align="left" valign="middle" background="', $settings['images_url'], '/forum_body_04.jpg">
'; template_menu();
echo '
</td>
</tr>
<tr>
<td width="910" height="35"><img src="', $settings['images_url'], '/forum_body_05.jpg" width="910" height="35" alt="0" /></td>
</tr>
</table>
</td>
<td width="45" height="192"><img src="', $settings['images_url'], '/forum_body_03.jpg" width="45" height="192" alt="" /></td>
</tr>
</table>
<!-- END header -->
<!-- BEGIN content sections -->
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1000" align="center" valign="top" class="content-bg">
<!-- End added header -->
<table width="860" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="860" align="left" valign="top">
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>';
// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>';
// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' , $context['current_time'], '</span>';
// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';
if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';
echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><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']) ? '' : '' , '
<span class="smalltext"><a href="', $scripturl, '?action=pm">Private Messages</a>: ', $context['user']['unread_messages'], ' Unread, ', $context['user']['messages'], ' Total.</span><br />';
}
// Otherwise they're a guest - send them a lovely greating...
else
echo $txt['welcome_guest'];
// 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'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $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'];
// 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 />';
}
echo ' </span>';
}
// 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'] . '\');"' : '', '>
<input type="text" name="user" class="input1" value="Username" onBlur="if(this.value==\'\') this.value=\'Username\';" onFocus="if(this.value==\'Username\') this.value=\'\';" /> <input type="password" name="passwrd" class="input1" value="password" onBlur="if(this.value==\'\') this.value=\'password\';" onFocus="if(this.value==\'password\') this.value=\'\';" />
<select name="cookielength" class="input1">
<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>
<input class="button" type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';
echo '
<table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
</td>';
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input class="input1" type="text" name="search" onBlur="if(this.value==\'\') this.value=\'Search...\';" onFocus="if(this.value==\'Search...\') this.value=\'\';" value="Search..." style="width: 190px;" />
<input class="button" type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<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>
</table>
</div>';
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}
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">
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;">
', theme_copyright(), '
</td>
<td width="28%" valign="middle" align="right">
<a href="http://www.mysql.com/" target="_blank" style="font-size:10px;">MySQL</a> | <a href="http://www.php.net/" target="_blank" style="font-size:10px;">PHP</a> | <a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a> | <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>
<!-- Added footer -->
</td>
</tr>
</table>
<table width="900" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="855" height="25" align="left" valign="middle" id="copyright-text">
</td>
<td rowspan="2" width="45" height="50" align="right" valign="top">
<a href="#top"><img src="', $settings['images_url'], '/header_09.jpg" width="45" height="47" alt="Back To Top" title="Back To Top" /></a></td>
</tr>
<tr>
<td width="855" height="20" align="left" valign="middle" id="legal-text">
</td>
</tr>
</table>
<!-- END Legal -->
</td>
</tr>
</table>
<!-- END content sections -->
<!-- BEGIN footer -->
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="500" height="81" align="left" valign="top">
<img src="', $settings['images_url'], '/header_11.jpg" width="500" height="81" alt="" /></td>
<td width="500" height="81" align="left" valign="top">
<img src="', $settings['images_url'], '/header_12.jpg" width="500" height="81" alt="" /></td>
</tr>
</table>
<!-- END footer -->
</div>';
// 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>';
}
// Footer goes above here
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex; padding-left:8px; padding-right:8px;">';
// 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['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 ' » ';
}
echo '</div>';
}
// 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 '
<ul class="main-navigation">';
// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-home"><a href="', $scripturl, '">' , $txt[103] , '</a></li>' , $current_action == 'home' ? '' : '';
// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-help"><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>' , $current_action == 'help' ? '' : '';
// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-search"><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>' , $current_action == 'search' ? '' : '';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-admin"><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>' , $current_action == 'admin' ? '' : '';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-profile"><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>' , $current_action == 'profile' ? '' : '';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-messages"><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>' , $current_action == 'pm' ? '' : '';
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-calendar"><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>' , $current_action == 'calendar' ? '' : '';
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-members"><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>' , $current_action == 'mlist' ? '' : '';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-login"><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>' , $current_action == 'login' ? '' : '';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-register"><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>' , $current_action == 'register' ? '' : '';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-logout"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>' , $current_action == 'logout' ? '' : '';
// The end of tab section.
echo '</ul>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
And Thirdly i want the shoutbox to disable people using the shoutbox if they are not logged in and their nickname in the shoutbox will the their forum nick/id .
And lastly this is where i want to place my shoutbox :
(http://img146.imageshack.us/img146/4624/sbhere2vf6.jpg) (http://imageshack.us)
[IMG] (http://g.imageshack.us/g.php?h=146&i=sbhere2vf6.jpg)
Hi Guys
I managed to do the shoutbox and place it where I wanted. So I want to thank you nneonneo for this wonderful Mod. Now I need to do some edits. Can you please help.
The bit at the top where it says Shoutbox doesn't have the little bar around it like all the rest of the forum sections do ! Can you please tell me how I can put it in a grey bar like the start of the new section under it. Also make its colour white like the other section titles.
(http://i26.tinypic.com/r8ezqh.jpg)
Thanks man
For some reason, the joomla tag cleanup mod is not compatible with your shoutbox. I need this mod to fix a quick reply/quote compatibility issue. How do I make shoutbox work with the tag cleanup mod?
PLEASE HELP :( :(
Quote from: LinK187 on June 09, 2008, 01:37:45 AM
upload the archive to your packages folder, then in the admin menu goto the packages section or whatever it's called, and install the mod. Easy as pie. OR if you want manual instructions they're on the first page of this thread i think...
I did exactly what you said. NOTHING. No shoutbox, no nothin'. The theme is gunsmoke.
Or does it take a bit to show up?
Quote from: Old Lynx on June 09, 2008, 10:25:30 AM
PLEASE HELP :( :(
I did mine to match the rest of the categories, I will post back here soon.
now, this will depend ont he theme you are using but for mine I use this line;
echo '
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: left; ">ShoutBox</div>';
Directly before the shoutbox code. It should work for you, you might need to change the padding bit to suit. Any issues give me a shout.
echo '
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: left; ">ShoutBox</div>';
if($context['user']['is_logged'])
// YSHOUT HERE
echo '
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END
if($context['user']['is_logged']) stops unregistered users seeing the shoutbox, delete the line if you wish.
OK, a little status update from me: I was just PMed by someone on the SMF customization team in regards to a few compliance and security issues, which have been in the code base for a while now. I am working to fix those issues as quickly as possible to ensure the security of the shoutbox.
Unfortunately, that means that my time is limited for these replies, so I am extremely grateful to all of you who are helping with support :)
@Old Lynx: I've only received one email, from a Mr. Xelef, is that you? Also, I think malfunkshun answered your question already.
@Jelle Mees: According to the version number, you are running 1.14b; unfortunately, due to the nature of the upgrades, I can only find time to make an upgrade for one previous version. If you grab 1.15, update, then update using 1.16, it should upgrade correctly.
@jdizine: It will have appeared on the default theme. For other themes, since themes vary wildly in appearance, I can't provide fixed instructions for all of them. If you check out "Installing to other themes" on the main mod page, it should give you enough to get it working (though I understand it is not always very easy to decide where to put the shoutbox!)
@OmenX: Hmm, it would appear that this mod causes the entire <head> section from SMF to be suppressed. You will have to add the first section (the first step in Installation to Other Themes on the main mod page) to Joomla's <head> section.
Quote from: nneonneo on June 09, 2008, 12:48:30 PM
@Jelle Mees: According to the version number, you are running 1.14b; unfortunately, due to the nature of the upgrades, I can only find time to make an upgrade for one previous version. If you grab 1.15, update, then update using 1.16, it should upgrade correctly.
I have 1.14b? Please explain this then:
The yshout.php that you posted clearly says "Version 1.14b" at top. Very early versions of the 1.15 package had a typo in the package_info.xml file, which caused installation to silently fail on certain versions of SMF; I fixed this before it had 10 downloads (a number of them mine) if I recall correctly. Even so, if you were one of the people who downloaded a broken package, I apologize.
What you should probably do is force 1.15 to be installed again by deleting the package, editing installed.list to remove the package and reuploading+reinstalling 1.15.
@ jdizine: go back a couple posts to find my breif instuctions on how to place the chatbox in the news.
Quote from: nneonneo on June 09, 2008, 12:48:30 PM
@OmenX: Hmm, it would appear that this mod causes the entire <head> section from SMF to be suppressed. You will have to add the first section (the first step in Installation to Other Themes on the main mod page) to Joomla's <head> section.
that flew right by me.... not sure I understand.
@OmenX: I'm trying to figure out what the mod does. The shoutbox assumes that index.template.php will show all its code, which isn't true if you use that mod. You will see the first section on the main mod page (contain some Javascript and CSS code); it needs to be copied to Joomla. Unfortunately, I know nothing about Joomla, so I can't say how to do it :-\
Quote from: LinK187 on June 09, 2008, 01:54:31 PM
@ jdizine: go back a couple posts to find my breif instuctions on how to place the chatbox in the news.
Are you talking about the news section inside the adminstration CP? I tried that and still nothing.
I added the part of my index.template.php that I think is where I need to make changes so you could see it.
Thanks malfunkshun
Can you please tell me which file I'm suppose to open and add the code ?? sorry I'm a n00b.
Thanks
@old lynx
index.template.php would be the file you want to add that to.
As SunKing said, put it where you added the code originally.
Though personally, because I ONLY want to see the SB on the index page, I added it to the boardindex.template.
OK thanks > now I have a bigger problem :( :(
I've just banned myself from posting in the Shoutbox !! and so I can't use the command /banlist to unban myself !!
what do I do ?? please help :( :(
I think it is a bit silly for the admin to be able to ban himself ! I was just trying out the little ban button > then I couldn't do anything ! :( :(
I feet powerless :(
Someone please help
hehehe....
Simply open _banlist.php and remove your ip address from that file, then upload it again.
lol that ain't simple ! maybe Mr nneonneo can do something about this lol :)
thanks SunKing I'll do that now and see if it works :)
If the sb ban list is separate from the forum ban list.. would it not be logical to conclude you should chek out the files in the yshout folder with wordpad... just a thought...
edit: lol i guess im not the only one with that thought.. 2 replies while typing
I can't ban myself on my SB. I tried on both my test site and my live site. The test site is a new install, so no "extra" modifications.......
I am running SMF 2.0 so maybe that's why.....
hmm maybe that is why !
I'm on SMF 1.1.5
hey isn't SMF 2.0 still Beta ?
PS. That worked perfectly SunKing :) so a Big Thank You :D
I succsessfully installed the Shoutbox! yay :D
And here is my Problem: This box should be like a real time chat, right? This feature works for me 2-5 Times and then Client A wont get anything new from Client B.
Wasting ages on finding out why. Timeout in php is at 0 and in .js its at 150 ms.
Apache Timeouts are at 100 secs or more, php timeouts and running times are at -1
If i wait some seconds before i write something after i reloaded the page, there are completely no updates from A to B
its broken :(
Good night :)
Hey Guys
I've just relized something !!! I can't type LONG sentences !!! why is that ?? :(
Can someone please tell me how I can increase the number of characters in a shout
Thanks
Open yshout.php and search for $maxShoutChars. Change the number to one that suits your needs.
Cool thanks SunKing :) you're a great help :)
Pretty much all of the settings you'll need will be right there in the beginning of yshout.php.
SunKing I wonder if you can help me with this >
I want to change the colour of the word Shoutbox to white > so that it matches the other section titles of my forum.
here is a SS
(http://i31.tinypic.com/154gbqs.jpg)
Thanks
Quote from: SunKing on June 08, 2008, 10:39:56 PM
It's easier (and probably safer :)) to just upload your index.template.php here and ask someone to modify it for you. I will gladly do the mods, but I will need to know exactly where you want it to display and what theme you are using specifically.
Alright . First of all this is my site ~> hadesms.elementfx.com (http://hadesms.elementfx.com)You can see what theme im using there . ( Its Aa_New_Damage anyway )
Second of all this is my index.template.php file :
<?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'] = true;
/* 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>
<script language="javascript" type="text/javascript" src="', $settings['images_url'], '/preloader.js"></script>
</head>
<body>';
// header goes below here
echo '
<!-- Added Header -->
<a name="top"></a>
<div align="center">
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="45" height="192"><img src="', $settings['images_url'], '/forum_body_01.jpg" width="45" height="192" alt="" /></td>
<td width="910" height="192" align="left" valign="top">
<table width="910" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="910" height="139" background="', $settings['images_url'], '/forum_body_02.jpg" align="center" valign="bottom">
<div class="title-text" style="padding:0 0 18px 0;">', $context['forum_name'], '</div>
</td>
</tr>
<tr>
<td width="910" height="18" align="left" valign="middle" background="', $settings['images_url'], '/forum_body_04.jpg">
'; template_menu();
echo '
</td>
</tr>
<tr>
<td width="910" height="35"><img src="', $settings['images_url'], '/forum_body_05.jpg" width="910" height="35" alt="0" /></td>
</tr>
</table>
</td>
<td width="45" height="192"><img src="', $settings['images_url'], '/forum_body_03.jpg" width="45" height="192" alt="" /></td>
</tr>
</table>
<!-- END header -->
<!-- BEGIN content sections -->
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1000" align="center" valign="top" class="content-bg">
<!-- End added header -->
<table width="860" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="860" align="left" valign="top">
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>';
// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>';
// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' , $context['current_time'], '</span>';
// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';
if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';
echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><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']) ? '' : '' , '
<span class="smalltext"><a href="', $scripturl, '?action=pm">Private Messages</a>: ', $context['user']['unread_messages'], ' Unread, ', $context['user']['messages'], ' Total.</span><br />';
}
// Otherwise they're a guest - send them a lovely greating...
else
echo $txt['welcome_guest'];
// 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'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $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'];
// 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 />';
}
echo ' </span>';
}
// 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'] . '\');"' : '', '>
<input type="text" name="user" class="input1" value="Username" onBlur="if(this.value==\'\') this.value=\'Username\';" onFocus="if(this.value==\'Username\') this.value=\'\';" /> <input type="password" name="passwrd" class="input1" value="password" onBlur="if(this.value==\'\') this.value=\'password\';" onFocus="if(this.value==\'password\') this.value=\'\';" />
<select name="cookielength" class="input1">
<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>
<input class="button" type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';
echo '
<table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
</td>';
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input class="input1" type="text" name="search" onBlur="if(this.value==\'\') this.value=\'Search...\';" onFocus="if(this.value==\'Search...\') this.value=\'\';" value="Search..." style="width: 190px;" />
<input class="button" type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<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>
</table>
</div>';
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}
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">
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;">
', theme_copyright(), '
</td>
<td width="28%" valign="middle" align="right">
<a href="http://www.mysql.com/" target="_blank" style="font-size:10px;">MySQL</a> | <a href="http://www.php.net/" target="_blank" style="font-size:10px;">PHP</a> | <a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a> | <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>
<!-- Added footer -->
</td>
</tr>
</table>
<table width="900" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="855" height="25" align="left" valign="middle" id="copyright-text">
</td>
<td rowspan="2" width="45" height="50" align="right" valign="top">
<a href="#top"><img src="', $settings['images_url'], '/header_09.jpg" width="45" height="47" alt="Back To Top" title="Back To Top" /></a></td>
</tr>
<tr>
<td width="855" height="20" align="left" valign="middle" id="legal-text">
</td>
</tr>
</table>
<!-- END Legal -->
</td>
</tr>
</table>
<!-- END content sections -->
<!-- BEGIN footer -->
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="500" height="81" align="left" valign="top">
<img src="', $settings['images_url'], '/header_11.jpg" width="500" height="81" alt="" /></td>
<td width="500" height="81" align="left" valign="top">
<img src="', $settings['images_url'], '/header_12.jpg" width="500" height="81" alt="" /></td>
</tr>
</table>
<!-- END footer -->
</div>';
// 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>';
}
// Footer goes above here
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex; padding-left:8px; padding-right:8px;">';
// 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['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 ' » ';
}
echo '</div>';
}
// 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 '
<ul class="main-navigation">';
// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-home"><a href="', $scripturl, '">' , $txt[103] , '</a></li>' , $current_action == 'home' ? '' : '';
// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-help"><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>' , $current_action == 'help' ? '' : '';
// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-search"><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>' , $current_action == 'search' ? '' : '';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-admin"><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>' , $current_action == 'admin' ? '' : '';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-profile"><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>' , $current_action == 'profile' ? '' : '';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-messages"><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>' , $current_action == 'pm' ? '' : '';
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-calendar"><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>' , $current_action == 'calendar' ? '' : '';
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-members"><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>' , $current_action == 'mlist' ? '' : '';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-login"><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>' , $current_action == 'login' ? '' : '';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-register"><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>' , $current_action == 'register' ? '' : '';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="mainNav-logout"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>' , $current_action == 'logout' ? '' : '';
// The end of tab section.
echo '</ul>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
And Thirdly i want the shoutbox to disable people using the shoutbox if they are not logged in and their nickname in the shoutbox will the their forum nick/id .
And lastly this is where i want to place my shoutbox :
(http://img146.imageshack.us/img146/4624/sbhere2vf6.jpg) (http://imageshack.us)
[IMG]
Sunking can you helpme ? (http://g.imageshack.us/g.php?h=146&i=sbhere2vf6.jpg)
ok...
@mquadrat
My yshout.php timeout is set to 20 and my yshout.js is set to 150 (on both of my forums) and I don't have any problems with things not updating properly. I have, however, noticed that a majority of the time my wife's computer will receive shouts about 10-15 seconds before mine. But I've never experienced the shoutbox simply not showing new shouts. I would try setting the timeout to something higher than 0 to see if that corrects the problem.
@Old Lynx
The easiest way to do that would be to open up Modifications.{your language}.php
Find $txt['yshout_shoutbox'] = 'Shout Box'; and change it to
$txt['yshout_shoutbox'] = '<font color="white">Shout Box</font>';
Someone should compile a faq. I've seen the same Qs answered over n over every 5 pages... people keep asking because they can't be assed to read 150 fu(kin pages lol... 8)
@Hades™
Attached is your modified index.template.php. I had to mod a few extra things (added the "titlebar", etc. to the shoutbox to make it match the rest of your site).
I'd compile a FAQ, but I'm afraid it would make the main mod page even longer than it is now (it kinda comprises a short FAQ anyway).
@mquadrat: You should consider setting $updateTimeout higher. At the rate you are refreshing, I'm guessing that Apache/PHP is having a very hard time keeping up.
Here's what happens. Every (refreshTime) milliseconds, the browser requests yshout.php. yshout.php stays open for at most $updateTimeout seconds, and will instantly (within one second) display new shouts and exit if any are received in that time. If you set $updateTimeout to 0, the browser will request yshout.php several times a second, which could potentially kill your server (the same would happen if someone were to request a page on your forum extremely rapidly).
Quote from: SunKing on June 09, 2008, 10:11:14 PM
@Hades™
Attached is your modified index.template.php. I had to mod a few extra things (added the "titlebar", etc. to the shoutbox to make it match the rest of your site).
^Y*(&#(!*#&!(#^*#!%#*%!# YOU ARE THE B OMB MAN IT WORKS WOO
Glad to hear it's working for you! Enjoy....it's a great mod.
Quote from: SunKing on June 09, 2008, 11:17:09 PM
Glad to hear it's working for you! Enjoy....it's a great mod.
ok now in normal forum i go to admin>edit member group right
how do i change the color in online list the default for admin is : #FF0000 (red)
where do i get the codes for the various colors . thanks
EDIT : Ok i found it its at ~> http://html-color-codes.info/ (http://html-color-codes.info/)
One question though why when people talk in shoutbox their font is all red for everyone . how do i make in a way that what they type in their shoutbox is the same color of their name . example : lets say admin is Cyan so admin will be talking in cyan and not red . anyone knows how to do this ?
And one last thing i need to change to color of the timestamp cause its black now and my forum skin is also black so cant really see .. so i have to highlight it den only can see . anyone can help me ?
I have followed these instructions and I still can not get my shoutbox up and running.
http://custom.simplemachines.org/mods/index.php?mod=585#post_otherthemes
Can someboby PLEASE help me?
There really must be a problem cause it is not even working on Core theme.
What do I do?
You should make a second smf installation on your webserver. Then slowly, carefully, and concisely apply the mod with all the instructions. If it works copy the altered files to your main forum. At least that way you can do your testing without ******ing up your main forum.
Quote from: Riotblade on May 19, 2008, 09:14:49 PM
Anyone know how I can have the it re-focus on the text box again after refresh?
Thanks
Good question!
Hi! Everything is working just fine in the initial page and posts, but if i open a board i have this error:
Fatal error: Cannot redeclare loadsmileys() (previously declared in /home/ipsinfo/public_html/smf/mymod/smiley.php:12) in /home/ipsinfo/public_html/smf/mymod/smiley.php on line 11
My file simley.php has'nt been changed, please help me!
I guess this happened after i added some smiles and changed the order.
PLEASE HELP
Quote from: LinK187 on June 10, 2008, 09:18:55 AM
You should make a second smf installation on your webserver. Then slowly, carefully, and concisely apply the mod with all the instructions. If it works copy the altered files to your main forum. At least that way you can do your testing without ******ing up your main forum.
Have I maybe been applying it wrong? I have been going in through the forum Admin. CP and doing the steps in there. Should I have been copying to notepad and changing it that way?
If I understand I would have to find a different SMF default theme and upload that one to override the already existing one in there? If so where can I find one? I used fantastico to get the one I have.
Not saying you're doing it wrong per say... but somethin's ******ed up somewhere...right? You should never mod your main forum without moding the test forum first..
Ok, so I am screwed then. I am new to this and just clicked install. Then made the changes it said to for other themes. I did save the original index.templete.php before I made the changes. :( :-[ :'(
I'd just backup ur database, do a fresh install. If you're as confused as you sound.
OK, progress report:
1) Security fixes (undisclosed).
2) Performance fix: on some servers, navigating away from the script doesn't actually stop it, so some servers may experience dozens of PHP instances outputting to dead connections. With this patch, the PHP script will periodically check the connection and quit if it has been closed while it was waiting.
3) IE7 fix: IE7 gets yet another fix for performance.
4) XHTML Strict validity
5) Code refactor: a bunch of code has been refactored for clarity
6) Reduction of regular expressions: regexes are arcane, and I wanted to use fewer crazy ones in favor of simpler, more resilient patterns which should make modding easier
7) Flicker fix: fixed a problem which caused flickering text after /help and similar commands
8) Guest name fix
As I test the changes further, I will probably fix more things. A release isn't expected until next week.
The Advanced AJAX Shoutbox will be updated as well.
Quote from: nneonneo on June 11, 2008, 12:40:22 AM
OK, progress report:
1) Security fixes (undisclosed).
2) Performance fix: on some servers, navigating away from the script doesn't actually stop it, so some servers may experience dozens of PHP instances outputting to dead connections. With this patch, the PHP script will periodically check the connection and quit if it has been closed while it was waiting.
3) IE7 fix: IE7 gets yet another fix for performance.
4) XHTML Strict validity
5) Code refactor: a bunch of code has been refactored for clarity
6) Reduction of regular expressions: regexes are arcane, and I wanted to use fewer crazy ones in favor of simpler, more resilient patterns which should make modding easier
7) Flicker fix: fixed a problem which caused flickering text after /help and similar commands
8) Guest name fix
As I test the changes further, I will probably fix more things. A release isn't expected until next week.
The Advanced AJAX Shoutbox will be updated as well.
Cool
I uninstalled 1.15. Now I do a fresh advanced 1.16 install, all tests are succesfull and then nothing happens. No shoutbox anyhere...
Then I try to install the normal 1.16 version, but my only option is "upgrade". Where can I find the final traces of 1.15 so that I can remove it completely. Searched for "shout" in index.template.php and there is nothing there anymore.
Quote from: nneonneo on June 11, 2008, 12:40:22 AM
OK, progress report:
1) Security fixes (undisclosed).
2) Performance fix: on some servers, navigating away from the script doesn't actually stop it, so some servers may experience dozens of PHP instances outputting to dead connections. With this patch, the PHP script will periodically check the connection and quit if it has been closed while it was waiting.
3) IE7 fix: IE7 gets yet another fix for performance.
4) XHTML Strict validity
5) Code refactor: a bunch of code has been refactored for clarity
6) Reduction of regular expressions: regexes are arcane, and I wanted to use fewer crazy ones in favor of simpler, more resilient patterns which should make modding easier
7) Flicker fix: fixed a problem which caused flickering text after /help and similar commands
8) Guest name fix
As I test the changes further, I will probably fix more things. A release isn't expected until next week.
The Advanced AJAX Shoutbox will be updated as well.
A number of vista x64 windows updates came out today and one of them was for ie7, which makes me think perhaps ie7 updates also were released for xp pro x64 and x86. You may want to update first to see if your ie7 tweaks are necessary or if you need to do even more tweaking.
Ok, I would like some help. This is a copy of my index.template.php. I included the whole thing. Can someone please show me where to make the changes for this custom theme?
I have tried to do it in the forum Admin area but it doesnt seem to work.
And, I would be really greatly hugely appreciative. :-\
Also does the shout box have to work on the Default theme for you to be able to get it to work on a custon theme?
If that is the case, then I need to fix it. Cause I have 3 ...loading shoutbox...
In the default theme.
Edit: I have fixed the 3 by reuploading the template. I think I will wait till this new one is posted. I will tell my forum Patience! "Good things come to those who wait"
ok thanks to sunking my shoutbox works but i want to add this ~> <object width="300" height="80"><param name="movie" value="http://media.imeem.com/m/PFc1_dSgbj"></param><param name="wmode" value="transparent"></param><embed src="http://media.imeem.com/m/PFc1_dSgbj" type="application/x-shockwave-flash" width="300" height="110" wmode="transparent"></embed><a href="http://www.imeem.com/hadesthespecialone/music/S1qjZsQ4/kill_hannah_lips_like_morphine/">Lips Like Morphine - Kill Hannah</a></object>
it will work but the shoutbox will stop working so for now i remove the song so that shoutbox will work . but if anyone can help me make both work at the sametime it would be great . here my site ~> www.hadesms.elementfx.com
I've finally gotten "instant-on" to work -- the shoutbox will no longer need to load, as it will be loaded with SMF. This should greatly improve usability.
In a few days, I will install the updated shoutbox on a test server, and you are welcome to test it at that time.
A highlight of some of the newer changes:
1) Instant-on functionality
2) Settings and documentation moved to a separate file, so that it is clearer where the settings are
3) Settings for PHP and JS unified, so that a single file handles both settings
4) Extra CSS classes, to allow more customization (the default CSS will be updated to show more blocks)
5) History now shows deletion and banning buttons if ShowAdminLinks is on
6) Changes to the chat logging system to be more flexible in the naming scheme
7) Added configuration option "hiddenGroups" -- groups for which the shoutbox should not be visible.
Well, I don't know what any of that stuff means but I am all for it.
I am looking forward to trying this. I have really had a bear of a time with getting the shoutbox to work.
My members are looking forward to this too. ;D
I hope we could see something like <catbg> as background for Shoutbox title, but to work properly.
It's just a suggestion, nneonneo, but I have a feeling that lots of people would want this. Just to fit
shoutbox nicely into forums.
Quote from: ameo on June 12, 2008, 01:49:54 PM
I hope we could see something like <catbg> as background for Shoutbox title, but to work properly.
It's just a suggestion, nneonneo, but I have a feeling that lots of people would want this. Just to fit
shoutbox nicely into forums.
What is <catbg> and why would we need a bg? The shoutbox on my forum looks fine because it integrates using the same colorscheme...
edit: fixed a typo
Quote from: nneonneo on June 12, 2008, 06:38:59 AM
In a few days, I will install the updated shoutbox on a test server, and you are welcome to test it at that time.
Sounds great! Looking forward to trying it out.
Guys,
I have SMF 2.0 Beta 3.1 public installed. I have recently installed the nneonneo's shoutbox module. Its working.
All the messages in the shoutbox appears center alligned. I want the messages to be left aligned. Can you please tell what file i need to edit and what code needs to be changed to make this happen.
your help is appreciated.
Thanks
ok thanks to sunking my shoutbox works but i want to add this ~> <object width="300" height="80"><param name="movie" value="http://media.imeem.com/m/PFc1_dSgbj"></param><param name="wmode" value="transparent"></param><embed src="http://media.imeem.com/m/PFc1_dSgbj" type="application/x-shockwave-flash" width="300" height="110" wmode="transparent"></embed><a href="http://www.imeem.com/hadesthespecialone/music/S1qjZsQ4/kill_hannah_lips_like_morphine/">Lips Like Morphine - Kill Hannah</a></object>
it will work but the shoutbox will stop working so for now i remove the song so that shoutbox will work . but if anyone can help me make both work at the sametime it would be great . here my site ~> www.hadesms.elementfx.com
Hey Guys How do I stop people from using the IMG code in my shoutbox ?? they make it look very messy with movies images from all over the web !
someone please help :(
I have a small problem...don't know where to fix it...
when you send multiple lines....
"blablabla" <hit enter on keyboard>
"abcdefg"
on the "abcdefg" string...it kind of starts registering your focus and key strokes at around "d" so you never see "abc"
any ideas how to always keep the focus on the text box? (or where)
thanks will be waiting for an answer.
@Old Lynx: you can add [ img ] to the array in yshout.php that has [ center ] and a few other tags.
@Minadude: This is actually due to flood control, the system that prevents users from typing many messages and flooding the shoutbox. You can turn it off by setting floodTime to 0 in yshout/js/yshout.js.
@mark299: If it's a custom theme, you probably installed it in the middle of a centered block. The easiest fix is to add "text-align: left" to #yshout { CSS block in index.template.php.
For anyone who is interested in testing a beta version of the new upgrade, please head to http://nneonneo.net46.net. It is also recommended that you read the topic http://nneonneo.net46.net/index.php?topic=2.0 for further information.
I will be more than happy to test it for you. And from what I can see, the best shoutbox just got better!
How do I allow regular members to use spoiler tags in the shoutbox?
They should already be able to use spoiler tags. However, depending on how the spoiler tags work, they might not work correctly.
Thank you for the swift reply. I and other admins can use spoiler tags, but mods and regular members are being told they don't have permission.
This is the error they get:Sorry - you don't have the proper permissions to post spoilers.
Hi nneonneo
Thanks but I did that and people are still able to post images/animations in the shoutbox !!
what am I doing wrong :(
@JayRoe: That doesn't seem to be shoutbox related, since the shoutbox has no message like that. Can regular users use spoiler tags on the forum?
@Old Lynx: What tag are they using? Have you installed any other BBCodes?
I've not installed anything ! all I've installed is the shoutbox ! I've not touched anything else !
just to test it myself > I went ahead and uploaded an image to TinyPic > and when I copied the IMG code into the shoutbox the image appeared !!
but I don't want it to :(
nneonneo, yes it works on the rest of the forum. It's only on the shoutbox they're restricted.
@Old Lynx: What does the modified line look like?
@JayRoe: Which version are you using? In both of the versions here (http://custom.simplemachines.org/mods/index.php?mod=195), the error message is not actually used by the mod (apparently).
I'm using v0.5 for SMF 2.0 Beta 3.1 Public.
Aha! It's a bug in the shoutbox. I didn't load the user permissions (didn't even know I should have), so that's why it rejected the spoilers.
I'll patch that for next release; meanwhile, you can add
loadPermissions();
before
loadTheme();
in yshout/yshout.php to fix it (and let me know if that works!)
@Old Lynx: OK, it's my fault. I just realized that I forgot to use a case-insensitive replace, so [ IMG ] will work :P
That will most definitely be fixed.
OK, the next version, which will be numbered 1.20, is almost ready. I am still open to suggestions of new features and improvements, and don't be afraid to suggest something that has already been said before.
I won't be providing upgrade scripts due to the sheer volume of changes (over half of the lines in yshout.php have been altered in some way).
There's one detail I haven't yet finalized:
I am considering adding three forum permissions "shoutbox_moderate", "shoutbox_view" and "shoutbox_post" which would replace the existing $moderatorGroups system (which requires users to figure out group IDs, something I've never really liked), as well as probably making things a little easier. However, the downside of this is that I will need new language translations (some of the existing ones aren't too complete anyway, so it might just be due...). Another potential downside is that I can't assign sensible defaults (e.g. global moderator can moderate shoutbox), but that might not be a big problem. Any thoughts?
Hi nneonneo :)
OK I just went and added [img] and [IMG] << both of them and still it doesn't work ! still people are able to post images :( :(
1.SMF 1.1.5 / Had to do a manual installation since it's custom theme
2. SB_1.16
Error on index page:
Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in /home/neotan/public_html/forum/yshout/yshout.php on line 346
- Any ideas?
- I have attached the index.template.php
@Old Lynx: Yeah, but [ ImG ] will still work, as will half-a-dozen other variations. You are best off using str_ireplace instead of str_replace (for PHP 5 only).
@neotan: Try turning off gzipCompression in yshout/yshout.php.
For some reason, no matter where I put it in the index.template.php file, it always ends up at the very top, before the theme even begins. It also never displays anything. Any help?
SMF v 1.1.5
Using Xbox 360 ELITE theme by Metalcore
SB_1.16
Where exactly are you wanting it to display?
Usually, when the code ends up "outside" the theme, it's a result of the shoutbox code being placed outside of the containing tags (the main <div>'s or <table>'s, etc.).
how do I know if my place supports PHP5 ??
thanks
Your host should have that info somewhere in your account section. You can also look that info up inside cPanel, or phpMyAdmin, or something similiar.
I want it right under where it says "Welcome(Your name)" or in that general area. I'm no good with PHP or whatever the layout is written in, so I don't really know where to put it.
Do you have any other mods installed? If so, then attach your index.template.php to this post and I'll see what I can do for you. Otherwise I can just mod the original file and put it here for you to grab.
Dang it, 000webhost picked the perfect time to audit my website :P
Oh well, I will simply wait it out (I've got a personal webserver for testing purposes, but it isn't publicly available). Meanwhile, I think I'm going to (experimentally) code up a version that uses forum permissions.
OK I've just been to my host's website and it says their servers support php4 & 5 !!
So how do I do that thing you talked about nneonneo :)
Thanks man :)
You see str_replace in yshout.php? Just change it to str_ireplace.
and that would sort that problem I'm having !!!! seems to easy to be true LOL
let me go and try
I'll report back in a minute
thanks nneonneo :)
hey nneonneo :)
I searched for str_replace in the yshout.php and I find about 4 or 5 !!!
which one is it that I change ? or do I change them all ?
thanks
The one with the [ img ] tag.
ok I just did that and it didn't work !! :( attached is the file can you please check it to see if I have done it right ? PLEASE :(
thanks nneonneo
Quote from: SunKing on June 14, 2008, 08:14:05 PM
Do you have any other mods installed? If so, then attach your index.template.php to this post and I'll see what I can do for you. Otherwise I can just mod the original file and put it here for you to grab.
Sorry it took me so long to reply. I do have a few mods installed, so I'm attaching the index. I hope I did the main part right.
@Forte
Attached is your modified index.template.php. I can only test in SMF 2.0, but it should be exactly what you are looking for. I went ahead and also modded the titlebar and text colors (since that's such a dark theme). Enjoy!
That's exactly where I wanted it, thanks. Now for some reason, there's no text in it, and it won't appear if I refresh or anything. Know of any fixes for that?
Can you post a link (or PM me a link) so I can see exactly what going on with it?
http://www.fortescomics.tfcph.com/forum/index.php
Nothing is showing up in it, no text, no text input field, nothing. It also appears at the bottom of the page in boards and topics, which for some reason I don't think it's supposed to do.
btw how to install it ???
Well, given what I've done to the index and the fact that it works on my test site (with my existing yshout script in place), was everything uploading correctly regarding the yshout.php and yshout.js? Basically, I only added the call to the script in the index.template.php. The yshout folder and all of it's contents are assumed to be installed correctly. I see that the <script>'s for the other shoutbox components were correctly called in the index.template.php and the correct <style> info is there. Did you install the mod using package manager and then manually modify your index.template.php for your custom theme? If not, then you either need to do so (skipping the index.template.php errors since you are using a custom theme), or, manually upload the yshout folder and all of its contents (after extracting it from the SB_1.16.zip) to your board directory (something like yoursite/forum/yshout).
@argggghh
The easiest way to install it is using the package manager within SMF.
Make sure to use SB_1.16.zip for the SMF 1.1.x series,
and AdvSB_1.16.zip for SMF 2.0+.
I installed it with package manager, yeah, and the files are there in the yshout folder. There is a PHP file that says something about a server error when I view it (not edit, just view), so could that be the problem?
What error does it give?
I am currently setting up an account to be able to view the shoutbox on various themes on my test site. I installed the Xbox theme, made the same edit to the index.template.php, and the shoutbox displays fine (with only the button text strings not showing correctly because the theme was designed for SMF 1.1.4).
EDIT: You can see the shoutbox working under the Xbox theme (as well as others) here (http://www.empireofthesun.net/forum/index.php?action=refer;sa=SBtest). >> user = SBtest password = SBtest
Keep in mind that some of the themes were not meant for SMF 2 so there may be a thing or two not display correctly, but the shoutbox works flawlessly!! :P
Also, the placement of the shoutbox can be altered fairly simply.
ok thanks to sunking my shoutbox works but i want to add this ~> <object width="300" height="80"><param name="movie" value="http://media.imeem.com/m/PFc1_dSgbj"></param><param name="wmode" value="transparent"></param><embed src="http://media.imeem.com/m/PFc1_dSgbj" type="application/x-shockwave-flash" width="300" height="110" wmode="transparent"></embed><a href="http://www.imeem.com/hadesthespecialone/music/S1qjZsQ4/kill_hannah_lips_like_morphine/">Lips Like Morphine - Kill Hannah</a></object>
it will work but the shoutbox will stop working so for now i remove the song so that shoutbox will work . but if anyone can help me make both work at the sametime it would be great . here my site ~> www.hadesms.elementfx.com
It doesn't really give any error name or number, it just says:
"It would appear there is a server error. Please refresh the page. If that doesn't work, try coming back later. "
Should I maybe ask my host about this?
@Old Lynx: Ah, my bad. There are two spots which contain BBCode (one in /me, the other in writeLine). Both need to have [ img ] added and str_replace replaced by str_ireplace. Sorry about the mixup (n.b. you can see both if you look for [ left ])
I'm quite pleased to say it works now, thanks for all your help SunKing. It must have just been a server error.
Just a quick question. Is it possible to disable embedding in the shoutbox?
EDIT: Problem solved.
I use 000webhost.com
it's my forum
I use .tk
i copy all to MY SQL
but I still can install
when I try to install from smf :
Some of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders. Your FTP information may be temporarily cached for proper operation of the package manager.
then I make all file become 777
and setting it for theme
but effect nothing
thanks, sorry for my bad english
@Hades™
I just embedded that exact <object> into my test site and it works perfectly. The song plays, the shoutbox displays, and the shouts display. I am looking closer at the theme to see if maybe something in there is conflicting with the embed....
Thanks nneonneo :) Now it works :)
Guys is it possible to make the shoutbox type something as well as clearing.
I mean when I type this [ /clear ] I want the shoutbox to clear everything but also say {{ >>>> Welcome to My Forum <<<< }}
Thanks Guys
Quote from: SunKing on June 15, 2008, 10:34:40 AM
@Hades™
I just embedded that exact <object> into my test site and it works perfectly. The song plays, the shoutbox displays, and the shouts display. I am looking closer at the theme to see if maybe something in there is conflicting with the embed....
ok thanks , finally someone replied =X
P.S : did you like the song ?
Installing 1.16 (shoutbox) package on to a fresh 1.15 (SMF) installation.
Nothing happens, says its installed, but i cant see anything, cant see that a yshour directory has been created, i dont think its modded the index template file as when i go to uninstalled it it fails the test on the index file.
Any ideas?
I download nneo2 v.1.16 and I upload it exept upgrade
because it's my first ver.
I use default theme
how to make it spawn above board index
I confuse
thanks ;)
put it in your news as described numerous times in this thread.
Can I prevent guests from posting in the shoutbox?
Yes You Can (http://www.simplemachines.org/community/index.php?topic=137508.msg1544802#msg1544802)
- please search before you ask.
@ nneonneo - please put this in first post with bold letters or something, because obviously, people are asking about this a lot.
i got a problem when i post msg in shoutbox after that shoutbox it be lose.
If you understand you can see here.
http://www.myknw.com/webboard (http://www.myknw.com/webboard)
I see the problem but don't understand the cause let alone the solution. :-\
@jedipalm: Turn off $gzipCompression (yshout/yshout.php). For some reason, there is text outputted before the shoutbox refreshes (maybe an error, a message, etc.). Turning off $gzipCompression will allow you to see this text and make the shoutbox work.
@ameo: I have the feeling that some people don't even read the mod page :(. Next version (1.20, will post a beta today) will have permissions integrated with SMF, so it should be easier to change permissions (other settings will be in a settings.php file, so it should hopefully be obvious :P)
[announce] Shoutbox Mod v.1.20 beta release.
Attached is a beta version of version 1.20. It cannot be installed as an upgrade, so please uninstall existing versions prior to installing 1.20.
A changelog will be posted with the official release, and has been posted before in this thread.
Please post any bugs or problems here, by PM, or to nneonneo [AT] gmail [DOT] com. Thanks!
EDIT: Fixed error in 2.0 installation, pointed out by SunKing.
install-perms-2.0.xml is pointing to index.template.php instead of ManagePermissions.php. :P
Quote from: SunKing on June 18, 2008, 12:47:08 AM
install-perms-2.0.xml is pointing to index.template.php instead of ManagePermissions.php. :P
Not to be a annoyance or anything , are you done testing the song with my template ?
Hi guys,
I have used the actual Yshout product before and loved the way it worked very nice software. I have this mod on my site and my members like it alot - Kudos to the makers of Yshout and nneonneo for his mod.
Anyway I have a 2 questions for nneonneo... (I have looked thru this thread and serached it and could not find the answers I needed :))
Several members on my site have asked if the timestamp format could change in some way - make it shorter if possible?
So instead of [Today at 02:22:45 PM] just make it Today@1422 or similar. From reading thru the yshout.php I notice it says this:
Quotepreg_timeformat(array $matches)
Function used to replace matched <timeval=[UNIX time offset]> with formatted times
as per SMF's timeformat function. Called through preg_replace_callback.
I gather the time is being pulled from the server but is there a way to manipulate the php call up code so I could get it to display like this:
[Today@1422] or [Today@02:22pm]
My other question is about text wrapping - if I have a limit of 300 characters per shout and someone actually writes that much in one message the text wraps but does not space nicely and looks crampt against the above timestamp - is there a way to increase the spacing (line-height on a class) or a recommended Character limit so text does not wrap?
Any help with the above is much apprecitated.
BTW the link to my site is on my first banner in my sig - the 360G one :)
Quote from: SunKing on June 18, 2008, 12:47:08 AM
install-perms-2.0.xml is pointing to index.template.php instead of ManagePermissions.php. :P
I could've
sworn that I tested this on SMF 2.0, but apparently I didn't. Thank you for catching that!
I'm having a ton of trouble installing this I've been working on it all morning and it's just not working. When I installed this the index.template.php had a problem but I kept on going so I could do a manual edit on the template.
I am using the default template by the way.
Template Parse Error!
There was a problem loading the /Themes/default/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.
That is what I get after making the changes stated on the mod website.
this is what my code looks like
<?php
// Version: 1.1.5; 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'] = true;
/* 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="', !empty($context['meta_description']) ? $context['meta_description'] : $modSettings['meta_description'], '" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="noindex" />', '
<meta name="keywords" content="', !empty($context['meta_keywords']) ? $context['meta_keywords'] . ', ' : '', $modSettings['meta_keywords'], '" />
<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['theme_url'], '/css/yshout.css?b21" />
<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" />';
global $boardurl; // YSHOUT HERE 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '"; </script> <script src="',$boardurl,'/yshout/js/yshout.js?May022008" type="text/javascript"></script> <script type="text/javascript">var shoutFile = "home.txt";</script> <script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script> <script type="text/javascript"> soundManager.url="',$boardurl,'/yshout/soundmanager2.swf"; soundManager.debugMode = false;soundManager.consoleOnly = false; soundManager.onload = function() { soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/chat.mp3", autoPlay:false}); } </script>'; // YSHOUT END
// 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']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// 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>
// script for shoutbox upshrink echo'<script language="JavaScript" type="text/javascript"><!-- // --> // Create the shoutbox header object. var sbHeader = new smfToggle("upshrinkSB", ', empty($options['collapse_shoutbox']) ? 'false' : 'true', '); sbHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, '); sbHeader.setOptions("collapse_shoutbox", "', $context['session_id'], '"); sbHeader.addToggleImage("upshrinkSB", "/upshrink.gif", "/upshrink2.gif"); sbHeader.addTogglePanel("upshrinkSBHeader"); sbHeader.addTogglePanel("upshrinkSBHeader2"); // </script>';
</head>
<body>';
// AD REVENUE SHARING - PLACEMENT OF ARS ADS AT TOP OF THE PAGE (CENTERED)
if ($modSettings['ars_enabled']) {
// START COUNTING THE NUMBER OF ADS
$context['arsadscount'] = 0;
showArsAds("top");
showArsMessage("top");
}
// END OF ARS PLACEMENT OF ARS ADS
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">';
if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';
echo '
</td>
<td align="right" class="catbg">
<img src="', $settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>';
// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>';
// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' , $context['current_time'], '</span>';
// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';
if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';
echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];
// 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'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $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'];
// 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 />';
}
echo ' </span>';
}
// 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'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
// AD REVENUE SHARING - PLACEMENT OF ARS ADS IN THE WELCOME AREA BOX (CENTERED)
if (($modSettings['ars_enabled']) && ($modSettings['ars_adsetup_welcome_enabled'])) {
echo '</td>
<td class="windowbg2">';
showArsAds("welcome");
showArsMessage("top");
}
// END OF ARS PLACEMENT OF ARS ADS
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';
echo '
<table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
</td>';
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<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>
</table>
</div>';
echo' </table>', shoutbox(), '</div></table>';
// Show the menu here, according to the menu sub template.
template_menu();
// AD REVENUE SHARING - PLACEMENT OF ARS ADS
if ($modSettings['ars_enabled']) {
// PLACEMENT OF ARS ADS UNDER LINKS
showArsAds("links");
// CREATE TABLE IF LEFT OR RIGHT TOWER ADS ARE ENABLED, ALSO WRITE LEFT TOWER/COLUMN ADS
if (($modSettings['ars_adsetup_left_enabled']) || ($modSettings['ars_adsetup_right_enabled'])) {
echo '<table cellspacing="3" cellpadding="0" width="100%"><tr><td valign="top">';
}
// PLACEMENT OF ARS ADS IN A LEFT COLUMN (CENTERED)
if ($modSettings['ars_adsetup_left_enabled']) {
showArsAds("left");
echo '</td><td valign="top">';
}
}
// END OF ARS PLACEMENT OF ARS ADS
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '</div>';
// AD REVENUE SHARING - PLACEMENT OF ARS ADS
if ($modSettings['ars_enabled']) {
// ADS IN RIGHT TOWER/COLUMN
if ($modSettings['ars_adsetup_right_enabled']) {
echo '</td><td valign="top">';
showArsAds("right");
}
// CLOSE THE TABLE WE CREATED IF LEFT OR RIGHT TOWER ADS ARE ENABLED
if (($modSettings['ars_adsetup_left_enabled']) || ($modSettings['ars_adsetup_right_enabled'])) {
echo '</td></tr></table>';
}
// ARS ADS AT BOTTOM OF THE PAGE (CENTERED)
showArsAds("bottom");
// LOG/RECORD ADS IMPRESSIONS
logImpressions();
}
// END OF ARS PLACEMENT OF ARS ADS
// 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="', !$context['right_to_left'] ? 'right' : 'left', '">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="', $settings['images_url'], '/powered-mysql.gif" alt="', $txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="', $settings['images_url'], '/powered-php.gif" alt="', $txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
', theme_copyright(), '
</td>
<td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'left' : 'right', '">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="', $settings['images_url'], '/valid-xhtml10.gif" alt="', $txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="', $settings['images_url'], '/valid-css.gif" alt="', $txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></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>';
// 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>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';
// 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['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 ' > ';
}
echo '</div>';
}
// 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', 'managegames', 'arcadesettings', 'arcadecategory', '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', 'arcade', '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';
// Begin SMFShop code
if ($context['current_action'] == 'shop')
$current_action = 'shop';
if (in_array($context['current_action'], array('shop_general', 'shop_items_add', 'shop_items_edit', 'shop_cat', 'shop_inventory', 'shop_restock', 'shop_usergroup')))
$current_action = 'admin';
// End SMFShop code
// 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 cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' , $first , '"> </td>';
// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
echo ($current_action == 'arcade' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'arcade' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=arcade">' , $txt['arcade'] , '</a>
</td>' , $current_action == 'arcade' ? '<td class="maintab_active_' . $last . '"> </td>' : '';// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
</td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'admin' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>
</td>' , $current_action == 'admin' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
</td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
//Begin SMFShop code
//loadLanguage("shop");
echo ($current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'shop' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=shop">Shop</a>
</td>' , $current_action == 'shop' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
//END SMFShop code
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'login' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
</td>' , $current_action == 'login' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'logout' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
</td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// The end of tab section.
echo '
<td class="maintab_' , $last , '"> </td>
</tr>
</table>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
function shoutbox() { global $txt, $options, $settings; echo'<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;"><a href="#" onclick="sbHeader.toggle(); return false;"><img id="upshrinkSB" src="', $settings['images_url'], '/', empty($options['collapse_shoutbox']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="Shrink or Expand the ShoutBox" align="bottom" /></a> '; // Block Title echo'<span width="49%"></span><span>ShoutBox</span>'; echo'</div><div id="upshrinkSBHeader"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', '> <table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;"> <tr> <td class="windowbg" width="6%" align="left" valign="top">'; // SHOUTBOX HERE echo '<div> <div id="yshout"></div>'; echo'</div>'; // SHOUTBOX END echo' </td> </tr> </table></div></div>'; echo ' <table id="upshrinkSBHeader2"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0"> <tr>'; }
?>
Please reply soon thanks.
@germz: I don't quite understand why people occasionally end up sticking ALL the code on one line, but take a look:
global $boardurl; // YSHOUT HERE echo ' <script src="',$boardurl,'/yshout/js/prototype.js" type="text/javascript"></script> <script src="',$boardurl,'...
// script for shoutbox upshrink echo'<script language="JavaScript" type="text/javascript">...
Anyway, for whatever reason, your code ended up all on one line, causing comments to mess up the shoutbox in a fairly crazy way (btw: syntax highlighting is very useful, and I can see the problem just from looking at the broken highlighting).
You should revert to a known-good version of index.template.php before attempting the changes again.
@Youngie360G: See PM.
OK, I've updated the 1.20 package (per SunKing, thanks a bunch!!).
http://www.simplemachines.org/community/index.php?topic=137508.msg1582603#msg1582603
@Hades™
I have tested, changed, etc., and I am beginning to believe that the cause of the two not working together may be out of my realm of knowledge. Sorry, I tried.
@all code on one commented line
I have noticed that sometimes when people manually highlight the code (myself included) then do the copy/paste, it pastes the code without line breaks (puts everything on one single line). I have had this happen to me numerous times. However, using a text editor with syntax highlighting is indeed a life saver!
@nneonneo
I just wanted to install the newest version and enjoy the new features. ;)
I didn't understand what you said but I uninstalled the pack and then installed that new version and downloaded without any problems. I am now looking for the admin thingy on the admin panel.
Thank you very much.
@Hades™: Let me take a swing at solving your problem. Where are you adding that code, and how does the shoutbox stop working?
@SunKing: Well, I hope you like the new features :)
@germz: It's under Members -> Permissions ;)
It seems none of the links on the shoutbox are working for me.
I also can't shout on it.
Try shift+refreshing, if that doesn't work, PM me a board URL and I'll take a look (ulp, I hope I didn't make another typo -_-)
Nope it didn't work.
I mailed you the URL.
Thanks.
Quote from: nneonneo on June 18, 2008, 05:58:37 PM
@Hades™: Let me take a swing at solving your problem. Where are you adding that code, and how does the shoutbox stop working?
@SunKing: Well, I hope you like the new features :)
@germz: It's under Members -> Permissions ;)
I add it like :
<I ADD HERE >
<?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.
Then my song will play , but the shoutbox will like show , but it wont have the name there so you cant type anything only after removing the song the shoutbox will work again .
And im using AA_New_Damage .
EDIT : BTW , i want to add it like right at the bottom of the forum . i don't like it displaying on top .
Erp, that's NOT the right place to add things.
If you want it at the bottom, stick the line
echo '<YOUR HTML>';
right after
function template_main_below()
{
Quote from: nneonneo on June 18, 2008, 08:54:48 PM
Erp, that's NOT the right place to add things.
If you want it at the bottom, stick the line
echo '<YOUR HTML>';
right after
function template_main_below()
{
OMG it works !!!!!!
One last thing , when everyone talks in the shoutbox it will be red how do i make like this .
Example : Admin is Cyan . So he talk in shoutbox it will show cyan letter .
Den regular users name is white color so when they talk in shoutbox will be white color font .
I hope this is clear enough cause im not sure how to phrase my request properly .
Cheers for the reply nneonneo - should i post your reply here as i think some guys on here might like to know the answer to it?
hello ppl...i've intalled this shout but i've a problem!!!
the shout appears always and for all members!!!!! gests inclued!!! could you tell me one way to make the shout appears only when a user make loggin????
ThNkX
@Hades™: The shoutbox should use membergroup colors by default.
@Youngie360G: Sure, go ahead.
@the_shadow: (sigh) read yshout/yshout.php up at the top.
Quote from: Youngie360G on June 18, 2008, 10:20:26 AM
Hi guys,
I have used the actual Yshout product before and loved the way it worked very nice software. I have this mod on my site and my members like it alot - Kudos to the makers of Yshout and nneonneo for his mod.
Anyway I have a 2 questions for nneonneo... (I have looked thru this thread and serached it and could not find the answers I needed :))
Several members on my site have asked if the timestamp format could change in some way - make it shorter if possible?
So instead of [Today at 02:22:45 PM] just make it Today@1422 or similar. From reading thru the yshout.php I notice it says this:
Quotepreg_timeformat(array $matches)
Function used to replace matched <timeval=[UNIX time offset]> with formatted times
as per SMF's timeformat function. Called through preg_replace_callback.
I gather the time is being pulled from the server but is there a way to manipulate the php call up code so I could get it to display like this:
[Today@1422] or [Today@02:22pm]
My other question is about text wrapping - if I have a limit of 300 characters per shout and someone actually writes that much in one message the text wraps but does not space nicely and looks crampt against the above timestamp - is there a way to increase the spacing (line-height on a class) or a recommended Character limit so text does not wrap?
Any help with the above is much apprecitated.
BTW the link to my site is on my first banner in my sig - the 360G one :)
Hi Guys - as promised here is the answer to my earlier question regarding the timestamp - quoted above.
To alter the timestamp display open yshout.php and find:
function preg_timeformat($matches)
{
// format: <timeval=(value)>
return timeformat(intval($matches[1]));
}
And replace with
function preg_timeformat($matches)
{
// format: <timeval=(value)>
$ts=intval($matches[1]);
$daystamp=date('M j',$ts);
if(date('M j Y') == date('M j Y',$ts)) $daystamp='Today';
return $daystamp.'@'.date('Hi',$ts);
}
This will return this:
[Today@1422] for today and [May 4@1422] for other daysTo alter the time display settings tweak this part of the code:
.date('Hi',$ts)
So if I wanted to display this @02.22pm I would change code to this:
.date('h:i a',$ts)
Date / Time properties here: http://ca.php.net/date
The answer to the other question was to simply experiment with the CSS in your themes index.template.php.
Cheers to nneonneo for helping with this issue.
hello i made the modifications set to false but i make loggout and the shout are able again!!!!...
could you explain who to do?
shadow
err .. yeah. I got a sort of problem.
I installed the mod and it wasn't working properly. It just said something like "loading shoutbox" and I was too lazy to check why it wasn't working so I decided to uninstall the mod again. I removed the edits I made to my skin and then I clicked uninstall mod ... since my index template was different it naturally gave me a warning (just like on the install) and I told it to do it anyways ... but now eversince I uninstalled the mod again I get an error 500 (internal server error) when I try to access anything on my domain!
Any idea wtf might be wrong?
I already downloaded the auto backup from before I installed the mod and pasted it over my files ... nothing changed :((
Have had issues all day uploading and getting it to work. Think I've had every error so far. So I uploaded a test forum to see what I can do with it. I'm still getting the "...loading shoutbox..." and it won't go away.
Running version SMF 1.1.5
SMF Default Theme - Core
new board and nothing's been added.
Installed with no problem shoutbox SB_1.16zip
Have followed the installations instructions for SMF 1.1.5
Find:
echo '
</head>
<body>';
this isn't on my index.template.php
it shows the following so where do I add that second step:
document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
current_header_ic = mode;
}
// ]]></script>
</head>
<body>';
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
Quote from: ameo on June 17, 2008, 07:15:10 AM
Yes You Can (http://www.simplemachines.org/community/index.php?topic=137508.msg1544802#msg1544802)
- please search before you ask.
@ nneonneo - please put this in first post with bold letters or something, because obviously, people are asking about this a lot.
@ nneonneo : thanks for your help. It works great now - had to give chats/home.txt 777
-Does the following mean that only the 4th instance of id="shout-form" should be replaced? Thanks
================================
find (up to 4 times)
*
Code: [Select]
id="shout-form"
replace to
*
Code: [Select]
id="shout-form" name="shout_form"
HI,
I wish to add the smiley bar to your news code (pongsak + ameo 's ideas)
<div id="yshout">',$txt['yshout_loading'],'
===========================================
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
- What's the right way to do this?
QuoteI already downloaded the auto backup from before I installed the mod and pasted it over my files ... nothing changed
Try deleting everything then uploading the backup, pasting over can overlook some changes.
/me feels stupid for missing the extra page
@the_shadow: Err, $allowGuests=false?
@Lillithia: Check the server error logs. At this point, I don't know what else would help.
@zookeeper: Change
// ]]></script>
</head>
<body>';
to
// ]]></script>';
<<INSERT YSHOUT CODE HERE>>
echo '</head>
<body>';
@neotan: It means to replace all four instances.
SMF Version: 1.15
Theme Name : Arobase Skin
Designers : Darkman
I am getting an error that I don't understand...
Anyways, I uploaded the shoutbox package, I changes the yshout.php file to permission 755 so it would work and I added the text after the " /* Internet Explorer 4/5 and Opera 6 just do..." just like the instructions said to do, but no matter where I place the shoutbox on the index.template.php file, it won't show up on the forum.
If anyone knows what I can do to fix this, please let me know.
Thank you.
Quote from: nneonneo on June 19, 2008, 10:26:05 AM
@Hades™: The shoutbox should use membergroup colors by default.
@Youngie360G: Sure, go ahead.
@the_shadow: (sigh) read yshout/yshout.php up at the top.
The shoutbox use membergroup colors to display the colors of the name but not the color of the letters . See this :
(http://img293.imageshack.us/img293/2829/sbue1.png) (http://imageshack.us)
I want the letters to match the color of the membergroup too .
@GGP: What error?
@Hades™: Change
$writeText.=":</em> $newText</p>\n";
to
$writeText.=":</em> <span$a_class>$newText</span></p>\n";
It wont work...
It doesn't give me an error message, but the shoutbox doesn't show up on the forum.
I've tried placing it in multiple places in the index.template.php file, but none of them work.
Quote from: nneonneo on June 19, 2008, 08:32:06 PM
@GGP: What error?
@Hades™: Change
$writeText.=":</em> $newText</p>\n";
to
$writeText.=":</em> <span$a_class>$newText</span></p>\n";
Thanks it works , one last thing now the '':'' is red still , can that be changed ?
Made the changes as recommended and it still shows "loading shoutbox". I've so tried to follow the instructions and as this is a 1.1.5 test forum, nothings been added/changed, so what gives. Is there a check list for what I could be missing ?
I did see this in index.template.php and didn't add it, was it installed automatically when I installed the shoutbox ? I'm just looking for any sort of option to work with to fix this.
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
// YSHOUT HERE
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
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
// YSHOUT HERE
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
echo ' </span>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
Hello
I'm gettings this error:
yshout/yshout.php on line 798
File error (writeLine); aborted
What can i do to fix this?
Really thanks!
Grettings from OmarM
Quote
@neotan: It means to replace all four instances.
Thanks. Any ideas how to combine the smiley script with ameo's news fader script:
HI,
I wish to add the smiley bar to your news code (pongsak + ameo 's ideas)
<div id="yshout">',$txt['yshout_loading'],'
===========================================
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
- What's the right way to do this?
I've tried to read through as many posts as i can but i haven't found anything about changing the time/date layout... Can anyone post where the time() or date() function is? I just want it to display (8:30 PM)... Thanks for any help
it's all ok!!!!! thkx i'm newbie sorry
thnkx
@drinkingbuddies_ca: Answered one page ago: http://www.simplemachines.org/community/index.php?topic=137508.msg1584257#msg1584257
@Hades™: :P
$writeText.="<span$a_class>:</span></em> <span$a_class>$newText</span></p>\n";
@OmarM: chmod chats, chats/home.txt and chats/history.home.txt to 755 or similar.
@neotan: I don't think the news box supports full PHP, so it may not be doable (sorry)
@zookeeper: Have you tried visiting yshout/yshout.php in a web-browser?
Attaching index.template.php
Visiting yshout.... in web browser? Sorry don't follow you with that?
http://<forum.domain.com>/<forum>/yshout/yshout.php
Aside from the fact that you have multiple copies of the shoutbox, it seems OK. My guess is chmod permissions and/or missing files (sometimes happens for no good reason).
It's perfectly safe to remove the existing
// YSHOUT HERE
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
code (x2) since you've already added the shoutbox elsewhere.
Quote from: nneonneo on June 20, 2008, 08:45:26 PM
@neotan: I don't think the news box supports full PHP, so it may not be doable (sorry)
Hi , I need my smiley so I decided to embed the shoutbox in the index.template.php - it gave some parsing errors when I added in the smiley code. I followed the instructions as per your smiley bar instructions:
I am just supposed to add "<div class="smalltext" ...... " after the ['yshout_loading'] code snippet , right ?
// 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
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
// 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>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
// YSHOUT END
Quote from: nneonneo on June 20, 2008, 11:37:54 PM
// 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>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
// YSHOUT END
Sweet !! great mod and best support yet
Hi,
How can I change the color of the name (boxed in red) ? Thanks
(http://i134.photobucket.com/albums/q115/jamesdean72/sss-5.jpg)
#yshout #forum-name CSS
Quote from: nneonneo on June 21, 2008, 12:00:04 AM
#yshout #forum-name CSS
Hmm.. strange ... it remains the same. I installed the scroller bar . Could that be the issue ?
Might be your browser. Some browsers (...IE...) ignore CSS for disabled elements, when they really shouldn't. Blame them :P.
Quote from: nneonneo on June 20, 2008, 11:10:52 PM
Aside from the fact that you have multiple copies of the shoutbox, it seems OK. My guess is chmod permissions and/or missing files (sometimes happens for no good reason).
It's perfectly safe to remove the existing
// YSHOUT HERE
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
code (x2) since you've already added the shoutbox elsewhere.
Removed the above twice and the page now shows no box with "shoutbox loading" but it does show a line that has Shoutbox words.
The code would now appear like the following, should there be more deleted?
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// 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>
Next: need advice on the following which I've not done. Is this necessary to get the mod to work? I've looked for these files and not found them.
http://custom.simplemachines.org/mods/index.php?action=parse
File Operations
Move the included directory "yshout" to "the root directory".
Move the included file "yshout.css" to "./Themes/default/css".
Move the included file "calendar.png" to "./Themes/default/images".
Move the included file "info.png" to "./Themes/default/images".
Move the included file "cog_delete.png" to "./Themes/default/images".
Move the included file "cog_add.png" to "./Themes/default/images".
Move the included file "smile.png" to "./Themes/default/images".
Move the included file "date.png" to "./Themes/default/images".
OK. Zookeper, in order your shoutbox to work you need to have "yshout" in the root directory.
That means it has to be one of folders into forum folder, nowhere else. Other things are inside that yshout folder
and need not to be moved anywhere else.
As I see you're trying to add shoutbox somewhere where it won't work. I'm not sure about position where you want it but best one would probably be here:
// 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 ' > ';
}
echo '</div>';
// 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
Quote from: nneonneo on June 21, 2008, 02:04:02 AM
Might be your browser. Some browsers (...IE...) ignore CSS for disabled elements, when they really shouldn't. Blame them :P.
Another issue I face :
(http://i134.photobucket.com/albums/q115/jamesdean72/ss-9.png)
a)When I click on the username , it's the correct URL http://goshopjapan.com/forum/index.php?action=profile;u=734 (correct)
b) However , when I visit a different part of site like the Arcade,
it becomes http://goshopjapan.com/forum/arcade/index.php?action=profile;u=1
- which is wrong.
Any ideas?
Thanks to the individuals that are trying to help by sending me messages. I've completely deleted the forums. Looked through all the file manager areas and restarted. Made all the changes I could read about. I see this 500 error and checked permissions and everything point to 755 so guess this was right. I'm still checking all the message replys to why this isn't working and finally understood and found the below error.
I'm still trying to understand the delete of both shoutbox I mentioned in previous message Reply #2705. When I take them both out there isn't any shoutbox showing.
==========
yshout/yshout.php shows top of IE a 500 Internal Server Error
==========
The website when opened to forum page has only this on the page:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/default/index.template.php on line 241
234: document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
235:
236: current_header_ic = mode;
237: }
238: // ]]></script>
239:
240: // script for shoutbox upshrink
241: echo'<script language="JavaScript" type="text/javascript"><!-- // -->242: // Create the shoutbox header object.
243: var sbHeader = new smfToggle("upshrinkSB", ', empty($options['collapse_shoutbox']) ? 'false' : 'true', ');
244: sbHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
245: sbHeader.setOptions("collapse_shoutbox", "', $context['session_id'], '");
Thanks again
@neotan: That would probably be search-engine friendly URLs at work, though I have to admit I haven't seen URLs like that before (is it a mod?)
@zookeeper: Remove the echo' from line 241. If your server (not forum) error logs say nothing about why yshout.php is making a 500 error, then I'm afraid I can't help you (though I plan on making 1.20 work in those conditions).
Thanks again for replying
I've removed that before and it didn't help. This is what happens:
// script for shoutbox upshrink
shows at the very top of the entire forum
// ]]></script>
// script for shoutbox upshrink
<script language="JavaScript" type="text/javascript"><!-- // -->
// Create the shoutbox header object.
var sbHeader = new smfToggle("upshrinkSB", ', empty($options['collapse_shoutbox']) ? 'false' : 'true', ');
sbHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
sbHeader.setOptions("collapse_shoutbox", "', $context['session_id'], '");
sbHeader.addToggleImage("upshrinkSB", "/upshrink.gif", "/upshrink2.gif");
sbHeader.addTogglePanel("upshrinkSBHeader");
sbHeader.addTogglePanel("upshrinkSBHeader2");
// </script>';
echo '
</head>
<body>';
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
=========
Again if I take out both the sections there is no shout box at all. If I take out the first but leave the second the shout box is there wish loading..
Remove the line " // script for shoutbox upshrink". You should get a shoutbox with a header, but no content -- this is because the shoutbox cannot load correctly.
If you are unable to resolve this, try version 1.20 (attached: beta, updated from previously posted 1.20). It hooks index.php, which bypasses the problem of not being able to run yshout.php directly.
!Important! Please remove 1.16 prior to installing 1.20, and make sure that you remove the shoutbox codes in index.template.php (n.b. uninstallation might fail on index.template.php: don't worry about it, just remove them manually).
After I took out the //script..... it was working but not all the admin lines worked, history, commands, extendedhistory etc. however .....
Since this is a test forum I had made I deleted it and restarted another forum. I loaded the version 1.20 and it was almost perfect. I checked the yshout/php and had the 500 error. For some reason one link to either the myforum or default or yshout, "can't recall which" permission wasn't 755, after I changed that I think it may be working. I'll explore more now.
Also, I didn't make any changes as per the installation instructions from the mod site but on this test forum it seems to be working. Not sure if you switched things up for this but thought I'd make a comment on that.
Many thanks, off to play with it more and if luck holds I'll try to upload on my running forum.
EDIT:
Put it on the main forum and so far seems to be working. Thanks, will work on the details more now.
EDIT:
Shows in admin mode but as a regular member they don't see it.
Final step: use the Admin CP to give users the "View Shoutbox" permission (Membergroups->Permissions)
Under Members there is Permissions
I don't see a "view shoutbox"
EDIT:
On the Members - Permission, I clicked modify for Regular Members. On the lower right side I see three boxes but there is no writing to the left for what they are meant to be used for. I went on an checked all 3 and now its showing for regular members. Any clue what I checked? What this has done? I know members see it but may be good for me to know what I did?
Oh, you must not have the proper text modifications (I should've known that earlier, when you said there was no text). Simple fix: copy Modifications.english.php to Modifications.<your language>.php.
The first is "View", the second "Post", and the third "Moderate". You might not want the third one checked for all members.
hmmmmm Modifications.english.php I've looked at that. I have English check as default forum language.
Is that also the same language as your profile?
Hey, i have a problem with my shoutbox.
If more users are online the SB collapse always, after ~5 seconds you see again the complete shoutbox, here my config:
yshout.php
// Version 1.16
// Editable Options (see yshout/js/yshout.js for more options)
// Set the maximum amount of lines to be displayed at a time
// After changing this, /clear the shoutbox to make the change
// take effect.
$max_lines = 30;
// Sets the directory to which to log
$logDir = "logs";
// Should we use GZip compression? If you are having trouble with the shoutbox, set this to false.
$gzipCompression=true;
// Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;
// Guest usage for posting. Set to false if you don't want to let guests post to the shoutbox; if allowGuests is on, they will still see it.
$allowGuestsPost=true;
// Automatic Guest Usernames: should they be able to choose their own usernames?
// Set to some string (a prefix) if you want to disable guest choice of username
// Set to false if you want to allow guests to choose a username
$autoGuestName=false;//'guest-';
// Command options.
// If this is set to false, all typed commands are disabled.
// Admin functions, via admin links, are still available.
$allowCommands=true;
// If this is set to false, guests will be denied access to commands.
$guestCommands=true;
// Shoutbox moderator groups. By default, only administrators and global
// moderators can moderate the shoutbox. By setting some groups up here
// (IDs only please), other groups (including additional membergroups)
// can be permitted to moderate it.
$moderatorGroups=array(2);
// How long should the script wait for the chats to update? (in seconds)
// If this is set to 0 the script will not wait at all,
// but this will be very detrimental to performance.
// Make sure this is less than the maximum script execution time
// on your server, or the shoutbox will never update.
$updateTimeout=20;
yshout.js
// Flood control time in milliseconds:
var floodTime = 1000;
// Time between refreshes (minimum) in milliseconds:
// Note that since 1.08, this option will have less of an effect on performance,
// hence the default value is very low :)
var refreshTime = 150;
// Check for duplicate instances?
// This can improve performance in some cases.
var checkDuplicates = false;
// Internet Explorer 7 has a bug (feature?) which causes extreme lag when
// moving between pages. This delay controls "false alarms"; the amount
// of time between detecting a page move and reloading the shoutbox.
// If it is too high, users may experience laggy shoutboxes.
// If it is too low, users may experience lag moving to a new page.
// This bug only affects Internet Explorer 7 (not previous versions)
var falseAlarmDelay = 5000;
there are always about 100 users online
thanks for help
Quote from: nneonneo on June 23, 2008, 12:07:24 AM
Is that also the same language as your profile?
sighssss I don't see a language option in my personal profile section.
Also, the web page just gets stuck at times, very slow response for changing pages. Is there some response time or something to change? It's like bogged down.
EDIT:
This is soooooo slow driving me nuts. Been searching forums all morning. I did read one message that said:
Disable Hostname Lookups
I did that and really no help. Still reading... any other ideas?
EDIT:
Went to host error log and found these today:
[Mon Jun 23 08:49:36 2008] [error] PHP Warning: Unknown(): (null): Unable to initialize module
[Mon Jun 23 08:49:36 2008] [error] Module compiled with module API=20060613, debug=0, thread-safety=0
[Mon Jun 23 08:49:36 2008] [error] PHP compiled with module API=20020429, debug=0, thread-safety=0
[Mon Jun 23 08:49:36 2008] [error] These options need to match
[Mon Jun 23 08:49:36 2008] [error] in Unknown on line 0
[Mon Jun 23 08:49:36 2008] [error] PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so: undefined symbol: spl_ce_Countable in Unknown on line 0
[Mon Jun 23 08:49:36 2008] [error] PHP Warning: Unknown(): (null): Unable to initialize module
library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so: undefined symbol: zend_ce_traversable in Unknown on line 0
[Mon Jun 23 08:49:36 2008] [error] PHP Warning: Unknown(): (null): Unable to initialize module
[Mon Jun 23 08:49:36 2008] [error] Module compiled with module API=20060613, debug=0, thread-safety=0
[Mon Jun 23 08:49:36 2008] [error] PHP compiled with module API=20020429, debug=0, thread-safety=0
library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so: undefined symbol: spl_ce_Countable in Unknown on line 0
@master2oo8: Try turning $updateTimeout down to 13 or so. You host's script timeout is probably 15 seconds.
@zookeeper: Are you using IE7? If so, it might be the stupid IE bug (tm) which is flaring up again.
The language setting is in Account Settings. You should also just look at Themes/default/languages and copy Modifications.english.php to every other language (Modifications.<language>.php for each language in the languages folder).
Can I just delete all the other languages I'm not needing?
EDIT:
Yes IE7
can someone please help me, i have installed my first forum recently, and went to add this great shoutbox...
but no matter what i do, i just get the following;
"A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again"
i have tried every setting i can think of, but nothing works....!
any help would be greatly appreciated
thanks
@zookeeper: OK, in order to debug the problem, I'll want a forum URL, but please do it through PM. Hopefully I can squash this bug, because it will not show up for me locally.
@munty: I don't recognize that error; it's not one that is produced by my shoutbox. Have you tried CHMODding everything in your forum to 777?
Quote
Hey, i have a problem with my shoutbox.
If more users are online the SB collapse always, after ~5 seconds you see again the complete shoutbox, here my config:
(you see on page 136)
Quote
@master2oo8: Try turning $updateTimeout down to 13 or so. You host's script timeout is probably 15 seconds.
Hey, thanks for your answer, but it didnt fixed the error :(
It collapse now faster
by-the-way, pls check your pm, i have found 2 bugs ;))
Hmm, try turning off $gzipCompression...not sure what the problem might be though!
This afternoon got notice that IE7 needed a service pack update. Did that and now seems to be working much faster. Will play with it more and see if that fixed it.
Thanks for your patience!
EDIT:
It does seem better. There are some pages that aren't happy. When I click on "who's online" and the try to click the HOME button it get stuck. Mostly I have to just shut down the entire page. I'm going to PM you the errors.
Hi All,
I add the shoutbox to my forum but i cannot hide the smiles for the quests. (The shoutbox is hiding) Any ideas?
if ($context['user']['is_guest'])
echo'';
else
// YSHOUT HERE
echo '
<br /><b>Space for free chat</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...Program is loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
<div class="smalltext" style="padding-left:25px;">';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
// YSHOUT END
Thanks in advance
You should add the
', empty($options['collapse_header']) ? '>' : ' style="display: none;"
to the "smalltext" div which holds the smileys.
right, i have just installed smf 1.1.5 from scratch and now installed sb 1.6
no other packages installed
Yet again i have the message;
A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again.
Is there a complete idiots guide to what permissions are required and where to set them, does this point to permissions on files it is tying to change, or its own files, or settings on the board itself
What you might want to try is the beta of 1.20:
http://www.simplemachines.org/community/index.php?topic=137508.msg1588251#msg1588251
Note that I have not yet fixed one bug relating to Internet Explorer 7, which I will fix with the official release (due sometime this week if I ever manage to find a few hours to sit down and make sure *everything* works), so please only install this on a test forum and be prepared to uninstall it when 1.20 is finally released.
Hi, I have just installed Auto Embed Video/Audio Clips.
But I didn't realise it would also work in the ShoutBox. Auto Embed help says that to disable it I need to add:
$context['disableAEVAC'] = 1 ;
before the line where the string or data is put through the function "parse_bbc" in the relevant SOURCE file.
Could someone, please, tell me where should I add this line in nneonneo's Shoutbox?
Thanks in advance.
Well, look for parse_bbc in yshout/yshout.php and add before the two or so places it appears.
There's a slight catch; you need to add the line "global $context;" right above it or the changes won't take.
Quote from: nneonneo on June 24, 2008, 11:56:47 AM
You should add the
', empty($options['collapse_header']) ? '>' : ' style="display: none;"
to the "smalltext" div which holds the smileys.
Thank you for your fast reply nneonneo.
I add the following as you said but the smilies are still showing.
<div class="smalltext" ', empty($options['collapse_header']) ? '>' : ' style="display: none;">';
nneonneo a really cool thing to add next version would be stuff in the admin cp.
@MrBabbelen: 1.20 has membergroup permissions in the Admin CP (membergroup->permissions). However, 1.15 and 2.0 have widely different admin CP systems, so I will probably end up adding Admin CP features only to 2.0; this won't happen immediately, though. Expect it in a future version, once SMF 2.0 becomes final.
@nikoskar: Oh, wait; you meant for guests! My bad.
The problem is the "else" statement only applies to the first "echo", not the rest of them.
Simple to fix:
if (!$context['user']['is_guest'])
{
// YSHOUT HERE
echo '
<br /><b>Space for free chat</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...Program is loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
<div class="smalltext" style="padding-left:25px;">';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
// YSHOUT END
}
Hi! :) Great mod! I've added it to my SMF (address: http://e61.pl (http://e61.pl))... However it displays properly on main page, it displays whole main page on topic's pages too! If you can't understand what I'm talking about, you should look at this screen (http://e61.pl/shoutboxerr.png).
Additionaly, I've translated it to Polish :)
// ---- Begin modification - nneonneo's Shoutbox ----
$txt['yshout_shoutbox'] = 'Shoutbox';
$txt['yshout_loading'] = '...ładowanie shoutboksa...';
$txt['yshout_rp_banned'] = "Sorry, nie masz dostępu do shoutboksa.";
$txt['yshout_no_guests'] = 'Musisz być zalogowany, by korzystać z shoutboksa!';
$txt['yshout_ban_conf'] = 'Zatwierdzenie bana';
$txt['yshout_select_mode'] = 'Wybierz tryb bana:';
$txt['yshout_rp'] = 'Czytanie i pisanie';
$txt['yshout_p'] = 'Tylko pisanie';
$txt['yshout_error'] = 'BŁĄD: ';
$txt['yshout_no_user'] = 'Użytkownik nie został znaleziony.';
$txt['yshout_del_success'] = 'Pozycja usunięta.';
$txt['yshout_no_action'] = 'Nic do zrobienia.';
$txt['yshout_history'] = 'Historia';
$txt['yshout_commands'] = 'Komendy';
$txt['yshout_exthistory'] = 'RozszerzonaHistoria';
$txt['yshout_hide'] = 'Ukryj';
$txt['yshout_show'] = 'Pokaż';
$txt['yshout_admlinks'] = 'LinkiAdmińskie';
$txt['yshout_return'] = 'PowrótDoShoutboksa';
$txt['yshout_p_banned'] = 'Nie wolno Ci pisać..';
$txt['yshout_banned'] = 'Zbanowany';
$txt['yshout_shout_button'] = 'Ślij!';
$txt['yshout_banlist_caption'] = 'Bany shoutboksa (kliknij, by odbanować)';
$txt['yshout_ip_bans'] = 'Bany na IP dla ';
$txt['yshout_username_bans'] = 'Bany na nazwę użytkownika dla ';
$txt['yshout_ban_type_error'] = 'użyj /banuser lub /banip!';
$txt['yshout_ban_mode_error'] = 'Musi wystąpić argument trybu.';
$txt['yshout_imp_slash_error'] = 'Użyto "/" przed wypowiedzią! Spróbuj "/help impersonate" by uzyskać szczegóły.';
$txt['yshout_imp_uname_error'] = 'Brak nazwy użytkownika!';
$txt['yshout_imp_max4_error'] = 'Maksimum 4 argumenty!';
$txt['yshout_cmd_reference'] = 'Opis komendy';
$txt['yshout_cmdlist'] = array(
'/help' => ' [komenda]: Pomoc dotycząca komendy, lub wszystkich, jeśli żadna nie została podana.',
'/return' => ': Powrót do shoutboksa.',
'/pi' => ' [liczba]: Jaka jest wartość liczby pi do danej ilości cyfr po przecinku?',
'/me' => ' <wiadomość>: Wyświetla wiadomość w inny sposób (np. "/me lubi psy" wyświetli się jako <font color="red"> * Nataniel lubi psy</font>)');
$txt['yshout_cmdlistadmin'] = array(
'/clear' => ': Czyści shoutboksa.',
'/help' => ' [komenda]: Pomoc dotycząca komendy, lub wszystkich, jeśli żadna nie została podana.',
'/return' => ': Powrót do shoutboksa.',
'/banlist' => ': Lista wszystkich istniejących banów. Odbanuj użytkownika klikajac jego nicka.',
'/banuser' => ' <tryb> <nick>: Zbanuj użytkownika po jego nazwie. Powinieneś używać prawdziwej nazwy uzytkownika, inaczej ban może zostać ominięty. Tryby: "u", by odbanować, "rp" dla banów na pisanie i czytanie, "p" dla banów zabraniających tylko pisania.',
'/banip' => ' <tryb> <IP>: Zbanuj użytkownika po IP. Tryby: "u", by odbanować, "rp" dla banów na pisanie i czytanie, "p" dla banów zabraniających tylko pisania.',
'/impersonate' => ' <użytkownika> [poziom] [ip] [userid] /[treść wypowiedzi]: Podszyj się pod użytkownika. Treść wypowiedzi musi być poprzedzona ukośnikiem ("/"), inaczej operacja nie powiedzie się.<blockquote>
<user>: Nazwa użytkownika, pod którą chcesz się podszyć.<br />
[userlevel]: Poziom użytkownika. 0=normalny, 1=moderator, 2=administrator<br />
[ip]: Adres IP do uzycia, w formie 1.2.3.4<br />
[userid]: ID użytkownika z forum (w celu stworzenia działającego linka).</blockquote>',
'/lock' => ' <wiadomość>: Zablokuj shoutboksa w tryb pracy i użyj wpisanej wiadomości.',
'/unlock' => ': Odblokuj shoutboksa.');
$txt['yshout_maintenance'] = 'Zablokowany';
$txt['yshout_lock_arg_error'] = 'Musisz ustawić powód przerwy!';
$txt['yshout_lock_changed'] = 'Zmieniono powód przerwy w działaniu na "%s".';
$txt['yshout_lock_success'] = 'Shoutbox został tymczasowo zablokwoany. Powód: "%s".';
$txt['yshout_unlock_already'] = 'Nie można odblokować shoutboksa, ponieważ nie jest on zablokowany!';
$txt['yshout_unlock_success'] = 'Odblowanie shoutboksa udane.';
$txt['yshout_smilies'] = "Emotikonki";
// ---- End modification - nneonneo's Shoutbox ----
You have two options:
1) wait for 1.20, which should be released by the end of this week when I finish fixing one last bug
2) turn off search-engine friendly URLs.
Also, as a favor, could I ask you to translate the following texts, which are part of 1.20? This way the translation can be correct for 1.20 as well:
$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.';
(you do not have to translate permissionhelp_ ones if you don't want to).
Thank you very much!
Great :) So I think I'll wait for it :)
$txt['permissiongroup_yshout'] = 'Shoutbox';
$txt['permissionname_yshout_view'] = 'Czytanie shoutboksa';
$txt['permissionname_yshout_post'] = 'Pisanie w shoutboksie';
$txt['permissionname_yshout_moderate'] = 'Moderowanie shoutboksa';
$txt['permissionhelp_yshout_view'] = 'To uprawnienie zezwala na dostęp do shoutboksa. Jeśli jest włączone, użytkownicy widzą go i wypowiedzi, które się w nim znajdują.';
$txt['permissionhelp_yshout_post'] = 'To uprawnienie zezwala użytkownikom na wysyłanie wiadomości do shoutboksa. Jeśli jest wyłączone, nie mogą oni wpisywać żadnej wiadomości.';
$txt['permissionhelp_yshout_moderate'] = 'Jeśli to uprawnienie jest włączone, użytkownicy są dopuszczeni do moderowania shoutboksem - między innymi banowaniem piszących oraz usuwaniem i czyszczeniem wypowiedzi.';
A small issue of the wrong place for the shoutbox, i really need to get this in the right place because its really screwing around with my forum.
See attached image of where the shoutbox is at the moment i would like it to go just below the main links, but im a little lost on where in the code it should exactly be placed, also because of the theme iv had to manually add the script so i may have messed up somewhere.
Any help would be great :)
Maybe you should move </table>', shoutbox(), '</div></table> somewhere else? ;) I think that adding it after <div id="userbar-r"> is a good idea ;-) You can try it - download attached file :)
How can I resize the shoutbox? What about the images?
here's the forum link:
http://www.puffyamiyumibrasil.com/forum/index.php (http://www.puffyamiyumibrasil.com/forum/index.php)
thanks
nice mod good work nneon, but is possible have before the shout bar and after the window with all message of user ?
now i have the window with the messages and after the shout bar is possible invert?
how to resolve this? im using different themes once i click proceed nothings happen pls help
how to install??
(http://img71.imageshack.us/img71/9701/22036725xo0.png)
nneonneo Thank you soo much for your reply. It work us i wanted..
My Best Regards.
@NejiPooshon: Hmm, you can use the CSS in index.template.php to set a lower "width" for the shout_text and shout_name fields.
@edi67: I believe that version 1.20 should have the options you want to make that happen -- sit tight for it :)
@shutdown: Your host may have provided a "chmod" or "chown" function in cPanel or similar; use it to straighten out the forum permissions.
If that doesn't work, try making the folder "tmp" in the Packages directory, and ensure it is writable.
Quote from: Tricks on June 25, 2008, 06:30:17 PM
A small issue of the wrong place for the shoutbox, i really need to get this in the right place because its really screwing around with my forum.
See attached image of where the shoutbox is at the moment i would like it to go just below the main links, but im a little lost on where in the code it should exactly be placed, also because of the theme iv had to manually add the script so i may have messed up somewhere.
Any help would be great :)
www.fantasysquare.org <-- the shoutbox is still slightly in the wrong place any help and getting it below the main links and above the other info box would be a huge help, this is my index.template file
<?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.5';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
$settings['use_image_buttons'] = true;
/* 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, $language, $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 ?finll 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'], '/css/yshout.css?b21" />
<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" />
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/ie6lte.css?fin11" />
<![endif]-->';
global $boardurl;
// YSHOUT HERE
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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?May022008" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">
soundManager.url="',$boardurl,'/yshout/soundmanager2.swf";
soundManager.debugMode = false;soundManager.consoleOnly = false;
soundManager.onload = function()
{
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/chat.mp3", autoPlay:false});
}
</script>';
// YSHOUT END
/* 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']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// 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>
</head>
<body>
<div id="wrapper">
<div id="header-l">
<div id="header-r">
<div id="header">
<div id="logo">';
if (empty($settings['header_logo'])){
echo '<a href="'.$scripturl.'" title="" class="logo-txt">', $context['forum_name'], '</a>';
}
else {
echo '<a href="'.$scripturl.'" title="" class="logo"> </a>';
}
echo'
</div>
</div>
</div>
</div>
<div id="mainnav-l">
<div id="mainnav-r">
<div id="mainnav">
',template_menu(),'
</div>
</div>
</div>';
echo'
<div id="userbar-l">
<div id="userbar-r">
</table>', shoutbox(), '</div></table>
<div id="userbar">
<div id="topbar">';
// script for shoutbox upshrink
echo'<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the shoutbox header object.
var sbHeader = new smfToggle("upshrinkSB", ', empty($options['collapse_shoutbox']) ? 'false' : 'true', ');
sbHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
sbHeader.setOptions("collapse_shoutbox", "', $context['session_id'], '");
sbHeader.addToggleImage("upshrinkSB", "/upshrink.gif", "/upshrink2.gif");
sbHeader.addTogglePanel("upshrinkSBHeader");
sbHeader.addTogglePanel("upshrinkSBHeader2");
// ]]></script>';
// The information that will be shown to the member when he/she is logged on
if($context['user']['is_logged'])
{
echo '
<div id="loggedin">
<b>', $txt[248], '</b> ', $context['user']['name'];
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ',<br />', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'], '.';
echo '
</div>
<div id="loggedin2">
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>
</div>';
}
// The login box which will only be shown to the guests
else
{
echo '
<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" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input name="user" type="text" onfocus="if(this.value==\'', $txt[35], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[35], '\';" value="', $txt[35], '" />
<input name="passwrd" type="password" onfocus="if(this.value==\'', $txt[36], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[36], '\';" value="', $txt[36], '" />
<input name="sa" class="submit" src="', $settings['images_url'], '/custom/go_icon.png" type="image" value="', $txt[34], '" />
<input type="hidden" name="cookielength" value="-1" />
</form>';
}
echo'
</div>
<div id="searcharea">
<form action="', $scripturl, '?action=search2" method="post">
<input name="search" type="text" onfocus="if(this.value==\'', $txt[182], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[182], '\';" value="', $txt[182], '" />
<input name="sa" class="submit" src="', $settings['images_url'], '/custom/go_icon.png" type="image" value="', $txt[182], '"/>';
// 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>
</div>
</div>
</div>
</div>';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo'
<div id="footer-l">
<div id="footer-r">
<div id="footer">
' ,theme_copyright(),' | Theme kelo-lt by <a href="http://padexx.de">panic</a>
</div>
</div>
</div>';
echo'
<div id="footer2">';
// Show the load time?
if ($context['show_load_time'])
{
echo '
<p class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</p>';
}
// 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>
</div>
</div>
</body>
</html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $txt, $options;
echo '
<div class="pathway-l">
<div class="pathway-r">
<div class="pathway">';
// 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'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '">' . $tree['name'] . '</a>' : $tree['name'] , ' » ';
else
echo $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
}
echo '</div></div></div><span style="display: none">kelo-lt Theme designed by <a href="http://padexx.de/" target="_blank" title="SMF Themes & webdesign solutions">padexx</a></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';
}
// Start of the tab section.
echo '
<ul>';
// Show the default [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'home' ? 'current' : '' , '"><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
// Show the [help] button.
echo ($current_action=='help' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'help' ? 'current' : '' , '"><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo ($current_action=='search' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'search' ? 'current' : '' , '"><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action=='admin' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'admin' ? 'current' : '' , '"><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action=='profile' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'profile' ? 'current' : '' , '"><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action=='pm' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'pm' ? 'current' : '' , '"><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action=='calendar' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'calendar' ? 'current' : '' , '"><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action=='mlist' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'mlist' ? 'current' : '' , '"><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action=='login' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'login' ? 'current' : '' , '"><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action=='register' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'register' ? 'current' : '' , '"><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action=='logout' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'logout' ? 'current' : '' , '"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
// The end of tab section.
}
function shoutbox()
{
global $txt, $options, $settings;
echo'<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;"><a href="#" onclick="sbHeader.toggle(); return false;"><img id="upshrinkSB" src="', $settings['images_url'], '/', empty($options['collapse_shoutbox']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="Shrink or Expand the ShoutBox" align="bottom" /></a> ';
// Block Title
echo'<span width="49%"></span><span>ShoutBox</span>';
echo'</div><div id="upshrinkSBHeader"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
echo '<div>
<div id="yshout"></div>';
echo'</div>';
// SHOUTBOX END
echo' </td>
</tr>
</table></div></div>';
echo '
<table id="upshrinkSBHeader2"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';
}
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
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> </td>';
echo '
<td class="buttons">', implode('</td><td class="buttons">', $button_strip) , '</td>';
}
function showcase()
{
global $settings, $buttons, $context, $txt, $scripturl;
// personal info etc.
echo '
<div class="userinfo">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '<h3>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</h3>';
echo '
<div id="useropts">
<ul>';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a> ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>', $txt[616], '</b></li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
echo '
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
</ul>
</div>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
', $txt['welcome_guest'], '
<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'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" />
<input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />';
}
echo ' </div>';
echo '
<div class="searchfield">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 4px 0;">
<input type="text" name="search" value="" size="30" style="margin-bottom: 4px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="margin-bottom: 4px;" /><br />
<b><a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a></b>
<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><br />
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '- ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span> -
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>
<div class="clr"></div>
';
}
?>
also iv noticed that all the text on the page is centered :S anyway of sorting this out?
And the pics? just show the name of the pics...
And how can I add the shoutbox as a board?
My issue has been resolved now, figured it out in the end :)
I downloaded the shoutbox to my darkdayV2 (a very old theme) and it's not showing up on my index.template php file when I put in the part where I show it on the page. I'm putting it right before my linktree.
@NejiPooshon: If you are referring to removing images, I posted about it a few pages back. However, 1.20 will have this feature built-in, so you may wish to wait a bit until I release it :)
@trekkie2444: What does your index.template.php look like? Attach it and I will take a look.
Here you go.
[announce] Version 1.20 posted after several months of development.
Highlight of changes:
Instant-on capability for quick loading
IE7 lag fixed
Multiple bugfixes for ...loading shoutbox... issues; the majority of these should be solved
Settings and documentation moved to a separate files
Permissions implemented as SMF membergroup permissions (i.e. through the Admin CP)
Full XHTML-compliance
Backend changes to make modifying and enhancing the shoutbox easier
Changed /yshout/ to act as a standalone shoutbox (added yshout/index.php)
Added a warning for missing language files to alleviate problems with foreign boards
Many miscellaneous fixes
@trekkie2444:
// 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" ...
// YSHOUT HERE echo ' <br />...
Your code all ended up on one line; you'll need to redo the modifications, since that has damaged the code. (for the tenth time, why does this happen?)
Ok i have a problem, firstly i uninstalled the old version of the Ajax shoutbox and manually installed the new one, problem is when i try to upload the new files into 'yshout' it wont allow me due to the owner being 99 which is weird, iv tried to remove 'yshout' altogether but that wont work at all, it seems to be stuck on my server and wont budge at all!
How can i remove the folder and its contents?
Quote from: nneonneo on June 26, 2008, 11:55:48 AM
@edi67: I believe that version 1.20 should have the options you want to make that happen -- sit tight for it :)
Installed new version nneo thx but where i can find this option?
and also i forgot how reverse the view of message i want that last messages come for first and not for last.
How can I change the shoutbox code so that only logged in users can post? Right now, guests can make up any name and shout with it. Thanks!
p.s. I apologize if this has already been addressed. I tried searching this topic but couldn't find an answer
@Tricks: It happened to me too. Use CPanel to "fix file ownership" and "fix file permissions"; then the folder will be removable.
@edi67: yshout/settings.php: $reverseShouts and $shoutFormOnTop are the settings I think you were asking for.
@++STi++: For versions 1.16 and below, use $allowGuests in yshout/yshout.php; for version 1.20, use SMF's Permission system ("Post in Shoutbox" permission).
Quote from: nneonneo on June 27, 2008, 11:27:52 AM
@edi67: yshout/settings.php: $reverseShouts and $shoutFormOnTop are the settings I think you were asking for.
Fantastic everything is ok superb work nneonneo :)
I just uninstalled 1.15 on my test forum (smf 1.1.5), and tried to install 1.20. When I upload to the packages folder it does show up in the packages section in the admin menu. However when I click apply mod, It just times out.
What code do I need to change?
@trekkie
Attached is your index.template.php with the code corrected.
Now I am off to try out v1.20!! :D
@LinK187: Odd. Check the forum error log, and make sure you delete the yshout folder if it still there.
@SunKing: Can you please check AdvSB_1.20 to make sure I didn't make any omissions when copying over the changes? Thanks :)
OK. I just took AdvSB_1.20 for a spin.
The "instant-on" is absolutely brilliant! Great improvement!
SMF permissions....perfect! Much easier to set who shouts and who doesn't.
In fact....the whole thing is much nicer now. Fast, no lag (even in IE ;)), no problems at all installing in SMF 2.0 Beta 3.1 clean install.
A few **minor** oops's:
Shoutbox commands are incomplete. They start about halfway through the emotes description.
Regular members and guests only see the last few words of the emotes description. :P
In FF2 and in Opera 9.5, the sound seems to randomly play about every 5 second up to several minutes in between. IE7 and IE8 didn't appear to have this glitch.
IE8 tends to throw the member back to the "top" of the shoutbox window where as the shouts are at the bottom. But IE8 is still beta anyway (just figured I'd throw you a heads up).
And that's it. Like I said.......minor.
Fantastic job on this mod, my hat's off to you. And thanks again for all of your patience, hard work, and willingness to support your mod.
Thanks very much for checking those out!
Turns out I had a little typo (missing " in a div :-\) in AdvSB affecting the help files; it doesn't affect the regular shoutbox (but I accidentally re-uploaded it too...)
As for the sound glitch, I can't get it to reproduce consistently, and it entirely disappears when I try to debug it! I will have to investigate it further, but thanks for pointing it out.
Finally, I don't have the IE8 beta, but I bet it is a change in how they handle the scroll events or something :P Maybe the original authors of the autoscroll can fix it for IE8.
Anyone who wants to fix the help bug in AdvSB can do the following:
edit yshout/yshout.php and replace
<div style="border:1px solid #aaaaaa;>
by
<div style="border:1px solid #aaaaaa;">
Quote from: nneonneo on January 19, 2008, 11:01:07 AM
I'm reposting pongsak's smiley guide because the recent server crash has deleted the smiley.php attachment.
Quote from: pongsak on August 18, 2007, 11:10:08 PM
For adding smiley .Let's go.
1. Adding 1 line of script between <head> and </head> index.template.php .
<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script>
This file will create sliding effect.
2. Create "mymod" dir in root forum dir and copy these code and safe as "animatedcollapse.js"
//Animated Collapsible DIV- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated June 27th, 07'. Added ability for a DIV to be initially expanded.
var uniquepageid=window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, "") //get current page path and name, used to uniquely identify this page for persistence feature
function animatedcollapse(divId, animatetime, persistexpand, initstate){
this.divId=divId
this.divObj=document.getElementById(divId)
this.divObj.style.overflow="hidden"
this.timelength=animatetime
this.initstate=(typeof initstate!="undefined" && initstate=="block")? "block" : "contract"
this.isExpanded=animatedcollapse.getCookie(uniquepageid+"-"+divId) //"yes" or "no", based on cookie value
this.contentheight=parseInt(this.divObj.style.height)
var thisobj=this
if (isNaN(this.contentheight)){ //if no CSS "height" attribute explicitly defined, get DIV's height on window.load
animatedcollapse.dotask(window, function(){thisobj._getheight(persistexpand)}, "load")
if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.visibility="hidden" //hide content (versus collapse) until we can get its height
}
else if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.height=0 //just collapse content if CSS "height" attribute available
if (persistexpand)
animatedcollapse.dotask(window, function(){animatedcollapse.setCookie(uniquepageid+"-"+thisobj.divId, thisobj.isExpanded)}, "unload")
}
animatedcollapse.prototype._getheight=function(persistexpand){
this.contentheight=this.divObj.offsetHeight
if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes"){ //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
this.divObj.style.height=0 //collapse content
this.divObj.style.visibility="visible"
}
else //else if persistence is enabled AND this content should be expanded, define its CSS height value so slideup() has something to work with
this.divObj.style.height=this.contentheight+"px"
}
animatedcollapse.prototype._slideengine=function(direction){
var elapsed=new Date().getTime()-this.startTime //get time animation has run
var thisobj=this
if (elapsed<this.timelength){ //if time run is less than specified length
var distancepercent=(direction=="down")? animatedcollapse.curveincrement(elapsed/this.timelength) : 1-animatedcollapse.curveincrement(elapsed/this.timelength)
this.divObj.style.height=distancepercent * this.contentheight +"px"
this.runtimer=setTimeout(function(){thisobj._slideengine(direction)}, 10)
}
else{ //if animation finished
this.divObj.style.height=(direction=="down")? this.contentheight+"px" : 0
this.isExpanded=(direction=="down")? "yes" : "no" //remember whether content is expanded or not
this.runtimer=null
}
}
animatedcollapse.prototype.slidedown=function(){
if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==0){ //if content is collapsed
this.startTime=new Date().getTime() //Set animation start time
this._slideengine("down")
}
}
}
animatedcollapse.prototype.slideup=function(){
if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==this.contentheight){ //if content is expanded
this.startTime=new Date().getTime()
this._slideengine("up")
}
}
}
animatedcollapse.prototype.slideit=function(){
if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
alert("Please wait until document has fully loaded then click again")
else if (parseInt(this.divObj.style.height)==0)
this.slidedown()
else if (parseInt(this.divObj.style.height)==this.contentheight)
this.slideup()
}
// -------------------------------------------------------------------
// A few utility functions below:
// -------------------------------------------------------------------
animatedcollapse.curveincrement=function(percent){
return (1-Math.cos(percent*Math.PI)) / 2 //return cos curve based value from a percentage input
}
animatedcollapse.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}
animatedcollapse.getCookie=function(Name){
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}
animatedcollapse.setCookie=function(name, value, days){
if (typeof days!="undefined"){ //if set persistent cookie
var expireDate = new Date()
var expstring=expireDate.setDate(expireDate.getDate()+days)
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()
}
else //else if this is a session only cookie
document.cookie = name+"="+value
}
3. download smiley.php and safe in mymod dir.
4. Search after in index.template.php or boardindex.template.php depend on where u put shout box.
<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>
or
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
or
<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>
add
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
5. Open yshout.php for namely some input.
find and replace (up to 4 times)
*id="shout-form"
with
*id="shout-form" name="shout_form"
find and replace (up to 4 times)
*id="shout-text"
with
*id="shout-text" name="shout_text"
That's it. :D
EDIT [Feb 4 2008]: Updated a few instructions. Changes are noted in red, changes to code marked with a red *.
EDIT [June 22 2008]: Clarified instructions.
EDIT [June 27 2008]: Add 1.20 instructions.
ive aaded this to my site the shout box works good so i fault ill add the smilys but it seem its for smf 11 not smf 2.0
is there any chance someone can update the smily.php please
I use the smiley mod with no problems on SMF 2.0 as you can see here (http://www.empireofthesun.net/forum/index.php?action=refer;sa=SB).
What is cuasing you to not be able to use the smileys?
i just get this
Open Smiley | Close
Fatal error: Call to undefined function db_query() in C:\*****\htdocs\forum\mymod\smiley.php on line 55
ok waht code do you use for smilys can i have you code please
It shouldn't have the db_query() for sure. Let's see.
I'll just attach my smiley.php. That would be the easiest.
it still the same whats wronng
I just remembered having an issue with that as well a while back. It had something to do with using custom smileys. I think I just had to turn off custom smileys in the SMF admin area and then everything worked fine.
hmm that works but i only see the dafult smilys i want all of them to show plus the open smilys close doesnt work
I got you closer though. :P
I will give it some more thought and try to remember if I had to do anything else to get it to work.
ok i got the open close working now all i need it to get all the smilys there?
Nneonneo, 1.20 works, thanks :) But I've to ask you one more question - where can I change shoutbox's settings? ;) I just want to show it to all my users ;-)
Quote from: nneonneo on June 27, 2008, 11:27:52 AM
@Tricks: It happened to me too. Use CPanel to "fix file ownership" and "fix file permissions"; then the folder will be removable.
I dont have that option in my Cpanel, and iv even tried changing the ownership via command line and it still wont allow me to change or remove it.
@Kangel
The general settings are located in two files: settings.php and settings.js which are both inside the folder /yshout
The appearance settings (CSS such as font color and size) are in yshout.css which is in /{yourforum}/Themes/{yourtheme}/css.
Quote from: nneonneo on June 27, 2008, 05:47:41 PM
@LinK187: Odd. Check the forum error log, and make sure you delete the yshout folder if it still there.
@SunKing: Can you please check AdvSB_1.20 to make sure I didn't make any omissions when copying over the changes? Thanks :)
Manually removed the yshout folder apparently it wasn't deleted during the uninstall. Then I tried to apply the mod, still timed out? ???
@wdm2005: I'm going to see if I can hack up a smiley.php for SMF 2.
@Kangel: SB_1.20 has the CSS settings in index.template.php; AdvSB_1.20 has them in Themes/<theme>/css like SunKing said.
@Tricks: Hmm, no idea what could be going on. Perhaps you could ask your host. I know that that exact problem happened to me (files owned by 99). Did you chown the files to <user>:<group>?
@LinK187: I have no idea why the script would time out. If there isn't any indication in the forum error log, it *might* mean a bug in SMF or your host...
Try uploading the package directly to the Packages/ folder, and add a Packages/tmp folder with a dummy file inside.
Quote from: nneonneo on June 28, 2008, 12:44:53 PM
...SB_1.20 has the CSS settings in index.template.php...
Sorry about that. :P
Quote from: nneonneo on June 28, 2008, 12:44:53 PM
@wdm2005: I'm going to see if I can hack up a smiley.php for SMF 2.
@Kangel: SB_1.20 has the CSS settings in index.template.php; AdvSB_1.20 has them in Themes/<theme>/css like SunKing said.
@Tricks: Hmm, no idea what could be going on. Perhaps you could ask your host. I know that that exact problem happened to me (files owned by 99). Did you chown the files to <user>:<group>?
@LinK187: I have no idea why the script would time out. If there isn't any indication in the forum error log, it *might* mean a bug in SMF or your host...
Try uploading the package directly to the Packages/ folder, and add a Packages/tmp folder with a dummy file inside.
Can you elaborate, not quite sure what you mean.
Quote from: SunKing on June 28, 2008, 12:49:06 PM
Quote from: nneonneo on June 28, 2008, 12:44:53 PM
...SB_1.20 has the CSS settings in index.template.php...
Sorry about that. :P
No problem, but....
Which file should I edit to make this shoutbox visible to all users? ;-)
That's in the SMF Permissions. Each membergroup will have
View shoutbox
Post in shoutbox
Moderate shoutbox
I'm afraid I'm going to wear glasses :) Thanks, bye!
nneonneo: If you have something to translate to Polish in future, just send me an e-mail :) My address is same as yours, except username - "k4ngel" is mine :P
thanks nneonneo looking forward to seeing that
Strangely enough, the modifications didn't show the shoutbox, but they fixed my font sizes. There's no shoutbox, but the top left of my forum says the words Shout Box.
www.deck-one.net/forum You'll have to change the theme to darkday to see what I'm talking about.
Thanks but i take this error when i send a message. How can i fix?
File error (writeLine); aborted
@уιℓмαz: You need to chmod yshout/chats and its contents to 777
It's working. Thanks :)
And one more question. Last message is being added to last line. Can we add it to the top?
@уιℓмαz: Turn $reverseShouts on in yshout/settings.php.
@trekkie2444: Does the shoutbox only show up for registered users?
The shoutbox isn't showing up at all.
It's working: http://www.deck-one.net/forum/?theme=1
What does index.template.php look like?
@SunKing: OK, I think I figured out the bug with the random pinging sound. I will shortly upload a new AdvSB. The only changed file is yshout/js/yshout.js, so I've attached it for easy patching :)
I also made the shoutbox not ping if you made the shout, since that brings it closer to the behaviour of actual chat systems.
@wdm2005: Attached is a smiley.php that should work fine with SMF 2 and custom smileys.
thanks that works good thankyou
I install it...
ALL TESTS FAILED...
i get spam and messages from aynonmous members saying... IMA HAC KU
then when i uninstalled it i get a message saying Hacker!
but its gone
@joshyc5: If all tests failed during installation, I think it is unlikely that my shoutbox would even work. When you tried uninstalling it, SMF detected that you tried to uninstall a package that was not installed, which gives the message "Hacker?"
AdvSB 1.20 updated, hopefully for the last time. It is now compatible with SMF 1.1.x, and has been partly rewritten to ensure XHTML compliance. Also included is one little bugfix for the self-shout detection (this resides again in yshout/js/yshout.js).
*SIGH*
heres the full story...
see i installed it and after all tests failed so meh i just clicked install to see what was wrong
when i see i keept getting messages saying HACKER and IMA and well
so i uninstalled it and yeah i did know when it says Hacker? that means it didnt install properly
@nneonneo
Thanks yet again! The yshout.js works perfectly now! No more random "dings".
Also, I had tried unsuccessfully to get the custom smileys to work many times, so I also wanted to give a big thanks for that one too (which also works perfectly).
[Donation attached] :P
I have a small suggestion on making the shoutbox "fit" into the theme a bit better. The location is the same, it just renders the border around the shoutbox as well like with all of the other forum elements.
Where you have the shoutbox() now simply needs to be moved from this:
echo '
</form>
</td>
</tr>
</table>
</div>';
// Show the shoutbox!
shoutbox();
// Show the menu here, according to the menu sub template.
template_menu();
to this
echo '
</form>
</td>
</tr>
</table>';
// Show the shoutbox!
shoutbox();
echo' </div>';
// Show the menu here, according to the menu sub template.
template_menu();
That just puts it within the upper <div> and IMO looks better with the border around it. Just figured I'd post this for anyone wanting to do just that. :D
Thank for MOD shoutbox
@SunKing: OK, I think I will incorporate that change. It looks pretty good that way :)
Quote from: nneonneo on June 29, 2008, 01:11:37 PM
@уιℓмαz: Turn $reverseShouts on in yshout/settings.php.
Thanks i did it.
Quote from: nneonneo on June 28, 2008, 12:44:53 PM
@Tricks: Hmm, no idea what could be going on. Perhaps you could ask your host. I know that that exact problem happened to me (files owned by 99). Did you chown the files to <user>:<group>?
Could you run thru exactly what i need to put into the command line to change it, i might be doing it wrong and the host is me lol
@Tricks:
chown -R <ftpusername>:<ftpusername> /home/.../public_html/
or something like that.
is ther any way of hiding the ban button i keep banning people by mistacke lol
HideAdminLinks
yeah i know that one but is there a way to just get rid of it seen as you can ban threw the commands
Well, I'd like to add the SB as a forum...
@wdm2005: I'd think that banning someone accidentally by typing in "/banuser p banmeplz" would be rather difficult to do accidentally. If you *absolutely* wish to disable the banning functionality, you can just chmod _banlist.php to 000 after clearing it (n.b. this will also disable the shoutbox maintenance feature, but I kind of doubt you will be using that anyway...)
@NejiPooshon: I suppose you could add a check to show the shoutbox only on certain forums; however, installing TinyPortal and creating an SB block that only activates on a certain forum is probably a more elegant solution.
It's not showing up for me at all on any theme.
I'm using the index.template.php that someone posted on here for me.
Where did you want the shoutbox on the theme? Right now, from the index.template.php that SunKing posted, I see that the shoutbox code is between two functions, which will probably cause bizarre problems (that's where you put it in the one you posted earlier).
You need to put all the code into one of the functions, but you need to know which one first.
Hi,
I've been using this mod for quite sometime now... Was not actually updating it before coz it's working perfectly.
I know this question has been asked before coz I was able to do it, I just can't find it again.
How do you configure the shoutbox to display messages, newest post is at the top?
Thanks
im using this on my home page here (http://waynesworld.kicks-ass.net)
and it was working great now it not working at all just
Shout Box
Error: No settings.
Open Smiley | Close
Is possible disable the DIN sound every new message? im usgin ADvanced version 1.2
@sherwinaval: $reverseShouts in yshout/settings.php
@wdm2005: Uhh, is yshout/settings.php still there? This message only shows up if the settings file is missing.
@edi67: Couple of ways to do it, I suppose. One of the best methods I found was to add an option for muting it: http://www.simplemachines.org/community/index.php?topic=137508.msg1384923#msg1384923
For 1.20:
1) In yshout/js/yshout.js, replace
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML))
by
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML) && get_cookie("shoutSound") == "true")
2) In yshout/yshout.php, before
// Extended History
if(isMod())
add
// Shout Sound Control
if(!isset($_COOKIE['shoutSound']))
echo '<a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/unmute.png" alt="UseSound" /></a> ';
else
echo '<a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/mute.png" alt="NoSound" /></a> ';
3) Download the two attached images to your theme's images folder
Tada! You now have a shoutbox with a muting function, so users can choose when to use or mute the sound.
@SunKing: Would you mind if I added the mute/unmute option to AdvSB? The icons are from
http://www.iconfinder.net/iconlib/realistiK-new/16x16/actions/kmixdocked_mute.png
and
http://www.iconfinder.net/iconlib/realistiK-new/16x16/actions/kmixdocked.png
Quote from: nneonneo on July 01, 2008, 01:22:31 PM
@edi67: Couple of ways to do it, I suppose. One of the best methods I found was to add an option for muting it: http://www.simplemachines.org/community/index.php?topic=137508.msg1384923#msg1384923
For 1.20:
1) In yshout/js/yshout.js, replace
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML))
by
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML) && get_cookie("shoutSound") == "true")
2) In yshout/yshout.php, before
// Extended History
if(isMod())
add
// Shout Sound Control
if(!isset($_COOKIE['shoutSound']))
echo '<a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/unmute.png" alt="UseSound" /></a> ';
else
echo '<a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/mute.png" alt="NoSound" /></a> ';
3) Download the two attached images to your theme's images folder
Tada! You now have a shoutbox with a muting function, so users can choose when to use or mute the sound.
work like a charm excellent as usually thx ;)
@nneonneo, thank you very much.... Actually, I've installed a previous version... but now I've got the 1.20.
A followup question though, I can't seem to be able to delete chats... When I click "del" the chat disappears for like a few seconds and goes back again, but the message that I was trying to delete is still there.
Any clues?
I want it on every page right above where the forums start, but below the logo and navbar. In that blank space there that's not part of the header block and the forum block.
Quote from: nneonneo on July 01, 2008, 01:31:46 PM
...Would you mind if I added the mute/unmute option to AdvSB?...
No need to ask. :D It is 100% your mod, we just bundled some stuff together in hopes of alleviating some of the questions in here....hehehehe.
I actually have a "mute" on mine now. But yours is much nicer. So off to change some code.
Thanks again.
@sherwinaval: Have you made any modifications to the timestamp (excluding preg_timeformat)? That's the part of the shout that is checked for deletion. I have tested deletion against both SB_1.20 and AdvSB_1.20. If it doesn't say "Shout deleted." and the language files are correct, then it means that the shoutbox was unable to find the shout to delete.
@nneonneo, actually it's a newly installed mod. And I'm sorry but I'm not that good in programming especially php.
Can you please assist me to troubleshoot the issue? Thanks.
Hello All,
I've got a question, and I hope someone will be able to answer me.
how do I stop the shoutbox from showing up on every page?.
shoutbox only display in first page ;D i'm used new version 1.20 nneonneo's Shoutbox and smf 1.1.5 .thk's.
I installed the package and there was nochange to my custom theme, so i checked the default theme and mod looks awesome and seems to work... BUT THEN DISASTER: i followed instructions to get the mod working on my custom theme which I found here: http://custom.simplemachines.org/mods/index.php?action=parse and now I cannot view any of my forum except the header with
"Fatal error: Call to undefined function shoutbox() in /home/liveflg/public_html/fuel/Sources/Load.php(1726) : eval()'d code on line 334" displayed under it. Please kindly help me as a matter of urgency.
I am now going to try and remove all changes the install page told me to add and see if this fixes my issue for the moment, however I will still need help installing it properly.
Please help :)
ive fixed the error, now i need to do a manual install which works... The mod works on default theme
If i go to uninstall the shoutbox ... i dont find any button to uninstall that... wat to do
I need to istall the new version
I've sorted myself now, but am still havin a bit of a problem...
Why is it that the shoutbox on my custom theme isnt exactly the same as the default themes one e.g. it has no shrink/maximise buttons or theme-like bgcolor
Quote from: assam_siddibapa on July 02, 2008, 10:56:30 AM
If i go to uninstall the shoutbox ... i dont find any button to uninstall that... wat to do
I need to istall the new version
you may need to manually uninstall it. are you uninstalling from the default theme or a custom one? which version of smf are you running?
i m using smf 1.1.5 and and want to unistall from my xbox theme
@assam_siddibapa: If you installed a particularly old version of the shoutbox, and you updated the forum after installing the shoutbox, the automatic uninstall will probably not work. You should perform a manual uninstall -- remove the blocks of code between // YSHOUT HERE and // YSHOUT END in index.template.php.
@samames: Did you parse AdvSB or SB? AdvSB comes with the theme-like block (though you may need to tweak it); the basic shoutbox just inserts itself into the header.
@sherwinaval: OK, PM me the contents of chats/home.txt, and I will take a look.
@jojon: One thing you might consider is using TinyPortal to completely customize your front page, which provides a clean way to put the shoutbox on only one page (you simply install it in a block that shows up only on the front page). This method also provides a fully customized front page.
If you just want to hide the shoutbox for all non-front pages, do this:
For AdvSB, in index.template.php, put
if(empty($context['current_action']))
before
shoutbox();
For regular SB, change
if(allowedTo('yshout_view'))
to
if(empty($context['current_action']));
elseif(allowedTo('yshout_view'))
i used advsb i think, it told me to enter code wherever i want it displayed...
i put it before the menu but it has not background or shrink/maximise buttons
I have achived what I wanted now by simply following in my custom theme: http://custom.simplemachines.org/mods/index.php?action=parse and changing: <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/yshout.css?b21" />
to <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/yshout.css?b21" />
it has taken me all day to sort this out please make it easier for others by rectifying the Custom Theme Install part on the mod site
Well, you could also just copy yshout.css to the Themes/<theme>/css folder...
@trekkie2444: Whoops, I missed your reply. Would the news box be a decent place for it? You can test by putting the <head> code in index.template.php, then putting
<div id="yshout" />
in your news box.
why waste a few kb???
erm... anyway now i have it working how i want it with the minimise icon there. but when i click on it it doesn't minimise, it just takes me right to the top of the page... any idea why?
Might be a bug in my code. Post or PM a forum URL and I will take a look.
(p.s. the reason why I suggested a separate CSS file was so that you could change the styling without affecting the default theme's appearance)
Errr, you didn't answer me.
@trekkie
What theme are you installing the SB into? If you use package manager and install the shoutbox as is, then upload your index.template.php here, I will move the shoutbox to where you want it.
This (http://www.simplemachines.org/community/index.php?topic=137508.msg1599881#msg1599881) didn't answer your question?
I'm working on installing the scrollbar from this link:
http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
I had it working but it made the width of the SB very small. I noticed there is a
width: 165px
when I played with that number it increased slightly but when I tried to go much beyond 200px or some other numbers the scroll bar completely disappeared.
Where would I find how to make the SB with the autoscroll wider?
Using IE7
Forum version: SMF 1.1.5
SB 1.20 that you previously corrected for me.
Oh man I'm sorry I didn't even see that post.
I don't want it in the news box as I'm using the darkday theme, I want it outside of my header and outside of my forum body in that void space right above the linktree.
@zookeeper: I'm guessing you don't have enough lines to require scrollbars. You should try editing the height: parameter.
@trekkie2444: Hmm, everything is absolutely positioned in this theme; the shoutbox might not fit correctly up there. I will have to see, though.
I played with the numbers again, making the length from 200 down to 100 then the scroll bar showed up regardless of what width I put in (under 1000px) to make it wider and its working.
Next question, is there a way to make the scrollbar autofit the shoutbox regardless of width of page ?
To do that, you could just remove the width line altogether.
Excellent that worked I think. TY again!
Such a great work with the Advance SB. Long awaited. Thanks a lot.
Working great for my themes.
Demo if needed - www.truforum.org
Sry not open to guests.
Now I'm working on adding smileys and first error I come up with is:
Parse error: syntax error, unexpected '<' in .../Themes/default/index.template.php on line 8541
8532: global $txt,$context,$boarddir;
8533: if(allowedTo('yshout_view'))
8534: {
8535: echo '<br /><b>'.$txt['yshout_shoutbox'].'</b><br /><br />';
8536: echo '<div id="yshout">';
8537: include_once($boarddir.'/yshout/yshout.php');
8538: echo '</div>';
8539:
8540:
8541: <div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>8542:
8543:
8544:
8545:
Also in yshout.php there was only only place I found find to make the change from id="shout-form" to id="shout-form" name="shout_form" and the other text section.
Just add an echo' in front of the <div> on line 8541. Also the other code there is jumbled together. It should look like this:
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>';
echo' <div class="smalltext" style="padding-left:25px;">
<a href="javascript:collapse1.slidedown()">Open Smiley</a> |
<a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
Notice the '; after that last <div> too. ;)
Awesome, once again TYVM, sort of want to add a few fun/different/unusual smileys though, I assume I just change whats in the smiley.php file hmmm somehow lol
Well, thanks to nneonneo, you can use SMF's custom smileys from within the admin section and use those for the shoutbox (which is what I have done).
@trekkie2444: OK, after looking at the theme a bit more, I am pretty convinced that putting the shoutbox above the link tree is a bad idea. You see, the entire header section is completely locked to this image (http://deck-one.net/forum/Themes/Enterprise_smf11final_tp/images/img/topl.jpg) (and topm and topr*)
So, the only really viable approach (without editing 6 images and exercising the utmost care to keep the shoutbox a uniform size) is to put the shoutbox right under the linktree.
If you put the second block of code
// 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 instant-on or
// 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
for 1.16 "loading shoutbox" behaviour right before
}
function template_main_below()
in index.template.php then you should see the shoutbox appear below the link tree.
QuoteWarning - while you were typing 5 new replies have been posted. You may wish to review your post.
I have installed this SB and it works perfectly in the Default Core Theme.
I can't seem to see it in my other themes though. Mainly gunsmoke theme.
I can see the options of viewing, posting, and moderating in the permissions for members.
What can I do?
How can we clear all history ?
/ clear command only empty shoutbox
I want all history to be cleaned
how can I do this ?
@nneonneo: please see my PM so u can check out my AdvSB [as you requested]
thanks vmuch m8
1. Execute Modification ./index.php Test successful
2. Execute Modification ./Themes/default/index.template.php Test successful
3. Execute Modification - Modification parse error
4. Execute Modification - Modification parse error
5. Extract Tree ./yshout
Ok i am using version 1.1.5 with Tiny portal with the default core template
First of all i editted my index.template.php file and added in the script quoted http://custom.simplemachines.org/mods/index.php?mod=585#post_otherthemes
I then try to install the SB_1.20.zip (32KB) [104] and when i hit install mod i get
1. Execute Modification ./index.php Test successful
2. Execute Modification ./Themes/default/index.template.php Test successful
3. Execute Modification - Modification parse error
4. Execute Modification - Modification parse error
5. Extract Tree ./yshout
I also get a similar error when i tried installing the advanced 1.20 shout box
Am I doing something wrong?
I do appologise I am still learning my around the SMF forum
Mark
@jdizine: Have you manually installed it to other themes (using 1.20 instructions)?
@DjProgressive: You can delete history.home.txt to clear the history. If you don't want to keep any history at all, set $historyFormat to '' in yshout/settings.php.
@mrk79uk: Try again. For some reason, SMF doesn't always find the modification files (and I have no idea why), so it complains about a parse error.
1. Execute Modification ./index.php Test successful
2. Execute Modification ./Themes/default/index.template.php Test failed
3. Execute Modification ./Themes/default/index.template.php Test successful
4. Execute Modification - Modification parse error
5. Execute Modification - Modification parse error
6. Extract Tree ./yshout
7. Create Tree ./Themes/default/css
8. Extract File ./Themes/default/css/yshout.css
9. Extract File ./Themes/default/images/calendar.png
10. Extract File ./Themes/default/images/info.png
11. Extract File ./Themes/default/images/cog_delete.png
12. Extract File ./Themes/default/images/cog_add.png
13. Extract File ./Themes/default/images/smile.png
14. Extract File ./Themes/default/images/date.png
15. Extract File ./Themes/default/images/mute.png
16. Extract File ./Themes/default/images/unmute.png
When i try to install the Advanced AJAX Shoutbox 1.20 and:
1. Execute Modification ./index.php Test successful
2. Execute Modification ./Themes/default/index.template.php Test successful
3. Execute Modification - Modification parse error
4. Execute Modification - Modification parse error
5. Extract Tree ./yshout
When i apply the nneonneo's AJAX ShoutBox 1.20
Happens every time :(
This topic is really huge so I can't read all of posts. I have one question: how can I change 25 lines on the shoutbox to 15 lines.
many thanks
@mrk79uk: Perhaps you could try recompressing the file -- extract it, then compress it again, perhaps with .tgz (tar -czf). Many other people have made it work; perhaps this is a bug in SMF?
@saosangmo: yshout/settings.php
Oh no, that's not the theme that I'm using. The shoutbox is going into a theme that I haven't implimented yet, the darkday theme. I've been busy designing buttons for it and stuff. The index.template that I posted here is for that theme, not the enterprise theme.
/me smacks forehead
Well, that would explain my apparent confusion.
EDIT: OK, I think I got the best spot. It's the same as my suggestion for the Enterprise theme: right above
}
function template_main_below()
thanks nneonneo
I have solved my issue.
Hmm I put it in there but it's still giving me the same thing as before. Here's my index.template.
You have to put it BEFORE the closing }.
Hey i attempted to add this to overview but it turned out like this:
PICTURE: http://natural-scape.com/uploads/1215235828.jpg
i wanted it so the shoutbox will load after the news fader box thing [green box in pic] my theme index.temlplate.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'] = true;
/* 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, $boardurl;
// 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'], '" />
<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?rc2p"></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, '";
// ]]></script>
<title>', $context['page_title'], '</title>';
// The ?rc2 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?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" 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" : "";
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>';
echo '
</head>
<body>
<div id="container">
<div id="header">
<div id="headerleft">
<div id="headerright">
<div id="menubar">',template_menu(),'</div>
<div id="welcome">';
if ($context['user']['is_logged'])
{
echo '
<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
', $txt['welcome_guest'], '
<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'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" />
<input type="password" name="passwrd" size="10" />
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />';
}
echo '
</div>
<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
echo '
</div>
</div>
</div>
<div id="mainarea">';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt, $user_info;
echo '
</div>
<div id="footer">
<div id="footer-left">
<div id="footer-right"><br />
', theme_copyright(), '
<br />Theme by <a href="http://www.dzinerstudio.com"><b>DzinerStudio</b></a>';
// Show the load time?
if ($context['show_load_time'])
echo '<br />'. $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'];
echo '
</div></div></div>';
echo '
</div>
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';
// 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['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 ' > ';
}
echo '</div>';
}
// 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 '
<div id="topmenu"><ul>';
// Show the [home] button.
echo '<li><a' , $current_action=='home' ? ' class="current"' : '' , ' href="', $scripturl, '"><span>' , $txt[103] , '</span></a></li>';
// Show the [help] button.
echo '<li><a' , $current_action=='help' ? ' class="current"' : '' , ' href="', $scripturl, '?action=help"><span>' , $txt[119] , '</span></a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo '<li><a' , $current_action=='search' ? ' class="current"' : '' , ' href="', $scripturl, '?action=search"><span>' , $txt[182] , '</span></a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a' , $current_action=='calendar' ? ' class="current"' : '' , ' href="', $scripturl, '?action=calendar"><span>' , $txt['calendar24'] , '</span></a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a' , $current_action=='admin' ? ' class="current"' : '' , ' href="', $scripturl, '?action=admin"><span>' , $txt[2] , '</span></a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=profile"><span>' , $txt[79] , '</span></a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a' , $current_action=='pm' ? ' class="current"' : '' , ' href="', $scripturl, '?action=pm"><span>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a ' , $current_action=='mlist' ? ' class="current"' : '' , ' href="', $scripturl, '?action=mlist"><span>' , $txt[331] , '</span></a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a ' , $current_action=='login' ? ' class="current"' : '' , ' href="', $scripturl, '?action=login"><span>' , $txt[34] , '</span></a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a ' , $current_action=='register' ? ' class="current"' : '' , ' href="', $scripturl, '?action=register"><span>' , $txt[97] , '</span></a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a ' , $current_action=='logout' ? ' class="current"' : '' , 'href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>' , $txt[108] , '</span></a></li>';
echo '
</ul></div>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
The index.template.php you posted doesn't have any shoutbox code.
Unfortunately, the news fader only shows up on the board index. Putting it under the link tree might be a better option, since that's available in index.template.php (you would put the shoutbox before
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
in this case)
Oh and yeh tat code is like fresh one from my forum because i hoped somone could add it in without that error, but im not sure hwat you mean in yor last post :s
Add the "<head> code" as instructed, then add the "shoutbox code" before
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
as I mentioned in the last post.
I've installed the shout box 1.16 and it seems like the whole forum is having trouble. I'm getting can't connect to the server errors, slow load time on pages etc... I went to unload the mod but I'm getting
QuoteInstalling this package will perform the following actions:
Type Action Description
1. Execute Modification install-smf1.xml Modification parse error
2. Execute Modification - Modification parse error
3. Delete Tree yshout
I have locked the shout box to see if that will help at all with the server problems, but I'm stuck otherwise. I love the idea of a shout box, but can't have the forum running with all these problems... any ideas?
The file you tried to save generated the following error:
Parse error: syntax error, unexpected '}', expecting '{' in index.template.php on line 254
@Phoenxx: Have you tried a manual uninstall? Basically, just remove the shoutbox from index.template.php (code between // YSHOUT HERE and // YSHOUT END), then delete the yshout folder; for complete removal, you should also remove the text strings in Modifications.english.php.
@trekkie2444: attached
Done. Too bad our server sucks because I really like the shoutbox. I also went and edited out the extra lines in the index template. The user info box was huge otherwise.
Thanks for the help!
I have this shout on two forums, they were working fine until I upgraded my FireFox to 3, and now I am getting the
"...loading shoutbox..." Standing forever and the other one is in TinyPortal so the TP box just isn't loading. Is there some sort of help for this?
(Sorry did a search and only came up with FireFox should load fine but IE will be a bit slow, so sorry if I missed the answer!)
That's really odd. I have Firefox 3, and it's always worked fine.
Try Shift+Refresh to clear the cache, and if that doesn't work...well, I don't know what might be the problem!
Quote from: nneonneo on July 06, 2008, 03:17:14 AM
That's really odd. I have Firefox 3, and it's always worked fine.
Try Shift+Refresh to clear the cache, and if that doesn't work...well, I don't know what might be the problem!
:( Still not working. I guess I may have to check my coding, see if something is messed up along the way. It's just strange because it worked fine until I upgraded and then I had others complaining they can't see the shout either.
Yes, same problem: ...loading shoutbox never ends.
I had this problem b4, with a much earlier version, but cannot remember the fix, which was quite simple.
Are you using 1.16 or 1.20? If you are using 1.20, are you using a custom theme with the 1.16 shoutbox code? Remember that the <head> code section must be updated for 1.20, or loading will fail.
1.20 features instant-on, which doesn't have the "...loading shoutbox..." message (under 1.20, if you use 1.16 shoutbox code, you may still see this message while it loads, and possibly, if the installation was very broken, it might persist)
I am using 1.15 with default smf theme
There's many possible reasons for the ...loading shoutbox... problem, but the most common is chmod security on yshout.php. Try chmod'ing yshout/yshout.php to 755 (the standard value), and see if that works.
Sorry, chmod'ing didn't work. I also just tried un- and reinstalling, without change.
1.20 tries to resolve the majority of problems related to these errors; could you try that to see if it will work?
You've gotta larf sometimes!
1.20 works perfectly :)
Thanx 8)
Well I tried 1.20 but I get almost everything but the shout itself. Like the icon buttons are there, there is a text box for the user to type their shout, but the shout box isn't there...
I do have a custom theme and I am using TP. Let me try it on the one that doesn't have TP and see how that works out...
EDIT - Yep now it's broken for everyone lol Well I tested in IE and it's broken like that for IE now too.
That blank box means that there aren't any shouts. Have you tried shouting?
:) I have tried, still just blank :(
OK, that's not right...do you have a URL I can visit?
Thank you for checking it out, sent you a PM with the URL and other info
i just srewd my sbox up
ERROR: Prefix shout with "/" (slash character)! See "/help impersonate" for details.
cant get rid of it
see here
http://waynesworld.kicks-ass.net/forum/index.php
:D /return is a wonderfull thing lol
Heh, getting closer. Works in IE again. You can see it now in FireFox, but you can't send in it.
EDIT - I also checked and forgot to remove coding from the old version. But can you see how strange this is... It's not using a scroll either, is it supposed to do this? Never mind, sorry I missed this, see it now!
My forum was fine until i installed this shoutbox
These errors pop up in regular intervals:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /hermes/bosweb/web162/b1628/ipw.kinkyones/public_html/smf/Sources/Subs.php on line 321
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /hermes/bosweb/web162/b1628/ipw.kinkyones/public_html/smf/Sources/Load.php on line 391
Sucks, because i like this shout alot and so do my members. It also seems that I have a forum error sometimes now to : SMF cannot connect to the database.
I have been running this forum for 8 months error free until now.
I have the default theme, and SMF 1.15, all we do is change the colors.
HELP!
I have 5 forums that share the same user database and are installed on the same hosting server. The main domain is http://geeksforchrist.com
Each forum has it's own domain name they are just on different directories on the same server and they are withing a sub folder in the main domain.
I would like for the same shoutbox to appear on all of my five forums and if someone shouts on one forum it will appear on the other forums.
Does anyone have any ideas on how I can make this work?
@porcelainprincess: Could you take a look at your server error log, and see if any 403 or security errors appear? Your host is giving 403 Forbidden responses to AJAX POST requests from Firefox 3 (only AJAX POST, not regular POST or AJAX GET, and only for Firefox 3, and not only for the shoutbox, but also forum features like quick-modify and AJAX preview!).
@phantomKO: If your host has a low connection limit, that could cause problems. There might be a workaround, though:
After
session_write_close(); // so that future session requests succeed
add
mysql_close(); // close database connection to be nice
This should increase the number of free database slots, which should make the shoutbox work better.
@waremock: That's a really neat idea. It should not be hard to do with 1.20.
First, figure out the path to the "primary installation": the one that will have chats; something like /home/u1234567/public_html/forum1/yshout/chats
Then, plug that path into $chatsDir in yshout/settings.php for all the installations.
As long as the path is a server path, and accessible from all the installations, this should effectively share the chats directory among the five forums, while maintaining separate settings and appearances for each.
I now get the error
no database selected
Err, waremock, the mysql_close() thing was not directed at you :P
I know, I have not messed around with any of that. I added the path to the settings file and all I get is no database connected. See for yourself.
The original installation is here http://geeksforchrist.com/smf
One of my other sites is here http://gfcmoms.com
Is there anything in the server error log? If there isn't, can you PM me your yshout/settings.php file?
help:
QuoteWarning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in /home/sirdel/public_html/forum/yshout/yshout.php on line 230
(http://img146.imageshack.us/img146/5070/asdqu1.png)
Turn off $gzipCompression in yshout/settings.php.
There are many pages in this thread, my eyes hurt already. I have not read them all, i did not find the answer I was looking for though. I need to disable the use of links in the shoutbox, how can I accomplish that? I appreciate any help.
Links? Hmm, it could be challenging, since parsing links is a basic feature of SMF (example: http://google.com). At best, I suppose, you could try to strip out <a> tags:
For each line which looks like censorText($var);
add after it
$var=preg_replace('/<\/?a [^>]*>/','',$var); // remove a tags (links)
I think this should remove all the links, but I have not tested it; use at your own risk.
Thanks for helping me to uses the same shoutbox on all my boards. It works great.
I'm having a similar problem to the one trekkie2444 was having a few days ago.
There was no problem with the first block of code (the big one on the first page of this topic). But, when I inserted the second (little) block, I got a syntax error. So, I did a search, pulled up the attachment designed to fix the syntax error he was getting, and swapped the the new code in. Pretty much the same thing happened. Took the big chunk fine. Gave me the following error on the small chunk.
Parse error: syntax error, unexpected T_ECHO in .../Themes/movies/index.template.php on line 663
It seemed to choke on the ' after the echo.
Attached is a copy of the index.template.php file in question -- minus the part that generated the error (so my forum will load).
The forum itself is here (http://quantum-sky.net/eclipsingbinary). I want to place the shoutbox down somewhere either just above or just below the Info Center. Please help.
(You might have guessed from my use of highly-technical terms like 'big chunk of code' that I'm not a coder, so please be gentle.)
Quote from: nneonneo on July 09, 2008, 06:40:43 PM
Links? Hmm, it could be challenging, since parsing links is a basic feature of SMF (example: http://google.com). At best, I suppose, you could try to strip out <a> tags:
For each line which looks like censorText($var);
add after it
$var=preg_replace('/<\/?a [^>]*>/','',$var); // remove a tags (links)
I think this should remove all the links, but I have not tested it; use at your own risk.
I did as instructed on yshout.php. The links still show up. Initially each line read
censorText($newText);
and I replaced ($newText) with $var and right below it I inserted the following;
$var=preg_replace('/<\/?a [^>]*>/','',$var); // remove a tags (links)
.
Just want to make sure that I didn't make any mistakes and opening up for any other suggestions.
@waremock: No problem :)
@Achillea: Attached (shoutbox is under the info center). I've taken the liberty of adding an info-center like block to it; if you don't like it, replace the block of code between "// YSHOUT HERE - shoutbox code" and "// YSHOUT END - shoutbox code" with
// 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
@a_fuegon: You should be doing the reverse; $var should be replaced with $newText (the variable may also be named $text, this depends on the version)
Quote@Achillea: Attached (shoutbox is under the info center).
I'm sorry, I'm having trouble finding the attachment. I don't see it at the bottom of your post.
I quite obviously fail :'(
Now it is attached...
Thanks for the quick replies! And I love the matching box. Does it need to be initialized or anything? Right now it's just an empty box that I can't seem to type in. (trying both Safari 3.1 and Sea Monkey 1.1.4).
(Yes, I always seem to have this kind of effect on software, unfortunately.)
Hmm, the mod doesn't seem to be installed! Have you installed the mod via the Package Manager?
The Package what?
*heading for the admin control panel ... *
Okay, I've found Package Manager. Only a little more headdesking to go ...
hmmm. shoutbox doesn't seem to be listed. How do I make it find the mod?
Did you download the package from this page (http://custom.simplemachines.org/mods/index.php?mod=585) and use "Download Package" in the Package Manager? Note: What you've put into the index.template.php is for 1.16. Attached is a version with modifications for 1.20, so pick whichever version you like best.
If you want to take a look at what they look like:
http://nneonneo.net46.net/smf - "SB_1.20"
http://nneonneo.net46.net/smf2 - "AdvSB_1.20"
1.16 versions look similar.
Oops. No, I'd just done the steps on the first post here.
Okay. Now Downloaded and installed with Package Manager (I liked the AdvSB_1.20). I got the eternal shoutbox loading thing, so I chmodded yshout/yshout.php to 755 (go me!). It's still doing the shoutbox loading, though. If you're not completely tired of holding my hand by now, is there something else I need to tweak?
some time it appears two
@Achillea: Since you are using 1.20, you need to use the index.template.php I posted here (http://www.simplemachines.org/community/index.php?topic=137508.msg1611445#msg1611445).
@assam_siddibapa: Under what circumstances does this happen? It's really strange that the second "duplicated" shoutbox has a default form style.
Do you have some steps I could use to reproduce the bug?
It works! Thank you!
Like it happens some times. Dont know exactly its the problem the on the shout box or the theme .
but when it happens the whole forum will be centered .
@assam_siddibapa: How often? If it is often enough, I might be able to go to your forum and observe the bug.
Yeah, me again. :)
Is there a way to configure the Shout Box so guests can access it? (I'd like them to be able to ask me questions and so forth).
Thank you for being so patient.
if i hae online for 5 hours a day it appears more than 5 times
can say on an average once in an hour
Membergroups -> Permissions (admin panel)
This thread is enormous! I was planning on reading through it all to see if my question has already been addressed, but there goes that idea... (http://img229.imageshack.us/img229/1669/ohnoesbe2.gif)
Is there a timer in any of the settings, that can clear messages after a certain amount of hours?
Thanks, nneonneo. Works perfectly now (other than one user who says it doesn't work on a browser called konquer, but that's no problem).
karyuu, I've been using the Search function to sift through and find out if anyone's had a similar question/issue.
@assam_siddibapa: OK, if you PM me a forum URL, I will take a look. I would also prefer if you could give me an account to test with.
@Karyuu: There is not such a timer, but it would not be hard to make one, I suppose.
@Achillea: Konqueror? I think I tested it with that browser, and didn't see any problems. Perhaps I could get a version number?
Thanks Achillea, I wasn't sure I could search through a single particular thread :] Good to know!
I'd absolutely love a timer of such nature, personally, although my modding experience is nowhere close enough to try this on my own. I'll just keep my eyes peeled and fingers crossed :)
Quote@Achillea: Konqueror? I think I tested it with that browser, and didn't see any problems. Perhaps I could get a version number?
Never mind, that was my bad. I hadn't set the permissions correctly.
Move topic Mod....quick question...probably a "duh" one, but do you make the custom edits before or after the install?
@melbinnc: Move topic mod? For this shoutbox mod, you can make the edits either before or after.
@Karyuu: For example, we could use .htaccess as a storage facility for the chat-clearing time.
We check the filemtime of the file every run, and if it's time to clear the shoutbox, we "touch" the file, updating the last clear time, then clear out the shoutbox.
An example implementation:
if(filemtime('chats/.htaccess') < time() - 3600) // one hour
{
global $chatPath, $historyPath;
$fileContents='';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$handle=fopen($chatPath, 'w');
fputs($handle,'');
fclose($handle);
if($historyPath !== '')
{
$handle=fopen($historyPath, 'a');
fputs($handle,$fileContents);
fclose($handle);
}
touch('chats/.htaccess');
}
Please note: I have not tested this, and it is also worth noting that it is a kind of hack to use .htaccess (this can be avoided by using a file specifically for this purpose; e.g. chats/cleartime and making sure it is writable)
Hi again... I've made sure my board is up to date (1.1.5) and uninstalled the old shoutbox before installing the Adv1.20. I am using a custom theme, so I cleared out the old shoutbox code chunks, and put in the new ones. I chmodded the appropriate files to 755 and solved the 500 server error that showed up when accessing /yshout/yshout.php , but now nothing shows up at all, on the board or on /yshout.php. I am at such a loss.
The applicable forum is http://www.theunforgivingblade.com/forum/
There's a guest account, login "TestAccount" pw "testaccount"
Thank you again for your time. Let me know if you need to see any of the code.
Uhh...something weird?
http://www.theunforgivingblade.com/forum/yshout/js/domFunction.js -- empty
http://www.theunforgivingblade.com/forum/yshout/js/yshout.js -- empty
http://www.theunforgivingblade.com/forum/?yshout -- should give the shoutbox (modification to index.php), but it does not
Whoah, what happened?! Looks like everything is 0 byte files, how bizarre! I reuploaded directly from the zip file, now we shall see what happens.
Well, it looks like the modification to index.php failed; perhaps the same is true of the modifications to the other files...
this page (http://custom.simplemachines.org/mods/index.php?attach=60060&smf_version=2.0_Beta_3.1_Public&mod=585&action=parse) lists the modifications you will have to do, probably by hand.
Ah, is that why it's not actually taking any messages? Okay, I'll check up on those modifications tonight. Thank you for your help.
Quote from: nneonneo on July 11, 2008, 03:33:15 PM
@assam_siddibapa: OK, if you PM me a forum URL, I will take a look. I would also prefer if you could give me an account to test with.
Ok ... test/test
say me if u need it with any permission
Alright! Got everything working.... except the shout-button has no value. There's no value specified in the resulting html code for whatever reason. I searched this topic, because I thought for sure that in the past someone would have had that problem, but nothing like it came up.
http://www.theunforgivingblade.com/forum/
Happend once more........ and this time the whole board enlarged.
screen shot attached
@sashafiero: Did you add the language files? Themes/default/languages/Modifications.<language>.php.
@assam_siddibapa: What browser are you using?
I modified the English file, but not the english utf8 one because for whatever reason, it didn't have the snippet of code to put your code under, and I didn't know where it should go.
I am using opera 9.51
@sashafiero: If the file is blank, don't worry about it unless you have english-utf8 actually installed.
By the way, the test account can't see the shoutbox. Can you fix this?
Okay, yeah, the english utf8 file is totally empty. But it was the modification to the ManagePermissions.php file that I couldn't find where to put the code. (Sorry, don't know why I said it was the english utf8 file before).
I can't figure out why that rank of member can't access it, I wonder if it has to do with that permissions file. Also, the Help link throws an error when I click it:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/sashaf/public_html/theunforgivingblade.com/forum/yshout/yshout.php on line 771
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/sashaf/public_html/theunforgivingblade.com/forum/yshout/yshout.php on line 771
Warning: Invalid argument supplied for foreach() in /home/sashaf/public_html/theunforgivingblade.com/forum/yshout/yshout.php on line 793
Looks like you have a "nneonneo (http://www.theunforgivingblade.com/forum/index.php?action=profile;u=32)" account on my board already.. I made it a full member just now. If you need me to reset the password to something I can PM you the new password here.
Hello,
I have installed AdvSB_1.20.zip on my forum.
I use 2.0 Beta 3.1 Public.
website: www.kaartenleggen.nl
Everything went well, but now i only see this message:
Fatal error: Call to undefined function allowedto() in /home/kaarten/public_html/yshout/yshout.php on line 69
Is there someone who knows what went wrong???
Thanks
Stef.
@Normally: Line 69 should read
if(!allowedTo('yshout_view'))
Note that it is allowedTo, with an uppercase T.
@sashafiero: Those errors would be the result of missing language files! What is going on?
Try putting the code in Modifications.english-utf8.php between
<?php
and
?>
tags.
Something else weird: when I go to http://www.theunforgivingblade.com/forum/yshout/, I get the shoutbox which immediately blanks itself. According to headers, it is apparently giving me a zero-byte response, rather than the proper initialization HTML. I don't quite understand what is happening...
This whats in:
if(!allowedTo('yshout_view'))
so i think thats not the problem.
Do you have another solution??
Well, it is saying that function "allowedto" (lowercase) is not defined; maybe do a case-sensitive search?
EDIT: Don't mind that comment. PHP is not case-sensitive for function names, so that's not the problem.
I don't know if this might affect anything: http://www.kaartenleggen.nl/SSI.php
"Notice: Use of undefined constant Sitemap - assumed 'Sitemap' in /home/kaarten/public_html/Sources/Subs.php on line 3824"
Quote from: nneonneo on July 12, 2008, 04:46:29 PM
I don't know if this might affect anything: http://www.kaartenleggen.nl/SSI.php
"Notice: Use of undefined constant Sitemap - assumed 'Sitemap' in /home/kaarten/public_html/Sources/Subs.php on line 3824"
The problem whas before i installed the shoutbox.
I installed the shoutbox in the upgraded forum
Look i just instaled it on www.areaefo.es/xteam/ but only i can see it =S
go into your admin > permissions area and set the permissions for your membergroups to allow them
What permission is the permission for the shoutbox ?
If you go ito the permissions area in admin and click on modify for regular members, then scroll down, you will see
View shoutbox
Post in shoutbox
Moderate shoutbox
with checkboxes for each one you want to enable. Repeat this for each of your membergroups.
Quote from: nneonneo on July 12, 2008, 03:49:39 PM
@sashafiero: Those errors would be the result of missing language files! What is going on?
Try putting the code in Modifications.english-utf8.php between
<?php
and
?>
tags.
Something else weird: when I go to http://www.theunforgivingblade.com/forum/yshout/, I get the shoutbox which immediately blanks itself. According to headers, it is apparently giving me a zero-byte response, rather than the proper initialization HTML. I don't quite understand what is happening...
I did as you said to the utf8 file and uploaded it both to my custom theme's language directory, and the language directory of the default theme.
If I visit the yshout by itself as you said, it works fine for me, for whatever reason!
I went over the ./Sources/ManagePermissions.php file again, as it says at the bottom of the manual install instructions (http://custom.simplemachines.org/mods/index.php?attach=60060&smf_version=2.0_Beta_3.1_Public&mod=585&action=parse) and the snippet it says to look for does not exist. I don't know where to put the required code safely.
@Normally: I have no idea :S It looks like the Security.php file is not being loaded for some reason...
@sashafiero: Try http://custom.simplemachines.org/mods/index.php?attach=60060&smf_version=1.1.5&mod=585&action=parse (sorry, I got your version wrong...)
Ah ha, that fixes everything right up! Now I just have to play with the style! :) But the help button works, the Shout button says "Shout!" and all is well.
Thank you again and again for your attentive help!
Quote from: nneonneo on July 12, 2008, 10:31:34 PM
@Normally: I have no idea :S It looks like the Security.php file is not being loaded for some reason...
I have given that file chmod 755 and now when i refresh the page for 3 second i see the shoutbox and than it going back to:
Fatal error: Call to undefined function allowedto() in /home/kaarten/public_html/yshout/yshout.php on line 69
Where is allowedto() defined???
Stef
allowedTo is defined in Subs/Security.php, which should be included by either index.php or SSI.php.
Quote from: nneonneo on July 13, 2008, 01:11:08 PM
allowedTo is defined in Subs/Security.php, which should be included by either index.php or SSI.php.
How it is included in index.php, because i can`t found it.
And the strange thing is, when i refresch the page, i see the shoutbox for about 3 seconds and than i get the fault again.
Fatal error: Call to undefined function allowedto() in /home/kaarten/public_html/yshout/yshout.php on line 69
Both index.php and SSI.php should have this line:
require_once($sourcedir . '/Security.php');
Quote from: nneonneo on July 13, 2008, 04:34:50 PM
Both index.php and SSI.php should have this line:
require_once($sourcedir . '/Security.php');
In Both are present.
Any other idea????
I also get this messages in the fault console from FF:
Fout: request is undefined
Bronbestand: http://www.kaartenleggen.nl/yshout/js/yshout.js?June102008
Regel: 133
Fout: objDiv is null
Bronbestand: http://www.kaartenleggen.nl/yshout/js/yshout.js?June102008
Regel: 147
ok, this might have already been posted but reading all 148 pages of this thread doesn't appeal to me. Is there any way to reverse the way the shoutbox shows up? Like so the shout input aria is on top and the shouts show up with the newest on top?
for reversing shoutbox:
http://www.simplemachines.org/community/index.php?topic=137508.msg1276450#msg1276450 (http://www.simplemachines.org/community/index.php?topic=137508.msg1276450#msg1276450).
no need to read all 148 pages.....that's why SMF invented the "search". :P
@Pleek: In version 1.20, see yshout/settings.php. In 1.16 and before, http://www.simplemachines.org/community/index.php?topic=137508.msg1276450#msg1276450
@Normally: The shoutbox should be loading SSI.php (require(dirname(__FILE__) . "/../SSI.php");) if it is not loaded from the index page. Did you make the modifications manually? If so, check to make sure that you put
if(isset($_GET['yshout']))
{
$yshout_from_index=true;
include_once('yshout/yshout.php');
exit;
}
BEFORE
// Get everything started up...
define('SMF', 1);
EDIT: Oops, I'm late. :P
Quote from: nneonneo on July 13, 2008, 05:05:31 PM
@Pleek: In version 1.20, see yshout/settings.php. In 1.16 and before, http://www.simplemachines.org/community/index.php?topic=137508.msg1276450#msg1276450
@Normally: The shoutbox should be loading SSI.php (require(dirname(__FILE__) . "/../SSI.php");) if it is not loaded from the index page. Did you make the modifications manually? If so, check to make sure that you put
if(isset($_GET['yshout']))
{
$yshout_from_index=true;
include_once('yshout/yshout.php');
exit;
}
BEFORE
// Get everything started up...
define('SMF', 1);
EDIT: Oops, I'm late. :P
That makes it work.
Thanks, thanks and thanks for the great help.
Hi all, sorry i'm new in this forum :) but i have one problem with this :/ ... when i install the shoutbox =S but all time says :
Warning: fopen(yshout/chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /home/a8100475/public_html/yshout/yshout.php on line 684
The version is
# AdvSB_1.20.zip
and my forum is
# 1.1.5
I need help please for this :) ...
Thanks
anyone can't help me? please
If you can use "chmod" on your FTP, try to chmod yshout/chats to 777, and yshout/chats/home.txt and yshout/chats/history.home.txt to 666.
Quote from: nneonneo on July 14, 2008, 01:49:58 PM
If you can use "chmod" on your FTP, try to chmod yshout/chats to 777, and yshout/chats/home.txt and yshout/chats/history.home.txt to 666.
sorry i'm noob in this u can help better? .... i have msn please,
[email protected]Thanks now work :D
In your FTP client, just use the CHMOD option on the items as described. 666 means READ+WRITE for USER, GROUP and OTHER. 777 means READ, WRITE, EXECUTE for USER, GROUP and OTHER.
Quote from: nneonneo on July 14, 2008, 03:17:17 PM
In your FTP client, just use the CHMOD option on the items as described. 666 means READ+WRITE for USER, GROUP and OTHER. 777 means READ, WRITE, EXECUTE for USER, GROUP and OTHER.
Thanks now works sorry :) but i need resize O_O when all write the shoutbox make big xD ... any idea for this?
No more :D fixed thanks for this shoutbox :P (Y) really nice work
AdvSB uses a two-line format. If you don't like it, you are welcome to use SB_1.20, which uses a one-line format for text, or you can use CSS to make the one-line format.
Quote from: nneonneo on July 14, 2008, 03:48:54 PM
AdvSB uses a two-line format. If you don't like it, you are welcome to use SB_1.20, which uses a one-line format for text, or you can use CSS to make the one-line format.
it's done man :D thanks for ur work (Y)
@assam_siddibapa: I saw your shoutbox-duplication bug today on my own server.
I think I know why it happens, so it is not hard to fix. I will modify the shoutbox in 1.21 to include a fix, but meanwhile, you can try this:
In index.template.php, replace
var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
by
window.onload=loadChat;
Everybody on my forum sees the shoutbox, but it says Nothing to Do with my friend =S
That's very unusual. Do you mean that everyone sees a working shoutbox except him? What browser is he using?
MSN
Wait, do you mean "MSN Explorer"?
installed the 1.20 shoutbox, couldnt install the advanced version 1.20 kept on getting errors when I save my template??
anywat got the regular shoutbox 1.20 installed, but everytime I chat there is a quick db error that appears and then disappears at the top of the chat box! it gets annoying.. I have been able to spot it, here it is:
Warning: ob_start(): output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter' in /home/xxxxxx/public_html/xxxxxx/yshout/yshout.php on line 743
any ideas??
In yshout/settings.php, turn of gzipCompression.
sorry but when I did that my shoutbox became weird?? it was stretched out height wise, and everytime you add new text it increases in size?!??!
scratch that... I did it again, made it false and re uploaded it, now its working?? weird.. but thanks..
Is there a way to please add an area, perhaps under the "Shout Box" header or off to one side, where the shoutbox rules can be displayed right there where people who can't be bothered to read the clearly-labeled Using the Shout Box forum can see them? With no deniability? Relying on common sense courtesy from my Guests does not seem to work reliably.
Sorry, it's my first banning, which is making me grumpy this morning.
thanks for the help, and i did search for it. About a thousand things came up. lol thanks a lot!
@Achillea: Sure. Under
<br /><b>',$txt['yshout_shoutbox'],'</b><br />
is probably a good place to put it.
If you are having problems with spamming, you can enable flood control in yshout/settings.js.
Ok so now that it works, it looks like it could use a few improvements. Is there a way to center it on my forum and create some kind of table around it to make it look like a certain block type format? Also what do I change in the settings.php or whatever to make my text visible on a black background?
CSS controls the style of the shoutbox. You can find a big <style> block in index.template.php for SB_1.xx, or in css/yshout.css for AdvSB_1.xx. There, you can set the font color and do all sorts of other things.
As for making it look like a block, this varies by theme. The easiest thing to do would be to copy the code off an existing block and just use that as a wrapper around the shoutbox code.
Hi, I used the 1.20 and everithing is ok.
But I add the mod for the smile, http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
and now I have this error:
Template Parse Error!
There was a problem loading the /Themes/default/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.
--------------------------------------------------------------------------------
Parse error: syntax error, unexpected '<' in .../Themes/default/index.template.php on line 441
432: }
433: // YSHOUT HERE - shoutbox code
434: global $txt,$context,$boarddir;
435: if(allowedTo('yshout_view'))
436: {
437: echo '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
438: echo '<div id="yshout">';
439: include_once($boarddir.'/yshout/yshout.php');
440: echo '</div>';
441: <div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>442: }
443: elseif($context['user']['is_guest'])
444: echo $txt['yshout_no_guests'];
445: // YSHOUT END - shoutbox code
Can you help me?
You need to put the code BEFORE the ';. Also, it all ended up on one line, which may make it not work, so you have to make sure it all gets correctly added. The block (starting at line 433) should appear as
// 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><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
So I accdentally banned myself on my forums (i'm the only administrator) shoutbox...lol any way to unban myself? :(
I can't find any CSS info for my shoutbox. In the YSHOUT directory there isn't a css file.
@Smite: yshout/_banlist.php; just remove your entry.
@trekkie2444: Themes/<theme>/css/yshout.css
@smite
Open banlist.php in your yshout folder and remove your IP address.
@trekkie2444
Quote from: nneonneo on July 15, 2008, 06:08:48 PM
...You can find a big <style> block in index.template.php for SB_1.xx, or in css/yshout.css for AdvSB_1.xx....
The CSS is either directly in your index.template.php or in {default theme}/css/yshout.css depending on which version of the shoutbox you are using, as stated by nneonneo. In either case, the CSS in
not located in the yshout folder.
EDIT: you beat me to it nneonneo. :D
It's only in the default theme? The other themes don't have a css folder in them.
Hi, thanks nneonneo.
Now I have another problem, the smile doesn't work.
It give me this error " error visualitation page" then I clic on and open a window with this errore "collapse1" isn't definition.
Maybe because I changed the code of my smile?
Maybe I wrong with this code:
5. Open yshout.php for namely some input.
find and replace (up to 4 times)
*
Code: [Select]
id="shout-form"
with
*
Code: [Select]
id="shout-form" name="shout_form"
find and replace (up to 4 times)
*
Code: [Select]
id="shout-text"
with
*
Code: [Select]
id="shout-text" name="shout_text"
That's it.
Infact I can't understand "(up to 4 times)" what means this? :)
@allymcbeal: Post index.template.php; I suspect the code has all ended up on one line again...
@trekkie2444: Try index.template.php. If index.template.php has the line
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/yshout.css?July022008" />
then you should copy Themes/default/css/yshout.css to Themes/yourtheme/css/yshout.css.
Otherwise, it should have a big CSS block with #yshout somewhere. If not, well, the modifications aren't complete...
Ok thanks nneonneo
<?php
// Version: 1.1.5; 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'] = true;
/* 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" />';
// YSHOUT HERE - <head> code
global $boardurl,$shoutFile;
$shoutFile='home';
$scripturlparsed = parse_url($scripturl);
$scriptpath=isset($scripturlparsed['path'])?$scripturlparsed['path']:'/';
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 src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script>
<script type="text/javascript">
var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var shoutFile="',$shoutFile,'";
var yshout_php="',$scriptpath,'?yshout";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?June102008" 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 */
color: #000000;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #000000;
}
#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 {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
// YSHOUT HERE - <head> code
global $boardurl,$shoutFile;
$shoutFile='home';
$scripturlparsed = parse_url($scripturl);
$scriptpath=isset($scripturlparsed['path'])?$scripturlparsed['path']:'/';
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 src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script>
<script type="text/javascript">
var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var shoutFile="',$shoutFile,'";
var yshout_php="',$scriptpath,'?yshout";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?June102008" 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 */
color: #000000;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #000000;
}
#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 {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
// YSHOUT HERE - <head> code
global $boardurl,$shoutFile;
$shoutFile='home';
$scripturlparsed = parse_url($scripturl);
$scriptpath=isset($scripturlparsed['path'])?$scripturlparsed['path']:'/';
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 src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script>
<script type="text/javascript">
var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var shoutFile="',$shoutFile,'";
var yshout_php="',$scriptpath,'?yshout";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?June102008" 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 */
color: #000000;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #000000;
}
#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 {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// 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>
<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script>
</head>
<body>';
echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">';
if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';
echo '
</td>
<td align="right" class="catbg">
<img src="', $settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>';
// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';
if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>';
// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' , $context['current_time'], '</span>';
// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';
if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';
echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];
// 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'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $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'];
// 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 />';
}
echo ' </span>';
}
// 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'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
// 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>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';
echo '
<table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
</td>';
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<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>
</table>
</div>';
// Show the menu here, according to the menu sub template.
template_menu();
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}
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="', !$context['right_to_left'] ? 'right' : 'left', '">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="', $settings['images_url'], '/powered-mysql.gif" alt="', $txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="', $settings['images_url'], '/powered-php.gif" alt="', $txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
', theme_copyright(), '
</td>
<td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'left' : 'right', '">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="', $settings['images_url'], '/valid-xhtml10.gif" alt="', $txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="', $settings['images_url'], '/valid-css.gif" alt="', $txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></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>';
// 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>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';
// 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['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 ' > ';
}
echo '</div>';
}
// 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 cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' , $first , '"> </td>';
// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
</td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'admin' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>
</td>' , $current_action == 'admin' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
</td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'login' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
</td>' , $current_action == 'login' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'logout' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
</td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// The end of tab section.
echo '
<td class="maintab_' , $last , '"> </td>
</tr>
</table>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
One potential issue is that you have the <head> code three times; once is sufficient, and extra copies could potentially cause problems.
The main problem, though, is that all the code ended up on a single line:
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys();...
Try redoing the modifications, or another text editor if yours will not properly handle the linebreaks.
If you are unable to make it work, you can *try* to fix it by removing this code:
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
That will at least ensure that collapse1 gets defined, but it would still be best to have the code on multiple lines.
Quote from: nneonneo on July 15, 2008, 03:34:00 PM
@Achillea: Sure. Under
<br /><b>',$txt['yshout_shoutbox'],'</b><br />
is probably a good place to put it.
I'm having some trouble locating that. Is it in yshout/yshout.php?
Hi, maybe you can help me fix this?
Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter' in /hsphere/local/home/(username)/(link to site)/forums/yshout/yshout.php on line 743
I have hidden the user name and site link to prevent hacking.
@Achillea: It's in index.template.php
@Encore127: Turn $gzipCompression off in yshout/settings.php
Hi, I fixed the triple code.
Now I can see the smile like a slide, but I cant use it.
It give me this error
"documents.forms.shout_form.shout_text" is null or it isn't an object.
If you want to see my forum
www.allymcbeal.it/smf1
EDIT:
SORRY YOU HAVE TO BE LOGGET TO SEE SHOUTBOX.
How can I modify this for show you the shoutbox without you have to register.
Hi!
I installed the shout box. seems like it was installed correctly, but i cant shout.
check here please
http://www.ptsubs.com/index.php
I click "shout!" and it does nothing
I have tried in previous versions, advanced and standard shourbox.
in firefox and in internet explorer.
It just wont shout :(
@allymcbeal: That error is because you have not performed the modifications to yshout.php. You have to add the name="shout_text" and name="shout_form", as described, in order for it to work.
To allow guests to see it, edit the permissions under Admin->Membergroups->Permissions.
Quote@Achillea: It's in index.template.php
*headslaps self* duh. Where the rest of the where's-the-box-and-what-should-it-do code is. Thanks! *slinks off to the correct file*
nneonneo I thank you!! Now it works!!! sorry for the trouble.
But now I have another question.
If people write much the template enlarge it self and there is not alignment.
And a last question I usually use theme orange-lt, and with this theme I can't see the shoutbox.
<?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.5';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
$settings['use_image_buttons'] = true;
/* 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, $forum_version, $language, $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>
<script type="text/javascript" language="JavaScript" src="',$boardurl,'/mymod/animatedcollapse.js"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?rc1"></script>
<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" />';
// YSHOUT HERE - <head> code global $boardurl,$shoutFile; $shoutFile='home'; $scripturlparsed = parse_url($scripturl); $scriptpath=isset($scripturlparsed['path'])?$scripturlparsed['path']:'/'; 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 src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script> <script type="text/javascript"> var myfunc = new domFunction(function() { loadChat(); }, { "yshout":"id"}); var shoutFile="',$shoutFile,'"; var yshout_php="',$scriptpath,'?yshout"; </script> <script src="',$boardurl,'/yshout/js/yshout.js?June102008" 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 */ color: #000000; } #yshout .shout { /* one shout */ margin: 0 0 0; /* Top Bottom Linespacing */ line-height: 1; } #yshout .shout-timestamp { font-style: normal; font-weight: normal; color: #000000; } #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 { color: #666666; width: 70px; margin-right: 5px; } #yshout #shout-text { color: #000000; width: 310px; margin-right: 5px; } #yshout #shout-button { width: 55px; } #yshout .shout-invalid { /* invalid shout (shout textbox) */ background: #FFFDD1; } </style>'; // YSHOUT END - <head> code
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// 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>
<!-- nCode Image Resizer -->
<script type="text/javascript" src="', $settings['theme_url'], '/ncode_imageresizer.js"></script>
<style type="text/css">
<!--
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}
table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
-->
</style>';
// What is the mode?
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode = 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode = 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode = 'newwindow';
else
$mode = 'none';
}
else
$mode = 'none';
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "', $settings['images_url'], '";
NcodeImageResizer.MODE = "', $mode, '";
NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>
</head>
<body id="page_bg">
<div class="wrapper">
<div id="header-l">
<div id="header-r">
<div id="header">';
if (empty($settings['header_logo']))
echo '
<div id="logo-bg"><a href="'.$scripturl.'" title="">', $context['forum_name'], '</a></div>';
if (!empty($settings['header_logo']))
echo '<div id="logo"><a href="'.$scripturl.'" title=""></a></div>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news'])) {
echo '<div id="news">', $context['random_news_line'] , '</div>';
}
echo '
</div>
</div>
</div>
<div id="shadow-l">
<div id="shadow-r">
<div id="mainbody">
<div id="toolbar">
<div id="nav">
',template_menu(),'
</div>
</div>
<div id="showcase">
' , showcase(), '
</div>';
if ($context['user']['is_admin'])
{
if (empty($settings['theme_version_attention']))
{
if ($forum_version != 'SMF 1.1.5')
echo '
<div style="margin: 0 2px 2px 2px; padding: 2px; border: 2px dashed #cc3344; color: black; background-color: #ffb76f;">
<div style="width: 2ex; font-size: 2em; color: red;">!!</div>
<b style="text-decoration: underline;">Attention of orange-lt theme:</b><br />
<div style="padding-left: 6ex;">
This theme doesn\'t correspond to the version of SMF that you are using. <u>This theme is made for SMF 1.1.5</u>.<br />
<u>If you want to use it anyway (on your own risk!)</u> you can disable this message in the admin panel:<br />
admin- configuration - current theme (above the save button)
</div>
</div>';
}
if (empty($txt['necessary_to_translate']))
echo '
<div style="margin: 0 2px 2px 2px; padding: 2px; border: 2px dashed #cc3344; color: black; background-color: #ffb76f;">
<div style="width: 2ex; font-size: 2em; color: red;">!!</div>
<b style="text-decoration: underline;">Attention of orange-lt theme:</b><br />
<div style="padding-left: 6ex;">
You have to create "<b>Modifications.<span style="color: red;"><acronym title="Name of language that you are using">' , $language , '</acronym></span>.php</b>" in the "<b>languages</b>" directory ( <i>', $settings['theme_url'], '/languages/</i> ) of your orange-lt theme.<br /><br />
Duplicate the "<i>Modifications.english.php</i>" of the "languages" directory of orange-lt. Next, rename it according to the language for which you use the file.
</div>
</div>';
}
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
</div>
</div>
</div>
</div>
<div class="wrapper">
<div id="footer-l">
<div id="footer-r">
<div id="footer">
' ,theme_copyright(),'
</div>
</div>
</div>
<div id="footer2">
Theme orange-lt created by <a href="http://padexx.de">panic</a>
</div>
</div>';
// 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>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<span class="pathway">';
// 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'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="pathway">' . $tree['name'] . '</a>' : $tree['name'] , '<img src="'.$settings['images_url'].'/arrow.png" style="margin: 0 12px 0 12px" alt="" />';
else
echo $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
}
echo '</span>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul>';
// If link set in admin interface show extra [home] button .
if (!empty($settings['pdx_forum_button']))
echo '<li><a href="', $settings['pdx_forum_button'], '">' , $txt[103] , '</a></li>';
if (!empty($settings['pdx_forum_button']))
{
// Show the extra [forum] button.
echo '<li><a href="', $scripturl, '">' , $txt['pdx_forum_button_forum'] , '</a></li>';
}
else
{
// Show the default [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
}
// Show the [help] button.
echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
function showcase()
{
global $settings, $buttons, $context, $txt, $scripturl;
// personal info etc.
echo '
<div class="userinfo">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
{
$context['user']['avatar']['image'] = strtr($context['user']['avatar']['image'], array("class=\"avatar\"" => "class=\"avatar_t\""));
echo '<div style="margin-top: 15px; float: left;">', $context['user']['avatar']['image'], '</div>';
}
else
echo '<div style="margin-top: 15px; float: left;"><a href="' . $scripturl . '?action=profile;u=', $context['user']['id'], ';sa=forumProfile"><img src="' . $settings['images_url'] . '/noavatar.png" alt="missing avatar" alt="" width="65px" height="65px" /></a></div>';
echo '<div class="profile_info"><h3>', $txt['hello_member_ndt'], ' <b>', $context['user']['name'], '</b></h3>';
echo '<div id="useropts"><ul>';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a> ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>', $txt[616], '</b></li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '<li>
', $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'], '</li>';
}
echo '<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
</ul>
</div>';
}
// t - this time ask them to either register or login - lazy bums...
else
{
echo '
', $txt['welcome_guest'], '
<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'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" style="margin-bottom: 4px;" size="10" />
<input type="password" name="passwrd" style="margin-bottom: 4px;" size="10" /><br />
<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>
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />';
}
if ($context['user']['is_logged']) {
echo ' </div>';
}
// 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><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>'; require('mymod/smiley.php'); loadSmileys(); echo ' <div id="smiley_pic">'; printSmileys('shout_form','shout_text'); echo ' </div> <script type="text/javascript"> //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] ) var collapse1=new animatedcollapse("smiley_pic", 1000, false) </script> </div>'; } elseif($context['user']['is_guest']) echo $txt['yshout_no_guests']; // YSHOUT END - shoutbox code
echo ' </div>';
echo '
<div class="searchfield">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 4px 0;">
<input type="text" name="search" value="" size="30" style="margin-bottom: 4px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="margin-bottom: 4px;" /><br />
<a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
<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><br />
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '- ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span> -
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b><br /><br />', $context['current_time'],'
</div>
<div class="clr"></div>
';
}
?>
Quote from: bitmovel on July 16, 2008, 06:11:17 PM
Hi!
I installed the shout box. seems like it was installed correctly, but i cant shout.
check here please
http://www.ptsubs.com/index.php
I click "shout!" and it does nothing
I have tried in previous versions, advanced and standard shourbox.
in firefox and in internet explorer.
It just wont shout :(
@nneonneo
could you check this please :)
Ok I got it centered and I fixed the text problem, but it looks really messy now. Is there a way I can keep the shoutbox centered on the page, but still have the shouts be aligned to the left so that it doesn't look so awkward when messages are longer?
Hey Nneo,
I installed the modification, then uninstalled it. And then now theres two of the shoutboxes.
Shout Box
[Today at 01:22:46 PM] del ban Avery: Peter Shon is on ICS at the moment.
Shout Box
...loading shoutbox...
The other one was from the old installation but it's still there?
hey...having some trouble with non-admins being able to c the shoutbox...cant find the permission thing in the admin control... http://redemption.net63.net/forums_test/index.php
@allymcbeal: You need to follow the manual install instructions for themes other than the default; see the main mod page.
EDIT: OK, so you made the modifications, but the shoutbox code all landed on the same line (again). What are you using to edit PHP? If it is Notepad, I strongly suggest you use something which correctly handles line breaks, like Notepad2 or Notepad++.
@bitmovel: The yshout/js folder doesn't seem to exist! http://www.ptsubs.com/yshout/js/yshout.js gives 404 (as with all the other JS files)
@trekkie2444: I don't quite follow. You want the shouts centered, yet left-aligned? Do you possibly mean some sort of left-margin?
@Avery: Remove the "shoutbox code" from Themes/<theme>/index.template.php (probably from the default theme)
@hexid: Admin -> Membergroups -> Permissions
EDIT: Something is wrong with Themes/default/languages/Modifications.english.php (or Themes/<yourtheme>/languages/Modifications.english.php if it exists); the shoutbox text strings aren't installed. You'll probably see some blank spots in the permissions because of that.
Hello,
i have added the scrollbar, but i have the lastinput on top.
What do i have to change in code to make the scrollbar on top and not at the bottom?
Thanks
Stef.
thx so much man...the guild's been waiting for this for a while and i was the only one who could see it...had to copy
// ---- 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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote><div>
<user>: 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' => ' <message>: 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.';
// ---- End modification - nneonneo's Shoutbox ----
// ---- 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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote><div>
<user>: 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' => ' <message>: 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.';
// ---- End modification - nneonneo's Shoutbox ----
?>
from /forums/Themes/default/languages/Modifications.english.php to
forums/Themes/wowdk_115v1/languages/Modifications.english.php
No, I want the shoutbox itself centered on the page, but I don't want the shouts to be. In a sense I want the entire module to be centered, but not the text inside.
@Normally: yshout/settings.php in 1.20 has a setting for that.
@trekkie2444: I'm still not sure I follow :-\
Which of the following accelerators would you guys recommend to use with nneoneeo's Shoutbox?
* APC
* eAccelerator
* Turck MMCache
* Memcached
* Zend Platform/Performance Suite (Not Zend Optimizer)
I had this working great in SMF 1.1.4, but I just updgraded to 1.1.5. Now the autoscroll isn't working. If I scroll down and stay on that page and shout, the scroll seems to be working and stays down there, but if I go to another page to read a new post, it goes right back up to the top.
For some reason when I first installed it on 1.1.5, the yshout div was re-writing the entire forum into that div, so I had to rename the div from yshout to yshoutM. I think I found all the places it was referenced, because all the functionality is working, except for the scrolling. I can't see anything in the autoscroll code that is wrong.
Any help?
Quote from: JayRoe on July 19, 2008, 06:53:53 AM
Which of the following accelerators would you guys recommend to use with nneoneeo's Shoutbox?
* APC
* eAccelerator
* Turck MMCache
* Memcached
* Zend Platform/Performance Suite (Not Zend Optimizer)
Some time ago I used eAccelerator, it works great ;)
@MissRancher: It's really not a good idea to rename the div, since that could cause problems...I don't understand why it would load the whole forum, unless the index.php modifications were wrong (for 1.20) or you were using SB_1.16 or earlier with certain forum setups. Anyway, a forum URL (and preferably an account too) would make this easier to debug (<3 Firebug)
Hmmm...not sure how to explain. I want the module of my shoutbox to be in the center of my forum (the tabled area that it fits in), but when I change the div to be aligned to the center, my text is aligned to the center as well. I want the shoutbox to be in the center itself, but the text not to be centered. Take for example the old SMF shoutbox, how it centered itself on the forum, but the shouts were aligned to the left.
OK, I think I understand.
What you can do is apply the centering as you did before, but then add
align:left;
to the #shouts CSS block, which will override the parent center alignment.
just install on 115 and im getting this in the soutbox
Fatal error: Call to undefined function allowedto() in C:\****\htdocs\dev\yshout\yshout.php on line 69
@wdm2005: See this: http://www.simplemachines.org/community/index.php?topic=137508.msg1614338#msg1614338
yes thanks i installed manualy and put the edit after the searched insted of befor thanks
QuoteQuote from: sashafiero on July 11, 2008, 07:44:10 PM
The applicable forum is http://www.theunforgivingblade.com/forum/
There's a guest account, login "TestAccount" pw "testaccount"
Thank you again for your time. Let me know if you need to see any of the code.
I return. :(
I had been using an older version of Gallery (http://custom.simplemachines.org/mods/index.php?mod=473) and realized it wasn't working, so I fixed it... and now my shoutbox just says "Loading Shoutbox..." and yshout/yshout.php just says "Nothing to do."
I tried searching this topic for other people having these phrases come up, but that was no help.
Edit: NEVER MIND! I got it fixed! :)
grr now i cat get the scroll bar working :(
i added this to yshout.css
yshout #shouts {
overflow: auto;
width: 165px; /* the width you want to display */
height: 200px; /* the height you want to display */
}
but doesnt make any diff
I have an off-the-wall question about the shoutbox. I check my site regularly from my phone (at work ;D) and was wondering if there was a way to have the shoutbox display (in WAP I guess). Please forgive me if this is a stupid question, and it's not a must-have edit. I was just wondering if it could be done because it would make it easier for me to communicate with other members via the shoutbox as opposed to PMs and such.
Alright, I don't see a #shouts, so here's my CSS for the yshout in my index.template (my style.css doesn't have anything):
<style type="text/css">
#yshout {
font-size: 12px; }
#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: #ffffff;
}
#yshout .adminlink {
font-size: 6pt;
color: #141414;
}
#forum-name, #shout-text, #shout-button {
font-size: 12px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #ffffff;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
</style>';
// YSHOUT END
OK, how do I unban a member from the shoutbox?
Open _banlist.php and remove their IP address from the list.
Dear nneonneo :
I recently got your shoutbox for SMF, I have SMF 1.1.5 and am not being able to make it show up on my other themes .. I followed instructions but still, if it's no trouble can you do it for me just this once and then tell me where exactly to put the CODE that makes it show on bord index @ default location ? Plz it's urgent .. I wanna launch my site very soon .. 10x
P.S : I'll admin you on my site if you want ...
Really Appreciated :P
Quote from: Normally on July 18, 2008, 06:00:03 PM
Hello,
i have added the scrollbar, but i have the lastinput on top.
What do i have to change in code to make the scrollbar on top and not at the bottom?
Thanks
Stef.
I have this problem as well. I reversed the shouts to display at the top. The shout form is at the top, but the scrollbar starts at the bottom.
You can see it here :- http://www.johncarpenterforum.com/snake/index.php
Any help would be appreciated.
Oh, I have the Advanced version
EDIT: I seem to have solved the problem. I don't know if it is going to cause any other problems, but if you go into yshout.js and find
function setupChat() {
divScroll = new chatscroll.Pane('shouts');
objDiv = document.getElementById('shouts');
objDiv.scrollTop = objDiv.scrollHeight;
if(!$("forum-name")) // do NOT refresh if the form didn't show up.
return;
startRefresh();
if($("forum-name").disabled) guest=false;
else guest=true;
}
and replace with
function setupChat() {
divScroll = new chatscroll.Pane('shouts');
objDiv = document.getElementById('shouts');
objDiv.scrollTop = 0;
if(!$("forum-name")) // do NOT refresh if the form didn't show up.
return;
startRefresh();
if($("forum-name").disabled) guest=false;
else guest=true;
}
Seems to work.
Quote from: SunKing on July 20, 2008, 11:29:01 AM
Open _banlist.php and remove their IP address from the list.
Not working. The shoutbox banlist seems to have a different ban than regular members.
Quote from: theglobe on July 20, 2008, 11:24:42 PM
Quote from: SunKing on July 20, 2008, 11:29:01 AM
Open _banlist.php and remove their IP address from the list.
Not working. The shoutbox banlist seems to have a different ban than regular members.
I just logged in under my test account and posted in the shoutbox. I then logged back in as admin and banned my test account. Then I opened _banlist.php and removed the entry (in red):
$ban_names_readpost = array (
0 => 'TestAccount',
);
This unbanned TestAccount from the shoutbox and I was again able to post to the shoutbox when logged in as this user.
EDIT: I just realized I had posted "IP Address" when actually it is username. But I am sure you figured that out already. :P
Thanks nneonneo my shoutbox works with other theme.
How can I do a board around it? Because it is white and also my theme is white so I need to put around a line to define the shoutbox, can you help me please?
If you want you can watch my shoutbox www.allymcbeal.it/smf1
Grr, something is eating my topic notifies :(
@wdm2005: You might need to decrease the height: field to make it work, or try index.template.php.
@SunKing: In WAP? One thing to try might be the /yshout/ shoutbox. WAP doesn't work with AJAX, though, but it should be a matter of hacking the form to submit correctly :P
@trekkie2444: Add it, then:
#yshout #shouts { /* main shouts area */
}
@PsyChoses: Replied via e-mail
@allymcbeal: Something like
<div class="tborder" style="margin-top: 1ex;">
<div class="catbg" style="padding: 5px 5px 5px 10px;">
Shoutbox
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
!!SHOUTBOX CODE HERE!!
</table>
</div>
should make it look like one of the categories.
If you just want a simple line around it, you can simply use style="border: 1px white;" or a similar declaration in the yshout div.
How do I install this, when I drag it to my FTP where do I drag it too? o.o I read the description you wrote but it doesn't really tell how to install it.
How can I center my shoutbox? Right now it is all the way to the left.
My forum link, http://gamingchatforums.freehostia.com/. (Guests can see the shoutbox.)
Also could it be possible for when someone does the /clear command instead of it just clearing all shouts, could it say after, " * <user> has just cleared the shoutbox"?
@r0flded: Package Manager -- just upload SB_1.20.zip or AdvSB_1.20.zip using Admin -> Packages -> Download Package.
@angrybanana5000: I see you managed to center it. For automatically writing a message on /clear, in yshout/yshout.php, add this code above
return true;
case "/return": // I'm done reading
(i.e. right above the return line in /clear)
processUserCommand('/me has just cleared the shoutbox');
i got ....loading shoutbox... and keep loading for more than 2 hours ! i refresh the page and also asked frineds to try ! but keep .. loading and nothing ! can ya help pls ! thanks :)
Try 1.20, if you haven't already...
Quote from: nneonneo on July 21, 2008, 12:09:25 PM
@allymcbeal: Something like
<div class="tborder" style="margin-top: 1ex;">
<div class="catbg" style="padding: 5px 5px 5px 10px;">
Shoutbox
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
!!SHOUTBOX CODE HERE!!
</table>
</div>
should make it look like one of the categories.
If you just want a simple line around it, you can simply use style="border: 1px white;" or a similar declaration in the yshout div.
Thanks for the reply, I can't understand where I have to write this code, in index.template.php? Sorry... :(
Great work nneon , i have one question for you:
i have your yshout 1.2 with scrollbar and reverse mod for view the messages beginning from last so i want ask you one thing, with this method when somebody write one new message the windo scroll automatically at the end of messages and showing me the first messages i want the when somebody write new message the window show me the last messages.
Is possible do this?
you can enter in forum for try what i means.
login:test
pass: test
http://ediboard.altervista.org/index.php
thx for help
Yes, in index.template.php.
ok, omz i have tried using the search and im getting nothing. I know this has been posted here b4 but i don't know were and nothing i put in the search box is working. Were do i change how many shouts show up? I have added the scroll bar but its useless unless more shouts are displayed. How do i change how many shouts are shown?
1.1x: $max_lines in yshout/yshout.php
1.20: $maxLines in yshout/settings.php
Thanks nneonneo, that did the trick. :)
@edi67: One way is simply to disable autoscroll (I think I will make this an option in the next AdvSB).
Comment out
divScroll = new chatscroll.Pane('shouts');
objDiv = document.getElementById('shouts');
objDiv.scrollTop = objDiv.scrollHeight;
from yshout/js/yshout.js.
Could anyone help me, I am trying to get the shoutbox to go in the news box. I followed the directions perfectly but I can't get the shoutbox to show up. :-[ All that shows in the news box is, ',$txt['yshout_loading'],'
Any help? Thanks. :D
Is the shoutbox still showing up elsewhere?
Quote from: nneonneo on July 22, 2008, 04:36:28 PM
Is the shoutbox still showing up elsewhere?
Only if I have the
'; // Show the shoutbox! shoutbox(); echo '
code
Right. So, if you remove the shoutbox from index.template.php, then add <div id="yshout"></div> to the news header, it doesn't work? Note that only one shoutbox can be active per page, so if you have it in two places (news and somewhere else on the page) only one will load.
Quote from: nneonneo on July 22, 2008, 04:40:55 PM
Right. So, if you remove the shoutbox from index.template.php, then add <div id="yshout"></div> to the news header, it doesn't work? Note that only one shoutbox can be active per page, so if you have it in two places (news and somewhere else on the page) only one will load.
Yes it does not work. I have added my index.template.php if you can edit it to work. Thanks. :)
You need to add the <head> code in order for the news box shoutbox to work (note that the regular shoutbox wouldn't have worked correctly without that code; it would not have been interactive)
Quote from: nneonneo on July 22, 2008, 07:55:00 PM
You need to add the <head> code in order for the news box shoutbox to work (note that the regular shoutbox wouldn't have worked correctly without that code; it would not have been interactive)
Where do I add the <head>?
Quote from: angrybanana5000 on July 22, 2008, 08:22:09 PM
Quote from: nneonneo on July 22, 2008, 07:55:00 PM
You need to add the <head> code in order for the news box shoutbox to work (note that the regular shoutbox wouldn't have worked correctly without that code; it would not have been interactive)
Where do I add the <head>?
The file you are needing to edit is the
index.template.php file. It can be found in
%root%/%smf_root%/Themes/*theme*/index.template.phpWith *theme* as the name of your theme. If that file doesn't exist in your theme, then edit the default theme's index.template.php.
Quote from: CTwiz on July 22, 2008, 08:28:25 PM
Quote from: angrybanana5000 on July 22, 2008, 08:22:09 PM
Quote from: nneonneo on July 22, 2008, 07:55:00 PM
You need to add the <head> code in order for the news box shoutbox to work (note that the regular shoutbox wouldn't have worked correctly without that code; it would not have been interactive)
Where do I add the <head>?
The file you are needing to edit is the index.template.php file. It can be found in
%root%/%smf_root%/Themes/*theme*/index.template.php
With *theme* as the name of your theme. If that file doesn't exist in your theme, then edit the default theme's index.template.php.
I knew that, I meant where in the file?
Quote from: angrybanana5000 on July 22, 2008, 08:34:28 PM
Quote from: CTwiz on July 22, 2008, 08:28:25 PM
Quote from: angrybanana5000 on July 22, 2008, 08:22:09 PM
Quote from: nneonneo on July 22, 2008, 07:55:00 PM
You need to add the <head> code in order for the news box shoutbox to work (note that the regular shoutbox wouldn't have worked correctly without that code; it would not have been interactive)
Where do I add the <head>?
The file you are needing to edit is the index.template.php file. It can be found in
%root%/%smf_root%/Themes/*theme*/index.template.php
With *theme* as the name of your theme. If that file doesn't exist in your theme, then edit the default theme's index.template.php.
I knew that, I meant where in the file?
... where the <head> tag starts. xD
Typically, the <head> and </head> go between the <html> and <body> tags. ;D
I don't have any <html> or <body> tags? :o
Quote from: http://custom.simplemachines.org/mods/index.php?mod=585#post_otherthemes
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']:'/';
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 src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script>
<script type="text/javascript">
var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var shoutFile="',$shoutFile,'";
var yshout_php="',$scriptpath,'?yshout";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?June102008" 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 */
color: #000000;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #000000;
}
#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 {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
Quote from: nneonneo on July 22, 2008, 09:26:26 PM
Quote from: http://custom.simplemachines.org/mods/index.php?mod=585#post_otherthemes
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']:'/';
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 src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script>
<script type="text/javascript">
var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var shoutFile="',$shoutFile,'";
var yshout_php="',$scriptpath,'?yshout";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?June102008" 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 */
color: #000000;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #000000;
}
#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 {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
I have that now, but it does not load still.
OK, let's see your forum.
Works for me....
July 22, 2008, 08:34:58 PM
* angrybanana5000 has just cleared the shoutbox
Today at 04:12:36 AM
JustTestingSB: test
:P
Quote from: SunKing on July 22, 2008, 09:43:09 PM
Works for me....
July 22, 2008, 08:34:58 PM
* angrybanana5000 has just cleared the shoutbox
Today at 04:12:36 AM
JustTestingSB: test
:P
I can not see it though. :|
Thanks for the help anyways though. :)
Quote from: nneonneo on July 22, 2008, 02:30:16 PM
@edi67: One way is simply to disable autoscroll (I think I will make this an option in the next AdvSB).
Comment out
divScroll = new chatscroll.Pane('shouts');
objDiv = document.getElementById('shouts');
objDiv.scrollTop = objDiv.scrollHeight;
from yshout/js/yshout.js.
how disable it nneon ?
Still no effect on my shoutbox. Everything is still centered.
Hello guys :)
I'm testing new smf 2.0 with sunset 2.0 theme localy. I have installed latest adv1.20 shoutbox and it works ok on default theme, but I can't make it work on sunset. I don't know where to put each peace of code to make it work ::) Guess I only need to modify sunset's index.template.php ???
@trekkie and @Zwerko
attach your index.template.php and I will see if I can fix them for you. :D
(Zwerko, obviously, it needs to be the index.template.php of your Sunset theme)
I already attached my index.template. Twice.
lol...
Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in /home/sirdel/public_html/forum/yshout/yshout.php on line 230
@Nequil: Turn off $gzipCompression in yshout/settings.php
Hi is a pleasure to join such a forum....i don't know if I am posting on the right place, sorry if I am....
I have a huge problem , and i wish you guys could help me...My friends forum, I'm an adm. there we had a problem w/ the shoutbox it said .........loading shoutbox......that at was after he erased some codes of some kind..Well we Uninstalled the shoutbox , and it was still visible , we reg. on your site and found a post that we thought was helpful it said to search for the // yshout in the code and delete it something like that so we went over the codes and didn't find anything...so he installed the default theme and installed the shoutbox but we dont know what else we have to do ...before we had a webmaster but appearantly he has no internet where he lives so theres no way he could help us ......I went over the installing manually procedure for the shoutbox and thought i had everything right but then when i hit save i got this error:
The file you tried to save generated the Parser error:
Parser error: syntax error, unexpected `<` in index.template.php on line 116
If you guys could help us i would really appreciate it...Thanx!!
ok works.
I need help with this:
1. I want insert <br> on the reds lines to separate parts of shoutbox.
where and how i can do this ?
before modification:
(http://img253.imageshack.us/img253/6585/asdft4.png)
after modification:
(http://img74.imageshack.us/img74/8250/asd1qe4.png)
2. I would like to shoutbox was on the left side.
(http://img145.imageshack.us/img145/5559/asdvg5.png)
3. And deleting emots/smileys in shoutbox.
Quote from: trekkie2444 on July 24, 2008, 06:11:26 AM
I already attached my index.template. Twice.
I try to help people with this mod simply because I think it is a great mod. I do this in my free time. I am not about to search through these posts to look up
your index.template.php to make
your changes for
you regardless of how many times you have attached it. I will be more than happy to make the edits for
you provided you attach your index.template.php to your
next post. ;)
@*JENNY*
First, welcome to SMF!
Next, generally that parse error indicates a missing echo' in front of the "<" in question. It also generally means you will be missing the ending '; as well.
What theme are you using, what version of SMF, and what version of the ShoutBox?
@Nequil: Please don't be impatient; I see you already reposted your question.
1) Edit yshout.php, and put those breaks in where you want them. Alternately, you can use CSS to put a margin on #shouts, which will also give the same spacing effect.
2) Add text-align:left; to #yshout in the CSS.
3) I don't understand this question. If you want to eliminate emotes from being posted, you can try passing an extra parameter "false" to parse_bbc, which should prevent smileys from being parsed.
Thank you so much replying !!
theme: Aa New Damage
Shoutbox: nneonneo's AJAX shoutbox v 1.15
SMF: 1.1.5
I think I have already added ShoutBox to that theme once before. :D
If you will attach your index.template.php, I can see about making the necessary changes for you.
Thanks if there is anything wrong we the way i attached ut please let me know how can i do it....Thanx once again..!!
You were missing quite a bit of code from the very beginning of your index.template.php. :P
Just replace what you attached with what I have attached. That should fix things right up. :)
Thank you ....so much!! I'll let you know if it worked!!
Sorry ...did u attahced the yshout?
All I attached was a corrected version of the code you had previously attached. You should be able to replace your old code with the new code I provided and then reinstall shoutbox normally (since you had uninstalled it). Sorry for not being clear. :D
Oh no it's okay... I really appreciated ...alot!! Our users our asking us what happened w/ the shoutbox......thats kind of unpatient...Thank you!!
@nneonneo:
I've got a question...
Situation:
Installed SB_1.20, smf 1.1.5 is using a non-default theme, so I applied the changes as mentions to index.template.php etc. Everything is working fine besides one thing which has worked with versions before 1.20. Guests are not allowed to use the shoutbox and i dont know why.
i searched the settings.php for an option to allow guests which are not logged in to SMF to see the shoutbox, but there is no setting.
the only settings I found was the auto-choose-nickname settings and the allowguest-commands setting.. still nothing found which would enables guests to chat again.
all the guests see in the chatarea directly after loading the shoutbox: "sorry, you are not logged in!"
is there a missing setting in settings.php? or some code snipped which is in the wrong place? or maybe some bug in 1.20.?
thanx in advance for having a look at this issue!
EDIT:
found in yshout.php from an OLD shoutbox version the following:
// Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;
Now I've tried to copy these lines to the settings.php of the sb_1.20 version, without any changes.. still no guests allowed to chat. how comes these setting is missing in 1.20?
All of the "allows" are now located in SMF's permissions system. Go into permissions for Guests and check which options (there are 3) you want to allow them.
Thanx SunKing for the quick response..
I've got a look at the guest permissions system of smf. I found three checkboxes with no text before, I think these have to be the shoutbox settings.. as I'm not using the default theme, there is some text missing.. (and I didn't find some code to add to let the settings show up in non-default themes).. I'm going to switch to default theme just to figure out what checkboxes are for which setting - then switch back.
EDIT:
same problem with default-theme, no text before those checkboxes.. BUT when all 3 checked, shoutbox is working well with guests. so above problem solved.. I'm just curious what I've checked right now...
You've checked
*View shoutbox
*Post in shoutbox
*Moderate shoutbox
You may wish to uncheck the last one (unless you want guests to be able to ban and delete...)
P.S. your language files are broken. I've tried to test for it, but I didn't do a good enough job; next version will try harder :P
You just have to copy Modifications.english.php in Themes/default/languages to Modifications.<yourlanguage>.php. If Modifications.english.php doesn't have the shoutbox texts, you can try this link (http://custom.simplemachines.org/mods/index.php?mod=585#post_troubleshooting) under "No text?"
Here.
i'm succesfully install nneonneo shoutbox.. but next hours my site its gone closed by hosting couse to many process.. damn hosting.
Hi, sorry again I can't fix it, with the border. Can you show me where I have to write the code? Please :)
Here
[table] [tr] [td]// YSHOUT HERE - <head> code
global $boardurl,$shoutFile;
$shoutFile='home';
$scripturlparsed = parse_url($scripturl);
$scriptpath=isset($scripturlparsed['path'])?$scripturlparsed['path']:'/';
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 src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script>
<script type="text/javascript">
var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var shoutFile="',$shoutFile,'";
var yshout_php="',$scriptpath,'?yshout";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?June102008" type="text/javascript"></script>
<style type="text/css">
#yshout #shouts {
overflow: auto;
width: 470px; /* the width you want to display */
height: 110px; /* the height you want to display */
}
#yshout {
font-size: 13px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts { /* main shouts area */
color: #373ea9;
}
#yshout .shout { /* one shout */
margin: 1 0 0; /* Top Bottom Linespacing */
line-height: 1,5;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #f1196a;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 4pt;
color: #cd26b7;
}
#yshout #shout-form {
margin: 1;
padding: 1;
}
#yshout #shout-form fieldset {
border: -;
}
#yshout #forum-name {
color: #373437;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #0f28a3;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 50px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code[/td] [/tr] [/table]
Or Here?
[table] [tr] [td]// 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>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
[/td] [/tr] [/table]
Quote from: nneonneo on July 24, 2008, 05:10:08 PM
@Nequil: Please don't be impatient; I see you already reposted your question.
1) Edit yshout.php, and put those breaks in where you want them. Alternately, you can use CSS to put a margin on #shouts, which will also give the same spacing effect.
2) Add text-align:left; to #yshout in the CSS.
3) I don't understand this question. If you want to eliminate emotes from being posted, you can try passing an extra parameter "false" to parse_bbc, which should prevent smileys from being parsed.
Nothing doesn't work!
1. i added <br> but nothing has happened.
2. wiich the line? I have to add?
3. deleting all emots [schema: emot :) ----> : )]
I used this:
QuoteInstallation to the news header: see http://www.simplemachines.org/community/index.php?topic=137508.msg1534963#msg1534963
Attach -->
Quote from: nneonneo on July 24, 2008, 11:41:03 PM
You've checked
*View shoutbox
*Post in shoutbox
*Moderate shoutbox
You may wish to uncheck the last one (unless you want guests to be able to ban and delete...)
P.S. your language files are broken. I've tried to test for it, but I didn't do a good enough job; next version will try harder :P
You just have to copy Modifications.english.php in Themes/default/languages to Modifications.<yourlanguage>.php. If Modifications.english.php doesn't have the shoutbox texts, you can try this link (http://custom.simplemachines.org/mods/index.php?mod=585#post_troubleshooting) under "No text?"
thx nneonneo,
I have added the // permission lines to the language file of my theme and voila, the text before the checkboxes is there..
(of course unchecked mod privileges for guests in the meanwhile heh..)
hi guys, i just installed AdvSB_1.16. shoutbox on my forum site, im using helios theme. how do i apply this mods package to my forum? i dont know what to do after installing it. in order for me to apply the mods in my forum it required an FTP information which i do not know how to fill up. below is the FTP information that should be filled up:
FTP Information Required
Some of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders. Your FTP information may be temporarily cached for proper operation of the package manager.
FTP Server: ___________________________________
Port: 21
Username: _______________________
Password: ________________________
Local path to SMF: _______________________________
what to enter in the box?
Quote from: psynx on July 25, 2008, 10:53:34 AM
hi guys, i just installed AdvSB_1.16. shoutbox on my forum site, im using helios theme. how do i apply this mods package to my forum? i dont know what to do after installing it. in order for me to apply the mods in my forum it required an FTP information which i do not know how to fill up. below is the FTP information that should be filled up:
FTP Information Required
Some of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders. Your FTP information may be temporarily cached for proper operation of the package manager.
FTP Server: ___________________________________
Port: 21
Username: _______________________
Password: ________________________
Local path to SMF: _______________________________
what to enter in the box?
This is EXACTLY what appeared for me. I gave the info to access the FTP and it installed correctly. I didnt know how to access it so I went back in, uninstalled it and my forums are jacked up. I sent a email begging for help but I've lost a lot of information and unless somebody can fix it for me Im SOL.
FYI, I too am using Helios and the forum version is 1.1.5
You'll be needing the FTP access to your server, obviously.
If you're the owner of your server, you should know this information. If you're not the owner, contact your system administrator and ask them for said information.
On the other hand, if you DO own the server and don't know how, then refer to SMF's online documentation on how to run the package manager and how to find said information.
@allymcbeal: In the second one. Make it // YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo'<div class="tborder" style="margin-top: 1ex;">
<div class="catbg" style="padding: 5px 5px 5px 10px;">
Shoutbox
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">';
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>
</table>
</div><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
@Nequil:
1) I don't see any extra breaks in yshout.php. Change
echo '<div id="shouts">',readChat(),'</div>';
to
echo '<br /><div id="shouts">',readChat(),'</div><br />';
2) index.template.php, in the CSS block, there is a section called "#yshout", add it there
3) Yes, then you want to add ,false to parse_bbc:
$text = parse_bbc($text);
=>
$text = parse_bbc($text,false);
i have now entered the FTP required information but i still dont see the shoutbox in my forum site. and by the way i also entered the first code in my index.templates.php.
but i have troubled putting the second code which nneonneo's says to his shoutbox link "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:"
where is it located in my index.template.php file?
By desired location, I mean where you want it. The shoutbox, by default, installs in the header, which is not an optimal place for many themes. The best place is likely to be right above or right below the menu. This is usually close to the end of the function "template_main_above()".
I appologize if this has already been solved but it's difficult to read through 155 pages. I just uninstalled 1.16 and installed 1.20. Very clean and simple process, no bugs, errors, hitches, nothin'. However there are some very strange problems. The shoutbox does not work on any theme. By not working i mean it doesn't display or post any shouts. Loads then acts like there's no shouts to display. And when you click post nothing happens.
I though maybe a problem with the theme, but when you go to http://www.drinkingbuddies.ca/forum/yshout/ posting won't even work there either... Nor will it display any shouts, which do exist because i checked the txt files. Any ideas?
*edit*
i just checked the errors on IE and it says: " 'shoutFile' is undefined " and " 'checkDuplicates' is undefined "
For the theme: the <head> code changed, which means you'll need to update it.
Now, for the other problem: I can't see what's wrong, since you need to set the proper permissions for regular users to see and post in the shoutbox (Membergroups->Permissions) before I can see what is the matter.
permission added, sorry about that
hmm... i guess all is well now??? maybe it was just the <head> issue. dunno, thanks a ton though!!
Quote@Nequil:
1) I don't see any extra breaks in yshout.php. Change
echo '<div id="shouts">',readChat(),'</div>';
to
echo '<br /><div id="shouts">',readChat(),'</div><br />';
2) index.template.php, in the CSS block, there is a section called "#yshout", add it there
3) Yes, then you want to add ,false to parse_bbc:
$text = parse_bbc($text);
=>
$text = parse_bbc($text,false);
Ok all 2 points works ! :) 3 point... i dont know where i add this code ? in which a file?
@Nequil: yshout.php (sorry for not being clear)
Changing the timestamp
(previously posted by Youngie360G here (http://www.simplemachines.org/community/index.php?topic=137508.msg1584257#msg1584257); changes in this post: timestamp now offsets based on forum/user prefs, added "Yesterday")
If you want the shoutbox time stamp to be different from the forum timestamp, this is fairly easy to do.
For 1.16 and below, you want to edit yshout/yshout.php; for 1.20+, edit yshout/settings.php.
Find the preg_timeformat function, which looks like
function preg_timeformat($matches)
{
// format: <timeval=(value)>
return timeformat(intval($matches[1]));
}
and replace it with
function preg_timeformat($matches)
{
// format: <timeval=(value)>
global $user_info, $modSettings;
$ts=intval($matches[1]) + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600;
$daystamp=date('M j, Y',$ts);
if(date('M j Y') == date('M j Y',$ts)) $daystamp='<b>Today</b>';
if(date('M j Y',time()-3600*24) == date('M j Y',$ts)) $daystamp='<b>Yesterday</b>';
return '['.$daystamp.', '.date('h:i:s A',$ts).']';
}
So far, this will just produce the default timestamp
[Today, 01:23:45 PM]
or
[July 25, 2008, 01:23:45 PM]
But now you can modify the timestamp by changing the code
date('M j, Y',$ts)
and
date('h:i:s A',$ts)
Refer to http://ca3.php.net/date for the different codes available.
Finally, if you want to get rid of the day altogether, you can simply make the last line
return '['.date('h:i:s A',$ts).']';
Here's a question, how about a collapsible shoutbox?
Thanks nneonneo all works :)
@drinkingbuddies_ca: Yes, doable. AdvSB provides that support by default, but you can also just do the necessary modifications manually (there's not a lot, I promise!).
You need to first add a div which holds the collapse button and the entire shoutbox.
An example (might be different for your theme)
echo '<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;"><a href="#" onclick="sbToggle(); return false;"><img id="upshrinkSB" src="', $settings['images_url'], '/', empty($options['collapse_shoutbox']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="Shrink or Expand the ShoutBox" align="bottom" /></a> ';
// Block Title
echo '<span style="width:49%"></span><span>ShoutBox</span>';
echo '</div><div id="upshrinkSBHeader"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
SHOUTBOX CODE
echo '
</td>
</tr>
</table></div>';
The important part is the sbToggle <a>, the upshrinkSB <img> and the upshrinkSBHeader <div>.
Then, we just add a little script to the header (probably with the rest of the upshrink code):
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_sb = ', empty($options['collapse_shoutbox']) ? 'false' : 'true', ';
function shrinkHeaderSB(mode)
{';
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkSB=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_shoutbox", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrinkSB").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkSBHeader").style.display = mode ? "none" : "";
current_header_sb = mode;
}
function sbToggle() { shrinkHeaderSB(!current_header_sb); }
// ]]></script>';
and voilà, a collapsable shoutbox.
@Nequil: I'm sorry, I don't quite understand...
Is there a possibility to a divide the history logs into pages?
Not without a fair bit of extra code, I think. I never considered that it would be strictly necessary, though a system that periodically archives history could also be used to paginate it, I guess....
While Installing Manually via Package Parser I am getting these errors in the Theme Edits only Options.
Error: Modification XML file (/tmp/languagesenglish_all.xml) doesn't exist!
Error: Modification XML file (/tmp/permissionsinstall-perms-1.1.xml) doesn't exist!
Hence i Manually installed it for default theme but I am using Dark Night theme and hence i need the shoutbox inside there. I am using the sbox compatible for 1.1.5 version.
Please let me know what to do, Thanks.
I don't get those errors with SMF's package parser (via the Submit button at http://custom.simplemachines.org/mods/index.php?mod=585); try that.
How to move the sbox location to the bottom part of the forum, im using 1.20 version in my SMF 1.1.5 ???
;)
@nneonneo
my problem:
Shoutbox is available only for administrators and I want to be accessible for all.
Huh?
@mitochondria
If you attach your index.template.php and tell me exactly where you want it (like in the Info Center) or whatever, I will gladly edit it for you.
@Nequil
You need to go into SMF's permissions and then into each membergroup and set the permissions there.
I'm silly :d all works thanks ;)
Not at all a problem. Glad it works for you. :D
Quote from: SunKing on July 25, 2008, 11:36:19 PM
@mitochondria
If you attach your index.template.php and tell me exactly where you want it (like in the Info Center) or whatever, I will gladly edit it for you.
im still use the default theme for now and perhaps the sbox can be put into info center :D
;)
I'll till need th index.template.php attached to make the changes. ;D
@sunking
thx bro for helping, but finally i choose to install the sbox inside TP using "shoutbox code". Can i get the sbox display on my TP which is similiar with the TPshoutbox with its scrollbar :)
;)
Quote from: nneonneo on July 25, 2008, 08:39:29 PM
I don't get those errors with SMF's package parser (via the Submit button at http://custom.simplemachines.org/mods/index.php?mod=585); try that.
I acctually did it via those things but my sbox got misplaced now and also that the macro doesnt show the name, it just shows a blank button.
here is the screen print for it..
Has anyone tweaked the shoutbox to only appear on the main page of the forum (page that lists all the boards)? I want to eliminate the box showing up on every page. Thanks!
@mitochondria: http://custom.simplemachines.org/mods/index.php?mod=585#post_tips, under "Installing to TinyPortal"
@optimushunk: Have you checked the permissions? Also, is it installed in a guest-only section of the index.template.php (i.e. a section within if($context['user']['is_guest']))?
@++STi++: It's pretty easy to do.
Change
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
[code]global $txt,$context,$boarddir,$topic,$board;
if(empty($_REQUEST['action']) && empty($topic) && empty($board))
{
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
}
Is there a way we could have this under news section? i dont really like it right at top..
do you mean this code ???
// 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
Sorry I acctually have no idea.. I am trying to figure it out.. can you please tell me which file shoudl it be in ??
Thanks..
File error (writeLine); aborted
i installed the shoutbox manually in 2.0 beta 3.1 and whn i click on shout button i get the above error
can u plz help me
Well all other things solved... no problem now with anything.. .:)
Just this tiny miny problem...
something weird but i think sbox should be all stretched and acctually under that place check out the image..
(http://img367.imageshack.us/img367/2534/sboxoc5.png)
So whats the solution..
Thanks..
@alex clone: Move the "shoutbox code" in index.template.php.
@sunnydsl: Using FTP, chmod the chats folder to 755 or 777 and the files to 644 or 666.
@optimushunk: Depends on the theme. Post index.template.php, and I'll see.
index.template.php attached,,, kindly check
Thanks for helping...
Try this.
yep it works.. can u do a section break..??? please
thanks...
Quote from: nneonneo on July 26, 2008, 12:11:18 PM
@mitochondria: http://custom.simplemachines.org/mods/index.php?mod=585#post_tips, under "Installing to TinyPortal"
yeah its working, im succeed to put sbox into my TP in right block but i dont like the display. Can i get the sbox display that is similiar with TPsbox with its scrollbar...
;)
It centered the shoutbox and left-aligned the text on my test site using your index.template.php. If you could maybe PM me a link to your site (and insure guests can see the shoutbox - that's all I should need to see what's wrong) then we will get this figured out for you once and for all. ;)
Quote from: SunKing on July 25, 2008, 11:36:19 PM
@mitochondria
If you attach your index.template.php and tell me exactly where you want it (like in the Info Center) or whatever, I will gladly edit it for you.
this is my index.template.php :)
The shoutbox is already added to that index.template.php. :)
As far as adding (or changing) it in TinyPortal, I cannot make those edits as I do not have access to TP (I am currently running SMF 2.0). The css can be edited easily to change the way the shoutbox appears, even in TinyPortal.
Quote from: SunKing on July 27, 2008, 02:23:29 AM
The shoutbox is already added to that index.template.php. :)
i wanna to move the shoutbox to the lower section which is in the info center, would you like to help me out?
;)
That I can do! :D
EDIT: I will need you to attach your BoardIndex.template.php. I think I will need that for the InfoCenter edit. :)
here's
OK....the location is where you had asked. ;)
But I could not get it to shout....however, I think this is a problem on my end. My test site is apparently worn out. :P
Furthermore, you can change the placement of the shoutbox (within the BoardIndex.template.php) simply by moving
// Shoutbox here
shoutbox();
to whatever location you would prefer. I just added it to the top of the info center.
What'd be nice would be if I could set this to not appear anywhere on the actual forum, but be showable via SSI.php. That way we could have a shoutbox on our main site, which can be written in only by logged in forum members.
I screwed up trying to upgrade to 1.20....I had 1.1.3 working fine but when I went to uninstall it I DELETED IT INSTEAD. Now 1.20 won't install over it. How do I get rid of 1.1.3 now? it still shows in the list of packages but of course if I try to uninstall it it's not available.
I am running 1.1.5 w/ the balck 45 theme with these other mods
1. SMF Trader System 1.1
2. Auto Embed Video Clips 2.1.2
3. Avatar Under Membergroups Rank 1.1b
4. Simple ImageShack 2.0.3
5. Ad Managment 2.3
6. SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update 1.0
7. Board Viewers Mod 1.2
8. Global Headers Footers
Quote from: SunKing on July 27, 2008, 03:37:48 AM
OK....the location is where you had asked. ;)
But I could not get it to shout....however, I think this is a problem on my end. My test site is apparently worn out. :P
Furthermore, you can change the placement of the shoutbox (within the BoardIndex.template.php) simply by moving
// Shoutbox here
shoutbox();
to whatever location you would prefer. I just added it to the top of the info center.
ok thx. ill try it :)
;)
I installed this shout box on SMF1.1.5
And added the load code in the descrition .. but it didnt load ......
I wnt the shout box look like a catogary..
Quote from: assam_siddibapa on July 27, 2008, 09:41:49 AM
I installed this shout box on SMF1.1.5
And added the load code in the descrition .. but it didnt load ......
I wnt the shout box look like a catogary..
How'd you do it? Can you show us your index.template.php?
@DistantJ: In a way, this is achieved by /yshout/, which shows a standalone shoutbox. You can use the code to implement the shoutbox anywhere it is necessary (see yshout/index.php)
@FullDraw: Upload 1.13 again (it's on the mod page). If that doesn't work, manually uninstall it by reversing the package installation (use the package parser).
Well I tried installing 1.1.3 again and this is the message I got:
This package is already installed, and no upgrade was found!
You should uninstall the old version first to avoid problems, or ask the author to create an upgrade from your old version.
Please remember to always make regular backups of your sources and database before installing mods, especially beta versions.
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
I'm afraid I don't know where to start for the reversal
Try this modified package. I just edited it to allow it to be uninstalled on 1.1.5.
Quote from: nneonneo on July 27, 2008, 05:41:52 PM
Try this modified package. I just edited it to allow it to be uninstalled on 1.1.5.
Same message as before...
This package is already installed, and no upgrade was found!
You should uninstall the old version first to avoid problems, or ask the author to create an upgrade from your old version.
Did you delete the old 1.13 package, upload the one I posted, uninstall it, then apply 1.20?
If you still can't get it, try this: http://custom.simplemachines.org/mods/index.php?action=parse&attach=51432&smf_version=1.1.4&mod=585. It describes the steps to apply the mod; run them in reverse to remove the mod manually, then backup Packages/installed.list and remove the mod from that file to "uninstall" it.
You can see the code in my index.template.php ...... and i added the loading code (where i add it it load there )that code i put it in the decreption box of one catogary.
As i say some other forum havive that as u can see it in my second attachment
where is the function for the display of username ? I need to make it bold in there.
Ok, got the 1.13 out by deleting it on the list and sending it back to the server. Now when I download 1.20 I get the theme error
Execute Modification ./Themes/default/index.template.php Test failed
This prolly because I have not made the manual edits required for my theme Balck45?
Got 1.20 to work. It was easy once I got rid of 1.1.3 out of the list...Thank You
hi there
i have added the scrollbar to the shoutbox as found here http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028 and i have set the shoutbox so new shouts come in at the top instead of the bottom but every time we refresh/re enter the page with the shoutbox on the scroll is down the bottom and we have to move it back up to see new shouts. this only occurs when we first go to the page or refresh then after we move it to the top it stays there and works fine till we refresh page again then it's back down the bottom
I get a Hacking attempt... message when i use it...
@mr_fix_it: http://www.simplemachines.org/community/index.php?topic=137508.msg1625395#msg1625395
@God Of Mana: When you use what? /yshout/?
Quote from: edi67 on July 23, 2008, 02:11:35 AM
Quote from: nneonneo on July 22, 2008, 02:30:16 PM
@edi67: One way is simply to disable autoscroll (I think I will make this an option in the next AdvSB).
Comment out
divScroll = new chatscroll.Pane('shouts');
objDiv = document.getElementById('shouts');
objDiv.scrollTop = objDiv.scrollHeight;
from yshout/js/yshout.js.
how disable it nneon ?
sorry nneon you can reply me here?
Err, I was answering mr_fix_it with that solution (to comment out the code from yshout/js/yshout.js).
when i edit the files. but i fix it back by replacing index.php with the default one.
spot on..... thanks for that nneonneo ...,
having probs with some members saying that the shoutbox is not refreshing for them......is there a fix you know off for this mate ?
p.s is there any where i can send a donation to you ?......the time/work you but in here with this shoutbox for free is amazing and much appreciated
Ehm.. anyone going to help me ????
Quote from: optimushunk on July 26, 2008, 06:47:03 PM
yep it works.. can u do a section break..??? please
thanks...
Quote from: optimushunk on July 27, 2008, 10:00:13 PM
where is the function for the display of username ? I need to make it bold in there.
Please let me know about it please.
Thanks.
@God of Mana: I meant more specifically what page you are visiting. Does it show "Hacking Attempt" when you load the shoutbox, the forum, or what?
@mr_fix_it: What browser are they using? If you feel like donating, my address is nneonneo
- gmail [.] com.
@optimushunk: Both questions can be resolved by editing yshout.php. I'm not sure what you mean by a section break, but the username is written in the makeShout function.
Quote from: nneonneo on July 28, 2008, 10:46:35 PM
@optimushunk: Both questions can be resolved by editing yshout.php. I'm not sure what you mean by a section break, but the username is written in the makeShout function.
I meant like under a different section like a board. check the image.
(http://img75.imageshack.us/img75/9120/sboxgm6.png)
and lots of "makeShout" functions in there. which one do i make bold ?
No, you want to edit the makeShout function itself. As for making it look like a board, well, you have to copy the specific code from BoardIndex.template.php or something to make it look proper (I've gotten the best results copying the code from the Recent Posts box, though)
Quote from: assam_siddibapa on July 27, 2008, 09:41:49 AM
I installed this shout box on SMF1.1.5
And added the load code in the descrition .. but it didnt load ......
I wnt the shout box look like a catogary..
Quote from: assam_siddibapa on July 27, 2008, 09:08:34 PM
You can see the code in my index.template.php ...... and i added the loading code (where i add it it load there )that code i put it in the decreption box of one catogary.
As i say some other forum havive that as u can see it in my second attachment
I think you forgot me !!!
Quote from: nneonneo on July 02, 2008, 11:38:52 AM
One thing you might consider is using TinyPortal to completely customize your front page, which provides a clean way to put the shoutbox on only one page (you simply install it in a block that shows up only on the front page). This method also provides a fully customized front page.
If you just want to hide the shoutbox for all non-front pages, do this:
For AdvSB, in index.template.php, put
if(empty($context['current_action']))
before
shoutbox();
For regular SB, change
if(allowedTo('yshout_view'))
to
if(empty($context['current_action']));
elseif(allowedTo('yshout_view'))
Hello,
I already tried with that code, but the shoutbox dissapear
I'm using 1.20 Adv and SMF 2 Beta 3
Thanks
In SMF 2.0 beta 3.1 using german language, the shout time is displayed as "Heute um 11:40:09 am" or "Heute um 01:15:29 pm".
The "am" is not needed in 24h time format. Is there any option to set the time format? Or could this been fixed please.
Kind regards,
Dirk
they are using e7 nneonneo which is why i dont understand it as me and some of the others are using e7 with no probs at all.
Dave
Quote from: nneonneo on July 28, 2008, 10:46:35 PM
@God of Mana: I meant more specifically what page you are visiting. Does it show "Hacking Attempt" when you load the shoutbox, the forum, or what?
@mr_fix_it: What browser are they using? If you feel like donating, my address is nneonneo - gmail [.] com.
@optimushunk: Both questions can be resolved by editing yshout.php. I'm not sure what you mean by a section break, but the username is written in the makeShout function.
I get it when i try to visit any page of my forums.
@assam_siddibapa: I don't quite understand what you asked :(. For making the shoutbox appear as a category, see this post (http://www.simplemachines.org/community/index.php?topic=137508.msg1635410#msg1635410)
@Furqon: On the front page, too? That shouldn't happen, though it might be something in 2.0 I didn't know about. Try adding " || $context['current_action']=='home'" to the "if" condition.
@Hannilein: The shoutbox uses your forum preferences, so you need to fix this in the Look and Layout Preferences section of your profile (not sure what it is called in German)
@mr_fix_it: Odd indeed. You are using 1.20, right? Older versions had a dependency on the upshrink header; if the shoutbox stops working when you minimize the top header, that's probably it.
@God Of Mana: Post your index.php, please (modified)
hello,
is it possible to run this shoutbox with the ds natural theme ? (http://custom.simplemachines.org/themes/index.php?lemma=749)
i like that theme and i spent the whole day to get that shoutbox working, but it wont like i want to...
i followed the steps for custom themes, and the shoutbox appears, but i cant submit shouts
i tried it with 1.1.5 and upgraded to version 2.0 beta 3.1
i would like to have it above the menu bar in that style (http://img150.imageshack.us/img150/5569/shoutboxsb9.png)
thanks a lot !
How do you make a table for my theme? Here's my code
BoardIndex.template
<?php
// Version: 1.1; BoardIndex
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Show some statistics next to the link tree if SP1 info is off.
echo '
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="bottom">', theme_linktree(), '</td>
<td align="right">';
if (!$settings['show_sp1_info'])
echo '
', $txt[19], ': ', $context['common_stats']['total_members'], ' &#8226; ', $txt[95], ': ', $context['common_stats']['total_posts'], ' &#8226; ', $txt[64], ': ', $context['common_stats']['total_topics'], '
', ($settings['show_latest_member'] ? '<br />' . $txt[201] . ' <b>' . $context['common_stats']['latest_member']['link'] . '</b>' . $txt[581] : '');
echo '
</td>
</tr>
</table>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<table border="0" width="100%" class="tborder" cellspacing="' , ($context['browser']['is_ie'] || $context['browser']['is_opera6']) ? '1' : '0' , '" cellpadding="4" style="margin-bottom: 2ex;">
<tr>
<td class="catbg"> ', $txt[102], '</td>
</tr>
<tr>
<td valign="middle" align="center" height="60">';
// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="width: 90%; padding: 2px;"><b>', $context['news_lines'][0], '</b></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// The fading delay (in ms.)
var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";
var foreColor, backEl, backColor;
if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;
backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;
backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}
// List all the lines of the news for display.
var smfFadeContent = new Array(
"', implode('",
"', $context['fader_news_lines']), '"
);
// ]]></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script>
</td>
</tr>
</table>';
}
// 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
/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
and boards. (see below.) */
$first = true;
foreach ($context['categories'] as $category)
{
echo '
<div style="margin-top: ' , $first ? '0;' : '1ex;' , '' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="menu">';
$first = false;
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
Index.template
<?php
// Version: 1.1.5; 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'] = true;
/* 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" />';
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?May122008" 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;
}
</style>';
// YSHOUT END
// 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']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// 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>
</head>
<body>';
echo'
<div class="orta">
<div style="padding: 0px 15px 0px 15px;">
<img src="', $settings['images_url'], '/logo.gif" alt="Logo" />
</div>
</div>
<div class="alt"></div>
';
// display user name
echo '
<div class="ust"></div>
<div class="orta">
<div style="padding: 0px 15px 0px 15px;">
<div class="c_ust"></div>
<div class="c_orta">
<div style="padding: 0px 2px 0px 2px;">
<table width="100%" cellpadding="4" cellspacing="0" border="0" >
<tr class="catbg">';
echo'
<td align="left"><span class="smalltext">' , $context['current_time'], '</span></td>
';
echo '
<td align="right" nowrap="nowrap" valign="top">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<input type="text" name="search" value="" style="width: 190px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<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>
';
// this is the upshrink button for the user info section
echo '
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';
echo'
<td class="smalltext" align="left" width="40%">
<img style="margin-right:5px;" src="' . $settings['images_url'] . '/on.gif" width="12" height="12" alt="' . $txt[333] . '"/><b>', $txt[489], ':</b> ', $context['common_stats']['total_posts'], ' <br />
<img style="margin-right:5px;" src="' . $settings['images_url'] . '/on.gif" width="12" height="12" alt="' . $txt[333] . '"/><b>', $txt[490], ':</b> ', $context['common_stats']['total_topics'], '<br />
<img style="margin-right:5px;" src="' . $settings['images_url'] . '/on.gif" width="12" height="12" alt="' . $txt[333] . '"/><b>', $txt[488], ':</b> ', $context['common_stats']['total_members'], '<br />
<img style="margin-right:5px;" src="' . $settings['images_url'] . '/on.gif" width="12" height="12" alt="' . $txt[333] . '"/><b>', $txt[656], ': </b> ', $context['common_stats']['latest_member']['link'], '
</td>
<td align="right" colspan="2" width="50%" valign="top" class="windowbg2"><span class="smalltext">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo'
', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b><br />
';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.<br />';
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];
// 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'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $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'];
// 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 />';
}
echo ' </span>';
}
// 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'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</td>';
if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';
echo'
</tr>
</table>
</td>
</tr>
</table>';
echo '
</div></div>
<div class="c_alt"></div>
</div></div>
<div class="alt"></div>
';
// Show the menu here, according to the menu sub template.
template_menu();
// The main content should go here.
echo '
<div class="ust"></div>
<div class="orta">
<div id="bodyarea" style="padding: 0px 15px 0px 15px;">';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
</div></div>
<div class="alt"></div>';
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div class="ust"></div>
<div class="orta">
<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 class="smalltext" valign="middle" align="center" style="white-space: nowrap;">
', tema_copyright(), '
</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></div>';
// 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>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 0;">';
// 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['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 ' > ';
}
echo '</div>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// Show the start of the tab section.
echo '
<div class="ust"></div>
<div class="orta">
<div class="buton">
<ul>';
// Show the [Home] button.
echo '<li><a' , $current_action=='Home' ? ' class="current"' : '' , ' href="http://republic.silverinstitute.com/forums/index.php?action=forum"><span>Home</span></a></li>';
// Show the [help] button.
echo'
<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>
';
// How about the [search] button?
if ($context['allow_search'])
echo'
<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>
';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo'
<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>
';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo'
<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>
';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo'
<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>
';
// The [calendar]!
if ($context['allow_calendar'])
echo'
<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>
';
// Show the [Gallery] button.
echo '<li><a' , $current_action=='Gallery' ? ' class="current"' : '' , ' href="http://republic.silverinstitute.com/forums/index.php?action=gallery"><span>Gallery</span></a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo'
<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>
';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo'
<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>
';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo'
<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>
';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo'
<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>
';
// The end of tab section.
echo '
</ul>
</div>
</div>
<div class="alt"></div>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
//no deleted
function tema_copyright()
{
echo'
', theme_copyright(), ' <br /> <span style="color:efefef;">Oranj By </span><a href="http://www.smftr.com" title="smf">Burak</a>
';
}
?>
Quote from: nneonneo on July 19, 2008, 12:21:41 PM
@MissRancher: It's really not a good idea to rename the div, since that could cause problems...I don't understand why it would load the whole forum, unless the index.php modifications were wrong (for 1.20) or you were using SB_1.16 or earlier with certain forum setups. Anyway, a forum URL (and preferably an account too) would make this easier to debug (<3 Firebug)
Thanks! I actually went with a clean install of the theme, left the div name alone, and it started working. Magic.
Now I'm seeing TONS of errors in my smf log table such as:
Undefined index: yshout_shout_button<br />File: /home/blah/public_html/mysite/yshout/yshout.php<br />Line: 302
Undefined index: yshout_commands<br />File: /home/blah/public_html/mysite/yshout/yshout.php<br />Line: 247
Undefined index: yshout_shoutbox<br />File: /home/blah/public_html/mysite/Themes/mytheme/BoardIndex.template.php (main_above sub template - eval?)<br />Line: 353
And I'm trying to figure out why...any thoughts?
Quote from: nneonneo on July 28, 2008, 11:07:49 PM
No, you want to edit the makeShout function itself. As for making it look like a board, well, you have to copy the specific code from BoardIndex.template.php or something to make it look proper (I've gotten the best results copying the code from the Recent Posts box, though)
[/quotQuote from: nneonneo on July 29, 2008, 03:10:38 PM
@assam_siddibapa: I don't quite understand what you asked :(. For making the shoutbox appear as a category, see this post (http://www.simplemachines.org/community/index.php?topic=137508.msg1635410#msg1635410)
e]
Ya this is what i want .... how do i do that
Quote from: MissRancher on July 29, 2008, 10:03:07 PM
Quote from: nneonneo on July 19, 2008, 12:21:41 PM
@MissRancher: It's really not a good idea to rename the div, since that could cause problems...I don't understand why it would load the whole forum, unless the index.php modifications were wrong (for 1.20) or you were using SB_1.16 or earlier with certain forum setups. Anyway, a forum URL (and preferably an account too) would make this easier to debug (<3 Firebug)
Thanks! I actually went with a clean install of the theme, left the div name alone, and it started working. Magic.
Now I'm seeing TONS of errors in my smf log table such as:
Undefined index: yshout_shout_button<br />File: /home/blah/public_html/mysite/yshout/yshout.php<br />Line: 302
Undefined index: yshout_commands<br />File: /home/blah/public_html/mysite/yshout/yshout.php<br />Line: 247
Undefined index: yshout_shoutbox<br />File: /home/blah/public_html/mysite/Themes/mytheme/BoardIndex.template.php (main_above sub template - eval?)<br />Line: 353
And I'm trying to figure out why...any thoughts?
Yes, quoting myself...I had added the mods to the language-english file, but not the english-utf8 file, which I *think* is the problem.
@MissRancher: Or, your theme has its own Modifications.english.php file, which you need to modify
@ionic84: Post index.template.php (modified)
@Encore127: What do you mean by a table? If you mean a category box, see http://www.simplemachines.org/community/index.php?topic=137508.msg1635410#msg1635410
@assam_sidibapa: Read that post, and try the suggestion. You'll need to know at least a little HTML to make it look decent.
<?php
// Version: 1.1.5; index
// 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'] = true;
/* 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['theme_url'], '/css/yshout.css?July022008" />
<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" />';
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?May122008" 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;
}
</style>';
// YSHOUT END
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// 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>
'; // script for shoutbox upshrink
echo ' <script language="JavaScript" type="text/javascript"><!-- // -->
<![CDATA[ var current_header_sb = ', empty($options['collapse_shoutbox']) ? 'false' : 'true', ';
function shrinkHeaderSB(mode) {';
if ($context['user']['is_guest'])
echo ' document.cookie = "upshrinkSB=" + (mode ? 1 : 0);';
else echo ' smf_setThemeOption("collapse_shoutbox", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo ' document.getElementById("upshrinkSB").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkSBHeader").style.display = mode ? "none" : "";
current_header_sb = mode;
}
function sbToggle() {
shrinkHeaderSB(!current_header_sb);
}
// ]]></script>
</head>
<body>
<div id="toparea">
<div id="topbox" class="wrapper">
<div id="userarea">';
if($context['user']['is_logged'])
{
echo $txt['hello_member_ndt'] , ' <strong>' , $context['user']['name'] , '</strong>';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ' [<a href="', $scripturl, '?action=pm">', $context['user']['messages'], '/<strong>', $context['user']['unread_messages'] , '</strong></a> PM]';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '[<strong>Maintenace</strong>]';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '[<a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] , ' APPROVE</a> ]';
echo ' <a href="', $scripturl, '?action=unread">Unread</a> / <a href="', $scripturl, '?action=unreadreplies">Replies</a>';
}
else
echo sprintf($txt['welcome_guest'], $txt['guest_title']);
echo '
</div>
</div>
</div>
<div id="mainarea">
<div id="header" class="wrapper">
<div id="logo">
<a href="'.$scripturl.'" title=""></a>
</div>
<div id="searcharea">';
echo '
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input class="inputbox" type="text" name="search" value="', $txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" />';
// 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>
</div>
</div>
<div class="wrapper">
<div id="toolbar-l">
<div id="toolbar-r">
<div id="toolbar">
',template_menu(),'
</div>
</div>
</div>
<div id="bodybox">
<div id="bdybox-l">
<div id="bdybox-b">
<div id="bdybox-br">
<div id="bdybox-bl">
<div id="bdybox-t">
<div id="bdybox-tr">
<div id="bdybox-tl">';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>';
echo '
</div>';
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="bottomarea">
<div id="footer">
<div id="footerarea">
<span class="smalltext">DS-Natural designed by <a href="http://www.dzinerstudio.com" target="_blank"><b>DzinerStudio</b></a><br />
<br />', theme_copyright(), '</span>';
// Show the load time?
if ($context['show_load_time'])
echo '
<br /><span class="smalltext">', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</span>';
echo '
</div>
</div>
</div>';
// 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>';
echo '
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '
<div class="pathway">';
// 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'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '">' . $tree['name'] . '</a>' : $tree['name'] , ' « ';
else
echo $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
}
echo '</div>';
}
// 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 '
<div id="topmenu">
<ul>';
// Show the [home] button.
echo '<li><a' , $current_action=='home' ? ' class="current"' : '' , ' href="', $scripturl, '"><span>' , $txt['home'] , '</span></a></li>';
// Show the [help] button.
echo '<li><a' , $current_action=='help' ? ' class="current"' : '' , ' href="', $scripturl, '?action=help"><span>' , $txt['help'] , '</span></a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo '<li><a' , $current_action=='search' ? ' class="current"' : '' , ' href="', $scripturl, '?action=search"><span>' , $txt['search'] , '</span></a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a' , $current_action=='calendar' ? ' class="current"' : '' , ' href="', $scripturl, '?action=calendar"><span>' , $txt['calendar'] , '</span></a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a' , $current_action=='admin' ? ' class="current"' : '' , ' href="', $scripturl, '?action=admin"><span>' , $txt['admin'] , '</span></a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=profile"><span>' , $txt['profile'] , '</span></a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a' , $current_action=='pm' ? ' class="current"' : '' , ' href="', $scripturl, '?action=pm"><span>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a ' , $current_action=='mlist' ? ' class="current"' : '' , ' href="', $scripturl, '?action=mlist"><span>' , $txt['members_title'] , '</span></a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a ' , $current_action=='login' ? ' class="current"' : '' , ' href="', $scripturl, '?action=login"><span>' , $txt['login'] , '</span></a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a ' , $current_action=='register' ? ' class="current"' : '' , ' href="', $scripturl, '?action=register"><span>' , $txt['register'] , '</span></a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a ' , $current_action=='logout' ? ' class="current"' : '' , 'href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>' , $txt['logout'] , '</span></a></li>';
echo '
</ul>
</div>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
this can be added where i want to, but i cant shout in it and it makes the theme look very bad then.
// 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 // 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
thanks
i want to move shoutbox at end of the page
but its coming At top
www.sadeestyle.com/forum
ok i found it:
<div id="toolbar">
',template_menu(),'
</div>
</div>
</div>
';
// 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
echo'
<div id="bodybox">
<div id="bdybox-l">
then it works fine
yes nneonneo running 1.20
Quote from: nneonneo on July 29, 2008, 11:27:13 PM
@assam_sidibapa: Read that post, and try the suggestion. You'll need to know at least a little HTML to make it look decent.
Can u plz help me out .... just say me where do i put the code in the board index
@ionic84: Are you using SB 1.20? If so, you need to replace the code in the <head> section with updated code.
@sadee: Edit index.template.php, moving the "shoutbox code" down to where you want it.
@mr_fix_it: Then I don't know what's going on :-\
@assam_siddibapa: Like I've said, it depends on the theme! See http://www.simplemachines.org/community/index.php?topic=137508.msg1630197#msg1630197 for an example...
Can u do it for me if i put the board index here.
Plz
if i work it out i will put a post up....thanks anyway nneonneo
Quote from: nneonneo on July 29, 2008, 11:27:13 PM
@MissRancher: Or, your theme has its own Modifications.english.php file, which you need to modify
Hmm I'm still getting the errors, and my theme does not have it's own Modifications.english.php file. I have added the yshout values to all the english or english-utf8 files I could find. Any other thoughts as to why I'm still seeing the errors?
@assam_sidibapa: ok
@MissRancher: Do any other themes have their own Modifications files, or have you installed any other languages? The errors should not be appearing if the language strings are available. Lastly, check to make sure the code didn't all end up on one line, because it tends to do that...
I have two themes installed ... i hope both needs to do same modifications
Here you go trekkie.
Quote from: nneonneo on July 28, 2008, 11:07:49 PM
No, you want to edit the makeShout function itself. As for making it look like a board, well, you have to copy the specific code from BoardIndex.template.php or something to make it look proper (I've gotten the best results copying the code from the Recent Posts box, though)
Please tell me the steps, I have no idea what i should do, I cant even find the sbox code in boardindex.template.php
I suppose you might need index.template.php and boardindex.template.php for it. Please let me know the edits so i dont have to ask you again next time ;D
Thank you for your help.
Quote from: nneonneo on July 29, 2008, 03:10:38 PM
@Furqon: On the front page, too? That shouldn't happen, though it might be something in 2.0 I didn't know about. Try adding " || $context['current_action']=='home'" to the "if" condition.
Hello,
I'm using SMF 2.0 Beta 3 without Tinyportal, just need help to modified this mod to show up in front page only
I already tried this code
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<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'];
// SHOUTBOX END
But it won't work
perhaps you'll help me to solve this.
Thanks
Quote from: nneonneo on September 26, 2007, 11:56:05 PM
Alternately, you may choose to insert a topic to the board with a hacked name -- i.e. add a topic and change the title *directly in the database*, containing the code
<div id="yshout">',$txt['yshout_loading'],'<br />
. This method is NOT recommended.
How can this be done in SMF 2.0?
At my forum smf 2.0 stands then only "$txt['yshout_loading'],", at 1.1.5 it worked
@assam_sidibapa: Before the shoutbox code:
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="gridlineColor">
<tr>
<td class="titlebg">Shoutbox</td>
</tr>
<tr>
<td class="windowbg">
After shoutbox:
</td></tr></table></div>
(p.s. if you don't like it try the code below)
@optimushunk:
(if you don't like it try the code above)
Before the shoutbox code:
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<div class="catbg" style="padding: 5px 6px 5px 6px; vertical-align: middle; text-align: left; ">
Shoutbox
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="gridlineColor">
<tr>
<td class="windowbg">
After shoutbox:
</td></tr></table></div>
@Furqon:
Are you *sure* that
// Show the shoutbox!
if(empty($context['current_action']))
shoutbox();
still shows the shoutbox? I just tried it on 2.0, and the shoutbox disappears on all but the front page, as expected...
@master2oo8: Try setting the description to <div id="yshout">Loading shoutbox...</div>
Quote from: nneonneo on July 30, 2008, 10:42:17 PM
@optimushunk:
(if you don't like it try the code above)
Before the shoutbox code:
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<div class="catbg" style="padding: 5px 6px 5px 6px; vertical-align: middle; text-align: left; ">
Shoutbox
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="gridlineColor">
<tr>
<td class="windowbg">
After shoutbox:
</td></tr></table></div>
I am sorry, but where about am i suppose to add this code ? I cant find any shoutbox code in boardindex.template.php and in Index.template.php it shows template parse error as it is used.
Please tell me the place where I have to add in the code. Thank you for your help in this. I Really appriciate it.
I applied the latest version and the users online mod ceased to work afterwards, is there a conflict?
@optimushunk: Wrap it in echo '...'; in index.template.php
@Rafferty: I don't know of any conflict, but I have never tested it with the Users Online mod. Can you describe the problem in more detail?
Where do i put the code?? And which shout box code
Quote from: Rafferty on July 30, 2008, 11:53:16 PM
I applied the latest version and the users online mod ceased to work afterwards, is there a conflict?
I have the latest version of the Shoutbox installed under SMF 2.0 with no conflicts whatsoever with the Users Online mod.
@Rafferty: I don't know of any conflict, but I have never tested it with the Users Online mod. Can you describe the problem in more detail?
[/quote]
I'm sorry it is not the user online mod but the "Profile User Action" mod (http://custom.simplemachines.org/mods/index.php?mod=540)
After installing the shoutbox mod all online users show only as being on the forum page and not the page their viewing as it should be.
sorry to inform, that doesnt work.
Anything else which can help ?
Thanks.
@neonneo
(http://img179.imageshack.us/img179/5082/asdqt1.png)
how i can change full date in shoutbox to simple date (28.07.08,15:55) ?
Date must be changed only in shoutbox not at forum.
I've installed the Advanced package 1.20 and there's a problem with it:
when I click the "shrink or expand shoutbox" button, it does nothing at all. Could this be solved?
Then I've two requests:
a) is it possible to disable sound notifications by default? (Now they're active by default)
b) little OT maybe, but is it possible to help me integrating the smiley mod when viewing shotbox in MKPortal? I modded the index.php, but I can't get smiley to show up, I only get the "open smiley" and "close" links.
Thank for help and for this great mod!
Bye,
PS
@Rafferty: It's a known problem with 1.20. I've got a fix in 1.21, and will likely release that later this week.
@optimushunk: What, this doesn't work?
echo '<BEFORE CODE>';
<SHOUTBOX CODE>
echo '<AFTER CODE>';
@Nequil: http://www.simplemachines.org/community/index.php?topic=137508.msg1630065#msg1630065
@CrazyHorse80: For the first problem, I don't know what the issue might be. Does the upshrink work for the Info center and other parts? It uses basically the same code. If you can't figure it out, post a forum URL and I'll come take a look.
Sound should be disabled by default (they're only enabled if a specific cookie is set).
For the smileys, you should make sure that animatedcollapse.js is being included in the <head> section of the code.
function preg_timeformat($matches)
{
// format: <timeval=(value)>
global $user_info, $modSettings;
$ts=intval($matches[1]) + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600;
$daystamp=date('M j, Y',$ts);
if(date('M j Y') == date('M j Y',$ts)) $daystamp='<b>Today</b>';
if(date('M j Y',time()-3600*24) == date('M j Y',$ts)) $daystamp='<b>Yesterday</b>';
return '['.date('D, H:i:s',$ts).']';
}
look's great :)
(http://img410.imageshack.us/img410/2632/asdrd8.png)
but i need change english three letters days to polish days:
schema: Mon -> Pon etc.
where i can change this ?
Hmm, according to PHP, date() doesn't respect locale, so it has to use strftime instead.
Change the last line to
setlocale(LC_TIME,'pl_PL');
return '['.strftime('%a, %H:%M:%S',$ts).']';
or, if that doesn't work (this is adapted from timeformat())
global $txt;
$weekday=$txt['days_short'][(int)strftime('%w',$ts)];
return '['.$weekday.date(', H:i:s',$ts).']';
Hi and thanks very much for this mod. A hearty well done :)
Anyway, I have a few themes on my forum (http://www.hldrforum.com) and am only just now getting into adding the shoutbox onto these other themes. I have started with the babylon theme and using your instructions it worked very well - thanks!
But I'm still a bit of a novice. The whole box should fit the width of the screen but the news box and key stats boxes are on the side thus givng the shoutbox a very crumpled effect - so coming to think of it, I need to move those boxes....
Was going to ask for a little guidance on changing the settings for the shoutbox but I think I need to move those boxes instead. Any help would be appreciated but only now have I realised this is probably not for this thread. Never know if a kind soul here has any answers anyway!
All the best
ow srry, i missed one code so had some problem... thanks for this.
@Threepwud: I guess it depends on how wide your browser window is. I use the same setup here (http://nneonneo.net46.net/smf/?theme=3), and it looks OK with a 1280-pixel wide display (fullscreen window). It's really up to your own preferences :P
Quote from: optimushunk on July 31, 2008, 12:14:17 PM
ow srry, i missed one code so had some problem... thanks for this.
Hey optimshunk can u say me what did u do ???
Quote from: nneonneo on July 31, 2008, 11:41:39 AM
Hmm, according to PHP, date() doesn't respect locale, so it has to use strftime instead.
Change the last line to
setlocale(LC_TIME,'pl_PL');
return '['.strftime('%a, %H:%M:%S',$ts).']';
or, if that doesn't work (this is adapted from timeformat())
global $txt;
$weekday=$txt['days_short'][(int)strftime('%w',$ts)];
return '['.$weekday.date(', H:i:s',$ts).']';
works!
(http://img145.imageshack.us/img145/4862/asdbu3.png)
1. I need these commands to move from behind the text
schema:
del ban [Pn 14:12:55] Nequil: : D racja
Where i can do this?
2. and in history and extended history enlarge the fonts.
Where i can do this?
Thanks for help :)
Quote from: nneonneo on July 31, 2008, 12:16:55 PM
@Threepwud: I guess it depends on how wide your browser window is. I use the same setup here (http://nneonneo.net46.net/smf/?theme=3), and it looks OK with a 1280-pixel wide display (fullscreen window). It's really up to your own preferences :P
Ah mate, that is PERFECT! Though how do I keep the screen from coming so far down? A little is good but mine shows the last 12 messages and each one has a gap between them. Any way I can get rid off this gap or at least bring them closer? I have had a look at the php settings and css ones but can't find anything. Changed the line-spacings too to no avail. I am using 1.20 standard.
many thanks mate
Quote from: assam_siddibapa on July 31, 2008, 12:31:40 PM
Quote from: optimushunk on July 31, 2008, 12:14:17 PM
ow srry, i missed one code so had some problem... thanks for this.
Hey optimshunk can u say me what did u do ???
Yes sure.
In your theme index.template.php where you have installed the shoutbox
Find:-
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<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'];
Add before:-
echo '<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="gridlineColor">
<tr>
<td class="titlebg">Shoutbox</td>
</tr>
<tr>
<td class="windowbg">';
Add after the code which i asked you to find:-
echo '</td></tr></table></div>';
Quote from: nneonneo on July 31, 2008, 10:57:21 AM
@CrazyHorse80: For the first problem, I don't know what the issue might be. Does the upshrink work for the Info center and other parts? It uses basically the same code. If you can't figure it out, post a forum URL and I'll come take a look.
Sound should be disabled by default (they're only enabled if a specific cookie is set).
For the smileys, you should make sure that animatedcollapse.js is being included in the <head> section of the code.
Nevermind... I had to remove this 'cause it was taking all my and my visitors CPU time... Everything was going slow, so I took another one...
Thank for your time.
Bye,
PS
Quote from: SunKing on July 23, 2008, 09:42:15 PM
@trekkie and @Zwerko
attach your index.template.php and I will see if I can fix them for you. :D
(Zwerko, obviously, it needs to be the index.template.php of your Sunset theme)
ok, here it is. tnx
@Nequil: In yshout/yshout.php, change
writeLine("<p class=\"shout\">$timestamp $adminlinks$text</p>\n",$chatPath);
to
writeLine("<p class=\"shout\">$adminlinks $timestamp $text</p>\n",$chatPath);
For history/exthistory style, see history() function in yshout/yshout.php; the line "font-size: 10px;" should be changed.
@Threepwud: Your theme seems to be missing the CSS styling:
<style type="text/css">
#yshout {
font-size: 10px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts { /* main shouts area */
color: #000000;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #000000;
}
#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 {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>
Put that in the shoutbox <head> code section, and the spacing issues should be resolved.
Hi mate - thanks for this.
Should I enter it into the index.template.php file? I have checked babylon's css folder and the yshout.css file is in there, containing:
/*SHOUTBOX*/
/* Default theme style. Modify to your taste. */
#yshout {
font-size: 10px;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
border: 1px solid #777777;
padding: 5px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
margin-top: 0;
}
#yshout hr { /* shout divider */
color: #cccccc;
height: 1px;
border: 0;
background-color:#cccccc;
}
#yshout .shout-timestamp {
font-weight: normal;
font-style: normal;
color: #bbbbbb;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 6pt;
color: #141414;
}
#yshout #shout-form {
}
#yshout #shout-form fieldset {
border: none;
}
#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;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
Hi friend's
I uninstalled SMF Shoutbox 1.16b.
Due to some reasons i would like to switch my shoutbox to neonneo.
Bu when i am trying to install neonneo, it says that please uninstall previous version.
I uninstalled and deleted the SMF Shoutbox 1.16b.
even after deleting and with out installing neonneo, I am able to use this SMF Shoutbox 1.16b.
How can i uninstall this SMF Shoutbox 1.16b. and install neonneo,????
@Threepwud: OK, so if you have the yshout.css, you can probably just make a link in index.template.php, which looks like this:
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/yshout.css?July022008" />
@ousu: That's very strange, since my shoutbox has nothing to do with SMF SB (in fact, it shouldn't even be recognized as the same). There's a file called "installed.list" in Packages folder. If you can't see any shoutboxes in that list, post the file and I'll take a look.
Thanks again for your reply, mate.
I have added your line to my index.template.php but nothing different seems to happen. Is there any particular place I should put it?
I have a very limited knowledge of css and html but can try.
My site looks like this:
Here is the installed list:
this is my site:
www.studentsmasti.net
Quote from: Zwerko on July 31, 2008, 03:32:14 PM
ok, here it is. tnx
You need to install the shoutbox first (don't worry about the "test failed" for the index.template.php) then I will move it for you to where you want. :D
@Threepwud: Yes, you should put that line before
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/print.css
@ousu:
nneonneo's AJAX ShoutBox|^|SB_1.09.tgz|^|nneonneo:yshoutforsmf|^|1.12
So, it does seem that the shoutbox is installed. It might be hard to remove (since 1.09-1.12 doesn't uninstall on 1.1.5), so use this page (http://custom.simplemachines.org/mods/index.php?action=parse&attach=49509&smf_version=1.1.2&mod=585) as a guide to removing it. When that's done, edit the installed.list file (make a backup first!) and remove that line.
nneonneo, I have a couple suggestions for your mod.
Include options of where to place the shoutbox. Either:
A.) On the top of the forums.
B.) As a category.
C.) In the Info Center
D.) On a new page with a tab linking to it.
Just some suggestions to reduce the amount of questions. :)
nneonneo, my thanks to you. 5 *****
I uninstalled the previos one and installed this ajax nneonneo AdvSB_1.20.zip manually.
as shown in this below link
http://custom.simplemachines.org/mods/index.php?action=parse;mod=585;attach=60060;smf_version=1.1.5
but i am able to see the shout box but not able to see the typing box(where we shout)
it just looks like
',$txt['yshout_shoutbox'],'
',$txt['yshout_loading'],'
and never it is loding.
and same with all the members
attached all edited files
And in the Modifications.english_british.php is an empty file in the default theme folder.
please help me :( :( :(
If you uninstalled the previous version, why did you manually install AdvSB_1.20?
BTW: All your modifications ended up on a single line, the index.template.php you posted isn't what it should be (did you upload the wrong file?) and the index.php looks like index.template.php with index.php stacked on the end or something :-\
Your installed.list indicates that my shoutbox is no longer installed, so Package Manager installation, which is probably easier, will work. You will have to undo the previous edits, and make sure that the shoutbox code, between // YSHOUT HERE and // YSHOUT END, is completely removed from index.template.php (I can still see the old code there, so it has not been completely removed)
Quote from: optimushunk on July 31, 2008, 02:29:37 PM
Quote from: assam_siddibapa on July 31, 2008, 12:31:40 PM
Quote from: optimushunk on July 31, 2008, 12:14:17 PM
ow srry, i missed one code so had some problem... thanks for this.
I dont find the code u are asking me to search for .... and i didnt add any code in the index .. as i want the shout box in the catogary...
Hey optimshunk can u say me what did u do ???
Yes sure.
In your theme index.template.php where you have installed the shoutbox
Find:-
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<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'];
Add before:-
echo '<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="gridlineColor">
<tr>
<td class="titlebg">Shoutbox</td>
</tr>
<tr>
<td class="windowbg">';
Add after the code which i asked you to find:-
echo '</td></tr></table></div>';
Err, do you have a question?
Hi nneonneo :)
When I type { /clear } in the shoutbox, all text is cleared, but I also want this command to do another thing, I want it to automatically write " Welcome to My Forum " in the shoutbox.
Can you please tell me how I can do this
Thank You nneonneo :)
http://www.simplemachines.org/community/index.php?topic=137508.msg1624572;topicseen#msg1624572 is an example. You probably want
makeShout('Welcome to My Forum');
in place of
processUserCommand('/me has just cleared the shoutbox');
Thank You .. it worked :)
Thank you VERY MUCH :)
Hey great mod :D
I downloaded this one: AdvSB_1.20.zip
It installed fine, I had to do some manual stuff for my theme, but it went okay. My issue is that it doesnt look like the screenshot. I wanted the advanced one, but I want it to look like the one in the screenshot :(.
Today at 08:36 PM
del ban Septimus: test
I want it to be just one line, with no horizontal rule...can I do that?
SB_1.20.zip is the one you want.
Hello, I've looked through this thread for about an hour now trying to read everything and I did a search but came up with only bits and pieces of half the codes. Would it be at all possible for someone to help me with a couple things.
1. Adding smileys
2. a visible box around the shoutbox
3. alternating color text
Thanks to anyone who can help.
1. http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
2. index.template.php or yshout.css: add "border: 1px solid black;" or something like that to #yshout block
3. Do you mean have alternating shouts have a different color? There's a way using CSS, but unfortunately not all browsers have support (I mean something like #shouts:nth-child(even)/(odd)).
The way you will have to do it is to edit yshout.php.
Below
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
add
$chatArr=explode("\n", $chatText);
foreach($chatArr as $n => $shout)
{
if($n%2 == 0)
$chatArr[$n]='<div style="color:#abc">'.$shout.'</div>';
else
$chatArr[$n]='<div style="color:#123">'.$shout.'</div>';
}
$chatText=implode("\n", $chatArr);
where the styles are set as you see fit.
Quote from: optimushunk on July 31, 2008, 02:29:37 PM
Quote from: assam_siddibapa on July 31, 2008, 12:31:40 PM
Quote from: optimushunk on July 31, 2008, 12:14:17 PM
ow srry, i missed one code so had some problem... thanks for this.
I dont find the code u are asking me to search for .... and i didnt add any code in the index .. as i want the shout box in the catogary...
Hey optimshunk can u say me what did u do ???
Yes sure.
In your theme index.template.php where you have installed the shoutbox
Find:-
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<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'];
Add before:-
echo '<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="gridlineColor">
<tr>
<td class="titlebg">Shoutbox</td>
</tr>
<tr>
<td class="windowbg">';
Add after the code which i asked you to find:-
echo '</td></tr></table></div>';
Opps sorry the question went inside
I dont find the code u are asking me to search for .... and i didnt add any code in the index .. as i want the shout box in the catogary...
Hey optimshunk can u say me what did u do
" author=nneonneo link=topic=137508.msg1639419#msg1639419 date=1217516241
@Rafferty: It's a known problem with 1.20. I've got a fix in 1.21, and will likely release that later this week. "
Any news on 1.21 nneoneo re profile User Action ??
Quote from: nneonneo on August 01, 2008, 11:58:49 PM
1. http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
2. index.template.php or yshout.css: add "border: 1px solid black;" or something like that to #yshout block
3. Do you mean have alternating shouts have a different color? There's a way using CSS, but unfortunately not all browsers have support (I mean something like #shouts:nth-child(even)/(odd)).
The way you will have to do it is to edit yshout.php.
Below
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
add
$chatArr=explode("\n", $chatText);
foreach($chatArr as $n => $shout)
{
if($n%2 == 0)
$chatArr[$n]='<div style="color:#abc">'.$shout.'</div>';
else
$chatArr[$n]='<div style="color:#123">'.$shout.'</div>';
}
$chatText=implode("\n", $chatArr);
where the styles are set as you see fit.
Thank you soooooo much those all worked like a charm :D
@assam_sidibapa, if you want it to show up *as* a forum, then it is actually very easy.
Just make a new forum, call it Shoutbox or something, and put <div id="yshout">Loading...</div> as the description.
@Rafferty: Testing will start soon.
List of changes:
behaviour, prototype and domFunction have all been obsoleted.
Who's Online and related mods should now work correctly
Postgroup colours are now used if membergroup colours are unavailable
Installation of language files should be better at detecting broken installs
Default colors are no longer set for the CSS, allowing themes to override it
How about automatic scrolling?
http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
DIdnt work .
I put the
// 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
In the description .... it show like in the attachment.
@assam_sidibapa: Just
<div id="yshout">Loading...</div>
is enough. You also have to have the <head> code installed to the theme.
I know your busy nneonneo & I appreciate your efforts but just one question: the type box in the shoutbox, is there a way to make it wider
#yshout #shout-text width: in CSS (index.template.php or yshout.css)
yes i was afraid of that, i have increased it in the css file but it made no difference
Quote from: nneonneo on August 02, 2008, 12:58:15 AM
http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
Thanks it automatically goes to the bottom of the shouts now but how about a continuous scroll action.
hello everyone.
i need help on nneonneo's shoutbox.
i already installed this shoutbox and been using it in my helios theme.
but i have this problem, i have nneonneo's shoutbox installed in my smf 1.1.5 package and want it to appear also in my new WOW DTK theme. i dont know how and what to edit with this current theme im using. the shoutbox just dont appear automatically when i change theme.
thanks to those who'll response to this concern.
a step by step guide on how to make it appear in my wow theme would be greatly appreciated! im noobie about codes, css, html or whatsoever. sorry.
@Rafferty: Is there a CSS block in index.template.php?
@memyselfandI: Wrap the shouts in a <marquee> tag:
in yshout/yshout.php, change both instances of
echo '<div id="shouts">',readChat(),'</div>';
to
echo '<marquee direction="up"><div id="shouts">',readChat(),'</div></marquee>';
@psynx: You'll first need to add the <head> code to that theme (it's always in the same spot in index.template.php), then the shoutbox code. Some people have found it easiest to just make the shoutbox into a forum (by setting the description to <div id="yshout">Loading...</div>) or to put it in the news header (with a news item using the text <div id="yshout">Loading...</div>). If you don't like either of those options, then you need to edit index.template.php and add the shoutbox code in a suitable location.
I didn't find this on here yet but for some reason only admin can see the shoutbox is there something I need to adjust somewhere?
Admin panel -> Membergroups -> Permissions -> Shoutbox
Quote from: nneonneo on August 02, 2008, 09:08:25 AM
@assam_sidibapa: Just
<div id="yshout">Loading...</div>
is enough. You also have to have the <head> code installed to the theme.
I dint understand ???
Quote from: nneonneo on August 02, 2008, 11:48:50 AM
@psynx: You'll first need to add the <head> code to that theme (it's always in the same spot in index.template.php), then the shoutbox code. Some people have found it easiest to just make the shoutbox into a forum (by setting the description to <div id="yshout">Loading...</div>) or to put it in the news header (with a news item using the text <div id="yshout">Loading...</div>). If you don't like either of those options, then you need to edit index.template.php and add the shoutbox code in a suitable location.
alright shoutbox has appeared to my new theme now. but why can't i see my admin control for the shoutbox? like, history, commands, and etc. and in the permission - membergroup i dont see those text and boxes settings for shoutbox.
Quote from: psynx on August 02, 2008, 01:13:48 PM
Quote from: nneonneo on August 02, 2008, 11:48:50 AM
@psynx: You'll first need to add the <head> code to that theme (it's always in the same spot in index.template.php), then the shoutbox code. Some people have found it easiest to just make the shoutbox into a forum (by setting the description to <div id="yshout">Loading...</div>) or to put it in the news header (with a news item using the text <div id="yshout">Loading...</div>). If you don't like either of those options, then you need to edit index.template.php and add the shoutbox code in a suitable location.
alright shoutbox has appeared to my new theme now. but why can't i see my admin control for the shoutbox? like, history, commands, and etc. and in the permission - membergroup i dont see those text and boxes settings for shoutbox.
Make sure your language setting in Admin > Server Settings is set to English and not utf8-english
thanks ccbtimewiz. my settings is already set to english, i can see some of shoutbox admin commands like 'del', 'ban' but i dont see 'history' and 'commands' in my admin control to the shoutbox.
and aside from that maybe you guys could please let me know how to insert text to the right side of my shoutbox? because i want to appear it like in this attached files to this post.
(http://C:%5CDocuments%20and%20Settings%5Csimon%5CDesktop)
Hello .. please help me ! i installed the http://custom.simplemachines.org/mods/index.php?mod=585 11.5 and upload it to the forum and everything worked with no errors ! it's just it's keep loadin !
loadin....
like this ! and i get nothing ! i used the default theme and the same !! please help meh ..
thanks
Quote from: nneonneo on August 02, 2008, 11:48:50 AM
@memyselfandI: Wrap the shouts in a <marquee> tag:
Thanks, but it didn't do anything is there another file I need to do that in?
Very quick - is there any way to delete all the shoutbox history? Apparently the /clear: command simply clears what is displayed. My admin without ftp access had to manually delete each line last night.
Thanks
Quote from: nneonneo on August 02, 2008, 09:14:33 AM
#yshout #shout-text width: in CSS (index.template.php or yshout.css)
@Rafferty: Is there a CSS block in index.template.php?
I'm afraid I can't find it nneonneo, index.template attached
There is no CSS block for shoutbox in your index.template.php, which means there should be a yshout.css file located: Themes/{current theme}/css/yshout.css.
That is the file that you will need to edit to get the shoutbox to display to your liking. :D
but I have already adjusted the text width in the css file and it made no difference to the width
Do you have a test account I can sign up under to take a look at it (or can guests see the shoutbox)?
I would then be able to add a "manual override" to the width. Basically would be something to the effect of <div id="yshout" width="100%", although the placement of the width parameter may be elsewhere within the shoutbox() function.
Also, if you are using a different theme I had to manually link inside the index.template.php file to the new .css file. All changes made didn't work until I did this - could help?
an account would only show you the current box width which is standard
I only use default theme
Quote from: Threepwud on August 02, 2008, 08:48:01 PM
Also, if you are using a different theme I had to manually link inside the index.template.php file to the new .css file. All changes made didn't work until I did this - could help?
Threepwud makes a very valid point here, too.
As far as an account (or guests being able to see it), I need to see what the "standard" width is on your theme with your setup so I can assess where to place the width override. Simply allowing guests to view but not post (in SMF permissions) would be fine.
@assam_siddibapa: Basically, the description for the forum should just be
<div id="yshout">Loading...</div>
but it won't work unless you've installed the <head> code (see mod page) to the theme.
@psynx: Check Modifications.english.php in your Themes/<theme>/languages folder. If it exists, you should add the text required (see "No text?" on the main mod page or the first post of this thread).
For making the required layout, you should just add a table around the shoutbox:
<table width="100%">
<tr><td width="80%">{{SHOUTBOX CODE}}</td><td width="20%">{{TEXT}}</td></tr></table>
@NaWaR: Try 1.20
@memyselfandI: Truthfully, I have no idea how the marquee tag works (it's really non-standard and works somewhat differently on different browsers), but it's pretty much the only way short of a lot of JS to make it work. If you really, really need the feature and can't figure out <marquee>, then you should use Ultimate Shoutbox.
@Threepwud: By deleting or renaming history.home.txt. If you wish to never save history, set $historyFormat to '' in yshout/settings.php.
A /clearhist command can also be implemented. This would go right above "case "/clear":"
case "/clearhist":
unlink($historyPath);
return true;
@Rafferty: Like Threepwud said, there's no link in the provided index.template.php. On this page (http://custom.simplemachines.org/mods/index.php?attach=60060&smf_version=2.0_Beta_3.1_Public&mod=585&action=parse) you can see the instructions for adding it:
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/print.css
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/yshout.css?July022008" />
Many thanks to Sunking for his help. Resolved the quiery thank you. We are a small forum of Ex-veterans and it's very important to us. Great job too nneonneo
We worked out resizing the input box by adding style="width:50%" to the <input id="shout-text". :D
And @Rafferty, it is a good idea to go ahead and add the link to the css file so that you can easily style your shoutbox further.
Hi,
Just wondering how to only show say 5 or 6 shouts, as I keep shouting, the page keeps getting longer.
Thanks
Kirsty
open settings.php in your yshout folder and change
$maxLines=25;
to 5 or 6.
I was wondering, The shoutbox is shown on every page of the forum, How do i turn it off on some of the sections, like the admin panel, profile page or help page or something like that ?
Thank you.
Hi SunKing, for some reason it won't allow the edit to settings.php.......
you should be able to open the file in notepad, notepad+, notepad2, or similiar and make the change. then you would simply upload the modified file back to the yshout folder overwriting the first
It won't let me, everytime I try it comes up with "error". I thought it might have been something wrong with the server but I can edit and even delete other files, just not this one for some reason.
neo... you know how SMF Shoutbox has a border, etcetera, why don't you add this stuff. It'll make your shoutbox way more professional.
Quick one, since my last adjustment, my shout display box has gone from one to two lines, how do i get it back to a single line display please?
@Kirsty are the files chmodded correctly? You may want to try 755 or even 777.
@Carb0n it's already been added by including the SB inside the upper <div>
@Rafferty Let me go take another look....:D EDIT: whoops! :D, maybe we need to leave the account for a bit :D
Rafferty, the exact same thing happened to mine. The index.template.php file simply wasn't being directed to my css/yshout.css file. When I linked it, it worked swimmingly.
One way to test it is to edit the css file by making a huge change which you should notice - if itdoesn't look any different then the file most probably is not being linked.
Check reply #3267 for info.
How can I make the new post and the shout bar appear above not on the end of the shoubox
@optimushunk: Use $context['current_action'] to control the shoutbox.
For example:
if(!in_array($context['current_action'],array(...)))
{
SHOUTBOX CODE
}
Note that admin actions are any of
'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'
which is rather painful to look at (but check out SMF 1.1.5's template_menu function for that).
@klyster: If you are using v. 1.20, just set $reverseShouts and $shoutFormOnTop in yshout/settings.php.
@ nneonneo
i still don't get it.
anyway, i sent you a msg regarding with my concerns.
Quote from: Threepwud on August 02, 2008, 11:22:39 PM
Rafferty, the exact same thing happened to mine. The index.template.php file simply wasn't being directed to my css/yshout.css file. When I linked it, it worked swimmingly.
One way to test it is to edit the css file by making a huge change which you should notice - if itdoesn't look any different then the file most probably is not being linked.
Check reply #3267 for info.
It,s not working Threepwud, Ive added the link code too
Sunking, I have approved that guest account
So wen is the new version going to release ???
@psynx: You should be able to see it now. It was just missing the text in Modifications.english.php.
@assam_siddibapa: I've been busy the past few days, but I should be able to get all my testing done today.
@nneonneo
thanks a lot.
perhaps i followed your instructions wrongly because i added the codes after '?>' and it was really messy! :D
but one more thing, i give my regular members access to the shoutbox through permissions > membergroup settings but they still could not see the shoutbox on their own page. they don't see it. i am the only who has shoutbox on my page.
perhaps nneonneo you may try and check my forum site back or maybe give me instructions how to fix it.
Quote from: nneonneo on August 19, 2007, 03:39:56 PM
Adding sound:
Get SoundManager2 (http://www.schillmania.com/projects/soundmanager2/)
Place soundmanager2.js in yshout/js
Place soundmanager2.swf in yshout/
Place the desired sound in yshout/ and change the URL below to match (MUST BE MP3!)
Place the following code after
<script src="',$boardurl,'/yshout/js/yshout.js?Jul222007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
in index.template.php:
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">soundManager.url="',$boardurl,'/yshout/soundmanager2.swf";
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function() {
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/sound.mp3", autoPlay:false});
}</script>
Replace <PLAY SOUND> by soundManager.play('sound');
EDIT: Update for newer Soundmanager version (dated Mar 31 2008)
I am lost - where is <PLAY SOUND>?
@digit: See http://www.simplemachines.org/community/index.php?topic=137508.msg1206809#msg1206809
my problems were solved! cheers!!! ;D
thanks to you nneonneo
Quote from: renkliforum on April 25, 2008, 06:40:25 AM
Quote from: falconforce on January 16, 2008, 10:20:09 AM
I try modified own shout box, so it can turn off sound ;)
after you modified mod with sound...
in yshout.js, after
if (oldShouts != null && oldShouts != $("shouts").innerHTML)
{
add
if(get_cookie("shoutSound") == "true")
{
soundManager.setVolume('sound',200); // my addition line, you can remove it
soundManager.play('sound');
}
and add this to first line of file
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
in yshout.php, add this to anywhare are you need
if(!isset($_COOKIE['shoutSound'])) {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24);delete_cookie(\'yShout_open\');loadChat();">Use Sound</a>';
} else {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();">No Sound</a>';
}
PS. I'm add that after...
case "init":
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&history\')">',$txt['yshout_history'],'</a> <a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
it's doesnt work? its never mute... why?
I get a Use sound link, and it works GREAT! (FINALLY!) BUT the Use sound link never turns to "No Sound" any idea why?
Quote from: SunKing on August 02, 2008, 11:18:39 PM
@Kirsty are the files chmodded correctly? You may want to try 755 or even 777.
When I try to change it to 755 or 777 I get this message.
COMMAND:> SITE CHMOD 755 /public_html/smf/yshout/settings.php
550 Could not change perms on /public_html/smf/yshout/settings.php: Operation not permitted
ERROR:> Requested action not taken (e.g., file or directory not found, no access).
@digit: Oops,
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
should NOT be added. I think I will post an updated sound guide soon...
Progress on 1.21:
I've recently discovered a security flaw in the administrative functions. Hence, it will take some time for me to patch the hole. It cannot be used to compromise your forum, but could be employed to erase shouts or ban users from the shoutbox.
How shall i add in a type of fixed text as in an announcement or a sort of news fader to make the shoutbox rules flashing just inside the shoutbox and under the top line ?
I suppose you might have understood a bit... It seems a bit blury image of the description i am giving... but yet i think you might get it right..
Thank you.
Quote from: F.L.A.M.E.R on August 03, 2008, 07:55:02 PM
How shall i add in a type of fixed text as in an announcement or a sort of news fader to make the shoutbox rules flashing just inside the shoutbox and under the top line ?
I suppose you might have understood a bit... It seems a bit blury image of the description i am giving... but yet i think you might get it right..
Thank you.
Like inferno for vB?
hmm.. not exactly.. just like having a shoutbox fader up there which flashes up the rules... and to manage that, have a shoutbox option in the admin panel with commands of locking, viewing ban list of shoutbox, history, and editing if possible... and some other commands which an admin might need...
the commands arnt a necessity but it would be like a suggestion to add in into next shoutbox update or version... but if possible then please let me know how to do it...
Thank you.
Hey there,
Got the SB and LOVE it.
Is there a way, however...to make it so it has a post requirement to use? Like, must have posted 10 times to the forum this week to have the SB activated? Thanks.
Quote from: nneonneo on August 03, 2008, 07:50:50 PM
@digit: Oops,
if (delete_cookie('shoutSound'))
{
set_cookie('shoutSound','true',3600*24);
}
should NOT be added. I think I will post an updated sound guide soon...
If I remove that, then the sound is played on each refresh - and not just when a new message is posted. 'Looking forward to an updated sound how-to. :P
@F.L.A.M.E.R: I'm not going to be making an admin CP anytime soon, since I've got other things to work on. Besides, every feature you requested is available via text commands /lock, /banlist, [History], ... (just editing is not possible, but I don't like that as a feature...you could add it yourself :P)
@digit: Oups. Yeah, AdvSB has it *properly* implemented...I will simply post the instructions to get from SB to AdvSB.
@I Scream Cow: Make a postgroup, then give it the required permissions.
How about putting an emoticon buttons on the shoutbox. So that some of our users don't need to type it.
I have a problem.
I made a shout, I saw this error
(http://www.bankfotek.pl/image/113175.jpeg)
but shout appeared in Shoutbox.
In history, I have only things, which I see actually in shoutbox, no shouts, which I made past.
Could you help me?
//Sorry for English grammar
@klyster: http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
@biohrd: chmod yshout/chats/history.home.txt to 755 or 777.
THX it works.
ok.. its ok about the admin cp commands.. but the 1st idea can be possible ? like the sort of place inside the shoutbox just on the top with a type of fader to flash up the rules ?
Hi have got a link the smileys.php file for version 1.20
hello nneonneo can 'insert smiley buttons for inserting text and color.
version AdvSB_1.20
An example:http://mosc63.altervista.org (http://mosc63.altervista.org)
Thank you.
hello nneonneo, just one question, how can i disable guest from shouting ??? these guest are messing up my shoutbox
www.filipinohorsevelocity.com/community
@chunkster, mosc63: Sorry, I don't quite understand...
@jazelle_rae: On 1.20, just remove the "post in shoutbox" permission from guests. On 1.16 and prior, edit yshout/yshout.php and change $allowGuestsPost to false.
thank you very much! this mod is awesome
sir nneo can i ask another ??? i can't put my shoutbox on tp center block ??? thank you in advance ;)
hi folks, I'm trying to move the SB from the SMF Forum headers to a TP center block (i would love it to the side but I've read of some wrapping problems, but the problem is the same)
I modified the index.template.php (usual default style) but when i put the visualization code in a phpblock i only get " ...loading shoutbox... "
In my server error.log i found an error for "file not found" in the main forum installation directory something is looking for the file "yshout"
Any ideas? Thank you very much in advance.
Hello, I am using shoutbox for 1.1.5
My shoutbox was running all well and suddenly today even if the user is logged in it shows you shouldbe logged in to use the shoutbox. I was editing the inde.template.php for my theme for the ads mod to work properly. but due to errors I removed the edits. Even that time everything was working exactly as it was. Then after restoring the older one index.template.php after some time the shoutbox now considers every user as a guest.. and it shows the message:- "Sorry, you must be logged in to use the shoutbox!".
I also uninstalled and re-installed the shoutbox. Also checked all the permissions, everything is correct.
Please tell me what can be wrong and how do i solve this.
Thank you.
@jazelle_rae, fozzy: all you need to have in the phpbox is
echo '<div id="yshout">Loading...</div>';
But you must have the <head> code installed to the theme first.
@F.L.A.M.E.R: No idea. My guess is that you've accidentally triggered "elseif($context['user']['is_guest'])", but I don't know how that would happen. Did you perhaps restore the wrong index.template.php?
No, I had done edits which i undo it as i got errors. I even uninstalled and reinstalled it. Even i checked the permissions from the database and it is set up to be "1" everywhere.
Please help me out. It was all working great.. or else i have to delete all the files and then restore the database again and then put in the 30 features with manual edits for this shoutbox which i love alot.. :(
here is a test account for you so that you can see the problem yourself.
site url:- http://hackerzden.com
username:- storm
password:- 124563
OK, for some reason, your quick login bar causes the forum cookie SMFCookie* to be set for 0 minutes, causing you to appear to be instantly logged out. However, a PHPSESSID cookie keeps you logged into the forum, but not the shoutbox (which I don't understand, since I'm using session_start...oh well :P
So, you need to use the usual login page http://hackerzden.com/index.php?action=login for logging in.
http://www.project-bb.org/index.php?action=chat1
When i type & press enter, Nothing happens. Also after clicking shout button, nothing happens. I'm using SMF 2.0 Beta 3.1
If you need test account i will give you.
Quote from: nneonneo on August 05, 2008, 02:18:20 PM
OK, for some reason, your quick login bar causes the forum cookie SMFCookie* to be set for 0 minutes, causing you to appear to be instantly logged out. However, a PHPSESSID cookie keeps you logged into the forum, but not the shoutbox (which I don't understand, since I'm using session_start...oh well :P
So, you need to use the usual login page http://hackerzden.com/index.php?action=login for logging in.
nope via that link though it doesnt work. I understand how you where able to shout there. Even the user M@NI@C is able to shout and even you. But when i login and some other user whom i know logins, it instantly does what you saw. Yes it works when it is ticked on Login forever option. Anything that i can do to solve this ?
Would repair_settings.php be able to solve up this issue ? and any server settings as such ?
Thank you for looking into this issue.
@SwapsRulez: You've got shoutbox version 1.20, but the code in index.template.php is for a much earlier version. It needs to be updated using the code from the main mod page.
@F.L.A.M.E.R: You might be able to fix it by changing the default login period, if such a thing even exists. Otherwise, you probably want to add a hidden form entry to the quick-login form:
<input name="cookieneverexp" value="true" type="hidden" />
where can I download the attachments for the shoutbox mod
Lolz.. why is it like that. I set it up to 60 minutes and it works well. How can changing these default login time create problems ?
And where shall i put that secret line ? Into index.template.php ?
Works fine here on 1.1.5 apart from no permissions
all sorted now
Quote from: nneonneo on August 05, 2008, 02:53:00 PM
@SwapsRulez: You've got shoutbox version 1.20, but the code in index.template.php is for a much earlier version. It needs to be updated using the code from the main mod page.
Sorry but i didnt understand that. Which code should i put there ? Do you have that code which will work on separate page using custom action mod.
I've inserted all code which was suppose to be inserted in my custom index.template.php
If i'm wrong, can you give me the code which i need to put on the custom page ?
Thanks in advance. :)
@SwapzRules: It's marked with <head> code, and replaces the existing "first block" of code (JS + CSS)
@F.L.A.M.E.R: That "secret line" goes in your index.template.php where-ever the quick-login form is put it before the </form>)
I installed Advanced AJAX Shoutbox 1.20 and get this message:
Fatal error: Call to undefined function shoutbox() in F:\wamp\www\kaart\Sources\Load.php(1857) : eval()'d code on line 333
On line 333 from load.php is this:
// Only load this stuff if the user isn't a guest.
Anyone a solution???
I use SMF 2.0 Beta 3.1 Public
Thanks.
Stef.
Fixt.
Forgot some code ;)
Having tried this on both 1.1.5 and Beta 3.1 I'm extremely annoyed. This doe's not install permissions so any Joe Blogs can just type a username and spam away. Sorry but I think their should be a warning on this mod so they don't get an ear full from members
I use AdvSB_1.20.
There you have the shouts in two lines.
I want it at one line, how can i change this.
Thanks,
Stef.
Well, I guess everything in shoutbox works great. Just some new features problem.
I added the smilies according to the code edits you have asked to do. But the smilies dont come up like perfectly what I actually think it should come up..
the smilie :( and >:( have a great difference. But in the shoutbox when shouted it catches :( and changes >:( to > :( (without space) so the arrow comes up. I think you should see it yourself if you want to.
Smilar things happen with the smiley codes who have > before them
Site URL:- http://hackerzden.com
User:- storm
Pass:- 124563
Another thing which i was thinking was to add the Open smiley and Close option above in the center rather than at the base. Can you tell me the edits please.
Thank you.
@Normally: SB_1.20 has the one-line format.
@riker: 1.20 should install permissions, and they should be visible through the Membergroups->Permissions page (if you don't see them, check your language files)
@F.L.A.M.E.R: I'm using the same parsing system as SMF, so I don't see how the smileys could be parsed differently...and it works for me.
As for centering it, it's a simple matter of changing
<div class="smalltext" style="padding-left:25px;">
to
<div class="smalltext" style="padding-left:25px;" align="center">
Quote@Normally: SB_1.20 has the one-line format.
In the shoutbox its like this:
Vandaag om 16:57:10
del ban Stef: text
and i want it like this:
Vandaag om 16:57:10 del ban Stef: text
Or, you could edit preg_timeformat in yshout/settings.php and drop .'<br />' from the function.
in order to make the smileys work properly there any way i can do anything rather then chaing the code, i mean change :( to like -: or something as such...?
Thank you for the centering part... how shall i shift it up, just under the history,commands.... line ?
@nneonneo
Quote@Nequil: In yshout/yshout.php, change
writeLine("<p class=\"shout\">$timestamp $adminlinks$text</p>\n",$chatPath);
to
writeLine("<p class=\"shout\">$adminlinks $timestamp $text</p>\n",$chatPath);
ok, but "del" doesn't working.
Quote from: nneonneo on August 06, 2008, 11:15:33 AM
Or, you could edit preg_timeformat in yshout/settings.php and drop .'<br />' from the function.
Oke thanks, that works.
Quote from: nneonneo on August 06, 2008, 01:49:34 AM
@SwapzRules: It's marked with <head> code, and replaces the existing "first block" of code (JS + CSS)
Thanks, played with some codes. & its fixed now. :)
Thanks sooooo much once again. :)
I'h getting a Test Faild Error in default/index.template.php I tried to go ahead and installed it. The shout box doesn't show up. PS: Im not using the default theme or any that you gave the options for.
@ God Of Mana
Do the manual Edits in the file in which the test has failed. It would then work for the default theme.
Then you can do the manual theme edits in index.template.php for the specific theme which you are using. This should probably make this mod work on your theme.
Where are you setting member_group_color? My users want to have different color names, not dependent on whether they are mods or not.
@Nequil: change
$newFileContents=preg_replace('/<p[^>]*><span class="shout-timestamp" title="'.str_replace('|','\|',$spanTitle).'">.+\n/','',$fileContents);
to
$newFileContents=preg_replace('/<p[^>]*>.*<span class="shout-timestamp" title="'.str_replace('|','\|',$spanTitle).'">.+\n/','',$fileContents);
@MissRancher: The makeShout function, specifically the line
$a_style = ' class="userclass" style="color: '.$user_profile[$user['id']]['member_group_color'].'"';
im having troubles with this mod...
im usin anecdota theme and the mod doesnt modify it so i edited php code but the shoutbox doesnt load, i mean it loads but then dissapears and idk what to do
help!
Regards...
@ЯocKayseri: in yshout/yshout.php, find parse_bbc and add a "false" param, so, e.g. it becomes
parse_bbc($text,false);
@leechingzone: Does it work in the default theme? Did you check the <head> code?
Quote from: nneonneo on August 06, 2008, 11:02:44 AM
@riker: 1.20 should install permissions, and they should be visible through the Membergroups->Permissions page (if you don't see them, check your language files)]
1.20 wont install on 1.1.5 or beta 3.1. All attritutes are set to 777 and I've tried it on two different hosting sites
QuoteInstalling this package will perform the following actions: Type Action Description
1. Execute Modification ./index.php Test successful
1. Add Before ./index.php Test successful
2. Execute Modification ./Themes/default/index.template.php Test successful
1. Add After ./Themes/default/index.template.php Test successful
2. Add After ./Themes/default/index.template.php Test successful
3. Execute Modification languages/english_all.xml Modification parse error
4. Execute Modification - Modification parse error
1. Add Before - Test successful
5. Execute Modification permissions/install-perms-2.0.xml Modification parse error
6. Execute Modification - Modification parse error
1. Add Before - Test successful
7. Extract Tree ./yshout
EDIT: also used the temp folder trick
Quote
@Nequil: change
$newFileContents=preg_replace('/<p[^>]*><span class="shout-timestamp" title="'.str_replace('|','\|',$spanTitle).'">.+\n/','',$fileContents);
to
$newFileContents=preg_replace('/<p[^>]*>.*<span class="shout-timestamp" title="'.str_replace('|','\|',$spanTitle).'">.+\n/','',$fileContents);
All works :) thanks.
Quote from: F.L.A.M.E.R on August 06, 2008, 11:17:46 AM
in order to make the smileys work properly there any way i can do anything rather then chaing the code, i mean change :( to like -: or something as such...?
Thank you for the centering part... how shall i shift it up, just under the history,commands.... line ?
Anything that can be done ?
Was waiting for the reply but didnt find..
Thanks
Im not good at edits, can some one do all the edits for index.template.php for me? Pleaseeee... :P
@riker: Try downloading the package again. I have no idea what would cause the parse error, since I've successfully used the package posted without any problems...
Otherwise, for 1.16, you can just edit yshout/yshout.php and turn off $allowGuests and/or $allowGuestsPost.
@F.L.A.M.E.R: I don't know about the smiley code; as for moving the bar, you can do it but it is not so easy, since it involves editing the init part in yshout.php; it is probably best to avoid doing it (you have to put the div and all relevant code in yshout.php, and since scripts don't execute in dynamically-loaded code, you have to split the script from the code...)
@God Of Mana: Where did you want the shoutbox? The <head> code is already there, it is simply a mater of finding the right place to put the shoutbox code.
Quote from: nneonneo on August 07, 2008, 12:43:39 AM
@ЯocKayseri: in yshout/yshout.php, find parse_bbc and add a "false" param, so, e.g. it becomes
parse_bbc($text,false);
@leechingzone: Does it work in the default theme? Did you check the <head> code?
yes it works perfectly but not on anecdota theme :S
im telling u what i did.. first i installed the mod and worked on default theme but on anecdota theme didnt so i checked this topic and made the changes u posted on first topic and the shoutbox dissapear
btw.... this is a great shoutbox congratulations :D
Regards
oh.. why are things so complicated. Alright never mind, If i am really in a need i'll let you know, but most probably that would do, but it would be good if it was been explained and not much edits where to be done. Well, no probs with your sbox on my site at the moment. Thank you for your support.
Hi chat is working great now but when I activate custom smileys I get an Fatal error: Call to undefined function: () in /home/chunkst/public_html/arnold/mymod/smiley.php on line 41
Quote from: nneonneo on August 07, 2008, 12:33:45 PM
@riker: Try downloading the package again. I have no idea what would cause the parse error, since I've successfully used the package posted without any problems...
Otherwise, for 1.16, you can just edit yshout/yshout.php and turn off $allowGuests and/or $allowGuestsPost.
@F.L.A.M.E.R: I don't know about the smiley code; as for moving the bar, you can do it but it is not so easy, since it involves editing the init part in yshout.php; it is probably best to avoid doing it (you have to put the div and all relevant code in yshout.php, and since scripts don't execute in dynamically-loaded code, you have to split the script from the code...)
@God Of Mana: Where did you want the shoutbox? The <head> code is already there, it is simply a mater of finding the right place to put the shoutbox code.
After the news fader on the homepage.
@leechingzone: Do you have a forum URL I could check?
@chunkster: Are you using SMF2? Did you download the SMF 2 version of the smiley.php?
@God Of Mana: Probably better to edit BoardIndex.template.php if you only want it on the homepage.
yes I am
@chunkster
I was getting that same error when I was using the wrong smiley.php with SMF 2.0.
The one you want to use with SMF 2.0 is smiley_SMF2.php attached HERE (http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091).
The one you are using is trying to make the old db_query() which no longer works in SMF 2.0.
Quote from: nneonneo on August 07, 2008, 04:37:54 PM
@leechingzone: Do you have a forum URL I could check?
@chunkster: Are you using SMF2? Did you download the SMF 2 version of the smiley.php?
@God Of Mana: Probably better to edit BoardIndex.template.php if you only want it on the homepage.
yup here u go:
www.leechingzone.co.cc
btw...i think i got the problem..i hadnt checked the permissions for the users to use the shoutbox im gonna try again with the modyfied php file....
Quote from: nneonneo on August 06, 2008, 08:51:04 PM
@MissRancher: The makeShout function, specifically the line
$a_style = ' class="userclass" style="color: '.$user_profile[$user['id']]['member_group_color'].'"';
Thanks - but where do you actually define what the 'member_group_color' is?
@leechingzone: OK, I think it might've been permissions, so let me know how it works out.
@MissRancher: SMF defines it; I just load the data. 1.21 will include postgroup colors, if that's what you wanted.
nope it wasn't...the permissions are set for all users but still the same problem
i did a test user if u wanna check out
user: test
pass: 12345678
www.leechingzone.co.cc
I want to knock down the number of visible posts. How do I change this number without reinstalling the mod?
@leechingzone: Try turning off $gzipCompression.
@theglobe: $maxLines in yshout/settings.php or $max_lines in yshout/yshout.php
omg it did worked :D tys a lot nneonneo :D
but just for me
well im confused my global admin told me that he had this error but as root or as test the shout works
Fatal error: Cannot redeclare template_init() (previously declared in /home/kamilo89/public_html/forum/Sources/Load.php(1726) : eval()'d code:32) in /home/kamilo89/public_html/forum/Sources/Load.php(1726) : eval()'d code on line 57
Check your index.template.php file for a possibly duplicated template_init() call
When using the cloud theme by Hoochie Coochie Man, when I make the theme edits, the shoutbox isn't anywhere to be found. Is it not compatible with this theme?
Quote from: nneonneo on August 07, 2008, 04:37:54 PM
@God Of Mana: Probably better to edit BoardIndex.template.php if you only want it on the homepage.
Ok, attached, boardindex.template.php
But if you had done the edits to the index.template.php ,where would have the shout box appeared?
Hi nneonneo :)
I don't know why ... but the shoutbox has been acting strange lately !!
before the moment I typed something (a fraction of a second later ) it will show in the Shoutbox !! Now I'm having to wait 1 minute for it show up !!
I don't know why this problem has occured .. I mean I've not touched anything or changed any settings !!
Also can you tell me how I can disable the History thing and remove it from the buttons over the shoutbox
Thanks
Quote from: nneonneo on August 07, 2008, 11:51:10 PM
Check your index.template.php file for a possibly duplicated template_init() call
well there's no duplicated template_init() call but the shoutbox is working great tys a lot nneonneo :D
well and now i gonna try to put the buttons and the other things i need help with that :P
Hi nneonneo, i found a problem in my shoutbox.
I've put the shoutbox in custom page. I can access the shoutbox, but all the members other than me can't access it. :(
Even if they can't see the shoutbox.
Also, i've given permissions to all of that custom page. :(
Will give you a test account if needed.
here is my chat --> http://www.project-bb.org/index.php?action=chat
it was the same problem i had u should try turning off gzipcompression on yshout/settings.php
@Old Lynx: How odd...have you tried it in the independent /yshout shoutbox? As for removing history, it is very easy; just remove the history link from yshout/yshout.php.
hey nneonneo it's me again xD
i'm quite confused about putting shout icons where can i get info for that?
i mean the menu icons :D
Quote from: leechingzone on August 08, 2008, 01:39:04 PM
it was the same problem i had u should try turning off gzipcompression on yshout/settings.php
Turned Off. Still the same problem. :(
does it work on default theme?
Quotehave you tried it in the independent /yshout shoutbox?
I don't know what you mean by that nneonneo :( sorry can you explain a little how I can do that .. I'm a n00b.
thanks
@leechingzone: take a look at the AdvSB yshout.php for an implementation of the shout icons.
@Old Lynx: go to http://domain.com/forum/yshout and you should see (with 1.20) a shoutbox; see if that shows the same problem.
@SwapsRulez: Maybe a test account is needed...
Sorry about that nneonneo the problem turned out to be stupid Internet Explorer
I cleaned its offline files, passwords, temporary files .... and it is all back to being fast now !
but I decided if IE7 is gonna keep doing this .. I might as well use something else .. so now I'm on FireFox 3
Thank You nneonneo :D
Quote from: nneonneo on August 08, 2008, 03:17:26 PM
@leechingzone: take a look at the AdvSB yshout.php for an implementation of the shout icons.
@Old Lynx: go to http://domain.com/forum/yshout and you should see (with 1.20) a shoutbox; see if that shows the same problem.
@SwapsRulez: Maybe a test account is needed...
okay done the icons yay! and what about the shoutbox bar and the + and - thing?
Whenever I try to make the theme edits for another theme, the shoutbox doesn't show up.
that is because each theme is coded differently trekkie :)
Quote from: nneonneo on August 08, 2008, 03:17:26 PM
@SwapsRulez: Maybe a test account is needed...
Sure sir, here is the address with test account.
Site address : http://www.project-bb.org/
Chat location : http://www.project-bb.org/index.php?action=chat
Username : test
Password : test
The code for the custom action mod :
<?php
echo '<html><head>';
// YSHOUT HERE - <head> code
global $boardurl,$shoutFile;
$boardurl="http://www.project-bb.org/"; // change this to the relative or absolute path to the forum root
$shoutFile='home';
//if(!file_exists("$boardurl/Themes"))
// die("Can't find Themes directory -- is \"$boardurl\" the correct path to the forum root?");
if(file_exists("$boardurl/Themes/default/script.js"))
echo '<script src="',$boardurl,'/Themes/default/script.js" type="text/javascript"></script>';
else
echo '<script src="',$boardurl,'/Themes/default/scripts/script.js" type="text/javascript"></script>
<script type="text/javascript">var smf_charset="UTF-8";</script>';
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 src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script>
<script type="text/javascript">
var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var shoutFile="',$shoutFile,'";
var yshout_php="',$boardurl,'/index.php?yshout";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?June102008" type="text/javascript"></script>
<style type="text/css">
#yshout {
font-size: 12px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts { /* main shouts area */
color: #FFFFFF;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1.7;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #ABCDEF;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 6pt;
color: #00FF00;
}
#yshout #shout-form {
margin: 0;
padding: 0;
}
#yshout #shout-form fieldset {
border: none;
}
#yshout #forum-name {
color: #000000;
width: 100px;
height: 15px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 670px;
height: 15px;
margin-right: 5px;
margin-top: 12px;
color: black;
font-weight: bold;
}
#yshout #shout-button {
width: 100px;
height: 25px;
margin-top: 12px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<br /><b>Chatbox</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
?>
I installed this mod on a new board (1.1.5), and I don't see anything. Using tiny portal, and followed instructions.
Previous board 1.1.4 was working fine on it.
Quote from: nneonneo on August 07, 2008, 12:33:45 PM
@riker: Try downloading the package again. I have no idea what would cause the parse error, since I've successfully used the package posted without any problems...
Otherwise, for 1.16, you can just edit yshout/yshout.php and turn off $allowGuests and/or $allowGuestsPost.
Tried it on 3 different servers now with 1.1.5 and beta 3.1 and they just don't like 1.20. Looks like I'll have to do 1.16 because at least that'll load
Hi, I have installed shout box 1.20 on my SMF 1.1.5 (backup test site) but there is a few changes i would like to change to a few eliments of it
a) the font size, it doesnt fit well (for my own personal preference) with the theme text size of the forum - i want to reduce the number of lines for shouts (which i have done in the settings.php) but i want to change the font size now so that it more matches the font size on the forum - i have tried this in the yshout.php but when i chaned the figures to a large font size it had no effect on the shout box
b) remove the "today" from the post so that it only leaves the time the post was made - i use a 24hr clock on my forum and as shouts will be made on a regular basis i dont feel the need to have it stated as posted "today" as that will be evident on my forum
c) i would like to make the shouts scrollable so that when members come online they can scroll up and review posts made
i am sure some these points have been covered throughout this thread but with the amount of pages there are it is difficult to find the exact information and i want to ensure that any changes i may make are the correct changes for v1.20
thank you
@bullbreedluverz take look here http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028 (http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028)
thanx chunkster
@T_Richardson: Did you check the shoutbox permissions (Membergroups->Permissions)?
@SwapsRulez: Does it give an error about undefined functions? It looks like allowedTo might not be defined in this file (since it doesn't import the Security.php sub). Maybe it would be best to use this as the shoutbox code:
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
echo '<br /><b>Chatbox</b><br /><br />';
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
// YSHOUT END - shoutbox code
Updated mute/unmute instructions (original at http://www.simplemachines.org/community/index.php?topic=137508.msg1384923#msg1384923)
In yshout/js/yshout.js, after
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML)
add
&& get_cookie("shoutSound") == "true"
In yshout/yshout.php, add this to where you need it:
if(!isset($_COOKIE['shoutSound'])) {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24);delete_cookie(\'yShout_open\');loadChat();">Use Sound</a>';
} else {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();">No Sound</a>';
}
One good place to add this is after the line
echo '<a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
the links chukster gave me has helped me sort 2 of my wishes a) & c)
just now if sum1 could help me with the last 1 id be grateful
b) remove the "today" from the post so that it only leaves the time the post was made - i use a 24hr clock on my forum and as shouts will be made on a regular basis i dont feel the need to have it stated as posted "today" as that will be evident on my forum
@nneonneo I've added the scrollbars mod and change the option to scroll up, and move shout text box to the top but it scrolls down instead of up take a look here http://arnoldmagnetictechnologies.co.uk (http://arnoldmagnetictechnologies.co.uk) username and password is test
@bullbreedluverz: http://www.simplemachines.org/community/index.php?topic=137508.msg1630065#msg1630065
@chunkster: You mean the autoscroll? Yeah, you will have to manually disable it (this will be an option in future version 1.21, which should be posted today or tomorrow...)
In yshout/js/yshout.js, remove
divScroll = new chatscroll.Pane('shouts');
objDiv = document.getElementById('shouts');
objDiv.scrollTop = objDiv.scrollHeight;
and
setTimeout("divScroll.activeScroll()", 5);
and then shift+refresh after saving.
thanx nneonneo
Quote from: nneonneo on August 02, 2008, 12:38:29 AM
Who's Online and related mods should now work correctly
I'm having an issue where my users are always showing as online and I'm wondering if it is due to this mod. Does the shoutbox constantly keep users active and therefore making it appear that they are online if their browser is open to any page of the message board?
@kriskd: Yes, the shoutbox does keep a user active; I am planning to change this to "active only on shouts" in a future release.
[announce] SB_1.17, SB_1.21 and AdvSB_1.21 released.
Major fix for 1.17:
Security fix affecting deletion and banning -- recommended update for all 1.16 users
Major fixes for 1.21:
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
1.21 and 1.17 should both upgrade over 1.20 and 1.16 installations. If there are any problems in upgrading, try a manual install (use upgrade-from-1.20.xml as a reference).
@ nneonneo, got it sorted, was a TP block permission that wasn't set.
I'm a glutton for punishment. :P
I tried to uninstall 1.20 so I could install 1.21. The uninstall failed (I figured it was due to my many manual edits) so I continued the uninstall, then manually removed any remaining traces of the shoutbox. However, when I try to install the newest version, it says the old one is still installed. I am sure it is something small and overlooked, but I need some help finding it. ;D
1.21 has an upgrader attached :(
If you've previously upgraded, the shoutbox may still appear installed. On SMF 1.1.5, this is easy to fix: just remove all shoutbox entries in Packages/installed.list. On SMF 2.0, you have to edit the log_packages table in the database and remove every entry which is the shoutbox, or just set its installed state to 0:
DELETE FROM {$db_prefix}_log_packages WHERE package_id='nneonneo:yshoutforsmf'
or
UPDATE {$db_prefix}_log_packages SET install_state=0 WHERE package_id='nneonneo:yshoutforsmf'
Note that I am not an SQL expert, so please do backup your DB just in case something terrible happens...
I was already digging around in the database, removing all SB entries. Refreshed the package manager and AdvSB1.21 will now install. Thanks again nneonneo.
OK. The install went fine, but now I can't shout (admin) and none of the icons work (history, sound, smiley, etc). The history and extended history icons point to non-existing files/locations? and the sound and smiley icons just do nothing. Sorry to keep bugging you over what is probably silly little details, but I can not stand be without the shoutbox. :D
Guests should be able to view and post, but here is a test account, just in case:
username: test
password: tester123
EDIT: It displays correctly in both FF2 and IE7, but in Opera 9.5, it displays the entire website (including a secondary shoutbox) inside the shoutbox.
when ive looked at some the links some people have put up and see there shoutbox i see that it coontained in a border and each message is seperated by a line and making it clear and easily read - is there a tweak to make this happen?
@bullbreedluverz
Those are features of the AdvSB series, the newest being 1.21.
oh, fort it might be, i did try installing the AdvSB 1.20 but recieved this message
Some of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders. Your FTP information may be temporarily cached for proper operation of the package manager.
and when i clicked the proceed button to do this recieved the following error
530 Login authentication failed
any ideas?
You need to be sure your username and password for your host are correct (double check spelling) and the host information such as server name is correct.
@SunKing: Oops, I forgot to mention I changed the <head> code...again...
The correct head code should be posted on the main mod page.
EDIT: works for me in Opera 9.5...
What do you mean that's because each theme is coded differently? How do I add it to another theme?
Quote from: nneonneo on August 09, 2008, 04:39:37 PM
@SunKing: Oops, I forgot to mention I changed the <head> code...again...
The correct head code should be posted on the main mod page.
EDIT: works for me in Opera 9.5...
Well, that <head> code change was apparently the root of all of the problems. :D
The only thing that isn't quite right is the smileys stay at the bottom even after clicking the icon. But that'll get worked out eventually! Many many thanks!
EDIT: Works again in Opera 9.5 too.
nneonneo,
Do you recommend we uninstall previous versions of your mod as well as un-doing edits in custom themes?
@ Sunking - well i dont know whats wrong as im putting in my username and password and it keeps saying the same theing - thanks anyway
@nneonneo
I've worked out the smiley issue. I forgot to put a call to the animatedcollapse.js back in the index.template.php. All works perfectly, as expected.
@bullbreedluverz
Sorry to hear that. You may want to contact your host to see if they can help you through it. :-\
lol dont think they will answer my support messages.... ive just had a go at them cuz my forum went offline a bit earlia
Quote from: bullbreedluverz on August 09, 2008, 04:34:44 PM
oh, fort it might be, i did try installing the AdvSB 1.20 but recieved this message
Some of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders. Your FTP information may be temporarily cached for proper operation of the package manager.
and when i clicked the proceed button to do this recieved the following error
530 Login authentication failed
any ideas?
I had the same problem. Try installing the basic version of this mod instead or just before the advanced version. When I switched to basic, this problem went away.
to be honest and no offence to nneonneo i put the basic version on and i thought it made my forum look a bit scruffy but the AdvSB look a lot more refined and blends in with peoples themes much better
what would like to know is why some addons are not added as standard like smileys and scrollbar
@bullbreedluverz: Certainly no offense taken. That's why there are two versions :)
@chunkster: Different people have different needs. I will consider making those mods standard, but don't hold your breath...
@kriskd: The shoutbox should upgrade on top of an existing installation, but do note that the <head> code has changed.
I am presently working on a new version of the shoutbox, which should be more fully integrated into SMF.
Some proposed changes include a database backend for shouts, rather than the flat-files; a proper theme modification to allow installation to be as easy as adding "yshout_here()" to the theme, and settings in the admin panel. The external interface will remain as simple as possible, so I will likely not add a lot of extra features (but suggestions are welcome, and I will try to make it as easy as possible to add highly-requested mods like shout sounds and smileys)
just thought I'd ask thats all
@nneonneo
Could it be set up so that all of the "addons" are installed, but you would just put a check by the ones you want to show, etc? Basically, a bunch of checkboxes showing or not shoeing the extra features. This may help with all of the questions about how to add sound, or smileys, or whatever. You want sound, put a checkmark by it. You don't want a scrollbar, uncheck it. May save you some serious time answering those types of questions. ;D
Thank you for considering an upgrade, but can you please answer my question?
When I try to add the code to another theme to install the shoutbox, nothing shows up.
Quote from: riker on August 09, 2008, 08:16:33 AM
Quote from: nneonneo on August 07, 2008, 12:33:45 PM
@riker: Try downloading the package again. I have no idea what would cause the parse error, since I've successfully used the package posted without any problems...
Otherwise, for 1.16, you can just edit yshout/yshout.php and turn off $allowGuests and/or $allowGuestsPost.
Tried it on 3 different servers now with 1.1.5 and beta 3.1 and they just don't like 1.20. Looks like I'll have to do 1.16 because at least that'll load
1.21 works for me
Quote from: trekkie2444 on August 09, 2008, 10:21:25 PM
Thank you for considering an upgrade, but can you please answer my question?
When I try to add the code to another theme to install the shoutbox, nothing shows up.
Are you fully adding all the code in the index.template.php? Including putting the yshout.css file into your theme folder?
Hello, I am using 2.0 Beta 3 version of SMF, Shoutbox version 1.20, for the theme Dark Break.
The problem is, I did the manual edits but the shoutbox is overlapped in the theme. I used the parser and did the theme edits, Kindly see the screenshot.
Can you please tell me how to solve this up ?
Thank you.
@F.L.A.M.E.R: It is because the theme uses absolute positioning. Move the shoutbox into the main body area (end of template_main_above) and see if it still happens.
u mean this line ?
function template_html_above()
can this shoutbox be use as an SSI? because i dont want it to be at the top and loaded on every page .. just on the main page ..
thanks .
@F.L.A.M.E.R: Probably.
@shads: Check yshout/index.php for an example.
So, the shoutbox is killing my site - the hosting account has apache configured such that all the shouting is creating too many connections and is being identified as a DoS attack.
I moved the shoutbox so that it's only on the home page, and that helped a little.
But is there any way to tweak the performance so my site doesn't get shut down for too many connections?
Quote from: nneonneo on August 09, 2008, 01:03:17 PM
@SwapsRulez: Does it give an error about undefined functions? It looks like allowedTo might not be defined in this file (since it doesn't import the Security.php sub). Maybe it would be best to use this as the shoutbox code:
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
echo '<br /><b>Chatbox</b><br /><br />';
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
// YSHOUT END - shoutbox code
Hi there, i've added that code. But still its not working. You can test it here. :(
http://www.project-bb.org/index.php?action=chat
If you need admin account to look into the code, ask me to PM you. :)
Thanks soo much. :)
ok i didnt get the one which you asked, instead i found:-
function template_html_above()
function template_body_above()
as in with the ending with _above
I placed this code
// 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
just under them and it gave me template parse error.
is that the correct once which i have done ?
Please help me out, thank you.
hi nneonneo
the shoutbox disapeared from my forum, apparently for no reason at all.
it seems collapsed (hidden)
could you check it please
link is: removed(dot)com
best regards
EDIT: NEVERMIND. I CLEANED FORUM CACHE IN MAINTENANCE TOOLS AND EVERYTHING IS OK NOW.
@MissRancher: If you are using persistent connections, there's not much you can do aside from making the shoutbox a basic non-auto-refreshing shoutbox (i.e. by setting $updateTimeout to zero and refreshTime to 5000+). If you are not using persistent connections, in refreshChats, you may be able to get away with closing the DB connection:
In yshout/yshout.php, under
session_write_close();
add
mysql_close();
@SwapsRulez: It still looks like the membergroup permissions aren't set :-\. If you are sure they are, I can look in the admin panel to check.
@F.L.A.M.E.R: Put it right before the } ending the function.
Quote from: nneonneo on August 11, 2008, 11:16:08 AM
@SwapsRulez: It still looks like the membergroup permissions aren't set :-\. If you are sure they are, I can look in the admin panel to check.
Really sorry mate. I was unaware with the fact that you are having a great feature that can enable the permissions for each membergroup. How fool am i? :P
Btw I've setup'ed the permissions correctly & its working fine now.
Thanks for your support. :)
im wondering if anyone has serious hang time since installing this mod on there forum, i use hostmonster and ive been in contact with them and they claim its my mods that are causing my hang time which seems to be even more so since adding the shoutbox and im in 2 minds as to whether a) hostmonster are just rubish or b) hostmonster are just rubbish
Well, due to the problem, i am not using the Onyx theme.
but the same thing now...
I added the code before the } but it went above the header... :(
Kindly check the image.
(http://img139.imageshack.us/img139/8903/sboxnc6.png)
http://img139.imageshack.us/img139/8903/sboxnc6.png
@bullbreedluverz: Are you using IE7?
@F.L.A.M.E.R: The code should look like this:
function template_html_above() {
...
...
...
<SHOUTBOX CODE>
}
function template_.... () {
...
}
myself i use firefox 3 (dont like IE) but some my members use IE7
ShoutBox never loads..
Shout Box
...Cargando shoutbox...
Plz help :D
*SOLVED* it was index.template.php error :P
BTW how to make the shoutbox bigger?
THX!
Quote from: nneonneo on August 11, 2008, 02:36:31 PM
@F.L.A.M.E.R: The code should look like this:
function template_html_above() {
...
...
...
<SHOUTBOX CODE>
}
function template_.... () {
...
}
Hm....well.. i m kind of very confused now.. I tried the way you told me, what happened is.. a white screen comes up first with only the shouts in bold letters with the shouts inside.. then the shoutbox comes up onto the theme but on the top. Still the same way as it was before.. I have attached the index.template.php as i left it before, I havnt done changes in that index.template.php as you have said. Please check it. Thank you.
@F.L.A.M.E.R: Ah, now I see. template_body_above is the function you want, since template_html_above is actually only the <head> section and a tiny bit of the body. So, put it at the end of template_body_above and it should work.
@bullbreedluverz: No idea. Maybe if you post a forum URL I will take a look.
@NickNeeck: Bigger? Fonts bigger, or size bigger, or more shouts?
For fonts, check index.template.php and/or Themes/<theme>/css/yshout.css (if it exists) and change font-size.
For size, try a height: declaration in #yshout section (e.g. #yshout { height: 500px; } )
For # of shouts, use yshout/settings.php and increase $maxLines.
all works on IE but doesn't auto update on firefox
???
Questions about line spacing:
I upgraded from version 1.16 to 1.21 and there is quite a bit more vertical spacing in between shout lines.
To shrink the spacing, I tried changing the following in Index.template.php:
#yshout {font-size: 10px; overflow: hidden}
to:
#yshout {font-size: 10px; overflow: hidden; line-height:6px}
it worked in FF, but not in IE.. Is there a better way to shrink the line spacing down?
Thanks.. Now everything is proper.. Phew... Now i feel that i learnt a bit more.. :D .. i will be back with more problems.. ;)
@darkwind: If you don't mind, can I take a look at your forum/shoutbox?
@++STi++: Did you use the AdvSB by any chance? It has different line-spacing. There's also a line-spacing CSS command in the #yshout .shout block.
@nneonneo: No, I used the regular SB_1.21... I tried changing the line spacing command in the #yshout.shout block originally but it didn't change anything for FF or IE, so that's why I put it in the #yshout block.
I also just noticed that under my ADMIN account I cannot see the "DEL" or "BAN" options next to each post anymore.. hmmm
Where do I place the codes if I want to place this shoutbox only on the board index, under the "info center"?
And where for the 'Who's online' page?
I tried a few things, but I can't get it to work =/
well i am using the advance sbox 1.20 and with the update with 1.21.
please check the image... is this the correct way the shoutbox should be looking ?
Please let me know if anything is wrong. Thank you.
Quote from: Con on August 13, 2008, 03:41:51 PM
Where do I place the codes if I want to place this shoutbox only on the board index, under the "info center"?
Open BoardIndex.template.php and search for "info center". ;D
Quote from: SunKing on August 13, 2008, 05:37:35 PM
Open BoardIndex.template.php and search for "info center". ;D
..I figured that much, but the big first part of the coding, where is that suppose to go?
Quote from: F.L.A.M.E.R on August 13, 2008, 03:53:29 PM
well i am using the advance sbox 1.20 and with the update with 1.21.
please check the image... is this the correct way the shoutbox should be looking ?
Please let me know if anything is wrong. Thank you.
You need to manually upload the needed image and css files to your theme. The css goes to themedir/css and upload the images to themedir/images.
@Con
What version of SMF are you using? If it's SMF 2.0, open BoardIndex.template.php and find:
if ($context['user']['is_logged'])
{
The basic code for the shoutbox <div id="yshout">Loading...</div> can be added on the line after the {
The end result would add the shoutbox to the top of the Info Center and look like this:
if ($context['user']['is_logged'])
{
<div id="yshout">Loading...</div>
This is just a basic example, but should work. Adding borders and such would require a bit more effort. ;D
@++STi++: Huh. That's weird, indeed. It's probably worth just looking at the forum (I use Firebug to debug CSS problems)
Quote from: nick09 on August 13, 2008, 06:10:03 PM
Quote from: F.L.A.M.E.R on August 13, 2008, 03:53:29 PM
well i am using the advance sbox 1.20 and with the update with 1.21.
please check the image... is this the correct way the shoutbox should be looking ?
Please let me know if anything is wrong. Thank you.
You need to manually upload the needed image and css files to your theme. The css goes to themedir/css and upload the images to themedir/images.
ehm...what sort of images ?
Unzip attached file and upload the images to {your theme}/images folder.
thx nneonneo, but now im having other problems, just admins can post, how to make it free for all?
thx for answering ^^
You need to set the permissions for the other membergroups in SMF's admin area.
is this all correct now, i actually think, that the timestamp and the username and the text should all be in one line...then the dividing line would be there and then the next shout should appear.... isnt that right ?
Please let me know about it.
Please see the image after i added the images which where asked to be added in.
Thank you.
PERFECT!
hm.. sure...if thats the way it should be.... can i put them all in same line ? and have a breaking line between the two shouts as it already gives.... this is kind of messy if you see... the timestamp up and the shouts not that catchy i think...
For the next week, I will be on vacation, so if I don't reply, that's the reason.
[GASP] ;D
Happy vacations.. ;) ... hope that when u come back i dont bring you lots of problems up.. :D
Quote from: SunKing on August 13, 2008, 06:21:15 PM
@Con
What version of SMF are you using? If it's SMF 2.0, open BoardIndex.template.php and find:
if ($context['user']['is_logged'])
{
The basic code for the shoutbox <div id="yshout">Loading...</div> can be added on the line after the {
The end result would add the shoutbox to the top of the Info Center and look like this:
if ($context['user']['is_logged'])
{
<div id="yshout">Loading...</div>
This is just a basic example, but should work. Adding borders and such would require a bit more effort. ;D
Sorry, I use 1.15 =x
Just installed this - how do I completely clear the history file (not just the shout box window)?
@xrunner: Delete yshout/chats/history.home.txt. If you never want to keep history, just change $historyFormat to '' in yshout/settings.php.
Thanks.
Quote from: SunKing on August 02, 2008, 11:18:39 PM
@Kirsty are the files chmodded correctly? You may want to try 755 or even 777.
@Carb0n it's already been added by including the SB inside the upper <div>
@Rafferty Let me go take another look....:D EDIT: whoops! :D, maybe we need to leave the account for a bit :D
Does it work on 1.15?
I installed the shoutbox and have the following problem.
At first, the shoutbox loads normal, BUT, after about 2 seconds the shoutfield disappears ??
See attached files.
Can someone help me please
Hi I installed the shout box but how do I change the font size?
Quote from: Staffy on August 15, 2008, 12:14:21 PM
Hi I installed the shout box but how do I change the font size?
Look for the code in index.template.php in your theme directory :-
#yshout {
font-size: 10px;
overflow: hidden;
}
there font-size: 10px; is the font size of all the text inside the shoutbox. Change it accordingly.
How can I customize the text where it says "Shout Box"?
Quote from: xrunner on August 15, 2008, 02:24:27 PM
How can I customize the text where it says "Shout Box"?
Directory:- \Themes\default\languages
Search for :- Modifications.english.php
in there the line:-
$txt['yshout_shoutbox'] = 'Shout Box';
modify "Shout Box" and it will be changed.
Got it - thanks much!
Quote from: Neophema Plaza on August 15, 2008, 11:30:10 AM
I installed the shoutbox and have the following problem.
At first, the shoutbox loads normal, BUT, after about 2 seconds the shoutfield disappears ??
See attached files.
Can someone help me please
Was it done without any tests being failed ? I mean did any file had "Test Failed" ? As it maybe related to load.php which would be causing these things.
I use a different theme so I installed it manualy.
Can someone please tell me how I can install this in a different theme, and in the board index? I use 1.15.
Quote from: Neophema Plaza on August 16, 2008, 02:48:14 AM
I use a different theme so I installed it manualy.
Strange........when I choose for the English language, everything works fine, but when I change to the Dutch language the shoutbox disappears ::)
Quote from: Con on August 16, 2008, 05:27:58 AM
Can someone please tell me how I can install this in a different theme, and in the board index? I use 1.15.
what is the SMF version you are using ?
If you are using SMF version 1.1.5 do the edits below:-
In file Themes/[your theme]/index.template.php
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()
{
loadChat();
}, { "yshout":"id"});
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?May122008" 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;
}
</style>';
// YSHOUT END
Find:-
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:-
// YSHOUT HERE
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
Find:-
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
Add After:-
// YSHOUT HERE
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
Quote from: Neophema Plaza on August 16, 2008, 05:30:33 AM
Quote from: Neophema Plaza on August 16, 2008, 02:48:14 AM
I use a different theme so I installed it manualy.
Strange........when I choose for the English language, everything works fine, but when I change to the Dutch language the shoutbox disappears ::)
If you change the theme you just have to add in 2 blocks of code inside the index.template.php file(THE THEME YOU ARE USING) You should leave the shoutbox installed as it was before with the default theme.
For the different languages see for the attached mods by nneonneo on the 1st message.
How about colors? I changed the code below from 00000 to 0000FF, and in several other places where color codes were, but the colors never changed when I looked at the shout box. Am I understanding this right?
#yshout #shout-text {
color: #0000FF;
width: 310px;
margin-right: 5px;
How do you arrange say just 5 lines and a scrolling windows (SMF 2.0) instead of the shoutbox taking over the whole index page like it is now on mine ?
Quote from: xrunner on August 16, 2008, 07:18:26 AM
How about colors? I changed the code below from 00000 to 0000FF, and in several other places where color codes were, but the colors never changed when I looked at the shout box. Am I understanding this right?
#yshout #shout-text {
color: #0000FF;
width: 310px;
margin-right: 5px;
Did you not forget the hash("#") before the code. And for perfect codes use this site:-
http://www.computerhope.com/htmcolor.htm
No I didn't forget the hash, I just replaced zeros with F's.
No colors changed.
Quote from: riker on August 16, 2008, 07:21:00 AM
How do you arrange say just 5 lines and a scrolling windows (SMF 2.0) instead of the shoutbox taking over the whole index page like it is now on mine ?
In the shoutbox directory "yshout" open the settings.php
and there change the value
$maxLines=12;
the lines would be less as you need according to the numbers set.
Quote from: xrunner on August 16, 2008, 07:41:46 AM
No I didn't forget the hash, I just replaced zeros with F's.
No colors changed.
which file are you editing in there ? is it index.template.php of your THEME WHICH YOU ARE CURRENTLY USING ? If you are using the default theme then you should go in your default theme folder and there open index.template.php and edit there..
Quote from: F.L.A.M.E.R on August 16, 2008, 07:43:29 AM
Quote from: riker on August 16, 2008, 07:21:00 AM
How do you arrange say just 5 lines and a scrolling windows (SMF 2.0) instead of the shoutbox taking over the whole index page like it is now on mine ?
In the shoutbox directory "yshout" open the settings.php
and there change the value
$maxLines=12;
the lines would be less as you need according to the numbers set.
Thanks F.L.A.M.E.R it was actually set to 25 :o by default!. Do you know how to make it scroll so people can scroll history ?
Quote from: F.L.A.M.E.R on August 16, 2008, 07:46:59 AM
which file are you editing in there ? is it index.template.php of your THEME WHICH YOU ARE CURRENTLY USING ? If you are using the default theme then you should go in your default theme folder and there open index.template.php and edit there..
No, index.php in the yshout folder. What are the color codes for in the file I am editing?
Quote from: riker on August 16, 2008, 08:02:27 AM
Quote from: F.L.A.M.E.R on August 16, 2008, 07:43:29 AM
Quote from: riker on August 16, 2008, 07:21:00 AM
How do you arrange say just 5 lines and a scrolling windows (SMF 2.0) instead of the shoutbox taking over the whole index page like it is now on mine ?
In the shoutbox directory "yshout" open the settings.php
and there change the value
$maxLines=12;
the lines would be less as you need according to the numbers set.
Thanks F.L.A.M.E.R it was actually set to 25 :o by default!. Do you know how to make it scroll so people can scroll history ?
Well, to see make the scroll bar, follow the steps here:- http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
It is auto scrolling, i havnt used it myself, i would rather use the "History" button on the top, well the link lets you create auto scrolling, you may ask nneonneo when he comes back from holiday..
Quote from: xrunner on August 16, 2008, 08:07:26 AM
Quote from: F.L.A.M.E.R on August 16, 2008, 07:46:59 AM
which file are you editing in there ? is it index.template.php of your THEME WHICH YOU ARE CURRENTLY USING ? If you are using the default theme then you should go in your default theme folder and there open index.template.php and edit there..
No, index.php in the yshout folder. What are the color codes for in the file I am editing?
You should be editing index.template.php in the theme folder of the theme which you are using.
you should edit the shoutbox <head> code there. it somewhat goes like this in 1.20 version.
// YSHOUT HERE - <head> code
global $boardurl,$shoutFile;
$shoutFile='home';
$scripturlparsed = parse_url($scripturl);
$scriptpath=isset($scripturlparsed['path'])?$scripturlparsed['path']:'/';
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 src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script>
<script type="text/javascript">
var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var shoutFile="',$shoutFile,'";
var yshout_php="',$scriptpath,'?yshout";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?June102008" type="text/javascript"></script>
<style type="text/css">
#yshout {
font-size: 13px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts { /* main shouts area */
color: #000000;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #000000;
}
#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 {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
I've added the shoutbox to my forum, but all it shows is;
"Shout Box
...loading shoutbox..."
And it doesnt even show up in the default theme...
http://www.tfdreamhouse.com/forum/
if you want to check, use;
Test Account
pas; testing
Quote from: Con on August 16, 2008, 10:10:42 AM
I've added the shoutbox to my forum, but all it shows is;
"Shout Box
...loading shoutbox..."
And it doesnt even show up in the default theme...
http://www.tfdreamhouse.com/forum/
if you want to check, use;
Test Account
pas; testing
I dont exactly see the shoutbox, maybe you have removed the settings in there. Attach your "THEME" index.template.php, i would probably have a look in there.
I put the shoutbox in the info center of the board index, idealy, I'd want it below that.. but I can't quite get that to work. Same goes for the who's online page..
The old shoutbox I had used to be there and on board index, it was a lot easier to install I gotta admit that..
this mod is fantastic, it really is.
I got it working from the package manager on my default smf theme, it makes shouts fine with no problems. Then i followed the isntructions to get it working on my own custom theme... got the css just the way i wanted it... perfect... Then i tried to make a shout and disaster! lol, it lets me type fine and the send button was clickable, but did nothing except go in and out, my shout wasn't made, it just stayed in the field :(.
I tried it on another theme and copied the code word-for-word and had the same result. Please can someone tip me on what to do to give my shoutbox his functionality back :)
Thank you.
just noticed: IE is telling me I have 3 errors on my page :( pain in the bum............................ *goes mental*
--------update---------
I just took out the two peices of code for the shoutbox and now have 0 errors :-\ which is relly odd. The peices I had there where as follows: // 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 #shouts {
overflow: auto;
width: 100%; /* the width you want to display */
height: 60px; /* the height you want to display */
}
#yshout {
border: #000 solid 1px;
margin: 5px 0px 0px 0px;
padding: 0px 10px 0px 10px;
background-color: #ecedf3;
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
AND
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout"><b><u>Shout box</u></b><br />';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
whilst checking stuff out i noticed a few instances of <!-- // -->, <![CDATA[ and // ]]> in the source code of my forum when i checked it out in firefox's view source option... I am wondering if they're supposed to be there, i don't think they are are they? If im right - how do i get rid of them, which file are they in?
the two errors [which must be caused by summit to do with the SB are line 32, 'Behaviour' is undefined.
and line 110 object expected.
Please help me out... Now I'll leave it a while and give you chance lol. :)
Quote from: Con on August 16, 2008, 03:55:05 PM
I put the shoutbox in the info center of the board index, idealy, I'd want it below that.. but I can't quite get that to work. Same goes for the who's online page..
The old shoutbox I had used to be there and on board index, it was a lot easier to install I gotta admit that..
All of the shoutbox code you have beginning at line 21 and ending on line 88 needs to be placed in your index.template.php. Next, there is
no call to shoutbox() function in your boardindex.template.php - not in the info center - or anywhere for that matter. You'll need both the function itself, and the call to the function in there if you expect it to work.
Quote from: samames on August 16, 2008, 04:13:01 PM
...to get it working on my own custom theme...
The main cause of this is not having all of the yshout stuff in the <head> section of your custom theme's index.template.php. If it doesn't load those .js files, the shoutbox will not be fully functional. ;)
You should take a look at the first page of this thread.
And as far as the <!-- // -->, I believe that has to do with being cross-browser compatible or something close. :D I have the same code and my shoutbox works beautifully.
Quote from: Con on August 16, 2008, 03:55:05 PM
I put the shoutbox in the info center of the board index, idealy, I'd want it below that.. but I can't quite get that to work. Same goes for the who's online page..
The old shoutbox I had used to be there and on board index, it was a lot easier to install I gotta admit that..
I would probably suggest you to uninstall shoutbox and remove all the shoutbox related edits, then in your theme folder, in index.template.php, put the shoutbox code at the base, and it will all appear correctly, as i aint that good at solving this problem, i couldnt figure out what is kinf of wrong, either do as i asked to or wait till nneonneo comes back. Going via my idea would be better as it will make you use the latest version of shoutbox for your forum, and also that you will not have any errors. I would probably help you out directly if you give me your hosting user pass, but you arnt suppose to trust anyone as such then approved people. Also, would also wont be available till the 21st or 22nd for that much time, as my results are on and kind of busy with college work.. so chill out till then..
kwl a support team is here... good going SunKing.. some big matters coming up which i maynot be able to help out ;)
Also @Con
The file you have attached ends at line 323 when it should in fact end closer to line 585 (or more). There is quite a bit of code missing from it which prevents me from possibly fixing the issue. :D
Quote from: ¤ on August 16, 2008, 06:17:06 PM
Quote from: samames on August 16, 2008, 04:13:01 PM
...to get it working on my own custom theme...
The main cause of this is not having all of the yshout stuff in the <head> section of your custom theme's index.template.php. If it doesn't load those .js files, the shoutbox will not be fully functional. ;)
You should take a look at the first page of this thread.
And as far as the <!-- // -->, I believe that has to do with being cross-browser compatible or something close. :D I have the same code and my shoutbox works beautifully.
did i miss some of the js files then? Ill have a go again tomorrow... what is it you want me to look at on the first page? How to install to custom themes? Thats what i followed to begin with.
Yes, how to install in custom themes. If you attach your index.template.php (or BoardIndex.template.php if you want it only in the Info Center area) from your custom theme, I can see about making the edits for you.
The code you removed has to be in the head section of your index.template.php.
Shoutbox! This is so cool! Thanks for sharing...
http://it.netdepviet.org
Hi,
I've added your mod on my new forum, I am using the Outline115 theme and would love some help with intergrating the two.
Thanks
Kirsty
I would be glad to, but it's currently sneaking up on midnight here. If you post your index.template.php from your Outline115 theme, I will modify it tomorrow (and walk you through the rest of it).
thanks heaps :D no rush :D
It is in the header area.
Id like my sb right of the users avatar, its displaying there, just not functioning. I didnt realise id need to edit boardindex.template.php, tho i shall attatch it along with index.template.php.
My custom theme doesn't have its own boardindex.template.php so im posting the smf default themes 1, because thats the 1 custom themes use when they aint got dere own...
thanks :)
Hello again.
I have troubles again:
[17/Aug/2008:11:07:06 +0200] "POST /yshout/yshout.php HTTP/1.1" 200 1094
From Apache error log.
Is this bug? Or if yes, how can I fix it?
i would like a quick bit of help if possible with this add on, its a great mod used it before on other sites of mine but i am getting an error come up on this one,
Shout Box
Fatal error: main() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mywebaddress/public_html/mysubfolder/forum/yshout/yshout.php on line 193
hope someone can point me in the right direction if possible,
Thanks
Andy
I am currently having some host issues with my test site, so I am unable to test my edits before attaching them. Until this issue is resolved, I will not be doing edits for anyone. Sorry. They said it should not be more than 24 hours....it's been about 5 so far........
Quote from: SunKing on August 17, 2008, 02:49:31 PM
I am currently having some host issues with my test site, so I am unable to test my edits before attaching them. Until this issue is resolved, I will not be doing edits for anyone. Sorry. They said it should not be more than 24 hours....it's been about 5 so far........
Thats a shame, but not your fault so no need apologise :),
I can do patient.
Quote from: SunKing on August 16, 2008, 07:02:55 PM
Also @Con
The file you have attached ends at line 323 when it should in fact end closer to line 585 (or more). There is quite a bit of code missing from it which prevents me from possibly fixing the issue. :D
Geesh I didn't know there was this much wrong with that page. I think the best I can do is uninstall the shoutbox then, AND uninstall the theme and put it on freshly.
Someone should make a theme installer where you'd have to enter the theme directory or somethin ;p I always seem to screw up the coding..
[edit] Uninstalled the shoutbox and refreshed all the php files in the theme. That should be good enough right?
So what should I do now, reinstall the shoutbox?
Im really finding this quite odd though, I tried the instructions on the first post of this thread (as opposed to the instructions on the mod site) and i am still loading a dysfunctional sb... i even tried moving the sb to see if its position ws d problem, though it still didn't work when above the top board...
I'll look forward to sunking's reply when his host is fixed, or anybody else's if they have any suggestions.
thanks :)
---------------
update: i have attached the errors which firebug is showing on my forum.
Quote from: thegrimreaper on August 17, 2008, 09:23:22 AM
i would like a quick bit of help if possible with this add on, its a great mod used it before on other sites of mine but i am getting an error come up on this one,
Shout Box
Fatal error: main() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mywebaddress/public_html/mysubfolder/forum/yshout/yshout.php on line 193
hope someone can point me in the right direction if possible,
Thanks
Andy
Ditto, I am getting the same thing.. Problem is now all I can see on the forum is shoutbox and no forum?? Some one help please. I cant even sing out as Admin, I have nothing at all but the shoutbox...
Can you provide a link to your website?
Seems that if your not logged on as admin its fine.. But I cant even log out to see whats going on
That makes it a bit difficult to check then. :P
If you want, I can sign up there, then you can make me admin long enough to check things out for you.
I will in no way be offended if you turn down this offer ;), it would just allow me to see first hand what is going on.
you could log in as me if you like... Since I cant get to admin or anything. I am stuck in soundbox and cant do anything. At least that way you can see what I am seeing LOL
Set up a temporary password, then PM me the log in info. Then when I am done, you can change your password back.
EDIT: Or you can do it like that.... :P
when you get in you will see why I cant do anything LOL
wow. lol....
Attach your index.template.php here and i will take a look. It also looks like you have two instances of the shoutbox trying to run, which might cause some problems too.
ROFL!!! And I do that how?
Your talking to an old women that is dabbling in things she shouldnt
First, locate the index.template.php in forum/Themes/default/
then, you'll notice the "Additional Options" link underneath the post box here. Click on it. See Attach:? Click on Browse and point it to that index.template.php. Now just post your message and it will attach the file! :D
PS: I stink at tutorials, BTW......hehehe
I do believe I got it!!
And your WONDERFUL... I know some but just enough to get ME in trouble...Most of the time
That's it indeed! I'll take a look.
It seems as though that is not the correct file after all. It's the right file per se, just not the one you are using on the website. There is no code in the attached file regarding the shoutbox. ;)
Another alternative to get the site back up and running quickly (and if you don't have a bunch of mods installed) would be to simply replace the index.template.php with a clean unaltered version. Just be sure it coincides with the version of SMF you are currently running.
I can find such a creature where? I am using 1.15.. only have a pm notifier and a couple other installed..
Hang on a sec.. I have to check something...
I just PM'd you some information here. Check your messages. :)
Help Ive installed Simple Machines and Now ShoutBox Wont work, I have re-installed it.
I have this in my Index.php file in the Forum folder:
forum_version = 'SMF 1.1.5';
if(isset($_GET['yshout']))
{
$yshout_from_index=true;
include_once('yshout/yshout.php');
exit;
}
if(isset($_GET['yshout']))
{
$yshout_from_index=true;
include_once('yshout/yshout.php');
exit;
}
This is my index.php file although I have already uninstalled the shout box it still has yshout data in there.
$forum_version = 'SMF 1.1.5';
if(isset($_GET['yshout']))
{
$yshout_from_index=true;
include_once('yshout/yshout.php');
exit;
}
// Get everything started up...
define('SMF', 1);
@set_magic_quotes_runtime(0);
error_reporting(E_ALL);
$time_start = microtime();
// Make sure some things simply do not exist.
foreach (array('db_character_set') as $variable)
if (isset($GLOBALS[$variable]))
unset($GLOBALS[$variable]);
And there are loads more Refrences to Shoutbox in the Index.php file.
@staffy
There might be test failed up in index.php or at the 1st, you might have added this code manually. You should remove all the shoutbox related codes before installing new one as it will cause clashes. This will lead to some ill functioning in your shoutbox, so its better to remove all the codes and do the fresh install.
Hi,
Thanks for replying, I have not added any code Manually, in Features and Options I have a Shout box Option did this come with the Template I installed from Simply Machines possible??
Also I do not know what coding to remove ?
I started getting some error . Dont know , Suddenly
(last change made by me was change of host)
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home1/***/public_html/legendaryhackerz/forum/Sources/Subs.php on line 321
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home1/***/public_html/legendaryhackerz/forum/Sources/Errors.php on line 123
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home1/***/public_html/legendaryhackerz/forum/Sources/Errors.php on line 124
I would like to display the message in 1 line (showing time and message together).
What should I do?
Please help me.
do the smiley bar instructions @ http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
work for advSB 1.21 ?
:o
@samames - I haven't forgotten about you. My test server is just now back up, and I still have to reinstall SMF on it. :( We will get you squared away, I promise.
@thegrimreaper - Can you attach your yshout.php so I can take a look at it please?
@Con - Double check to make sure all references to the yshout code have been removed, and then you should be able to just reinstall shoutbox from scratch.
@Staffy - You will need to remove any duplicate code as that will cause problems.
@assam_siddibapa - That may be a question better answered by nneonneo himself once he returns from vacation. Sorry.
@bullbreedluverz - Yes. I use the smiley bar with AdvSB 1.21 and it works flawlessly. I did however, have to manipulate the code to get it to work the way I wanted it to, but it works even without that change.
>>whew<< Hope I didn't miss anybody. I may need a vacation when he gets back..... :P
Hi Sunking, just wondering if you saw my post with my index.template.php in it?
Thanks
kirsty
You said "no rush", so I put it off until mid December....
Just kidding. ;D I must have missed that post somehow. I am installing SMF on my test server as I type, so it shouldn't be much longer. Worst case scenario: mid December.
Still kidding. Thanks for being patient.
Quote from: SunKing on August 18, 2008, 05:38:15 PM
You said "no rush", so I put it off until mid December....
Just kidding. ;D I must have missed that post somehow. I am installing SMF on my test server as I type, so it shouldn't be much longer. Worst case scenario: mid December.
Still kidding. Thanks for being patient.
I'll handle it. ;o
cheers sunking.............. if ur not too busy cud you rewrite my index.template for me to get the smiley bar working.......
only joking lol can do it meself just wanted to check before i started that changes was same for new version and dont mess up my clean install lol
@samames - I believe this is what you wanted. :) If it doesn't work for some strange reason, then the index.template.php isn't the problem. And I can walk you through fixing it.
@bullbreedluverz - If you want to attach your index.template.php, I can add the smiley bar for you.
i was only joking as you said you was so busy but if you dont mind it would be a great help, i would get it done but it would probly take me a lot longer than you - much appreciated
OK. Attached are three files. The index.template.php with the modifications for the smiley bar - upload that replacing the old one. Then, the animatedcollapse.js needs to be uploaded to your yshout/js folder. And finally, the smiley.php needs to be uploaded to your yshout/ folder. Works great on my test site. ;)
EDIT: Just noticed that even though the bar works great, the smileys do not post. If you are also having this problem, attach your yshout.php and I can fix that for you too. it works great on my test site now (including posting smileys). :P :P
works perfect sunking, thanx a lot, save me a lot of time, cheers
Glad I could help. Enjoy your new toy.
Just wanted to say a massive thank you to ccbtimewiz for helping me with the shout box!!
Muchly appreciated.
Problem has been solved :D
Thank you ccbtimewiz. I appreciate the help, as always. Enjoy Kirsty!
Still can't figure out how to unban members. How should I type the _banlist.php in my bar? I might be putting it in wrong.
Quote from: theglobe on August 18, 2008, 06:45:00 PM
Still can't figure out how to unban members. How should I type the _banlist.php in my bar? I might be putting it in wrong.
Do /banlist in your command box.
Then click the names to unban.
awesome, thanks a lot. I've figured it out. sorry about being dense. Old age must come on at 30. :(
Quote from: ccbtimewiz on August 18, 2008, 06:45:45 PM
Quote from: theglobe on August 18, 2008, 06:45:00 PM
Still can't figure out how to unban members. How should I type the _banlist.php in my bar? I might be putting it in wrong.
Do /banlist in your command box.
For me its not working, i only see: /banlist in my command box an nothing els.
Then click the names to unban.
I uploaded a blanco _banlist.php.
Quote from: SunKing on August 18, 2008, 06:33:27 PM
Glad I could help. Enjoy your new toy.
well my members like there little toys so ur keeping them happy ;)
I have cleared all SB things from files and reinstalled Shoutbox.
Now I have problem. In ShoutBox place now I see all the time:
...loading shoutbox...
Is any chance to fix it? Im not using default theme. Im using Outline.
there's a problem
the shoutbox only appeared on when admin logged in,
but the normal members and mod is not,
when members logged in, it appears nothing.
well, what's wrong with this case?
thank you
Quote from: superboomz on August 21, 2008, 12:38:11 PM
there's a problem
the shoutbox only appeared on when admin logged in,
but the normal members and mod is not,
when members logged in, it appears nothing.
well, what's wrong with this case?
thank you
You have to set the permissions in the admin panel under Permissions (http://docs.simplemachines.org/index.php?board=60.0;sort=subject).
Quote from: nneonneo on August 03, 2008, 12:57:44 AM
@optimushunk: Use $context['current_action'] to control the shoutbox.
For example:
if(!in_array($context['current_action'],array(...)))
{
SHOUTBOX CODE
}
Note that admin actions are any of
'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'
which is rather painful to look at (but check out SMF 1.1.5's template_menu function for that).
I still dont get it right.. Which file am i suppose to edit ? I did edit the index.template.php but yet no effect..it is nothing related to shoutbox.. i m kind of very confused...
Quote from: F.L.A.M.E.R on August 15, 2008, 01:05:32 PM
Quote from: Staffy on August 15, 2008, 12:14:21 PM
Hi I installed the shout box but how do I change the font size?
Look for the code in index.template.php in your theme directory :-
#yshout {
font-size: 10px;
overflow: hidden;
}
there font-size: 10px; is the font size of all the text inside the shoutbox. Change it accordingly.
Good Morning, I have been trying to find the above referance but have not been able to find it... Any ideas?
Should be in yshout.css
OOHHHH, I see... Thanks Much!!
erm Sunking, you great wonderfull fella, you know how you done the work to make the smiley bar on my shoutbox could i be a pain in the but again and ask you to do it again for me pleasssssssssssssssssssssssssssssssssssssssssssssssssssssssssssse, ive added another change to my forum which involved the template but it was done before ur smiley bar editions and didnt think it would work together with shoutbox but i decided it does and would really really be gratefull if you could edit my index.template again - if ur too busy just say and i promise not to sulk too much
You should be all set. ;D
Hey there! This is a great mod, and I've installed it all okay, but I want to move it to the bottom (don't like it at the top).
I saw you mentioned this on the first page, but perhaps that's a bit out of date now, 'cos I tried moving the third block of code, but it didn't work. I
Could you point me at the right bit of code to move in the index.template.php file* please? (it's SMF 1.1.5 if that makes any difference).
Many thanks!! :D ... and good work on this mod! Sorry if I'm repeating an old question here.
*If that's still valid.
Quote from: SunKing on August 21, 2008, 10:44:38 PM
You should be all set. ;D
im assuming this was for me Sunking - it didnt work, didnt bring a smiley bar up or even an eroor it just done nothing lol
i did add the animated colapse and smiley files in yshout folder so it werent a case of forgetting to add them
Is there any way to make the loading of smilies faster? As it makes the page a bit slow and kind of is annoying to see the message "wait till its fully loaded".
I added the edits (again) and it should work - but I don't see a difference between this one and the first one attached. :P
now i get an error - this is the url to see http://www.bullbreedluverz.com/****/index.php
I didn't get an error as such, but there was no shoutbox. Try this attached file.
got the same error
Fatal error: require() [function.require]: Failed opening required 'mymod/smiley.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bullbree/public_html/smfcopy/Sources/Load.php(1755) : eval()'d code on line 697
i see it says mymod/smiley.php and the other day i read something about smiley bar saying to make a directory called mymod and add the smiley.php to it but the instructions you gave me (which worked on the unedited index.template.php) didnt say do that - do you think that is hwat i should do make a mymod folder in yshout folder ??
I've fixed it. And that was essentially the problem. I posted it on your site. :P
posted it on my site ???
It's slooow on this site for me today, so I figured I would speed things up a bit.
But I have attached it here as well.
ooooooooooh lol i cudnt see as my screen was showing the error still till i uploaded template from here
glad you said this sites running slow fort it was me lol
oooops did i forget to set forum in maintenance moad lol i ent done no settings on it as gunna copy them all from my other forum
Hey guys, i have just installed the shoutbox. I wanted to place it in the news area at the top of the forum.
We have SMF 1.1.5, and i followed the instructions at http://www.simplemachines.org/community/index.php?topic=137508.msg1534963#msg1534963 (http://www.simplemachines.org/community/index.php?topic=137508.msg1534963#msg1534963)
Meaning i put the big bit of code where it told me to, and put the <div id="yshout">',$txt['yshout_loading'],' in the news box.
Is there more than one piece of code that should go in the index.template.php for this to work or is it only that one piece of code and the news piece?
Anyone can help me out with what the problem might be?
This is what im currently seeing:
thanx to Sunking for all his help in sorting out my problems with the shoutbox :D :D
My members are telling me that the SMF who's online area is not correct. It shows members online that really aren't. It seems to have started right after I installed the shout box. Has anyone ever heard of this happening?
Yes, I have heard of that happening before...not too long ago.
I will search around and see what I can find for you.
Quote from: SunKing on August 23, 2008, 01:49:03 PM
Yes, I have heard of that happening before...not too long ago.
I will search around and see what I can find for you.
Thanks because it is aggravating many members on my board. I have installed v1.21 by the way.
[/redeyes] :P
I finally found the reference to that issue....
Quote from: kriskd on August 09, 2008, 01:40:36 PM
I'm having an issue where my users are always showing as online and I'm wondering if it is due to this mod. Does the shoutbox constantly keep users active and therefore making it appear that they are online if their browser is open to any page of the message board?
Quote from: nneonneo on August 09, 2008, 01:52:02 PM
@kriskd: Yes, the shoutbox does keep a user active; I am planning to change this to "active only on shouts" in a future release.
Thanks. That's kind of a bummer but at least he says he'll fix it. I hope soon.
Is there any way to make these fake online users go away manually?
Thx for the good mod, just got it installed :) I have just one question - is it possible shouts to be displayed in reverse order(the newest on top and so on) ? Sorry if the question is already asked.
Quote from: Broken81 on August 23, 2008, 05:43:40 AM
Hey guys, i have just installed the shoutbox. I wanted to place it in the news area at the top of the forum.
We have SMF 1.1.5, and i followed the instructions at http://www.simplemachines.org/community/index.php?topic=137508.msg1534963#msg1534963 (http://www.simplemachines.org/community/index.php?topic=137508.msg1534963#msg1534963)
Meaning i put the big bit of code where it told me to, and put the <div id="yshout">',$txt['yshout_loading'],' in the news box.
Is there more than one piece of code that should go in the index.template.php for this to work or is it only that one piece of code and the news piece?
Anyone can help me out with what the problem might be?
This is what im currently seeing:
Noone has any tips as to what might be causing the problems i described in the above post? :(
Can you provide a link to your site?
any updates over my query ?
http://www.simplemachines.org/community/index.php?topic=137508.msg1670329#msg1670329
This is weird - I was working with a member trying to understand this keeping users in the active online list. I tried banning a user that the shoutbox code was keeping online and even with a ban implemented, the user still showed in the active online list! Very strange.
I have noticed once or twice this happening on my site and the user (even though they weren't online) they showed as being online for the remainder of the day. It was not until midnight that their name was removed from the Who's Online list. That being said, banning them wouldn't necessarily remove them from the Who's Online list, as they are listed there whether actually online or not.
@FLAMER
From what I understand of that, you are going to put the if(!in_array($context['current_action'],array(...))) just before the shoutbox code (in your index.template.php) where array(...) is going to list all of the pages you want the shoutbox to show up. Refer to the function template_menu() section of your index.template.php to see how this array works.
I'm back from vacation, but I think ~80 replies is a little too many to read :P
If anyone has questions that were not answered, go ahead and repost them or PM me a link to your post.
WOOOHOOOO!! Welcome back...lol.
I just worked out a weird problem with the shoutbox for someone and figured I would post it here for anyone else having such an issue.
Everytime he would install the shoutbox, the Modifications.english.php (and probably the Modifications.english-utf8.php) would be deleted by his host. I was given access via FTP and saw this for myself first-hand. After quite a bit of scratching my head, I figured out how to remedy the situation. His host apparently did not like the $txt['yshout_select_mode'] string, and would prevent such a string from being placed on the server. I simply changed $txt['yshout_select_mode'] to $txt['yshout_selected_mode'] in three files and everything works now. The three files are Modifications.english.php, Modifications.english-utf8.php, and yshout.php.
While this may have pretty much been an isolated issue, I'm posting it "just in case". ;)
That's downright weird. As a test, what happens if he bans "select"? Does it delete the _banlist.php file?
I'm guessing it's some sort of mod_security rule gone wild...
Quote from: SunKing on August 23, 2008, 02:39:45 PM
[/redeyes] :P
I finally found the reference to that issue....
Quote from: kriskd on August 09, 2008, 01:40:36 PM
I'm having an issue where my users are always showing as online and I'm wondering if it is due to this mod. Does the shoutbox constantly keep users active and therefore making it appear that they are online if their browser is open to any page of the message board?
Quote from: nneonneo on August 09, 2008, 01:52:02 PM
@kriskd: Yes, the shoutbox does keep a user active; I am planning to change this to "active only on shouts" in a future release.
Wow.... was about to install the shoutbox, but thats quite a bummer...
The shoutbox is awesome, but if it keeps users active, it kinda makes it hard for me to apply the mod...
Hope to see that fixed :)
On my site, this happens only very rarely. It only happens with 1 member at a time, and only lasts until midnight of that night. It is by no means a big issue with few members it has happened to. They like the shoutbox enough to just shrug their shoulders at it. And they all know it will ultimately be resolved anyway. :)
ah... thanx :)
That makes a huge difference . lol ..
I thought it would make ALL users that used the shoutbox, stay active online for ever.. hehe;)
Thanks for clearing that up
Quote from: nneonneo on August 24, 2008, 03:07:27 PM
That's downright weird. As a test, what happens if he bans "select"? Does it delete the _banlist.php file?
I'm guessing it's some sort of mod_security rule gone wild...
I typed
/banuser p select
and it just said users banned select.
Did you physically check to see if it had or had not deleted the _banlist.php?
Yes _banlist.php is still there.
Hi nneonneo,
This 's 2 nd question (1 st 's that the chat off and on for no reason for 1-2 min.) that i ' m very confused with it.
Now there's error show in chat first , then for the 2 nd time that error , i can't get in board again.
Hi,
the basic shoutbox works fine for me, but if I try to use the Advanced version, it doesn't work.
( edit: Sorry, the problem is with the 1.21 version in general, not the AdvSB. 1.20 works, both basic& advanced, but 1.21 gives out the errors described below. )
In IE7 I'm able to enter messages in the shoutbox, but in Firefox 3 nothing happens. Firebug gives out the following errors :
Class is not defined
moo.ajax.js()() moo.ajax.js (line 4)
[Break on this error] ajax = Class.create();
ajax is not defined
loadChat() yshout.j...uly062008 (line 74)
onload()() forum (line 25)
[Break on this error] new ajax (yshout_php, {
Quote from: F.L.A.M.E.R on August 21, 2008, 12:58:42 PM
Quote from: nneonneo on August 03, 2008, 12:57:44 AM
@optimushunk: Use $context['current_action'] to control the shoutbox.
For example:
if(!in_array($context['current_action'],array(...)))
{
SHOUTBOX CODE
}
Note that admin actions are any of
'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'
which is rather painful to look at (but check out SMF 1.1.5's template_menu function for that).
I still dont get it right.. Which file am i suppose to edit ? I did edit the index.template.php but yet no effect..it is nothing related to shoutbox.. i m kind of very confused...
Any Updates over this ?
Hie,
I want to remove yshout from every page of my forum please help me.
I want to use only yshout/index.php
help!
@runebergen, xrunner, ...: If the "who's online" thing really bugs you, or anyone else:
In yshout/yshout.php:
Remove the line
writeLog(); // mark user as online
Now, if you want the shoutbox to mark the user as online when they shout, add that line below
case "shout":
if(isPostBanned()) break;
if(!$user['can_sbpost']) break;
if(!isMod() && $sbMaintenance!==false) break;
(that was added in back in 1.08 when someone wanted the shoutbox to mark people as online; I had no idea it would break who's online ...)
@pumppu: The JS files have changed, and it's possible that your forum hasn't updated them. Open up SB_1.21.zip and copy the contents of yshout/js to your forum's yshout/js folder.
@stanaca: Edit Themes/<theme>/index.template.php and remove both pieces of code between "// YSHOUT HERE" and "// YSHOUT END".
@pongsak: I think that you might be running out of DB connections. Try using a non-persistent connection or asking your host to increase the simultaneous connection limit.
@Broken81: The problem is the use of v1.20 index.template.php code with v1.21 of the shoutbox -- they are unfortunately not compatible. Just make sure to use 1.21 <head> code and it should work.
Quote from: nneonneo on August 25, 2008, 01:26:17 PM
@runebergen, xrunner, ...: If the "who's online" thing really bugs you, or anyone else:
In yshout/yshout.php:
Remove the line
writeLog(); // mark user as online
Thanks much, I have it commented out and will check how it works this afternoon.
Hi,
PROBLEM: when i shout, the chat dissapear, only its see again if i refresh with F5 or go to another page
What version of SMF are you using? Which shoutbox version are you using? Are other members experiencing the same issue? What browser are you using? I think that covers it. :P
Quote from: SunKing on August 26, 2008, 08:29:36 PM
What version of SMF are you using? Which shoutbox version are you using? Are other members experiencing the same issue? What browser are you using? I think that covers it. :P
SMF 1.5
SHOUT 1.21
Members: all
Browser: all (IE, IE last?, Firefox 2 and 3)
Thanks
Quote from: nneonneo on August 25, 2008, 01:26:17 PM
@runebergen, xrunner, ...: If the "who's online" thing really bugs you, or anyone else:
In yshout/yshout.php:
Remove the line
writeLog(); // mark user as online
Yes, this did indeed fix the who's online issue. Thanks for the information.
;D
hows it going mate..
i'm having a MASSIVE problem..
i keep getting errors for this mod..
i installed everything correct through PACKAGES
but it doesnt show on my skin only Default skin..
i installed it with my OverView Skin..
the shoutbox works on the Defualt skin..but also it says "shoutbox Loading"
that doesnt really matter..
i just really want it on my board..
i followed the instruction "Installation to Other Themes"
but i still get errors =[
the first code works
// 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
that seem to doesnt have an error..
but after i add where i want it 2 go..it gives error =[
any help?
thank you!
if you want 2 see my board its
www.xclusivedl.com/forum
help
Hello Mates. I have ShoutBox 1.20PL i need insert my shoutbox under "Info Center".When i cut my this code with index. template.php
// 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
and paste this code in boardindex.template.php echo'<div class="tborder" style="margin-top: 0;">
<div class="catbg" style="padding: 5px 5px 5px 10px;">
<center>Shoutbox - Tu nie zadajemy pytań, od tego jest forum!</center>
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg">
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'</div>
</td>
</tr>
</table>
</div><br />';
i have only "It Lasts loading"
What i can make ? ; ]
Sorry for my very,very bad english.
@Sayos: Try turning off $gzipCompression in yshout/settings.php
@dangerboy: post index.template.php and where you want the shoutbox.
@Xclusive: Are you getting a Parse Error? If so, post the *modified* index.template.php and where you want the shoutbox.
@Sut: Did you also add the <head> code?
@Up
no i dont paste the <head>.;)
any updates ?
http://www.simplemachines.org/community/index.php?topic=137508.msg1670329#msg1670329
@Sut: The <head> code is necessary to make the shoutbox work; it contains all the script code necessary to start it up.
@F.L.A.M.E.R: I don't quite understand the question...
I mean you have told like controlling via some code.. can you give me some example that how to control the shoutbox to appear up onto specified page ?
Is there anyway to flip it around, NEW post at the top?
@F.L.A.M.E.R: For only showing on one board:
global $board;
if(!empty($board) && $board===5)
{
SHOUTBOX CODE
}
For showing on only the arcade:
if($context['current_action']=='arcade')
{
SHOUTBOX CODE
}
For not showing on the admin panel:
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')))
{
SHOUTBOX CODE
}
@Ferretness: Yeah, edit yshout/settings.php and set $reverseShouts to true
Where i cant find the head code? i have themes overview, maybe i cant send you my index.template.php in pm?
and where shall i paste or add in those codes ?
here it is nneonne can you position it same like the default theme
here is my index.template.php, nnneo please look them :)
@Sut: on the main mod page
@F.L.A.M.E.R: index.template.php, wrapping the existing shoutbox code
@dangerboy: as an attachment, please
nneonneo yup already modified the first post.. i attached it already hope you can help me
nneonneo i watch the main mod page, and i paste this code
// 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
in index.template.php and i have only (http://s4.tinypic.com/332xwya.jpg)
@Sut: According to the index.template.php you posted, you already have the shoutbox code elsewhere:
// 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
It needs to be removed if you want the shoutbox somewhere else.
@dangerboy: Add the shoutbox code after
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
and make sure to add the <head> code too.
i still get error
Fatal error: main() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/teknoy/public_html/poroms/yshout/yshout.php on line 193
In yshout/yshout.php: change
global $yshoutdir;
to
global $yshoutdir,$sourcedir;
i could not find global $yshoutdir in yshout.php.
still get this error Fatal error: main() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/teknoy/public_html/poroms/yshout/yshout.php on line 193
Hi nneonneo!
can you help me?
SMF version: 1.1.5
nneonneo's Shoutbox: 1.21
1. I would like in my shoutbox showed 10 line of messages.
2. How i can delete nick button, and to level to the left side the bar of the message
(http://img145.imageshack.us/img145/9436/helpdk3.png)
3. How I can add a limit: in shoutbox can write members which they wrote 25 posts.
4. How I can add a limit for members (3 messages in shoutbox for usual members, [thats does not concern administrators])
uff, can you help me :)?
@dangerboy: OK, then just add
global $sourcedir;
before
require_once($sourcedir . '/Subs-Post.php');
@Nequil:
1) $maxLines in yshout/settings.php
2) In yshout/yshout.php: change
$inputForumName=' <input id="forum-name" name="forum_name" type="text" maxlength="'.$maxUsernameChars.'" ';
to
$inputForumName=' <input id="forum-name" name="forum_name" type="text" style="display:none;" maxlength="'.$maxUsernameChars.'" ';
3) Add a postgroup for 25 posts, then give it the "post in shoutbox" permission.
4) This I am not so sure about.
i still get this error and half of my page disappeared
Parse error: syntax error, unexpected ',' in /home/teknoy/public_html/poroms/yshout/yshout.php on line 193
Quote
@Nequil:
1) $maxLines in yshout/settings.php
2) In yshout/yshout.php: change
$inputForumName=' <input id="forum-name" name="forum_name" type="text" maxlength="'.$maxUsernameChars.'" ';
to
$inputForumName=' <input id="forum-name" name="forum_name" type="text" style="display:none;" maxlength="'.$maxUsernameChars.'" ';
3) Add a postgroup for 25 posts, then give it the "post in shoutbox" permission.
4) This I am not so sure about.
1. thanks :)
2.(http://img223.imageshack.us/img223/4880/helpod5.png)
how i can move the bar equally to the begin of text
3. thanks :)
4. I would like to members send only 3 lines of messages in shoutbox (spam security) (understand?)
@dangerboy: Post your modified yshout/yshout.php
@Nequil:
2. Edit CSS and delete margin-right: 5px; from #yshout #forum-name {
4. Possible, I guess. You will have to add something like
global $ip;
if(!isMod() && preg_match($ip, file_get_contents($chatPath))>3)
{
echo "Sorry, you've already posted 3 messages...";
return;
}
to writeLine().
Quote@Nequil:
2. Edit CSS and delete margin-right: 5px; from #yshout #forum-name {
doesnt work :o ( attach )
Quote4. Possible, I guess. You will have to add something like
global $ip;
if(!isMod() && preg_match($ip, file_get_contents($chatPath))>3)
{
echo "Sorry, you've already posted 3 messages...";
return;
}
to writeLine().
in which file?
Quote@Nequil:
2. Edit CSS and delete margin-right: 5px; from #yshout #forum-name {
doesnt work :o ( attach )
Quote4. Possible, I guess. You will have to add something like
global $ip;
if(!isMod() && preg_match($ip, file_get_contents($chatPath))>3)
{
echo "Sorry, you've already posted 3 messages...";
return;
}
to writeLine().
which file?
my only problem now is that.. the shoutbox appears but it only stays on Loading shoutbox after it freezes
I've attached my error log below can you check it for me? thanks
@Nequil: Try adding padding-left:0; to #yshout fieldset {
yshout/yshout.php
@dangerboy: Modifications.english.php is missing, and can I see your forum?
Hey nneonneo, when an admin views shoutbox permissions in "simple" view, the text for the shoutbox section does not show. This can be fixed by adding the string $txt['permissiongroup_simple_yshout'] = 'Shoutbox'; along with the other permission strings. Just thought I'd bring it to your attention. ;D
Sorry for the ignorance, but how would I turn on "simple" mode? Does it apply to SMF 1 or 2?
I just looked and it appears to only be for SMF 2. If you go into permissions, then click on modify for a specific membergroup, you'll see "Change View" at the very top. The choices are Simple | Classic.
Classic is the same layout as SMF 1.1.x. Simple is a much better looking, more organized permissions manager IMO, so it's what I use.
Ah, thanks for the info. This will be fixed in a future release.
Dont know if this has been asked? is there a way to have the shouts in reverse order so the latest shout show at the top so we dont have to scroll down to see if a new shout has been made thanks
Quote from: nneonneo on August 29, 2008, 01:34:11 PM
...edit yshout/settings.php and set $reverseShouts to true
Open up the yshout folder and you will see settings.php. On line 32 (or there abouts) is $reverseShouts=false;. Set this to true for reverse ordered shouts. Then upload it back to your yshout folder.
Thanks, you must of read my post before i deleted it as i found it lol sorry its 6am and i have been up all night getting this thing to work and i am not thinking right,anyway that helped me big time thanks alot
Is there a way to have the history page text bigger please
Are you wanting just the history text larger? I think the history text by default is the same size as the shoutbox text.
on my site the history text is tiny ;)
Quote@Nequil: Try adding padding-left:0; to #yshout fieldset {
thanks ;]
global $ip;
if(!isMod() && preg_match($ip, file_get_contents($chatPath))>3)
{
echo "Sorry, you've already posted 3 messages...";
return;
}
Quoteyshout/yshout.php
but in which line ?
i dont understand where i must paste this...
This shoutbox is a pain to install on custom themes... :'(
I've attached my index.template.php because I don't know anymore... what did I do wrong? and could someone PLEASE fix it?
It's actually quite easy on most custom themes, once you understand how it's added. Where would you like it to appear? Have you already installed it via the package manager (just skipping the index.template.php error)?
EDIT: And what theme is it?
nneo i attached the two files i hope to make this work pls.
Quote from: SunKing on August 31, 2008, 10:57:13 AM
It's actually quite easy on most custom themes, once you understand how it's added. Where would you like it to appear? Have you already installed it via the package manager (just skipping the index.template.php error)?
EDIT: And what theme is it?
Theme is Phobos 11, and it didnt give any errors at all while installing..
Originally I just wanted it to be installed on the board index.. but I have no idea if this is possible with this one..
Where would you like it displayed?
Originally on the board index under the info center, but I guess at the bottom of each page can work too
If you want it only in the info center on the main page, attach your BoardIndex.template.php (from Phobos, if it has one). If you want it on all pages, I can make that edit in the file you already attached. It makes no difference to me. :)
Lets stick to just this file I already added, my members seem to like that more anyway. (my host doesnt.. XD)
OK. It may take me a bit because the theme is set up a bit different than most. I installed it on my test site, so I can work with it until it is integrated with that theme like it should be. Please be patient. ;D
@Nequil: add it to the beginning of writeLine().
Quote from: SunKing on August 31, 2008, 10:57:13 AM
It's actually quite easy on most custom themes, once you understand how it's added.
>:(
I stand corrected. That was by far the most ridiculously difficult shoutbox custom theme edit to date - and I have done probably about 30 or so.
<insert cussing here>
OK. CLICK HERE (http://www.empireofthesun.net/testsite1/index.php) and tell me if that will work for you. That was the best I could do.
nneonneo i already attached the two files in my last post. thanks
@dangerboy: You are using version 1.15 of the shoutbox with 1.21 <head> code. You should update your shoutbox to 1.21.
which version 1.21? sb or the advance? i tried the advance 1.21 it works i can see the shoutbox and type.. but i it wont enter or appear the messages that i wrote. its just there the shoutbox and textfield
Try regular SB...
Anyone know how to change the history text as what got suggested to me above does not change the history text :)
anyway to make the shoutbox text imput box add another line when you reach the end of the one you're on as opposed to continueing into nothing
ex.
:)
sdhfdshfoidhf
dsfhaisdfhsdd
:(
dishdisdhishd(end of box text goes into nothingness)
#yshout #shouts {
overflow: auto;
width: 550px; /* the width you want to display */
height: 150px; /* the height you want to display */
}
font-size: 6px;
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: 4pt;
color: #141414;
}
#yshout #shout-form {
margin: 0;
padding: 0;
}
#yshout #shout-form fieldset {
border: none;
}
#yshout #forum-name {
color: #666666;
width: 50px;
margin-right: 5px;
}
#yshout #shout-text {
width: 200px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
hi, where i can change size fonts in my shoutbox? when i edit this code i dont have any Changes.sry for my english.
Quote from: SunKing on August 31, 2008, 01:47:57 PM
Quote from: SunKing on August 31, 2008, 10:57:13 AM
It's actually quite easy on most custom themes, once you understand how it's added.
>:(
I stand corrected. That was by far the most ridiculously difficult shoutbox custom theme edit to date - and I have done probably about 30 or so.
<insert cussing here>
OK. CLICK HERE (http://www.empireofthesun.net/testsite1/index.php) and tell me if that will work for you. That was the best I could do.
So it wasnt me, it was just that I picked a too difficult theme? well that does make me feel better.
And yea, it does work, could you add the php file for me? :D
You rawk <3
As long as you have already installed the shoutbox using the package manager (which I believe you stated you have), then this should be all you need to have it working on your theme.
nneonneo it worked thank you man ur da best
Quote from: SunKing on September 01, 2008, 11:25:59 AM
As long as you have already installed the shoutbox using the package manager (which I believe you stated you have), then this should be all you need to have it working on your theme.
Strange enough.. it doesnt work, and it only shows the shoutbox to admins? Oh and without looking as nice on your forum as well.
Maybe it didn't install right? I guess I'll browse through the manual install..manual to check if it installed properly...
-edit-
It did install everything... I dont get it.. want me to PM you the login to a test account with admin powers?
Only showing to admins means you need to set the permissions for other membergroups using SMF's permission system in the admin area. As far as it not looking right, can you post/PM a link to your site so I can take a look at it in action. I can adjust it to work for your site like it is on my test site. I promise. :P
anyway to make the shoutbox text imput box add another line when you reach the end of the one you're on as opposed to continueing into nothing
ex.
:)
sdhfdshfoidhf
dsfhaisdfhsdd
:(
dishdisdhishd(end of box text goes into nothingness)
Are you talking about the textbox where you type your shout?
SunKing fixed the problem with the theme, (he rawks!)
But now there's an error in the load, or so it says...
Notice: Undefined offset: 1 in /usr/home/deb11508/domains/tfdreamhouse.com/public_html/forum/Sources/Load.php(1726) : eval()'d code on line 72
Notice: Undefined offset: 2 in /usr/home/deb11508/domains/tfdreamhouse.com/public_html/forum/Sources/Load.php(1726) : eval()'d code on line 72
It wont auto-refresh, nor does it let me click history, it crashes the browser then.
attached the load.php for problem solving @_@
Quote from: SunKing on September 01, 2008, 12:49:08 PM
Are you talking about the textbox where you type your shout?
yes i am, I would give you screen shouts but photoshop is bugging out.
lemmui make it easier
// Shout form
echo '
<form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;">
<fieldset>';
$inputForumName=' <input id="forum-name" type="text" maxlength="'.$maxUsernameChars.'" ';
$inputShoutText=' <input id="shout-text" type="text" maxlength="'.$maxShoutChars.'" ';
$inputShoutButton=' <input id="shout-button" type="submit" ';
if(isPostBanned())
Im pretty sure thats the code I have to edit.
I have no idea how but i want it to be like width=50px rows=4 I can change the numbers no my personal needs but I want to define how wide and how many rows the forum has.
I am pretty sure this is what you are looking for. Open yshout.php and search for:
$inputShoutText=' <input id="shout-text" name="shout_text" type="text" maxlength="'.$maxShoutChars.'" ';
$inputShoutButton=' <input id="shout-button" type="submit" ';
change that to:
$inputShoutText=' <textarea id="shout-text" name="shout_text" type="text" cols=30" rows="4" maxlength="'.$maxShoutChars.'" ';
$inputShoutButton='</textarea><input id="shout-button" type="submit" ';
where cols="30" is the width of the box and rows="4" is the height of the box.
I love you
WAIT problem
I have the shape i want. But two problems with it
1 I cant change the width only the height
2. When I type instead of hitting the end and going to the next rom. It just keeps going on in the box and gives me a scrollbar.
marry me?
Seriosly thanks though. I more question. How would one align the username box, shoutbox text (above where it says "shoutbox") and the shout button to the center?
Cant tell you how much this has helped me.
....nevermind then. ;D
EDIT:
I have the vertical alignment sorted out, but I just noticed your other two problems. I will get those sorted out as well then before I attach the modified file.
OK.
1) I cannot figure out the width of the textbox. cols="30" (or even cols="300") doesn't seem to do a thing.
2) As far as typing and getting the scrollbar instead of wrapping it to a new line is only going to occur if you hold a key down (or have a word longer than the width of the box - unlikely). As you are typing and getting to the end of the textbox, as soon as you hit the spacebar, it will wrap it to the next line.
3)I have the vertical alignment sorted out. Find:
// Shout form
echo '
<form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;">
<fieldset>';
$inputForumName=' <input id="forum-name" type="text" maxlength="'.$maxUsernameChars.'" ';
$inputShoutText=' <textarea id="shout-text" name="shout_text" type="text" cols="30" rows="4" maxlength="'.$maxShoutChars.'" ';
$inputShoutButton=' </textarea><input id="shout-button" type="submit" ';
if(isPostBanned())
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',$txt['yshout_p_banned'],'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_banned'],'" disabled="disabled" />';
elseif(!isMod() && $sbMaintenance!==false)
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',$sbMaintenance,'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_maintenance'],'" disabled="disabled" />';
elseif(!$user['can_sbpost'])
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',isGuest()?$txt['yshout_no_guests']:$txt['yshout_no_posting'],'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_maintenance'],'" disabled="disabled" />';
else
{
if(isGuest() && $autoGuestName===false)
echo '
',$inputForumName,'value="',$user['name'], '" />';
else
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />';
echo '
',$inputShoutText,'value="" />
',$inputShoutButton,'value="',$txt['yshout_shout_button'],'" />';
}
echo '
</fieldset>
</form>';
if($shoutFormOnTop)
echo '<div id="shouts">',readChat(),'</div>';
if($gzipCompression && !$fromSMF) ob_end_flush();
}
// Figure out the request
and replace that entire section with this:
// Shout form
echo '
<form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;">
<fieldset><table>';
$inputForumName=' <td valign="middle"><input id="forum-name" type="text" maxlength="'.$maxUsernameChars.'" ';
$inputShoutText=' </td><td><textarea id="shout-text" name="shout_text" type="text" rows="4" maxlength="'.$maxShoutChars.'" ';
$inputShoutButton=' </textarea></td><td valign="middle"><input id="shout-button" type="submit" ';
if(isPostBanned())
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',$txt['yshout_p_banned'],'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_banned'],'" disabled="disabled" />';
elseif(!isMod() && $sbMaintenance!==false)
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',$sbMaintenance,'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_maintenance'],'" disabled="disabled" />';
elseif(!$user['can_sbpost'])
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',isGuest()?$txt['yshout_no_guests']:$txt['yshout_no_posting'],'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_maintenance'],'" disabled="disabled" />';
else
{
if(isGuest() && $autoGuestName===false)
echo '
',$inputForumName,'value="',$user['name'], '" />';
else
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />';
echo '
',$inputShoutText,'value="" />
',$inputShoutButton,'value="',$txt['yshout_shout_button'],'" />';
}
echo '</td></table>
</fieldset>
</form>';
if($shoutFormOnTop)
echo '<div id="shouts">',readChat(),'</div>';
if($gzipCompression && !$fromSMF) ob_end_flush();
}
// Figure out the request
@callteg4
I have tried and tried to get just the history text larger, and I cannot quite get it working. The closest thing I can working increases all of the shoutbox text. Sorry, maybe someone else in here can solve that one. :(
@SunKing: Perhaps try using a literal CSS block in yshout/yshout.php, instead of a link to the main CSS file?
The default looks like
<style type="text/css">
/*<![CDATA[*/
/* form and toollink CSS omitted */
#yshout {
font-size: 10px;
overflow: hidden;
}
#yshout #shouts { /* main shouts area */
color: #000000;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #000000;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 6pt;
color: #141414;
}
/* from default theme */
.meaction {
color: red;
}
a:link {
color: #476C8E;
}
/*]]>*/
</style>
Quote from: SunKing on September 02, 2008, 12:27:54 AM
@callteg4
I have tried and tried to get just the history text larger, and I cannot quite get it working. The closest thing I can working increases all of the shoutbox text. Sorry, maybe someone else in here can solve that one. :(
Thanks for your time I can get the shout text larger but that stubin history text is having none of it.Thanks for tying
ok, thanks for the enter thing.
But when I put in the whole align thing in, it puts my shoutbox on the same line as the username....
alright, after relizing there wasn't a uninstall for version 1.12, I finally upgraded to the current 1.21 for 1.15. I have 1 question though.
My users liked the layout of the old shout box. My issue is, the toolbar(without any shouts) is displayed at the bottom. If there anyway I can get it to stay at the top right below "shout box" like how the old version had it?
Since 1.03, the layout has not changed significantly. Are you using SB_1.21?
Quote from: nneonneo on September 02, 2008, 01:14:54 PM
Since 1.03, the layout has not changed significantly. Are you using SB_1.21?
yes, I'm using 1.21 the only way I can explain it, is with the old code, it had the line breaks to up the tool bar. the instant on code doesn't have that option.
Well, hi and thanks nneonneo for this cool mod. Well, i'm looking for adapting the "smiley bar" to the news header (i installed my shoutbox there), and i'm wondering how can i do this. Any suggestion?
Thanks in advance,
Darkkurama
Another small problem - users are complaining that the entire forum "jumps" when the shout box changes size due to certain long lines of text or when it is cleared out. Can the shout box be forced to stay the same size no matter how many lines of text there are?
@mdrcracing: Hmm, I'm still not sure I understand the question. Perhaps you can make some screenshots?
@darkkurama: Unfortunately, the news header won't accept PHP, which is required for the smiley bar to work. I supposed you could hack the template's news section to add the smiley code, bypassing the news header.
@xrunner: Use a height: declaration in index.template.php's CSS code (add it to #yshout #shouts)
I feel forgotten about...but its ok =] My problem seems to be hard to fix. Sunking/ nneonneo. Do either of you have AIM, or you could go to my site
www.h3artificer.com
If you get time I think it would be easier to discuss the problem with you one on one. Not through threads. I appreciate it if you can, but I understand entirely if you cannot/ will not.
Thank you.
I have PM'd you, Ferretness. ;D
Quote from: nneonneo on September 03, 2008, 12:55:45 PM
@xrunner: Use a height: declaration in index.template.php's CSS code (add it to #yshout #shouts)
Thanks, that was just what was needed, fixed the issue!
Thank you so much Sun, the shoutbox works like a charm now.
I can start yelling at my mods to moderate.
Anyway, again,. thank you, i love you, you are the best.
You are quite welcome! Glad I could help. Enjoy you're new toy. ;D
hi, I have installed the shout, with the theme of default all ok, but with the others I don't succeed in making to visualize the shout in page.I have performed the instructions for other themesInstallation to Other Themes
In the theme's "index.template.php" file:
find
Code: [Select]
// 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
Code: [Select]
// 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:
Code: [Select]
// 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
..but nothing doesn't appear the shout my theme è:Phobos design by Bloc.thanks
My version of smf is 1.1.5
i attach the file index template.php of the my teme.
I am having a strange issue with v1.21. The shoutbox seems to work, but once it loads it disappears. It appears that javascript empties the div of content after loading. If you hit the escape key just before it disappears, the shoutbox works. The problem is that after submitting a new shout, it reloads and you have to hit escape again. I'm using a custom mod and installed shoutbox with 1.21 instructions. The shoutbox also appears to work fine for guests, even posting to it (which is backed to be locked down), so the issue is only with forum members.
You can see this issue at www.videogameoutsiders.com/forum/ by registering. Anyone seen this issue before?
EDIT--
I've figured it out. In the settings.php file, compression was turned on, but it was erroring out behind the scenes, causing the javascript functions to fail. Once I shut off compression, it started working.
@smithz: As I suspected from your post, the shoutbox code has all ended up on the same line, causing the initial // YSHOUT HERE comment to effectively disable the added code. Try your edits again, but use a different text editor if possible.
Ferretness' problem seems to have made mine overlooked, so I'm asking you to please look at post http://www.simplemachines.org/community/index.php?topic=137508.msg1685959#msg1685959
The problem isn't in Load.php, it's actually in index.template.php on line 72. Can you post it?
Hi I'm having major problems with my shoutbox today.
When I view it I receive many error messages.
Warning: session_start() [function.session-start]: open(/tmp/sess_bdacb16d19c2c5048731260425683709, O_RDWR) failed: Read-only file system (30) in /home/mummies/public_html/forum/yshout/yshout.php on line 191
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/mummies/public_html/forum/yshout/yshout.php:191) in /home/mummies/public_html/forum/yshout/yshout.php on line 191
Warning: Cannot modify header information - headers already sent by (output started at /home/mummies/public_html/forum/yshout/yshout.php:191) in /home/mummies/public_html/forum/yshout/yshout.php on line 197
History Commands ExtendedHistory HideAdminLinks ReturnToShoutbox
Warning: session_start() [function.session-start]: open(/tmp/sess_bdacb16d19c2c5048731260425683709, O_RDWR) failed: Read-only file system (30) in /home/mummies/public_html/forum/yshout/yshout.php on line 191
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/mummies/public_html/forum/yshout/yshout.php:191) in /home/mummies/public_html/forum/yshout/yshout.php on line 191
Warning: Cannot modify header information - headers already sent by (output started at /home/mummies/public_html/forum/yshout/yshout.php:191) in /home/mummies/public_html/forum/yshout/yshout.php on line 197
Warning: session_write_close() [function.session-write-close]: open(/tmp/sess_bdacb16d19c2c5048731260425683709, O_RDWR) failed: Read-only file system (30) in /home/mummies/public_html/forum/yshout/yshout.php on line 681
Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in /home/mummies/public_html/forum/yshout/yshout.php on line 681
Warning: Unknown: open(/tmp/sess_bdacb16d19c2c5048731260425683709, O_RDWR) failed: Read-only file system (30) 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 (/tmp) in Unknown on line 0
I have no idea what's going on, I haven't touched the forum nor the files at all.
Hmm, this line is important:
Warning: session_start() [function.session-start]: open(/tmp/sess_bdacb16d19c2c5048731260425683709, O_RDWR) failed: Read-only file system (30) in /home/mummies/public_html/forum/yshout/yshout.php on line 191
This suggests that it is a problem with the host, because the session data cannot be written to. Perhaps you can ask them what is going on?
Just perfect with the smileys xD!!!
Thank you very much for givving me that idea xD!
Well, just a thing, How do i "beautify" the shoutbox?
I mean, change that "Shout!" button and putt an Outer Glow to the typing box next to your nickname, just like this pic:
(http://img150.imageshack.us/img150/5569/shoutboxsb9.png)
Thanks again!
Darkkurama
Well, actually, that screenshot was taken on a Mac using Safari; the glow and button shape are both part of the browser and not the layout.
That said, it shouldn't be hard to achieve using clever CSS and an image button, though I don't know the exact procedure you'd need.
(afterthought: the Safari browser on Windows has the same look, in case you want to try duplicating it)
The "where" to change this would be located in yshout.php:
$inputForumName=' <input id="forum-name" type="text" maxlength="'.$maxUsernameChars.'" ';
$inputShoutText=' <input id="shout-text" name="shout_text" type="text" maxlength="'.$maxShoutChars.'" ';
$inputShoutButton=' <input id="shout-button" type="button" ';
so that it would look something like <input id="shout-text" name="shout_text" style="border:3px solid #95bcde;" which would give you almost that exact effect (just minus the glow).
Quote from: nneonneo on September 04, 2008, 05:07:07 PM
The problem isn't in Load.php, it's actually in index.template.php on line 72. Can you post it?
added
Quote from: nneonneo on September 04, 2008, 02:08:45 PM
@smithz: As I suspected from your post, the shoutbox code has all ended up on the same line, causing the initial // YSHOUT HERE comment to effectively disable the added code. Try your edits again, but use a different text editor if possible.
thanks i'am resolved installated version sd1.2.1 su 1.1.5..I now want that the shouts are limitaqti in the page to 5, while they are being boundless now..how do I do for making that in page there is always 5 shout?thanks
ok,for the color tex?
why the open smiles and close don't work?i click but nothing.thanks:-)
how to do to shorten the whole shoutbox?this way it is great to much..you look at the lines..and if I wanted to remove the lignes?
then because the keys open smiles and close don't go?thanks
attach image ;D
Why more less of 5 not work,i'have edit setting.php a 5 but a see in shout always 6 :(
@Con:
if(!empty($settings['custom_pages']))
{
$pag=explode('|',$settings['custom_pages']);
foreach($pag as $menu => $value)
{
$what=explode(',',$value);
$context['sitemenu'][]=array($what[0],$what[1],$what[2]);
}
}
The error is on the line "$context['sitemenu'][]=array($what[0],$what[1],$what[2]);". This has nothing to do with my shoutbox, but it seems to be connected to the "custom page" mod. Try uninstalling that mod, or if you don't want to do that, you can try debugging it by echo'ing the contents of "$settings['custom_pages']".
@smithz: Try the SB_1.21.zip package, as it is the "default layout" which is shorter.
Quote from: nneonneo on September 05, 2008, 01:00:21 PM
@Con:
if(!empty($settings['custom_pages']))
{
$pag=explode('|',$settings['custom_pages']);
foreach($pag as $menu => $value)
{
$what=explode(',',$value);
$context['sitemenu'][]=array($what[0],$what[1],$what[2]);
}
}
The error is on the line "$context['sitemenu'][]=array($what[0],$what[1],$what[2]);". This has nothing to do with my shoutbox, but it seems to be connected to the "custom page" mod. Try uninstalling that mod, or if you don't want to do that, you can try debugging it by echo'ing the contents of "$settings['custom_pages']".
@smithz: Try the SB_1.21.zip package, as it is the "default layout" which is shorter.
...I dont even have that mod.. but this theme was created to be compatable with quite a lot of mods.. maybe thats why..
ok,but because when i click on the smiles it not play?thanks
reinstalled cause of other non-shout related issues, and now it's stuck on
Quote...loading shoutbox...
Can't find what is causing this. Worked like a charm before.
nneonneo how can i reset the history.home.txt? I wanna reset it because its already occupying 15mb file size..
Quote from: ameo on May 07, 2008, 11:46:19 AM
I made sort of guide for dummies, or something like that, to place this shoutbox in News field, and make it look cool on forum.
Personally, I believe this is the best position for shoutbox, and if you don't need News on your forum you could place shoutbox instead.
NOTE: I believe this won't work for shoutbox version 1.20 // i'm not sure why not,
but it doesn't work for me. I had installed 1.15 I believe when I wrote tutorial and it works for 1.17 !!!
//p.s. if you still decide to try and succeed to make it work in 1.20/21 by following this method please let me know by pm. // do this only if you are pro and know what you're doing, otherwise you might mess up your forum //
(http://postthatpic.com/files/2526/1.png)
First steps you already know, but I'll repeat it just in case;
First download yShout and install it.
If you're using different theme than default one after
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
you must add this code into your index.template.php :
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" 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;
}
</style>';
// YSHOUT END
(http://postthatpic.com/files/2526/2.png)
Then do this:
Of course you need news box to be displayed in order to see shoutbox in your index page.
To do that go to Theme options and click to:
1. DISABLE eNews (http://postthatpic.com/files/2526/inflame.gif) [it is very dangerous to leave it enabled, so if it is checked,
you must uncheck it]
&
[/i]
2. Show news fader on board index [check it]
3. fading delay - set to 0
Click save, then in News box put this code instead of putting second code somewhere else:
<div id="yshout">',$txt['yshout_loading'],'
And save it.
(http://postthatpic.com/files/2526/3.png)
If you wish to change News to Shout box or Shoutbox you'll need to find file index.english-utf8.php / index.english.php or of any other language file you're using. They are stored under Forum/Themes/default/languages/ In there you'll need to edit string $txt[102] = 'News';
to $txt[102] = 'Shoutbox'; and re-upload that file to it's place. You'll need to replace old file with that new-one if you didn't delete old one first.
(http://postthatpic.com/files/2526/4.png)
I guess that's it. I hope it shall be helpful to at least someone.
And for new version? :)
ok,i solved :D..now in home i see this /www/greenhouse.org/serpiko/web/Sources/Load.php(1726) : eval()'d code on line 72
@ LinkinParkBoy: Just recently I made some changes in tutorial, and update for new version is available on the same page; thanks to nneonneo itself, who actually told me what to do.
Let me see :)
hello there nneonneo. how can i reset the history.home.txt? the file size is 10mb now.. and i want to reset all the logs
Its Works Yeah!
Ty ameo and nneonneo
Regards for all _o_
@dangerboy: just delete it
neo i already did that.. even tried changing the chmod permissions to 777.. it still cant be deleted.
create a new "empty" one and upload it over the top of that one. ;D
Hi my friend nneonneo.
I'm back with more difficulties...
1 - I upgrade to 1.2.1 and it's all Ok except the sound of Shouts... it doesn't stop after shouting and repeats an echo. I think that also happens whenever a member makes a refresh.
2 - How can I allow that just some members of a group have permissions to moderate Shout?
Thanks for your attention. :)
By the way, great changes in the Admin CP. ;)
@4T3IG0:
1) Hmm. Have you tried shift+refresh? The old version of the code might be cached.
2) Make a new membergroup and put those people in that group via "Additional Membergroups" in their Account Settings.
1) No I didn't shift+refresh... I will try it again.
2) And if some of the members are already Global Mod, and I don't wish all off them to Mod the Shout?
Thanks :)
If you create a membergroup called "Shoutbox Mods" or whatever, you can add any members you want to moderate the shoutbox to that membergroup under additional membergroups and the shoutbox moderation will be added to whatever permissions they already have.
Quote from: SunKing on September 07, 2008, 09:18:15 PM
If you create a membergroup called "Shoutbox Mods" or whatever, you can add any members you want to moderate the shoutbox to that membergroup under additional membergroups and the shoutbox moderation will be added to whatever permissions they already have.
Hi SunKing. Thanks for your help. I think I can do it.
:)
nneonneo i can't delete it nor rename the history.home.txt.. I just want to delete the contents of that because I only have a little space left in my hosting. tried every method that i could think but still doesnt work even tried changing permissions
Well, as an emergency measure, you could always just edit yshout/yshout.php, adding a clearhist command as described here:
http://www.simplemachines.org/community/index.php?topic=137508.msg1643552;topicseen#msg1643552
If that doesn't work, try using
$handle=fopen($historyPath, "w");
fwrite($handle,"\n");
fclose($handle);
in place of the unlink line
Hey all,
just installed ASB 1.21 and works great, but I want to increase the font size, it is tiny!
Where can I do this? I've tried editing the css file but no luck.
Text in history file looks huge, text on ASB is just tiny!
Thx,
P.
open yshout.css and find
#yshout #shouts {
and add font-size: 16px; right after it. You can change the 16px to your liking.
Now for my own question. :D
I am trying to add a menu that has some javascript in it. But when I add it, the shoutbox no longer shows anything. It is almost as if it were collapsed. I imagine there is a conflict with the SB scripts and the Menu script, but I have no clue where or what. I would really like to get these two things working together. Thanks for your help.
Hey SunKing,
thanks for the support!
I don't see where I should add the text, my yshout.css file has following code:
/* Default theme style. Modify to your taste. */
#yshout {
font-size: 11px;
}
#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: 11px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 150px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
Can you point me to what shall I change?
Thanks!
P.
Great mod, very useful in my case!
But in my SMF 2 Beta 4 installation it will not "shout", I'm not sure if it's a javascript error or something to do with the template changes or what. (It did work great in SMF 2 Beta 3.1).
Any ideas as of why this won't work? Thanks! :D
I've got it installed properly in SMF 1.1.5, but I can't figure out where to put the box. Everytime I try a spot, it either doesn't show up, or I get an error and have to remove it. Here's the theme I'm using: Foxy (http://custom.simplemachines.org/themes/index.php?lemma=625)
I'd like the box to appear below the button/navigation strip, if possible. Thanks!
@AJ32: Yes, they have changed the string handling in beta 4, which I relied on.
Here's the fix:
In yshout/js/yshout.js, change
function complex_escape(text) {
return escape(textToEntities(text.replace(/&#/g, "&#"))).replace(/\+/g, "%2B");
}
to
function complex_escape(text) {
return text.replace(/&#/g, "&#").php_to8bit().php_urlencode();
}
This will ONLY work in beta 4.
Hello,
Congratulations and many thanks for the mod which is the most succesful part of my site. I use Nneonneo's Ajax Shoutbox 1.09 and my forum is SMF 1.1.3. I am very satisfied with that.
The only thing that I wish to add is the option "Return" for users, as it is for moderators and admins. Sorry if it is answered before, but I searched, but couldn't find it. I want to add it because sometimes it doesn't refresh due to server problems.
Thank you!
Quote from: nneonneo on September 08, 2008, 05:58:13 PM
@AJ32: Yes, they have changed the string handling in beta 4, which I relied on.
Here's the fix:
In yshout/js/yshout.js, change
function complex_escape(text) {
return escape(textToEntities(text.replace(/&#/g, "&#"))).replace(/+/g, "%2B");
}
to
function complex_escape(text) {
return text.replace(/&#/g, "&#").php_to8bit().php_urlencode();
}
This will ONLY work in beta 4.
Thanks, works great! :)
Greetings,
I am having a little trouble in adding this code
// 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
<?php
// Version: 1.1.5; 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.5';
/* 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'] = true;
/* 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="qTp, Clan, qTp Clan, Counter Strike, CS 1.6, game, online, server, team, teamspeak, Counter Strike 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" />';
// 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
// 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>
</head>
<body>';
echo '
<div align="center"/>
<div id="widthControl"/>
<div id="topside-l">
<div id="topside-r">
<div id="topbar"><span style="font-size: 10pt; color: silver; font-family: tahoma; float: right; width: 10%;">', $context['current_time'], '</span></div>
<div id="navbar">', template_menu(), '</div>
<div id="header_bg">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="header_bg"><a href="', $scripturl, '"><img src="', $settings['images_url'], '/basic.png" style="float:left; margin-left: 18px; margin-bottom: 50px;" border="0" alt="', $context['forum_name'], '" /></a></td>
</tr>
</table>';
// The main content should go here.
echo '
<div align="center">
<div class="page" style="width:100%; text-align:left">
<div style="padding:0px 15px 0px 15px" align="left"><br />
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="windowbg" width="100%">', theme_linktree1(), '</td>
<td class="windowbg2" nowrap="nowrap"><div class="smalltext">';
if ($context['user']['is_logged'])
{
echo '<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
// 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'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $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'];
// 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 />';
}
}
if($context['user']['is_guest'])
{
echo '
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td class="middletext">', $txt[35], '</td>
<td><input type="text" class="bginput" style="font-size: 11px" name="user" size="10" value="', $txt[35], '" onfocus="if (this.value == \'', $txt[35], '\') this.value = \'\';" /></td>
<td class="middletext" nowrap="nowrap"><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 class="middletext">', $txt[36], '</td>
<td><input type="password" class="bginput" style="font-size: 11px" name="passwrd" size="10" /></td>
<td><input type="submit" class="button" value="', $txt[34], '" /></td>
</tr>
</table>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</div></td>
</tr>
</table><br />';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div id="footer">
<span class="smalltext" style="margin-bottom: 2ex; margin-top: 2ex;">', theme_copyright(), '<br /><br />' , $txt['c_copy'], ' | <a href="http://validator.w3.org/check/referer" target="_self">XHTML</a> | <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_self">CSS</a></span>
</div>';
// Show the load time?
if ($context['show_load_time'])
echo '
<div>', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</div>';
$nb=' | ';
echo '
</div>
</div>';
// 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>';
}
// 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>
</div>
</div>
</div>
</div>
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{ }
// Show a linktree...
function theme_linktree1()
{
global $context, $settings, $options;
// Folder style or inline? Inline has a smaller font.
echo '<div class="navbar" style="font-size:9pt">';
echo '<img class="inlineimg" src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" /> ';
// 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 class="inlineimg" src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="" border="0" /> <img class="inlineimg" src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" /> ';
// Show the link, including a URL if it should have one.
echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '">' . $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 ' &#187; ';
}
echo '</div>';
}
// 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 '
<ul>';
// Show the [home] button.
echo '
<li', $current_action == 'home' ? ' class="active"' : '', '><a href="', $scripturl, '">', $txt[103], '</a></li>';
// Show the [help] button.
echo '
<li', $current_action == 'help' ? ' class="active"' : '', '><a href="', $scripturl, '?action=help">', $txt[119], '</a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo '
<li', $current_action == 'search' ? ' class="active"' : '', '><a href="', $scripturl, '?action=search">', $txt[182], '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<li', $current_action == 'admin' ? ' class="active"' : '', '><a href="', $scripturl, '?action=admin">', $txt[2], '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<li', $current_action == 'profile' ? ' class="active"' : '', '><a href="', $scripturl, '?action=profile">', $txt[467], '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '
<li', $current_action == 'pm' ? ' class="active"' : '', '><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '<blink>['. $context['user']['unread_messages'] . ']</blink>' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '
<li', $current_action == 'calendar' ? ' class="active"' : '', '><a href="', $scripturl, '?action=calendar">', $txt['calendar24'], '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '
<li', $current_action == 'mlist' ? ' class="active"' : '', '><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<li', $current_action == 'login' ? ' class="active"' : '', '><a href="', $scripturl, '?action=login">', $txt[34], '</a></li>
<li', $current_action == 'register' ? ' class="active"' : '', '><a href="', $scripturl, '?action=register">', $txt[97], '</a></li>';
}
// Otherwise, they might want to [logout]...
else
echo '
<li', $current_action == 'logout' ? ' class="active"' : '', '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt[108], '</a></li>';
echo '</ul>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' <strong> | </strong> ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
Kindly guide me where to add this code. I want the shoutbox on the red highlighted area.
(http://img398.imageshack.us/img398/3061/62812506dg8.jpg)
@pipo_il_primero
try this:
/* Default theme style. Modify to your taste. */
#yshout #shouts{
font-size: 16px;
}
#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: 11px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 150px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
@sadiqsaad
What theme are you using? From what I can see in that image, you may need to add that code to the BoardIndex.template.php to get it to show up in that location. That, however, will only render the shoutbox on the main page, not any others. I will be more than happy to help you integrate the shoutbox into your theme, just need to know the theme, and then we will figure out the best location for it. ;D
Thx brother, the theme is
Basic (http://custom.simplemachines.org/themes/index.php?lemma=752)
CHECK HERE (http://www.empireofthesun.net/testsite1/index.php) to see if that's what you want. If so, then you can use the attached file. If not, then tell me exactly where you would like it, please.
This is wierd, I got the shoutbox setup, and I can setup permissions for guests, regular users, and global mods, but NOT regular mods. Why is this?
Using SMF 2.0 Beta 4 with only this mod installed.
@Threnelegy
If you will attach your index.template.php, I'll gladly fix it for you.
@machmanx
I believe regular mods are all board specific (the permissions for them don't quite follow the same rules).
You can take a look here (http://www.simplemachines.org/community/index.php?topic=137508.msg1695306#msg1695306) for a possible solution.
That makes sense, but the option is just not listed. So when I try to add that option to moderators, I get this error: "You can only select one action to modify the permissions". That's when I noticed, the enter button says "Shout!". Look:-
http://img411.imageshack.us/my.php?image=smfglitch2nf4.jpg
Why is that?
I just installed it on SMF 2.0 Beta 4 and I don't have that problem with the "Set Permissions" button. As far as the moderator permissions, you'll notice that there are other permissions as well that are not available to that membergroup.
Why would this javascript cause the shoutbox to stop working?
var staticmenuids=["staticmenu"]
var staticmenuoffsetY=[]
function getmenuoffsetY(){
for (var i=0; i<staticmenuids.length; i++){
var currentmenu=document.getElementById(staticmenuids[i])
staticmenuoffsetY.push(isNaN(parseInt(currentmenu.style.top))? 0 : parseInt(currentmenu.style.top))
}
initstaticmenu()
}
function initstaticmenu(){
var iebody=(document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
var topcorner=(window.pageYOffset)? window.pageYOffset : iebody.scrollTop
for (var i=0; i<staticmenuids.length; i++)
document.getElementById(staticmenuids[i]).style.top=topcorner+staticmenuoffsetY[i]+"px"
setTimeout("initstaticmenu()", 100)
}
if (window.addEventListener)
window.addEventListener("load", getmenuoffsetY, false)
else if (window.attachEvent)
window.attachEvent("onload", getmenuoffsetY)
@machmanx: Huh?! Shout! on the submit button? That is very strange. Perhaps it might be a bug in your browser? Try Shift+Refresh.
@SunKing: I suspect the "window.addEventListener("load", getmenuoffsetY, false) and "window.attachEvent("onload", getmenuoffsetY)" lines are overwriting the shoutbox's onload handler. The proper way to do this would be to chain the handlers together, e.g. by using some code from this page (http://www.htmlgoodies.com/beyond/javascript/print.php/3724571) to chain them together.
Thanks, Sunking. I already knew that, but I guess it's better just to create a new group.
Nneonneo, it was simply a browser refresh issue, lol! I can't believe that! Sorry for troubling you ;D
HOLY!!!!
I am really dabbling in unknown territory when it comes to javascript, and especially with things like "chaining" onload events. I can't even spell onload events. :P
That is some very good information you pointed me to, nneonneo, and after reading it, I have managed to chain the onload events and everything works great so far. Thank you very much for "directing" me.
Thanks SunKing, here it is. I've got the 'custom profile fields' mod installed also, I'm not sure if that might conflict or not.
It's pushing midnight here, so I will get on it when I get home from work tomorrow.
Thx brother thats really what I wanted. I uploaded the file but now I am getting this error
Fatal error: require_once() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/certcoll/public_html/qtpclan/forum/yshout/yshout.php on line 195
Quote from: nneonneo on August 30, 2008, 01:44:42 PM
@dangerboy: OK, then just add
global $sourcedir;
before
require_once($sourcedir . '/Subs-Post.php');
Ok I tried this solution but now my my forum is weird. Here is the url
http://qtpclan.co.cc/forum
nneonneo why can't i delete the history.home.txt in my hosting?? i just want to delete it because I only have a little space left pls let me know how to remove it
@dangerboy: I'm guessing it's a "chown" problem; the files are probably not owned by the FTP account, but rather by the WWW account. You need to ask your host to correct it, or there might be a tool in CPanel to fix it.
@sadiqsaad: Weird? You need to explain a bit more, I don't quite see what is weird about it...
Thx for the reply.
After signing in here is what I see
(http://img158.imageshack.us/img158/6135/44846017bk9.jpg)
Can you post index.template.php?
Here it is
<?php
// Version: 1.1.5; 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.5';
/* 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'] = true;
/* 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="qTp, Clan, qTp Clan, Counter Strike, CS 1.6, game, online, server, team, teamspeak, Counter Strike 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" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/yshout.css?July022008" />';
/* 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" />';
// 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
// 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>';
// script for shoutbox upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><!]]><![CDATA[[CDATA[
var current_header_sb = ', empty($options['collapse_shoutbox']) ? 'false' : 'true', ';
function shrinkHeaderSB(mode)
{';
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkSB=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_shoutbox", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrinkSB").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkSBHeader").style.display = mode ? "none" : "";
current_header_sb = mode;
}
function sbToggle() { shrinkHeaderSB(!current_header_sb); }
// ]]]]><![CDATA[></script>
</head>
<body>';
echo '
<div align="center"/>
<div id="widthControl"/>
<div id="topside-l">
<div id="topside-r">
<div id="topbar"><span style="font-size: 10pt; color: silver; font-family: tahoma; float: right; width: 10%;">', $context['current_time'], '</span></div>
<div id="navbar">', template_menu(), '</div>
<div id="header_bg">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="header_bg"><a href="', $scripturl, '"><img src="', $settings['images_url'], '/basic.png" style="float:left; margin-left: 18px; margin-bottom: 50px;" border="0" alt="', $context['forum_name'], '" /></a></td>
</tr>
</table>';
// The main content should go here.
echo '
<div align="center">
<div class="page" style="width:100%; text-align:left">
<div style="padding:0px 15px 0px 15px" align="left"><br />
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="windowbg" width="100%">', theme_linktree1(), '</td>
<td class="windowbg2" nowrap="nowrap"><div class="smalltext">';
if ($context['user']['is_logged'])
{
echo '<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
// 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'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $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'];
// 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 />';
}
}
if($context['user']['is_guest'])
{
echo '
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td class="middletext">', $txt[35], '</td>
<td><input type="text" class="bginput" style="font-size: 11px" name="user" size="10" value="', $txt[35], '" onfocus="if (this.value == \'', $txt[35], '\') this.value = \'\';" /></td>
<td class="middletext" nowrap="nowrap"><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 class="middletext">', $txt[36], '</td>
<td><input type="password" class="bginput" style="font-size: 11px" name="passwrd" size="10" /></td>
<td><input type="submit" class="button" value="', $txt[34], '" /></td>
</tr>
</table>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</div></td>
</tr>
</table><br />';
// Show the shoutbox!
shoutbox();
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div id="footer">
<span class="smalltext" style="margin-bottom: 2ex; margin-top: 2ex;">', theme_copyright(), '<br /><br />' , $txt['c_copy'], ' | <a href="http://validator.w3.org/check/referer" target="_self">XHTML</a> | <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_self">CSS</a></span>
</div>';
// Show the load time?
if ($context['show_load_time'])
echo '
<div>', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</div>';
$nb=' | ';
echo '
</div>
</div>';
// 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>';
}
// 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>
</div>
</div>
</div>
</div>
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{ }
// Show a linktree...
function theme_linktree1()
{
global $context, $settings, $options;
// Folder style or inline? Inline has a smaller font.
echo '<div class="navbar" style="font-size:9pt">';
echo '<img class="inlineimg" src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" /> ';
// 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 class="inlineimg" src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="" border="0" /> <img class="inlineimg" src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" /> ';
// Show the link, including a URL if it should have one.
echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '">' . $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 ' &#38;#187; ';
}
echo '</div>';
}
// 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 '
<ul>';
// Show the [home] button.
echo '
<li', $current_action == 'home' ? ' class="active"' : '', '><a href="', $scripturl, '">', $txt[103], '</a></li>';
// Show the [help] button.
echo '
<li', $current_action == 'help' ? ' class="active"' : '', '><a href="', $scripturl, '?action=help">', $txt[119], '</a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo '
<li', $current_action == 'search' ? ' class="active"' : '', '><a href="', $scripturl, '?action=search">', $txt[182], '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<li', $current_action == 'admin' ? ' class="active"' : '', '><a href="', $scripturl, '?action=admin">', $txt[2], '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<li', $current_action == 'profile' ? ' class="active"' : '', '><a href="', $scripturl, '?action=profile">', $txt[467], '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '
<li', $current_action == 'pm' ? ' class="active"' : '', '><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '<blink>['. $context['user']['unread_messages'] . ']</blink>' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '
<li', $current_action == 'calendar' ? ' class="active"' : '', '><a href="', $scripturl, '?action=calendar">', $txt['calendar24'], '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '
<li', $current_action == 'mlist' ? ' class="active"' : '', '><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<li', $current_action == 'login' ? ' class="active"' : '', '><a href="', $scripturl, '?action=login">', $txt[34], '</a></li>
<li', $current_action == 'register' ? ' class="active"' : '', '><a href="', $scripturl, '?action=register">', $txt[97], '</a></li>';
}
// Otherwise, they might want to [logout]...
else
echo '
<li', $current_action == 'logout' ? ' class="active"' : '', '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt[108], '</a></li>';
echo '</ul>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' <strong> | </strong> ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
function shoutbox()
{
global $txt, $options, $settings, $context, $boarddir;
echo '<div class="catbg" style="padding: 5px 5px 5px 10px;"><a href="#" onclick="sbToggle(); return false;"><img id="upshrinkSB" src="', $settings['images_url'], '/', empty($options['collapse_shoutbox']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="Shrink or Expand the ShoutBox" align="bottom" /></a> ';
// Block Title
echo '<span style="width:49%"></span><span>ShoutBox</span>';
echo '</div><div id="upshrinkSBHeader"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
</tr>
</table></div><br />';
}
?>
Also attached here
my forum version 2.0 beta 4. i'm installed manual this mod. i'm trying shout, page refreshing. Not sending shout.
(and mozilla firebug
textToEntities is not defined
complex_escape("dene")yshout.j...uly062008 (line 55)
doSend()yshout.j...uly062008 (line 72)
onsubmit(submit )iVTKHOaE...eBg%3D%3D (line 2)
[Break on this error] return escape(textToEntities(text.repla...&#/g, "&#"))).replace(/\+/g, "%2B");
error.)
sorry my english ;D
Just upgraded to beta 4 and it errors out on the index.template.php file
Installing this package will perform the following actions:
Type Action Description
* 1. Execute Modification ./index.php Test successful
1. Add Before ./index.php Test successful
* 2. Execute Modification ./Themes/default/index.template.php Test failed
1. Add After ./Themes/default/index.template.php Test failed
2. Add After ./Themes/default/index.template.php Test failed (Ignore Errors)
* 3. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
1. Add Before ./Themes/default/languages/Modifications.english.php Test successful
* 4. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Test successful
1. Add Before ./Themes/default/languages/Modifications.english-utf8.php Test failed (Ignore Errors)
* 5. Execute Modification ./Themes/default/languages/Modifications.english_british.php Test successful
1. Add Before ./Themes/default/languages/Modifications.english_british.php Test failed (Ignore Errors)
* 6. Execute Modification ./Themes/default/languages/Modifications.english_british-utf8.php Test successful
1. Add Before ./Themes/default/languages/Modifications.english_british-utf8.php Test failed (Ignore Errors)
* 7. Execute Modification ./Sources/ManagePermissions.php Test successful
1. Add After ./Sources/ManagePermissions.php Test successful
8. Extract Tree ./yshout
Any help would be appreciated
ok.. ill just contact my web hosting. for the history link.. how can i remove the history link above the shoutbox?
Hey folks, I have searched this thread but can't find anything on what I need... Basically I would like my shout list to go up the way instead of down? When adding new posts they are posting at the foot of the shout instead of the top and you have to scroll down. Can someone help? Cheers.
I have 2.0 beta 4..
THe shoutbox didnt work on ie, but worke on firefox..
I added this code which you posted to fix the shout button..
function complex_escape(text) {
return text.replace(/&#/g, "&#").php_to8bit().php_urlencode();
}
Now IE WORKS
But Firefox now doesnt work
So seems that this fix is fixing IE and breaking FF.
@Threnelegy
Modified index.template.php attached. Enjoy.
Sunking brother please help a brother out.
I just downloaded the index.template.php you attached a few posts back and replaced my file with yours. I cannot find anything wrong at all. You can see HERE (http://www.empireofthesun.net/testsite1/index.php). That's your index.template.php. :D There may be something else on your site (scripts, etc) that may be causing conflicts.
@ЯocKayseri: http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317
@waremock: There's been a few very subtle theme changes, which means the anchors I was using are no longer valid. For now, since it only affect index.template.php, I recommend just doing the theme edits manually.
@dangerboy: Edit yshout/yshout.php and comment out (put // in front of)
echo '[<a href="javascript:goTo(\'history\')">',$txt['yshout_history'],'</a>] ';
@picos: yshout/settings.php, set $reverseShouts to true
@M3THOD: Added it or replaced it? I've tested with both IE and FF and it works.
Thx for the reply bro. But I am not using any other mods / scripts except Pretty URL.
Are the permissions set to view the shoutbox? They can be found in SMF's permission system in the admin center. Were the language strings added to the modification.{your language}.php for the custom theme (or for the default theme if the custom theme doesn't have this file)? I cannot think of anything else that would cause this problem.
I can only set the permissions if I get to see the options. The only thing I see is in the screenshot posted a few posts back.
Can you post your Modifications.english.php from your custom theme's language folder?
Sorry I keep on bugging you, but do you know the cause of this, why the shoutbox is overlapping the left? Tested in Firefox, IE, and Safari: same result.
http://i306.photobucket.com/albums/nn261/srsrox/sdss.jpg
Edit: I got another problem. I tried applying the sound mod & mute/unmute mod of the shoutbox, and it no longer works. I can see the shoutbox, but cannot use it. Again, I am using SMF 2.0 Beta 4 with shoutbox mod and arcade mod. I'll post the modified files, so please help me out, thanks.
Errors as I enter page:-
First one(line 28): object expected - window.onload=function(){loadChat();};
Second one(line 78): syntax error - dChat() (Well, that's what it specifically highlights.)
Errors as I attempt to use shoutbox:-
First one(line 125): object expected - <form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;"> (Specifically Highlights doSend()
I must say, even though this is your only mod, it's a DAMN GOOD ONE! I can't imagine a forum without it, especially mine ;D Thank you for creating this mod and for your hard work. I really, REALLY appreciate it.
Well bro its empty file.
Hi..nneonneo's...Im as green as grass here,,just setup the latest version, 1.1.6 and theme enterprize,,but as said i'm very green when it comes to code,,and i also wanted to ask. when its put into a theme, does it take on the themes colors. style etc..or just incorperate into the theme as it is,,,thank,,has anyone tested it with enterprize and 1.1.6, iv been reading this thread off and on for a cpl days,,still not finished,srry if this has been answered somewhere in here,,,
Hi everyone,
am new to using SMF and tried to install nneonneo's SB.
I've managed to do everything till the part that will actually SHOW the shoutbox,
every single place I've tried to place it, I get the following error:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/Carbon/index.template.php on line 794
the line number changes depending where I've placed it.
Can anyone help me if I attach my index.template file?
I replaced it...
Hello again, this shoutbox is great but also very difficult to customize if you don't know some code... which is my case.
I have version 1.21 of yshout.php and would like to disable some bbcode tags. Anybody knows how to do this? I had done it in the previous version of yshout.php but now can't seem to find the appropriate code to change!
thanks
P.
OK, so I thought I might do some code debugging myself. Now, this is one thing I found:-
Quote from: nneonneo on August 19, 2007, 03:39:56 PM
Replace
var request;
// This gets called each refresh; it reloads the shoutboxes content.
by
function ltrim(text) {
return text.replace(/^\s*/g,'');
}
var request;
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML))
soundManager.play('sound');
oldShouts = $("shouts").innerHTML;
But there is already another function doRefresh() present. This is the code of the existing doRefresh() :-
function doRefresh() {
if($("yshout").style.display == "none") {refreshSet = false; return;};
set_cookie("yShout_open","true",duplicateWait);
request=new ajax (yshout_php, {
postBody: 'reqtype=refresh&file=' + shoutFile,
update: $('shouts'),
onComplete: schedRefresh
}
So, what to do here?
Awesome, it works perfectly. Thanks a lot, SunKing!
@machmanx: In yshout.js, replace
function doRefresh() {
if($("yshout").style.display == "none") {refreshSet = false; return;};
by
if($("yshout").style.display == "none") {refreshSet = false; return;};
(the function line is duplicated, so this removes the extra line)
@BCK: 1.21 should try to use theme colors when possible, but you can always tune the style by editing the CSS (CSS is a language for changing the appearance of webpages and is much simpler than PHP or JS). Also, note that a lot of the early content in this massive thread are not applicable to the current version. You may wish to begin reading more recent posts (probably at most 20 pages back)
@lash: How are you adding the code? Can you give an example or a modified index.template.php?
@M3THOD: That's a little weird. Maybe I could see the forum?
@pipo_il_primero: See $bannedCode in yshout/settings.php
thx nneoneon's...will keep reading for sure,,save me some time.thx
Quote from: Threnelegy on September 10, 2008, 05:38:32 PM
Awesome, it works perfectly. Thanks a lot, SunKing!
Glad I could help. Enjoy.
Quote from: lash on September 10, 2008, 12:12:38 PM
Can anyone help me if I attach my index.template file?
I would be glad to help, but I need to know where you would like the shoutbox displayed.
it worked, many thanks!
sorry, just one more question.
how can I make that the usernames shown in the shoutbox open in new window once clicked?
P.
SunKing bro can you install the shoutbox on my forum if I make you admin?
I will be more than happy to try, sadiqsaad.
@pipo_il_primero: Change
$writeText="<a$a_style href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
to
$writeText="<a$a_style href=\"index.php?action=profile;u=$userID\" target="_blank">$shoutName</a>";
won't work my friend, I get
Parse error: syntax error, unexpected T_STRING in /path/to/yshout.php on line 123
Shouldn't it be target=\"_blank\"?
well seen SunKing.
No parse error anymore, but usernames do not open in new windows....
I just made the edit to my yshout.php and it does not open profiles in a new window. Also, when I view the page source, it isn't showing the target="_blank" part at all. I have cleared the browser cache to see if that was the problem, but no luck.
It will only affect new posts.
And it works in new posts flawlessly. :P
How to add Selection of Color Code option for Users :) as Buttons
Quote from: SunKing on September 10, 2008, 06:26:46 PM
Quote from: lash on September 10, 2008, 12:12:38 PM
Can anyone help me if I attach my index.template file?
I would be glad to help, but I need to know where you would like the shoutbox displayed.
Thanks for replying Sunking :)
I've attached picture of the forum header and any where along the red line would do.
I'm reattaching the index.template file also.
@lash
I think this is what you are looking for. I really can't test it thoroughly because I cannot find that particular theme to download and install. Make a backup of your current index.template.php. Download the one I have attached and upload it to your theme folder. If for some reason it doesn't work, replace it with your backup, and I'll need the theme, if at all possible, or a link to your site for starters. ;D
Thanks for helping SunKing :)
it works now.
BUT...
the width of rest of the template below the shoutbox is kinda messed.
I'll PM you the link with a login and pass.
EDIT: PM'ed you.
RE EDIT: need HELP BIG TIME, i was playing around with the index.template file to try to fix the problem myself, but am now left with the Internal Server Error!!
I've tried reverting to the original file, but no success, any thoughts?
its great, many thanks!
Quote from: nneonneo on September 10, 2008, 09:01:22 PM
It will only affect new posts.
great job thanks!
many thanks to SunKing as well !!!!
Sunking... I've done it again... Since the other layout came with too many features that interfered with the mods, I got a new one.. and it's having shoutbox issues as well >> (maybe I pick too evil templates?)
This time the layout is 'Darkbreak'
It's so bad it actually crashes the moment the index is opened.. and I swear, I didnt do anything but add the codes..
Please be the saviour you've been before? (though maybe without accedently sending the old file? :P)
Con, where would you like it placed?
Thank you soo much for helping me with the sound, it works now. But I do have a lag issue and the following vb error when I added the mute/unmute feature:-
'request' is null or not an object
function unloadChat() {
delete_cookie("yShout_open");
request.abort();
I dunno what that is. Also, it seems that this mod disables the sound by default. Can you make the sound on default? Thanks.
Updated mute/unmute instructions (original at http://www.simplemachines.org/community/index.php?topic=137508.msg1384923#msg1384923)
In yshout/js/yshout.js, after
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML)
add
&& get_cookie("shoutSound") == "true"
In yshout/yshout.php, add this to where you need it:
if(!isset($_COOKIE['shoutSound'])) {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24);delete_cookie(\'yShout_open\');loadChat();">Use Sound</a>';
} else {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();">No Sound</a>';
}
One good place to add this is after the line
echo '<a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
[/quote]
@machmanx: "request" should be set after a few seconds (it's nothing to sweat about, though). I'm not sure why it might lag.
I want Color selection buttons in shoutbox for messages
Quote from: SunKing on September 11, 2008, 06:27:37 PM
Con, where would you like it placed?
At the bottom just above the 'powered by' links.
Hello!
thanks nneonneo the mod is great!
But when I followed the instructions to add smileys I took this error:
Open Smiley | Close
Fatal error: Cannot redeclare loadsmileys() (previously declared in /home/forum/mymod/smiley.php:12) in /home/forum/mymod/smiley.php on line 94
at the end of every page. Can anyone help me?
Sorry for my English!
@trancesistor: Are you sure that the smiley.php file is the correct one? It seems that it may have some duplicated code or something.
@kichu: Assuming you have the smiley mod, you can add
if (!isset($context['disabled_tags']['color']))
echo ' <br /><select onchange="surroundText(\'[color=\' + this.options[this.selectedIndex].value.toLowerCase() + \']\', \'[/color]\', document.forms.', $a, '.', $b, '); this.selectedIndex = 0; document.forms.', $a, '.', $b, '.focus(document.forms.', $a, '.', $b, '.caretPos);" style="margin-bottom: 1ex;">
<option value="" selected="selected">', $txt['change_color'], '</option>
<option value="Black">', $txt[262], '</option>
<option value="Red">', $txt[263], '</option>
<option value="Yellow">', $txt[264], '</option>
<option value="Pink">', $txt[265], '</option>
<option value="Green">', $txt[266], '</option>
<option value="Orange">', $txt[267], '</option>
<option value="Purple">', $txt[268], '</option>
<option value="Blue">', $txt[269], '</option>
<option value="Beige">', $txt[270], '</option>
<option value="Brown">', $txt[271], '</option>
<option value="Teal">', $txt[272], '</option>
<option value="Navy">', $txt[273], '</option>
<option value="Maroon">', $txt[274], '</option>
<option value="LimeGreen">', $txt[275], '</option>
</select>';
echo '<br />';
to the place you want it (probably right before
}
// END: Borrowed from template_postbox(&$message) in Post.template.php
These directions are for SMF 1.1.6.
Quote from: nneonneo on September 12, 2008, 10:22:04 AM
@trancesistor: Are you sure that the smiley.php file is the correct one? It seems that it may have some duplicated code or something.
I downloaded the attachment smiley.php from your post here: http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
Thanks for the reply!
Post your smiley.php. I think something is wrong here...
This is!
if that helps you, the error appears on every page except the main page of the forum!
I use SB 1.21
I noted that the history is not really working for me, when the message drops from the shoutbox it's lost forever. The history and admin's extended history return only the present shouts, they are the only one in the .txt file, too :-[ Any suggestions where to look for some solution ?
Quote from: 4T3IG0 on September 07, 2008, 09:13:24 PM
1) No I didn't shift+refresh... I will try it again.
2) And if some of the members are already Global Mod, and I don't wish all off them to Mod the Shout?
Thanks :)
Well... now it´s working very well. Thanks to all, especial to you nneonneo for your precious help.
4T :)
@trancesistor: Are you by some chance including the file twice? Look for mymod/smiley.php in index.template.php, and if it occurs more than once, then that would be the problem.
@zhar: try chmod'ding yshout/chats to 777 and/or create yshout/chats/history.home.txt with the appropriate permissions
Quote from: nneonneo on September 12, 2008, 03:19:47 PM
@trancesistor: Are you by some chance including the file twice? Look for mymod/smiley.php in index.template.php, and if it occurs more than once, then that would be the problem.
:( i searched my index.template.php but mymod/smiliey.php occurs only once... i attach my index.template.php if you want to check it...
At least how i can make the SB appears only at the main page? (at the main page there is no error)
Quote from: nneonneo on September 12, 2008, 03:19:47 PM
@trancesistor: Are you by some chance including the file twice? Look for mymod/smiley.php in index.template.php, and if it occurs more than once, then that would be the problem.
@zhar: try chmod'ding yshout/chats to 777 and/or create yshout/chats/history.home.txt with the appropriate permissions
The normal history.txt have proper chmod , but I had forgotten to fix home.history's one. Thanks a lot for the support, great mod :)
Quote from: Con on September 12, 2008, 03:27:44 AM
At the bottom just above the 'powered by' links.
Here you go (again). :P
Hi !
I have same problem with smileys like @trancesistor,please help @nneonneo,we can put here our files for looking...I worked after installation by manual from your page to make a smileys in shoutbox but after all i have error like in occassion @trancesistor.
What's happen?
wanted to ask,,does anyone have installed on enterprise theme,,id like to see a demo if possable..and can it be cleared from acp..and or does it clear messages etc automaticly ..i dont want saved,,or do i have to delete manually from time to time..thx in advance..and if so...how/where...thx again
@trancesistor, Perob: Maybe something else is going on. May I see either of your pages?
@BCK: Set $historyFormat to '' in yshout/settings.php and it will not save chat history.
Quote from: SunKing on September 12, 2008, 05:47:59 PM
Quote from: Con on September 12, 2008, 03:27:44 AM
At the bottom just above the 'powered by' links.
Here you go (again). :P
it works fine, but when I click admin, kaboom, IE crashes >>;
Quote from: nneonneo on September 12, 2008, 10:57:18 PM
@trancesistor, Perob: Maybe something else is going on. May I see either of your pages?
http://www.csd.uoc.gr
The forum is in Greek...
thx nneoneo for the fast responce..im still fighting with the code etc..im as green as grass,,will do that if i ever get it installed ..lol..thx
@Con: Which version of IE?
@trancesistor: I see a second shoutbox on e.g. this page: http://www.csd.uoc.gr/forum/index.php?board=17.0
I think I know what is happening. On some pages, Blue Vista will output two linktrees. It should not be hard to restrict the shoutbox to only one of the link trees.
Change
// 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>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
to
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir,$yshout_loaded;
if(!isset($yshout_loaded))
{
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>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
}
$yshout_loaded=true;
// YSHOUT END - shoutbox code
Quote from: toohow on May 10, 2008, 03:51:22 AM
hi nneonneo, thx for the wonderful mod.
i think my problem is the history has gotten too big. it is now 6.7MB so whenever I click on history, it will give out this error
Fatal error: Allowed memory size of 14680064 bytes exhausted (tried to allocate 237 bytes) in /home/acc/public_html/forum/yshout/class.tail.php on line 228
What can I do to trim the file? I cant open this file under windows now.
Delete the contents of yshout/chats/history.home.txt or rename the history.home.txt and recreate new history.home.txt
Quote from: nneonneo on September 13, 2008, 01:33:04 PM
@Con: Which version of IE?
6.. I hate 7 with a passion...
would just like to say thanx so very much to SunKing for helping me insert the shoutbox onto my forum thanx alot :D
Glad I could help. :D
I am so happy with this shoutbox! :) Sandman (http://www.simplemachines.org/community/index.php?action=profile;u=152523) helped me get it into my theme and it works perfectly! ;)
Ok, seems like all my errors are gone. The shoutbox works with the sound attachment no problem. Thanks for your help, nneonneo :)
I still didn't undertstand how to change the default sound off to default sound on. Could you help me with that?
Ya on mine the sound doesn't work but we think it is because we are not using the default theme :(
I have this problem with the foxy theme =/
In the first image (1.jpg) there's a big space when i put the shoutbox that loads after the page has fully loaded and doesn't load anythin (in the other way i only see a blank page and doesn't load anything) when the forum should look like the second one (2.jpg)
Can you help please...i'm very bad in PHP -.-
I'm using 1.1.6
@Angie of AKC: The sound should work if installed correctly. New soundmanager2 versions require a slight tweak to get them to work. If you can't figure it out, post the version of soundmanager2 used and index.template.php (modified with sound)
@chichiri: Where did you want the shoutbox? If you want it at the bottom, the code does not actually go at the bottom of the page (otherwise it will be loaded before the rest of the page is loaded, resulting in a very weird layout like you noticed). Rather, it should probably go before the line
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
@Con: Hmm, I no longer have IE6 after trying to debug a problem with IE7, and now that I have IE8 (which, incidentally, is an improvement, but by all measures still sucks). It's a bit amusing that IE would crash, but there's very, very little I can do to remedy a browser crash. You *could* try taking out the "onbeforeunload" handler and/or the "unload" handler (yshout/js/yshout.js) since it seems it crashes on leaving the current page.
thank so much for the quick answer...i didn't notice the location of the code
but the shoutbox doesn't load...
in firefox's console i have this errors:
(i put where firefox marks the errors :B)
Error: Class is not defined
Archivo de origen: http://www.newparapara.net/foro/yshout/js/moo.ajax.js
Línea: 4
//based on prototype's ajax class
//to be used with prototype.lite, moofx.mad4milk.net.
ajax = Class.create(); >> MARK HERE
ajax.prototype = {
initialize: function(url, options){
this.transport = this.getTransport();
this.postBody = options.postBody || '';
this.method = options.method || 'post';
this.onComplete = options.onComplete || null;
this.update = $(options.update) || null;
this.request(url);
},
....
Error: board_url is not defined
Archivo de origen: http://www.newparapara.net/foro/yshout/js/yshout.js?July062008
Línea: 24
....
// Don't edit below this line, unless you know what you are doing ;)
username = "";
[b]var yshout_php=(board_url?board_url:'')+'/yshout/yshout.php';[/b] >> MARK HERE
.....
Error: $ is not defined
Archivo de origen: http://www.newparapara.net/foro/yshout/js/yshout.js?July062008
Línea: 82
.....
// Set off the AJAX call to load the chat form into the empty yShout div
function loadChat() {
if ($("yshout").style.display=="none") return; >> MARK HERE
if(checkDuplicates)
{
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*/);
.....
It's this problem of the java version or something ?
No, your JS files are not updated. Try putting up the new JS files from yshout/js inside SB_1.21.zip.
lol...i downloaded a old version -.-!!!
works fine now...thanks so much for the help
I think I need some help. I am having a very dificult time trying to place the shoutbox in my forums where I want it and I am not having much luck. I am using Helios Multicolor (http://custom.simplemachines.org/themes/index.php?lemma=1) theme and I am trying to make the shoutbox appear in between the menubar and the news fader. As you can see, I got close. :-[
Quote from: Sandmansa on September 14, 2008, 03:41:30 AM
I think I need some help. I am having a very dificult time trying to place the shoutbox in my forums where I want it and I am not having much luck. I am using Helios Multicolor (http://custom.simplemachines.org/themes/index.php?lemma=1) theme and I am trying to make the shoutbox appear in between the menubar and the news fader. As you can see, I got close. :-[
I don't see see that is not between the menubar and news fader?
I have tried the search function on this forum and it's not that good... I'm trying to find the page that has the code for the auto scroll function as I want to disable it. I tried searching for auto scroll, scroll, auto and each only comes up with one post and it's the same one! So I tested using words that are common in this thread like packages and it still doesn't work. What's up with that?
Anyway, does anyone know of hand how to disable the auto scroll since I have the shouts appearing from top to bottom now? Thanks :)
I found it! I should read the small print more lol.
Quote from: nneonneo on September 13, 2008, 11:48:51 PM
@Angie of AKC: The sound should work if installed correctly. New soundmanager2 versions require a slight tweak to get them to work. If you can't figure it out, post the version of soundmanager2 used and index.template.php (modified with sound)
SoundManager2 V2.5b.20080525
Attached: index.template.php
Also if it can't connect .. instead of getting the nifty message I saw on the example forums .. it just minimizes ..
(I attached those as images to show what I mean)
If you look at the image I had posted mr money, you will see that I got close. But notice that the text above the shoutbox has been moved upward and there is a red seporator behind it. Should be over top of the shoutbox. This is where I am having the problem.
When I try deleting shouts I get this error
Session verification failed. Please try logging out and back in again, and then try again.
It's happening in 4 different browsers...
It's a conflict with another JS that I use... is there a way round this at all?
Quote from: nneonneo on September 13, 2008, 11:48:51 PM
@Con: Hmm, I no longer have IE6 after trying to debug a problem with IE7, and now that I have IE8 (which, incidentally, is an improvement, but by all measures still sucks). It's a bit amusing that IE would crash, but there's very, very little I can do to remedy a browser crash. You *could* try taking out the "onbeforeunload" handler and/or the "unload" handler (yshout/js/yshout.js) since it seems it crashes on leaving the current page.
I know very little of php.. could you tell me exactly what I would have to remove then?
Hey, is there any eta for beta 4 ? i tried to install this on beta 4 but too many errors on the test :(
Advanced AJAX Shoutbox
Installing this package will perform the following actions:
Type Action Description
* 1. Execute Modification ./index.php Test successful
1. Add Before ./index.php Test successful
* 2. Execute Modification ./Themes/default/index.template.php Test failed
1. Add After ./Themes/default/index.template.php Test failed
2. Replace ./Themes/default/index.template.php Test failed
3. Add After ./Themes/default/index.template.php Test failed
* 3. Execute Modification ./Themes/default/index.template.php Test successful
1. Add Before ./Themes/default/index.template.php Test successful
2. Add Before ./Themes/default/index.template.php Test successful
* 4. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
1. Add Before ./Themes/default/languages/Modifications.english.php Test successful
5. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
6. Execute Modification ./Themes/default/languages/Modifications.english_british.php Skipping file
7. Execute Modification ./Themes/default/languages/Modifications.english_british-utf8.php Skipping file
* 8. Execute Modification ./Sources/ManagePermissions.php Test successful
1. Add After ./Sources/ManagePermissions.php Test successful
9. Extract Tree ./yshout
10. Extract File ./Themes/default/css/yshout.css
11. Extract File ./Themes/default/images/calendar.png
12. Extract File ./Themes/default/images/info.png
13. Extract File ./Themes/default/images/cog_delete.png
14. Extract File ./Themes/default/images/cog_add.png
15. Extract File ./Themes/default/images/smile.png
16. Extract File ./Themes/default/images/date.png
17. Extract File ./Themes/default/images/mute.png
18. Extract File ./Themes/default/images/unmute.png
Quote from: feelingshehides on September 14, 2008, 08:20:30 AM
Hey, is there any eta for beta 4 ? i tried to install this on beta 4 but too many errors on the test :(
I have it working flawlessly on Beta 4. All of your errors are in the index.template.php. You could easily install the mod using the package manager, skip the index.template.php errors, then simply manually edit the index.template.php yourself (or if you want, attach your index.template.php here after installing mod and I will edit it for you).
I'm not that good with editing thou
Well I installed the mod, i attached the index.template.php
Edit: And i tried editing it myself with the older index.template.php... i was able to show the shoutbox but when i type something nothing came up :(
@feelingshehides
I am working on yours right now, and I also have it working minus the shouts actually displaying. I remember some small tweak had to be done to SMF 2 Beta 4 for it to work.....so please be patient. ;D
@Angie of AKC: There's no soundmanager code at all in the index.template.php, which probably explains why it doesn't work. Instructions to add it can be found here (http://www.simplemachines.org/community/index.php?topic=137508.msg1208212#msg1208212). As for a clean error message, sometimes it depends on the host. I wouldn't be able to give any more details without seeing the forum.
@picos: What JS is conflicting? The function is named "ajaxGet". The shoutbox *should* be putting the session IDs in for you, so if it is not working, it is probably a server issue. Also, note that it might not work properly on old shouts (pre-1.20).
@Con: in yshout/js/yshout.js:
// onbeforeunload is IE specific, and is used because onunload doesn't fire immediately
window.onbeforeunload = window.onunload = unloadChat;
Remove "window.onbeforeunload = " or "window.onunload = " and see if removing either of them makes a difference.
@SunKing: the small tweak was changing complex_escape (http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317) in yshout/js/yshout.js, I think.
Quote from: SunKing on September 14, 2008, 01:28:53 PM
@feelingshehides
I am working on yours right now, and I also have it working minus the shouts actually displaying. I remember some small tweak had to be done to SMF 2 Beta 4 for it to work.....so please be patient. ;D
Oh lol thanks! We have the same problem xD
Great! Everything works! :P
Read here (http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317) for how to fix the shouts not displaying.
I have attached the modified index.template.php (just in case), but you may not need it. And if you have any difficulties with the yshout.js edits, attach it here and I'll get it fixed too.
I guess you missed my question, nneonneo. How do I get the shoutbox to have "Sound On" as Default because the sound is off by default?
@machmanx: I suppose the best way is to invert mute and unmute, like so:
In yshout/js/yshout.js, change
&& get_cookie("shoutSound") == "true"
to
&& !get_cookie("shoutMute")
In yshout.php, change
if(!isset($_COOKIE['shoutSound'])) {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24);delete_cookie(\'yShout_open\');loadChat();">Use Sound</a>';
} else {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();">No Sound</a>';
}
to
if(isset($_COOKIE['shoutMute'])) {
echo ' <a href="javascript:delete_cookie(\'shoutMute\');delete_cookie(\'yShout_open\');loadChat();">Use Sound</a>';
} else {
echo ' <a href="javascript:delete_cookie(\'shoutMute\');set_cookie(\'shoutMute\',\'true\',3600*24);delete_cookie(\'yShout_open\');loadChat();">No Sound</a>';
}
Quote from: SunKing on September 14, 2008, 01:35:53 PM
Great! Everything works! :P
Read here (http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317) for how to fix the shouts not displaying.
I have attached the modified index.template.php (just in case), but you may not need it. And if you have any difficulties with the yshout.js edits, attach it here and I'll get it fixed too.
It's all working now Thank you
Hi
Anyone know how to have 2 lines/rows in the textbox ?
(http://img509.imageshack.us/img509/4715/shoutboxyu8.jpg) (http://imageshack.us/)
Maybe this (http://www.simplemachines.org/community/index.php?topic=137508.msg1686034#msg1686034) will help.
Hi
i tried that, but nothing changes
<form id="shout-form" name="shout_form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$txt['yshout_p_banned'],'" type="text" cols=30" rows="4" disabled="true" name="shout_text"/>
<input id="shout-button" type="button" value="',$txt['yshout_banned'],'" disabled="true" />
</fieldset>
</form>';
elseif (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false)
echo '
<form id="shout-form" name="shout_form" action="#">
<fieldset>
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="',$maintenance,'" type="text" cols=30" rows="4" disabled="true" name="shout_text" />
<input id="shout-button" type="button" value="',$txt['yshout_maintenance'],'" disabled="true" />
</fieldset>
</form>';
else
{
echo '<form id="shout-form" name="shout_form" action="#">
<fieldset>';
if (!$user['is_logged'] && $autoGuestName===false)
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" />';
else
echo '
<input id="forum-name" style="color: #666666;" maxlength="',$maxUsernameChars,'" value="',$user['name'], '" type="text" disabled="true" />';
echo '
<input id="shout-text" style="color: #666666;" maxlength="',$maxShoutChars,'" value="" type="text" cols=30" rows="4" name="shout_text" />
<input id="shout-button" type="button" value="',$txt['yshout_shout_button'],'" />
</fieldset>
</form>';
Attach your yshout.php, please, and I will fix it.
Cool, thanks
Wow. Version 1.09. That's vintage material. :P
The code in that file is quite a bit different than any of the recent versions, but what I have attached should work for you.
Quote from: SunKing on September 14, 2008, 05:22:22 PM
Wow. Version 1.09. That's vintage material. :P
The code in that file is quite a bit different than any of the recent versions, but what I have attached should work for you.
Hehe... :-)
It worked ! Thanks
Can i also remove the scrollbars ? [allways shows in IE]
(http://img232.imageshack.us/img232/3407/19105428ap5.jpg) (http://imageshack.us/)
Glad it works. The attached file should now take care of the scrollbar as well.
Quote from: fals on September 14, 2008, 05:31:14 PM
Quote from: SunKing on September 14, 2008, 05:22:22 PM
Wow. Version 1.09. That's vintage material. :P
The code in that file is quite a bit different than any of the recent versions, but what I have attached should work for you.
Hehe... :-)
It worked ! Thanks
Can i also remove the scrollbars ? [allways shows in IE]
(http://img232.imageshack.us/img232/3407/19105428ap5.jpg) (http://imageshack.us/)
Too much out of curiocity and looking at your shoutbox looking soo kool there.. whats the theme you are using.? it seems too awsome..!
Quote from: SunKing on September 14, 2008, 05:35:17 PM
Glad it works. The attached file should now take care of the scrollbar as well.
Thanks again, i will try that later when im home
Quote from: F.L.A.M.E.R on September 14, 2008, 06:09:18 PM
Too much out of curiocity and looking at your shoutbox looking soo kool there.. whats the theme you are using.? it seems too awsome..!
Thanks alot... it's my own custom theme 8)
Quote from: fals on February 20, 2007, 06:00:54 PM
Its based on the default theme, but i've spent a lot of time intigrating and customizing, so that it looks and feels like my old custom phpbb forum/theme.
Lots of new icons, textbox colors/sizes....
Quote from: SunKing on September 14, 2008, 05:35:17 PM
Glad it works. The attached file should now take care of the scrollbar as well.
Hi again, your changes did not work.... but, i tried adding it (overflow:hidden;) in the css part in index.template.php and it worked ! :-)
#yshout #shout-text {
border : 1px solid #AABBBF;
background-color : #f7f7f7;
background-image : url(http://www.fg-forum.dk/smf/Themes/fg-forum/images/but.gif);
width: 130px;
margin-right: 5px;
overflow:hidden;
}
Or you could do it like that. :P
Sorry about the duplicate post but my question was not answered the first time.
I need some help. I am having a very dificult time trying to place the shoutbox in my forums where I want it and I am not having much luck. I am using Helios Multicolor (http://custom.simplemachines.org/themes/index.php?lemma=1) theme and I am trying to make the shoutbox appear in between the menubar and the news fader. As you can see, I got close but it's still not where I want it. :-[ There is a red seporator image floating behind the shoutbox, I can't seem to get that image above the shoutbox.
Any help would be appreciated.
I installed the mod with very little problem. Looked great, but uninstalled it.
I just want the shoutbox to appear on my arcade page only (jeza skin) just above the categories.
With 194 pages, I'm sorry if I didn't read every post. I also searched "arcade" to see if someone else had posted the same thing.
I don't mind doing a manual install, or change code around after I re-install it.
I just need to know what goes where to make it work. I'm using a heavily modified default theme with Simple Portal, and other mods.
www.friends-alumni.com if you need to see anything.
:)
Hey, I have the shoutbox working nicely and everything is running smoothly. The only issue is I can't get the sound to work for a new message. I have SMF 2.0 4beta installed. Is there an issue with this? Thanks
Quote from: SunKing on September 15, 2008, 08:09:03 PM
Or you could do it like that. :P
.-)
One last question:
In IE theres a "gab" around 20px over and under the input boxes.... firefox works fine.
I have tried everything, but cannot remove it.
Firefox - OK Internet Explorer(http://img140.imageshack.us/img140/9237/firefoxmo2.jpg) (http://img140.imageshack.us/my.php?image=firefoxmo2.jpg)
(http://www.fg-forum.dk/smf/mymod/IE.jpg)<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 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: 8pt;
color: #141414;
}
#forum-name, #shout-text, #shout-button {
font-size: 10px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
border: none;
background-color : #f7f7f7;
width: 100px;
margin-right: 5px;
}
#yshout #shout-text {
border : 1px solid #AABBBF;
background-color : #f7f7f7;
background-image : url(http://www.fg-forum.dk/smf/Themes/fg-forum/images/but.gif);
width: 135px;
margin-right: 0px;
overflow:hidden;
}
#yshout #shout-button {
border : 1px solid #AABBBF;
background-color : #f7f7f7;
background-image : url(http://www.fg-forum.dk/smf/Themes/fg-forum/images/but.gif);
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END
// YSHOUT HERE
if ($context['user']['is_guest'])
echo '
<div class="middletext" style="padding-left:10px;">Kun for medlemmer</div>';
if ($context['user']['is_logged'])
{
echo '
<div id="yshout">',$txt['yshout_loading'],'<br /></div>
<div class="smalltext" style="padding-left:5px;"><a href="javascript:collapse1.slideit()">Smileys</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
';
}
// YSHOUT END
@dwd2000: Wrap the shoutbox code in
if($context['current_action'] == 'arcade') {
SHOUTBOX CODE
}
@picos: not sure, have you tried the suggestions posted before? If you are using a new soundmanager, you might need to remove "soundmanager2.swf" from index.template.php
Quote from: nneonneo on September 16, 2008, 10:15:31 AM
@dwd2000: Wrap the shoutbox code in
if($context['current_action'] == 'arcade') {
SHOUTBOX CODE
}
Please forgive my ignorance.
I'm assuming "SHOUTBOX CODE" is the actual code, and if so, I'm also assuming it's the code that is in the "index.template.php" file that makes the shoutbox appear just above the menu.
If I understand you right, it should be like this:
I just put
if($context['current_action'] == 'arcade') {before the installed code in
index.template.phpand
}after?
If I understand, that will put it on the arcade page only, but just above the menu. How do I make it show up further down the arcade page? I would like it just above the "Game Categories", below the stats and stuff. (there should be a link to my site, under my mug shot, to the left of this post, if you need to look)
I will re-install and make the above changes, and we can work from there. Thanks. ;)
Quote from: nneonneo on September 14, 2008, 01:29:55 PM
@Con: in yshout/js/yshout.js:
// onbeforeunload is IE specific, and is used because onunload doesn't fire immediately
window.onbeforeunload = window.onunload = unloadChat;
Remove "window.onbeforeunload = " or "window.onunload = " and see if removing either of them makes a difference.
I forgot to mention.. it doesnt crash on my other theme, (though it doesnt fully work on there either..) but thanks!
Quote from: dwd2000 on September 16, 2008, 11:08:51 AM
Quote from: nneonneo on September 16, 2008, 10:15:31 AM
@dwd2000: Wrap the shoutbox code in
if($context['current_action'] == 'arcade') {
SHOUTBOX CODE
}
Please forgive my ignorance.
I'm assuming "SHOUTBOX CODE" is the actual code, and if so, I'm also assuming it's the code that is in the "index.template.php" file that makes the shoutbox appear just above the menu.
If I understand you right, it should be like this:
I just put
if($context['current_action'] == 'arcade') {
before the installed code in index.template.php
and
}
after?
If I understand, that will put it on the arcade page only, but just above the menu. How do I make it show up further down the arcade page? I would like it just above the "Game Categories", below the stats and stuff. (there should be a link to my site, under my mug shot, to the left of this post, if you need to look)
I will re-install and make the above changes, and we can work from there. Thanks. ;)
Reinstalled.
Does the code wrap go around:
// YSHOUT HERE - <head> codeor
function shoutbox()Second:
Do I put:
// Show the shoutbox!
shoutbox();
echo ' on the arcade page where I want the shoutbox to appear?
If so, do I need anything else, if I want it to be a separate entity, or should I include it just before the </div> of the "Stats" portion above where I want it?
Third:
Shrink doesn't work. It's nothing major. I can just remove the icon. I don't mind it being expanded all the time.
Sandman it looks like no one knows how to help you ...
Quote from: Sandmansa on September 16, 2008, 01:13:44 AM
Sorry about the duplicate post but my question was not answered the first time.
I need some help. I am having a very dificult time trying to place the shoutbox in my forums where I want it and I am not having much luck. I am using Helios Multicolor (http://custom.simplemachines.org/themes/index.php?lemma=1) theme and I am trying to make the shoutbox appear in between the menubar and the news fader. As you can see, I got close but it's still not where I want it. :-[ There is a red seporator image floating behind the shoutbox, I can't seem to get that image above the shoutbox.
Any help would be appreciated.
Quote
@picos: not sure, have you tried the suggestions posted before? If you are using a new soundmanager, you might need to remove "soundmanager2.swf" from index.template.php
I'm using the latest version of your shoutbox and the latest version of the 2.0 beta (4)... there is a soundmanager2,swf file in the directory. Do I have to activate the sound at all or add an mp3? Sorry, I 've looked through the thread as much as I can and searched... there was nothing specific to the latest beta.
@Sandmansa: Post index.template.php, or, if you've done that already, link to the post.
@dwd2000: If you want to put the shoutbox in Arcade.template.php there is no need to wrap it with extra code. In that case, you simply remove the shoutbox code from index.template.php (the block containing "shoutbox();" only) and add shoutbox(); to Arcade.template.php where you want it. It will then only show on Arcade-invoked pages.
@picos: Try removing "soundmanager2.swf" from index.template.php (should be part of "/yshout/soundmanager2.swf" or something like that).
Quote from: nneonneo on September 14, 2008, 01:52:12 PM
@machmanx: I suppose the best way is to invert mute and unmute, like so:
In yshout/js/yshout.js, change
&& get_cookie("shoutSound") == "true"
to
&& !get_cookie("shoutMute")
In yshout.php, change
if(!isset($_COOKIE['shoutSound'])) {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24);delete_cookie(\'yShout_open\');loadChat();">Use Sound</a>';
} else {
echo ' <a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();">No Sound</a>';
}
to
if(isset($_COOKIE['shoutMute'])) {
echo ' <a href="javascript:delete_cookie(\'shoutMute\');delete_cookie(\'yShout_open\');loadChat();">Use Sound</a>';
} else {
echo ' <a href="javascript:delete_cookie(\'shoutMute\');set_cookie(\'shoutMute\',\'true\',3600*24);delete_cookie(\'yShout_open\');loadChat();">No Sound</a>';
}
Well, this does make "Sound on" default, but unfortunately, the functions have been switched. This means that when you click on "Use Sound", you get NO SOUND, and when you click on "No Sound" you get SOUND. So, how to fix this? Tried playing around with the .js file by changing ShoutMute back to ShoutSound, but that didn't help. Also tried changing .js to original setting, but that cause SOUND on both settings. So, what should I do, nneonneo?
BTW, after this is fixed, I will make my files available for anyone to download for SMF 2.0 beta 4. Sounds good, nneonneo?
Quote from: panetolikos6 on September 08, 2008, 06:18:06 PM
Hello,
Congratulations and many thanks for the mod which is the most succesful part of my site. I use Nneonneo's Ajax Shoutbox 1.09 and my forum is SMF 1.1.3. I am very satisfied with that.
The only thing that I wish to add is the option "Return" for users, as it is for moderators and admins. Sorry if it is answered before, but I searched, but couldn't find it. I want to add it because sometimes it doesn't refresh due to server problems.
Thank you!
any help?
I'm not entirely sure what you meant by taking the swf out but the things I did try didn't work...
I deleted the swf which didn't help and I took out the script from the index file in the yshout folder.
@panetolikos6: In yshout/yshout.php, change
echo ' <a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>';
}
to
}
echo ' <a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>';
@picos: Try this: add "&debug=1" or ";debug=1" to the end of the forum URL. SoundManager2 should output some debugging information to the very bottom of the page. Post that.
@machmanx: First try shift+refresh, and if that doesn't work, just switch "Use Sound" and "No Sound" in yshout/yshout.php
Hey I'm using Advanced AJAX Shoutbox atm, thanks to Sunking of course for helping me make it work with SMF 2.0 Beta 4.
I am wondering how do we move the shoutbox ? I can't seem to find options for it aside from /help.. since default its currently on the top.. i wonder if we can move it to the right or left ?
Quote from: nneonneo on September 16, 2008, 06:43:49 PM
@dwd2000: If you want to put the shoutbox in Arcade.template.php there is no need to wrap it with extra code. In that case, you simply remove the shoutbox code from index.template.php (the block containing "shoutbox();" only) and add shoutbox(); to Arcade.template.php where you want it. It will then only show on Arcade-invoked pages.
NotePad++ is an excellent tool.
I tried several times to do what you suggested, with the results just showing the text of the code on the page where I wanted it.
I noticed that when I pasted
// Show the shoutbox!
shoutbox(); the comment (// Show the shoutbox! ) wasn't turning green, like the rest of the comments in the code.
After I tried several places, I noticed it did turn green, so I saved it and uploaded it.
It worked.
Thanks a bunch. ;)
OMG! Your original instructions were correct, nneonneo. I forgot to add the exclamation point, hence turning the function into a NOT! OMG!! Just one character can cause you all the pain in the world of coding :D Anyway, no need to inverse anything, it just works as you instructed. Thank you soo much for helping me out and now everything works! YES!!
Just because I can, I'm gonna post my yshout.js and yshout.php for anyone to use. I use SMF 2.0 beta 4 with shoutbox 1.21, FYI. My shoutbox is configured for sound mod as well.
I am trying to add the smileys but i just can not understand the instuctions
@callteg4 I actually finished my 10 PM in 1 hr quota... so just to inform its done.. i have added u in yahoo.. would try to get ur problem solved.
Quote from: dwd2000 on September 17, 2008, 11:30:41 AM
Quote from: nneonneo on September 16, 2008, 06:43:49 PM
@dwd2000: If you want to put the shoutbox in Arcade.template.php there is no need to wrap it with extra code. In that case, you simply remove the shoutbox code from index.template.php (the block containing "shoutbox();" only) and add shoutbox(); to Arcade.template.php where you want it. It will then only show on Arcade-invoked pages.
NotePad++ is an excellent tool.
I tried several times to do what you suggested, with the results just showing the text of the code on the page where I wanted it.
I noticed that when I pasted
// Show the shoutbox!
shoutbox();
the comment (// Show the shoutbox! ) wasn't turning green, like the rest of the comments in the code.
After I tried several places, I noticed it did turn green, so I saved it and uploaded it.
It worked.
Thanks a bunch. ;)
Correction:
It showed up, but didn't work.
@dwd2000: What doesn't work about it?
Quote from: nneonneo on September 17, 2008, 08:07:14 PM
@dwd2000: What doesn't work about it?
It wouldn't post a shout.
When I put the
// Show the shoutbox!
shoutbox();back on the index.template.php, it works fine.
Quote from: nneonneo on September 16, 2008, 06:43:49 PM
@Sandmansa: Post index.template.php, or, if you've done that already, link to the post.
Okay but I just want you to know that I had to move the shoutbox farther up the forum so it didn't make the forum look like something broke. Also, I don't know what's wrong with it but it's not reading the yshout.css either. I had to add the style code manually. And to top it off, the sound does not work. :'(
Quote from: SunKing on May 08, 2008, 06:02:59 AM
Today is a good day. :D
I have been struggling with an "upshrink" for the shoutbox for a while and I have seen others ask for it once or twice. I finally managed to get it to work so it only takes up space if the viewer is using it. See it here (http://www.empireofthesun.net/forum/index.php?action=refer;sa=smf).
It's nothing more than an alteration of the Info Center upshrink. (After quite a while of scratching my head as to why it wouldn't work, I finally noticed that I had never added the proper variable to the database! :P )
Maybe nneonneo can add it to this fantastic mod as an option. ;D
I want to thank
Sunking for his extremely kind help in configuring my friend's site's shoutbox !!
I never found anyone around with this availability to help someone that he never heard about.
THANKS A LOT MATE !!!
As I told you, YOU ARE THE BEST !!
Take care !!
Hi..
I install Sb 1.21 (i have 1.13 before) on SMF 1.1.5..
now only Admin see shoutbox..
i find this message "Permissions Note
Please note that the shoutbox, by default, is accessible only to the admin; to change this, set the appropriate permissions in the admin panel." but i dont know where is this in admin panel?
Quote from: adventurer on September 18, 2008, 04:56:33 AM
Hi..
I install Sb 1.21 (i have 1.13 before) on SMF 1.1.5..
now only Admin see shoutbox..
i find this message "Permissions Note
Please note that the shoutbox, by default, is accessible only to the admin; to change this, set the appropriate permissions in the admin panel." but i dont know where is this in admin panel?
In your main Admin Panel, go to "Permissions" (Members section) then go into each group and set the permissions there.
Guests,
Regular Members,
Admin is already set to "All",
Global Moderators,
Moderator
Click on "Modify" (on right side) to enter each group's permissions.
Hi, I have installed the shoutbox but it's not working, it just says loading shoutbox....I am new to smf forums and any help is greatly appreciated, many thanks in advance :)
hi
i installed this mod without any errors
When i login the shoutbox shows for a short time then disappears, it then says
QuoteYOU MUST BE LOGGED IN TO USE THE SHOUTBOX
hi..question,,,i install the shout b4..had problems,,not with the shout,,but me,,,a code idiot...lol..heres my question,,i have the folder still on server, yshout,,now,,if i re install the mod first b4 doing the manual code for my theme etc..will it put doubles on and issues arise,,i had doubles on my global headers / footers b4 caused duplicate stuff,,so should i delete the folder from my server and start fresh...thx in advance...
Quote from: Ace1564 on September 18, 2008, 01:54:04 PM
hi
i installed this mod without any errors
When i login the shoutbox shows for a short time then disappears, it then says
QuoteYOU MUST BE LOGGED IN TO USE THE SHOUTBOX
Same problem as me..!! i solved it up by changing the login time..
@lynmangoro: What version of the shoutbox did you install? 1.21 should not show loading shoutbox at all.
@BCK: You should undo the changes to your theme (and the default theme) before reinstalling if there was a problem removing the code.
Ok, for some bizzare reason I had installed 1.16, I have uninstalled and installed 1.21 now and it works fine - thank you so much, this looks fantastic!
I only see orange boxes with
---- body_below ends ----
---- html_below ends ----
In them... What is it I'm looking for as I don't see it. lol
I still receive this error as well when deleting or trying to delete shouts
Session verification failed. Please try logging out and back in again, and then try again.
Quote from: dedalus on September 17, 2008, 11:38:48 PM
I want to thank Sunking for his extremely kind help in configuring my friend's site's shoutbox !!
I never found anyone around with this availability to help someone that he never heard about.
THANKS A LOT MATE !!!
As I told you, YOU ARE THE BEST !!
Take care !!
Glad I could help!!
Quote from: dwd2000 on September 17, 2008, 08:19:55 PM
Quote from: nneonneo on September 17, 2008, 08:07:14 PM
@dwd2000: What doesn't work about it?
It wouldn't post a shout.
When I put the
// Show the shoutbox!
shoutbox();
back on the index.template.php, it works fine.
I am now using Site Integration Mod and would like to use it as a chatroom instead.
I read somewhere here that you just use /yshout/index.php.
I have it working, but you have to refresh for the stuff to work.
Also, the smilies don't appear. (hack also found here)
What else needs to be done?
I still have the shoutbox installed on my site, but don't have
// Show the shoutbox!
shoutbox();anywhere.
Running SMF 1.1.6. Originally had an older version of this mod installed. Removed it and installed the 1.1.6 version. Got it working on all my themes except Note (http://custom.simplemachines.org/themes/index.php?lemma=1017)
Made the modifications to the template.index file, and hit save. Page wouldn't load, and had an error message at the top indicating that it had failed to find a particular file in the root menu. Thoughts? Any help would be awesome!
I got shoutbox all installed, and it's wonderful! Then the site owner tells me she can't see it....she just sees 'shoutbox' and the rest jumps in then dissapears. She has tried it in IE and firefox....any suggestions would be fantastic, thanks
Quote from: lynmangoro on September 19, 2008, 05:22:33 AM
I got shoutbox all installed, and it's wonderful! Then the site owner tells me she can't see it....she just sees 'shoutbox' and the rest jumps in then dissapears. She has tried it in IE and firefox....any suggestions would be fantastic, thanks
i had the same problem and found the answer several pages back.
in forums/yshout/settings.php change $gzipCompression to = false
// Should we use GZip compression? If you are having trouble with the shoutbox,
// set this to false. GZip compression does NOT apply to shoutbox refreshes,
// only to initialization and shout events.
$gzipCompression=false;
Great mod bot how can i chance it to see image
Thanks geo, I have tried this and I'm just waiting for the lady to get back to me to tell me it works now....appreciate the help :)
@picos: OK, I think I really need to see the forum now...
@dwd2000: Since the Site Integration Mod is already loading the theme, I suspect (though I do not have SIM) that you can simply put "shoutbox();" in the external file to have an SIM page with the shoutbox. If that brings up a "function not defined" error, then try using the full shoutbox code.
@mathmission: What error specifically? If you posted your modified index.template.php I might be able to help you fix it.
I heard back from the site owner and she still has the same problem, she sees the shout box for a second then when the page has loaded it has dissapeared....noone else has complained of it not working so far ...and ideas? The forum is here if it helps http://voiceoftheangels.com/forum/index.php
Quote from: nneonneo on September 19, 2008, 09:38:39 AM
@dwd2000: Since the Site Integration Mod is already loading the theme, I suspect (though I do not have SIM) that you can simply put "shoutbox();" in the external file to have an SIM page with the shoutbox. If that brings up a "function not defined" error, then try using the full shoutbox code.
If you have never used SIM, I'll explain how it works.
Within the admin part, you enter a folder you are using or want to use for the integration. SIM automatically uses all .php files within that folder as action=(whatever the name of the php file is, without the .php) You can use existing folders, or create a separate folder. With the separate folder, you simply make your own .php file with an include statement pointing to the file you want to use. After that, you simply add the menu button.
When I had SIM pointing to the existing /yshout/ folder...
I don't have the menu button installed yet, but when I go to
.../index?action=yshout the basic shoutbox appears:
with the theme colours;
it knows who I am (my username shows up);
I can post without manual refresh;
Admin button doesn't change unless I "refresh";
I can delete posts, as long as there is more than one, but doesn't refresh itself after
Shout deleted.;
Can not delete when there is only one post. I get a session error, suggesting I log out, then log in again;
I can delete within the history, after admin is on (del/ban shows);
Smilies not showing up.
It seems like I'm missing some of the stuff that's in the index.template.php file.
I tried your suggestion.
I created a separate folder within my site.
Pointed SIM to that folder.
Created shoutbox.php.
<?php
shoutbox();
?>
went to .../index.php?action=shoutbox
EVERYTHING WORKS GREAT
Now I have a simple chatroom (after I add the menu button)
Thanks.
Fatal error: main(): Failed opening required '/Subs-Post.php' (include_path='.:/usr/local/lib/php') in /home/content/m/a/t/mathmission01/html/boards/yshout/yshout.php on line 195
Hi
I installed version 1.21 with NO ERRORS...
After installation was finished, i get this error now
QuoteSorry, you must be logged in to use the shoutbox!
and i am logged in ???
@lynmangoro: That's a little odd. There are a couple things to try; shift+refresh to clear the browser cache (hold Shift and press the Refresh button), clearing cookies, and disabling gzipCompression (though I presume you have already done that last item to no effect). Beyond that, I don't know...
@mathmission: At the very top of yshout.php, change
global $yshoutdir;
to
global $yshoutdir,$sourcedir;
@Ace1564: Did you check "forever" when you logged in, or was there even the option? On some themes, the lack of "15 minutes/.../1 day/.../forever" options for logging in causes weird bugs like that.
Quote from: SunKing on September 18, 2008, 06:04:29 PM
Quote from: dedalus on September 17, 2008, 11:38:48 PM
I want to thank Sunking for his extremely kind help in configuring my friend's site's shoutbox !!
I never found anyone around with this availability to help someone that he never heard about.
THANKS A LOT MATE !!!
As I told you, YOU ARE THE BEST !!
Take care !!
Glad I could help!!
Now, I don't want to abuse from your kindness, but as we say "If you don't ask it, you don't get it", could you help making a menu for the commands like in your site, and have the smilies menu open likewise?
Attached my index.template.php
Thanks again
I would be glad to. The file I need attached, however, would be your yshout.php. :D
Hello, I have ShoutBox 1.16b.
I update the board to 1.1.6 and I had to do all by hand cause the shoutbox mod.
How could I disinstall the shoutbox 1.16b mod because I cannot disinstall from admin panel, it says error.
Which files I have to remove and edit? Where?
Please let me know.
Thank you.
Quote@Ace1564: Did you check "forever" when you logged in, or was there even the option? On some themes, the lack of "15 minutes/.../1 day/.../forever" options for logging in causes weird bugs like that.
Yes its checked, i cleared cookies, and browser cache too..
Im using the default theme..
Also i noticed too that when i go to whos online
it list me as Signed in and also list me as Guest while Logged in im browsing WHOS Online but Guest is browsing the forum. Its my ip that i see list for both
Quote from: SunKing on September 19, 2008, 05:58:10 PM
I would be glad to. The file I need attached, however, would be your yshout.php. :D
I have to thank you once more Sunking!! :)
Coming to my server and doing all the edits was a super nice atitude !!
Thanks you a thousand...million times !
SUNKING IS THA MAN !!
;)
@ dedalus
Not at all a problem. :D Glad it's all worked out for you!
Hello,
i have a little problem with this mod in Beta 4.
Problem 1:
There is no auto-refreshing (It works manual - F5, etc.)
Problem 2:
If a guest is posting in the Box, his Nickname didn´t appear
There are no changes from the original (just the 2 lines in the yshout.js to get it work on beta 4)
In the old versions, everything worked fine.
URL to my Forum: http://www.hoertalk.de (German, sorry for my bad english)
Can you attach your yshout.php?
Yep, here it is :)
But i have changed nothing.
Is it possible to make changes to this mod so when shouted text is going in another line it goes like it is showed with red arrow, and not like it is showed with yellow one?
(btw. it is now nneonneo's shoutbox but i just use this one as an example)
(http://img516.imageshack.us/img516/5175/likethismq6.jpg)
Also... is it possible (like with this shoutbox on image) to enable BBCode and Smiles option?
Hie,
I just installed the shoutbox 1.21(compatible with SMF 2.0 Beta 3) on my SMF 2.0 Beta 4.
I am using default theme.
On install actions there was only failed on theme files so i installed without theme modification.
Now, when i try to go to
http://www.stanaca.com/yshout/index.php
It shows the error
Can't find Themes directory -- is ".." the correct path to the forum root?These are my directories:
QuoteForum URL: http://www.stanaca.com
SMF Directory: /home/content/k/a/s/kashifccc/html
Sources Directory: /home/content/k/a/s/kashifccc/html/forum/Sources
Theme directory (templates): /home/content/k/a/s/kashifccc/html/forum/Themes/default
@insanehsp: Rather obscure problem, but you need to add the line
// Autoscroll? Default is on, but if you have $reverseShouts on, you probably
// want autoscroll off.
var autoScroll=false;
to settings.js. This is because you are apparently using the AdvSB yshout.js with the SB yshout.php.
@W. Riker: It looks like that would be handled with a table or something. However, I think the changes would be pretty heavy, though I will see if there is an easy way to do it.
Smilies can be enabled, but as of yet there is no consistent way to put a BBCode bar into the shoutbox (BBCode is supported though, so you can type [b]text[/b] to get bold text).
@stanaca: Well, ../ is not the path to the forum root, then. It should be ../forum. Open up yshout/index.php and change
$boardurl=".."; // change this to the relative or absolute path to the forum root
to
$boardurl="../forum"; // change this to the relative or absolute path to the forum root
@nneonneo
my problem: I can't write in shoutbox, when I would like write something, text does not show...
smf version: 1.1.6
shoutbox version: 1.21
I using shoutbox in news header: <div id="yshout">Loading shoutbox...</div>
Are you using Beta 4? If so, you need to apply the Beta 4 patch: http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317
I using SMF 1.1.6
Quote from: nneonneo on September 21, 2008, 12:20:23 PM
@W. Riker: It looks like that would be handled with a table or something. However, I think the changes would be pretty heavy, though I will see if there is an easy way to do it.
Thanks. I hope you will find the way to make this.
Quote from: nneonneo on September 21, 2008, 12:20:23 PM
Smilies can be enabled, but as of yet there is no consistent way to put a BBCode bar into the shoutbox (BBCode is supported though, so you can type [b]text[/b] to get bold text).
How can I eneble smilies?
Quote from: W. Riker on September 21, 2008, 02:11:25 PM
How can I eneble smilies?
http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
Quote from: SunKing on September 21, 2008, 02:59:18 PM
Quote from: W. Riker on September 21, 2008, 02:11:25 PM
How can I eneble smilies?
http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
Here it looks so confused... :S
hi there,
fore our forum is working fine, but when i clik on a board an error apears see http://www.eeeusers.nl/
how can i fix it?
Regards
how can i expand the box? i want to make the height a little bigger and also how can i change the font to verdana
i have adv 1.21 installed on smf 1.1.6 and works awesome,,,but no smileys..any ideas.plz.thx in advance..nothing for smileys what so ever...am i missing a folder???if so where..and how do i get and do it.plz
Quote from: nneonneo on September 19, 2008, 04:14:45 PM
@mathmission: At the very top of yshout.php, change
global $yshoutdir;
to
global $yshoutdir,$sourcedir;
I searched for that string, but couldn't find it. I'm attaching my yshout.php from the yshout folder.
I have some major errors. As i click on History i get:-
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
The page you are trying to view cannot be
shown because it uses an invalid or unsupported form of compression.
-----------------------
When i click on delete shout i get:-
Session verification failed. Please try logging out and back in again, and then try again.
Weird..!!
hi i have smf 1.1.6 and tp 1.0.5b1 and dowloaded the 1.16zip mistaking it for the one i needed for 1.1.6 smf and i uploaded it on my modules admin page. now i cant get it removed from there and it shows in 4 spots on the uploaded modules page. 3 spots just show version 1.16 in the right side box and the others show nneonneo's AJAX ShoutBox version 1.16. sometimes when i am gone and come back it will also show a conflict in the admin uploaded modules box and show that all of these are installed. how do i get rid of this?
Quote from: Ace1564 on September 20, 2008, 08:16:21 AM
Quote@Ace1564: Did you check "forever" when you logged in, or was there even the option? On some themes, the lack of "15 minutes/.../1 day/.../forever" options for logging in causes weird bugs like that.
Yes its checked, i cleared cookies, and browser cache too..
Im using the default theme..
Ok i have found the problem it was a mod called "Password Protect Boards 0.2"
after i removed it, everything started working again...
I kept a log on what was the last thing i installed and worked from that...
Thanks for your help..
Hello :D
Can I ask a question?
In my forum, only administrator can see the Shoutbox. Where is the problem?
Thanks
Quote from: Chocozell on September 23, 2008, 10:35:19 AM
Hello :D
Can I ask a question?
In my forum, only administrator can see the Shoutbox. Where is the problem?
Thanks
in admin cp...set perms for members etc..go to perms...
Hey There,
When will you be releasing a package compatible with 2.0 Beta 4?
Quote from: BCK on September 23, 2008, 01:10:18 PM
Quote from: Chocozell on September 23, 2008, 10:35:19 AM
Hello :D
Can I ask a question?
In my forum, only administrator can see the Shoutbox. Where is the problem?
Thanks
in admin cp...set perms for members etc..go to perms...
Now It's Ok, Thank You!
If I'd like to reorganize the shoutbox, which file must I modify?
You can get the latest version to work with Beta 4 right now with only 1 very small edit.
Read this:
http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317
Well, I really don't want to have to ask you this nneonneo, but I cannot figure it out. I would like the /wh to actually work like it's supposed to. In other words, /wh 23 hello would display "hello" n the shoutbox only to member 23. Looking at the /impersonate in action, I assume it is possible. Would it be a difficult edit?
@mathmission: OK, you have an older version. No problem.
Before
require_once($sourcedir . '/Subs-Post.php');
add
global $sourcedir;
and if that doesn't work, you can try
$sourcedir = dirname(__FILE__).'/../Sources';
instead of the global line.
@BCK: http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
@yoeri: I don't see an error, but presumably you have restricted the shoutbox to only the front page.
@SunKing: Hmm...an interesting proposition. This would actually be easier with a real database backend, but I've got to make do with what I have (at least until I manage to complete the transition to a real DB, in 2011 or whenever it finally happens -_-). I suspect it should not be too hard, though it would probably involve having the output be filtered by intended user, and it might have unintended side-effects like showing too many or too few shouts. In short: because of the not-so-stellar file-based system, it is not so easy to show a shout to just one person (and I haven't the time to sit down and really work it out :( )
I am sorry if the responses are a little short. University is bearing down upon me so I haven't the time to write detailed responses. Sorry about the delay in answering queries!
@nneonneo
I added this code to the index.template.html
// 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
And thise code to boarindex.template.html
// 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
On the index you dont see anny error but clik on an board en you see an error.
is there an script that load shoutbox in the index.template.html but that de shout box dont apair
nneonneo, any way to place the shout warning(bell) sound in ver 1.21. I believe this only works with the adv version does it not? the adv version will not install on my forum.
@yoeri: Again, I don't see an error. Is it a script error (e.g. "$("yshout")" is not defined), a PHP error or something else? Could you post the error message?
@Rafferty: http://www.simplemachines.org/community/index.php?topic=137508.msg1208212#msg1208212 should work.
Nneonneo Here is the error. i think is a php error. in IE7
Nope. That's a simple JavaScript error.
Most people don't worry about it. If you really do want to prevent the error, you can do this:
Change
window.onload=function(){loadChat();};
to
window.onload=function(){if($("yshout")) loadChat();};
I have not tested it, but please let me know if it works.
Quote from: F.L.A.M.E.R on September 22, 2008, 01:06:32 PM
I have some major errors. As i click on History i get:-
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
The page you are trying to view cannot be
shown because it uses an invalid or unsupported form of compression.
-----------------------
When i click on delete shout i get:-
Session verification failed. Please try logging out and back in again, and then try again.
Weird..!!
Please help..!
Quote from: nneonneo on September 24, 2008, 09:57:27 AM
@yoeri: Again, I don't see an error. Is it a script error (e.g. "$("yshout")" is not defined), a PHP error or something else? Could you post the error message?
@Rafferty: http://www.simplemachines.org/community/index.php?topic=137508.msg1208212#msg1208212 should work.
That didn't work for some reason the lines were different in my version. I played with it for a while but no success. The shoutbox stopped working with the script present. Thanks for the suggestion.
I have managed to upgrade to ADV 1.21. Question: How do I change the shout display box to a single line display readout
while I'm at it, any word on the problem with the shoutbox and who's online conflict?
@nneonneo
It dosnt work here
I've got a problem and my english is too bad to understand the solution. I installed the shoutbox (1.21) on my forum (1.1.6, german, standart theme, no other mods). During the installation no errors were indicated. Now, when I look at the forum, the shoutbox is there, but with following text:
QuoteWarning! The shoutbox text files for your language are not installed. This may cause the shoutbox and admin settings to appear wrong.
To fix this problem, copy ***/Themes/default/languages/Modifications.english.php to ***/Themes/default/languages/Modifications.german.php and translate as desired.
To ignore this notice, click here.
(*** = complete link to the forum on the server deleted by me)
a) What I have to do? ???
b) Where can I find the admin-center of the shoutbox?
Thanks 4 help!
Great product. ;)
I'm using it as a chat room, via Site Integration Mod. Works great. (with your help ;) )
I just need one more thing from you, if you can help.
I would like to put a "Who's Viewing" on it, right under the title.
That way people know that there are actually people viewing.
At the moment, people are just assuming.
Any ideas???
@F.L.A.M.E.R: I actually don't know why that would fail unless you stripped <sesc> out of the output...
@Rafferty: I thought I fixed the who's online thing with 1.21...
@yoeri: Well, the only other thing I can suggest is to turn off script debugging in IE.
@Ditron: As it says, you need to copy the file
***/Themes/default/languages/Modifications.english.php
to
***/Themes/default/languages/Modifications.german.php
*or* you can just opt to install a German language package.
@dwd2000: You are using Site Integration Mod, right? Does it log to Who's Online? If it does, then it is not hard to do (one database query ought to handle it). If it doesn't log to Who's Online, then you are out of luck.
Hello,
I had Advanced SB working in SMF 2.0 Beta 3.1. I switched to Beta 4, reinstalled the SB and I get the errors in the attached screenshot. I've tried installing it anyway and the SB doesn't show up.
I uninstalled it and tried installing it manually but it still wouldn't show up.
I tried deleting all of the SB modifications from the code and starting over installing it through the package system--still got the errors and still doesn't work.
My users are starting to whine.
Any help would be appreciated.
Thanks.
Quote from: nneonneo on September 25, 2008, 11:27:03 PM
*or* you can just opt to install a German language package.
I'm so blind... I installed the german language package and the error is gone. :)
But now another question:
Only me (Admin) can use the SB. I tried to /unlock, but with no sucess. What I have to do, to open the SB for other users?
Admin/Permissions .... Shoutbox
nneonneo Is there realy not anny another solution ?
Quote from: Ditron on September 26, 2008, 03:57:13 AM
Quote from: nneonneo on September 25, 2008, 11:27:03 PM
*or* you can just opt to install a German language package.
I'm so blind... I installed the german language package and the error is gone. :)
But now another question:
Only me (Admin) can use the SB. I tried to /unlock, but with no sucess. What I have to do, to open the SB for other users?
Make sure the other usergroups have permission to view the shoutbox. Check via Admin -> Permissions
Quote from: nneonneo on September 25, 2008, 11:27:03 PM
@F.L.A.M.E.R: I actually don't know why that would fail unless you stripped <sesc> out of the output...
Site link:-
http://gadgetrader.com
Any files you need for checking stuff ?
No Matter how I upload any version. I cannot get the shout box to show up or even show the shoutbox in the admin area to enable it. I tried doing it from the default core theme and still nothing. Our current version is 1.1.6 so is that an issue??
It works!
Thanks @ Rafferty and Alan!
Sometimes I see a short error message, wich disappears very fast. But I can't find any problem - so I don't care.
ok one more problem with another forum.
The shoutbox loads up properly at first.. and then after showing it for 1 second it colapses.. i mean just vanishes away.. i have the smileys edit done. it just happened randomly
Hello everybody! :)
I have a little annoyance with the shoutbox :)
I've followed this post (http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028) to insert a vertical scrollbar in my shoutbox. I only used the first part because I'm not interested in autoscrolling and I've used just the height attribute.
The little annoyance is that now the shoutbox shows the messages on the top instead of scrolling to the bottom (bottom messages are the newest). It's possible to correct this? Many thanks :)
P.S.: If it matters, I've put the shoutbox in a TinyPortal's phpbox
Quote from: TheEru on September 25, 2008, 11:52:21 PM
Hello,
I had Advanced SB working in SMF 2.0 Beta 3.1. I switched to Beta 4, reinstalled the SB and I get the errors in the attached screenshot. I've tried installing it anyway and the SB doesn't show up.
I uninstalled it and tried installing it manually but it still wouldn't show up.
I tried deleting all of the SB modifications from the code and starting over installing it through the package system--still got the errors and still doesn't work.
My users are starting to whine.
Any help would be appreciated.
Thanks.
I am getting this exact same problem and (lol) my users are also whining. Thanks in advance, great mod!
@TheEru and graecus
http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317
@The_Rogue
Can you post your index.template.php?
@F.L.A.M.E.R.
I had this happen to my site and found that it was more than one javascript using a form of the onload event handler. Nneonneo found this page (http://www.htmlgoodies.com/beyond/javascript/print.php/3724571) that really helped me understand.
@schifazl
Open settings.php and go down to line 32 (or so) and change the $reverseShouts. If it's set to true, change it to false, and if it's set to false, change it to true. :)
Quote from: SunKing on September 26, 2008, 10:17:39 PM
@schifazl
Open settings.php and go down to line 32 (or so) and change the $reverseShouts. If it's set to true, change it to false, and if it's set to false, change it to true. :)
Thanks for the help, but the problem was another, the shoutbox wasn't scrolling to the bottom... but I've just adapted the autoscroll script so that now it works as I wish.
Sorry that I've bothered you for nothing :)
Keep up the good work, this shoutbox is great! ;D
Glad you have it working. :D
Hi. I couldn't find this anywhere, so sorry if it's already been asked.
I am using the Site Integration mod and I'm trying to add the shoutbox to an action page... How would I go about doing that? My SMF version is 1.15
I added this code to the page but I get javascript errors and none of the links work on the shoutbox.
<?php
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'];
?>
I figured it would work since it was the code to be put on the index template.. But I was wrong. If you can help that'd be great! Thanks.
Nevermind about my last post! I figured it out. Thank you for this great mod =]
Quote from: SunKing on September 26, 2008, 10:17:39 PM
@F.L.A.M.E.R.
I had this happen to my site and found that it was more than one javascript using a form of the onload event handler. Nneonneo found this page (http://www.htmlgoodies.com/beyond/javascript/print.php/3724571) that really helped me understand.
Its a bit long.. but i will read it out. Well can you try the solution for the 1st problem ?
Hi, Sorry if this is an obvious one...
Just instaled the most recent advanced Shoutbox which works perfectly but I'd like to get rid of the 2-line display back to the 1-line display, can anyone help me?
I second that motion
I've been trying to get a scroll bar to appear in the shout box, I have it on default settings within a 1.15 install (haven't upgraded yet) and I've followed the instructions here... but I find it's not working... I'll post code blocks as needed if desired to help me trouble shoot, just let me know from where and what you need to get this scroll bar to function.
nneonneo
When deleting I get this error
Session verification failed. Please try logging out and back in again, and then try again.
my forum is at www.err-clan.com/forum/
Thanks for any help
I have noticed that I get this error on login which might explain the above error
An Error Has Occurred!
You were unable to login. Please check your cookie settings.
I have checked my server settings and followed the help in this post
http://www.simplemachines.org/community/index.php?topic=239613.msg1545009#msg1545009
but that never helped
Hello again all,
I need your help again with three (yes I know...) very small questions... Here it goes:
1- How can I make the "help", "history", and "extended history" links to be opening in new windows when clicked upon?
2- How can I increase the size of input box?
3- How can I increase the size of the FONTS of the input box?
Also, sometimes there's a cursor blinking in the input box (which is great help for correcting text), sometimes not. Why?
Many thanks!
edit: just for info, I have version 1.21 installed.
I tried to install the Advanced Shoutbox on the next Beta 4 version, and got the following errors:
nneonneo -
Tried your suggestion, still didn't work. Came back with just the header, and a message that says:
QuoteShout Box
Nothing to do.
Quoteglobal $ip;
if(!isMod() && preg_match($ip, file_get_contents($chatPath))>3)
{
echo "Sorry, you've already posted 3 messages...";
return;
}
Quoteyshout/yshout.php
nneonneo: I know, I must paste this to to writeLine(), but I don't understand where... please help... in which line....
Hey, the shoutbox works fine, but sometimes it lags. Been getting this error a lot:-
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4971099 bytes) in (url)/forum/yshout/yshout.php on line 716
So, I just added this line to the top of yshout.js:-
ini_set("memory_limit","40M");
Hopefully, that will fix the issue. Now, my next problem is this:-
Undefined index: yshout_shoutbox in /(url)/forum/Sources/Load.php(1927) : eval()'d code on line xxx
How do I fix this?
Oh my. I was ill over the weekend, so I apologize for not responding...
@yoeri: And the window.onload fix did not help? That is odd, because I just tested it and it worked for me.
Nevertheless, it is not hard to remove the error by changing IE settings. Go to Tools -> Internet Options -> Advanced -> Uncheck "Display a notification about every script error" (I am using IE 8, so it may look a bit different for you). This option should be near the "Disable script debugging" option.
@F.L.A.M.E.R: Try turning off gzipCompression -- it should make the history work and possibly solve the collapsing issue. As for the Session bug, I would need an account which can delete shouts to check.
@Rafferty, popabawa: Two options: one, you install SB_1.21 (the regular shoutbox), or two, you edit the output and CSS to make it one-line:
First, edit yshout/settings.php. Change
return ' '. timeformat(intval($matches[1]), true).'<br />';
to
return '['.timeformat(intval($matches[1]), true).']';
Second, edit yshout/yshout.php. Change
return str_replace("\n","\n<hr class=\"shout-separator\" />",$chatText.' '); // hack: totally empty responses can break some browsers
to
return $chatText.' '; // hack: totally empty responses can break some browsers
@Shadis: What does the CSS block look like?
@picos: Hmm, it kind of sounds like the same problem as F.L.A.M.E.R. I don't know why this happens. I added some protection against hacking in the latest version (otherwise users may be able to delete shouts without permission). As long as the shouts were generated on 1.21 and the shoutbox is 1.21, it *should* work, but I think the login problem may have something to do with it. Are you at least able to delete forum posts? How about shoutbox bans?
@pipo_il_primero:
1) edit yshout/js/yshout.js, change
function goTo(args) {
if(request) request.abort();
document.location=getURL(args);
}
to
function goTo(args) {
if(request) request.abort();
window.open(getURL(args));
}
2,3) edit the CSS block (yshout.css for AdvSB, index.template.php for SB), #yshout #shout-text -> width for 2, #yshout -> font-size for 3.
About the cursor: I don't know. Maybe it is your browser, maybe it is because of the background color. Try removing "background: #FFFDD1;" from the CSS.
@Nequil: Right at the top of the function (i.e. after {)
@mathmission: Err...that should really never happen. Is yshout.js the right version?
@machmanx: Replace
$txt['yshout_shoutbox']
in index.template.php by the text "Shoutbox".
Alternatively, you can stick the line "global $txt;" above the echo line containing the $txt.
Revised Beta 4 installation instructions!
First, it is likely that many, if not all, of the theme edits will fail to go through. This is because various changes have been made to the theme system and the templates, changing all the anchors which were previously used.
You should make the edits manually, at least until I can roll out a new version (but it seems that the theme changes may continue, so I might wait until beta 5 or final to release a new version). The anchors have not changed so much as to make them unrecognizable, so it is still possible.
You will also have to apply a patch to the shoutbox to make it functional. This is due to changes in SMF's string handling library, on which my shoutbox depends to do text processing.
See http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317 for the details.
Quote from: machmanx on September 30, 2008, 08:58:24 PM
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4971099 bytes) in (url)/forum/yshout/yshout.php on line 716
So, I just added this line to the top of yshout.js:-
ini_set("memory_limit","40M");
Well, after adding this, I've been getting an "Object Expected on Line 4" error, because that's where I inserted the above code. What am I doing wrong?
Is there a way to make shouts expire after a period of time rather than after a certain number of other shouts have happened?
My forum doesn't get a ton of traffic so it would be nice if old shouts expired after a period of 20 minutes or something. I'm looking in the yshout.php file for the right place. I can't seem to find how old shouts are archived and add a time feature to it.
Any help would be appreciated. Thanks in advance.
@machmanx: Wait, on yshout.js? JS doesn't affect PHP scripts. You might want to try adding it to yshout.php
How big is home.txt? You probably should not have more than 1000 chats there. If it is very big, I recommend you archive it, which should prevent the error from happening. If it happens on the history page, try archiving history.home.txt.
@meyersmp: Above the line
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
add
$minTime = time()-20*60; // 20*60 is number of seconds, in this case, 20 minutes
$chatText=preg_replace_callback("/<p[^>]*>.*<timeval=(\d+)>.*\n/",create_function('$matches','if(intval($matches[1])>'.$minTime.') return $matches[0]; else return "";'),$chatText);
Both $maxLines and the time limit will apply to a given shout (i.e. if more than $maxLines shouts are made in a 20-minute interval, the oldest will not be shown even if it is within 20 minutes). This code basically sets a minimum threshold for the time (current time minus 20*60 seconds, i.e. 20 minutes, which you can easily change), then runs a function over each shout which hides it if it is too old.
dammit... @nneonneo can you paste this code to my yshout.php?... please I can't do this...
global $ip;
if(!isMod() && preg_match($ip, file_get_contents($chatPath))>3)
{
echo "Sorry, you've already posted 3 messages...";
return;
}
Can someone help me? All I need to do is change the title of my Shout Box to something else. I can't seem to find where this is defined.. Thanks in advance.
Quote from: nneonneo on September 30, 2008, 11:06:14 PM
@meyersmp: Above the line
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
add
$minTime = time()-20*60; // 20*60 is number of seconds, in this case, 20 minutes
$chatText=preg_replace_callback("/<p[^>]*>.*<timeval=(\d+)>.*\n/",create_function('$matches','if(intval($matches[1])>'.$minTime.') return $matches[0]; else return "";'),$chatText);
Both $maxLines and the time limit will apply to a given shout (i.e. if more than $maxLines shouts are made in a 20-minute interval, the oldest will not be shown even if it is within 20 minutes). This code basically sets a minimum threshold for the time (current time minus 20*60 seconds, i.e. 20 minutes, which you can easily change), then runs a function over each shout which hides it if it is too old.
Thanks nneonneo. It worked great for limiting the time each is shown. I found that this also removes 20 minute old shouts from the history as well. Is there a way to keep the history with this time hack?
Hello!
Is it possible, to move the SB on another place (standart theme)? The SB should appear below the topics.
Quote from: nneonneo on September 30, 2008, 10:00:03 PM
@F.L.A.M.E.R: Try turning off gzipCompression -- it should make the history work and possibly solve the collapsing issue. As for the Session bug, I would need an account which can delete shouts to check.
PM'ed you the details (admin login). Kindly do it all if possible. It has all the admin account permissions.
@fofobody In the index.template.php file of your theme find
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
and change to
<br /><b>Your new name here</b><br /><br />
@meyersmp: Oops. I didn't think of that :P
Move those two newly-added lines to right after
$chatText=processChats($chatText,$user);
@Nequil: attached
@F.L.A.M.E.R: I can successfully delete shouts without any issues. Try logging out and clearing cookies. You will need to turn off $gzipCompression yourself, as even an admin account cannot edit files without FTP (well, technically I could, but it takes some time and is really hackish)
@Ditron: You need to move the "shoutbox code" block to where you want it in index.template.php. In index.template.php, the only places you can make it show up is either above the board listings/topics or after the Info Center (i.e. after all the main content). On threads, it will show up under all the posts; on boards, after all the topics, and on the main page, after the info center. That place is right below
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
.
Quote from: nneonneo on October 01, 2008, 10:42:10 PM
@F.L.A.M.E.R: I can successfully delete shouts without any issues. Try logging out and clearing cookies. You will need to turn off $gzipCompression yourself, as even an admin account cannot edit files without FTP (well, technically I could, but it takes some time and is really hackish)
I have no idea how to turn off the $gzipCompression... Steps Please.. :)
I would just like to take time out to thank nneonneo for his tireless efforts in bringing us this wonderful mod. For one it has brought my forum to life and a most important part of my site. nneonneo thanks very much your work is much appreciated.
Is there anywhere I can make a small donation in appreciation.
Quote from: nneonneo on October 01, 2008, 10:42:10 PM
@meyersmp: Oops. I didn't think of that :P
Move those two newly-added lines to right after
$chatText=processChats($chatText,$user);
Wow nneonneo, you're a busy guy with all the requests you get.
I hate to add to the pile but I'm not understanding the yshout.php file very well and the code modification you gave me above does not limit the time for shouts when placed in this new position in the file. Although it does allow me to view the full history again.Modified:
Wait I moved the code to right before that line you gave me and I seem to be getting the correct results. I'm not sure why, but it seems to be working now. Does that make sense to put it before the line of code?
@Rafferty I agree this guy deserves a medal with how many people he is supporting.
Quote
@Nequil: attached
where? I ask you whether can do for me...
@meyersmp: Yeah, it should go before, not after. Typo :(
@Nequil: NOW attached...
@F.L.A.M.E.R: yshout/settings.php or at the top of yshout.php
@Rafferty: nneonneo [/at/] gmail [/dot/] com is my PayPal address, thank you very much :)
1st off i must say i ove this shoutbox. i have installed it and am running it on 1.1.5. my problem is no where on admin panel do i have settings for chat and the chat just keeps getting larger on the page. how can i fix this?
In yshout/settings.php, edit $maxLines to your preference.
ill give it a shot thou im fairly new at this stuff......also what would be nice to possible add in future is show online shoutbox user list
Quote from: nneonneo on October 02, 2008, 10:20:41 AM
@F.L.A.M.E.R: yshout/settings.php or at the top of yshout.php
Ok that kind of helped in reponding quickly after refresh. But still the "history"...... buttons dont work..!
Quote
@Nequil: NOW attached...
now yes... thanks man
Quote@mathmission: Err...that should really never happen. Is yshout.js the right version?
I uninstalled the older version, and installed the newer one. Should be the right one.
is there anyway i can make the chat a specific size at all times and use a scroll bar?
Hi! I've got a problem - I've installed the shoutbox, added the part for the scrollbar and chose reverse order for the posts. the problem is: When the shoutbox is loaded, the div is scrolled to the bottom. But the last post is at the top, so I'd prefer to have the shoutbox loaded with the div scrolled to the top. Any way to change it that way? ^^
@F.L.A.M.E.R: Oddly enough, I can grab the correct history page when I use wget. Check the PHP file. Make sure there is NOTHING before or after the <?php ?> tags.
@mathmission: In that case, did you update the index.template.php code in each theme?
@esber: http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
@Rayk: I believe you simply need to disable autoScroll in yshout/settings.js.
I've installed the latest Advanced Shoutbox, and it's working well.
I'm trying to move the shoutbox though, from the header to down in the forum info area below the discussion forums on the forum front page.
I read the instructions for moving the box as posted in the first post of this thread, but it didn't seem that those instructions are quite relevant for the version of forum I use (1.1.6).
Could someone help me out? I'd like to keep the collaapsable nature of the box, but move it down to above the Forum Stats area.
Actually... ideally, if I could send the shoutbox into the footer of the Global Header and Footer mod, that's be perfect. Is that possible?
Just wanted to let you know that I solved the problem. Incompetence on my part. Thanks for the help!
Quote from: nneonneo on October 02, 2008, 10:43:30 PM
@F.L.A.M.E.R: Oddly enough, I can grab the correct history page when I use wget. Check the PHP file. Make sure there is NOTHING before or after the <?php ?> tags.
Eh, Which Php File ? I saw yshout.php but it has a large number of <?php and ?>
In settings.php everything is perfect..
/me wondering why do these type of rare problems occur with me ? *scratches*
Quote from: nneonneo on October 02, 2008, 10:43:30 PM
@Rayk: I believe you simply need to disable autoScroll in yshout/settings.js.
Thanks, that did the trick. I shouldn't be doing these things in the middle of the night, I guess.
Thanks, nneonneo, I don't know what I was thinking when I put that memory increase code in the yshout.js file when it was a PHP error, lol. I put that code in the yshout.php, added the global variables and now, I haven't had a PHP error since Sept. 30 :D Now everything is going fine, sweet.
Now I had a question, why does the shoutbox slow down sometimes or fail to scroll automatically sometimes? I have to refresh the page to fix the autoscroll problem. So why does this happen?
Great shoutbox, Ive been learning alot reading in this topic. I really like the ability to customize this the way you want. Im a bit new, but wanted to know how to change the position of the timestamp.
I followed directions in page 150 something and removed the today and the seconds.
It has moved the time to the left of the user name which is different from what it was. Example:
This is what is was:
[12:00:00]
KnottyMars: <shout text>
This is what it is now:
[12:00:00] KnottyMars: <shout text>
How can I put the user name on the next line, I have the timestamp small so it doesnt make the window much bigger, I know this must seem like a huge newb question, but Im still learning the basics.
One other question, when the SB first loads, it defaults to the top, then after a second or so, the scroll bar (thanks for that also on page 157) moves to the bottom. Is there anyway that it can default to the bottom of the shouts. Keep in mind that I DONT want to reverse the shout order, I know how to do that. I just want it to default to the bottom of the shouts instead of the top.
At least I managed to get this far without buggering up the SB lol.
Forum: www.world-racers.com/forum (both issues are viewable)
Ive just turned guest view on. Thanks for any help you can give :D
hello,
it's possible if I create an action=shoutbox page I put this shoutbox in this page?
thanks.
@MothMan: I am not sure about the Global Headers and Footers mod. However, I do know that moving the shoutbox(); call in index.template.php to right after
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
then it should show up where you want it (after the Info Center).
@F.L.A.M.E.R: I just mean that there should be absolutely nothing before the very first <?php and absolutely nothing after the last ?>. Some text editors may put extra garbage into these files which makes things not work.
@machmanx: The scroll issue is probably a client-side thing (i.e. in the Javascript), and I'm not sure what you mean about the shoutbox slowing down (might be a hosting problem, or again a client-side issue). What browser are you using, and are the problems showing on other browsers or other accounts?
@KnottyMars: If you just want the timestamp and the username separated, like this:
[01:23 PM]
username: hello world
then it is doable by editing preg_timeformat, and adding
<br />
to the end of the return statement, which will insert a line break after the time stamp.
@ア尺乇刀丂乇丂: I know that people have had success using the Site Integration Mod to this effect: see http://www.simplemachines.org/community/index.php?topic=137508.msg1715050#msg1715050
Quote@F.L.A.M.E.R: I just mean that there should be absolutely nothing before the very first <?php and absolutely nothing after the last ?>. Some text editors may put extra garbage into these files which makes things not work.
Nothings there. Its all right there. Still a problem :(
Post yshout.php.
Attached. :)
Quote from: nneonneo on September 30, 2008, 10:00:03 PM
@picos: Hmm, it kind of sounds like the same problem as F.L.A.M.E.R. I don't know why this happens. I added some protection against hacking in the latest version (otherwise users may be able to delete shouts without permission). As long as the shouts were generated on 1.21 and the shoutbox is 1.21, it *should* work, but I think the login problem may have something to do with it. Are you at least able to delete forum posts? How about shoutbox bans?
Hi, I fixed the problem with signing in and the cookies... but the error still appears when trying to delete shouts. I cleared the cache etc and still it errors. I turned off the gzipCompression (false) but that never helped.
@F.L.A.M.E.R: You will have to ask your host about it. I can't see anything wrong with the file, and it works fine on my host.
@picos: May I take a look at your forum, under an account which can delete shouts?
This is the new error I get, just by clicking on "History":-
Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 437 bytes) in /home2/megablas/public_html/forum/yshout/class.tail.php on line 228
I'm assuming this is due to the home.txt getting full?
Isn't there a way the home.txt can be archived on it's own? So every time memory gets full, the shoutbox archives the chat into a file in a folder and then clears home.txt?
How big is history.home.txt?
I've deleted the file, my bad. It was 16.xx MB in size. But now the shoutbox is ok. It's still a hassle to have to clear it. This would make it 20 days, but now that my site is more popular, I expect that number to go down, which means more cleanups. :(
Hmm, now that you mention it, I think there might be a way to clear the history.
It would, unfortunately, require that someone actually uses the History page once in a while (before it becomes too big, that is), but hopefully that will not be too much of a problem (if no one uses History, you can just disable it by setting $historyPath to '')
In yshout.php, change $mytail = new tail($historyPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines($n);
$text=$mytail->output(PLAIN);
to
$mytail = new tail($historyPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines(10000); // number of lines to keep, change this to whatever you need
$text=$mytail->output(PLAIN);
$handle=fopen($historyPath,"w");
fwrite($handle, $text);
fclose($handle);
$mytail = new tail($historyPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines($n);
$text=$mytail->output(PLAIN);
Basically, this will run the tail function twice. The first prunes the file to 10000 lines (user-specifiable), and the second actually produces the real output. While somewhat wasteful, as long as people aren't constantly requesting your history file, it should be fine.
EDIT: To make it work 100%, you also need to hack class.tail.php:
change
$post_line = "\n";
to
$post_line = "";
Quote from: nneonneo on October 04, 2008, 05:13:38 PM
@F.L.A.M.E.R: You will have to ask your host about it. I can't see anything wrong with the file, and it works fine on my host.
Ok, What exactly i have to ask them ? I think it maybe due to javascript usage, but if its so then the command button also wont be working. Actually the whole shoutbox. Any help will be appritiated. :)
Can i already use the Advanced Shoutbox in SMF 2.0 Beta 4?
I am trying to use Adv_sb 1.21 for 1.1.6 and I am getting a package corrupted error. Please help.
@Normally: Yes. See the bottom of http://www.simplemachines.org/community/index.php?topic=137508.msg1730702#msg1730702
@jepot5: Hmm. Maybe you can try remaking the package; just extract it all out and put the contents in a new zip file. If that doesn't work, you will have to do a manual install...
@F.L.A.M.E.R: Commands work? That's really weird. Maybe it is something odd in the History file.
Quote from: nneonneo on October 05, 2008, 01:51:48 PM
@F.L.A.M.E.R: Commands work? That's really weird. Maybe it is something odd in the History file.
I am going to fall of laughter, comon some solution by any chance...! i am out of all options i think. :(
On my site where the shoutbox is installed (http://www.laatedaa.com/forums/) the shoutbox pops up for 1 sec, then goes away (no it is not in the news header). But it still shows "Shoutbox" on top, just no shoutbox to be seen!
How can I fix this? Thanks.
How do you make this go in middle of forum ?
How to set a message limit from a user ? I'm using 1.21 Advanced / SMF1.1.6.
It would be nice if someone make a FAQ, with questions like that on the main post. Search it on 202 pages is hard, a Link to the post with the solution help a lot of people with the same problem.
Anyway, it's a great Mod, thanks nneonneo.
@Lionheartzu: See http://www.simplemachines.org/community/index.php?topic=137508.msg1683120#msg1683120. The code goes at the top of writeLine().
@jamie-mate-2k8: I am not sure what you mean by "middle"...you should just be able to move/put the shoutbox code block where you want it.
@itisme1760: You need to disable (set to false) $gzipCompression (yshout/settings.php). This is because some code (on your host or yshout.php) is adding advertising scripts, which interfere with compression.
Thanks! This fixed it!
Quote from: nneonneo on October 06, 2008, 09:30:12 PM
@Lionheartzu: See http://www.simplemachines.org/community/index.php?topic=137508.msg1683120#msg1683120. The code goes at the top of writeLine().
Done, but it didnt work (Users still send 4 or more messages and dont get any Warning).
There is another way?
Thanks.
@ nneonneo:
Quote@MothMan: I am not sure about the Global Headers and Footers mod. However, I do know that moving the shoutbox(); call in index.template.php to right after
Code: [Select]
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
then it should show up where you want it (after the Info Center).
Hmmm... I tried copying that shoutbox block of code and inserting it in various places below that line you indicated... but nothing change in the resulting layout. Shoutbox was still up top.
Ideally I'd like the box to appear at the bottom, be collapsable, but still be in a spot where it is visible from any page in the forum (ie. main page, board view, thread view).
Thank you for this mod
I am using SMF 2 beta4
so I installed the mos manually
but didnot get it to work
it says:
Notice: Undefined index: forumProfile in F:\AppServ\www\smf116-2\Sources\Subs.php on line 3786
if I hit the shout button, the page itsself refresh, but nothing is shouted :(
@Lionheartzu, Nequil: That would be because I totally posted the wrong code...
global $ip;
$matches=Array();
if(!isMod() && preg_match_all("/$ip/", file_get_contents($chatPath),$matches)>3)
die("Sorry, you've already posted 3 messages...");
is the correct code (now actually tested! woot!)
@MothMan: You need to *move* it, not copy it.
@katib: First problem doesn't look related to the shoutbox (since it is in Subs.php, a file I have not altered), and the second problem sounds like it is related to missing JS files or something.
thank you for propmt reply
Quote from: nneonneo on October 07, 2008, 07:28:44 PM
@katib: First problem doesn't look related to the shoutbox (since it is in Subs.php, a file I have not altered), and the second problem sounds like it is related to missing JS files or something.
well
but if I undo the mod changes, the error message disappears
by the way
if I set
$gzipCompression=false;
I get :
(http://img404.imageshack.us/img404/5774/shoutgzipfalsent6.jpg)
please, notice that the "admin" button is disabled
but if:
$gzipCompression=true;
I get only the line with error message:
(http://img404.imageshack.us/img404/4055/shoutgziptruelz4.jpg)
last quesyion: where I can find the shoutbox seetings in the adminCP ?
I didnot found:
QuotePermissions for the shoutbox: in the admin panel, under Membergroups->Permissions.
as it stated on mod page
What's on line 3786 of Subs.php? My unmodified Subs.php doesn't even go up that high, so I suspect interference from another mod.
Also, the permissions are there for v1.21, but you had to have done the manual edits to the ManagePermissions.php file too.
Quote from: nneonneo on October 07, 2008, 07:57:46 PM
Also, the permissions are there for v1.21, but you had to have done the manual edits to the ManagePermissions.php file too.
Yes, I manually did the changes ManagePermissions.php file
Quote from: nneonneo on October 07, 2008, 07:57:46 PM
What's on line 3786 of Subs.php? My unmodified Subs.php doesn't even go up that high, so I suspect interference from another mod.
the line 3786 is in red:
Quote
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumProfile'],
'href' => $scripturl . '?action=profile;sa=forumProfile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
when I swith the forum language from arabic-utf8 to english, the error message goeas away, all look normal, but still cant shout
OK, the language thing is a bug. See http://www.simplemachines.org/community/index.php?topic=266731.0.
As for not being able to shout, I have no idea, unless the shoutbox JS is missing. Maybe I can take a look at the forum (please give me an account in English though since I cannot read Arabic at all :( )
Quote from: nneonneo on October 07, 2008, 08:16:54 PM
OK, the language thing is a bug. See http://www.simplemachines.org/community/index.php?topic=266731.0.
MAny thanks nneonneo !!!
now the error message about subs.php file has gone
But there is no shout thought :(
Quote from: nneonneo on October 07, 2008, 08:16:54 PM
As for not being able to shout, I have no idea, unless the shoutbox JS is missing.
I redownloaded the package, recopy the files over, but no success
By the way blueimp Ajax shoubox also didnot shout while on arabic-utf8
Now it can shout , after fixing the index.arabic.php bug
But nneonneo shoutbox still cant shout !!!
Quote from: nneonneo on October 07, 2008, 08:16:54 PM
Maybe I can take a look at the forum (please give me an account in English though since I cannot read Arabic at all :( )
the forum is only on local server, since I am still doing tests locally before converting my online phpbb2 forum to SMF
again, there is no membersgroup ---> permission settings:
(http://img355.imageshack.us/img355/9810/membersettinggsyd9.jpg) (http://imageshack.us)
You want the "Permissions" option. As for why it does not work, try this fix: http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317
Quote from: nneonneo on October 07, 2008, 07:28:44 PM
@MothMan: You need to *move* it, not copy it.
Sorry, that's what I meant I tried.
THis is a copy of the section in index.template.php after I've moved the shoutbox code.
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
// Show the shoutbox!
shoutbox();
echo '
</div>';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</div>';
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
.... etc, etc, etc
The shoutbox still appears in the header area
i want to put The Shout Box under the total time logged on i.e under the profile pic above the page
I use smf 2.0 beta4 and my theme is Blackrain
it installed successfully
i hv put it under
Quote// 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" />';
so its presently at the top of page
plzz help soon
@MothMan: post the whole file (as an attachment)
Oh snap... you know what? I was editting the wrong file. >_<
On editting the correct one, just as you said, it moved the shoutbox. I still didn't quite like the result, as it kind of messed up the look of the forum ... it removed the separation between the forum header, discussion boards, footer, etc. and blocked it all into one big chunk.
But, I now know what bit of code to play with, Thanks. :)
Hi nneonneo,
I tried to apply this shout box to my forum, but nothing seem to happen.
I use SMF 1.1.5 + TinyPortal v0.9.8
I installed SB_121.
I paste the code in page 1, in center phpbox, and also edited the /theme/TPstyle11_tp/index.template.php manually.
But it shows nothing. Am i missing something?
Or should I install the AdV_SB121?
Index.template.php attached
Thx before
i changed the phpbox to scriptbox, and it shows only between <div> </div> only. and the other code also displayed as is, so it looks terible.
whats wrong?
Hi,
Im having trouble getting my TinyPortal center block to show my shoutbox.
This is all that shows:
(http://i287.photobucket.com/albums/ll146/synicfan/AJAXSHOUTBOXSCREENSHOT.jpg)
here is the permission for the block:
(http://i287.photobucket.com/albums/ll146/synicfan/PERMISSIONSFORBLOCK.jpg)
and here is the permissions in the admin section:
(http://i287.photobucket.com/albums/ll146/synicfan/ADMINPERMISSIONSFORSHOUT.jpg)
I already copied the code as instructed in the initial directions:QuoteInstalling to TinyPortal: Follow the instructions for the "<head> code" block under Installation to Other Themes, then add either of the "shoutbox code" blocks to a new TinyPortal center phpbox.
CAN SOMEONE HELP ME PLEASE?
THANK YOU!
Quote from: nneonneo on October 07, 2008, 09:45:47 PM
You want the "Permissions" option.
Thanks
Now, I can access soutbox settings in AdminCP
Quote from: nneonneo on October 07, 2008, 09:45:47 PM
As for why it does not work, try this fix: http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317
Yes, I tried this change, but no success
I remember that mod package installer was unable to modify default theme files
So maybe , I have something wrong
I will reinstall a fresh copy of SMF2 Beta4, as the current forum is an upgrade from 1.1.6
Quote from: synicfan on October 08, 2008, 12:13:51 PM
Hi,
Im having trouble getting my TinyPortal center block to show my shoutbox.
Its the same problem with mine. Waiting for the solution from the seniors.
Quote from: cr34t1v3 on October 08, 2008, 09:37:23 PM
Quote from: synicfan on October 08, 2008, 12:13:51 PM
Hi,
Im having trouble getting my TinyPortal center block to show my shoutbox.
Its the same problem with mine. Waiting for the solution from the seniors.
BTW, Im still having this issue. :D
Please help!
@cr34t1v3: index.template.php looks OK. Does the phpbox show up empty?
@synicfan, cr34t1v3: Let me see your forum. Maybe something else is wrong.
yes its empty, just like synicfan's capture.
any idea?
Need to check some file maybe?
i sent via pm forum adress, username and password
What did you paste in the phpbox? It looks empty, i.e. there's no code in the block.
i paste the code from page 1...
Block Manager -> Center blocks -> Shoutbox
is that empty?
i just checked, and the code is still there.
Ah, but in your case, it is all on the same line. Try it again.
The code you want is
// 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
which MUST be on separate lines. synicfan, this might also apply to you (cr34t1v3, using the admin details you sent me, I have just gone ahead and fixed it for you)
super great jobs
thank you so much nneonneo.
maybe the code in the box should be modified, so that anyone that copy paste will get the same exact code including the paragraf alignment.
this is great stuff! thanks!
Which box? If you refer to the one on the main mod page, that is exactly what I copied.
ah...so that's only a problem to mine.
great stuff...great support..thanks.
Hi again.
I copied and pasted your code into the PHPbox.
the shoutbox is still showing blank.
here is the way the code looked after I saved it in the box:
(http://i287.photobucket.com/albums/ll146/synicfan/AJAXSHOUTBOXCODESCREENSHOT.jpg)
Quote from: nneonneo on October 09, 2008, 12:13:18 AM
Ah, but in your case, it is all on the same line. Try it again.
The code you want is
// 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
which MUST be on separate lines. synicfan, this might also apply to you (cr34t1v3, using the admin details you sent me, I have just gone ahead and fixed it for you)
Yes, synicfan, that is all on one line. Try again.
Quote from: nneonneo on October 09, 2008, 10:36:47 AM
Yes, synicfan, that is all on one line. Try again.
When I copy and paste your code, thats the way it shows up.
Do I need to format the code a certain way?
Sorry for being a pain.
I do appreciate your help!
What browser are you using? The code should look *identical* to what I posted.
nnenneo, i have installed the shoutbox but all i get is a message saying
...loading shoutbox...
And ideas?
Quote from: nneonneo on October 09, 2008, 10:54:46 AM
What browser are you using? The code should look *identical* to what I posted.
Im using IE7.
How would you make it so that the Shoutbox is collapsed by default (for both Guests and Members) instead of expanded?
http://www.othersi.com
I removed the old SB I had and installed 1.21. Everything seemed to install correctly, however, on page load.. it's there for a second then gone! No Shout Box. Any ideas? SMF ver. 1.1.6 Default theme, I just tweeked style.ccs
http://glendive-mt.net/GlendiveForum/index.php (http://glendive-mt.net/GlendiveForum/index.php)
thanks.
@mraspy: Disable $gzipCompression. You will see this error:
Notice: Undefined index: smfVersion in /home/glend11/public_html/GlendiveForum/Sources/Load.php(1797) : eval()'d code on line 325
I think this might be due to a possible issue with the database. To eliminate the error, you can edit Themes/default/index.english.php and change
$txt['database_error_versions'] = '<b>Note:</b> It appears that your database <em>may</em> require an upgrade. Your forum\'s files are currently at version ' . $forum_version . ', while your database is at version ' . $modSettings['smfVersion'] . '. The above error might possibly go away if you execute the latest version of upgrade.php.';
to
$txt['database_error_versions'] = '<b>Note:</b> It appears that your database <em>may</em> require an upgrade. Your forum\'s files are currently at version ' . $forum_version . ', while your database is at version ' . (isset($modSettings['smfVersion'])?$modSettings['smfVersion']:'') . '. The above error might possibly go away if you execute the latest version of upgrade.php.';
I don't believe that error is the shoutbox's fault.
@Asshandler: SMF 1 or 2?
@gazza: What shoutbox version, forum version, and have you tried disabling $gzipCompression?
hey, So many pages, I don't know if it has been been covered or not.
I installed it (1.21) successfully. all things works fine. but when I'm logged in admin account, when the page is loading it shows th shoutbox, when the loding is complete shoutbox is gone, only the title :
Shout Box
remain on the screen.
I tried other accounts than admin and in different browsers, all works fine.
What's wrong with the admin account?
(SMF 1.1.6)
Disable $gzipCompression in yshout/settings.php.
Just wondering, do you have any plans to make the code readable? I'm helping someone modify their install, and it's hell trying to find anything...
The shoutbox doesn't seem to be working for one of my users. He says he can see it and the messages inside, fine. And he can type messages into the text buffer box, but when he hits return or clicks 'Shout,' nothing happens. The text just sits there in the buffer. He says he has an eMachine with Windows XP and that it happens with both Firefox and IE.
Any idea what the problem might be? The shoutbox is great and it's very frustrating for him (and me) that he can't join us in it.
Get him to hit CTRL + F5 to clear out his cache.
Hi, well am compeltly new to SMF forum, and am just trying to make a shoutbox for my gaming clan forum but having a few problems..
Well am using 1.1.6 smf, i downloaded SB_1.16.zip if thats correct?.
I went into the admin panel and upload the package and it seem to be ok.
Then i went to edit the index.template.php (default theme)
I added this part
// 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
But its the next part i don't understand,
// 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
I know this is the part were the shoutbox will go but i don't know where to put it, if i wanted to put it at the top were they usally go, how would i do this? If someone could tell me the line it goes after i would very greatfull.
Thanks
After installation of smf 2.0 beta 4 i have one strange problem NNEONSHOUTBOX appear for some second and after go out and remain not visible, i cannot find the problem some solution?
before with others version smf everything was ok not .. shoutbox disappear after some seconds.
look
http://ediboard.altervista.org/index.php?action=forum
@Sanity: For one thing, you should probably download SB_1.21.zip - the version number of the shoutbox is independent of the SMF version.
The shoutbox code typically goes after a block like this in index.template.php:
// 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'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
@edi67: Try disabling $gzipCompression or fix this error:
Notice: Undefined index: sp-forum in /membri/ediboard/Sources/Subs.php on line 3994
I have it installed and it seems to be working, but only administrators can see it. How do I make it visible to regular usres?
You have to set permissions for it in SMF's Admin area
Thank you! I finally got it.
Hello, can someone help me customize my shoutbox to better fit my forums? I've made two screen shots. The first is how the shoutbox looks on my forums, and the other is a digitally altered image to show the final product.
(http://img.photobucket.com/albums/v207/flameleg0las/current.jpg)
(http://img.photobucket.com/albums/v207/flameleg0las/current2.jpg)
As the images illustrate, there is this awkward space at the top of the shout that I'd like to remove. I looked hard, but could not find the solution in the yshout code files. I might have been looking in the wrong place.
Also, the ban and delete links, besides making them the same size as the font (not shown), I'd like to move them to upper right corner of messages.
Help would be most gratefully appreciated. Thanks.
:) hi
i wanna put the shoutbox from the welcome-area to the bottom of my forum (under the box with users online)
how should i change my index.template.php for manage it ?
thx Jessi
Hey guys just a quick question and sorry if it has been answered before. When my users use the SB it just keeps growing and growing in size. Is there a way to limit the SB to like 20 posts or so on the board to keep it a fixed size.
Sorry if this has been answered before. But 200 pages to read through is tough to take. ;D
Jessi, you can use tinyportal for that.
Internet, there is a guide to fixing height, and in one of the configuration files a place to limit number of shouts shown.
Quote from: SunKing on September 07, 2008, 09:18:15 PM
If you create a membergroup called "Shoutbox Mods" or whatever, you can add any members you want to moderate the shoutbox to that membergroup under additional membergroups and the shoutbox moderation will be added to whatever permissions they already have.
@sunking
sorry, can you explain me how i can make a moderator for shoutbox? thx
EDIT:
i've the solution! thx so much!
a new question:
i have installed the shout box, in teh right place! it works very well.
now,
1- can i insert the shout box in a new one theme box (i use the black rain theme)?
(http://i38.tinypic.com/207b1j4.png)
http://i38.tinypic.com/207b1j4.png
2- can i have a scrolling windows for shout so i can read the last "x" messagges?
3- is possible to add some bottons like "bold", "italicized", "underline" and a "choose line" for font, size and color?
4- why there isn't any description (look the picture!)?
(http://i35.tinypic.com/1535phg.png)
http://i35.tinypic.com/1535phg.jpg
thank you.
Quote from: bfeo on October 12, 2008, 08:19:04 AM
Jessi, you can use tinyportal for that.
Internet, there is a guide to fixing height, and in one of the configuration files a place to limit number of shouts shown.
i use MKPortal an want to put it in a php-box now
but the only one i can see, is the template-design but without content of the shoutbox
what is wrong now ?
i followed the instruction for TP (i thought it must be the same for MKPortal)
help please
One more last question.
How do I increase the size of the font in the box
*edit. Nevermind. Found it
But the area where you input the text. Can you make that bigger?
Quote from: Jessikard on October 12, 2008, 10:50:13 AM
Quote from: bfeo on October 12, 2008, 08:19:04 AM
Jessi, you can use tinyportal for that.
Internet, there is a guide to fixing height, and in one of the configuration files a place to limit number of shouts shown.
i use MKPortal an want to put it in a php-box now
but the only one i can see, is the template-design but without content of the shoutbox
what is wrong now ?
i followed the instruction for TP (i thought it must be the same for MKPortal)
help please
I use
<div id="yshout">';include_once($boarddir.'/yshout/yshout.php');</div>
in an html + bbc box for mine. It saved space but in the coding, the shoutbox itself, and it removed this double load glitch I was getting.
:'( no success with this code
@bfeo: First change should be found in index.template.php. Remove
echo '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
Second change: you need to add
#shout-adminlinks { float: right; position:relative; top:-1em; }
to the CSS block in yshout.css or index.template.php. This _might_ not work in all browsers (specifically IE, since it tends to have very poor CSS support) but it should work for most. You may need to tweak the top: value or use a pixel value in order to make it fit into the top left corner (I'm convinced there's a better way to move it there, but I can't seem to find it)
@Jessikard: Have you added the <head> code to the theme files?
@leonardus:
1) Depends on the theme. The following is code that should work for the default theme (it is a theme box without upshrink):
echo '<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;">';
// Block Title
echo '<span style="width:49%"></span><span>ShoutBox</span>';
echo '</div>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
</tr>
</table>';
2) http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
3) It is possible, but I don't know how. Anyways, you can use BBC, so stuff like [b]Bold![/b] can work.
4) Check your Themes/<theme>/languages/Modifications.<language>.php file. It is possible that the shoutbox strings are missing. This is what should be there:
// ---- 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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote><div>
<user>: 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' => ' <message>: 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.';
// ---- End modification - nneonneo's Shoutbox ----
@InternetMafia: index.template.php and/or yshout.css contain a block like this:
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
which you can edit to your liking.
http://www.xxx.com/test/index.php?action=forum
shoutbox keeps getting hidden
what is going on?
usind advanced 1.21 on smf 2.0 b4
What language file are you using? It has a broken forumProfile string: see http://www.simplemachines.org/community/index.php?topic=266731.0. Post there with your language. The fix is simply to correct forumprofile to forumProfile in index.<language>.php.
I have been reading and searching this thread since 10am WOW! it's a big one.
I finally downloaded the right version and have the chatbox working, but I am unable to find a way to constrain the line numbers the. I also should mention that I am using Simple portal and the more style theme.
The portal block keeps getting longer as I type, How do I keep the block from expanding? I have inspected all of the PHP files and the only reference to lines I have seen is the history number.
How do I remove these links?
[History] [Commands] [ExtendedHistory] [HideAdminLinks] [ReturnToShoutbox]
http://www.midsouthmetal.com/SMF/index.php
1) $maxLines in yshout/settings.php
2) display:none; in #yshout #yshout-toollinks CSS block (index.template.php or yshout.css)
Quote from: nneonneo on October 12, 2008, 05:31:13 PM
1) $maxLines in yshout/settings.php
2) display:none; in #yshout #yshout-toollinks CSS block (index.template.php or yshout.css)
Thank you I was one line away from seeing that happen, I'm sorry to waste your time but I really appreciate your help!
Can anybody help me? This mod isn't work on mine
My SMF version is 1.1.5 and this is my custom theme I'm using:
http://custom.simplemachines.org/themes/index.php?lemma=577
Please help!
Quote from: nneonneo on October 12, 2008, 05:12:37 PM
What language file are you using? It has a broken forumProfile string: see http://www.simplemachines.org/community/index.php?topic=266731.0. Post there with your language. The fix is simply to correct forumprofile to forumProfile in index.<language>.php.
thank you.
I have fixed that.
now the shoutbox appears, but it does not show anything.
Could you check this please?
http://www.xxx.com/test/index.php?action=forum
@bitmovel: Your test forum seems to be missing?
@BlackXBOX: What do you mean "doesn't work"?
where is cache of shoutbox stored?
I have moved my forum from http://xxx.com/test to http://xxx.com and it shows errors in shoutbox.
I have already cleared cache.
http://www.xxx.com/index.php?action=forum
edit: nevermind.
nneonneo, please check now why shouts does not appear. best regards
nevermind.
nneonneo, please check now why shouts does not appear. best regards
http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317
thank you!
great support.
that worked.
bet regards
What I mean is that nothing happened. The shoutbox didn't appear. Nothing changed after I installed it.
Should I send you the index.template.php and then can you edit it for me and send it back?
I'm here again.
1 - on advanced shoutbox, how can i put timestamp and shout text in same link?
2 - in smf 2.0b4 it does not collapse when i click on the red button
best regards
@BlackXBOX: Have you already made the theme edits? Did the code end up on the same line? (that happens more often than you might expect...)
@bitmovel: Edit yshout/settings.php and remove the <br />s from the end of preg_timeformat.
thank you for the reply.
how about the second problem?
I click in collapse button, but it keeps the same. using firefox 3 and smf 2.0 b4
www.nsubs.com
user and pass is nneonneo
You need this code in <head> section (best to go with the other upshrink codes):
// script for shoutbox upshrink
echo '<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the shoutbox header object.
var sbHeader = new smfToggle("upshrinkSB", ', empty($options['collapse_shoutbox']) ? 'false' : 'true', ');
sbHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
sbHeader.setOptions("collapse_shoutbox", "', $context['session_id'], '");
sbHeader.addToggleImage("upshrinkSB", "/upshrink.gif", "/upshrink2.gif");
sbHeader.addTogglePanel("upshrinkSBHeader");
function sbToggle() { sbHeader.toggle(); }
// ]]></script>';
Quote from: nneonneo on October 12, 2008, 07:33:46 PM
@BlackXBOX: Have you already made the theme edits? Did the code end up on the same line? (that happens more often than you might expect...)
@bitmovel: Edit yshout/settings.php and remove the <br />s from the end of preg_timeformat.
No I didn't make any edits. I don't know how to :(
Hi, I'm new here so I have problem with Shoutbox.
I just installed this mod to my forum with theme HighWay but I can get this work
These pics below is my result
(http://upnhanh.com/userimages/images/UpNhAnHdotC0M2008101328642nde5ywvkzg564088.jpeg)
(http://upnhanh.com/userimages/images/UpNhAnHdotC0M2008101328642zgexzte4nm509459.jpeg)
so I attach my index.template.php here
Does someone plz fix my problem???
Sorry about my bad English :D
@BlackXBOX: Can you please try the edits first?
@dungmt: The Shoutbox Code portion is in the <head> section, which is not where it should go. One place where you could put it is after
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
or before
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';
It is up to you where you like it.
Quote from: nneonneo on October 12, 2008, 10:42:37 PM
@BlackXBOX: Can you please try the edits first?
@dungmt: The Shoutbox Code portion is in the <head> section, which is not where it should go. One place where you could put it is after
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
or before
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';
It is up to you where you like it.
Thanks for your reply quick, but now the result like pic below, how do I make this work to Shout??? O:)
(http://upnhanh.com/userimages/images/UpNhAnHdotC0M2008101328642y2q0ymrmng527193.jpeg)
Attach the new index.template.php...
Hello, I was wondering I am using SMF 1.1.6 and I have the Mystic Jade theme. How would I get the shoutbox to appear where it usually does for the default theme, or appear at all?
Quote from: nneonneo on October 13, 2008, 07:02:26 AM
Attach the new index.template.php...
This í the new file, let's see and fix my mistake plz, thanks
@dungmt: The <head> code is in there twice. It only needs to go up at the top, and doesn't have to be with the shoutbox code too. I don't know if that would prevent the shoutbox from loading, but it might. Also try using this shoutbox code instead:
// 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
@Nomar: http://custom.simplemachines.org/mods/index.php?mod=585#post_otherthemes
I already tried making the edits and nothing changed.
Please edit it for me!
Ive attached my index.template.php
@BlackXBOX: You haven't even tried...
http://custom.simplemachines.org/mods/index.php?mod=585#post_otherthemes
Quote from: nneonneo on October 13, 2008, 11:43:49 AM
@BlackXBOX: You haven't even tried...
http://custom.simplemachines.org/mods/index.php?mod=585#post_otherthemes
Yes I have man...it didn't work so I removed the edits because I thought it might cause trouble.
Hi, i have made the theme edits(as i am using a custom theme) but still the shoutbox doesn't appear. Strange as it works on default theme?
Hi nneonneo :=)
How can I remove the empty lines as shoen in picture?
(http://www.nsubs.com/shoutbox.JPG) (http://www.nsubs.com/shoutbox.JPG)
I am using latest version of advanced shoutbox ;)
Best Regards
is it possible to show, who is looking at the shoutbox, if it is at a separat page ?
@BlackXBOX: Please include the index.template.php with edits.
@Chopper: Have you checked that the code is correct (e.g. not all packed on one line) and that the shoutbox code is placed where it will be visible (i.e. not inside a if($context['is_guest']) block or similar)
@bitmovel: I have not seen that before. Is the CSS block in the custom theme? If so, try replacing the CSS block with this one, from the AdvSB package:
#yshout {
font-size: 10px;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
border: 1px solid #777777;
padding: 5px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
margin-top: 0;
}
#yshout hr { /* shout divider */
color: #cccccc;
height: 1px;
border: 0;
background-color:#cccccc;
}
#yshout .shout-timestamp {
font-weight: normal;
font-style: normal;
color: #bbbbbb;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 6pt;
color: #141414;
}
#yshout #shout-form {
}
#yshout #shout-form fieldset {
border: none;
}
#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;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
@Jessikard: Yes, if it uses the action= system. You would add a string to Modifications.<language>.php which says
$txt['whoall_<action>'] = 'Shoutbox';
where <action> is the action's name. That puts them in Who's Online. If you want to do something a little fancier, you can use an SQL query to put the list of names directly on the shoutbox: http://www.simplemachines.org/community/index.php?topic=236625.msg1723748#msg1723748
*attention! I'm looking for screenshots. As I no longer run my own forum, only test forums, I cannot easily make a plausible-looking screenshot of this mod in action.
If you've got a mostly-unmodified SB or AdvSB (I'd like unmodified versions to avoid questions like "how come my shoutbox doesn't look like that") then I would be happy to accept a screen shot.
I would prefer that it shows it from a moderator/admin perspective, with del and ban links shown (though a non-admin view is also good), with a suitable number of chats from different people/different membergroups.
I especially need AdvSB screenshots since I still don't have any good ones since releasing it months ago.
As a final note, I'd prefer if it showed as much of the surrounding forum as possible (other themes are fine), as I can then crop it as necessary.
Thanks!
args.. sorry, our sb is at the forum-less site like /forum/yshout/
I've been trying to get this installed for the last 2 days. I used to have it working, but now I'm trying to install it on 2.0 Beta 4, and I've had no luck. I've edited all the files over and over, installed and uninstalled, I don't know what to do anymore. It just never shows up. I'm using what was the Black Rain theme but I've changed it around a lot. I can't get the mod to work on the default theme either though, nothing shows up. Its like no matter what I do the shoutbox never shows up at all. I've tried both the regular and advanced versions. I'd prefer the advanced but what now I'd be happy to get anything working. Can someone please help?
Quote from: Jessikard on October 13, 2008, 06:07:43 PM
args.. sorry, our sb is at the forum-less site like /forum/yshout/
especially i have more questions - i hope you can help
1. i have no Code like
// 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
to edit for the smilie-bar
how could i manage it to get this bar
and
in this posting -> http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091 (http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091)
i see at the bottom that you have to edit *up to 4 times - but what ???
there´s only one possibility to edit
thx for answer - Jessi
Hello,
Thanks for the mod!
It's great!
I want to ask where the shouts are being saved? To the database or somewhere else?
Also the option commands that is shown can be deleted?
thanks ;D
Could use some help here, i've followed the instructions, and all looks ok but when i try to shout it doesnt do anything.
I've done the fix for SMF Beta 4.0 but still doesnt work.
http://www.war-nfd.co.uk
Quote from: nneonneo on October 12, 2008, 03:00:45 PM
@leonardus:
4) Check your Themes/<theme>/languages/Modifications.<language>.php file. It is possible that the shoutbox strings are missing. This is what should be there:
// ---- 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' => ' <message>: 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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote><div>
<user>: 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' => ' <message>: 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.';
// ---- End modification - nneonneo's Shoutbox ----
i 've edited the file, but what you write is the same that is in my file (i've copy it!).
but the title "shoutbox" in my permission panel don' exist (in classic mode is visible "shoutbox", but in "simple mode" is not visible), in any member! the problem is not here.
can you help me?
and, for the theme box: i use black rain theme (v1), do you now which mod i make or were i can found it?
thx, very much, and i'm afraid for my english!
Quote from: nneonneo on October 13, 2008, 05:53:05 PM
@BlackXBOX: Please include the index.template.php with edits.
@Chopper: Have you checked that the code is correct (e.g. not all packed on one line) and that the shoutbox code is placed where it will be visible (i.e. not inside a if($context['is_guest']) block or similar)
@bitmovel: I have not seen that before. Is the CSS block in the custom theme? If so, try replacing the CSS block with this one, from the AdvSB package:
#yshout {
font-size: 10px;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
border: 1px solid #777777;
padding: 5px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
margin-top: 0;
}
#yshout hr { /* shout divider */
color: #cccccc;
height: 1px;
border: 0;
background-color:#cccccc;
}
#yshout .shout-timestamp {
font-weight: normal;
font-style: normal;
color: #bbbbbb;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 6pt;
color: #141414;
}
#yshout #shout-form {
}
#yshout #shout-form fieldset {
border: none;
}
#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;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
@Jessikard: Yes, if it uses the action= system. You would add a string to Modifications.<language>.php which says
$txt['whoall_<action>'] = 'Shoutbox';
where <action> is the action's name. That puts them in Who's Online. If you want to do something a little fancier, you can use an SQL query to put the list of names directly on the shoutbox: http://www.simplemachines.org/community/index.php?topic=236625.msg1723748#msg1723748
nneonneo, where is that supposed to be?
in theme's index.template.php?
I dont find it there.
I can only find a /Themes/default/CSS/yshout.css (I am using another theme)
Hi, thanks for the great thread on this mod..
I have another customization question... How can I change the text of the Shout! button?
Thanks!
In your language file which can be found in themes/default/language/modifications.english.php
Look for this line
$txt['yshout_shout_button'] = 'Shout!';
hi there nneonneo...
im back once again to this support thread. please visit my www.mirc-chatters.isgreat.org
i am using Shiny Blue theme. i installed the package and applied 'installation instructions to other theme' and yes it showed up in my forum page. i made it appear in the board.index inside User's Online box but the problem now is when sending message, it wont send. i clicked 'shout' button several times, it wont send the message. you may visit my site and check it yourself.
Ok I got it to show up now, but I still cant use it, nothing shows up, even though I did the modification thats supposed to fix this for beta 4. Also theres now a ?> on the top of my forum that I can't get rid of. Does anyone know what I'm doing wrong?
Quote from: JonoJames on October 13, 2008, 08:54:18 PM
Could use some help here, i've followed the instructions, and all looks ok but when i try to shout it doesnt do anything.
I've done the fix for SMF Beta 4.0 but still doesnt work.
http://www.war-nfd.co.uk
NEONNSHOUTBOX NOT WORK with Simpleportal i had same problem i solved ONLY installing PORTAMX
Ugh. I feel completely sick, so I apologize for not replying sooner.
@AeroFennec: ?> is probably a hanging PHP tag from one of the files, but without knowing what you've edited and how, I can't say any more. If nothing shows up, it is likely that you've made the theme edits incorrectly (a common problem is having all the code on a single line; a less common problem is accidentally putting it in a guest-only block or similar).
@Jessikard: If you are using the standalone shoutbox, I am not too sure what needs to be done for "who's viewing".
For the smileys, replace the line
<div id="yshout">Loading...</div>
by
<?php echo '<div id="yshout">Loading...</div>'; ?>
then you can add the smileys code after </div>
You will need to put mymod/smileys.php in yshout folder.
As for the id="shout-form" replacement, "up to four times" means that it might be in the file once, twice, three times or four times. In newer versions, it is probably only once.
@tadi: In a file: yshout/chats/home.txt. I am not sure what you are asking in the second question.
@leonardus: add the string
$txt['permissiongroup_simple_yshout'] = 'Shoutbox';
@bitmovel: CSS block is in the <head> code that you added to your custom theme's index.template.php.
@fofobody: edit Themes/default/languages/Modifications.english.php and change Shout! in
$txt['yshout_shout_button'] = 'Shout!';
to whatever you want.
@psynx: I can't see it. Do I need to be logged in?
hey mate, i got the advance ver running, how can i limit the amount of shouts, its like showing all shouts and taking up most of the page.
Thank you
$maxLines in yshout/settings.php
thank u
Hello,
Can someone tell me how to out a scroll bar in the shoutbox?
Sometimes the text-form is hidden.
How can I solve this problem?
I have been trying to get this to insert at the top of my forum but cannot figure out where to insert the code. I am using SMF & Tiny Portal, any ideas?
Here is my index.template.php
Man, if I knew how to edit it then I wouldn't be asking you for help.
my forum is in a template, like :
index.template.php :
include(templates.php);
echo $header_template;
forum code;
echo $footer_template;
which $header_template and $footer_template are in templates.php (my own file).
I want my shout box be placed in $header_template ..
I placed the the shoutbox codes (the one in the index.template, 2 sets of codes) in $header_template.
for example , eachtime i saw "echo" I replaced it with "$header_template .= ", and I placed commas to dots ...
for now shoutbox works fine, I see the text and the field where I want them to be,
BUT
on the top of the page before anything start, I see again the input filed and commands. Like now I have 2 sets of them, one in the place i want, Second on the top of my screen.
I saw the yshout.php is including there. and that was my problem. I went there, and changed ALL echo's there to "$header_template .= " .and i fixed all syntaxes. Now none of them is showing .
I hope it is not a lot to ask, What am i doing wrong here? or is there an easier way to do this?
I got 2 features that could be useful to add for images:
-Allow the admin to set a limit of images that can be shown at a time
-Allow the admin to configure number of seconds an image can be displayed
Both of these would be very useful to me, so that I don't have to delete images myself and that I can tell my members that's the way the shoutbox is configured ;)
Still, for all the features it has right now, I'm extremely pleased with it, thanks a bunch :D
In Reply #2215 to this thread it has the info on adding the shoutbox to the news section of your site. It has instructions for 1.17 and 1.21, will the 1.21 instructions work for 2.0 beta 4?
Great mod! Works like a charm (although manually installed...) Well documented!
Thanks!
nneoneo.. it's really slow on such big boards.. i have 500 members login a day, with like 40+ active, and it is very slow, any fix or settings i should use?
@tadi: What do you mean? If you want to add a scrollbar, see http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
@adamcanada: With Tinyportal, just use the instructions (http://custom.simplemachines.org/mods/index.php?mod=585#post_tips).
@asmith: You are probably missing a global declaration, e.g. global $header_template. The better way to do this would be to use output buffering, e.g.
ob_start(); // start buffering
include('yshout/yshout.php'); // include file: all echos are captured to buffer
$header_template.=ob_get_contents(); // add buffer contents to header
ob_clean(); // discard buffer
Note that you should disable $gzipCompression or some really funny things might happen.
@machmanx: The usual way to deal with this AFAIK is to post clear rules about shoutbox use, then a temporary ban from the shoutbox for not following rules (sounds harsh, but most people prefer this way) (note that the shoutbox doesn't have timed bans, so do remember to unban them or they will get mad!). You can also just disable images outright by adding the img tag to $bannedCode.
@Mikeric: They should, after the beta 4 fix is applied (http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317).
@Carb0n: See "High bandwidth use for large forums" under http://custom.simplemachines.org/mods/index.php?mod=585#post_troubleshooting. The only way to truly make this an efficient AJAX shoutbox would be to write a server-side server program which runs continuously and handles requests using the system resources instead of through Apache or PHP. This is not hard to do in e.g. Python (asynchat module) but is probably way over what is applicable to this shoutbox.
@nneonneo
Here are a few screenshots of the shoutbox. Crop as needed. ;D
EDIT: All three are the AdvSB 1.21.
Quote from: nneonneo on October 15, 2008, 08:56:10 PM
@tadi: What do you mean? If you want to add a scrollbar, see http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
@adamcanada: With Tinyportal, just use the instructions (http://custom.simplemachines.org/mods/index.php?mod=585#post_tips).
@asmith: You are probably missing a global declaration, e.g. global $header_template. The better way to do this would be to use output buffering, e.g.
ob_start(); // start buffering
include('yshout/yshout.php'); // include file: all echos are captured to buffer
$header_template.=ob_get_contents(); // add buffer contents to header
ob_clean(); // discard buffer
Note that you should disable $gzipCompression or some really funny things might happen.
@machmanx: The usual way to deal with this AFAIK is to post clear rules about shoutbox use, then a temporary ban from the shoutbox for not following rules (sounds harsh, but most people prefer this way) (note that the shoutbox doesn't have timed bans, so do remember to unban them or they will get mad!). You can also just disable images outright by adding the img tag to $bannedCode.
@Mikeric: They should, after the beta 4 fix is applied (http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317).
@Carb0n: See "High bandwidth use for large forums" under http://custom.simplemachines.org/mods/index.php?mod=585#post_troubleshooting. The only way to truly make this an efficient AJAX shoutbox would be to write a server-side server program which runs continuously and handles requests using the system resources instead of through Apache or PHP. This is not hard to do in e.g. Python (asynchat module) but is probably way over what is applicable to this shoutbox.
What about me?? You forgot me.
I'm sorry. I have no idea where you wanted the shoutbox, so I can't make the edits.
I was trying to put my shoutbox in the news section. When I tried i just get it saying loading shoutbox... in the space. My shoutbox is still also in the same area it has been above that.
Did you try adding the <head> code?
I keep getting an error:
'Fatal error: Call to undefined function allowedto() in /home/public_html/yshout/yshout.php on line 69"
Any idea what it could be? I'm using SMF2 Beta 4and AdvSB_1.21.
I remember someone else asked that question, and it had something to do with SSI, I think (don't recall exactly). Since I can't really remember, though, let's start at the beginning...
Is this a new installation, or has it worked before?
Is SSI.php modified?
Does this show up on the index, or just when the shoutbox loads?
Does it happen on yshout/index.php?
Does it happen on <forum>/index.php?yshout ?
New Install on a fresh Install of SMF (with PortaMX).
SSI.php is not modified.
The shoutbox actually shows up, and then changes to the error at the last moment.
It happens on:
http://www.bloodlustofnagrand.com/index.php?action=forum (http://www.bloodlustofnagrand.com/index.php?action=forum)
http://www.bloodlustofnagrand.com/index.php?yshout (http://www.bloodlustofnagrand.com/index.php?yshout)
http://www.bloodlustofnagrand.com/yshout/ (http://www.bloodlustofnagrand.com/yshout/)
Thank man, I got it working ^^
How can i insert a line between shout box messegaes?
I tried :
writeLine("<p class=\"shout\">$timestamp $adminlinks$text</p><hr />\n",$chatPath);
in the yshout.php, but its not working?
I have managed to get Yshout working on my Simple Portal page, is there a quick way in making the username field the username/nickname of the SMF forum?
Would appreciated any help, here is the box
http://www.war-nfd.co.uk
nneonneo: i have one problem, my shoutbox work and is visible perfectly with forum in english language, but if i put forum in italian language it appear and after some second DISAPPEAR
you can help me ?
login with : test / test
http://ediboard.altervista.org/index.php
u can choice italian/english language with drop down menu.
thx for help
Quote
@psynx: I can't see it. Do I need to be logged in?
no need, i now give guests permission to view and post to shoutbox. visit my forum page back and see what you think is wrong. thank you.
www.mirc-chatters.isgreat.org
@Roo: Any errors in the error log related to SSI or Security.php? It seems really weird that this error is happening, because allowedTo should be defined in Security.php which is loaded by SSI.php.
@asmith: The way this is done by AdvSB is like this:
Replace
return $chatText.' '; // hack: totally empty responses can break some browsers
by
return str_replace("\n","\n<hr class=\"shout-separator\" />",$chatText.' '); // hack: totally empty responses can break some browsers
@JonoJames: That looks like YShout v5, not my shoutbox. I don't know how to perform the integration.
@edi67: Try turning off $gzipCompression.
@psynx: Your JS files need to be updated; grab a 1.21 package, unzip it and put the files from yshout/js to your forum.
@nneonneo
works fine now! Thanks.
Two more things.
1. how do i set the time format on shoutbox? or does shoubox auto follow the theme default time?
2. I want 'history' button when clicked it will open in a new window instead of the same window.
I'm not good at ajax, But again interesting to me that my inserted code in there do nothing!!
My forum is in site.com/forums . I have insert the shoutbox in all non-forum pages (SSI included). it shows the people messages fine , but clicking on the button don't do anything.
members profile link in shoutbox has gone bad too. if I'm not in the forum folder , it makes its links like :
site.com/index.php?action-profile .... which is a broken link..
I did this change : (In the makeShout function)
$writeText="<a$a_style href=\"".((file_exists('forums/index.php'))? "forums/" : "")."index.php?action=profile;u=$userID\">$shoutName</a>";
So that it include the forums folder in the link for non-forum pages, but still no luck. What's wrong with it?
2. my date is like : [Today at 06:37:54 PM] username : . ...
How can i insert a <br /> or line break after the date , for more readability ? for example :
[Today at 06:37:54 PM]
Username :
mine actualy is like this atm :
[Today at 06:37:54
PM] username :
Really thanks man
These are the only errors in my log:
http://www.bloodlustofnagrand.com/index.php?action=admin;area=logs;sa=errorlog;desc (http://www.bloodlustofnagrand.com/index.php?action=admin;area=logs;sa=errorlog;desc)
8: Undefined index: global_character_set
File: /home/helpandg/public_html/Sources/PortaMx/PortaMx.php
Line: 38
http://www.bloodlustofnagrand.com/index.php? (http://www.bloodlustofnagrand.com/index.php?)
8: Undefined index: yshout_shout_button
File: /home/helpandg/public_html/yshout/yshout.php
Line: 314
http://www.bloodlustofnagrand.com/index.php? (http://www.bloodlustofnagrand.com/index.php?)
8: Undefined index: yshout_admlinks
File: /home/helpandg/public_html/yshout/yshout.php
Line: 273
http://www.bloodlustofnagrand.com/index.php? (http://www.bloodlustofnagrand.com/index.php?)
8: Undefined index: yshout_hide
File: /home/helpandg/public_html/yshout/yshout.php
Line: 273
http://www.bloodlustofnagrand.com/index.php? (http://www.bloodlustofnagrand.com/index.php?)
8: Undefined index: yshout_exthistory
File: /home/helpandg/public_html/yshout/yshout.php
Line: 270
http://www.bloodlustofnagrand.com/index.php? (http://www.bloodlustofnagrand.com/index.php?)
8: Undefined index: yshout_history
File: /home/helpandg/public_html/yshout/yshout.php
Line: 261
http://www.bloodlustofnagrand.com/index.php? (http://www.bloodlustofnagrand.com/index.php?)
8: Undefined index: yshout_commands
File: /home/helpandg/public_html/yshout/yshout.php
Line: 259
Does anyone have a screenshot of the smiley bar added to the SB?
Do the instructions posted on the mod page still work?
You can CLICK HERE (http://www.empireofthesun.net) to see the smiley bar in action. I modified it to open and close via a smiley icon, but other than that, it's straight from the instructions for it on the mod page.
Actually, I'm not trying to ban images from the shoutbox at all, I just don't want them to display for a long period of time. Simply, this would make moderating easier for the staff.
Besides, banning this and that and preventing functionality is being negative. It would be more positive if the shoutbox did it automatically so I can simply state to my members: "That's how the shoutbox is setup." instead of going to the trouble and staying "STOP!" "NO IMAGES!" "ONE MORE AND YOU'LL GET BANNED!" thus pushing away members from my site. You understand what I'm trying to say here? Being positive is better than being negative. And allowing images but only showing them for X amount of seconds would be a positive feature in my opinion.
Well, I thought it would be a simple line of code, but perhaps I was mistaken, my bad for asking.
@psynx: By default, shoutbox uses whatever your profile is set to, but you can change it: http://www.simplemachines.org/community/index.php?topic=137508.msg1630065#msg1630065
To make links like History show up in a new window, change
document.location=getURL(args);
to
window.open(getURL(args));
in yshout/js/yshout.js
@asmith: On non-forum pages, you need to include the JS files (moo.ajax.js and yshout.js in yshout/js) for the shoutbox to work properly.
file_exists is relative to yshout.php, so it won't work. Use
$writeText="<a$a_style href=\"/forums/index.php?action=profile;u=$userID\">$shoutName</a>"
instead (absolute path from server root)
Edit preg_timeformat in yshout/settings.php and add <br /> after
return '['.timeformat(intval($matches[1])).']
@Roo: Though it is probably not very relevant to the allowedTo problem, it looks like the language files aren't installed. As for the error, I still don't have a clue.
@machmanx: Hmm, allowing images for only a set period of time? The main issue is that it may interfere with smileys, since they also use <img> tags. Stripping or modifying them at the <img> level *could* work, but would be more than a simple line of code (something along the lines of adding a timeout to each image tag which is then scanned by Javascript). Perhaps a better option would be to simply replace images with links, so people could view them separately from the shoutbox if they so wish. That is easy to do, and simply requires replacing [ img ] and [ /img ] with [ url ] and [ /url ] respectively before parse_bbc. It's not a totally perfect solution, but it should work to reduce the effect images have on the shoutbox.
Hi nneonneo,
My shoutbox was working just fine until a couple of days ago.
Now when I click on history, all it says is:
Error 500 - Internal server error
An internal server error has occured!
Please try again later.
Any idea what this could be?
Thank you!
QuoteThank man, I got it working ^^
How can i insert a line between shout box messegaes?
I tried :
writeLine("<p class=\"shout\">$timestamp $adminlinks$text</p><hr />\n",$chatPath);
in the yshout.php, but its not working?
This mod uses <hr /> to add a line between the shouts. <hr /> displays differently in different browsers so it would be a good idea to remove the <hr /> and put a border on the shouts.
I have installed the shoutbox on my forum with no issues. I would also like to add it to my regular site pages, how would i go about it? What code would i add?
Forum version : SMF V2.0 Beta 4
How do you set the usernames color in the shoutbox when they shout?
The shoutbox loads the top of it, but not the rest, any ideas?
(http://img440.imageshack.us/img440/8190/shoutboxhj0.jpg)
Adam, that looks like a block without content. Check the block type. Should be PHP.
$writeText="<a$a_style href=\"/forums/index.php?action=profile;u=$userID\">$shoutName</a>"
is not working.
I tried to mess it, but i couldn't succeed either. I tried putting "test" next to index, see if the url changes , like :
$writeText="<a$a_style href=\"/forums/TESTindex.php?action=profile;u=$userID\">$shoutName</a>"
But even url is not changing, what's wrong with that?
Ya I have it set to 'phpbox' currently
@synicfan: I have absolutely no idea. Check your error logs for any messages, and/or contact your host.
@virtualxtc: Look at yshout/index.php to get an idea of what to do.
@Jirsh: They should already be set to the membergroup/postgroup colors...
@adamcanada: Are all the <div>s closed?
@asmith: It affects new shouts only.
Yes they are all closed
thanks nneonneo, Last thing :
shoutbox is not working on non-forums pages . It shows ALL the messages , but when i type a message there and click on the shout, the whole page refreshes without adding my new message, after that the shout button just do nothing.
I've checked scripts, they are all fine :
Quote
<script src="http://www.example.com/forums/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="http://www.example.com/forums/yshout/settings.js" type="text/javascript"></script>
<script type="text/javascript"><!-- // --><![CDATA[
window.onload=function(){loadChat();};
var shoutFile="home";
var yshout_php="/forums/index.php?yshout";
// ]]></script>
<script src="http://www.example.com/forums/yshout/js/yshout.js?July062008" type="text/javascript"></script>
I added this line to the top of yshout.php
$yshoutdir=(defined('SMF')||isset($yshout_from_index))?'yshout/':'';
// Check configuration files
$yshoutdir = ((file_exists('forums/index.php'))? 'forums/' : '').$yshoutdir;
and tested $yshoutdir variable. the variable worked ok, in forum pages it was yshout/ and in non-forum pages it was forums/yshout/ . But still no success .
What's wrong?
Quote@virtualxtc: Look at yshout/index.php to get an idea of what to do.
Ive implemented that code every which way but all i can see is "Loading..." but no actual shout box.
Quote from: asmith on October 17, 2008, 06:15:55 PM
thanks nneonneo, Last thing :
shoutbox is not working on non-forums pages . It shows ALL the messages , but when i type a message there and click on the shout, the whole page refreshes without adding my new message, after that the shout button just do nothing.
I've checked scripts, they are all fine :
Quote
<script src="http://www.example.com/forums/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="http://www.example.com/forums/yshout/settings.js" type="text/javascript"></script>
<script type="text/javascript"><!-- // --><![CDATA[
window.onload=function(){loadChat();};
var shoutFile="home";
var yshout_php="/forums/index.php?yshout";
// ]]></script>
<script src="http://www.example.com/forums/yshout/js/yshout.js?July062008" type="text/javascript"></script>
I added this line to the top of yshout.php
$yshoutdir=(defined('SMF')||isset($yshout_from_index))?'yshout/':'';
// Check configuration files
$yshoutdir = ((file_exists('forums/index.php'))? 'forums/' : '').$yshoutdir;
and tested $yshoutdir variable. the variable worked ok, in forum pages it was yshout/ and in non-forum pages it was forums/yshout/ . But still no success .
What's wrong?
What browser are you using?
I find that happens with "Google Chrome" but other browsers are fine.
Quote from: ameo on May 07, 2008, 11:46:19 AM
I made sort of guide for dummies, or something like that, to place this shoutbox in News field, and make it look cool on forum.
Personally, I believe this is the best position for shoutbox, and if you don't need News on your forum you could place shoutbox instead.
NOTE: I wrote tutorial and it works for 1.17 !!!
NOTE 2: With nneonneo's help - this works like a charm with version 1.21 also :)
For 1.21 installation see step (http://postthatpic.com/files/2526/4.png) instead of step(http://postthatpic.com/files/2526/1.png), and then
follow all other steps normally.
(http://postthatpic.com/files/2526/1.png)
First steps you already know, but I'll repeat it just in case;
First download yShout and install it.
If you're using different theme than default one after
[/s][/s]echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
you must add this code into your index.template.php :
[/s][/s]// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" 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;
}
</style>';
// YSHOUT END
(http://postthatpic.com/files/2526/2.png)
Then do this:
Of course you need news box to be displayed in order to see shoutbox in your index page.
To do that go to Theme options and click to:
1. DISABLE eNews (http://postthatpic.com/files/2526/inflame.gif) [it is very dangerous to leave it enabled, so if it is checked,
you must uncheck it]
&[/i]
2. Show news fader on board index [check it]
3. fading delay - set to 0
Click save, then in News box put this code
a) for 1.15-1.17 <div id="yshout">',$txt['yshout_loading'],'
b) for 1.21 [/s][/s]<div id="yshout">Loading shoutbox...</div>
instead of putting second code somewhere else:
And save it.
(http://postthatpic.com/files/2526/3.png)
If you wish to change News to Shout box or Shoutbox you'll need to find file index.english-utf8.php / index.english.php or of any other language file you're using. They are stored under Forum/Themes/default/languages/ In there you'll need to edit string $txt[102] = 'News';
to $txt[102] = 'Shoutbox'; and re-upload that file to it's place. You'll need to replace old file with that new-one if you didn't delete old one first.
// GUIDE FOR DUMMIES IS FINISHED // I guess that's it. I hope it shall be helpful to at least someone.
Step 4 is actually step 1 FOR 1.21 installation
(http://postthatpic.com/files/2526/4.png)
In index.template.php, after
// 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" />';
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
Best of luck 2 everyone[/hr]
I tried doing what is says in here, but my shoutbox is still at the higher part of the page. All it says in the news area is Shoutbox is loading.....
Quote from: nneonneo on October 15, 2008, 11:22:45 AM
@leonardus: add the string
$txt['permissiongroup_simple_yshout'] = 'Shoutbox';
thank you nneonneo! but i have inster your string here:
// Permissions
$txt['permissiongroup_simple_yshout'] = 'Shoutbox';
$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.';
// ---- End modification - nneonneo's Shoutbox ----
but nothing has happened. why? thx
now, another question for you:
i use black rain theme (v.1). but your shout box doesn't appear in a "box theme". can you help me to insert the shout box in a box? thx
(http://i38.tinypic.com/207b1j4.png)
http://i38.tinypic.com/207b1j4.png
Hey there.
I've made the first edit, however I am uncertain on where to place the second edit. Please help me out, thanks!
Where does this go? How do I find the location of where I want to put the shoutbox?
"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:"
Quote// 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
Thanks.
I see. So what you suggested will only affect posted images, but not the smilies, right? I guess I can live with that. So where exactly to I make this modification?
@adamcanada: Can I see the forum (when modified)?
@asmith: You need to also include Themes/default/script.js or Themes/default/scripts/script.js.
@virtualxtc: $boardurl needs to be set correctly.
@Mikeric: You need to remove the existing shoutbox, by removing the "shoutbox code" block from index.template.php (NOT the <head> code block!). Only one shoutbox can be active per page.
@leonardus: For the $txt thing, is it in Modifications.<your language>.php?
As for a block, try this code (non-collapsible; for a collapsible block, you should look at the code for AdvSB):
echo '<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;">';
// Block Title
echo '<span style="width:49%"></span><span>ShoutBox</span>';
echo '</div>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
<<SHOUTBOX CODE HERE>>
echo '
</td>
</tr>
</table>';
@ShotgunFR: Where do you want it?
@machmanx: After
foreach($bannedCode as $searchString)
$text = preg_replace('/'.preg_quote($searchString,'/').'/i','',$text);
add
$text = preg_replace('~\[(/?)img~i','[\\1url',$text);
I'd like it at the top, please. :)
At the top above all else? At the top in the user info area? Just above the menu? just below the menu? ;D
Where exactly would you like it placed? Be as specific as possible please.
Quote from: SunKing on October 18, 2008, 05:39:26 PM
At the top above all else? At the top in the user info area? Just above the menu? just below the menu? ;D
Where exactly would you like it placed? Be as specific as possible please.
Oh, sorry about that.
I would like it at the top but beneath where the "News" would be displayed.
Check the pic, etc.
I will need your BoardIndex.template.php to put the shoutbox in that location. :)
Sure, here it is.
As long as you have already installed the shoutbox using SMF's package manager, then this should work fine. ;)
Quote from: SunKing on October 18, 2008, 06:18:40 PM
As long as you have already installed the shoutbox using SMF's package manager, then this should work fine. ;)
Dude that messed up my whole forum!! The info center look changed as well as the board index!
What have you done!?? Omg.
It should fit right in. All you have to do is open BoardIndex.template.php and search for // 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
and remove it. That'll fix your forum.
Without access to your site, it's a bit difficult to edit files and have them come out flawlessly every time. I have successfully added shoutboxes to plenty of files, but sometimes it takes more than 1 try.
I found it, removed it. My forum changed back to its original look, but no shoutbox appeared.
I am working on your shoutbox right now. I'll post a link to the test site where you can view it before you use it....
OK. You can see how it's set up by clicking HERE (http://www.empireofthesun.net/testsite1/index.php). I uploaded the BoardIndex.template.php that I had edited for you to my test site and the only thing messed up with it was the shoutbox was not surrounded by nice pretty window. Not really a major thing, but I fixed that too............
I get the following error:
QuoteFatal error: require_once() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fratal/public_html/yshout/yshout.php on line 193
is it possible to put this shout box inside a tinyportal block?
worked, Thanks man ^^ Thanks a lot !!
The board URL has to be relative or it wont show up.
Works now, cheers for your help.
I can't seem to post if your on a regular site page. The page just refreshes but no shout is posted.
Any ideas?
@virtualxtc:
Quote from: nneonneo on October 18, 2008, 05:01:02 PM
@asmith: You need to also include Themes/default/script.js or Themes/default/scripts/script.js.
@ryozo: http://custom.simplemachines.org/mods/index.php?mod=585#post_tips
hey man
I've just found out that the shoutbox has a conflict with SMFchess.
http://www.simplemachines.org/community/index.php?topic=225742.340
Can you give it a look?
hope it can be solve by you, feeble says he can't do anything :/
Quote from: nneonneo on October 19, 2008, 05:40:33 PM
@virtualxtc: Quote from: nneonneo on October 18, 2008, 05:01:02 PM
@asmith: You need to also include Themes/default/script.js or Themes/default/scripts/script.js.
@ryozo: http://custom.simplemachines.org/mods/index.php?mod=585#post_tips
That is included and im still getting the issue.
My head code is...
<?php
global $boardurl,$shoutFile;
$boardurl="community"; // change this to the relative or absolute path to the forum root
$shoutFile='home';
echo '
<script src="',$boardurl,'/Themes/default/scripts/script.js" type="text/javascript"></script>
<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">
window.onload=function(){loadChat();};
var shoutFile="',$shoutFile,'";
var yshout_php="',$boardurl,'/index.php?yshout";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?July062008" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">
soundManager.url="',$boardurl,'/yshout/soundmanager2.swf";
soundManager.debugMode = false;soundManager.consoleOnly = false;
soundManager.onload = function()
{
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/chat.mp3", autoPlay:false});
}
</script>';
?>
The board url is correct. Im trying to impliment the code on the site index.
<?php
global $txt,$context,$boarddir;
echo '<div id="yshout">Loading...</div>';
?>
When I want the shout box to appear code.
Quote from: nneonneo on October 18, 2008, 05:01:02 PM
@leonardus: For the $txt thing, is it in Modifications.<your language>.php?
yes is in /Themes/<theme>/languages/modification.english.php (english is the default languages, i haven' t any othe languages).
thx
@asmith: http://www.simplemachines.org/community/index.php?topic=225742.msg1760443#msg1760443
I am not sure yet how I will solve the conflict. If you use the "instant-on" code, the shoutbox won't refresh but it will function (not applicable to news header installs, though).
@virtualxtc: It looks right. Have you checked to make sure there isn't another onload event?
@leonardus: Try clearing the language cache.
The shoutbox mysteriously stopped working in the middle of the night, apparently. I changed themes, but it worked after that, so I don't really think it was that. I can't see the shoutbox anymore, it just sits there as an empty box, but other users say they try to post in it and get this error:
Warning: fopen(chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /home/forte/public_html/forum/yshout/yshout.php on line 798
File error (writeLine); aborted
Anyone know what to do?
Is this onload handler, something wit javascript? I'm not sure but I remember sometime before I saw a little code which would mix 2 onload functions together ...
however, I will wait for your upgrade of this shout box. Actually a chat box that won't refresh has no use I guess.
edit :
Found the code :
// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function()
{
Start1();
Start2();
}
);
just trying to help, hope you don' take it the wrong way that I'm showing code. for sure you know more than me.
Quote@virtualxtc: It looks right. Have you checked to make sure there isn't another onload event?
Thats the only onload event.
This appears in the url when the page reloads but doesnt post...
http://www.sitename.com/index.php?shout_text=Testing+The+Shoutbox%21
I tried to shout "Testing The Shoutbox"
I have one problem with the characters permitted.
When someone writes in english the characters permitted in each shout is
$maxShoutChars=255;
But when someone writes in greek (the language of the forum) then the $maxShoutChars is about 55 characters. When you write more then the ο appears
Why is that?
How can I solve this? :)
@Forte: chmod that file (chats/home.txt) to 755 or 777.
@virtualxtc: That just means that the "onSend();" handler isn't working. On beta 4, it might be because you are missing the beta 4 fix.
@tadi: The shoutbox counting is a bit weird for non-english languages, because of encodings. It is actually storing about 6 characters per message (up to 8 characters, for Chinese, etc.). So, you are recommended to increase the limit to around 6 times that.
Ok thanks...
and another question.
How can I activate custom smileys ? I have the smf 1.1.6
Or If it is possible when you click on the open smiley option the smileys to appear in an another page.
Thanks again
Thanks, that fixed the posting problem, but now, whenever a user posts, the shoutbox shrinks down to 0 lines, then posts the new message (along with displaying the other ones still up there), but it only shrinks for the user who posted the shout. I hope that makes sense. Is that something that needs to have its permissions changed as well, or something in one of the files?
@Forte: Try turning off $gzipCompression; it's possible a warning is making the shoutbox collapse.
@tadi: I *thought* the smileys mod did add the extra smileys under a popup form...
Yeah, there's warnings there. Three of them.
Warning: fopen(chats/history.home.txt) [function.open]: failed to open in stream: Permission Denied in /home/forte/public_html/forum/yshout/yshout.php on line 762.
Warning: fputs(): supplied argument is not a valid stream resource in /home/forte/public_html/forum/yshout/yshout.php on line 763.
Warning: fclose(): supplied argument is not a valid stream resource in /home/forte/public_html/forum/yshout/yshout.php on line 764.
OK, do the same chmod to the chats/history.home.txt file.
Thanks. That did it.
Quote@virtualxtc: That just means that the "onSend();" handler isn't working. On beta 4, it might be because you are missing the beta 4 fix.
I have already made the change to yshout.js.
Was there another fix?
Quote from: nneonneo on October 20, 2008, 11:24:27 AM
@leonardus: Try clearing the language cache.
VERY VERY GOOD! thank you very much!
Quote from: nneonneo on October 21, 2008, 12:13:47 AM
@tadi: I *thought* the smileys mod did add the extra smileys under a popup form...
Yes they are.
But here is the problem:
I have the shoutbox in the top of the page.
So when I add the smiley, I have to increase the width of the header area ( I use onyx theme).
But when the smiley are hidden I have a big gap between the forum and the shoutbox.
So is there a possibility to use custom smileys and not the ones that I have in the forum?
:) :)
Dont worry, found it :) in the settings.php file.
--
Hello,
I am quite new to installing this and a forum. I am running SMF 1.1.6 default forum atm, how can i change the default amount of shouts that appear in the shoutbox?
Currently the users can add loads, i want to limit it to say 10 lines of txt.
Many thanks :)
How can upgrade to adv shoutbox?
2 Questions:
1) How do I reverse the order, so new shouts are on top.
2) Is there supposed to be an admin section? I dont see it
Quote from: Nequil on October 01, 2008, 10:10:35 AM
dammit... @nneonneo can you paste this code to my yshout.php?... please I can't do this...
global $ip;
if(!isMod() && preg_match($ip, file_get_contents($chatPath))>3)
{
echo "Sorry, you've already posted 3 messages...";
return;
}
thanks nneonneo, but doesn't work... look on this:
I would like to members without group send only 3 lines of messages in shoutbox (spam security) (understand?)
(http://img263.imageshack.us/img263/80/asdsahs0.png)
(http://img241.imageshack.us/img241/3577/asdsadasdkm2.png)
ok, found an issue
I have the Shoutbox in the simple portal.. i did it by adding a PHP block, then putting
shoutbox();
as the code... it works BUT, it seems like only admins can see it? how can i make it viewable by all but guests?
You have to set the permissions for your membergroups in SMF's admin (permissions) area
You can change the reverse order in the settings.php file, not sure about point 2 myself, I dont think so, well I have not found it yet if there is, apart from doing /help in the txt box.
Hope this helps.
--
Quote from: StaticFX on October 21, 2008, 10:20:50 AM
2 Questions:
1) How do I reverse the order, so new shouts are on top.
2) Is there supposed to be an admin section? I dont see it
Quote from: SunKing on October 21, 2008, 05:15:53 PM
You have to set the permissions for your membergroups in SMF's admin (permissions) area
well, it doesnt show up in the admin panel?
i have looked everywhere....nothing. help?
http://www.yoursite.com/yourforum/index.php?action=admin;area=permissions should take you to your permissions area. Once there, check all of the membergroups you want to allow to view the shoutbox then select "Add Permission" from the dropdown list and then under [Shoutbox] select "View shoutbox" from the other dropdown list.
Repeat this for the "Post in shoutbox" and "Moderate shoutbox" permissions.
@sunking that is not there...... what part of the code added it?
What version of SMF are you running?
1.1.6
http://www.yoursite.com/yourforum/index.php?action=permissions
that's for 1.1.6
the rest of the instructions are the same
It's at:
http://www.okclan.net/smf/
I have PM'd you the login information to test the forum, thanks!
nneonneo, I am working on a shoutbox for someone who asked me to put the name above the timestamp. I cannot for the life of me figure out exactly where to change that. I can move the ban/del links, and I can move the timestamp to the very bottom after the actual shout, but I cannot put it between the name and the shout. What am I missing?
@Nequil: http://www.simplemachines.org/community/index.php?topic=137508.msg1741547;topicseen#msg1741547
@SunKing: The main reason it isn't so easy to do is because of the /me function, since that puts the name immediately before the message. It would not be difficult to *repeat* the username up top, but since splitting a /me line looks really weird, it isn't exactly easy to do. So, I guess it depends on what is needed for that.
P.S. if you are going to move the timestamp I suggest you change
$newFileContents=preg_replace('/<p[^>]*><span class="shout-timestamp" title="'.str_replace('|','\|',$spanTitle).'">.+\n/','',$fileContents);
by
$newFileContents=preg_replace('/<p.*?<span class="shout-timestamp" title="'.str_replace('|','\|',$spanTitle).'">.+\n/','',$fileContents);
just so that deleting shouts still works.
Is there a way to remove the link that says:
History Commands Extended History
As well as the box that shows your Username next to where you put in what you want to shout?
Both can be achieved in CSS.
1) Add "display: none;" after
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
2) Add "display: none;" after
#yshout #forum-name {
Hi nneoneo,
Shoutbox has been working great! Thank you!
I have a question. Is there a way to make every other line on the shouts appear a slightly different color? maybe they can alternate grey/blue or something like that? some users are asking about it and if possible, I'd like to change it for them.
Thank you.
I am pretty much there with my shoutbox now, just need some help, I have attached my index.template.php file for point 2). I would really appreciate it if you can amend the code for me. :)
1) how to add the timestamp to the right of all text lines (currently removed completely) - no worries I have added to the left on single line :)
2) how to centre the entire shoutbox table (Not the text, that must remain left justified) within the forum default theme?, I have made the SB smaller using the below:
#yshout #shouts {
overflow: auto;
width: 500px; /* the width you want to display */
height: 80px; /* the height you want to display */
I have searched the forum for ages, but cant put my finger on exactly what to do for the above. Running adv1.21 and smf 1.1.6
Forum here http://mechwarrior.org.uk/lol/index.php (http://mechwarrior.org.uk/lol/index.php)
A great SB by the way!! :)
Thanks in advance.
@nneonneo
If one did want to split teh /me
would it look like
Quote*Ferretness
Timestamp
Text
?
Because if so, that doesn't bother me, and if it wouldn't be too hard I would appreciate knowing how to do it.
Thanks =]
@nneonneo & sunking
its not there! there are NO permission settings for the shoutbox. help!!
Im am much more used to phpbb3 and am doing this for a friend... how does the admin section get its data?
was there something maybe i missed in the install?
could it be because the main code is in the index.php but the box is called in SimplePortal?
Ok, i found the "permissions" section in the code (modifications.english.php) .. they dont seem to be loading?
i tried putting them in the simple portal file because those load in the admin... still no good? are there supposed to be Database mods? (i didnt see any)
Quote from: mechwarrior on October 22, 2008, 03:44:37 AM
I am pretty much there with my shoutbox now, just need some help, I have attached my index.template.php file for point 2). I would really appreciate it if you can amend the code for me. :)
1) how to add the timestamp to the right of all text lines (currently removed completely) - no worries I have added to the left on single line :)
2) how to centre the entire shoutbox table (Not the text, that must remain left justified) within the forum default theme?, I have made the SB smaller using the below:
#yshout #shouts {
overflow: auto;
width: 500px; /* the width you want to display */
height: 80px; /* the height you want to display */
I have searched the forum for ages, but cant put my finger on exactly what to do for the above. Running adv1.21 and smf 1.1.6
Forum here http://mechwarrior.org.uk/lol/index.php (http://mechwarrior.org.uk/lol/index.php)
A great SB by the way!! :)
Thanks in advance.
to center the shoutbox table:
open yshout.php
find:
if(!$shoutFormOnTop)
change the next line to: (Note the <center></center>)
echo '<center><div id="shouts">',readChat(),'</div></center>';
then find:
if($shoutFormOnTop)
change the next line to: (Note the <center></center>)
echo '<center><div id="shouts">',readChat(),'</div></center>';
so now the table for that chat is centered... but the text will be as well...
open yshout.css
add
text-align: left;
in the #shouts section
Quote from: nneonneo on October 21, 2008, 10:24:56 PM
@Nequil: http://www.simplemachines.org/community/index.php?topic=137508.msg1741547;topicseen#msg1741547
@SunKing: The main reason it isn't so easy to do is because of the /me function, since that puts the name immediately before the message. It would not be difficult to *repeat* the username up top, but since splitting a /me line looks really weird, it isn't exactly easy to do. So, I guess it depends on what is needed for that.
P.S. if you are going to move the timestamp I suggest you change
$newFileContents=preg_replace('/<p[^>]*><span class="shout-timestamp" title="'.str_replace('|','\|',$spanTitle).'">.+\n/','',$fileContents);
by
$newFileContents=preg_replace('/<p.*?<span class="shout-timestamp" title="'.str_replace('|','\|',$spanTitle).'">.+\n/','',$fileContents);
just so that deleting shouts still works.
thanks, all works :)
Quote from: ameo on May 07, 2008, 11:46:19 AM
I made sort of guide for dummies, or something like that, to place this shoutbox in News field, and make it look cool on forum.
Personally, I believe this is the best position for shoutbox, and if you don't need News on your forum you could place shoutbox instead.
NOTE: I wrote tutorial and it works for 1.17 !!!
NOTE 2: With nneonneo's help - this works like a charm with version 1.21 also :)
For 1.21 installation see step (http://postthatpic.com/files/2526/4.png) instead of step(http://postthatpic.com/files/2526/1.png), and then
follow all other steps normally.
(http://postthatpic.com/files/2526/1.png)
First steps you already know, but I'll repeat it just in case;
First download yShout and install it.
If you're using different theme than default one after
[/s][/s]echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
you must add this code into your index.template.php :
[/s][/s]// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" 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;
}
</style>';
// YSHOUT END
(http://postthatpic.com/files/2526/2.png)
Then do this:
Of course you need news box to be displayed in order to see shoutbox in your index page.
To do that go to Theme options and click to:
1. DISABLE eNews (http://postthatpic.com/files/2526/inflame.gif) [it is very dangerous to leave it enabled, so if it is checked,
you must uncheck it]
&[/i]
2. Show news fader on board index [check it]
3. fading delay - set to 0
Click save, then in News box put this code
a) for 1.15-1.17 <div id="yshout">',$txt['yshout_loading'],'
b) for 1.21 [/s][/s]<div id="yshout">Loading shoutbox...</div>
instead of putting second code somewhere else:
And save it.
(http://postthatpic.com/files/2526/3.png)
If you wish to change News to Shout box or Shoutbox you'll need to find file index.english-utf8.php / index.english.php or of any other language file you're using. They are stored under Forum/Themes/default/languages/ In there you'll need to edit string $txt[102] = 'News';
to $txt[102] = 'Shoutbox'; and re-upload that file to it's place. You'll need to replace old file with that new-one if you didn't delete old one first.
// GUIDE FOR DUMMIES IS FINISHED // I guess that's it. I hope it shall be helpful to at least someone.
Step 4 is actually step 1 FOR 1.21 installation
(http://postthatpic.com/files/2526/4.png)
In index.template.php, after
// 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" />';
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
Best of luck 2 everyone[/hr]
is it possible to install shoutbox just after the news lin, in a separate theme box?
i do no use default them, but blackrain theme in my smf 2.0b4.
thank you.
is this mod good for 2.0 beta 4?
ok, maybe i was tired... problem solved. it shows the admin section now
(i am NOT going to tell you what i did.. LOL) oops
w00t, sorted it, just added <centre> to the beginning of:
<form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;">
Next smilies :)
-
Great, thanks very much, how do I now centre the actual SHOUT! field to match user shouts? I have looked at the yshout.php and nothing stands out :(Thanks again
-
Quote from: StaticFX on October 22, 2008, 09:37:11 AM
Quote from: mechwarrior on October 22, 2008, 03:44:37 AM
I am pretty much there with my shoutbox now, just need some help, I have attached my index.template.php file for point 2). I would really appreciate it if you can amend the code for me. :)
1) how to add the timestamp to the right of all text lines (currently removed completely) - no worries I have added to the left on single line :)
2) how to centre the entire shoutbox table (Not the text, that must remain left justified) within the forum default theme?, I have made the SB smaller using the below:
#yshout #shouts {
overflow: auto;
width: 500px; /* the width you want to display */
height: 80px; /* the height you want to display */
I have searched the forum for ages, but cant put my finger on exactly what to do for the above. Running adv1.21 and smf 1.1.6
Forum here http://mechwarrior.org.uk/lol/index.php (http://mechwarrior.org.uk/lol/index.php)
A great SB by the way!! :)
Thanks in advance.
to center the shoutbox table:
open yshout.php
find:
if(!$shoutFormOnTop)
change the next line to: (Note the <center></center>)
echo '<center><div id="shouts">',readChat(),'</div></center>';
then find:
if($shoutFormOnTop)
change the next line to: (Note the <center></center>)
echo '<center><div id="shouts">',readChat(),'</div></center>';
so now the table for that chat is centered... but the text will be as well...
open yshout.css
add text-align: left;
in the #shouts section
All done! ;D
Sorted now :) just need my other query sorting if you can spare the time?
Cheers
--
I have another issue with my shoutbox that i can not solve :(
Text is overlapping on a single line, I want it to auto return to the next line, if you go to my forum below and type a load of text and press enter, you will see what I mean
http://mechwarrior.org.uk/lol/index.php
I have set for the txt type field
$maxShoutChars=100;
chrs.
I can't seem to find the CSS file to make those changes, where would it be located?
Also one more quick thing, is it possible to list the posts with the newest at the top, instead of the bottom?
Ok i found it, now all I need to figure out is how to remove the "Shout Box" text from inside the shout box
Quote from: bfeo on October 12, 2008, 08:19:04 AM
Jessi, you can use tinyportal for that.
Internet, there is a guide to fixing height, and in one of the configuration files a place to limit number of shouts shown.
Does anyone have a link to a guide to fix SB height?
Thanks in advance.
Ok I have everything working now except...
Only Admins seem to be able to view the Shoutbox in TinyPortal, I went ahead and set the permissions on the shoutbox block so everything can see it but they don't seem to be able to view the shoutbox only the Shoutbox title.
Also, is there anyway to remove the "Shout box" text from within the shoutbox?
wow. nobody has seen my message? and i mean nobody.
:)
Was it that much difficult to know?
ok anyway. thx guys.
Quote from: InternetMafia on October 22, 2008, 11:53:20 PM
Quote from: bfeo on October 12, 2008, 08:19:04 AM
Jessi, you can use tinyportal for that.
Internet, there is a guide to fixing height, and in one of the configuration files a place to limit number of shouts shown.
Does anyone have a link to a guide to fix SB height?
Thanks in advance.
add this in you yshout.css
#yshout #shouts {
overflow: auto;
width: 95%; /* the width you want to display */
height: 250px; /* the height you want to display */
}
set the height/width to what you want, the overflow will add a scroll bar automatically
hmmm, this one I do not know how to sort,
Firefox and Chrome the shout box spacing is fine, in IE the line spacing is about double I would say between shouts.
How can I amend this please? let me know if you need me to upload a specific file.
Regards.
anybody can help me???
Quoteis it possible to install shoutbox just after the news lin, in a separate theme box?
i do no use default them, but blackrain theme in my smf 2.0b4.
thank you.
is there a way I set limit characters for a word ? like a word can't be more than 15 characters?
In the code that produces the form
<form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;">
are the different values for id and name intentional?
I'm trying to use an onClick handler to insert a smiley code into the forum shoutbox input text field, by clicking a smiley:
<img src="cheesy.gif" onClick="document.shout-form.shout-text.value = \':cheese:\'">
However, it won't insert the code into the text field. Can't see where I'm going wrong & wondered if the id & name attributes had something to do with it..
I noticed that if I reproduced the form as a plain html document, the onClick handler would not insert anything into the text field until I had renamed both the form and the text field without hyphens.. ?
one quick question, how do i resize the input text field? :)
Look toward the top of yshout.php for the following code
// Shout form
echo '
<form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;">
<fieldset>';
$inputForumName=' <input id="forum-name" type="text" maxlength="'.$maxUsernameChars.'" ';
$inputShoutText=' <input style="width: 100px" id="shout-text" type="text" maxlength="'.$maxShoutChars.'" ';
$inputShoutButton=' <input id="shout-button" type="submit" ';
if(isPostBanned())
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',$txt['yshout_p_banned'],'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_banned'],'" disabled="disabled" />';
Where I've got
<input style="width: 100px"
in the middle of it there, in the $inputShoutText=' line - alter the width: 100px to suit
(the style="width: xx" bit isn't there to begin with, add it in..)
probably a messy way to do it but it worked for me. think ideally it should be done outside the document & in the stylesheet
thanks argimiro.
after i edited the file, what happened was it resized the field of the shouted text...
what i need is to resize the input box, maybe make it into a rectangle or square?
this is because im using it in the left block in tp. :D
Strange, it only affected the width of the input field here (i looked at it in firefox but nothing else)
Maybe you could try using
$inputShoutText=' <textarea style="width: 150px; height: 80px" id="shout-text" type="text" ... etc
instead of
$inputShoutText=' <input style="width: 100px" id="shout-text" type="text"
but you'd have to muddle through the logic of spitting the right 'tail end' of the textarea out..
still no change. :)
heres a picture
i need to resize it up to the scroll bar.
Quote from: StaticFX on October 23, 2008, 10:14:33 AM
Quote from: InternetMafia on October 22, 2008, 11:53:20 PM
Quote from: bfeo on October 12, 2008, 08:19:04 AM
Jessi, you can use tinyportal for that.
Internet, there is a guide to fixing height, and in one of the configuration files a place to limit number of shouts shown.
Does anyone have a link to a guide to fix SB height?
Thanks in advance.
add this in you yshout.css
#yshout #shouts {
overflow: auto;
width: 95%; /* the width you want to display */
height: 250px; /* the height you want to display */
}
set the height/width to what you want, the overflow will add a scroll bar automatically
Thanks.
ryozo give us a link to your site, so I can have a look at the code you're generating there?
update on my own q. from a few posts back; I renamed the form and all 3 form fieldset items without hyphens (infact I replaced the hyphens in each case with the word 'hyphen'), and renamed name="shout_form" to name="shouthyphenscore" (to match the id tag)
I then picked through all the other files in the mod, and likewise changed all instances of those hyphenated names throughout, to match.
Having done that, the mod still seems to work fine in firefox and IE6 (not tested elsewhere), plus I am now able to use onClick and a palette of smileys to 'click' selected smiley codes direct into the input field.
I wonder what I might have broken by doing this though.
ah.. found out a day later, that the shoutbox won't start auto-refreshing until one shout has been made. It doesn't start refreshing when the page loads.. you need to make a shout to kick it into action. Is this likely to be caused by my edits to shout-form/shout_form.. or is this behaviour by design?
Quote from: argimiro on October 24, 2008, 07:36:34 AM
ryozo give us a link to your site, so I can have a look at the code you're generating there?
just exceeded the bandwidth as of today. :(
site is down
Quote from: nneonneo on October 21, 2008, 10:50:03 PM
Both can be achieved in CSS.
1) Add "display: none;" after
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
2) Add "display: none;" after
#yshout #forum-name {
I tried the first one, and it did not make a change at all on my site. Any ideas why?
Worked fine for me
Sorry for the slow reply; I had midterms to write...
@synicfan: You can use CSS to style every second row differently, but unfortunately it is not 100% supported by all browsers yet :(
The code is
#yshout #shouts p:nth-child(2n) { background-color: #ccc; }
where #ccc is any colour you want.
@mechwarrior: This CSS code should be in the index.template.php file:
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
margin-top: 0;
}
It controls the line spacing. Check to make sure you have something like that, and if you don't, add it.
@leonardus: Theme boxes are completely different matters. You should try to use something like this:
echo '<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;">';
// Block Title
echo '<span style="width:49%"></span><span>ShoutBox</span>';
echo '</div>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
</tr>
</table>';
@PLAYBOY: Yes, but it requires manual installation and a little patch: http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317
@asmith: no, not really. SMF has a word-break option (I think), but I have never used it. If set, it should affect the shoutbox (haven't tested this)
@argimiro: Use shout_form and shout_text (the dash in JavaScript will be parsed as a minus sign, which is not what you want)
@ryozo: The ideal solution is just to use the CSS "width" property. There should be a CSS block "#yshout #shout-text" in index.template.php; edit the width property of that block.
@Mikeric: Didn't work? That's odd, since it works for me...are you using shoutbox 1.21?
Is there a way to remove the text that is inside the shoutbox that says Shout Box ?
Yes, just edit index.template.php and remove it.
I searched through there and couldn't find any text that says "Shout Box"
$txt['yshout_shoutbox']
Weird, I searched and dont see that either
It should be right after // YSHOUT HERE - shoutbox code
Found it, thanks!
Hi nneonneo!
At first thanks for this great mod. I got this working pretty nicely, but I still get few error to my error log.
You wrote previously that these kind of errors are related to language files? What files I have to fix? Or what errors these are?
Tiedosto = file
Rivi = line
8: Undefined index: yshout_shout_button
Tiedosto: /home/np1630/domains/tarse.org/public_html/BBhorot/yshout/yshout.php
Rivi: 304
8: Undefined index: yshout_return
Tiedosto: /home/np1630/domains/tarse.org/public_html/BBhorot/yshout/yshout.php
Rivi: 267
8: Undefined index: yshout_admlinks
Tiedosto: /home/np1630/domains/tarse.org/public_html/BBhorot/yshout/yshout.php
Rivi: 264
8: Undefined index: yshout_hide
Tiedosto: /home/np1630/domains/tarse.org/public_html/BBhorot/yshout/yshout.php
Rivi: 264
8: Undefined index: yshout_exthistory
Tiedosto: /home/np1630/domains/tarse.org/public_html/BBhorot/yshout/yshout.php
Rivi: 262
8: Undefined index: yshout_commands
Tiedosto: /home/np1630/domains/tarse.org/public_html/BBhorot/yshout/yshout.php
Rivi: 259
@nwobhm: You need to copy Modifications.english.php (in Themes/default/languages) to Modifications.<your language>.php.
please help me!!!
why i can view the shout and the othen cannot see it?
the permission is ok (all can view the shout)! i've reinstalled now, but the problem is present...
thanks!
Has anyone successfully got the scroll-bar to work? Everytime I try it squishes everything to the left side of the box, if I extend the size of it, it will extend a bit but not to the other side of the shoutbox. If I try to increase it more it disappears totally.
Is there anything needed to be chmodded properly in order for this to refresh everytime there is new reply.
I am using Adv_SB1.21 and it does not refresh when there is new reply, only when you shout.
I can give you a test account if you need it.
Quote from: adamcanada on October 25, 2008, 09:12:43 PM
Has anyone successfully got the scroll-bar to work? Everytime I try it squishes everything to the left side of the box, if I extend the size of it, it will extend a bit but not to the other side of the shoutbox. If I try to increase it more it disappears totally.
I just did what it said on here and my scrollbar works perfect. The site is www.southshorestangs.com if you want to check it out.
unistalled and it killed my forum.
I deleted the mod folder, reloaded the default theme.
http://waronyou.com/forums (http://waronyou.com/forums)
QuoteThe 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 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.41 Server at waronyou.com Port 80
I got this fixed but now Im scared to use this mod now and the other shoutbox is buggy.
Quote from: nneonneo on October 25, 2008, 12:13:36 PM
@nwobhm: You need to copy Modifications.english.php (in Themes/default/languages) to Modifications.<your language>.php.
Thanks! I think I got the problem solved.
But how can I make all the lines start from the left? Not like they are in the attached picture? Or what other place would be better for Shout Box in Dilber Theme?
@leonardus: Did you install the shoutbox to an admin-only part of the code? i.e. for guests, does it say they need to be logged in? Post index.template.php...
@jepot5: It should autorefresh. I can go to your forum to take a look.
@waronyou: Did you uninstall the mod through the package manager? What did you do to fix it?
@nwobhm: This is probably because the wrapping block has "text-align: right" on it. You can just do this:
after
// YSHOUT HERE - shoutbox code
add
echo '<div style="text-align: left">';
and before
// YSHOUT END - shoutbox code
add
echo '</div>';
This wraps the shoutbox in a left-aligned block, and *should* ensure the alignment is correct.
@nneonneo
How I can to messages in shoutbox showing from top to bottom?
$reverseShouts in yshout/settings.php
Quote from: nneonneo on October 26, 2008, 03:19:09 PM
$reverseShouts in yshout/settings.php
ok works, but how I can set this option in history?
Yes I uninstalled it and got the error. IDK My host fixed the 500 error and I loaded up my back up defaults sources and theme.
I only unistalled it to adjust the refresh since I uploaded the whole package and couldnt access the file. I might put it in tp but im hesitant. It was working fine with no errors. Why would it do that when I uninstalled it?
@Nequil: In yshout.php, replace
echo processChats($text,$user);
by
$text=processChats($text,$user);
echo implode("\n", array_reverse(explode("\n", $text)));
@waronyou: It probably has to do with incorrect permissions. Hosts vary widely in what permissions are accepted.
When you get a 500 server error, it is usually a good idea to consult the server's error_log.
Quote
I just did what it said on here and my scrollbar works perfect. The site is www.southshorestangs.com if you want to check it out.
Weird, everytime I try it the scrollbar squishes everything to the left, I expand the width and it will expand until a certain extent..it gets halfway across the shoutbox and then it will disappear.
I am guessing this is because of something particular to your theme (probably a width: declaration or similar in a parent element). Which theme are you using, and where did you install it?
I've got a new question. I have set this shoutbox into my front page and now it seems that people stay looged-in even if I have set from the forum settings that they shouldn't be visible after 10 minutes of inactivity.
This 10 minute rule doesn't seem to be working now?
I'm not sure if this shoutbox is cause of it ???
How can I disable smileys in the shoutbox? They are flashing everything the shoutbox reloads.
@nwobhm: It could be the shoutbox, since every refresh potentially marks the user as active.
Change this line in yshout.php:
writeLog(); // mark user as online
to
if(isset($_POST["reqtype"]) && $_POST["reqtype"] != 'refresh') writeLog(); // mark user as online
This will mark the user as active only if he shouts or refreshes the whole page.
@bfeo: In yshout.php, change
parse_bbc($text)
to
parse_bbc($text,false)
I am using the DarkBreak theme with SMF + TinyPortal
I can't get the sound to work, it was named for "sound.mp3" but the file received was "chat.mp3", now I changed the url path so it would link to "chat.mp3" however the sound still does not work...
How can i prevent a banned user to chat in shoutbox? I banned the user already in the forum but he can still see the shoutbox and chat. I need to do ban the user twice on forum and shoutbox.. Is there a way to ban the user in the shoutbox and forum at the same time?
hey there, i have installed the shoutbox but I'm getting a strange error, similar to the one of 2.0 beta 4, when some1 tries to post the posting button doesn't work, like its a javascript error or something?
I'm using SMF 1.6 so cant see whats wrong? could you mabe help me, and aswell I'm using the advanced edition of your shoutbox..
Thanks in advanced 8)
PS: My website is www.sybarific.co.za
Username: Tester
Password: 123456
@Patriot89: Did you install it manually?
@dangerboy: The ban systems are separate, so you have to ban a user from both.
@Pho3niX90: You are using an older version of the <head> code. Edit index.template.php and update the <head> code section. You might also want to keep the customization made to onload:
window.onload=function(){loadChat();};
is changed to
window.onload=function(){ loadChat(); if(previousOnload) previousOnload(); addReflections(); };
Quote from: nneonneo on October 29, 2008, 10:31:10 AM
@Patriot89: Did you install it manually?
@dangerboy: The ban systems are separate, so you have to ban a user from both.
@Pho3niX90: You are using an older version of the <head> code. Edit index.template.php and update the <head> code section. You might also want to keep the customization made to onload:
window.onload=function(){loadChat();};
is changed to
window.onload=function(){ loadChat(); if(previousOnload) previousOnload(); addReflections(); };
I have tried that, but no luck:(
I did not install it manually
Also, is there a way to allow registered users to change their name in the shout box
for example
User Name is DonGio
he wants to change his name to Bubbles...
can we set it so he types "/nick Bubbles"
now his name is Bubbles..
@Patriot89: Hmm. Try a newer soundmanager2.
As for changing the username, try this:
In yshout/yshout.php, change
if(isGuest())
{
if($autoGuestName!==false)
to
if(true)
{
if(isGuest() && $autoGuestName!==false)
Change
else
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />';[/code[
to
[code] else
echo '
',$inputForumName,'value="',$user['name'], '" />';
In yshout/js/yshout.js, change
userdata='';
if (guest) {
to
userdata='';
if (true) {
This will allow ordinary members to edit the name field on the left.
In my shoutbox text are bold, how I can fix this?
(http://img355.imageshack.us/img355/3070/asdvh9.png)
I downloaded the sound manager and uploaded the soundmanager2.swf file and still no luck. I'm just gonna remove the sound button for now until it starts working.
Any ideas about the scroll bar? This is the last thing I am having problems with
Looked through many pages and didn't see this exact problem:
Upgraded SMF to latest beta (from 3 -> 4) and got to the point where the shoutbox 1.21 works 100% for myself and others.
However, some users are still having problems shouting (they can see the board, but "submit" doesn't do any shouting). Other users have cleared cookies, sign in/sign out and combos of those and they are now working as well.
He's using FF3.x on XP, but I have also tested FF3 to work.
Hey,
I did a fresh install of 1.21 Advanced and tried to use the autoscroll feature. However, it's not working as how I think it works. It keeps outputting
Error: divScroll is undefined
Source File: http://xxx/yshout/js/yshout.js?July062008
Line: 179
Note, this is a FRESH file from SB Advance and contains the chatscroll object and everything.
var divScroll; is declared after the prototype function.
Anyone else receiving this?
Thanks
@Nequil: I'd assume it was just some formatting from the theme. Have you tried "font-weight: normal;" in #yshout block of CSS?
@Patriot89: Hmm, OK. If you want, I can take a look at your forum to see what is wrong.
@adamcanada: I think taking a look at your forum may be the quickest way to resolve this.
@weekend camper: So, who is it *working* for and who is it *not* working for? I am a little confused.
@Riotblade: The shoutbox works correctly otherwise, right? Check the index.template.php <head> code and make sure it is updated. I can also come to your forum to take a peek with Firebug.
my forum is http://ttkalliance.com/forum I can also send you the files
I think you should try also updating the soundmanager2.js file; download it from here: http://www.schillmania.com/projects/soundmanager2/script/soundmanager2.js
Quote from: nneonneo on October 31, 2008, 08:59:47 PM
@weekend camper: So, who is it *working* for and who is it *not* working for? I am a little confused.
As far as I know, its just one guy. He says he's cleared cookies and signed out/in several times, but he isn't the most technical of guys either. He is unable to post from the home computer but can at work. Other guys were able to remedy their own situations.
As the other guys on the forums have it working (and the "troublemakers" account
is working), just assume its a one-off that will fix itself.
At this point there isn't anything to do, just something to remember if you hear of other installs going weird.
Well, there is always Shift+Refresh and/or clear cache, which should fix it, unless his browser's been compromised or it is a very old browser. Who knows? :P
is tere someone who can tell me this mean ?
soundManager.initComplete(): calling soundManager.onerror()
-- SoundManager 2 failed to load (security/load error) --
soundManager.disable(): Disabling all functions - future calls will return false.
soundManager: Failed to initialise.
soundManager: No Flash response within reasonable time after document load.
Possible causes: Flash version under 8, no support, or Flash security denying JS-Flash communication.
soundManager: Getting impatient, still waiting for Flash.. ;)
soundManager.beginDelayedInit(): Document loaded
soundManager._initMovie(): Waiting for ExternalInterface call from Flash..
soundManager._initMovie(): Got EMBED element (created via JS)
soundManager._createMovie(): Trying to load http://www.evanels.eu/forum/yshout/soundmanager2/soundmanager2.swf
-- SoundManager 2 V2.90a.20081028 (AS2/Flash 8), high performance mode --
This means it failed to load the soundmanager. If you go to http://www.evanels.eu/forum/yshout/soundmanager2/soundmanager2.swf you see a 404, it means that the soundmanager script could not be found. Try putting the soundmanager2 file there.
1.firefox
2 IE
ver 1.1.1 Thai :)
Hmm, what encoding does Thai use? Can you try changing the encoding (View->Character Encoding in Firefox)?
Ok, I have spent hours trying to figure this out. I am not a coder that is for sure and even following some simple instructions are difficult.
I uploaded the shout box and placed it in the News area following how to sacrifice News 4 nneonneo's Shoutbox » guide for dummies on page 114 of this thread.
Only I can see the shoutbox in admin mode, regular viewers can't see it... I don't think the 'News" module has permission settings....dunny, my brain hurts. Any advise?
Sav
@nneonneo:
today my shoutbox broken down, and none user can't write in shoutbox.... only show previous text or shoutbox loading....
:o
@Savinaa: You want the Shoutbox permissions under the main membergroup Permission settings. If you can see a couple of checkboxes, but no text, follow the "No text?" instructions on the main mod page.
@Nequil: Any more details? PM me a forum URL and an account to test and I will take a look.
[04-Nov-2008 15:53:20] PHP Fatal error: Maximum execution time of 10 seconds exceeded in Unknown on line 0
[04-lis-2008 15:54:40] PHP Fatal error: Maximum execution time of 10 seconds exceeded in Unknown on line 0
[04-Nov-2008 15:55:50] PHP Fatal error: Maximum execution time of 10 seconds exceeded in Unknown on line 0
[04-lis-2008 15:59:16] PHP Fatal error: Maximum execution time of 10 seconds exceeded in Unknown on line 0
[04-Nov-2008 16:01:27] PHP Fatal error: Maximum execution time of 10 seconds exceeded in Unknown on line 0
[04-Nov-2008 16:01:37] PHP Fatal error: Maximum execution time of 10 seconds exceeded in Unknown on line 0
Anyway we could work in an edit feature so fat finger folks can go back and fix their screwups?
I'm running SMF 1.1.6, just installed Adv. Shoutbox 1.21 and before I was going to alter it to work with my theme (Aa New Damage), I wanted to see how it looked/felt in default; nothing shows up. I went to Members > Permissions > Regular Members to set permissions, there were no permissions to set, I looked all over for the shout box, nothing. What obvious thing am I missing?
All files CHMODed just fine, and installation was indicated as having been successful. Are there other steps I need to take to finish installation for SMF default? The only indication I have anything present is in Browse Packages.
okay. so I did the regular install and manual install and the shoutbox isn't coming up.... i'm running SMF 1.1.6. My theme is Black Rain v.2
please help me!
thanks
-dav
Quote from: dav on November 05, 2008, 08:58:22 PM
okay. so I did the regular install and manual install and the shoutbox isn't coming up.... i'm running SMF 1.1.6. My theme is Black Rain v.2
please help me!
thanks
-dav
Did you check to see if it's present under SMF default, and maybe you just have to modify Black Rain's index.template?
Quote from: Menard on November 05, 2008, 09:00:38 PM
Quote from: dav on November 05, 2008, 08:58:22 PM
okay. so I did the regular install and manual install and the shoutbox isn't coming up.... i'm running SMF 1.1.6. My theme is Black Rain v.2
please help me!
thanks
-dav
Did you check to see if it's present under SMF default, and maybe you just have to modify Black Rain's index.template?
YUP. I checked all that
EDIT: WAIT! I fixed it. Thanks man!
@Nequil: I can't see anything wrong :-\
Try turning off $gzipCompression.
@HR: It's not really planned at this time. If you really must fix something, you can edit home.txt.
@Menard: Check /index.php?yshout to see if anything shows up. If you see the forum, installation somehow failed; if you see "Nothing to do" then installation was successful. Were there any "test failed" warnings during install?
Quote from: nneonneo on November 05, 2008, 09:18:53 PMWere there any "test failed" warnings during install?
Alas, there were none.
I've moved on to uninstall, and to then reinstall in the hopes of a fresh install doing the trick, but something MUST have gone wrong the first time; for it will not let me uninstall. I get some error message about a file not being rewritable. Any ideas?
I'd like to completely get it stripped out and try again at another time. I may just go in do it manually, but I'd prefer it be less work. Whatever it takes, though. As is, it is PARTIALLY uninstalled, and I need to go the rest of the way.
EDIT: I stripped out all remaining files through my webhost's file manager. I'll try again later.
NEW PROBLEM!!!
Getting connection problems after I installed shoutbox
Error: Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.
Been happening a few times in like 25mins. like 2 or 3 times.. its weird.
Quote from: nneonneo on November 05, 2008, 09:18:53 PM
@Nequil: I can't see anything wrong :-\
Try turning off $gzipCompression.
ok, now its works ;]
This is a most excellent application! We installed it for our members and it works beautifully. I thought I was stupid until I realized it was tied into the permissions system. VERY NICE!
The one feature I have not seen, which would be great for us, is when someone makes a new post/thread, The shoutbox could be informed of that and an entry made to the effect of: SuchandSuch posted in [Section name] OMG Shoutbox is awsomes!!!
If it's something someone wants to take a crack at, that would be sweet. That way people don't have to keep refreshing the whole page or look elsewhere to see when people make posts.
Thanks again! This is great!
Hi, I've just installed the latest beta of SMF 2.0 (B4) and tried to install this package and found:
1. Execute Modification ./index.php Test successful
1. Add Before ./index.php Test successful
* 2. Execute Modification ./Themes/default/index.template.php Test failed
1. Add After ./Themes/default/index.template.php Test failed
2. Replace ./Themes/default/index.template.php Test failed
3. Add After ./Themes/default/index.template.php Test failed
* 3. Execute Modification ./Themes/default/index.template.php Test successful
Is there a problem with Beta 4?
Thanks,
Jas
@dav: Not sure. It's possible that the shoutbox is putting a strain on the server; if so, see the main mod page under "High bandwidth use for large forums"
@Gaugenstien: Yes, doable. I have gotten it half-working: the shout is made, but the shoutbox shows up when you try to post. I think a bit of tweaking the code should do it.
Here's what I have so far -- use at your own risk:
In Sources/Post.php, before
}
// Get the topic for display purposes.
function getTopic()
add
ob_start();
global $context;
include_once('yshout/yshout.php');
makeShout("New Topic: ".$_POST['subject']);
ob_end_clean();
That's for SMF 1.16, and it should also work for Beta 4. On posting a new topic, it will automatically post a shout as well. However, it isn't perfect, so I'm trying to work out that bug.
@jasuk70: Beta 4 requires manual installation; see main mod page.
Wow, I can't believe I have to ask this, but I accidentally banned myself from using the shoutbox. How do I go about reversing that?
Crack open _banlist and remove the entire line with your username or IP.
nneonneo:
Yes that code is very beta indeed. haha.
If you get time to play with it eventually, see if you can make the chatterbox entry a link to the post itself. That would be fantastic!
i am having difficulty modifying the size of our names that should appear in the shoutbox and also i want to change the font size. problem is, i dont know which of these codes i have to edit. i only have this code in my index.template.php
// 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: 12px;
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: 80px;
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
Today I opened my shoutbox and there was only 1 shoutmessage there. I checked the history, it was fine, all my shoutbox messages were there.
but why shoutbox is showing only one?
Is there an option for it?
I have installed the shoutbox in a other board, but its not displayed.
of course i have done the modifications in the template, then i created a new category and added "<div id="yshout">Loading shoutbox...</div> ", normaly sb must be shown, but there stands only "Load shoutbox..." for 5 seconds and then its empty.
I have viewed the html version of the forum:
Quote
<p><div id="yshout">Loading shoutbox...</div> </p>
On the other forum stands in html only <div id="yshout">Loading shoutbox...</div>.
i am using smf 2.0 beta 4
can you help me? what can i do?
Quote from: nneonneo on November 01, 2008, 07:59:46 PM
This means it failed to load the soundmanager. If you go to http://www.evanels.eu/forum/yshout/soundmanager2/soundmanager2.swf you see a 404, it means that the soundmanager script could not be found. Try putting the soundmanager2 file there.
thank you for answering me , i changed it to there but i still get no sound , and the debug is :
-soundManager.onload() complete
SMSound() merged options: {
id: sound,
url: http://www.evanels.eu/forum/yshout/a.mp3,
autoPlay: false,
autoLoad: false,
stream: true,
onbeforefinishtime: 5000,
onjustbeforefinishtime: 200,
multiShot: true,
pan: 0,
volume: 100
}
soundManager.createSound(): sound (http://www.evanels.eu/forum/yshout/a.mp3)
soundManager.initComplete(): calling soundManager.onload()
-- SoundManager 2 loaded (OK) --
(Flash): Enabling polling
Flash security sandbox type: remote
(Flash): _externalInterfaceTest(): JS <-> Flash OK
Attempting to call JS -> Flash..
-- soundManager.init() --
soundManager._initMovie(): Waiting for ExternalInterface call from Flash..
soundManager._initMovie(): Got OBJECT element (created via JS)
soundManager._createMovie(): Trying to load http://www.evanels.eu/forum/yshout/soundmanager2/soundmanager2.swf
-- SoundManager 2 V2.90a.20081028 (AS2/Flash 8), high performance mode --
How can I make the font size of the history larger?
On my forum everything is fine but the history font is very tiny :/
@Gaugenstien: Here's what needs to be changed.
In yshout/yshout.php, find
session_write_close(); // so that future session requests succeed
$heartBeatSent=false;
if(!$forceRefresh)
{
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
}
@session_start(); // restart session, so updates to $_SESSION are applied
and replace by
$heartBeatSent=false;
if(!$forceRefresh)
{
session_write_close(); // so that future session requests succeed
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
@session_start(); // restart session, so updates to $_SESSION are applied
}
This will fix the output problem and allow the topic posting to go over normally.
@psynx: For general font size, increase the 12 in
#yshout {
font-size: 12px;
overflow: hidden;
}
For usernames, add after that block
#yshout #userclass{
font-size: 20px;
}
where 20 is whatever size you want.
@asmith: Check $maxLines. It is also possible that someone else (another moderator?) has deleted all but one shout.
@master2oo8: Is the shoutbox on the board twice by some chance? Only one shoutbox can be active per page.
@xakiru: According to the output, soundmanager2 is working perfectly. Maybe it is just muted or something. If you want I can come to check it out?
@Enira: Edit yshout.php and look for
#yshout {
font-size: 10px;
overflow: hidden;
}
Change 10 as necessary.
Quote
@master2oo8: Is the shoutbox on the board twice by some chance? Only one shoutbox can be active per page.
No, i dont use it double :)
The installer says me, that template changes cant made. Then i add this code on the right place:
// 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[[CDATA[
window.onload=function(){loadChat();};
var shoutFile="',$shoutFile,'";
var yshout_php="',$scriptpath,'?yshout',$args,'";
// ]]]]><![CDATA[></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 {
color: #666666;
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
and open a new section with the description
<div id="yshout">Loading shoutbox...</div>
Its too not working when i make
// YSHOUT HERE
if (!empty($context['current_board']) && $context['current_board']==2) 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
Short stands Shoutbox loading, 5 sec after its away...
I mean, i cant make much false, what can be the error?
On my other board it works without any problems...
Quote@asmith: Check $maxLines. It is also possible that someone else (another moderator?) has deleted all but one shout.
It showed 1 shout,but when people posted in there, it went again to 12 as it was in the shout.
Dunno why it got down to 1 out of sudden.
there's no moderator on the site.
possible some user or guest try to crack the shoutbox or something?
Hi nneonneo,
where are the instructions to edit to show membergroups colors?
1.21 should come with that feature.
Can you help me nneonneo? :(
When i visit yshout/yshout.php it says Nothing to do. So it should work..
Thanks nneonneo, it worked.
EDIT: Something odd occured today. MSIE 6.0 users reported to me that the shout caused their internet explorer to crash.
I currently disabled the shout for those users by digging into the source code and disabling based on the $_SERVER['HTTP_USER_AGENT'] string.
I am using the SB_1.21.zip package and tried both "instant-on" and 1.1.6 behaviour.
Quote from: F.L.A.M.E.R on September 22, 2008, 01:06:32 PM
When i click on delete shout i get:-
Session verification failed. Please try logging out and back in again, and then try again.
Weird..!!
Anybody else getting the same thing? I've been getting it if I try to delete in the shoutbox window itself. If I open History, it deletes fine.
Thanks
i want to make js menu for mootools.
But menu script & shoutbox not working.
script is alone => working
shoutbox is alone => working
but script+shoutbox not working.
menu script in attachments. demo is mymenu.zip.
help me ?
@Enira: That is very strange indeed. I don't know what would cause IE to crash (indeed, debugging IE is not a fun task, especially when it *should* work). I don't have IE 6 installed, and unless someone can point me towards a clean way of letting IE 6 coexist with IE 8 without them trying to overwrite each other, it would be appreciated (my previous attempt at this failed and required an OS reinstall, so I am understandably wary of trying this again)
@Riotblade: For some reason, this happens for some people. I don't know why, but it usually has to do with cookies (that's about all I know for now)
@master2oo8: Maybe I can check out that board.
@ЯocKayseri: In index.template.php, try changing
window.onload=function(){loadChat();};
to
window.addEvent('load',loadChat);
This should leverage MooTools' addEvent functionality. Make sure you load MooTools somewhere *above* this line.
Also, MooTools may redefine a lot of stuff. yshout/js/moo.ajax.js contains some MooTools replacement functions, which means you might need to remove this code from that file:
// Prototype compatibility functions
// Mainly here to support moo.ajax.js
// Originally from http://www.prototypejs.org/, version 1.4.0
var Class = {
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
};
Function.prototype.bind = function(object) {
var __method = this;
return function() {
return __method.apply(object, arguments);
}
};
I also have no idea if the ajax class is compatible with the new MooTools. Anyway, this is all do-at-your-own-risk kind of stuff :P
If it still doesn't work, try loading your menu JS right after the lines
<script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script>
This way, the shoutbox code loads first, then MooTools can "safely" redefine most of the stuff without running into problems (I hope!)
i have a problem...
i use orange lime and i installed nneonneo's shoutbox...
nneonneo's shoutbox couldnt appeare....
how to appeare?
Quote from: nneonneo on November 06, 2008, 10:37:03 PM
Crack open _banlist and remove the entire line with your username or IP.
Cant you also UNINSTALL and REINSTALL the mod?
one of my modz did that to me and I had to reinstall.
It worked just fine after that....
needless to say, that mod of mine....is no longer a mod. hehehe
Hey, how do you change the height of this (v1.21)?
Suggestion,
If it's easily doable, maybe you can add a command to clear the history.
Thanks,
I'm being rather thick here but where is the history stored? In a file or on the database somewhere?
@Threepwud: in chats/history.home.txt
Quote from: nneonneo on November 11, 2008, 09:03:14 PM
@Threepwud: in chats/history.home.txt
That's grand mate, thanks. And I can't find it there so I am hoping that is why my shoutbox isn't working anymore....!
EDIT: no it was there. I have beta 4 and 1.21 and followed the manual install instructions provided. The box shows perfectly, permissions are granted, yet no history is being saved so no one even the admin can type anything. Peculiar.
Try to chmod chats, home.txt and history.home.txt to something like 755, 777, 666 or some other permissions value which is recommended by your host.
Thanks mate - first thing I tried.
I installed the mod via the package manager first then ensured the scripts were added in the relevant places - should it all be manual for beta 4?
Yes, manual install for themes (including default). Scripts should have been installed automatically by Package Manager.
Well I installed 1.21 via Package Manager and added the code into index.template.php as suggested at http://custom.simplemachines.org/mods/index.php?action=parse;mod=585;attach=64214;smf_version=2.0_Beta_4
I've used your mod successfully on previous versions, always using the default theme, and I'm stumped here. Just does not shout!
Have you tried this fix (http://www.simplemachines.org/community/index.php?topic=137508.msg1697317#msg1697317)?
Aye, you jolly good fellow!!!!
Thanks awfully :)
So, no one knows how to change the height?
Juhu, it works.
i have done a stupid error :(
But now i have a other problem, my site have about 200k pageviews everyday, and the shoutbox slow down my quadcore (!!) server very much. how can i make, that it dont take so much power? thanks!!!
I've some problems with viewing the History. I have SMF 1.1.7 and nneonneo's shoutbox 1.21. I use standard settings, only blocked guests from posting.. I can't view the History. I get a page like this (http://forum.peellan.nl/index.php?yshout&file=home&history) and this (http://forum.peellan.nl/index.php?yshout&action=packages&file=home&history&n=200) doesn't work both. Do I something wrong? :(
@ master2oo8:
Look in the topicstart: High bandwidth use for large forums (http://www.simplemachines.org/community/index.php?topic=137508.0#post_troubleshooting)
@ I JaR oF JaM I:
Look in settings.php, 5th line:
// Set the maximum amount of lines to be displayed at a time
// After changing this, /clear the shoutbox to make the change
// take effect.
$maxLines=12;
Both questions are just RTFM, imho :)
Quote from: nneonneo on November 10, 2008, 12:48:17 AM
@Enira: That is very strange indeed. I don't know what would cause IE to crash (indeed, debugging IE is not a fun task, especially when it *should* work). I don't have IE 6 installed, and unless someone can point me towards a clean way of letting IE 6 coexist with IE 8 without them trying to overwrite each other, it would be appreciated (my previous attempt at this failed and required an OS reinstall, so I am understandably wary of trying this again)
Due to the nature of my studies I usually have a fresh VMware with Windows XP ready. So I can run multiple operating systems inside my current OS. (With different configurations)
Also I noticed that the crashes always happen when I exit the mainpage into a board page. (Meh disabled the shout currently for people using IE 6.0) My logs told me it were only a few people that use IE 6.0.
Quote@xakiru: According to the output, soundmanager2 is working perfectly. Maybe it is just muted or something. If you want I can come to check it out?
Thank you so much ... just tell me what to post .... i dunno if it's muted ...
@Steephh: Is history.home.txt empty? If it is, it might indicate a problem with saving history -- usually using chmod will fix the issue.
history.home.txt is 4MB.. and is getting bigger and bigger!
lol :P
My host told me that my IP alone was running 180 connections because of the shoutbox. Could this be caused by having check duplicates on false? I'm afraid to put the shoutbox back up, because my host got very disgruntled with me. Their server blocked my IP 10 times before they divulged the reason I was being blocked (who knows why), and yet they seemed to think that I was at fault for not fixing the problem.
What can I do to lower the amount of connections made, while still having the shoutbox appear on all forum related pages?
nneonneo, maybe you can add, that when a teammember bann a user from shoutbox, that there stand in the shoutbox something like "$user banned from shoutbox"?
Quote from: bfeo on November 13, 2008, 09:00:21 AM
My host told me that my IP alone was running 180 connections because of the shoutbox. Could this be caused by having check duplicates on false? I'm afraid to put the shoutbox back up, because my host got very disgruntled with me. Their server blocked my IP 10 times before they divulged the reason I was being blocked (who knows why), and yet they seemed to think that I was at fault for not fixing the problem.
What can I do to lower the amount of connections made, while still having the shoutbox appear on all forum related pages?
Yes, the SB makes much connections, thats true...
read http://www.simplemachines.org/community/index.php?topic=137508.0#post_troubleshooting
I've had to manually install the mod since 1.1.7 has a pain in the ass bug on connecting to the FTP server
So When I installed it, everything runs smoothly just that... I CANT POST SHOUTS DIRECTLY FROM MY FORUM!
I can post shouts from the /yshout/ folder, just not directly from the forum... Does any one know what the problem is?
Look...
http://demonicbots.freehostia.com/index.php
@master2oo8: That is probably doable.
After
doMsg("Success: banned $id from reading and posting.");
add
global $user;
if($type == 'ban_names_') makeShout("$id has been BANNED from reading and posting.");
@zirak: I am going to wait until your forum comes back, and then I can look at it.
Lol, it was on? What was wrong with it o.O
If you get any error its most likely the host. I encourage you to refresh every time you see a SMF connection problem or anything related to the host.
Did you change the default theme's path to http://demonicbots.freehostia.com/Themes/Fakdordes? That will break the shoutbox, and probably other things too.
Let me check
::EDIT::
Let me make you an admin accoutn so you can skim over the settings
Got it, please remove that information before someone compromises your board.
I was tracking IP of the account I made to see if any one else was connected, I also saw some error logs generate for example
8: Undefined variable: current_action
File: /home/www/demonicbots.freehostia.com/Themes/default/Themes.template.php (main_above sub template - eval?)
Line: 612
?action=theme;sesc;sa=admin
All of the errors occured in Themes.Template.php
Aah, you have installed a theme on top of the default! This is definitely not going to work.
I am not sure how I can fix this. Maybe it is best if you just copy script.js from Themes/default over to Themes/Fakdordes. This is a short-term fix, you really should try to get the theme installed separately from the default theme...
P.S. my IP ends with 49.195 in case you want to make sure no-one else accessed it.
No, its completely seperate..
When I switched hosts there was a "template" error
they are by fact, completely seperate.
I just don't know how to lead them that way. I tried to make them seperate but it kept giving me the default Theme is invalid or something
::EDIT::
I also didn't know where to install all the files that game with the package, I installed all the files, except the image ones in the root, and the images in the theme/images folder
::EDIT2::
Script.js did fix the problem... But You kinda gave me that doubting feeling that I didn't install it properly... But yet it functions the way it supposed to
is there anyway to speed up how fast the chatbox refreshes? It seems like half the time the previous post doesnt show up unless you refresh or type your own thing.
check ur settings in jshout folder
::EDIT::
I just noticed i'm keep getting this error everytime i post a message on the shoutbox
Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter' in /home/www/demonicbots.freehostia.com/yshout/yshout.php on line 776
@zirak: Turn off $gzipCompression in yshout/settings.php
Stupid question I know.. but where is the limit to the size of the log file or how often it automatically clears/resets?
Quote from: master2oo8 on November 13, 2008, 05:37:37 PM
nneonneo, maybe you can add, that when a teammember bann a user from shoutbox, that there stand in the shoutbox something like "$user banned from shoutbox"?
Quote from: bfeo on November 13, 2008, 09:00:21 AM
My host told me that my IP alone was running 180 connections because of the shoutbox. Could this be caused by having check duplicates on false? I'm afraid to put the shoutbox back up, because my host got very disgruntled with me. Their server blocked my IP 10 times before they divulged the reason I was being blocked (who knows why), and yet they seemed to think that I was at fault for not fixing the problem.
What can I do to lower the amount of connections made, while still having the shoutbox appear on all forum related pages?
Yes, the SB makes much connections, thats true...
read http://www.simplemachines.org/community/index.php?topic=137508.0#post_troubleshooting
The troubleshooting guide discusses bandwidth. That's not my issue. The issue is too many connections per person. The host was categorizing it as mini ddoses, and began suspending IPs when only 5 ppl were chatting. What can I do to minimize the amount of connections that the shoutbox will open per person?
Quote from: Steephh on November 12, 2008, 03:53:47 PM
history.home.txt is 4MB.. and is getting bigger and bigger!
lol :P
@nneonneo: kick
@HR, Steephh: No limit, no reset. You will have to clear it manually.
@bfeo: The guide also reduces the number of simultaneous connections.
yes, but it doesn't specify how many. How can I be sure of how many connections will be open? How many connections does the chat open, I'd like information please.
I too have had members being banned due to too many connections so I'd like to look into that.
But first, I have just installed Simple Portal (is that a good idea?!) and now the shoutbox has disappeared. Any ideas as to what changes Simple Portal makes to make it go away?
Only I (the head admin) can see the shoutbox on my forum... Nobody else can. I manually installed it to my SMF 2 Beta 4 forum. I'm using the AdvSB_1.21.
Can anyone resolve this issue?
Quote from: Shadow03 on November 15, 2008, 11:35:06 AM
Only I (the head admin) can see the shoutbox on my forum... Nobody else can. I manually installed it to my SMF 2 Beta 4 forum. I'm using the AdvSB_1.21.
Can anyone resolve this issue?
Sounds very much like a simple permissions problem. Select the group you want in permissions and scroll down - there are different types of permissions to choose from (like general forum permissions etc). For me, one was blank and that was for the Shoutbox. I had to enable it there before it was accessible by other users.
@bfeo: Normally, under the chatbox refresh style ($updateTimeout >= 5, refreshTime <= 1000) the shoutbox will open one connection per host and hold that connection open for at most $updateTimeout seconds. The client will refresh the shoutbox after the connection closes, after a delay of refreshTime milliseconds.
For an autorefreshing shoutbox style ($updateTimeout = 0, refreshTime >= 5000) the PHP script will immediately read the chats file and close the connection, and the client will refresh the shoutbox every refreshTime milliseconds.
The difference is, in the latter style, no connections are held open. They are closed as soon as the chats file is done transmission. Hence, the number of connections should be much fewer.
@Threepwud: I don't know anything about SimplePortal.
Does the shoutbox disappear completely, i.e. is "Shout Box" still visible? If it isn't, then that's a theme issue.
If the "Shout Box" text is still visible, then it is likely that SimplePortal is affecting the shoutbox code. Try going to /index.php?yshout and /yshout/ and see if the shoutbox appears.
At www.hldrforum.com -
When the page is loading the shoutbox is visible and you can see the shouts and everything. However the box then vanishes as soon as the page fully loads.
Aha.
Notice: Undefined index: sp-forum in /home/hldrforu/public_html/forum/Sources/Subs.php on line 3900
This little message pops up, and it is probably causing the compression to fail. Turn off $gzipCompression, and the shoutbox should appear, with that message in it. You might have to add error_reporting(0); to the top of yshout.php (after <?) to make that error go away.
Thanks once again!
I'm searching but currently can't find this setting and is there a chance my host would get annoyed with me having it turned off? Bandwidth isn't an issue, mind you.
yshout/settings.php. Turning off compression means a little less work for the server and a fair bit more output. It's a tradeoff.
You could try putting in error_reporting(0); in yshout.php instead; that might fix the problem without having to disable compression.
Quote from: nneonneo on November 15, 2008, 01:04:36 PM
Turning off compression means a little less work for the server and a fair bit more output. It's a tradeoff.
I'm sorry but a little less work for the server and more output - isn't that two good things?
No, more output means using more bandwidth, and probably a little more time the server spends processing the output.
Fixed. You're a smart ***!
I disabled the gzip compression - if it eases server resources I'm happier I think. So it may just make it slower but better for the server if I'm correct.
Thanks again.
EDIT: error_reporting(0); does not seem to stop the error popping up. Just thought I'd throw that in :)
Quote from: Threepwud on November 15, 2008, 11:44:54 AM
Quote from: Shadow03 on November 15, 2008, 11:35:06 AM
Only I (the head admin) can see the shoutbox on my forum... Nobody else can. I manually installed it to my SMF 2 Beta 4 forum. I'm using the AdvSB_1.21.
Can anyone resolve this issue?
Sounds very much like a simple permissions problem. Select the group you want in permissions and scroll down - there are different types of permissions to choose from (like general forum permissions etc). For me, one was blank and that was for the Shoutbox. I had to enable it there before it was accessible by other users.
And where exactly can I find this permission? I checked everything and I don't see it. Could you give me some direct instructions, or another suggestion?
ADMIN --> MEMBERS --> PERMISSIONS --> GENERAL PERMISSIONS -->
Under REGULAR MEMBERS select MODIFY
You'll get lists of things you can select and these are grouped (ie, Carry out administrative duties and Use basic forum functionality). One of these is, for me anyway, is left blank. Open up this group and choose VIEW SHOUTBOX and POST IN SHOUTBOX.
Hope that is what you are after.
Thanks! I did it. :)
I tried error_reporting(0) and doesn't work :'( any help? :D
How do I decrease the amount of shouts shown on the shoutbox before they move to the history? There are like 20 shouts shown and none of them are disappearing...
@DeviDarkL: What's the problem you are trying to solve?
@Shadow03: $maxLines in yshout/settings.php
I got some errors that pop up like:
Quote
Notice: Undefined index: forum in /home/chromeso/public_html/smf/Sources/Subs.php on line 4013
Notice: Undefined index: PortaMx in /home/chromeso/public_html/smf/Sources/Subs.php on line 4015
Notice: Undefined index: pmx_settings in /home/chromeso/public_html/smf/Sources/Subs.php on line 4043
Notice: Undefined index: pmx_blocks in /home/chromeso/public_html/smf/Sources/Subs.php on line 4048
Notice: Undefined index: PortaMx in /home/chromeso/public_html/smf/Sources/Subs.php on line 4289
I tried to add error_reporting(0) in yshout.php but the errors don't disappear, could you help me? :)
Try adding
//-> start add PortaMx
require_once($sourcedir . '/PortaMx/PortaMx.php');
//-> end add PortaMx
after
require_once($sourcedir . '/Security.php');
in SSI.php.
Didn't work either, the errors continue to pop up :'(
Quote from: nneonneo on November 15, 2008, 11:54:05 AM
@bfeo: Normally, under the chatbox refresh style ($updateTimeout >= 5, refreshTime <= 1000) the shoutbox will open one connection per host and hold that connection open for at most $updateTimeout seconds. The client will refresh the shoutbox after the connection closes, after a delay of refreshTime milliseconds.
For an autorefreshing shoutbox style ($updateTimeout = 0, refreshTime >= 5000) the PHP script will immediately read the chats file and close the connection, and the client will refresh the shoutbox every refreshTime milliseconds.
The difference is, in the latter style, no connections are held open. They are closed as soon as the chats file is done transmission. Hence, the number of connections should be much fewer.
What about the check for duplicate instances? What effect does that have?
@DeviDarkL: Sorry, I can't help you then. I know next-to-nothing about PortaMx.
@bfeo: checkDuplicates ensures that each user can open at most one shoutbox (per browser -- so it is possible to have two shoutboxes open, but they would have to be in different browsers, e.g. IE and Firefox). It's not perfect, but as long as your users aren't intentionally trying to cause trouble, they will only have one shoutbox open. This reduces the number of connections to the number of users online.
First off, thank you nneonneo for making a great mod for SMF. Our gaming clan uses it very often :D
Well, I was wondering, is it possible to share the space where the shoutbox resides? For instance, put something like text, images, links, to the right of the shout box (within the shoutbox table(?) but not in the text area) when it's width is say 50%?
Here's a clickable thumbnail image so you can see:
(http://img.skitch.com/20081117-fxjbsk88ystj381mti7xsd33iw.preview.jpg) (http://skitch.com/bizzyb0t/5373/odc-old-dude-clan-forums-index)
Click for full size (http://skitch.com/bizzyb0t/5373/odc-old-dude-clan-forums-index)
Thanks again for all your work on this mod and for continually helping to support it and answer questions!
I think the way to do this would be to use a table.
<table width="100%"><tr><td width="50%">
SHOUTBOX GOES HERE
</td><td>
OTHER CONTENT HERE
</td><tr></table>
In other words, in index.template.php, change
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
into
<td class="windowbg" width="50%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
<td class="windowbg" valign="top">
OTHER CONTENT
</td>
If you do this, you'll probably want to drop the width: 50% declaration to prevent the shoutbox from becoming 25% wide.
Thank you SO much! I was wracking my brain trying to do it!! :)
I'll post up a screenshot once it gets done!! 8)
EDIT:
Here's the screenshot...
(http://img.skitch.com/20081117-xx6ks7tj7rpmr3i58bybccftqx.preview.jpg) (http://skitch.com/bizzyb0t/5412/odc-old-dude-clan-forums-index)
Click for full size (http://skitch.com/bizzyb0t/5412/odc-old-dude-clan-forums-index)
Thanks for your help, that worked wonderfully. In this screenshot, the shoutbox text is extended to the second line and it extends to a certain spot and continues on the second line. When it doesn't do that (when the shout text is short and sweet), the shoutbox width is smaller and there's blank space to the right of the news image. Is there any way to make the shoutbox take up all the room (and stay the width it is now), and push the image (assuming the image will be the same size) all the way to the right, like in my screenshot even if the shout is short? If this can be done in a way where the width of the shoutbox textarea is dynamic to the width of the image with the image being right justified, that'd be really, really awesome but static is okay too.
I greatly appreciate all your help!! I totally don't know what I'm doing but I follow instructions well and I am a professional copy-paste-er :P
I did try to search this topic about shout counter. Is there a way to count users shouts in a shoutbox? And that count to be seen in profile like the message count?
does it work on smf2.0b4?????? i need it
Quote from: nneonneo on November 14, 2008, 03:40:44 PM
@HR, Steephh: No limit, no reset. You will have to clear it manually.
@bfeo: The guide also reduces the number of simultaneous connections.
Uhmm.... This was just a reply to your question if my history was empty.
http://www.simplemachines.org/community/index.php?topic=137508.msg1794603#msg1794603
Thx anyways :)
Hey there! I love this mod. It works great. I would however, like some advice: I am looking to edit the script a little and I would assume it may take some JS and Ajax. Here's what I'm looking for:
Every time someone posts a new thread or posts a reply to a thread, I would like it to be announced in the shoutbox. It could look like this:
[Today at 02:58:30pm] Bob has posted the topic Hey What's Up?
[Today at 03:02:02pm] Jim has replied to the topic Hey What's Up?
I would like the topic name to be a link to the specific post.
I know what I described above is probably fairly advanced, but the next thing I'm looking for isn't --
I can't quite seem to find the script to add <strong> tags around to make the names of the poster bold. Can you give me a file name and line number to do that?
Like this:
[Today at 03:02:02pm] Jim: Hey guys, how's it going today?
EDIT: Also, how would I go about adding an "emote" system. Similar to "/me" could I add in something like "/wave" and have it return a "*Bob waves to everyone!"
Quote from: funcouldron on November 17, 2008, 01:24:44 PM
does it work on smf2.0b4?????? i need it
DOes it .. i tried doing it o mine and had to manualy edit the index.display.php file.
Anyways running itno this error FATtal error: Function name must be a string in /home/xxx/public_html/forums/Sources/Load.php on line 153
? and administrator button is disabled.
File error (writeLine); aborted
this happens when you post a Shout
@bizzyb0t: Try adding width:100% to the CSS for #yshout...
@nwobhm: I think it is doable with a custom profile line, but that's only for 2.0, and it is probably much more difficult than I initially thought it would be, since there's really no API for editing the fields AFAIK.
@funcouldrun: Yes, but it requires manual installation, plus a little change detailed on the mod main page.
@natefish: Earlier in this thread (only ~10 pages back) a little guide to doing this (for new topics only -- it shouldn't be hard to copy the code to the bottom of sendNotifications (in Subs-Post.php))
EDIT: See my reply to Gaugenstien: http://www.simplemachines.org/community/index.php?topic=137508.msg1787050#msg1787050
@pooya: That shouldn't happen. I am not sure what the error is trying to say. What does line 153 of Load.php say?
@Nfanthr33: chmod the yshout/chats folder and all its contents to 755, 777 or 666.
how to do it?
Quote from: nneonneo on November 17, 2008, 08:47:31 PM
@natefish: Earlier in this thread (only ~10 pages back) a little guide to doing this (for new topics only -- it shouldn't be hard to copy the code to the bottom of sendNotifications (in Subs-Post.php))
EDIT: See my reply to Gaugenstien: http://www.simplemachines.org/community/index.php?topic=137508.msg1787050#msg1787050
Thanks! That worked great. :)
One thing I'm wondering now -- How do I control the number of posts it will display before it starts removing them? Right now it looks like somewhere between 12 and 15 posts it starts removing the bottom one. I have put this in a box with a scroll bar, and would like to bump that up to about 20-30 posts before it does that. Is this possible?
Fatal error: Function name must be a string in /home/warcraft/public_html/forums/Sources/Load.php on line 153
Line 153 : $request = $smcFunc['db_query']('', '
Help, code below.
Quote// Try to load it from the cache first; it'll never get cached if the setting is off.
if (($modSettings = cache_get_data('modSettings', 90)) == null)
{
$request = $smcFunc['db_query']('', '
SELECT variable, value
FROM {db_prefix}settings',
array(
)
);
$modSettings = array();
if (!$request)
db_fatal_error();
while ($row = $smcFunc['db_fetch_row']($request))
$modSettings[$row[0]] = $row[1];
$smcFunc['db_free_result']($request);
@funcouldron: Use the instructions for manual installation of a mod.
@natefish: $maxLines in yshout/settings.php
@pooya: That's not in my code...are you on SMF 2 or SMF 1?
2 Beta 4
Try putting "global $smcFunc;" above the first quoted line. I have no idea if this will work, though, since *it is not my code*.
(also, if I might ask, what does this have to do with the shoutbox?)
Ive put this all in one go in index.template.php
[/quote]<?
// 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 {
color: #666666;
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
// 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
?>[/quote]
Now the thing happening is i see the shoutbox appear but then under 2 seconds i get this same fatal error on the same line.
**To many functions of global $smsFunc; is present in load.php ... lol which one to alter ?
You quoted a bunch of lines. Add "global $smcFunc;" before the first quoted line.
Im trying to install ASB 1.21 on 1.1.7 and get the following error, ive had it installed before but recently upgraded to 1.1.7 from 1.1.5 and now cant install
1. Execute Modification ./index.php Test successful
2. Execute Modification ./Themes/default/index.template.php Test failed
3. Execute Modification ./Themes/default/index.template.php Test successful
i had a look at the manual instructions which said to look in /Themes/default/index.template.php & find;
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
but i cant find that on my /Themes/default/index.template.php as i believe that relates to 1 of the login/register functions when viewing the forum as a guest but i have that removed on my forum
I have this on my template
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
echo '
</div>';
Rather than this
// 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'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</div>';
ive attatched my /Themes/default/index.template.php without ASB 1.21 installed on it, if you could have a look at it and add the necessary edits id be grateful
Quote from: nneonneo on November 19, 2008, 10:01:55 AM
You quoted a bunch of lines. Add "global $smcFunc;" before the first quoted line.
Sorry cant make sense :( would my load.php file help ?
I have been trying my hardest to get this to work, but I just can't. Firstly, I was getting template issues with the load after page, then I tried the onload, fatal error because the folder wasn't in the right spot.
Well now it just says "Shout Box". It doesn't display the shout box, nor anything other than the text. The folder is in the right spot, and I'm using the one that loads with the page (1.17).
If anyone has any ideas or such. I have been searching this thread, but 222 pages to go through is quite difficult :P.
Thanks in advance.
To avoid advertisement thoughts, or such, if you ask, I'll send you a pm with the link.
@bullbreedluverz: One place to try is to put the code
echo '<div id="mainframe">
<div class="tborder"><div id="user_section" class="bordercolor"><div class="windowbg2 clearfix">';
// 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
echo '</div></div></div></div>';
above
echo '
<div id="logobox"></div>
@pooya: Well, like I said, I don't think this has anything to do with my shoutbox...
@Deacon Frost: Send me a PM. I'll take a look.
What is the key to make this work on Beta 4?
do you guys know if it's possible to make it ONLY show up on one page (topic discussion area) instead of the whole forum?
How to place this shout box into a separate window or more like into a pop-up window? I did use search and got few hints, but I'm not sure if they were about the same thing ::)
I did understand that yshout code from index.template file should be placed into a seperate html file? Does this need to be done with all themes? and where this html file should be placed?
thanx for the help nneonneo but it didnt work, think ive butchered my index.template too much
@waremock: At this time, it comes down to a manual installation. I will post a new version when 2.0 goes final.
@Krandall: Yes. You just have to wrap the shoutbox in
global $topic;
if(isset($topic) && $topic) {
SHOUTBOX CODE
}
@nwobhm: You can just remove the shoutbox from index.template.php, and use the standalone /yshout/ shoutbox at http://<domain>/<path/to/forum>/yshout/index.php.
@bullbreedluverz: Hmm; it worked for me when I used your index.template.php. Can you tell me what happened when you tried it?
heres a link to test site using your code http://bullbreedluverz.com/smftest/index.php
What is wrong with it? I can see it fine...
Quote from: nneonneo on November 22, 2008, 12:03:06 PM
@Krandall: Yes. You just have to wrap the shoutbox in
global $topic;
if(isset($topic) && $topic) {
SHOUTBOX CODE
}
I tried it. It "sort of" works. It allows me to post to the shout box when I'm in the topic of my choice. But it still shows on all of the pages of the forum. Thoughts?
That shouldn't happen. This is what I've got, and it hides the shoutbox on all non-topic pages:
global $topic;
if(isset($topic) && $topic) {
// 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
}
Hmm,
this is all modified in the theme's index.template.php correct?
This is what mine looks like:
Note: I changed it a bit so it should only show on board 1. pretty sure I did that correctly.
// YSHOUT HERE - <head> code
global $board;
if(isset($board) && $board==1) {
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 {
color: #666666;
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
Quote from: nneonneo on November 22, 2008, 02:42:34 PM
What is wrong with it? I can see it fine...
on fire fox theres 2 shout input boxes, 1 being below the shoutbox in my banner itself in a bordered rectangle
on IE the boarder from the boarder from the shoutbox is floating below the shoutbox and onto my banner
and both just push my banner down the screen when you send shouts which dont look right
dont know what you was looking at but im seeing something that ent fine compared to the header of my site without the shoutbox on lmao http://bullbreedluverz.com/smftest/index.php
but dont worry bout it, thanx for trying to sort it
@Krandall: Oh, you should do that to the shoutbox code, not the head code. The head code should be untouched.
@bullbreedluverz: I don't know what is wrong, sorry :-\
dont worry mate, its my fault for butchering parts of the index.template - like most of the whole header section of the theme lol
AWESOME!!!! I GOT IT!!!!!
Thank you SOOOOOOO much! :D :D :D :D :D :D
do you have a Paypal? I'd like to send some $$$ for your time.
Quote from: waremock on November 21, 2008, 07:28:23 PM
What is the key to make this work on Beta 4?
I let it do the install even though it said it would fail, then deleted the js and chat
files in yshout folder, then manually uploaded the js and chat
folders from the downloaded zip. Applied the fix to yshout.js, then used the the index.template.php file I got from nneonneo. Worked like a charm. This worked for AdvSB_1.21 on a fresh new install and on my old upgraged 3.x install.
I converted my nuke members table to smf, using the smf_1-1-7phpnuke_converter
everything went fine.
except my shoutbox after the page is loaded, changes to "you must be logged in to use the shoutbox". It is like it counts the logged users as guests, EVEN admin too.
I tried giving all shoutbox permissions to the guest. and it check permissions table, and it was added there. and works for the guests.
I removed guests permissions and give permission to regular members, again it was added to permission table, but at this point it counts myself and my logged users as guests.
when page is loading it shows the shout ready, but at the moment page is done loading it locks shoutbox and says ,, sorry only ... however I can not use the shoutbox at the time page is loading too. pressin gshout just don't do anything.
I tried making gzipcompression to false, but being true or false there , makes no difference either.
Any Idea?
Hey there,
I'm using your ShoutBox since several weeks and it worked just perfect. Since today I was getting a lot of Server Errors (500). After hours of work, I disabled the ShoutBox and now my SMF seems to work fine again.
The interesting fact is, that nothing has changed over the weekend. I cant localize the problem that causes the error. First I thought the History might be to big (3,5mb), but replacing it with an empty txt-File changed nothing.
I also tried to change several permissions - nothing helped. How should the permissions be set? And are there any other files than the ones in the yshout-Folder, that should be CHMOD-ed?!
We've been really happy with our ShoutBox, so please help us to get it work again :)
Ahh crap, neon now i know why the shoutbox wasent working cause im runining beta 4 :( snif
Hiii nneonneo :)
I have SMF 1.1.7 & TP 0.98
mod SB_1.21
My error - loading shoutbox...
In center block I have :
// 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>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
// YSHOUT END
Any idee?
Thanks :)
Hey neon i figured it out.
global $boardurl,$shoutFile;
This part is messing up and calling that fatal error in load.php.
I got every other code of yours running in index.template.php but this messes it up...
So shoutbox apears and all but due to this code not being there it dosent work.
@pooya: Which of those lines is line 153? Also, it works fine with beta 4, but needs proper manual installation, that's all.
@Dordt: Did you put the <head> code in index.template.php?
@asmith: Can you try to clear all the forum cookies and log in again? You might also try emptying the smf_sessions table to force the session data to be reset. I suspect that this has to do with cookies, in any event.
@DarkRage64: Check the server error log (not the forum error log). There's likely to be an entry in there about the shoutbox.
Ohh i didnt do manual install, did package, just the index.template.php was done manual, anyways. here you go
Line 153 $request = $smcFunc['db_query']('', '
// Try to load it from the cache first; it'll never get cached if the setting is off.
if (($modSettings = cache_get_data('modSettings', 90)) == null)
{
$request = $smcFunc['db_query']('', '
SELECT variable, value
FROM {db_prefix}settings',
array(
)
);
$modSettings = array();
if (!$request)
db_fatal_error();
while ($row = $smcFunc['db_fetch_row']($request))
$modSettings[$row[0]] = $row[1];
$smcFunc['db_free_result']($request);
Okay brushed through the manual as well, all is fine..
global $boardurl,$shoutFile; ... causing problems.
No other way to call for the shoutfile ? :(
The command and help buttons also does nothing.
Okay $boardurl when added causes the error :( if it keep global $shoutfile; no erros.
What?! That line isn't even really doing anything at all! How can it cause problems?
I'm confused...
I deleted all rows (make the smf_sessions empty). and cleared any cookie or cache my browser had.
then I logged in with a user, still the same, nothing changed. :(
Any Idea?
Nope :-\
Maybe I could take a look. PM me an address and an account and I will see what is up.
Yes nneonneo I have head code in index.template.php
// 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 {
color: #666666;
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
Woahhh i got this now :
Fatal error: Call to undefined function allowedto() in /home/xxx/public_html/forums/yshout/yshout.php on line 69
@pooya: Well, I have seen this error come up before, but I have no idea how to fix it. Check SSI.php; it should be including Security.php. Check Security.php and make sure it is a correct version.
@Dordt: OK. Can you visit forum/index.php?yshout and see if it says "Nothing to do"? If it says anything else, then that is a problem. If it looks right, can you try turning off gzipCompression in yshout/settings.php?
forum/index.php?yshout say "Nothing to do"
what is gzipCompression :)
my ssi.php says * Software Version: SMF 1.1.5
but my secuirty.php says *Software Version: SMF 2.0 Beta 4
Soooo ?
Replaced ssi.php but error is still the same :(
@Dordt: yshout/settings.php. It is a setting that controls output compression.
If you give me a forum URL, I can probably tell you more.
@pooya: Try this: add to yshout.php before
// Set up some useful globals
the line
require_once($sourcedir . '/Security.php');
Funny i got this.
Warning: require_once(/Security.php) [function.require-once]: failed to open stream: No such file or directory in /home/xxx/public_html/forums/yshout/yshout.php on line 48
Fatal error: require_once() [function.require]: Failed opening required '/Security.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxx/public_html/forums/yshout/yshout.php on line 48
Put "global $sourcedir" above that and see what happens.
I have this error in default theme :
Fatal error: Cannot redeclare ssi_shutdown() (previously declared in /mounted-storage/home65b/sub009/sc41673-EFEQ/www/smf/SSI.php:193) in /mounted-storage/home65b/sub009/sc41673-EFEQ/www/smf/SSI.php on line 195
My guess is that you've included yshout.php twice or something like that in index.template.php.
If you can't figure it out, post index.template.php.
global $sourcedir;
require_once($sourcedir . '/Security.php');
Same error.
Hey neo
I have installed version SB_1.21 on SMF 2.0 beta 4. It seems to have installed correctly on my custom theme. But when I input any text nothing displays. When i run www.dcpryzom.co.uk/forum/yshout/index.php it just shows
"Shoutbox
loading..."
I have set full read write permissions on all the files. Any ideas why the shoutbox isn't loading?
you can view the shoutbox on my forum at www.dcpryzom.co.uk username: teresa, password: paperplanes
thanks in advance
P.S
Am i supposed to put in my database details somewhere?
http://www.warcraftpk.com/forums/yshout/ :(
I cant even load http://www.warcraftpk.com/forums/yshout/index.php thanks to my powerfull .htaccess **Shucks.
Quote from: W. Riker on April 27, 2008, 03:52:28 PM
I fixed this problem with loading shoutbox. ;)
How? :)
Heya I managed to find the fix for the issue i had:
In yshout/js/yshout.js, change
Code: [Select]
function complex_escape(text) {
return escape(textToEntities(text.replace(/&#/g, "&#"))).replace(/\+/g, "%2B");
}to
Code: [Select]
function complex_escape(text) {
return text.replace(/&#/g, "&#").php_to8bit().php_urlencode();
}
This will ONLY work in beta 4.
@Final60: So...it is all solved then?
@pooya: I still don't know what's wrong. Can you post index.php (forums/index.php)?
Yeah i got it working.
Another thing i'd like though is to remove the timestamp altogether!?
and im sure i read someone in this thread how to add smilies to the basic version (not advance which i find to resource hungry) can you point me in the right direction again?
thanks in advance
and a greta mod you have here!:)
Okay a couple (hopefully simple) questions:
About 2 years ago, I installed this excellent mod, then updated it once manually. Most recently, I was running SMF 1.1.4, and upgraded via the package manager to 1.1.5 -> 1.1.6 -> 1.1.7 . I no wwant to upgrade from v. 1.11 of the shoutbox to 1.21 and saw that I must uninstall the 1.1X version to install the 1.21 . However the package will not uninstall as it errors out and says there's no uninstall info.
As I said, I installed this mod a while back and now have completely forgotten what I did to get it going....
Great sadness.
So,
- What all do I need to remove in order to make this work?
- Will the new package then install clean (assuming no other mod-related conflicts) using package add or am I best off doing it manually?
I am running SMF 1.1.7 and a metric butt-ton of other mods, but only the default theme.
Quote
1. Member Notepad 1.0 [ Uninstall ]
2. Avatar on Member List 1.0 [ Uninstall ]
3. Mark Selected Topics As Read 1.0 [ Uninstall ]
4. audiblepm 1.5 1.5 [ Uninstall ]
5. Sticky First Post (extends sticky topic) 1.3.2 [ Uninstall ]
6. User Control Panel By Alan S 1.1 [ Uninstall ]
7. Admin Notepad 1.0 [ Uninstall ]
8. Contact Page 1.0 [ Uninstall ]
9. MessagePreviewOnHover 1.5 [ Uninstall ]
10. User Email System 1.1.3 [ Uninstall ]
11. Tagging System 1.0.3 [ Uninstall ]
12. Topics Started by a user v 0.1.3 bugfixed - By Yio - bugfixed by Jack van Dijk 0.1.3 [ Uninstall ]
13. Image Align Tag 0.3 [ Uninstall ]
14. BBCode Bar For Signature 1.3 [ Uninstall ]
15. Trim Url 1.0.2 [ Uninstall ]
16. URL Popup 1.0 [ Uninstall ]
17. Wrap Text Around Image 1.0 [ Uninstall ]
18. YouTube BBC Tag (XHTML Compliant) 1.0 [ Uninstall ]
19. PM On Registration 1.0.2 [ Uninstall ]
20. nneonneo's AJAX ShoutBox 1.11 [ Uninstall ]
21. Search Topic 1.01 [ Uninstall ]
22. Reason For Editing Mod 1.14 [ Uninstall ]
23. PhpInfo 1.1 [ Uninstall ]
24. New Topic Button 1.0 [ Uninstall ]
25. Report Icon Mod 1.0 [ Uninstall ]
26. Order News 1.0.1 [ Uninstall ]
27. Welcome Topic Mod 1.0 [ Uninstall ]
28. Users Online Today Mod 1.4.0 [ Uninstall ]
29. Select Admin for Notifications 1.1 [ Uninstall ]
30. Spoiler Tag 0.3.2 [ Uninstall ]
31. SMF 1.0.11 / 1.1.3 Update 1.1 [ Uninstall ]
32. Topic description 1.1 [ Uninstall ]
33. Enhanced Forum Statistics 1.0 [ Uninstall ]
34. Updated Registration Agreement 1.0 [ Uninstall ]
35. EmailFlash 2.0 [ Uninstall ]
36. Popup PM Message - Uses The Same Window 1.1 [ Uninstall ]
37. SMF 1.0.12 / 1.1.4 / 2.0 b1.1 Update 1.0 [ Uninstall ]
38. Admin Lock Thread 1.2 [ Uninstall ]
39. Add Domaintools to TrackIP 1.0 [ Uninstall ]
40. Enhanced Calendar 1.1 [ Uninstall ]
41. Auto Email Inactive Ordinary Users 1.2 [ Uninstall ]
42. SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update 1.0 [ Uninstall ]
43. SMF 1.0.14 / 1.1.6 Update 1.0 [ Uninstall ]
44. SMF 1.0.15 / 1.1.7 Update 1.0 [ Uninstall ]
45. Drafts (for 1.1.x) 1.08 [ Uninstall ]
Attached index.php hope you find something :(
@Final60: Edit preg_timeformat in yshout/settings.php or yshout.php and change "return '...'" to "return '';", i.e.
function preg_timeformat($matches)
{
return '';
}
This works better in v. 1.21...
@PipeRain: Well, you have another option: you can force the Package Manager to uninstall the shoutbox for you.
The procedure is as follows: download the 1.11 package to your computer and unzip it. Open up package-info.xml, and change
<uninstall for="1.1.0-1.1.4">
to
<uninstall for="1.1.0-1.1.9">
Zip everything back up into a package (with package-info.xml and other files at the top level) and upload that changed package to the server. You should then be able to simply uninstall it without any issues.
Or, you could opt to manually reverse the instructions in install.xml to uninstall the mod (you can consult the main mod page for the 1.11 manual install instructions)
1.21 *should* install cleanly provided the modifications to index.template.php and elsewhere are not too severe. Again, manual instructions can be had from the main mod page.
@pooya: It looks normal. I am totally stumped, sorry. I think you are the third person with this problem, but in all three cases I have not been able to find the cause. Very sorry :(
This is my code, nneonneo's AJAX ShoutBox 1.21:
// 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>';
echo '</div><div class="smalltext" style="padding-left:25px;"></a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="check_smileys">'; printSmileys('shout_form','shout_text');
echo '
</div>
</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
but after update to the SMF 1.1.7, the Smileys have not sent over the code for the shoutbox.
Please let me help's
Nando1965
Quote from: nneonneo on November 25, 2008, 02:19:26 AM
@PipeRain: Well, you have another option: you can force the Package Manager to uninstall the shoutbox for you.
The procedure is as follows: download the 1.11 package to your computer and unzip it. Open up package-info.xml, and change
<uninstall for="1.1.0-1.1.4">
to
<uninstall for="1.1.0-1.1.9">
Zip everything back up into a package (with package-info.xml and other files at the top level) and upload that changed package to the server. You should then be able to simply uninstall it without any issues.
Or, you could opt to manually reverse the instructions in install.xml to uninstall the mod (you can consult the main mod page for the 1.11 manual install instructions)
1.21 *should* install cleanly provided the modifications to index.template.php and elsewhere are not too severe. Again, manual instructions can be had from the main mod page.
Thanks!
I'll give it a whirl in the morning when I'm not so bleary-eyed...
I have a problem...
Hi dude,
I did a clean install of SMF 1.1.7 on a new server and I am using simpleportal and I have managed to install the shoutbox but for some reason it says "Sorry, you must be logged in to use the shoutbox!" and I am the admin?
I have changed perms on the chat txt files and looked into perms for admin (says all perms/no edit required), reg members also have perms to view/use it and I also set up a test account but it still won't work?
Does anyone have any ideas regarding this?
Please help... Cheers!
For the most part I have this mod working the way I want it to. It is awesome, and very easy to edit. :)
I found the change (several pages back) about being able to have it update when someone posts a new topic. I have a few questions about this feature:
1. Is it possible to make it link to the topic and display the forum that it was posted in?
Right now it just says "Bob: NEW TOPIC POSTED! -- <Name of topic here>."
I'd like it to appear as "Bob: NEW TOPIC POSTED in <Forum Name Here>! -- <Link to Topic Here>."
2. Is it possible to have it update with replies to topics? Like this:
"Bob: REPLIED to the topic <Link to reply here>."
And finally....
3. Is it possible to have this not work in hidden forums? We have moderator-only forums and I don't want it to show the new topics (or replies) that are posted in that forum.
error in shoutbox
Notice: Undefined variable: smcFunc in /mounted-storage/home65b/sub009/sc41673-EFEQ/www/smf/yshout/yshout.php on line 203
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home65b/sub009/sc41673-EFEQ/www/smf/Sources/Subs.php on line 321
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home65b/sub009/sc41673-EFEQ/www/smf/Sources/Errors.php on line 123
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /mounted-storage/home65b/sub009/sc41673-EFEQ/www/smf/Sources/Errors.php on line 124
Quote from: nneonneo on November 23, 2008, 03:05:21 PM
@DarkRage64: Check the server error log (not the forum error log). There's likely to be an entry in there about the shoutbox.
I asked my hostingcompany about the error log of the server, but they told me, that they cant find anything there.
They ask if your script runs any other processes (like sendmail, exec())...?!
OK. My friend owns the server we are running the site on, so we have a somewhat unique view of things.
It seems as though the shoutbox is generating 1000's of HTTP requests and at the same time, it has created nearly 200MB of an access log in just under 1 week.
It caused the entire server (which hosts ~30 websites) to crash entirely just about 1 hour ago.
EDIT: We fixed it. Seems as though the 500ms refresh setting (default) was too fast for our site's traffic. Upped it to 1.5s and things seem to be better. We'll see where it goes in about a week.
Couldn't it be an idea to divide this thread? I dont know compatibility between versions, but lets say one thread for 1.1.1-1.1.x, 1.1.6(5)-1.1.7, and one for 2.0.4? There are 4500 posts in one thread, and I for one am struggling to find what Q&A refers to what version? have only fiddled a little with 1.1.6/7 and now 2.0.4, already there i'm lost...or maybe someone could extract a 10 post FAQ for the major or most recent or different versions(of wich 2.0.4 i think is one?) ?
Just a humble idea from one who really tried using the search funtion, but failed....
@nando1965: SMF 1.17 should not have changed anything if you installed it by patch. This is probably something best dealt with if I just visit your forum to see the problem firsthand.
@natefish: All three are possible, with extra code. The link to the topic is
$scripturl . '?topic=' . $topic . '.new#new'
The forum name, though, is a little more difficult. The problem is mainly due to the fact that the notify function only knows the board *number* but not the board *name*. Another query would likely be needed to do that, for example
$res = db_query("
SELECT
b.name
FROM ({$db_prefix}boards AS b)
WHERE b.ID_BOARD = $board", __FILE__, __LINE__);
$row = mysql_fetch_assoc($res);
if($row) $boardName = $row['name'];
at which point $boardName contains the name of the board.
To prevent this from showing up for certain boards, wrap the whole thing in
if(!in_array($board,array(HIDDEN BOARD IDS))) {
CODE
}
where HIDDEN BOARD IDS is a comma-separated list of board IDs to hide.
All together:
if(!in_array($board,array(HIDDEN BOARD IDS))) {
$res = db_query("SELECT b.name FROM ({$db_prefix}boards AS b) WHERE b.ID_BOARD = $board", __FILE__, __LINE__);
$row = mysql_fetch_assoc($res);
if($row) $boardName = $row['name'];
ob_start();
global $context;
include_once('yshout/yshout.php');
makeShout('New Topic in board [url='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/url]: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.$_POST['subject'].'[/url]');
ob_end_clean();
}
For reply notification, add
if($type=='reply') {
ob_start();
global $context;
include_once('yshout/yshout.php');
makeShout('New reply: [url='.$scripturl . '?topic=' . $ID_TOPIC . '.new;topicseen#new'.']'.$subject.'[/url]');
ob_end_clean();
}
after
if ($type == 'reply' && !empty($sent))
db_query("
UPDATE {$db_prefix}log_notify
SET sent = 1
WHERE ID_TOPIC = $ID_TOPIC
AND ID_MEMBER != $ID_MEMBER", __FILE__, __LINE__);
in Subs-Post.php.
This ONLY works in SMF 1.1.x!
@DarkRage64: No other processes are executed. The shoutbox only interacts with two files (chats/home.txt and chats/history.home.txt) and the SMF functions.
@Dordt: SMF 2.0?
@freudlund: I understand the problem. The main mod page has a number of topics and such, but it is definitely challenging to face such a large thread.
Unfortunately, I don't have the ability to split the thread. One thing that might be useful: the main mod page has links to each post where I announce a new version. That gives you a rough estimate of where to start (however, given that 1.21 is already a few months old, that's still a lot of posts to go through).
I have no problem with answering questions that have been asked before, so you may go ahead and just ask the question directly ^^
This is a how-to for making the shoutbox notify on new topics or posts (with thanks to Gaugenstien for the idea and natefish for suggesting improvements).
For shoutbox versions 1.21 or lower, make this change:
In yshout/yshout.php, find
session_write_close(); // so that future session requests succeed
$heartBeatSent=false;
if(!$forceRefresh)
{
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
}
@session_start(); // restart session, so updates to $_SESSION are applied
and replace by
$heartBeatSent=false;
if(!$forceRefresh)
{
session_write_close(); // so that future session requests succeed
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
@session_start(); // restart session, so updates to $_SESSION are applied
}
Edit Post.php.
For SMF 1.1.x, find
if ($newTopic)
notifyMembersBoard();
elseif (empty($_REQUEST['msg']))
sendNotifications($topic, 'reply');
and change it to
if ($newTopic) {
notifyMembersBoard();
// YSHOUT TOPIC NOTIFICATION
$res = db_query("
SELECT
b.name
FROM ({$db_prefix}boards AS b)
WHERE b.ID_BOARD = $board", __FILE__, __LINE__);
$row = mysql_fetch_assoc($res);
if($row) $boardName = $row['name'];
ob_start();
global $context,$scripturl,$topic;
include_once('yshout/yshout.php');
makeShout('New Topic in board [url='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/url]: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT TOPIC NOTIFICATION END
}
elseif (empty($_REQUEST['msg'])) {
sendNotifications($topic, 'reply');
// YSHOUT REPLY NOTIFICATION
ob_start();
global $context,$scripturl;
include_once('yshout/yshout.php');
makeShout('New reply: [url='.$scripturl . '?topic=' . $topic . '.new;topicseen#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT REPLY NOTIFICATION END
}
For SMF 2.0, change
if ($newTopic)
{
$notifyData = array(
'body' => $_POST['message'],
'subject' => $_POST['subject'],
'name' => $user_info['name'],
'poster' => $user_info['id'],
'msg' => $msgOptions['id'],
'board' => $board,
'topic' => $topic,
);
notifyMembersBoard($notifyData);
}
elseif (empty($_REQUEST['msg']))
{
// Only send it to everyone if the topic is approved, otherwise just to the topic starter if they want it.
if ($topic_info['approved'])
sendNotifications($topic, 'reply');
else
sendNotifications($topic, 'reply', array(), $topic_info['id_member_started']);
}
to
if ($newTopic)
{
$notifyData = array(
'body' => $_POST['message'],
'subject' => $_POST['subject'],
'name' => $user_info['name'],
'poster' => $user_info['id'],
'msg' => $msgOptions['id'],
'board' => $board,
'topic' => $topic,
);
notifyMembersBoard($notifyData);
// YSHOUT TOPIC NOTIFICATION
$res = $smcFunc['db_query']('','SELECT b.name
FROM ({db_prefix}boards AS b)
WHERE b.ID_BOARD = {int:board}', array('board' => $board));
$row = $smcFunc['db_fetch_assoc']($res);
if($row) $boardName = $row['name'];
ob_start();
global $context,$scripturl;
include_once('yshout/yshout.php');
makeShout('New Topic in board [url='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/url]: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT TOPIC NOTIFICATION END
}
elseif (empty($_REQUEST['msg']))
{
// Only send it to everyone if the topic is approved, otherwise just to the topic starter if they want it.
if ($topic_info['approved']) {
sendNotifications($topic, 'reply');
// YSHOUT REPLY NOTIFICATION
ob_start();
global $context,$scripturl;
include_once('yshout/yshout.php');
makeShout('New reply: [url='.$scripturl . '?topic=' . $topic . '.new;topicseen#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT REPLY NOTIFICATION END
}
else
sendNotifications($topic, 'reply', array(), $topic_info['id_member_started']);
}
You may omit either NOTIFICATION block.
To prevent notification for hidden boards, wrap both NOTIFICATION blocks in this code, substituting <BoardIDs> with a comma-separated list of hidden boards (e.g. 3,5,8)
if(!in_array($board, array(<BoardIDs>))) {
// YSHOUT -- NOTIFICATION
...
// YSHOUT -- NOTIFICATION END
}
To open links in the same window, use "[iurl=" instead of "[url=".
@nando1965: I think the name= fields have gone missing on the shoutbox. No worries, it is easy to fix. Just do step 5 on http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091.
how do i add a scroller bar in ADVance Shoutbox??
http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
Quote from: nneonneo on November 26, 2008, 06:09:01 PM
@nando1965: SMF 1.17 should not have changed anything if you installed it by patch. This is probably something best dealt with if I just visit your forum to see the problem firsthand.
@natefish: All three are possible, with extra code. The link to the topic is
$scripturl . '?topic=' . $topic . '.new#new'
The forum name, though, is a little more difficult. The problem is mainly due to the fact that the notify function only knows the board *number* but not the board *name*. Another query would likely be needed to do that, for example
$res = db_query("
SELECT
b.name
FROM ({$db_prefix}boards AS b)
WHERE b.ID_BOARD = $board", __FILE__, __LINE__);
$row = mysql_fetch_assoc($res);
if($row) $boardName = $row['name'];
at which point $boardName contains the name of the board.
To prevent this from showing up for certain boards, wrap the whole thing in
if(!in_array($board,array(HIDDEN BOARD IDS))) {
CODE
}
where HIDDEN BOARD IDS is a comma-separated list of board IDs to hide.
All together:
if(!in_array($board,array(HIDDEN BOARD IDS))) {
$res = db_query("SELECT b.name FROM ({$db_prefix}boards AS b) WHERE b.ID_BOARD = $board", __FILE__, __LINE__);
$row = mysql_fetch_assoc($res);
if($row) $boardName = $row['name'];
ob_start();
global $context;
include_once('yshout/yshout.php');
makeShout('New Topic in board [url='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/url]: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.$_POST['subject'].'[/url]');
ob_end_clean();
}
For reply notification, add
if($type=='reply') {
ob_start();
global $context;
include_once('yshout/yshout.php');
makeShout('New reply: [url='.$scripturl . '?topic=' . $ID_TOPIC . '.new;topicseen#new'.']'.$subject.'[/url]');
ob_end_clean();
}
after
if ($type == 'reply' && !empty($sent))
db_query("
UPDATE {$db_prefix}log_notify
SET sent = 1
WHERE ID_TOPIC = $ID_TOPIC
AND ID_MEMBER != $ID_MEMBER", __FILE__, __LINE__);
in Subs-Post.php.
This ONLY works in SMF 1.1.x!
@DarkRage64: No other processes are executed. The shoutbox only interacts with two files (chats/home.txt and chats/history.home.txt) and the SMF functions.
@Dordt: SMF 2.0?
@freudlund: I understand the problem. The main mod page has a number of topics and such, but it is definitely challenging to face such a large thread.
Unfortunately, I don't have the ability to split the thread. One thing that might be useful: the main mod page has links to each post where I announce a new version. That gives you a rough estimate of where to start (however, given that 1.21 is already a few months old, that's still a lot of posts to go through).
I have no problem with answering questions that have been asked before, so you may go ahead and just ask the question directly ^^
This is a great enhancement! I was just wondering could the same be applied to members signing in and out of the forum - so if you follow when a member signs in it would reflect this in the shoutbox - something like "member A has just signed in" and "member B has just signed out".
Is this possible?
While it is possible, it is unlikely that this will give you the results you probably want, since most people I know will just close the browser when done, rather than logging in/out. So, you would get very few notifications about status changes (only when people use a public computer or one they have not been on before will they have to login and logout).
[announce] SB_1.22 and AdvSB_1.22 released.
Major fixes for 1.22:
Compatibility with SMF 2.0 Beta 4
1.22 should upgrade over a 1.21 installation. If there are any problems in upgrading, try a manual install (use upgrade-from-1.21.xml as a reference).
Quote from: nneonneo on November 26, 2008, 07:08:13 PM
@nando1965: I think the name= fields have gone missing on the shoutbox. No worries, it is easy to fix. Just do step 5 on http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091.
The problem is resolved.
Thank's Nneonneo.
Nando1965
Hey Neo,
I have a problem with the topic notification - it redirects to a new page and not back to the forum topic?
I am running 1.1.7 and I have 'return to topic' switched on so would this affect it at all? When I click on the browser back button it takes me back to the reply wysiwyg screen and then when i click to the home page on portal the shout reflects a post has been made but it is this intermittent error...
Here is the URL i get (see pic 1): http://URL.co.uk/subfolder/index.php?action=post2;start=2;board=10
See pic 2 to see what i get after hitting back button then clicking home button.
Any ideas?
@Youngiiie:
In yshout/yshout.php, find
session_write_close(); // so that future session requests succeed
$heartBeatSent=false;
if(!$forceRefresh)
{
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
}
@session_start(); // restart session, so updates to $_SESSION are applied
and replace by
$heartBeatSent=false;
if(!$forceRefresh)
{
session_write_close(); // so that future session requests succeed
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
@session_start(); // restart session, so updates to $_SESSION are applied
}
Cheers bro - works great now!
I just installed this mod through the package manager without any error messages. I'm running 1.1.7. Why can't I see the shout box? Where's the settings? What am I missing here?
Thanks, and Happy Thanksgiving!
* edit - okay I found it, but does it have to be where the default places it? Meaning can I configure it as a separate board?
* edit - okay I think I figured that out too.
What I would really like to do is add this to a TP block. This would require an edit to the "index.template.php" file first, and then add the location code into a TP block. Right?
@fmofmpls:
QuoteWhat I would really like to do is add this to a TP block. This would require an edit to the "index.template.php" file first, and then add the location code into a TP block. Right?
Precisely :) The code to add to index.template.php is just the <head> code. For the default theme, the <head> code is already there, so you need only remove the shoutbox code from index.template.php.
How do I get the shoutbox to work with the Anecdota skin? I am using SMF 2 Beta 4, by the way.
EDIT: Nevermind, I found it.
QuoteBad Request
Your browser sent a request that this server could not understand.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I belive this bug has been sorted out in previous versions, but some members on my board seems to get that error notice in shout box.
Is it a browser bug or what? I have had this error once. :-\
This doesn't really bother but is bit annoying, refreshing web page usually helps.
Quote from: nneonneo on November 28, 2008, 12:35:32 AM
@fmofmpls:
QuoteWhat I would really like to do is add this to a TP block. This would require an edit to the "index.template.php" file first, and then add the location code into a TP block. Right?
Precisely :) The code to add to index.template.php is just the <head> code. For the default theme, the <head> code is already there, so you need only remove the shoutbox code from index.template.php.
Still confused. I'm only using the default color themes. The shout box has installed itself just fine, but I would prefer to have it as a TP left block only. What exact code should I place inside the block? I tried using both sets of location code provided and still nothing shows within the block. I would prefer not to have the shout box where it's at now (right above the news and menu buttons).
@fmofmpls: You need to remove the shoutbox from index.template.php before it will show up in the TP block, because only one shoutbox (the one higher up on the page, usually) can be loaded at a time.
@nwobhm: I am guessing it is a browser bug. What browser(s) cause this problem?
For the latest release for smf 2 - beta 4
Is there a way to control the number of visible shouts?
Is there a way to make the shout scroll?
1) $maxLines in yshout/settings.php
2) http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
Why would the shoutbox work in all browsers but Google's Chrome? I read where someone else was having the same problem, but never found a fix for it.
AdvSB1.21 on SMF 2.0 Beta 4
Works on FF3, IE7, IE8, Opera 9, and Safari
I went to your test site for SMF 2.0 and it worked on Chrome.
I have tried different member accounts but had the same results.
The shoutbox shows up in Chrome, and I can see other member's shouts, I just cannot shout myself. I enter the text and click on the SHOUT! button, but it only redirects me back to the homepage much like when you click on a link ending in an action no longer used. I also noticed the URL is then changed to something like
http://www.empireofthesun.net/?shout_text=test+shout+on+chrome#
where test shout on chrome was the shout entered.
Any suggestions to get the shoutbox working in Chrome?
I think you found a bug in Chrome (and I can reproduce the bug on Safari 4.0, too).
It might be argued that this isn't a bug, but then it means SMF's script.js needs to be changed.
Here's an HTML file:
<html><head><script>String.prototype.myfunc = function () { this.xyzzy=3; alert(this.xyzzy); }; ''.myfunc();</script></head></html>
On all the browsers that you listed, this alerts "3". On Chrome and my Safari (version 4.0 developer's preview), I get "undefined". php_to8bit() in SMF's script.js relies on this property setting mechanism to work properly, and when it fails to work, the function quits and the shoutbox form gets posted for real (instead of being posted as an AJAX request), resulting in the page reload and new URL.
Anyway, I will poke around and see what can be done. One thing that does work, though, is setting the forum to use UTF-8. If you do this, then the problem disappears.
EDIT: I can confirm now that the problem isn't with my shoutbox. If you go to http://www.empireofthesun.net/forum/index.php?action=register and enter a username, on Firefox, Opera, IE, you should get a little checkmark/warning symbol which replaces the question mark. On Chrome, that does not happen, because php_to8bit is broken. I think this might be more SMF's bug than Chrome/Safari's bug, since strings are apparently supposed to be immutable objects (I need to check though).
I guess I am happy to know it's not just my site. :P
Thank you for looking into this and pointing out a fix for it.
Quote from: nneonneo on November 28, 2008, 09:37:49 AM
@nwobhm: I am guessing it is a browser bug. What browser(s) cause this problem?
IE ver. 7 and the one time when I bumped into that error, I was using Firefox 2.xxxx , can't remember the excact version numer. But for one member that IE 7 does cause errors quite often.
Quote from: nneonneo on November 26, 2008, 06:28:53 PM
This is a how-to for making the shoutbox notify on new topics or posts (with thanks to Gaugenstien for the idea and natefish for suggesting improvements).
For shoutbox versions 1.21 or lower, make this change:
In yshout/yshout.php, find
session_write_close(); // so that future session requests succeed
$heartBeatSent=false;
if(!$forceRefresh)
{
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
}
@session_start(); // restart session, so updates to $_SESSION are applied
and replace by
$heartBeatSent=false;
if(!$forceRefresh)
{
session_write_close(); // so that future session requests succeed
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
@session_start(); // restart session, so updates to $_SESSION are applied
}
Edit Post.php.
For SMF 1.1.x, find
if ($newTopic)
notifyMembersBoard();
elseif (empty($_REQUEST['msg']))
sendNotifications($topic, 'reply');
and change it to
if ($newTopic) {
notifyMembersBoard();
// YSHOUT TOPIC NOTIFICATION
$res = db_query("
SELECT
b.name
FROM ({$db_prefix}boards AS b)
WHERE b.ID_BOARD = $board", __FILE__, __LINE__);
$row = mysql_fetch_assoc($res);
if($row) $boardName = $row['name'];
ob_start();
global $context;
include_once('yshout/yshout.php');
makeShout('New Topic in board [url='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/url]: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT TOPIC NOTIFICATION END
}
elseif (empty($_REQUEST['msg'])) {
sendNotifications($topic, 'reply');
// YSHOUT REPLY NOTIFICATION
ob_start();
global $context;
include_once('yshout/yshout.php');
makeShout('New reply: [url='.$scripturl . '?topic=' . $topic . '.new;topicseen#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT REPLY NOTIFICATION END
}
For SMF 2.0, change
if ($newTopic)
{
$notifyData = array(
'body' => $_POST['message'],
'subject' => $_POST['subject'],
'name' => $user_info['name'],
'poster' => $user_info['id'],
'msg' => $msgOptions['id'],
'board' => $board,
'topic' => $topic,
);
notifyMembersBoard($notifyData);
}
elseif (empty($_REQUEST['msg']))
{
// Only send it to everyone if the topic is approved, otherwise just to the topic starter if they want it.
if ($topic_info['approved'])
sendNotifications($topic, 'reply');
else
sendNotifications($topic, 'reply', array(), $topic_info['id_member_started']);
}
to
if ($newTopic)
{
$notifyData = array(
'body' => $_POST['message'],
'subject' => $_POST['subject'],
'name' => $user_info['name'],
'poster' => $user_info['id'],
'msg' => $msgOptions['id'],
'board' => $board,
'topic' => $topic,
);
notifyMembersBoard($notifyData);
// YSHOUT TOPIC NOTIFICATION
$res = $smcFunc['db_query']('','SELECT b.name
FROM ({db_prefix}boards AS b)
WHERE b.ID_BOARD = {int:board}', array('board' => $board));
$row = $smcFunc['db_fetch_assoc']($res);
if($row) $boardName = $row['name'];
ob_start();
global $context;
include_once('yshout/yshout.php');
makeShout('New Topic in board [url='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/url]: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT TOPIC NOTIFICATION END
}
elseif (empty($_REQUEST['msg']))
{
// Only send it to everyone if the topic is approved, otherwise just to the topic starter if they want it.
if ($topic_info['approved']) {
sendNotifications($topic, 'reply');
// YSHOUT REPLY NOTIFICATION
ob_start();
global $context;
include_once('yshout/yshout.php');
makeShout('New reply: [url='.$scripturl . '?topic=' . $topic . '.new;topicseen#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT REPLY NOTIFICATION END
}
else
sendNotifications($topic, 'reply', array(), $topic_info['id_member_started']);
}
You may omit either NOTIFICATION block.
To prevent notification for hidden boards, wrap both NOTIFICATION blocks in this code, substituting <BoardIDs> with a comma-separated list of hidden boards (e.g. 3,5,8)
if(!in_array($board, array(<BoardIDs>))) {
// YSHOUT -- NOTIFICATION
...
// YSHOUT -- NOTIFICATION END
}
Will be very useful could have this added by default in package and maybe the ability to enable /disable it ;)
great
When I try to install it I get The file you tried to save generated the following error:
Fatal error: Call to undefined function: allowedto() in index.template.php on line 422
I got the new version for SMF 2 beta 4 installed and working nicely.
Now for the question, which code can I alter to move the Shout from it's defualt position to a block of my choosing?
Much thanks in advance?
:)
Hi
I have a problem(how many posts started that way? :) )
I installed Shoutbox 1.21, updated to 1.22, and put the manual code in boardindex, to be above "Forum nexs", problem is, it got no box around it, just the text, input box and buttons, straight on the background.
How to make a box aound it, like the "Forum News", "General category" etc, preferably collapsible, as shown on demo site?
Also, the array of buttons for BBcodes, font options etc in post editor, is it a "standard package" defined somewhere, so I can put it in the shoutbox? Or do I put it "manually" somewhere, like yshout.php?
I'm using SMF2.0.4
@MrMagical: Hmm, I am not sure what the problem is...post the modified index.template.php please.
@swampy: Edit index.template.php and move the "shoutbox code" block (starts with "YSHOUT HERE - shoutbox code")
@freudlund: If you want the box, you can try the Advanced Shoutbox package, which includes that feature by default. Also, there's a way to add smileys, but as of yet no way to add a BBCode strip.
It's the advanced pack I installed, but probably messed it up somehow, are the code snippets on the frontpage of the mod not meant for advSB?
85.224.220.230:8081 (http://85.224.220.230:8081) shows how it looks at my site...
Well, once I logged out, and got the standard theme it showed a "box"...On your demo site for 2.0, is the SB in the news thingy, as described by ameo? Cuzz that's more like what i'd like, have a vague memory of something similar elsewhere....?
I've attached a jpeg of a small prob, the edit box being to wide for the space, is there any way to contain it?
http://www.simplemachines.org/community/index.php?topic=137508.msg1817042#msg1817042
That is totally awsome, I really wanted this ! Well, the only problem is i need to modify the colours so that it suites my forum. Can you help in that please...?
The changes to the replies and posts are awesome! I love it! I have one last suggestion and I need help accomplishing it.
To help with the log file and html requests coming from the AJAX portion of the shoutbox I had an idea. How about a timeout type deal?
When someone hasn't posted to the shoutbox for 60s (or any set amount of time), I would like it to "turn off" and just show text that says something like "The shoutbox is in inactive mode. To leave this mode, click on the refresh button if visible, otherwise press the F5 key to reload you browser's page." Then this would keep the shoutbox disabled for that person until they refreshed the page, or went to another page.
That way if someone leaves the page open, but isn't necessarily using the shoutbox it turns it off and will stop sending html requests to that particular user.
Also, on the links for posts and replies, it opens them in another window. Is there a way to keep them in the same window?
help me..
i got problem yesterday..
the SB working fine yesterday..
6 hour later i get this error
Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/home/motoxtre/tmp) is not within the allowed path(s): (/home/lenzacor:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/lenzacor/public_html/forum/yshout/yshout.php on line 42
Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in /home/lenzacor/public_html/forum/yshout/yshout.php on line 42
Installed the AJAX SB yesterday (1.1.7) - works perfectly
My users LOVE it!
Thanks!
[my site - www.suspectsunlimited.com]
for me it work fine about 1 week..
then i get there error on my SB
Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/home/motoxtre/tmp) is not within the allowed path(s): (/home/lenzacor:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/lenzacor/public_html/forum/yshout/yshout.php on line 42
Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in /home/lenzacor/public_html/forum/yshout/yshout.php on line 42
@freudlund: Different themes may differ in their treatment of the "box" style. I recommend that you read the manual install instructions for the AdvSB package, which will tell you basically how to install it to other themes, but the style may require tweaking to work on your theme.
@swampy: Edit the CSS (yshout.css) and reduce the width of #shout-text.
@F.L.A.M.E.R: Change what is in the makeShout function, for example
makeShout('[color=red]New Topic in board [url='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/url]: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.html_entity_decode($_POST['subject']).'[/url][/color]');
@natefish: For the same window, try "iurl" instead of "url".
For the periodic stop-refresh, I think it is doable in JS. Try this in yshout.js:
Replace
// Start refreshing the chat after a message has been sent
function shoutDone() {
startRefresh();
}
var refreshSet = false;
function startRefresh() {
if (!refreshSet) {
setTimeout("doRefresh()", refreshTime);
refreshSet = true;
}
}
function schedRefresh() {
if (refreshSet) {
setTimeout("doRefresh()", refreshTime);
}
}
by
var lastShoutTime=(new Date()).getTime(); // last time a shout was made
// Start refreshing the chat after a message has been sent
function shoutDone() {
lastShoutTime=(new Date()).getTime();
startRefresh();
}
var refreshSet = false;
function startRefresh() {
if (!refreshSet) {
refreshSet = true;
schedRefresh();
}
}
function pauseRefresh() {
$("shouts").innerHTML='<div id="refreshwarning">Automatic refresh halted. Click <a href="javascript:resumeRefresh()">here</a> to resume.</div>'+$("shouts").innerHTML;
refreshSet=false;
}
function resumeRefresh() {
lastShoutTime=(new Date()).getTime();
loadChat();
}
function schedRefresh() {
if ((new Date()).getTime() - lastShoutTime > 60000) {
setTimeout("pauseRefresh()", 50);
} else if (refreshSet) {
setTimeout("doRefresh()", refreshTime);
}
}
Change 60000 as necessary.
@zakwan: Please don't double-post. Try commenting out the three lines starting with session_: session_start(), session_write_close() and @session_start().
Is the smiley bar supposed to show as default in Advanced SB? I cant get it to show at all. Am I doing something wrong?
@InternetMafia: Nope, it is not default with AdvSB. You should install it per the smiley guide.
Heya I followed the guide to get the scroll bar to work, and it does seem to work here:
http://www.dcpryzom.co.uk/forum/index.php?yshout&action=forum&file=home&history
But it doesnt work at all in the actual block itself!
feel free to see it here www.dcpryzom.co.uk/forum
username: forest gump, password: test
Im using v1.21
Ive attached the files if you like to take a look :)
You need to edit index.template.php to add the "height:" code.
Thanks the scroll bar show up now, but if i set the width to anything wider then about 550px it disappears. Id like it to sit on the right edge of the center block.
Also how can i change the amount the scroll bar scrolls up?
It disappears because the sizes you chose are large enough to fit the whole shoutbox, so the scroll bars are unnecessary.
You could try shrinking the height: until the scrollbar becomes necessary, or just add more shouts via $maxLines.
hello nneonneo, You Shoutbox is beautiful
I am using smf 1.1.7 and tinyportal.Today i Installed sb 1.22 and done editing for my theme.i added the instant add-on code to the one of the article in the tpblock. The shoutbox appeared,but when i entered to shout,nothing happening and shoutbox is inactive. i tried default smf 1.1.6 code to article also ,but it just showing "shoutbox is loading" but nothing happens. Sir plzz solve my problem
if u want to see u can visit my forum www.hyderabadrockerz.com
user: test123
pass: test
Waiting for ur reply :)
Quote from: nneonneo on January 19, 2008, 11:01:07 AM
I'm reposting pongsak's smiley guide because the recent server crash has deleted the smiley.php attachment.
Quote from: pongsak on August 18, 2007, 11:10:08 PM
For adding smiley .Let's go.
1. Adding 1 line of script between <head> and </head> index.template.php .
<script src="',$boardurl,'/mymod/animatedcollapse.js" type="text/javascript"></script>
This file will create sliding effect.
2. Create "mymod" dir in root forum dir and put the attached animatedcollapse.js in that dir.
3. download smiley.php and safe in mymod dir. (download smiley_SMF2.php instead for SMF 2.x, but name it smiley.php)
4. Search after in index.template.php or boardindex.template.php depend on where u put shout box.
<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>
or
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
or
<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>
add
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
NOTE: Don't put it after the '; or it will not work!
5. Open yshout.php for namely some input.
find and replace (up to 4 times)
*id="shout-form"
with
*id="shout-form" name="shout_form"
find and replace (up to 4 times)
*id="shout-text"
with
*id="shout-text" name="shout_text"
That's it. :D
EDIT [Feb 4 2008]: Updated a few instructions. Changes are noted in red, changes to code marked with a red *.
EDIT [June 22 2008]: Clarified instructions.
EDIT [June 27 2008]: Add 1.20 instructions.
EDIT [June 29 2008]: Moved animatedcollapse.js to an attachment, added a version of smiley.php for SMF 2.x.
EDIT [July 15 2008]: Clarified a common error.
Does this work for v1.21?
Hi nneonneo - thanks for your advice so far on previous matters.
I'm currently having big issues with my site. A while ago I mentioned that I installed simple portal and you got the shoutbox to work for me by having added some code somewhere (can't remember where, sorry). It still works but I am getting this message on the shoutbox - Undefined index: sp-forum in /home/hldrforu/public_html/forum/Sources/Subs.php on line 3901
The error log is pretty much being filled constantly by this and I have just received an e-mail from my host telling me off - http://hldrforum.com/02-12-2008-hldrforum.com.jpg saying I am using far too much cpu time.
I think the error logging would cause this (do you think?). I need to know how to stop this error from logging and would you also have any other tips for easing the cpu load? The bandwidth is not a problem.
Many thanks for any info you might have.
Cheers,
Quote from: Steephh on November 17, 2008, 03:58:51 PM
Quote from: nneonneo on November 14, 2008, 03:40:44 PM
@HR, Steephh: No limit, no reset. You will have to clear it manually.
@bfeo: The guide also reduces the number of simultaneous connections.
Uhmm.... This was just a reply to your question if my history was empty.
http://www.simplemachines.org/community/index.php?topic=137508.msg1794603#msg1794603
Thx anyways :)
@nneonneo:
You won't help me anymore? :'(
If you want to help: look at my history:
http://www.simplemachines.org/community/index.php?action=profile;u=181542;sa=showPosts
You can try making an account on the forum:
http://forum.peellan.nl/
(http://www.tvgrapevine.com/pics/shoutboxexample.jpg)
I finally got what I wanted and it is all due to nneonneo 's patience and assistance.
Thanks for everything!!!!
By the way, where do we find the wonderful select code and copy mod for smf 2 beta 4?
Again much thanks for all you do!!!!!!!!!!!!
@bavica: the <head> code in that theme is from an older version. You should just remove it and replace it by newer code (in index.template.php)
@Final60: It should (I have tested it and it works for me)
@Threepwud: One thing you can try is just to stick "$txt['sp-forum']='';" in Modifications.<language>.php (better yet, find out what it should say, and add that to the Modifications language file). For CPU usage, try disabling $gzipCompression if you haven't already, and, if your host allows it (script max execution time), increase $updateTimeout (the timeout loop uses very little CPU, only some memory to keep the process alive)
@Steephh: if you are getting a blank History page, try chmod'ding the history.home.txt file to 755. Sorry I missed you last time.
If I try to delete anything from the shoutbox using the admin links I get the error
"Session verification failed. Please try logging out and back in again, and then try again"
No matter how many times I relog I stil get the same error. I'm the admin of the forums and I'm using 1.22 and my smf stuff is all up to date. Any suggestions?
That did the trick! Thank you! :-* :P :P
Quote from: Final60 on December 02, 2008, 01:26:40 PM
Quote from: nneonneo on January 19, 2008, 11:01:07 AM
I'm reposting pongsak's smiley guide because the recent server crash has deleted the smiley.php attachment.
Quote from: pongsak on August 18, 2007, 11:10:08 PM
For adding smiley .Let's go.
1. Adding 1 line of script between <head> and </head> index.template.php .
<script src="',$boardurl,'/mymod/animatedcollapse.js" type="text/javascript"></script>
This file will create sliding effect.
2. Create "mymod" dir in root forum dir and put the attached animatedcollapse.js in that dir.
3. download smiley.php and safe in mymod dir. (download smiley_SMF2.php instead for SMF 2.x, but name it smiley.php)
4. Search after in index.template.php or boardindex.template.php depend on where u put shout box.
<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>
or
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
or
<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>
add
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
NOTE: Don't put it after the '; or it will not work!
5. Open yshout.php for namely some input.
find and replace (up to 4 times)
*id="shout-form"
with
*id="shout-form" name="shout_form"
find and replace (up to 4 times)
*id="shout-text"
with
*id="shout-text" name="shout_text"
That's it. :D
EDIT [Feb 4 2008]: Updated a few instructions. Changes are noted in red, changes to code marked with a red *.
EDIT [June 22 2008]: Clarified instructions.
EDIT [June 27 2008]: Add 1.20 instructions.
EDIT [June 29 2008]: Moved animatedcollapse.js to an attachment, added a version of smiley.php for SMF 2.x.
EDIT [July 15 2008]: Clarified a common error.
Does this work for v1.21?
Heya
Im having trouble doing step 4 in this guide. I cant find any of the 3 markups that it asks me to find in my index.template.php.
attached is my index.template.php file
@Savvra: Sorry, I don't really know what the problem is. Mind if I take a look at your board? I will need to be able to see the admin links, so if you could PM me some information, I would appreciate it.
@Final60: Is the shoutbox installed in a portal of some sort? If so, try editing the code for the shoutbox block for step 4 instead.
Ah sorry Ive just realised where i think i had to put it. in here:
echo '<div id="yshout">';
When the page loads, the smileys appear to load but then disappear when the page is fully loaded. any advice?
I notice there is some script in the code i have to add. The Shoutbox code only appears work work correctly in a php block, and the script needs a script block to work it seems. But When i switch to a script box the shoutbox doesnt work correctly.
Also 2 last features Id like help on:
1: I have the new post and topic notifier working great, but i don't want it to open a new browser when a use clicks on the links, but use the same browser.
2: Can you point me in the right direction to change the menu text into the small icons above shoutbox?
Thanks in advance
ok, i get it right. Just a last thing. I get this error in the error log after i modified the post.php for the threat update feature.
8: Undefined variable: scripturl
File: /home/skywise/public_html/forum/Sources/Post.php
Line: 1762
What shall be the solution ?
Edit:-
It happens when a post is made, i aint sure if its coming when the topic is made. I also checked it with the edits again, i dont seem to go wrong anywhere, would you like to check anything ?
@Final60: Script code goes in <head> section of index.template.php. Don't put it in the phpbox.
1) Try "iurl" instead of "url".
2) Look at AdvSB, specifically initShoutbox. You will need to copy the icons over, too.
@F.L.A.M.E.R: I just updated that post. See if the new code works.
oh wait, i think i know why that error came, i am using the shoutbox version 1.22
Shall i try the new code yet then ? or would you update it for 1.22 ?
Edit:- I did try it and it did work out. Well, you can keep it up for the version 1.22 if you want. or people might get confused and not try for 1.22
Great job! :)
It's actually meant for 1.22. The first edit is only for 1.21 to bring it up to date with 1.22.
Quote from: nneonneo on December 02, 2008, 04:15:24 PM
@bavica: the <head> code in that theme is from an older version. You should just remove it and replace it by newer code (in index.template.php)
sir, i already done wat u said. i again done today, i replaced the old <head> code with the code in ur mod topic and i manually replaced all the codes in the respective files,still am getting "loading shoutbox" but its not loading :(
<script src="http://hyderabadrockerz.com/yshout/js/prototype.js" type="text/javascript"></script>
<script src="http://hyderabadrockerz.com/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="http://hyderabadrockerz.com/yshout/js/behaviour.js" type="text/javascript"></script>
<script src="http://hyderabadrockerz.com/yshout/js/domFunction.js" type="text/javascript"></script>
These lines suggest to me that the code in your theme index.template.php is from SB 1.17. If you really cannot make it work, try installing version 1.17 of the shoutbox.
Quote from: nneonneo on December 02, 2008, 10:44:55 PM
<script src="http://hyderabadrockerz.com/yshout/js/prototype.js" type="text/javascript"></script>
<script src="http://hyderabadrockerz.com/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="http://hyderabadrockerz.com/yshout/js/behaviour.js" type="text/javascript"></script>
<script src="http://hyderabadrockerz.com/yshout/js/domFunction.js" type="text/javascript"></script>
These lines suggest to me that the code in your theme index.template.php is from SB 1.17. If you really cannot make it work, try installing version 1.17 of the shoutbox.
nneonneo, as u said, i installed sb 1.1.7, its working but the shoutbox is loading slowly :(
Seems to be snappy enough. 1.17 isn't instant-on, unlike 1.22, so it means that it won't be instantly loaded with the page -- it will be delayed a bit.
Quote from: nneonneo on December 03, 2008, 12:00:04 AM
Seems to be snappy enough. 1.17 isn't instant-on, unlike 1.22, so it means that it won't be instantly loaded with the page -- it will be delayed a bit.
THank very much nneonneo, adjusted refresh rate, now working like a charm. once again thankyou verymuch for ur fast responses. Your Shoutbox Rocks :)
please help me i attched my file plase tel me what can i do .
My yshout file ( Yshout.php ) creating problem thats y shoutbox cannt run propely please help me
This Is Error
Quote
Warning: session_start() [function.session-start]: open(/home/duam2807/tmp/sess_d176de9b16a743283fe6d839416f5603, O_RDWR) failed: Permission denied (13) in /home/ncmlnet/public_html/stayhere/yshout/yshout.php on line 42
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ncmlnet/public_html/stayhere/yshout/yshout.php:42) in /home/ncmlnet/public_html/stayhere/yshout/yshout.php on line 42
Warning: Cannot modify header information - headers already sent by (output started at /home/ncmlnet/public_html/stayhere/yshout/yshout.php:42) in /home/ncmlnet/public_html/stayhere/yshout/yshout.php on line 46
Warning: session_write_close() [function.session-write-close]: open(/home/duam2807/tmp/sess_d176de9b16a743283fe6d839416f5603, O_RDWR) failed: Permission denied (13) in /home/ncmlnet/public_html/stayhere/yshout/yshout.php on line 763
Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in /home/ncmlnet/public_html/stayhere/yshout/yshout.php on line 763
Warning: Unknown: open(/home/duam2807/tmp/sess_d176de9b16a743283fe6d839416f5603, 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 () in Unknown on line 0
solve my problem plzz
check attachment
i hope u will reply me as soon as posiible
@lucky_jan: Someone else had a similar problem, and this is what I suggested:
Quote from: nneonneo on December 01, 2008, 10:29:52 PM
Try commenting out the three lines starting with session_: session_start(), session_write_close() and @session_start().
Can you see if it works?
I was just using another computer and tried to view my site on google chrome. The shoutbox says you are not logged in when you are and will not work correctly. It works fine in opera, Firefox, and IE.
not its dosnt matter . firefox also not view my shoutbox correctly
plzz nneonneo)> help me plzz plzz i m very thankful to u if u help me.
@Mikeric: There appears to be some incompatibilities with Chrome. I'm working on it.
@lucky_jan: Did you try the tip? Find all
session_
and replace by
// session_
in yshout.php.
Hey nneonneo!
Your shout box works like a champ! Thanks! I have SMF 1.1.7 and aA_New_Damage_v2 as the theme, and I've gotten everything beaten into submission pretty well.
I am having problems with the scroll bar feature you supplied, though.
Here is the code from the part of the theme's index template that should install the scroll bar...
#yshout #shouts {
overflow: auto;
width: 550px; /* the width you want to display */
height: 150px; /* the height you want to display */
}
#yshout {
font-size: 10px;
overflow: hidden;
}
Why is the bar not showing, and how do I make it so you can scroll and see the history of more than 12 -15 lines?
For reference - my site is www.suspectsunlimited.com
Please use UserID "Helping" and pass "Suspects2008" to access and see Shout Box.
What am I doing wrong?!?
I've attached a text copy of the entire index template. The code above is around line 140.
Thanks!
Tom
@nneonneo : ok sir i ill try wait
@tommys67: For a permanent scrollbar, you can try "overflow-y: scroll;" instead of "overflow: auto;".
@nneonneo : sir now this time this error is shown on shout box
now what can i do ?
Quote
Parse error: syntax error, unexpected '}' in /home/ncmlnet/public_html/stayhere/yshout/yshout.php on line 775
check also attachment
@lucky_jan: Oh yes. You need to change one
@session_start(); // restart session, so updates to $_SESSION are applied
to
//@session_start(); // restart session, so updates to $_SESSION are applied
you mean i replace this forst code in to second ?
@nneonneo : i do your trick but this time...
now this error was coming on shout box
Quote
Warning: fopen(yshout/chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /home/ncmlnet/public_html/stayhere/yshout/yshout.php on line 699
File error (writeLine); aborted
please @nneonneo : you can do input shoutbox code in my files my forrum file in attachment please enter the shoutbox code into it i m very thank ful to u.
install AdvSB_1.22.zip mod version ok ??
Aarg aarrrg! :P
8: Undefined index: is_sbmod
File: /home/skywise/public_html/forum/yshout/yshout.php
Line: 113
What seems to have gone wrong ? its in the error log.
@lucky_jan: Actually, now it is easy: just use "chmod" to change the file permissions on chats/ and all files in chats/ to 755 or 777 or 666.
@F.L.A.M.E.R: is_sbmod should be set on line 89 or thereabouts. Does that show up when you use history?
sir what is ( "chmod" ) ???
how i can chnage permission please tel me prosigure plzz
nope, doesnt show up when its in history. I acutally dunno the source as i just came in and saw in the error log. Sorry for being less informative.. but thats how it is though....
@lucky_jan: There's a how-to here: http://www.stadtaus.com/en/tutorials/chmod-ftp-file-permissions.php
@F.L.A.M.E.R: Does it appear very often, or just once?
Quote from: nneonneo on December 03, 2008, 02:21:52 PM
@tommys67: For a permanent scrollbar, you can try "overflow-y: scroll;" instead of "overflow: auto;".
Oh, Snap! That put a scroll bar in place as advertised, but it's...empty. Can't seem to scroll the history from the shout box itself.
I also need to find the "History" code to get that wider.
After that - it's absolutely perfect.
Thank you very much!
Oh! You wanted to see more history? Increase $maxLines in yshout/settings.php.
/me slaps forehead
Quote from: nneonneo on December 03, 2008, 04:23:53 PM
Oh! You wanted to see more history? Increase $maxLines in yshout/settings.php.
/me slaps forehead
No need to slap the forehead, sir... You're the programmer - we are just amatuers (well, I am at least!)
I think I've got it. I'll check back if I have other questions.
My users LOVE this.
Thank you!
well, i saw like 10 of them. Thats mostly within 12 hours of time.
Quote from: dav on November 05, 2008, 09:44:01 PM
NEW PROBLEM!!!
Getting connection problems after I installed shoutbox
Error: Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.
Been happening a few times in like 25mins. like 2 or 3 times.. its weird.
Hello, I have the same problem. I have installed the chat in my forum:
Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.
also happens in the chat demo, After leaving several messages error:
http://nneonneo.net46.net/smf2/ (http://nneonneo.net46.net/smf2/)
Just wanted to say thanks nneonneo! Your help was quick and solved my problems asap! Keep up the great work!
nneonneo,
Im running your shoutbox ver 1.14b and i've been running for quite some time. I recently upgraded from a shared host to a VPS server. Since then there is only a history log that ends on Nov. 24. The shout box can not seem to keep chat logs older than 24 hours. For example, once we hit midnight tonight, all of today's chats will not show up in the history log. All we see are in the history logs are pre Nov. 24. Im presuming that something went bad during this server migration. Could this be a permission thing do you think?
Since im having issues with installing any new packages I think it might be a permission thing.
Any suggestions on what to look for?
You can see what i mean with the missing dates in this screen shot:
(http://img139.imagevenue.com/loc117/th_24212_2008-12-04_125554_122_117lo.jpg) (http://img139.imagevenue.com/img.php?image=24212_2008-12-04_125554_122_117lo.jpg)
@zlolz: My webhosting is not very powerful, so they have set the connection limit quite low. That's why it sometimes won't work -- if too many simultaneous refreshes happen, it dies. This is not usually a problem on paid hosting :P
@madman71: chmod chats/history.home.txt to 755, 777, 666 or 644 (your host should say what is appropriate, and which one works is up to the setup of your host). The problem (I am assuming) is that the history file isn't writable.
Quote from: nneonneo on November 26, 2008, 06:28:53 PM
This is a how-to for making the shoutbox notify on new topics or posts (with thanks to Gaugenstien for the idea and natefish for suggesting improvements).
For shoutbox versions 1.21 or lower, make this change:
In yshout/yshout.php, find
session_write_close(); // so that future session requests succeed
$heartBeatSent=false;
if(!$forceRefresh)
{
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
}
@session_start(); // restart session, so updates to $_SESSION are applied
and replace by
$heartBeatSent=false;
if(!$forceRefresh)
{
session_write_close(); // so that future session requests succeed
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
@session_start(); // restart session, so updates to $_SESSION are applied
}
Edit Post.php.
For SMF 1.1.x, find
if ($newTopic)
notifyMembersBoard();
elseif (empty($_REQUEST['msg']))
sendNotifications($topic, 'reply');
and change it to
if ($newTopic) {
notifyMembersBoard();
// YSHOUT TOPIC NOTIFICATION
$res = db_query("
SELECT
b.name
FROM ({$db_prefix}boards AS b)
WHERE b.ID_BOARD = $board", __FILE__, __LINE__);
$row = mysql_fetch_assoc($res);
if($row) $boardName = $row['name'];
ob_start();
global $context,$scripturl,$topic;
include_once('yshout/yshout.php');
makeShout('New Topic in board [url='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/url]: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT TOPIC NOTIFICATION END
}
elseif (empty($_REQUEST['msg'])) {
sendNotifications($topic, 'reply');
// YSHOUT REPLY NOTIFICATION
ob_start();
global $context,$scripturl;
include_once('yshout/yshout.php');
makeShout('New reply: [url='.$scripturl . '?topic=' . $topic . '.new;topicseen#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT REPLY NOTIFICATION END
}
For SMF 2.0, change
if ($newTopic)
{
$notifyData = array(
'body' => $_POST['message'],
'subject' => $_POST['subject'],
'name' => $user_info['name'],
'poster' => $user_info['id'],
'msg' => $msgOptions['id'],
'board' => $board,
'topic' => $topic,
);
notifyMembersBoard($notifyData);
}
elseif (empty($_REQUEST['msg']))
{
// Only send it to everyone if the topic is approved, otherwise just to the topic starter if they want it.
if ($topic_info['approved'])
sendNotifications($topic, 'reply');
else
sendNotifications($topic, 'reply', array(), $topic_info['id_member_started']);
}
to
if ($newTopic)
{
$notifyData = array(
'body' => $_POST['message'],
'subject' => $_POST['subject'],
'name' => $user_info['name'],
'poster' => $user_info['id'],
'msg' => $msgOptions['id'],
'board' => $board,
'topic' => $topic,
);
notifyMembersBoard($notifyData);
// YSHOUT TOPIC NOTIFICATION
$res = $smcFunc['db_query']('','SELECT b.name
FROM ({db_prefix}boards AS b)
WHERE b.ID_BOARD = {int:board}', array('board' => $board));
$row = $smcFunc['db_fetch_assoc']($res);
if($row) $boardName = $row['name'];
ob_start();
global $context,$scripturl;
include_once('yshout/yshout.php');
makeShout('New Topic in board [url='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/url]: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT TOPIC NOTIFICATION END
}
elseif (empty($_REQUEST['msg']))
{
// Only send it to everyone if the topic is approved, otherwise just to the topic starter if they want it.
if ($topic_info['approved']) {
sendNotifications($topic, 'reply');
// YSHOUT REPLY NOTIFICATION
ob_start();
global $context,$scripturl;
include_once('yshout/yshout.php');
makeShout('New reply: [url='.$scripturl . '?topic=' . $topic . '.new;topicseen#new'.']'.html_entity_decode($_POST['subject']).'[/url]');
ob_end_clean();
// YSHOUT REPLY NOTIFICATION END
}
else
sendNotifications($topic, 'reply', array(), $topic_info['id_member_started']);
}
Hey Neo,
As you know I had some issues getting this to work so i reverted to using v1.21.
I recently tried to upgrade to v1.22 and it works fine now. Question is how do i now impliment the above feature as the code in the first block differs from that in the 1.22 yshout.php file.
Also if I leave the yshout.php file as it is but change the Post.php file it returns an error - any suggestions?
Quote from: nneonneo on December 04, 2008, 05:46:45 PM
@zlolz: My webhosting is not very powerful, so they have set the connection limit quite low. That's why it sometimes won't work -- if too many simultaneous refreshes happen, it dies. This is not usually a problem on paid hosting :P
@madman71: chmod chats/history.home.txt to 755, 777, 666 or 644 (your host should say what is appropriate, and which one works is up to the setup of your host). The problem (I am assuming) is that the history file isn't writable.
Thanks Neo,
Permissions was the prob. thanks
Hey guys how can i get rid of the "Shout Box" text above menu links?
Oh Oh!!
I installed mysql 5.x the latest version and the shout box kicked out the following. Actually it kicked the following out when it seemed to refresh. Any solutions?
Notice: Undefined index: forum in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 3936
Notice: Undefined index: PortaMx in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 3938
Notice: Undefined index: pmx_settings in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 4000
Notice: Undefined index: pmx_blocks in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 4005
Notice: Undefined index: PortaMx in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 4207
I thought I saw this in here, but when I searched I could not find it again.
My problem is that on one of my themes the text is larger. I am using simple portal with SMF 2.0 beta 4. I put the chat into a custom PHP block. It works well with all my other themes.
another question, I can't get sound to play at all. If i understand it the sound is supposed to notify of new post right?
Thanks in advance
Ok so its all installed but I can only seem to see it on my account!? any reason for this?
thanks :)
Quote from: tripl3r on December 05, 2008, 03:43:07 PM
Ok so its all installed but I can only seem to see it on my account!? any reason for this?
thanks :)
have you given permissions to your other user levels? See Permissions
@Youngiiie: What error?
@Final60: Edit index.template.php and remove
<br /><b>',$txt['yshout_shoutbox'],'</b><br />
@swampy: If PortaMx has a separate language file, try copying the contents of that file into Modifications.english.php.
@n01d3a: Try editing the CSS block (<head> code of index.template.php) to shrink the size of the text.
Nope, didn't work..... so sad. Think I will throw it back to Portamx and see what happens
:-[
Darn I just had a brain fart. The shout works fine in respect shouting, it is just the errors showing up that ruins it. As I recall there is a way of surpressing error reporting isn't there?
Notice: Undefined index: PortaMx in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 3938
Notice: Undefined index: PortaMx in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 4207
See the two attached jpgs. The first jpg shows how shout first appears and the 2nd jpg shows what happens about 2 seconds later.
I was figuring this might work, but where to edit it in?
// Turn off all error reporting
error_reporting(0);
ok, so does anybody know how to fix the sound issue I am having?
First I want to verify what the sounds are. Are they alerts to let me know when a there is a new post in shout?If not then what are the sounds for?
Hello nneonneo
and thanks for a really nice mod ;)
I have 1 problem and 1 thing I would like to know how to fix.
First up is the problem, I get this error message:
Warning! The shoutbox text files for your language are not installed. This may cause the shoutbox and admin settings to appear wrong.
To fix this problem, copy /home/scarmix/public_html/Themes/default/languages/Modifications.english.php to /home/scarmix/public_html/Themes/scarmix/languages/Modifications.english.php and translate as desired.
To ignore this notice, click here.
And yes I have done this that the error tells me to do, but is still get the error :(
hope you can help me, I guess you have answered this problem before but this topic has more then 230 pages and I don't know what word to search for.
Not for the thing I would like to fix is that I want the shout box to only show on the index page not on the rest of the pages. Hope you want to help me with this one :)
Cheers,
ScarMix
@nneonneo
one question:
when I update my shoutbox from 1.21 to 1.22, all my options, history, preferences will be saved?
Feline the author of PortaMx fixed the problem with the following=========================================================
QuoteQuote from: Penguin on Today at 00:33:25
Notice: Undefined index: forum in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 3936
Notice: Undefined index: PortaMx in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 3938
Notice: Undefined index: pmx_settings in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 4000
Notice: Undefined index: pmx_blocks in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 4005
Notice: Undefined index: PortaMx in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 4207
I think, I have found the problem ...
Please try this:
Open SSI.php in a editor ...
Find:
Code: [Select]// Load the current user's permissions....
loadPermissions();
Add after:
Code: [Select]//-> start add PortaMx
if(!defined('PortaMx'))
{
require_once($sourcedir . '/PortaMx/PortaMx.php');
PortaMx();
}
//-> end add PortaMx
Now the error is gone I think
Fel
@n01d3a: yes, sound is for new shout notification. Can you see if it works in another browser?
@ScarMix: Try the instructions for "No text?" on the main mod page. To show only on index, you can add something like "if(!isset($board) && !isset($topic))" to the shoutbox code, or move the shoutbox code to BoardIndex.template.php.
@Nequil: Yes, but if you are paranoid you can always backup yshout/ before upgrading.
@swampy: Great! I will keep it in mind.
Where do I have to put the code in customt heme if i wanted it to appear in center area, just under the links
Home, help, search etc...?
The theme I use the shout box doesn't work.
I use the Helios Multi theme.
Is there a way you can update the mod so it will work for my theme?
If its custom theme [Any theme other than default] you have to customly add the shoutbox.
So install it then go to his first post andhe will give u a tutorial on how to add
@alex clone: Probably right before or after the code
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
(your custom theme will have id="bodyarea", but might not look exactly like this)
Hello,
I got this to work great in the default theme. And I followed the instructions for the custom theme that I am using.
Well the shout box appears but I cant figure out how to put it in the right place with out breaking the view. I am a full on noob at this and was wondering if I can list it here so you can show me where to put the last bit of code...
I am using this theme. http://custom.simplemachines.org/themes/index.php?action=download;lemma=204;id=1163 (http://custom.simplemachines.org/themes/index.php?action=download;lemma=204;id=1163)
I LOVE the theme and I keep screwing it up... :(
Thank you for any help you can provide.
*edit to attach correct index
OK when I turn the sound on, it takes forever to update and I get a page error in my browser. here is a link to a photo of the error I receive.
@lowbuck: Where did you want it?
@n01d3a: For a custom theme, you should do the first edit on this page:
http://www.simplemachines.org/community/index.php?topic=137508.msg1208212#msg1208212
Hi nneonneo
If you dont mind I think it would look best in the "water space" (Blue'ish area) that the:
Home :: Help :: Search :: Admin :: Profile :: InBox :: Calendar :: Members :: Logout
Buttons are "hanging" in. Let me know if you don't see that spot.... :D
Thanks again for your help!!
Lowbuck
*edit every time I try to do it it breaks the page. lol The shout box is there but then the rest of the page after it is all crazy :(
*edit added screen shot...
(http://i33.tinypic.com/vh3q85.jpg)
lowbuck, you'll need to attach your index.template.php for that theme. :D
Quote from: nneonneo
@Nequil: Yes, but if you are paranoid you can always backup yshout/ before upgrading.
thanks, all works
Quote from: nneonneo on December 06, 2008, 08:13:57 PM
@alex clone: Probably right before or after the code
// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
(your custom theme will have id="bodyarea", but might not look exactly like this)
The theme im using doesnt have that code there :S
Ive tryed to break the code down it doesnt say "bodyarea" anywhere either
@alex clone: Try looking for the end of the template_main_above function, then.
SunKing here is the index.
*Edit Added the correct Index
The shoutbox in that index.template.php is not the same as this one. The support thread for that mod can be found HERE (http://www.simplemachines.org/community/index.php?topic=269091.0). I will be glad to help you add nneonneo's Shoutbox to your custom theme template if you decide to go with it instead.
Oops sorry about that. The code you saw in there was left over from another one that I tried. Here is the clean index.
No problem at all. Which version of the shoutbox are you wanting installed?
I currently have nneonneo's AJAX ShoutBox 1.22 installed and it works well for the default site. Its just when I do the mods with the theme index that it goes all crazy. LOL I tried putting the code in the right place but everytime I do it and load the page it is never in the right spot and then causes other stuff on the page to break. :-[ Like showing parts of the page twice and so on...
I am also thinking that I would like to try AdvSB_1.22. Will the mods to the theme index be different? Should I load this one and see if I like it better first?
*Edit
Strike that, as I cant seem to get it to install anyway. lol So I will just stick with nneonneo's AJAX ShoutBox 1.22
OK. Make a backup of your current index.template.php then upload the attached file. It should work, but with custom themes, there are often "hiccups". I will be more than happy to help. Also, could you post a link to your site (or PM it to me)?
So far it seems to be working Great!!! I keep trying to send you a PM but I must be doing something wrong. I send it and then it does not show up in the "sent" messages
Hello...
I have run the shoutbox install and followed the instruction for my version (1.1.7) to the letter as far as manual changes. It does not show up, even for the admin. my site: www.informationgospel.net
If there is some glaring thing i have yet to do, would appreciate knowing, thank you.
I do not see any yshout lines in your page's sourcecode. You need to make sure you have edited the index.template.php for your theme, as the shoutbox only installs into the default theme.
i was using another shoutbox but i wanted this option for forum posts to be displayed.. so i made a request and nneonneo said his shoutbox does this,well here i am... i now have everything working the way i want... great mod...
my only problem seems to be i cant give my staff mods and co admin permissions to delete shouts or ban... can someone point me in right direction? ive tried under the members permissions... i checked moderate shoutbox but doesnt seem to work...
also in admin i dont see any settings... should i ?? thank you
Hey nneonneo, I know I keep you busy. ;D
I just added the "Shoutbox Post Notification" edit and think it's great. I tweaked it a little by adding the /me to the front of the text displayed and reworded it some. It gives it a bit more of an "announced" look.
Anyway, I have a odd issue with it, well, with it coexisting with 2 other mods. The shoutbox edit works as designed. But I have a "Post Anonymously" and "Post As Staff" mods/hacks installed. What the notification edit does is post a notification in the shoutbox as intended, but it is posted under the actual poster rather than "Anonymous" or "Site Staff". Now, with Staff it's not a big issue, it would just reflect which staff member posted. However, it's also posting which member has just posted anonymously, thus defeating the purpose of this feature. :P
My question, then, is can this be fixed so that they work happily together? No rush. I'll make an announcement to members regarding the "glitch" with anonymous posting. Thanks in advance.
ALSO: I just noticed that after you have clicked on the link in the shoutbox, it takes you to the post/reply, but upon returning to the main page it still shows that board as having unread content in it. If you go into the board directly, it clears the "new" status. No big deal as far as functionality of the edit, just an unneeded step IMO. Just trying to keep this awesome mod awesome. ;)
Quote from: pipo_il_primero on September 30, 2008, 05:47:17 AM
Also, sometimes there's a cursor blinking in the input box (which is great help for correcting text), sometimes not. Why?
Just change the function
floodControl() in "yshout.js".
Old (wrong) code:
function floodControl() {
$("shout-text").disabled = true;
$("shout-button").disabled = true;
$("shout-text").value = "";
setTimeout("enableShout()", floodTime);
}New (true) code:
function floodControl() {
$("shout-button").focus();
$("shout-text").value = "";
$("shout-text").disabled = true;
$("shout-button").disabled = true;
setTimeout("enableShout()", floodTime);
}
nneonneo, this is a bug report. :)
Hi Neo,
It appears to be working now - last time i missed a comma - DOH!
Cheers!
@mickeyb107: If you have given them permission to moderate, then it *should* work.
@SunKing: Can you point me at this mod? My guess is that overwriting $context['user'] to appear as a guest (by setting ['is_guest'] and ['username'] keys appropriately) before calling makeShout() will work, but I don't know how the mod works so I can't say for sure.
The mod itself is based entirely off the notifications data. Can you try subscribing to a thread, then posting anonymously in it? I wonder if you get an email with the member's name or if it is anonymized; if it is the latter, then I should know how to fix it. Similarly, with the read/unread status, the link in the post is the same as the one sent to topic/board subscribers, so it might be an SMF bug if that link doesn't change the unread status.
@Denis Russkih: Thanks for the patch! It will appear in the next version.
nneonneo
my only permissions i get in admin for this shoutbox is 3 check marks in the permissions area... for co admin and super mod i give all permissions so i have the 3 allows checked... i have a few test members and i cant get the permissions to work right... is there any other code i need for this? thx for the help
The mod itself is an edited version of the "Post As Alternative User" mod, but I don't know if it's still available. I basically took that mod and got it working with SMF 2.0 Beta 4, changed the $txt strings, and hardcoded the IP as 0.0.0.0 into the database. If you would like to look at the install.xml, I can post it.
I subscribed to a thread and then posted to it anonymously. The email I received showed the posters name instead of "Anonymous".
As for the read/unread issue, it seems to have sorted itself out.
I just want to thank you again for all of your time and help! I really appreciate it.
@mickeyb107: There should be little "del" and "ban" icons next to all the shouts, and "HideAdminLinks" or "ShowAdminLinks" in the title bar. If none of that is showing up, then it is likely some sort of bug...
@SunKing: If you could post install.xml that would be great. I suspect it is just a matter of applying the same anonymizing code to the topic reply notification, so that the shoutbox also gets the same anonymization.
Here you go. (I do realize that technically this doesn't have a thing to do with the shoutbox, and therefore can be put at the bottom of your "to-do" list. :P)
it does show on my admin account and my other admins have it but nothing for co admin or super mod
@SunKing: Here you go. This replaces the code block mentioned in the original post.
$fakeUser=array('name'=>$posterOptions['name'], 'id'=>$posterOptions['id'], 'is_guest'=>$posterOptions['id']==0);
$oldUser=$user_info;
$user_info['name']=$posterOptions['name'];
$user_info['id']=$posterOptions['id'];
$oldIP=$_SERVER['REMOTE_ADDR'];
$_SERVER['REMOTE_ADDR']=$posterOptions['ip'];
if ($newTopic)
{
$notifyData = array(
'body' => $_POST['message'],
'subject' => $_POST['subject'],
'name' => $user_info['name'],
'poster' => $user_info['id'],
'msg' => $msgOptions['id'],
'board' => $board,
'topic' => $topic,
);
notifyMembersBoard($notifyData);
// YSHOUT TOPIC NOTIFICATION
$res = $smcFunc['db_query']('','SELECT b.name
FROM ({db_prefix}boards AS b)
WHERE b.ID_BOARD = {int:board}', array('board' => $board));
$row = $smcFunc['db_fetch_assoc']($res);
if($row) $boardName = $row['name'];
ob_start();
global $context,$scripturl;
include_once('yshout/yshout.php');
makeShout('New Topic in board [url='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/url]: [url='.$scripturl . '?topic=' . $topic . '.new#new'.']'.html_entity_decode($_POST['subject']).'[/url]',$fakeUser);
ob_end_clean();
// YSHOUT TOPIC NOTIFICATION END
}
elseif (empty($_REQUEST['msg']))
{
// Only send it to everyone if the topic is approved, otherwise just to the topic starter if they want it.
if ($topic_info['approved']) {
sendNotifications($topic, 'reply');
// YSHOUT REPLY NOTIFICATION
ob_start();
global $context,$scripturl;
include_once('yshout/yshout.php');
makeShout('New reply: [url='.$scripturl . '?topic=' . $topic . '.new;topicseen#new'.']'.html_entity_decode($_POST['subject']).'[/url]',$fakeUser);
ob_end_clean();
// YSHOUT REPLY NOTIFICATION END
}
else
sendNotifications($topic, 'reply', array(), $topic_info['id_member_started']);
}
$_SERVER['REMOTE_ADDR']=$oldIP;
$user_info=$oldUser;
It sets up a fake user, tells the shoutbox to use that user, and also hacks the IP address to be equal to the post's address.
@mickeyb107: What version of SMF are you on? Do they at least have "ShowAdminLinks" above the shoutbox?
That works brilliantly! It posts anonymously, and now shows "Anonymous" in the email too. ;)
nneonneo thank you for the help... i am running smf version 1.17 i as admin do have the delete and ban buttons also the show admin links, the thing i want is for other staff on my forum to have the power to delete shouts and ban... co admin and supermod but its not working...
im not complaining as i really like this with the posts going to shoutbox that is main feature ive been looking for,i would just like to see if i could fix and give permissions to other staff... thank you
@mickeyb107: I wanted just to know if a co-admin can see the ShowAdminLinks option, or if that is missing too.
sorry... no co admin can not... only admin
Hello nneonneo,
Thanks for great mod. I've 2 questions to ask you.
1. When I use /clearhist command, It show error following
Warning: fopen(/history.) [function.fopen]: failed to open stream: Permission denied in /home/esgcoth/domains/esg.co.th/public_html/smf/yshout/yshout.php on line 368
Warning: fclose(): supplied argument is not a valid stream resource in /home/esgcoth/domains/esg.co.th/public_html/smf/yshout/yshout.php on line 370
That line 368 is "$handle = fopen("$logDir/history.$chatFile", "w+");" and when I see in my ftp program, permission in chats folder show is below
(http://img218.imageshack.us/img218/8417/vshout01zj6.gif) (http://imageshack.us)
(http://img218.imageshack.us/img218/vshout01zj6.gif/1/w680.png) (http://g.imageshack.us/img218/vshout01zj6.gif/1/)
How can I correct it ?
2. When I post in yshout, some text not show full text (see picture below).
(http://img67.imageshack.us/img67/2765/vshout02jd6.gif) (http://imageshack.us)
(http://img67.imageshack.us/img67/vshout02jd6.gif/1/w461.png) (http://g.imageshack.us/img67/vshout02jd6.gif/1/)
Could you please suggest me to correct it?
Thanks and sorry for my poor english.
Hello,
first of all cheers to everyone and a huge thanks to the author for a very nice shoutbox.
Now let's do the bussines. :D
I would use some general help about placing the shoutbox part in SMF 2.0 forum.
I installed everything fine, modified the php's manually but i'm not quite satisfied with the shoutbox placing.
Position at the top of the forum doesn't suite me.
If i place it above the copyright in the bottom, shoutbox shows at every template, admin template etc.
So if i could just place it somewhere in the "info center" part of the SMF, it would be great, but i don't know which template would that be.
The requested position would be in the info center let's say above the "upcoming calendar" part.
Thank you in advance for your help,
Igor
I have trouble with chat to include to the end into my file index.template.php a script that activates effect snow in the forum. The chat ceases to be visible. I can think in two different forums so desacarto problems in my files.
Any solution?
This is the script:
<script language="JavaScript1.2">
/******************************************
* Snow Effect Script- By Altan d.o.o. ([email protected], http://www.altan.hr/snow/index.html)
* Visit Dynamic Drive (http://www.dynamicdrive.com/) for full source code
* Modified Dec 31st, 02' by DD. This notice must stay intact for use
******************************************/
//Configure below to change URL path to the snow image
var snowsrc="http://www.myhost/snow1.png"
// Configure below to change number of snow to render
var no = 20;
var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns4up||ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) { // set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><a href=\"http://dynamicdrive.com/\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"><\/layer>");
}
} else if (ie4up||ns6up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
}
}
}
function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", 10);
}
function snowIE_NS6() { // IE and NS6 main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = ns6up?window.innerWidth : document.body.clientWidth;
doc_height = ns6up?window.innerHeight : document.body.clientHeight;
}
dx[i] += stx[i];
if (ie4up){
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
else if (ns6up){
document.getElementById("dot"+i).style.top=yp[i];
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
}
}
setTimeout("snowIE_NS6()", 10);
}
if (ns4up) {
snowNS();
} else if (ie4up||ns6up) {
snowIE_NS6();
}
</script>
Thaks.
@mickeyb107: Would you mind if I took a look at your forum?
@savek: The /clearhist is not a standard feature, so can you point me at the installation instructions? The code you've used is out-of-date with the newest shoutbox.
For #2, increase $maxShoutChars (settings.php); it should be at least six times as long as the maximum number of characters because of entity encoding.
@atha: That would be in BoardIndex.template.php, probably above
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
Now, you'll want to look at the code for the other Info Center parts to integrate it nicely, giving it the same "feel". Something like
echo '<tr>
<td class="titlebg" colspan="2">Shoutbox</td>
</tr>
<tr>
<td class="windowbg2">';
SHOUTBOX CODE
echo ' </td>
</tr>';
should do the trick nicely.
@kr5323: I don't see anything that would conflict. Does your browser give a JavaScript error?
x nneonneo
No, no error of javascript. And it is curious, I include the script in the index.template.php and comments seen stop Chat, only a few seconds the text of "loading" and nothing else. If the script off the chat back to normal.
(http://s1.subirimagenes.com/imagen/previo/thump_1595719dibujo.jpg)
Thanks for the answers.
PS: Discuss default theme and use that as the script is only visible with Firefox and not with IExplorer.
nneonneo sure i would be delighted if you can take a look. http://www.ftasatfile.com i was going to send you a pm let me know if you would like i make you admin... thx again for the support
Any tuts about how to install the advanced shoutbox manually? having trouble with my smf ftp to upload the advanced version...
thanks ;)
I would like to make shoutbox appear in a popup window, all by itself. can someone help me do this. I am quite new so as descriptive as possible would be great.
I would like to have a link in the menu that when pressed a new window pops up with shoutbox.
Thanks.
Quote@atha: That would be in BoardIndex.template.php, probably above
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
Now, you'll want to look at the code for the other Info Center parts to integrate it nicely, giving it the same "feel". Something like
echo '<tr>
<td class="titlebg" colspan="2">Shoutbox</td>
</tr>
<tr>
<td class="windowbg2">';
SHOUTBOX CODE
echo ' </td>
</tr>';
should do the trick nicely.
Hello,
thanks for your reply.
I've forgot to mention that my theme doesn't have an BoardIndex.template.php. I've had that file in other theme while using SMF v1.1.x, but in this 2.0 theme i don't have it. I tried to place the code you gave me at \Sources\BoardIndex.php but it always places the ShoutBox code outside the template at the top of the page. Maybe some other suggestion, placing in different template?
File structure inside of theme:
(http://img184.imageshack.us/img184/5899/templatelb8.th.jpg) (http://img184.imageshack.us/my.php?image=templatelb8.jpg)
@kr5323: I don't understand why it is not working. How is this script installed to your index.template.php? Maybe you can post the modified template?
@mickeyb107: Co-admin or something if possible; PM me a test account
@tripl3r: Use the built-in package parser on the main mod page: SMF 2.0b4 (http://custom.simplemachines.org/mods/index.php?action=parse&attach=77560&smf_version=2.0_Beta_4&mod=585), SMF 1.1.7 (http://custom.simplemachines.org/mods/index.php?action=parse&attach=77561&smf_version=1.1.7&mod=585)
@n01d3a: Have a link like this:
<a href="http://domain.com/forum/yshout/index.php" target="_blank">Shoutbox</a>
This should popup a new window with the shoutbox.
To get fancier, you can adjust the link using JavaScript so the popup window is any size you choose, for example
<a href="javascript:window.open('http://domain.com/forum/yshout/index.php','Shoutbox','width=600,height=400')">Shoutbox</a>
@atha: If the theme doesn't have BoardIndex.template.php then it is using the default theme's file, which means you can just edit the default BoardIndex.template.php, or (if you don't want to touch the default theme), copy it from the default to the custom theme.
Thanks nneo, thats works. But i am using firefox, it changes the current page to a page that just says "[object window]" as well as a window with the shout box.
2 questions.
1)How do I make it so that the page with the link does not change?
2)Do you know how i can add a link to the main menu, along with forum, login, profile etc...
ok another problem. The sound button and show admin links do not work. I have this issue with both links.
Thanks for your help and a VERY NICE mod, THANKS again ;)
thanks for the great mod. I had been using a older shoutbox from somewhere else for the last year or so and only happened to come across this the other day so once again, great mod! :D
I do have a question however.. The old mod I used to have used to have the latest shouts at the top of the window instead of the bottom (so most recent shout would be at the top of the shoutbox). Is this possible to do with this shoutbox?
@ hack go to your yshout/settings.php and find
// The shoutbox usually shows shouts with the newest chats at the bottom.
// If you want the newest ones at the top, set this to true.
$reverseShouts=false;
@n01d3a: To avoid changing the current page, stick ";void(0);" on the end of the javascript: link, e.g.
<a href="javascript:window.open('http://domain.com/forum/yshout/index.php','Shoutbox','width=600,height=400');void(0)">Shoutbox</a>
How do i move the chat from the right side to the left side? It looks ugly on the right.
Btw great MOD
thanks nneo
@ blondeamon
this is taken from page 213 shown by user staticfx
to center the shoutbox table:
open yshout.php
find:
if(!$shoutFormOnTop)
change the next line to: (Note the <center></center>)
echo '<center><div id="shouts">',readChat(),'</div></center>';
then find:
if($shoutFormOnTop)
change the next line to: (Note the <center></center>)
echo '<center><div id="shouts">',readChat(),'</div></center>';
so now the table for that chat is centered... but the text will be as well...
open yshout.css
add
text-align: left;
in the #shouts section
Guys i will remove the mod. It is absolutely great but it causes terrible lag whenever i put it.
I first tried it on a box and the universe lagged , then put it on index.template.php and the same thing happened.
The lag is unbearable....unless i dont know of osmething i will have t put it away...any advice? (i have 30-40 members online daily and only 20 at the same time)
The lag doesn't only affect the forum it runs on but the whole server and any other websites hosted on it. I'm the one who forced blondeamon to remove it because it brought the dedicated server to its knees.
i dont have a answer for the lag but if you only have 30-40 members i dont know how it could be this mod,ive had it on my site for about a week and my site runs fairly fast and my peek i have over 200 members on site... could it be something else causing the lag?
No , it comes by the moment i put the mod and dissapears when i remove it. And tried it twice , always the same.
blondeamon before you give up i too think this is a great mod...did you try the settings on the first page to change some of the ysettings...
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.
OK I had sound for only a few seconds. And it only worked in IE7. When the sound was activated, the chatting would only update when I sent a new message. another thing is that the sound played only when i sent a message, not received it. I had just unistalled and then reinstalled it. I have it in a popup window, sometimes the sound button changes when I click it and other times it does not.
What Internet Browser is this designed to work on? And does anybody have any info for what I can do.
Thanks once again.
I believe the mod messes something up either with the web server (lighttpd) or mysql since disabling the mod is not enough to fix the lag. www and mysql have to be restarted to fix it.
@realnc: Thank you for letting me know. I will do some testing with lighttpd, as it might be an incompatibility. Can I ask you to provide some details on the setup, e.g. how PHP is invoked (fast_cgi? mod_php if available?) and version of PHP.
@n01d3a: Really weird... you are using AdvSB stock installation, right? Maybe I should just look at the forum :P
looks great but it doesnt seem to work with my forum.
could you take a look at forum.wolfeater.com?
There are no errors, but it doesnt show up yet it displays "you must be logged in to use the shoutbox" to guests. Could you take a quick look for me?
OK thanks nneo, i don't mean to be troublesome.
Yes it is the stock adv. I have not changed any settings in it, yet.
Since most seem to work I wonder if it is a setting I have somewhere. Oh well here is my site. cyphe.mine.nu (http://cyphe.mine.nu)
@wolfeater92
Have you set the permissions in the admin section to allow guests to view and/or shout?
its not visible for anyone
Quote from: nneonneo on December 10, 2008, 06:27:17 PM
@realnc: Thank you for letting me know. I will do some testing with lighttpd, as it might be an incompatibility. Can I ask you to provide some details on the setup, e.g. how PHP is invoked (fast_cgi? mod_php if available?) and version of PHP.
http://blondeamon.kamenos.gr/phpinfo.php
wolfeater92, admins cannot see it either?
no one can see it, but guests can see the Sorry guests can not use the shoutbox
thank you nneonneo,
that worked perfect... i just had to make sure when you have co admin and mod when they are automatically in other groups like regular members so i had to uncheck deny for those other groups and works perfect now.... thx so much... works perfect for me now 8)
Nevermind fixed thanks!
one sec, where can I edit the settings for it?
The settings can be found inside settings.php and settings.js in the yshout/folder. To change the style of the shoutbox will require you to make changes to the yshout <style>...</style> section in your index.template.php.
@blondeamon: Thank you. I don't know when I'll have time to install lighttpd, but I will try to get it done before next year xD
@n01d3a: I might've forgotten to update some code. Can you try this: remove "soundmanager2.swf" from the index.template.php file. It should be right after "/yshout/".
nneo, I don't have a index.template.php file in my yshout folder. But if you just want me to remove the .swf file I can. I guess i am a little confused as to what you wanted me to do.
Sorry, I meant index.template.php in Themes/default. Don't remove the swf file! I only wanted that text "soundmanager2.swf" (without quotes) removed.
Here seems to be what is happening.
1) Two people have to be logged in.
2) when I open the chat window in Internet Explorer 7, the sound icon shows without a slash through it.
3)I can't change the icon though. But Sound works when two poeple are on.
4)When I log in as my other account with Firefox, the sound icon is slashed out.
5)I can't change that icon as well, so I think the link is broken.
6)I do not have sound in Firefox.
I have switched the accounts and browsers to see if it had to do with permissions, it doesn't.
And show admin links links button also does to not work.
unfortunately your fix did not have any affect.
The toggle works fine for me, but I get no sound, either.
Can you try upgrading soundmanager? You can get it from this link:
http://www.schillmania.com/projects/soundmanager2/doc/download/#latest
Just replace the soundmanager2.js and soundmanager2.swf files with the ones in the package.
I am testing a popup window version of the shoutbox and have a few questions.
First, I can't seem to get the style worked out just right. It's not finding the yshout.css.
Also, only some of the icons work properly. Commands, and the History icons all are working correctly. The Return to Chat icon works. The Admin Links, Smiley, and Sound toggle icons do not work. Sound works as it's supposed to. Ban And Del both work.
I believe it is a severe lag issue. I noticed that when in IE and sound is activated on both browsers (IE and FIREFOX), IE will not receive the text sent from Firefox until IE sends a message. And when I send the message I hear the sound.
Firefox receives the message sent from IE very quickly, but I do not hear sound.
**UPDATE**
Actually I think that was backwards, Firefox has sound and updates properly, it seems to be IE that has the problem
**Update again**
I have verified that when using firefox sound works and there is no lag. so for some reason IE is not compatible.
@sunking. I am also trying to use a popup and have the same issues. but I have not tried to use smileys yet.
So now that I know what my sound issue is, The link to turn sound on/off and show admin... do not work in a popup window. Once I solve this issue I will let you be.
Thanks for the great mod.
but the show history, codes and the other history links work.
@SunKing: I think this should be enough on index.php:
<link rel="stylesheet" type="text/css" href="', $boardurl, '/Themes/default/css/yshout.css?July022008" />
Is that not working?
As for the links: you are right, they are not working in the separate shoutbox. I think it is because the cookie path is wrong (/forum/yshout/ instead of /forum/), so I will see if I can fix that. Meanwhile, one workaround you can try is to copy yshout/index.php to the root (as, say, "shoutbox.php") and fix $boardurl accordingly.
@n01d3a: see my reply to SunKing
I tried linking the stylesheet like that already but it didn't work. I also tried the <link> using the full url. Still nothing. I will keep looking. ;)
Hello, guys! ;D
I use the nneonneo's shoutbox... and I love it! *-*
But... I think... hmm...
OK. In my SMF Board, I have installed another mod: SMF Shop (http://custom.simplemachines.org/mods/index.php?mod=65) and the item: "Display Name CSS Item (http://dev.dansoftaustralia.net/projects/namecss/)"... Do you know?
And I tried to use the css for colorize the member's names in shoutbox.
I failed... U-U
So... Can you help me... or not?
Where can I edit the colors of the text for the mod?
@wolfeater92
In the yshout <style>...</style> section of your index.template.php or in yshout.css.
@nneonneo & @n01d3a
I have everything working for the popup window. I made a copy of the index.php then renamed it to shoutbox.php and moved it to the forum root. I had to muck around with it a bit to get the paths working right. But as far as I can tell....everything is working. I have attached the "shoutbox.php" so you can have a look (and probably laugh at my rookie code :P).
I just installed nneonneo's Shoutbox, and from the looks of things, it's great. However, the shoutbox won't let us post. Admins, regular users... It doesn't matter. When integrated with the forum, the shout button doesn't work. On its own, (at /yshout/index.php), it runs great, but that doesn't really do what I intended it to...
Which version of the shoutbox did you install? Also, which version of SMF are you running?
Because I'm running SMF 2.0 b3 (I don't particularly like b4), I'm running 1.20 of the shoutbox. Should I install a more recent version? Would that solve it?
I actually got it to work. I messed around with some of the code for my custom theme and now it works. But now it takes the footer off of every page except the main one. Any suggestions as to how I should get my footer back? Attached is my index.template.php (it's not clean)
@sunking
I don't care how "rookie" your coding is, as long as it works. I will try it shortly. thanks for posting what you did so I can fix my problems as well.
@sunking
Thats works great!! Thanks, I hope you don't mind but I just copied you .php file.
Did that also get your theme to show? I am not really sure how the theme would affect the appearance of shoutbox, but my shoutbox does not appear to look anydifferent.
@nneo
Just a question, Is shoutbox supposed to be compatible with IE. It does not bug me, I mainly use firefox, but I am wondering about others who may only use IE.
Oh and Great mod.
Nneo,
I just installed your shoutbox. I then modified my current theme and now t wont work. This is what I'm getting:
Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.
You can also try refreshing this page.
Any suggestions?
Thanks,
Cheryl
Did it work with the shoutbox before you modified your theme? What files did you modify for your custom theme?
It works fine with the default theme.
I modified a custom theme by copying that long code and inserting it where it told me. I then took that code back out and the theme won't work.
I am planning on uploading a fresh copy of "index.template.php" so that I can get that theme back. The theme is Impulse. I really like it for my board and would love to use it with this mod.
thanks!
I am at work now ;) but if you attach the clean index.template.php from your custom theme, I can edit it for you when I get home. Also, where exactly do you want the shoutbox?
Solved my problem by uninstalling the version 1.15 by 1.22
Greetings.
@Sunking
I went to your site to see how this shoutbox works for you and how that pop-up window works.
That looked very cool. I've been trying to get it work also as pop-up but so far I haven't had any luck with it. I did put the yshout code to seprate html file, but something is still wrong.
Could that yout shoubox.php work for me? I'm using 1.1.7 smf.
SunKing,
Thanks. I think that the shoutbox would go best at the bottom.
I've attached the file.
Thanks Again!!
@nneonneo
How I can disable bbcode like "img", "quote" and commands "/pi" and "/me" in shoutbox?
@nwobhm
I used his shoutbox.php, just copied and everything worked. As far as I know, the files are the same for 1.1.7 and 2.0. The only thing, and I am not sure if this matters, but I have advanced shoutbox. I am not sure what version sunking used. Another questions, did you put a seperate link to the new php file. you can use either of these codes supplied by nneonneo.
<a href="http://domain.com/forum/yshout/index.php" target="_blank">Shoutbox</a>
This should popup a new window with the shoutbox.
To get fancier, you can adjust the link using JavaScript so the popup window is any size you choose, for example
<a href="javascript:window.open('http://domain.com/forum/yshout/index.php','Shoutbox','width=600,height=400')">Shoutbox</a>
*I had to change the location to point to the shoutbox.php file i created.
@nwobhm
I would think the shoutbox.php would work for either version, and because it's a separate file, it cannot damage anything in the forum. :P
@n01d3a
I use the AdvSB1.22. ;D
@ jinxnme
I will get on that right away. And the way it is set up you would only need to move shoutbox(); to put it ANYWHERE you wanted. :D
@ jinxnme
I have attached the edited index.template.php. Everything should be in order. Custom themes really vary in how they are set up, so there may be an issue or two. If for some reason the shoutbox "breaks" the forum, simply open index.template.php and search for shoutbox(); and put // in front of it. That will fix the forum (though without the shoutbox) until a solution is reached - pretty simple, huh?
Also, if the shoutbox isn't in exactly the right spot, you can change it's location by moving shoutbox(); to another spot in the code.
I will also be happy to help iron out any issues you may have if need be. Just provide a link to the site.
Enjoy!! ;D
Sunking,
Thank you for giving me my template back. The shoutbox code is in the inde.template.php file, but the shoutbox does not show up.
The URL of the forum is http://www.lesbianfic.com/SMF
Currently, only myself is set to use the theme in question (Impulse). You will probably need to register and then change your theme to see what I'm looking at.
Thank you so much for all your help with this.
:'( :'( can someone help me.
I have a problem in getting the shoutbox to work.
I am kinda new to php, but know a little.
Keep getting a parse error page after installing index.template.
here is the code with the problem, I can't see where it is, any suggestions??
Got me stumped.
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.
// 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 {
color: #666666;
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
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
And here
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
// 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
</form>';
}
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';
echo '
<table id="upshrinkHeader2"', empty($options['collapse_header'])
Your problem is in this section here:
<input type="hidden" name="hash_passwrd" value="" />
// 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
</form>';
It needs to look like this:
<input type="hidden" name="hash_passwrd" value="" />';
// 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
echo'</form>';
You were just missing the '; after <input type="hidden" name="hash_passwrd" value="" /> and the echo' before </form>. ;)
@ jinxnme
Some how I overlooked your post. :o Sorry about that. I will have a look right now to see what needs to be done.
Quote from: n01d3a on December 12, 2008, 04:26:03 PM
@nwobhm
I used his shoutbox.php, just copied and everything worked. As far as I know, the files are the same for 1.1.7 and 2.0. The only thing, and I am not sure if this matters, but I have advanced shoutbox. I am not sure what version sunking used. Another questions, did you put a seperate link to the new php file. you can use either of these codes supplied by nneonneo.
<a href="http://domain.com/forum/yshout/index.php" target="_blank">Shoutbox</a>
This should popup a new window with the shoutbox.
To get fancier, you can adjust the link using JavaScript so the popup window is any size you choose, for example
<a href="javascript:window.open('http://domain.com/forum/yshout/index.php','Shoutbox','width=600,height=400')">Shoutbox</a>
*I had to change the location to point to the shoutbox.php file i created.
I copied that file also and put it into root directory. Shoutbox it self does work, but theme isn't working.
And yes, I will use this pop-up feature via separate link, but I haven't put that link visible to other members.
But in the attachment you can see how my shoutbox looks in pop-up.
Never mind the errors since I haven't cleaned the shoubox.php from the smiley code.
I think you're problem with the shoutbox style is the fact that your css code for it resides in your index.template.php and not in a separate yshout.css file. You could either open index.template.php and copy everything from <style> to </style> (including the style tags themselves) and then paste that into the <head> section of your shoutbox.php or paste that code (without the <style> tags into a separate file named yshout.css, which would then be uploaded to your theme's css folder. If you do the latter, make sure the URL pointing to the new css file is correct in shoutbox.php.
If that makes no sense, do not hesitate to ask for help. ;)
Quote from: n01d3a on December 12, 2008, 04:26:03 PM
To get fancier, you can adjust the link using JavaScript so the popup window is any size you choose, for example
<a href="javascript:window.open('http://domain.com/forum/yshout/index.php','Shoutbox','width=600,height=400')">Shoutbox</a>
Just for clarification... where exactly I should put this JavaScript code? So that I could get the pop-up link right next to Shout box title?
Quote from: SunKing on December 13, 2008, 01:51:36 AM
I think you're problem with the shoutbox style is the fact that your css code for it resides in your index.template.php and not in a separate yshout.css file. You could either open index.template.php and copy everything from <style> to </style> (including the style tags themselves) and then paste that into the <head> section of your shoutbox.php or paste that code (without the <style> tags into a separate file named yshout.css, which would then be uploaded to your theme's css folder. If you do the latter, make sure the URL pointing to the new css file is correct in shoutbox.php.
If that makes no sense, do not hesitate to ask for help. ;)
Does this apply to all four themes that I have?
But anyway I just can't find the <style> portion from my index.template.php .... or I just have gone blind :)
If your index.template.php does not have that code in it, then you might already have the yshout.css in your theme's main folder or in your theme's css folder. Also, check the default theme for the code in the index or the file in the default theme's main folder or css folder.
About the smilies.
Would it be possible to add "Moresmilies" link to shout box tool bar, where you can access the history, commands and so on?
Maybe that would work the same way as it works on postform, where you can get extra smilies into separate pop-up?
SunKing,
The last file didn't work either. Perhaps it just will not work with that theme.
I have made you an administrator on my forum. Have a look when you have the time.
I really appreciate all of your help!
I have the shoutbox working with the impulse theme (shoutbox at the bottom) on my test site.
You can see it at http://www.empireofthesun.net/testsite1/index.php (http://www.empireofthesun.net/testsite1/index.php). Is this what you wanted?
SunKing,
Ar you sick of me yet?
I've got the shoutbox header with the expand button, but there are no shouts to follow.
Quote from: SunKing on December 13, 2008, 12:21:55 AM
Your problem is in this section here:
<input type="hidden" name="hash_passwrd" value="" />
// 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
</form>';
It needs to look like this:
<input type="hidden" name="hash_passwrd" value="" />';
// 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
echo'</form>';
You were just missing the '; after <input type="hidden" name="hash_passwrd" value="" /> and the echo' before </form>. ;)
Thank you SunKing, you are a lifesafer and my wife thanks you, lol.
She was getting tired of hearing me.
Glad I could help! (Tell her she's welcome. ;))
@SunKing: Thank you so much for helping out. I haven't been too active because of finals, so I'm very, very glad that you are helping to field questions :)
@Nequil: For BBCode, add them to $bannedCode in yshout/settings.php, for commands, add to $bannedCommands.
Well....I figured I had been away for a while (updating my site to Beta 4) so was giving you a break). :P
Quote from: SunKing on December 13, 2008, 01:51:36 AM
I think you're problem with the shoutbox style is the fact that your css code for it resides in your index.template.php and not in a separate yshout.css file. You could either open index.template.php and copy everything from <style> to </style> (including the style tags themselves) and then paste that into the <head> section of your shoutbox.php or paste that code (without the <style> tags into a separate file named yshout.css, which would then be uploaded to your theme's css folder. If you do the latter, make sure the URL pointing to the new css file is correct in shoutbox.php.
If that makes no sense, do not hesitate to ask for help. ;)
I got it! There where few extra css folder refrences in the shoutbox.php code. I just deleted those and now pop-up will use the default theme.
Tricker part will be to get pop-up theme use the same theme as user uses, since I have 4 themes installed.
Yet another question about the pop-up :)
Where do i define the lineheight... shout width.. font size and so on?
Should those things put into shoutbox.php or does it use yshout.php settings?
If your paths are set up right it will use all of the styles from yshout.php's styles. As far as the height and width of the popup window, that needs to be controlled using javascript as described here:
Quote from: nneonneo on December 10, 2008, 09:26:19 AM
<a href="http://domain.com/forum/yshout/index.php" target="_blank">Shoutbox</a>
This should popup a new window with the shoutbox.
To get fancier, you can adjust the link using JavaScript so the popup window is any size you choose, for example
<a href="javascript:window.open('http://domain.com/forum/yshout/index.php','Shoutbox','width=600,height=400')">Shoutbox</a>
Quote from: SunKing on December 13, 2008, 03:30:12 PM
If your paths are set up right it will use all of the styles from yshout.php's styles. As far as the height and width of the popup window, that needs to be controlled using javascript as described here:
Quote from: nneonneo on December 10, 2008, 09:26:19 AM
<a href="http://domain.com/forum/yshout/index.php" target="_blank">Shoutbox</a>
This should popup a new window with the shoutbox.
To get fancier, you can adjust the link using JavaScript so the popup window is any size you choose, for example
<a href="javascript:window.open('http://domain.com/forum/yshout/index.php','Shoutbox','width=600,height=400')">Shoutbox</a>
I thought something like that, now I just need to find a good place for that pop-up link.
Maybe something like this?
(http://img229.imageshack.us/img229/7425/sbpopupvm1.jpg) (http://imageshack.us)
I thought it looked good there. ;)
Quote from: SunKing on December 13, 2008, 03:51:18 PM
Maybe something like this?
(http://img229.imageshack.us/img229/7425/sbpopupvm1.jpg) (http://imageshack.us)
I thought it looked good there. ;)
YES!! That's where I want it!
I just can't find a place to put that java in place ::)
This is my entire shoutbox function (adjust it to fit your needs - just thought i would give you an template to go by).
function shoutbox()
{
global $txt, $options, $settings, $context, $boardurl;
echo '<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;"><a href="#" onclick="sbToggle(); return false;"><img id="upshrinkSB" src="', $settings['images_url'], '/', empty($options['collapse_shoutbox']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="Shrink or Expand the ShoutBox" align="bottom" /></a> ';
// Block Title
echo '<span style="width:49%"></span><span>ShoutBox </span>
<span class="micro"><a href="javascript:window.open(\''.$boardurl.'/yshout/index.php\',\'Shoutbox\',\'width=600,height=400\');void(0);">View in Popup</a></span>';
echo '</div><div id="upshrinkSBHeader"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
echo' <div>';
require($boarddir.'/yshout/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/false), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
</tr>
</table></div>';
}
Quote from: nneonneo
@Nequil: For BBCode, add them to $bannedCode in yshout/settings.php, for commands, add to $bannedCommands.
thanks all works, but /me cant be blocked?
Quote// Note that since SMF recognizes /me by default, it can't be blocked.
I have Simple Portal installed, I get this error
8: Undefined variable: scripturl
File: /home/virtual/site69/fst/var/www/html/forum/Themes/default/languages/MGallery.english.php (eval?) BLOCK
Line: 4
Can i fix it?
Fantastic mod! :D
Can you make it so that it says like "NAME has just joined the conversation" when someone joins, and "NAME has quit" when they leave?
Maybe even a list of active users?
Quote from: Nascar on December 14, 2008, 08:03:58 AM
Fantastic mod! :D
Can you make it so that it says like "NAME has just joined the conversation" when someone joins, and "NAME has quit" when they leave?
Maybe even a list of active users?
there might be a glitch, go to different page
I know, but I hva placed the shoutbox on a custom page instead of the header, so for me it would be perfect :)
chatango?
@Nascar: There's a potential lag issue with IE: if you try to fire off an event when someone leaves a page, IE does some weird things and lags the page a lot. I have no idea why.
That said, it's not hard to do this: in initShoutbox(), add a call to makeShout() which says "/me has joined the chat" to the shoutbox. Then, add another action, for $_GET['signoff'] or similar, to makeShout('/me has left the chat'). Then, finally, you can just add an onunload event which fires off an AJAX call to yshout_php+'&signoff'.
@Nintendofanthr33: Try adding global $scripturl; above the offending line.
@Nequil: You can't really block /me because it is built-in to SMF, for example:
Quote/me tests /me
yields
/me tests /me
You could try replacing /me in the shout, e.g. add
$text=preg_replace('/^\/me /i','',$text)
before
preparsecode($text);
and see if that blocks /me.
I made it this way:
1. Added this function:
function hasJoined($text,$user=false) {
global $maxLines,$chatPath,$historyPath,$ip;
if($user===false)
global $user;
$emTitle=time()." | $ip";
$banID=isGuest($user)?$ip:$user['id'];
$timestamp="<span class=\"shout-timestamp\" title=\"$emTitle\"><timeval=".time()."></span>";
writeLine("<p class=\"shout\"><font color=\"green\">$timestamp $text</font></p>\n",$chatPath);
truncateChat($maxLines,$chatPath,$historyPath);
}
Then, added this to initShoutbox()
if($user===false)
global $user;
$text = cleanupShout($text.' ');
$a_style = "";
global $user_profile;
if(loadMemberData(Array($user['id']),false,'profile')!==false)
{
$profile=$user_profile[$user['id']];
$a_style = ' class="userclass" style="color: '.(empty($profile['member_group_color']) ? $profile['post_group_color'] : $profile['member_group_color']).'"';
}
$shoutName=$user['name'];
$userID=$user['id'];
if(isGuest($user))
$writeText=$shoutName;
else
$writeText="<a$a_style href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
$writeText.=" har kommit in i chatten.";
hasJoined($writeText,$user);
That works when someone joins, but it also displays the text when you click the sound button etc.
Ah, yes...that would be because pressing those buttons causes the init to be run again.
Maybe the best solution is to have a new JavaScript function called setStatus or similar, that looks like this (yshout/js/yshout.js):
function setStatus(status) {
new ajax (yshout_php, {
postBody: 'reqtype=status&status=' + status + '&file=' + shoutFile
});
}
Then, in yshout.php, after
case "autoshout":
if(isMod())
processCommand($_POST["shout"]);
break;
add
case "status":
if($_POST['status'] == 'on')
hasJoined('Online');
else
hasJoined('Offline');
break;
or similar. In index.template.php, change
window.onload=function(){loadChat();};
to
window.onload=function(){setStatus("on");loadChat();};
Finally, in yshout.js, change
function unloadChat() {
to
offline=false;
function unloadChat() {
if(!offline) { setStatus("off"); offline=true; }
That removed the chat :S
Maybe I did something wrong..
Try shift+refresh. Also, my instructions had a slight bug (wouldn't have prevented the chat from working AFAIK) relating to the "offline" status, so I've edited the post.
The chat returned, but when I logged out and in from SMF, it disappeared
Funny, it's working fine for me on my test board...you did do shift+refresh, and tried the new code?
Shoutbox is working (Reinstalled it).
But now, the message isn't displayed when someone join/quit :P
PHP syntax error
at line 4: $scripturlparsed = parse_url($scripturl);
Hey nneonneo, I have an update on the Google Chrome issue. My co-admin just noticed that Chrome posts fine when used in the popup window. I have no idea how useful that actually is for you, but I know he is happy again. ;)
@SunKing: It is because on the popup window, the shoutbox forces UTF-8. The bug in Chrome does not appear with UTF-8.
And here I thought I was onto something. :P
I've already asked Sleepy to take a look at it. Hopefully this gets resolved, one way or another. I have a feeling the WebKit team won't budge on this issue (after all, it is technically the correct behaviour...) so some changes will probably be made. Chrome, after all, is gaining popularity, as is Safari.
Hi Neonneo,
Got a quick question... I think the shoutbox is not letting my site validate.
I have this code which is used on my SimplePortal:
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div><div class="smalltext" style="padding:5px 0 0 5px;"><a href="javascript:collapse1.slidedown()">Open Smileys</a> | <a href="javascript:collapse1.slideup()">Close Smileys</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
You will notice that it also incorporates the smileys add on.
Now when I view the source of my site I have noticed that a name repeats twice (
name="shout_form" name="shout_form"):
<form id="shout-form" name="shout_form" name="shout_form" action="#" onsubmit="doSend();return false;">
<fieldset>
<input id="forum-name" type="text" maxlength="25" value="Youngie" disabled="disabled" />
<input id="shout-text" name="shout_text" type="text" maxlength="150" value="" />
<input id="shout-button" type="submit" value="Shout!" />
</fieldset>
</form>
When validating the page it returns one error which is that there is a closed form tag
QuoteError Line 363, Column 6: end tag for element "form" which is not open.
</form></div>
The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.
Now I suspect this to be due to the repeated name call as I checked this (view source > downloaded > edited) and it validated when I removed one of the repeated name calls (not sure if it would work when the name call is removed) only thing is I am not sure in what file I need to look for this repeat and if it is the correct thing to remove?
Could you clarify and also could you let me know if this is a mod issue or something I may have done?
Also just so you know I have modified the Shoutbox so:
- No timestamp appears
- No namebox appears
Not sure if these would cause the issue?
Also on the point regarding validation I also noticed that the smiley.php files was causing validation errors for me as the doctype area was being repeated - this returned 4 validation errors.
I have attached the file that I edited and put live on my site.
Cheers.
The name attribute is in yshout.php. It is likely that you accidentally duplicated it while adding smileys (a common, if mostly harmless mistake). If you want smiley.php to validate, just remove the DOCTYPE and html tags from it. That should fix the duplicate errors.
Hi neeo any luck with testing the lag issues with ligttptd?
I forgot about it in the hectic schedule of finals :(
Sorry, I will get to it today.
OK, I got Lighttpd installed and running. I was unable to make FastCGI work, so this isn't totally representative.
Under mod_cgi, I pushed it to about 20 open tabs (each with a shoutbox), before the lag exceeded ~2 seconds and I stopped the test.
I should note that my "server" is my development laptop, and therefore has rather poor specs for a real server. I can observe periodic spikes in CPU usage as the shoutbox refreshes on every single one (the period of each shoutbox refresh is 20 seconds, and the spikes follow this exact pattern) -- this might be a good point for using a randomized timeout. I am using localhost, which negates any network/bandwidth issues, so it is a pure server resources test. Both Apache and Lighttpd (both on mod_cgi) got to around the same point concurrency-wise.
So, maybe the problem is with fastcgi (which apparently dislikes my WLMP installation, despite my best efforts). I will see if I can get it working with fastcgi. Meanwhile, I hope these notes are at least a little bit informative.
P.S. server specs: 2GB RAM + Core 2 Duo @ 2GHz.
Quote from: Savvra on December 02, 2008, 04:26:37 PM
If I try to delete anything from the shoutbox using the admin links I get the error
"Session verification failed. Please try logging out and back in again, and then try again"
No matter how many times I relog I stil get the same error. I'm the admin of the forums and I'm using 1.22 and my smf stuff is all up to date. Any suggestions?
I've the same problem here: http://darkwolf.altervista.org/smf2/chat/
How you have fix?
-
PS: is possible to delete all shout with one click?
Can you tell me how to add a scroll bar to SMF 2.0 Beta 4 for this shoutbox? I saw some instructions, but they are for an older version.. Will they still work?
Or if I can limit it by time or something? its just getting really big.
Open yshout.css and find #yshout #shouts {
add these two lines to it
height: 200px;
overflow: auto;
where 200px is your desired shoutbox height.
Hello nneonneo
Well after some problems with the host the shoutbox has got some errors. I would like to fix them but the warning isn't exactly the best guides ;) Would really appreciate help.
Here are the warnings I'm getting at the top:
Quote
Warning: session_write_close() [function.session-write-close]: write failed: No space left on device (28) in /home/scarmix/public_html/yshout/yshout.php on line 763
Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in /home/scarmix/public_html/yshout/yshout.php on line 763
And at the bottom:
Quote
Warning: Unknown: write failed: No space left on device (28) 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 (/tmp) in Unknown on line 0
I have searched the topic for results and I found one. But the search only gave me the questions and not the answer that I could read. I would gladly read the posts if you don't want to answer them again which has to be a bit frustrating, I know from experience ;)
Thanks in advance,
Scarmix
Sorry for double post but
The problem seems to been a server problem and not a shoutbox problem. Sorry for not knowing this...
Regards,
Scarmix
Thank you Sunking.
You are quite welcome.
is there a way i can eliminate my members from posting porn pictures or any pictures except the smileys in shoutbox... i didnt see any options to allow or disallow img tags.. i tried a search but came up empty...thank you
Quote from: nneonneo on December 15, 2008, 01:35:21 PM
The name attribute is in yshout.php. It is likely that you accidentally duplicated it while adding smileys (a common, if mostly harmless mistake). If you want smiley.php to validate, just remove the DOCTYPE and html tags from it. That should fix the duplicate errors.
Where should I remove it from? What file - yshout.php - I cannot see it in the portal code I used and could not find it in the yshout.php - not sure where to remove it as I do not want to break it.
Quote from: nneonneo
@Nequil: You can't really block /me because it is built-in to SMF, for example:
Quote/me tests /me
yields
* nneonneo tests /me
You could try replacing /me in the shout, e.g. add
$text=preg_replace('/^\/me /i','',$text)
before
preparsecode($text);
and see if that blocks /me.
yeye thanks :) /me disabled
in
yshout.phppreparsecode($text);
$text = preg_replace('/^\/me /i','',$text);
I installed this on 2.0 Beta 4..and I can see it, other admins can see it, but my regular members can't..What can I do to fix this?
@DarkWolf: Find the three lines
session_start();
session_write_close();
@session_start();
and comment all three out (put // before the line, e.g. //session_start();).
To delete all the shouts with one click, try /clear.
@mickeyb107: One possibility is to add some rules for the shoutbox and temporarily ban users who don't abide by them. The other is to use $bannedCode (yshout/settings.php) to explicitly disable the [ img ] tag.
@Youngiiie: You probably have a line like this in yshout.php:
name="shout_form" name="shout_form" ...
Just remove all but one of them (for each line that contains multiple)
@EMOrtal: Membergroups -> Permissions in your admin panel; give the regular members the "View Shoutbox" option.
Hi I used the search in this topic but I couldn't find the answer.
My problem is I have auto embeded video clips mod installed and whenever someone types a link of say a youtube video the video is embeded onto the shoutbox. When you click the play button the video plays for a while and then stop playing. I'm guessing because the shoutbox is auto refreshed?
Is there anyway to stop the auto embed without removing the auto embed mod?
Hello I am using your mod of southbox but I am not capable of doing that my this chat inside a box in my forum. I use another topic that is not the default but me podrias to help to say to me since(as,like) I have to do it.
My version forum is 1.1.1 and how can i insrte the sb in the theme box please thanks.
Help Please
Quote from: nneonneo on December 18, 2008, 03:38:18 PM
@Youngiiie: You probably have a line like this in yshout.php:
name="shout_form" name="shout_form" ...
Just remove all but one of them (for each line that contains multiple)
Cheers bro.
Unfortunately it still does not pass validation (1 error) but I can live with that. ;)
Please since I can increase the size of the letters of the southbox.
Thanks for where help.
QuoteI made sort of guide for dummies, or something like that, to place this shoutbox in News field, and make it look cool on forum.
Personally, I believe this is the best position for shoutbox, and if you don't need News on your forum you could place shoutbox instead.
NOTE: I wrote tutorial and it works for 1.17 !!!
NOTE 2: With nneonneo's help - this works like a charm with version 1.21 also :)
For 1.21 installation see step instead of step, and then
follow all other steps normally.
First steps you already know, but I'll repeat it just in case;
First download yShout and install it.
If you're using different theme than default one after
[/s][/s]
Code: [Select]
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
you must add this code into your index.template.php :
[/s][/s]
Code: [Select]
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" 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;
}
</style>';
// YSHOUT END
Then do this:
Of course you need news box to be displayed in order to see shoutbox in your index page.
To do that go to Theme options and click to:
1. DISABLE eNews [it is very dangerous to leave it enabled, so if it is checked,
you must uncheck it]
&[/i][/size][/size]
2. Show news fader on board index [check it]
3. fading delay - set to 0
Click save, then in News box put this code
a) for 1.15-1.17
Code: [Select]
<div id="yshout">',$txt['yshout_loading'],'
b) for 1.21 [/s][/s]
Code: [Select]
<div id="yshout">Loading shoutbox...</div>
instead of putting second code somewhere else:
And save it.
If you wish to change News to Shout box or Shoutbox you'll need to find file index.english-utf8.php / index.english.php or of any other language file you're using. They are stored under Forum/Themes/default/languages/ In there you'll need to edit string $txt[102] = 'News';
to $txt[102] = 'Shoutbox'; and re-upload that file to it's place. You'll need to replace old file with that new-one if you didn't delete old one first.
// GUIDE FOR DUMMIES IS FINISHED // I guess that's it. I hope it shall be helpful to at least someone.
Step 4 is actually step 1 FOR 1.21 installation
In index.template.php, after
Code: [Select]
// 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" />';add
Code: [Select]
// 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
Best of luck 2 everyone[/hr]
I do this but this happens.
[img=http://img111.imageshack.us/img111/2124/16497422se4.th.jpg] (http://img111.imageshack.us/my.php?image=16497422se4.jpg)
@Casal: edit the font-size line in the index.template.php file
@al_ltoticmat: Try newer <head> code from the main mod page:
// 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
This replaces the previous <head> code block.
For nneonneo, ok and thanks very well.
After doing the post/topic update edits (for the first one before you edited it mostly, I am not sure)
I get this error:-
2: ob_start() [<a href='ref.outcontrol'>ref.outcontrol</a>]: output handler 'ob_gzhandler' cannot be used twice
File: /home2/goldysun/public_html/forum/yshout/yshout.php
Line: 761
Anything that can help ?
I have a little "problem", hope someone can help me with this, i installed the shoutbox (a wonderfull shoutbox btw) on my SMF 2.0b4 with PortaMX mod (done that by reading this topic, thanks to everyone that contributed), now, the "problem" is that the "History", "Commands" and the "ExtendedHistory" links are opening in another page, well, it opens on the same page, but on a "blank" page, it dosen't show up on the shoutbox itself. :(
I've put the
// 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
on a php box, maybe that's the problem, i don't know! :-[
Thanks in advance!
[EDIT] Just tested on the default SMF theme, removed the php box and its the same thing! :-\ [/EDIT]
@F.L.A.M.E.R: turn off $gzipCompression
@defcrash: Check the goTo function in yshout/js/yshout.js. It should look like this:
function goTo(args) {
if(request) request.abort();
document.location=getURL(args);
}
Thank u for answering but it still happens the same.
I think I can't install any mod because I install other mods but it doesn't appear.
But there are in the package menu and I've installed it.
Quote from: nneonneo on December 20, 2008, 01:09:37 AM
@defcrash: Check the goTo function in yshout/js/yshout.js. It should look like this:
function goTo(args) {
if(request) request.abort();
document.location=getURL(args);
}
nneonneo thanks for the reply, my goTo function its exactly what you typed, any other idea? :(
Good nights me another doubt has arisen, since I can increase the size of the letter when I see the record of the chat.
Thanks in advanced.-
En Español: Buenas noches me ha surgido otra duda,como puedo aumentar el tamaño de la letra cuando veo el historial del chat
hi there how do i decide which smilie should be shown in then smiley drop down and which should not be shown ???
Hi
I'm facing here a little problem with the nneonneo's Shoutbox.
I tested it, and 2 persons can be chatting! The question here is that I get almost every time (...like every 2 sentences) Php Error messages. So, we can send the message but most of times we gotta be writing again the message when the Php Error is being displayed.
Its neither practical or visually attractive to see those Errors and to have the need of typing for the second time the same message.
Does anyone knows what are this errors about?
I have a feeling that it might be also because the server is too slow (I'm at a free web hosting), but I don't know if it has any connection to it.
Well, I think i have done everything right, but maybe some think might be missing to avoid this erros.
Can someone tell me how to fix this?
Greetings,
Helio
..........................THIS ARE THE ERROS..................................................................
"PHP Error Message
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/a2512036/public_html/forum/Sources/Subs.php on line 321
Free Web Hosting
PHP Error Message
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/a2512036/public_html/forum/Sources/Errors.php on line 123
Free Web Hosting
PHP Error Message
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/a2512036/public_html/forum/Sources/Errors.php on line 124
Free Web Hosting"
Is there a way to have option to minimize this shoutbox?
The advanced shoutbox has the minimize ability. It can be done for the regular shoutbox as well. I just used the upshrink code from the InfoCenter changing every instance of "InfoCenter" to "ShoutBox" and every instance of "IC" to "SB". I am no coder, but I can follow patterns pretty darned well. :P
I have a theme called backinblack and I would like to use the shoutbox like I have it now on the default theme but when I insert the mod code for the theme to use it it doesnt do it... i need help
SunKing, Could you please suggest me to do that?
Just tell me which files I have to modify and some example code. Thanks.
We are running this shoutbox on a 1.1.7 SMF forum, and it seems the permissions aren't linking between the forum and the shoutbox.
eg. We've installed the spoiler addon in the forum, and it works. But when anyone other than an admin tries to post a spoiler in the shoutbox, it returns a "you don't have permission to post spoilers" message.
Any suggestions?
The forum is at www.othersi.com, and as you can see, the shouitbox has been repositioned to the top of the forum, below the header.
hello nneonneo how can i add or where can i add smiley bar inside the tp php block
heres the tp code please tell me how or where do i insert the code many thanks in advance ;)
// 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
Hi, I am having trouble with the shoutbox, after changing my forum host. With firefox, it loads but suddenly disappears, with ie it makes the browser crash (!). This is my forum: www.latanadeigoblin.tk
I tried reinstalling the packages, but it didn't solve the problem.
Any ideas?
hi as the admin i am able to see access the sb but when i regestireed as a new memeber i wasnt able to access it site da-legends.info test accountiloveyou:123456789
Quote from: MRDJ on December 26, 2008, 12:40:10 AM
hi as the admin i am able to see access the sb but when i regestireed as a new memeber i wasnt able to access it site da-legends.info test accountiloveyou:123456789
MRDJ, by default only the admin can use the shoutbox, you need to change the permissions to the other groups on your forum!
Quote from: nneonneo on December 18, 2008, 03:38:18 PM
@EMOrtal: Membergroups -> Permissions in your admin panel; give the regular members the "View Shoutbox" option.
[EDIT]
Quote from: defcrash on December 19, 2008, 06:28:24 PM
I have a little "problem", hope someone can help me with this, i installed the shoutbox (a wonderfull shoutbox btw) on my SMF 2.0b4 with PortaMX mod (done that by reading this topic, thanks to everyone that contributed), now, the "problem" is that the "History", "Commands" and the "ExtendedHistory" links are opening in another page, well, it opens on the same page, but on a "blank" page, it dosen't show up on the shoutbox itself. :(
I've put the
// 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
on a php box, maybe that's the problem, i don't know! :-[
Thanks in advance!
[EDIT] Just tested on the default SMF theme, removed the php box and its the same thing! :-\ [/EDIT]
This is driving me crazy... >:( I can't make this open on the shoutbox itself... >:( If i type /help the commands will show up in the shoutbox but for ex. if i click on the "Commands" link it will open in a blank page! When i put the mouse over the "Commands" link i can see it will link to "javascript:goTo('help')", when i click on it, it will open the http://www.mywebsite.com/forum/index.php?yshout&file=home&help! The same thing goes to the "History" and the "ExtendedHistory" links! :-[ [/EDIT]
Wow, sorry for the off-topic but I didn't know our AdvSB would be such a hit.
Lol, I see it being used on a lot of forums these days...
hey i install ur shout box on my forum but its showing me too much shouts on the page so its extreamly big. and i don't want the message and the shout button at the bottom i need it at the top how can i fix this?
Quote from: defcrash on December 19, 2008, 06:28:24 PM
I have a little "problem", hope someone can help me with this, i installed the shoutbox (a wonderfull shoutbox btw) on my SMF 2.0b4 with PortaMX mod (done that by reading this topic, thanks to everyone that contributed), now, the "problem" is that the "History", "Commands" and the "ExtendedHistory" links are opening in another page, well, it opens on the same page, but on a "blank" page, it dosen't show up on the shoutbox itself. :(
I've found a way for the "Commands" link, in the yshout.php instead of
echo '[<a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>]';
i've put
echo '[<a href="javascript:autoShout(\'/help\')">',$txt['yshout_commands'],'</a>]';
and now the "Commands" open in the shoutbox itself! :)
Can anyone share with me any idea for the "History" and the "ExtendedHistory" links? O:)
@nneonneo
hi, how I can enable "ex history" and "return" commands for members without group?
Default members have only "history" and "commands"
I'm just going to pop in here to answer the questions; for the next week I'm still officially on vacation :)
@al_ltoticmat: I'm not sure what you mean. The new <head> did nothing? Can you try turning off $gzipCompression in yshout/settings.php?
@Casal: edit the CSS in index.template.php, change the font-size in #yshout block.
@MRDJ: for smileys, the bar shows the same smileys as the regular forum post box does, so you would make the changes in the Smiley Sets page of Admin Panel.
@helio l lopes: Try seeing if your host will allow more simultaneous database connections. You can also try the instructions under "High bandwidth use for large forums" on the main mod page: those instructions can help lower the number of simultaneous connections to the database.
@DJ OC: Have you followed the instructions here (http://custom.simplemachines.org/mods/index.php?mod=585#post_otherthemes)?
@MothMan: I haven't heard this problem occurring before. The shoutbox should use the exact same permissions, since the BBCode parsing is tied into SMF...
@jazelle_rae: Add the code
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
after
echo '</div>
@juniorj23: Edit $maxLines in yshout/settings.php
@Nequil: In yshout.php, change
if(isMod())
{
echo ' [<a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>]';
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' [<a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>]';
else
echo ' [<a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>]';
echo ' [<a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>]';
}
to
echo ' [<a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>]';
if(isMod())
{
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' [<a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>]';
else
echo ' [<a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>]';
}
echo ' [<a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>]';
hi there can u tell me what do i need to edit to change the font in sb ...like if i want monotype corsiva font...and also the how to change the font size in the sb ???
Morning All, Just installed the awesome Shoutbox onto my forum, vers.1.1.7, installed no problem, As Admin, I can see it, types a few lines of chatter, nobody replied, so I logged out, Before I logged on as another user, the message: 'Sorry, you must be logged in to use the shoutbox!" appears on top, which is a good sign, when I logon as another user (2 different people). there is no reference or sign of the shoutbox. Do I have to enable the shoutbox as Admin so that other forum members can see and use it?
thanks 4 the effort
Morty
Quote from: mortymoose on December 30, 2008, 02:18:12 AM
Morning All, Just installed the awesome Shoutbox onto my forum, vers.1.1.7, installed no problem, As Admin, I can see it, types a few lines of chatter, nobody replied, so I logged out, Before I logged on as another user, the message: 'Sorry, you must be logged in to use the shoutbox!" appears on top, which is a good sign, when I logon as another user (2 different people). there is no reference or sign of the shoutbox. Do I have to enable the shoutbox as Admin so that other forum members can see and use it?
thanks 4 the effort
Morty
That as been answered over and over again on this topic. If you look on this
same page you'll find the answer!
Ooops! My Humblest apologies, And there it was, right before my blerrie eyes, thanks for that defcrash!
"The moose skulks away in shame!"
Quote from: nneonneo
@Nequil: In yshout.php, change
if(isMod())
{
echo ' [<a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>]';
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' [<a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>]';
else
echo ' [<a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>]';
echo ' [<a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>]';
}
to
echo ' [<a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>]';
if(isMod())
{
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' [<a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>]';
else
echo ' [<a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>]';
}
echo ' [<a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>]';
thanks man, all works :)
Quote from: mortymoose on December 30, 2008, 10:28:04 AM
Ooops! My Humblest apologies, And there it was, right before my blerrie eyes, thanks for that defcrash!
"The moose skulks away in shame!"
LOOOL :D it happens to everyone, btw, sorry for the way i posted, i'm in a bad mood today! :P
THANXS FOR THE HELP BUT 1 MORE PROBLEM HOW COULD I GET WHEN A MEMBER SHOUT THERE PICTURE SHOW UP BESIDE THERE NAME THAT WOULD BE VERY HELP FULL
@MRDJ: Edit the CSS in index.template.php, specifically the #yshout block. Change font-size as appropriate, and add a font-family declaration with your desired fonts, e.g.
#yshout {
(other declarations)
font-size: 10px;
font-family: "Monotype Corsiva", sans-serif;
}
The sans-serif is there just so that people without the Corsiva font can still read the shoutbox with a generic font.
@juniorj23: Please do not use all caps when posting. It is considered very rude.
That said, adding their image is as easy as putting $user['avatar']['image'] somewhere in the shout, e.g. changing
if(isGuest($user))
$writeText=$shoutName;
else
$writeText="<a$a_style href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
to
if(isGuest($user))
$writeText=$shoutName;
else
$writeText="<a$a_style href=\"index.php?action=profile;u=$userID\">$shoutName".$user['avatar']['image']."</a>";
in yshout.php to put their avatar after the username.
No matter what i do after installing the shoutbox, it wont show up... what do i do?
Is it possible some users ignore some others shout on the shoutbox?
for example they type /ignore user23
then he never see user23 shouts ...
ok, i'm trying to install the "notify users on new post" edit. I have it working 100% except for having it open in the same tab/window. i changed all the url tags to iurl and it still opens in a new tab. any ideas?
post.php
// Notify any members who have notification turned on for this topic.
if ($newTopic) {
notifyMembersBoard();
// YSHOUT TOPIC NOTIFICATION
$res = db_query("
SELECT
b.name
FROM ({$db_prefix}boards AS b)
WHERE b.ID_BOARD = $board", __FILE__, __LINE__);
$row = mysql_fetch_assoc($res);
if($row) $boardName = $row['name'];
ob_start();
global $context,$scripturl,$topic;
include_once('yshout/yshout.php');
makeShout('New Topic in board [iurl='.$scripturl.'?board='.$board.']'.html_entity_decode($boardName).'[/iurl]: [iurl='.$scripturl . '?topic=' . $topic . '.new#new'.']'.html_entity_decode($_POST['subject']).'[/iurl]');
ob_end_clean();
// YSHOUT TOPIC NOTIFICATION END
}
elseif (empty($_REQUEST['msg'])) {
sendNotifications($topic, 'reply');
// YSHOUT REPLY NOTIFICATION
ob_start();
global $context,$scripturl;
include_once('yshout/yshout.php');
makeShout('New reply: [iurl='.$scripturl . '?topic=' . $topic . '.new;topicseen#new'.']'.html_entity_decode($_POST['subject']).'[/iurl]');
ob_end_clean();
// YSHOUT REPLY NOTIFICATION END
}
Hi, I am having trouble with the shoutbox, after changing my forum host. With firefox, it loads but suddenly disappears after a few seconds. This is my forum: www.latanadeigoblin.tk
I tried reinstalling the packages, but it didn't solve the problem.
Any ideas?
hey i tried the code but i keep getting an error an all the forum closed dow when i add the code
@Pleek
Couldn't you use the target="_self" inside the tag?
@allart
Did it work perfect before changing hosts? Have you installed any other mods since changing hosts that may be conflicting with it?
@juniorj23
I added the code exactly as nneonneo instructed and the code worked perfect. The avatar was HUGE and butted up against the text, but it worked fine. ;)
@SunKing
apparently something was wrong with my server loading the new file. because when i came back to my site later it was working fine. thanks for the help though.
About BBC code in shouts
does anybody know how to add bbc buttons? like that are in the posts. So a user can click (http://www.simplemachines.org/community/Themes/smsite/images/bbc/bold.gif) for bold ect.
Currently, there is no way to add the BBC buttons.
Quote from: SunKing on December 31, 2008, 04:16:06 PM
@allart
Did it work perfect before changing hosts? Have you installed any other mods since changing hosts that may be conflicting with it?
Yes, and it still works perfectly on explorer and chrome. The only thing it's installed too is evilsentinel, a tool to prevent hacking, but it was installed too on the other host. The board is still up on the other host, here are the addresses:
new host: http://www.latanadeigoblin.tk/
old host: http://www.latanadeigoblin.helloweb.eu/
how is it possible? :'(
Hello
I have problem with this shoutbox because when i write some msg and press "send" then this message its not appear nowhere.
Someone know how to fix it?
installed the latest shoutbox but its not displaying anywhere, any ideas?
thnx really helped
@nneonneo
I just installed (and uninstalled) two separate mods and each one conflicted with the shoutbox. The SB would disappear after a few seconds. I searched through the code to see of there was a common denominator and there was! In both cases, the mods had added buttons to the menu. Also, in both cases, the $txt['mod_text'] wasn't added properly. And in both cases, when I hardcoded the button names into the Subs.php, the shoutbox was restored! I purposely added an "X" to the end of various $txt strings and uploaded the Subs.php only to find that the shoutbox had disappeared again. And again, by fixing the $txt strings or hardcoding the button labels, the shoutbox was restored. This may account for several people having the same error:
QuoteThe shoutbox appears, then quickly disappears.....
I have only tested this in SMF 2, but it may be something for you to investigate.
Hey Folks
Is there any easy way to remove or condense the date and time display on the shouts?
i.e. instead of "[Today at 06:30:59 PM]" maybe just have "[Today at 06.30PM]" or "[Today 06.30PM]" or even just "[Today]"
I have the shoutbox limited to about 500 width on my forum, so i'm looking for ways to condense the initial stuff down.
Any ideas?
Thanks
@Appendix
What version of SMF and what version of Shoutbox are you using?
@blakey
Are you using a custom theme?
Also, what version of SMF and what version of Shoutbox are you using?
@juniorj23
So your problem is solved?
@allart and @Nequil
I'm afraid that will have to be answered by nneonneo. ;)
@zach21uk
The time format is located at the very bottom of the settings.php in your yshout folder.
Thanks Sunking
Using 1.17 SMF
Trying to install Shoutbox:
Install Actions
Installations actions for "nneonneo's AJAX ShoutBox":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Are you trying to install the latest version of the shoutbox (1.22)?
NOTE: The shoutbox version has nothing to do with the SMF version (in other words, SB_1.17 is not specific to SMF 1.1.7).
Crap I downloaded the one at the top of the list instead of the bottom...sheesh....
My forum has been dormant for a year and now it's going again and I've forgotten all I've learned!! Sorry!
I just counted them and there are 25 versions of nneonneo's shoutbox (http://custom.simplemachines.org/mods/index.php?mod=585). :P
Just make sure you select SB1.22 for the regular shoutbox or AdvSB1.22 for the advanced shoutbox. Install it using SMF's package manager. If you are using a custom theme, you'll need to read Installation to Other Themes on the very first page. If you encounter any further problems installing this shoutbox, post back here with details of your error and we'll be glad to help you.
EDIT: I just read your last post. ;) No problem.
It's installed but I'm not using the default theme. I know I have to edit a page for my theme. When I tried to read the support forum for the shoutbox I couldn't find the English version so I don't know where to find the steps on how to insert the code and where.\
nevermind that was the OTHER shoutbox I looked at.... good grief I should go to bed LOL
Hey Folks,
Another little one thats been bugging me for ages. the "/me" command in the shoutbox is always red and I havent seen anything to change it.
Any ideas where I can update this?
Thanks
Zach
It's in your style.css under .meaction{......}. You can change color, size, style, etc inside that class.
TYVM Sunking
You are quite welcome. Glad I could help.
I get error message at the top that says "Shout Box
Sorry, you must be logged in to use the shoutbox!"
I am logged in and it still shows that
seems like everyone is having problems with this mod
If you only have three people with errors but there are only three people with the mod installed, then that would be 100% failure rate. You see a lot of "questions" in here first because this is where they are supposed to be asked, and, because there is a large number of people installing the mod. I will be more than happy (as will nneonneo) to help you get it installed properly on your site. ;)
What version of SMF and what version of the shoutbox?
Powered by SMF 2.0 Beta 4 i did the install manually top left corner shows: (http://i40.tinypic.com/111npfs.jpg)
What version of the shoutbox did you install? Any reason in particular why you installed it manually? What theme are you using?
i installed: SB_1.22.zip
reason why i did it manyally is because every time i try to install a mod it always times out
What theme? Can you provide a link to your site, either here or through PM? Also, if need be, you can attach files here and I can edit them for you. I have installed it on probably 60 or 70 sites to date. ;)
it was installed on the default theme. What files do you want me to provide?
I guess for starters, just your index.template.php.
Did you put the yshout folder and all of it's contents into your forum's root folder already?
yes i putted everything from that folder to my root directory
Your index.template.php seems right. Attach your yshout.js please (forum/yshout/js/yshout.js). Also you have a Message.
here
Nneonneo, please help me
I want to insert toggle to show or hide shoutbox, so i insert this code to index.template.php. But it error template parse error.
I think this error occured about incorrect ' sign or " sign. Please help me, Thanks in advance.
<div class="tborder" style="margin-top: 0; margin-bottom:7px;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center; "><span style="float:left; margin-left:5px;"><img src="', $settings['images_url'], '/messenger.gif" alt="" /></span>คุยกันสดๆ</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg2" width="80%">
<script type="text/javascript">
<!--
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
//-->
</script>
<a href="#" onclick="toggle_visibility('yshout');">show/hide chat</a>
<div id="yshout">
include_once($boarddir.'/yshout/yshout.php');
echo '
</div>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">ใช้ไอค่อนอารมณ์</a> | <a href="javascript:collapse1.slideup()">ปิดไอค่อน</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
I have SMF 1.1.7 and tried to install the current SB_1.22 version and I am getting a "FTP Information Required
Some of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders. Your FTP information may be temporarily cached for proper operation of the package manager."
Any ideas??
@savek
Your code inside the <script> needs backslashes in front of the single quotes, and you are missing a ';. Here is what the piece of code should look like.
<div class="tborder" style="margin-top: 0; margin-bottom:7px;' , $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'width: 100%;' : '', '">
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center; "><span style="float:left; margin-left:5px;"><img src="', $settings['images_url'], '/messenger.gif" alt="" /></span>คุยกันสดๆ</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg2" width="80%">
[b]<script type="text/javascript">
<!--
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == \'block\')
e.style.display = \'none\';
else
e.style.display = \'block\';
}
//-->
</script>
<a href="#" onclick="toggle_visibility(\'yshout\');">show/hide chat</a>[/b]
<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '
</div>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">ใช้ไอค่อนอารมณ์</a> | <a href="javascript:collapse1.slideup()">ปิดไอค่อน</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
@GhostWalker
That is a normal request by SMF. Just provide your FTP info and it will make the necessary changes to the files. ;)
Thank You!!! SunKing!!! YOU SAVED MY LIFE ;D
Glad I could help. :D
Hi guys I need your help, I am lost :S I have SMF 1.1.7 with mystic jade theme and i've installed shoutbox. On the default SMF theme its working fine but when i switch to mystic jade theme its not showing up. I searched everywhere but still I can't get it working. Somebody told me to install tiny portal, do I have to? Please help.
Quote from: Picobrain on January 06, 2009, 08:04:54 AM
Hi guys I need your help, I am lost :S I have SMF 1.1.7 with mystic jade theme and i've installed shoutbox. On the default SMF theme its working fine but when i switch to mystic jade theme its not showing up. I searched everywhere but still I can't get it working. Somebody told me to install tiny portal, do I have to? Please help.
Go to the 1st page on this topic and find "Installation to Other Themes"! ;)
Although this mod is really great i had to remove it because im re-desing my whole forum. I did remove the shoutbox manually and now I get error message that copyright is missing from my forum?
What did I do wrong?
Quote from: defcrash on January 06, 2009, 08:15:01 AM
Quote from: Picobrain on January 06, 2009, 08:04:54 AM
Hi guys I need your help, I am lost :S I have SMF 1.1.7 with mystic jade theme and i've installed shoutbox. On the default SMF theme its working fine but when i switch to mystic jade theme its not showing up. I searched everywhere but still I can't get it working. Somebody told me to install tiny portal, do I have to? Please help.
Go to the 1st page on this topic and find "Installation to Other Themes"! ;)
yeah I saw that, but the 2nd part is confusing: 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..
What that means?
i have tis error please tell me y
Fatal error: require_once() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a7592045/public_html/sample/yshout/yshout.php on line 195
@ Picobrain: well, that simply means that there are 2 blocks of text, and you just pick one of them, and copy-paste into your index.template.php It's that simple Picobrain.
@ nwobhm: maybe you placed your shoutbox code next to copyright code and deleted to much???
Quote from: ameo on January 06, 2009, 12:36:47 PM
@ Picobrain: well, that simply means that there are 2 blocks of text, and you just pick one of them, and copy-paste into your index.template.php It's that simple Picobrain.
@ nwobhm: maybe you placed your shoutbox code next to copyright code and deleted to much???
I thought so too, but problem is now solved.
Quote from: ameo on January 06, 2009, 12:36:47 PM
@ Picobrain: well, that simply means that there are 2 blocks of text, and you just pick one of them, and copy-paste into your index.template.php It's that simple Picobrain.
Thank man, but I've done that and nothing happens. Do i have to enable shoutbox somewhere?
Which version of the shoutbox?
i am using latest version shout box and smf 1.17
There is a basic shoutbox SB_1.22 and an advanced shoutbox AdvSB_1.22. While they are both v1.22, they are different installations. Did you install the basic or the advanced version?
I instaled the shoutbox in my board (version 1.1.7), and when I went to Firefox to see if everything is ok, I noted this:
(http://img166.imageshack.us/img166/9527/firefox3mb2.th.jpg) (http://img166.imageshack.us/my.php?image=firefox3mb2.jpg)
Someone knows how to fix it? o_O
Can you attach your index.template.php please?
Just wanted to say that youve been doing a great job supporting this Shoutbox Sun!
Quote from: SunKing on January 06, 2009, 09:01:00 PM
Can you attach your index.template.php please?
Here... (thanks for help ^^)
Edit: Oh my God, sorry! I just realized today that I deleted one line of the code (in the index.template) for mistake! Oh shameeeeeeeeeeeee :'(
Sorry again, it is working fine now! XD
Please help giving problems of connection to this me and not because spending this one
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/canto/public_html/Sources/Subs.php on line 321
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/canto/public_html/Sources/Errors.php on line 123
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/canto/public_html/Sources/Errors.php on line 124
hello neonneo plzz help me
my forum was off due to this error
Quote
Fatal error: Cannot redeclare shoutbox() (previously declared in /home/content/k/a/s/kashifccc/html/stayhere/Sources/Load.php(1932) : eval()'d code:699) in /home/content/k/a/s/kashifccc/html/stayhere/Sources/Load.php(1932) : eval()'d code on line 753
my forum link is http://stayhere.stanaca.com
help me plzz
Notice: Undefined index: news in /home/xxxxx/public_html/Sources/Subs.php on line 3024
its working but iam taking this why?
Erk, 60 new replies...I can't keep up with it all :'(
So, I am going to request that if you have an unanswered question, please post again.
Thank you very much SunKing, for all the support you have provided :)
P.S. Most of the problems with spontaneously closing shoutboxes can be traced to some missing language strings, but to fix the shoutbox closing, I suggest you turn off $gzipCompression first. That way, you can actually see what is going wrong.
Welcome back! I hope your vacation was enjoyable. :D
I had posted about the language string issue a few pages back. ;D
Also, I was working on a shoutbox a few days ago and found an issue with the login and the shoutbox. If a member used the "built in" login form on the main page, the shoutbox would not sign them in. If they clicked on the LOGIN button in the menu and logged in using
that form, the shoutbox would log them in normally. Also, if they did not click the "log in forever" box, the shoutbox would fail to log them in.
I checked this on my site and had the same results. The forum would show them as logged in but the shoutbox would show the guestid (or "You need to be logged in to use the shoutbox." if guest permissions were disabled).
Quote from: nneonneo on January 07, 2009, 09:42:46 PM
Thank you very much SunKing, for all the support you have provided :)
You are quite welcome. Unfortunately, there were a few questions that I was unable to answer, so I asked them to kindly wait until you returned. O:)
hello neonneo plzz help me
my forum was off due to this error
Quote
Fatal error: Cannot redeclare shoutbox() (previously declared in /home/content/k/a/s/kashifccc/html/stayhere/Sources/Load.php(1932) : eval()'d code:699) in /home/content/k/a/s/kashifccc/html/stayhere/Sources/Load.php(1932) : eval()'d code on line 753
my forum link is http://stayhere.stanaca.com
help me plzz
I PM'd you earlier with a fix for that error lucky_jan. ;)
Put a // in front of one of the instances of shoutbox(); in your index.template.php. that will get your forum back.
Then, attach your index.template.php here and I will fix it for you. ;)
hello sir this is index.tamplate.php plzz fix my error
Here you go. That was simply caused by installing the mod twice without uninstalling it. It should work fine for you now. :D
wait i ill check then inform u
Quote from: SunKing on January 08, 2009, 02:21:58 AM
Here you go. That was simply caused by installing the mod twice without uninstalling it. It should work fine for you now. :D
yahoooooooooo :)
yahoooooooo :)
i m very thankful to u i love u sir love u sunking
God Bless u
I just installed the shoutbox on my forum http://bobthepleo.com/forums
It seemed to install correctly.
When I am logged in as admin, it seems to work great. :D
When I am logged out (guest) I get the "Sorry, you must be logged in" message. :)
But when I log in as a regular member, the "...loading Shoutbox..." message appears momentarily, then goes away, and all that is left is the Shout Box title. :(
This is true for any user. Only the admin sees the shouts.
I have tested this on several different machines, using Firefox 3.0.5 and IE6, all do the same. However, I have had one other member report getting an actual script error:
Line: 103
Char: 3
Error: 'objDiv' is null or not an object
Code: 0
URL: http://bobthepleo.com/forums/index.php
Hi there i am getting the following error when i have installed your mod.i have attached the subs.php to the post as well for you to look at as well.
Notice: Undefined index: smf10 in /home/cxtxtsju/public_html/forum/Sources/Subs.php on line 866
Notice: Undefined index: lang_locale in /home/cxtxtsju/public_html/forum/Sources/Subs.php on line 875
Notice: Undefined index: smf10 in /home/cxtxtsju/public_html/forum/Sources/Subs.php on line 866
Notice: Undefined index: lang_locale in /home/cxtxtsju/public_html/forum/Sources/Subs.php on line 875
Notice: Undefined index: smf10 in /home/cxtxtsju/public_html/forum/Sources/Subs.php on line 866
Notice: Undefined index: lang_locale in /home/cxtxtsju/public_html/forum/Sources/Subs.php on line 875
Notice: Undefined index: smf10b in /home/cxtxtsju/public_html/forum/Sources/Subs.php on line 870
Notice: Undefined index: lang_locale in /home/cxtxtsju/public_html/forum/Sources/Subs.php on line 875
neo : can the image spacer be removed ? (the spacer after every msg.)
2. is there a way to decrease the msg. line from a few 20's to say like 6 or 7 ? and use a scroll bar instead of none ?
great job btw. :) keep it up.
@nneonneo
hey,
I added permission (only members over 25 posts can write in shoutbox), but members under 25 post see blank space.
view of the user under 25 posts: (just nothing)
(http://img513.imageshack.us/img513/1733/asdhn8.png)
so, I wanna put on it some text "you dont have 25 post to view shoutbox" like when you logout from forum you see "sorry, you must be logged in to use the shoutbox!"
thanks for help bro :)
i cant add smileys to the shoutbox
whenever I do so my package page cannot be seen please help
@mweed
You need to set the permissions for other members to see the shoutbox (in the permissions area of the Admin CP).
@ chrisb
What version of SMF and what version of the shoutbox do you have installed?
@henryjesus
1) There is a <br /> in the time format at the bottom of /yshout/settings.php. Remove it to get rid of the extra space (I think that is what you want).
2) Find the yshout.css (or if you do not have that file, the style section for the shoutbox in your inde.template.php) and search for #yshout #shouts {. Add on a new line just beneath that overflow: auto; and beneath that height: 200px;. The height can be adjusted as desired.
@Nequil
That's still a question for nneonneo to answer. ;)
@devilhell007
What version of SMF and what version of the shoutbox do you have installed?
Thanks sunking!! ;D problem solved!
I knew it had to be something silly I as overlooking. I checked the admin section but was looking for a tab or topic for the shoutbox. never thought to look inside the permissions.
I'm probably over looking it somewhere in this thread but I was trying to make a sound work... I uploaded both the soundmanager files and an mp3 sound. However when I go to locate....
<script src="',$boardurl,'/yshout/js/yshout.js?Jul222007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
in my index.template.php file, I cannot find those lines of code. Am I searching the wrong file?
@Nequil: Quite easily done, actually.
The shoutbox code looks like this:
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
[shoutbox code]
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
After
echo $txt['yshout_no_guests'];
add
else echo 'You cannot see the shoutbox, sorry!'
or whatever other text you wish to show. Then, any unauthorized users will see that message.
@scsmilin: Try looking for
<script src="',$boardurl,'/yshout/js/yshout.js?July062008" type="text/javascript"></script>
instead; the code changed for 1.20+. I have updated the original post to reflect this.
Ok, so I decided to uninstall 1.21 version of Shoutbox and install 1.22 version, but it's acting as an upgrade. Do I have to install 1.21 before installing 1.22?
Reason I uninstalled was because I couldn't install the shoutbox into newly installed themes, even though I followed the instructions shown on the mod page on how to install to other themes.
Edit: GOT IT! Had to delete the logs from the database file :D
Ok, you know what? I'm having a number of problems right now. I need to see what I can do before posting a question :(
I'm still not getting it to work but could be because I'm not sure where to put .......
function ltrim(text) {
return text.replace(/^\s*/g,'');
}
var request;
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML))
soundManager.play('sound');
oldShouts = $("shouts").innerHTML;
or if I actually need it at all?
@scsmilin: You should just replace the text specified in the post in yshout.js. If you can't find it, then tell me what version of the shoutbox you are running.
Quote from: nneonneo on January 08, 2009, 08:22:15 PM
@Nequil: Quite easily done, actually.
The shoutbox code looks like this:
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
[shoutbox code]
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
After
echo $txt['yshout_no_guests'];
add
else echo 'You cannot see the shoutbox, sorry!'
or whatever other text you wish to show. Then, any unauthorized users will see that message.
doesnt work, look... "no guest" work perfectly, but I must add some text for member group which have less than 25 posts, because I disabled them shoutbox.... and your code doesnt work. (style error or something) :<
Whoops, I forgot a semicolon. Put a semicolon at the end of the else line.
ok, but I have shoutbox in news header... :>
and I don't have this code
// 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
attach
Hi There
I would like to know if its possible to have the shoutbox display in another area of the forum.
I have the custom actions mod installed, and I wanted to add a link to my shoutbox called "enlarge" which would redirect folks to another page with a bigger version of the shoutbox displayed.
Would this be possible?
Thanks
zach
Hi There,
No doubt in 245 pages this question has been asked a few times so Ill apologise before I ask again.
Is it possible to restrict use of the shoutbox to specific members groups in smf2b4 ?
@zach21uk
You can just point your link to {your forum}/yshout/index.php and add some javascript to have the new window whatever size you wish.
@glennk
There are 3 permissions for shoutbox inside the admin CP permissions area (View Shoutbox, Post in Shoutbox, and Moderate Shoutbox). 245 pages is a lot to look through. ;)
@Nequil: In that case, edit yshout.php.
Change
if(!allowedTo('yshout_view'))
{
if(isGuest())
echo $txt['yshout_no_guests'];
return;
}
to
if(!allowedTo('yshout_view'))
{
if(isGuest())
echo $txt['yshout_no_guests'];
else
echo "Sorry, you are not allowed to use the shoutbox...";
return;
}
hi guys... recently i did install nneonneo's Shoutbox following Installation instructions for SMF 1.1.7, because i can't installed on Package admin manager due has problems with ftp needs to modify are not writable
then i did manually following this rules: http://custom.simplemachines.org/mods/index.php?action=parse, but shoutbox doesn't available in top forum.
how can i fix this problem? only i can see Shout Box name, but doesn't box to posting.
This is my forum: http://technoinvite.co.cc/index.php
also permissions are actived to users, guests and moderators to see shoutbox.. but i cant see ajax shoutbox.
thanks
nothing ? :( :'(
i need help!
Attach your index.template.php and I will have a look.
You shouldn't expect an answer in just 2 hours and 26 minutes. ;) Everyone here provides support in their spare time.
ok bro... this is ./Themes/default/index.template.php
thanks a lot :)
Your index file looks alright. Are you sure all of your manual edits are in place? For the ftp information being asked, it should be the same info you used to install SMF.
If you want, you can set up a temp admin account and PM me the details. I can perform the edits for you.
I would try the package manager and ftp info again if I were you. ;)
ok bro, thanks, check PM ;D
I think it's all taken care of now. ;) Post back if you need any other help.
hey hey bro.. THANKS A LOT FOR YOUR HELP!!! :)
:D happy happy happy yujuuuuuu!!
THANKS! ;D
Edit: when i leave a msg on shoutbox appear this: File error (writeLine); aborted
:(
It's fixed. I had to manually make your chat files writable. ;)
nneonneo, do you know how to make it like inferno shoutbox for vB and have which members are viewing the shoutbox? I've been trying to figure it out for ages.
Quote from: SunKing on January 09, 2009, 05:23:38 PM
@zach21uk
You can just point your link to {your forum}/yshout/index.php and add some javascript to have the new window whatever size you wish.
Can I make the shoutbox on that page use a different settings.php - for example settings1.php - I want to have a different amount of allowed lines.
Quote from: nneonneo on January 09, 2009, 05:57:51 PM
@Nequil: In that case, edit yshout.php.
Change
if(!allowedTo('yshout_view'))
{
if(isGuest())
echo $txt['yshout_no_guests'];
return;
}
to
if(!allowedTo('yshout_view'))
{
if(isGuest())
echo $txt['yshout_no_guests'];
else
echo "Sorry, you are not allowed to use the shoutbox...";
return;
}
thanks nnenneo, all work :) you rox ;]
Thanks for the advice above. I decided to check it out to see what permissions there are. I would like to limit access to 2 paying members groups - one based on posts and one based on those willoing to pay to use.I get 2 errors for installation
* 7. Execute Modification ./Sources/ManagePermissions.php Test failed
1. Add After ./Sources/ManagePermissions.php Test failed
8. Extract Tree ./yshout
@zach21uk
I think you could just do a simple include to have a separate settings.php. Something like include ('yshout/settings1.php'); ought to work.
@glennk
Have you tried to do the edits to the ManagePermissions.php manually? If you attach your ManagePermissions.php, I can do the edits for you.
Can you lead me to or show how public users cant see history.
Thks great software.
http://juevosdeldiablo.com/forum/
Hi!
I've installed your Advanced Shoubox.
I'm running SMF 2.0 B4 with PortaMX and needed to install some code manually as i got a warning message when i tried to instal he package.
I'm running a custom theme.
I inserted the shout start code in a php block and i got this error. (See attached image)
How o solve this?
In Subs.php
=========
line 3758: 'title' => $txt['forum'],
line 3760: 'show' => $context['PortaMx']['settings']['frontpage'] != 'none',
line 3802: 'title' => $txt['pmx_settings'],
line 4015: if($context['PortaMx']['settings']['frontpage'] != 'none')
Thanks,
magnastik
Quote from: SunKing on January 10, 2009, 10:51:55 AM
@zach21uk
I think you could just do a simple include to have a separate settings.php. Something like include ('yshout/settings1.php'); ought to work.
I tried using a PHP include as you suggested but it has no effect on the page.
Here are the first few lines of code, you can see the one I added in
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Shoutbox</title>
<?php
// YSHOUT HERE - <head> code
require_once 'settings1.php';
global $boardurl,$shoutFile;
$boardurl=".."; // change this to the relative or absolute path to the forum root
That piece of code should look like this:
<?php
// YSHOUT HERE - <head> code
require_once ('settings1.php');
global $boardurl,$shoutFile;
$boardurl=".."; // change this to the relative or absolute path to the forum root
and make sure the path to settings1.php is correct. ;)
Hello as the values of time are able to change for update of this chat because on having been so followed we are having problems to connect with the database of our forum for his fault
Quote from: SunKing on January 11, 2009, 12:24:59 PM
That piece of code should look like this:
<?php
// YSHOUT HERE - <head> code
require_once ('settings1.php');
global $boardurl,$shoutFile;
$boardurl=".."; // change this to the relative or absolute path to the forum root
and make sure the path to settings1.php is correct. ;)
I fixed the code, and specified a different number of lines in my settings1.php but it hasnt had an effect. You can view here:
http://hailingfrequency.co.uk/boards/yshout/index.php
It should be displaying around 40 lines but instead its displaying 17 or 18 as its set in the main settings.php
Any more ideas?
Quote from: swampy on December 06, 2008, 12:29:48 PM
Feline the author of PortaMx fixed the problem with the following
=========================================================
QuoteQuote from: Penguin on Today at 00:33:25
Notice: Undefined index: forum in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 3936
Notice: Undefined index: PortaMx in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 3938
Notice: Undefined index: pmx_settings in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 4000
Notice: Undefined index: pmx_blocks in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 4005
Notice: Undefined index: PortaMx in /home/tvgrapev/public_html/smf/Sources/Subs.php on line 4207
I think, I have found the problem ...
Please try this:
Open SSI.php in a editor ...
Find:
Code: [Select]// Load the current user's permissions....
loadPermissions();
Add after:
Code: [Select]//-> start add PortaMx
if(!defined('PortaMx'))
{
require_once($sourcedir . '/PortaMx/PortaMx.php');
PortaMx();
}
//-> end add PortaMx
Now the error is gone I think
Fel
Thank you for this! I just upgraded to SMF 2.0 Beta 4, and installed PortaMX with the shoutbox, and got that error. Popped the code in and it's fixed! :D
how can I get time line and shout text in 1 line???
Ok I finally have installed shoutbox on my forum (actually ameo installed it for me, thanks dude ;) ) and I have 2 questions:
1. How can I put shoutbox on the bottom of the page, right now its on the top.
2. Can I hide somehow shoutbox not to show on every page? For example if I go to my profile I can still see the shoutbox, or if I go in the admin panel shoutbox is still there. I just want shoutbox to show only on the first page of the forum.
Thank you
how do you reduce the lines for the shoutbox ?
@MrMoney: I swear that I've posted instructions on how to do it before...unfortunately, the search feature refuses to show me more than one post, so I can't find it :(
The previous one was for making the shoutbox show people entering/leaving as shouts (IRC-style), but the idea is the same.
The basic idea is this: when the chat is loaded, add the user to a list of active users, and when the chat is unloaded, remove the user from that list. The active list can be included as part of the shout updates, which should reduce the amount of AJAX required.
Really early versions (pre-1.03) came with a disabled form of typing notification, which would show users who was typing at a given moment. However, that killed servers very quickly due to the incredible load, which is why it was disabled. Unfortunately, I don't have a copy of that script any more.
@SirTony: Open yshout.php and change
// Regular user $_GET commands: history, help
if(isset($_GET["history"]))
{
history();
exit;
}
to
// Regular user $_GET commands: history, help
if(isset($_GET["history"]))
{
if(isGuest()) echo 'Register to view shoutbox history.';
else history();
exit;
}
@magnastik: Have you tried http://www.simplemachines.org/community/index.php?topic=137508.msg1829501#msg1829501?
@Casal: Uhh, sorry, I'm not sure what you are saying. Are you getting database errors of some sort?
@zach21uk: There's a way to do it. It's a little hack, but it is minimally invasive.
Open up yshout.php. Before
// Check configuration files
if(!file_exists($yshoutdir.'settings.php'))
add
if(isset($_REQUEST['file']) && $_REQUEST['file'][0]=='!') $settingsPath = 'settings1.php';
else $settingsPath='settings.php';
Now change both
'settings.php'
to
$settingsPath
(n.b. one might be "settings.php")
Now, if $shoutFile starts with an exclamation mark (which will be stripped off later), the alternate settings file gets loaded. So, we can just change
$shoutFile='home';
to
$shoutFile='!home';
in the files where the alternate settings should be loaded.
Note that this doesn't scale to more settings files well, but the advantage is minimal modification of the scripts.
@adventurer: Edit preg_timeformat in yshout/settings.php to your liking...
@Picobrain: You can opt to move the shoutbox code (the block with // YSHOUT HERE - shoutbox code) from index.template.php where it is installed by default to BoardIndex.template.php, and place it at the bottom as you desire in that file.
@henryjesus: Edit yshout/settings.php and reduce $maxLines.
OK. Let me try this...
These are instructions for making an online-users list. They are most definitely alpha instructions, so they might not work 100%.
In yshout/js/yshout.js, change
function unloadChat() {
to
function setStatus(status) {
new ajax (yshout_php, {
postBody: 'reqtype=status&status=' + status + '&file=' + shoutFile
});
}
function unloadChat() {
setStatus("off");
In yshout.php, change
// Load settings
require_once($yshoutdir."settings.php");
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance;
to
if(!file_exists($yshoutdir.'_status.php'))
{
// If _status.php has been deleted, assume it should be reset to defaults
$online_list=array();
$sbMaintenance=false;
writeBanList();
}
// Load settings
require_once($yshoutdir."settings.php");
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance;
require_once($yshoutdir.'_banlist.php');
global $online_list;
require_once($yshoutdir.'_status.php');
Change
case "autoshout":
if(isMod())
processCommand($_POST["shout"]);
break;
}
to
case "autoshout":
if(isMod())
processCommand($_POST["shout"]);
break;
case "status":
setStatus($_POST['status']=='on');
break;
}
function getStatus() {
global $online_list;
$list=$online_list;
if(isset($list[0]) && $list[0] >= 1) {
$list[0] = $list[0] . ' guest' . (($list[0]!=1) ? 's': '');
} else {
unset($list[0]);
}
return '<br /><div id="status">Users currently viewing the shoutbox: '.implode(', ', $list).'</div>';
}
function writeStatus() {
global $online_list, $yshoutdir;
$writeText = "<"."?php\n"; // php header
$writeText .= '$online_list = '.var_export($online_list,true).";\n";
$writeText .= '?'.'>'; // end tag
$handle = fopen($yshoutdir."_status.php", "w");
if($handle===false) die('File error (writeStatus); aborted');
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two bans happen simultaneously
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeStatus); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
function setStatus($online) {
global $user, $online_list;
if($user['id']==0) {
if($online)
$online_list[0]++;
elseif($online_list[0] >= 1)
$online_list[0]--;
} else {
if($online && loadMemberData(Array($user['id']),false,'profile')!==false) {
global $user_profile;
$profile=$user_profile[$user['id']];
$a_style = ' class="userclass" style="color: '.(empty($profile['member_group_color']) ? $profile['post_group_color'] : $profile['member_group_color']).'"';
$online_list[$user['id']]="<a$a_style href=\"index.php?action=profile;u=".$user['id'].'">'.$user['name'].'</a>';
} elseif(!$online) {
unset($online_list[$user['id']]);
}
}
writeStatus();
global $chatPath;
touch($chatPath);
}
Change
return $chatText.' '; // hack: totally empty responses can break some browsers
to
return $chatText.getStatus().' '; // hack: totally empty responses can break some browsers
Quote from: nneonneo on January 12, 2009, 09:35:34 AM
@zach21uk: There's a way to do it. It's a little hack, but it is minimally invasive.
Open up yshout.php. Before
// Check configuration files
if(!file_exists($yshoutdir.'settings.php'))
add
if(isset($_REQUEST['file']) && $_REQUEST['file'][0]=='!') $settingsPath = 'settings1.php';
else $settingsPath='settings.php';
Now change both
'settings.php'
to
$settingsPath
(n.b. one might be "settings.php")
Now, if $shoutFile starts with an exclamation mark (which will be stripped off later), the alternate settings file gets loaded. So, we can just change
$shoutFile='home';
to
$shoutFile='!home';
in the files where the alternate settings should be loaded.
Note that this doesn't scale to more settings files well, but the advantage is minimal modification of the scripts.
I'm probably being really stupid here, but im getting and error in the shoutbox now saying "no settings"
This is my code:
// Figure out where the yshout folder is
global $yshoutdir;
$yshoutdir=(defined('SMF')||isset($yshout_from_index))?'yshout/':'';
if(isset($_REQUEST['file']) && $_REQUEST['file'][0]=='!') $settingsPath = 'settings1.php';
else $settingsPath='settings.php';
// Check configuration files
if(!file_exists($yshoutdir.'$settingsPath'))
{
echo 'Error: No settings.';
return;
}
if(!file_exists($yshoutdir.'_banlist.php'))
{
// If _banlist.php has been deleted, assume it should be reset to defaults
$ban_ips_readpost=$ban_ips_post=$ban_names_readpost=$ban_names_post=array();
$sbMaintenance=false;
writeBanList();
}
// Load settings
require_once($yshoutdir."settings.php");
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance;
What have I done wrong?
Don't put quotes around $settingsPath. You also need to replace "settings.php" by $settingsPath.
Quote from: nneonneo on January 12, 2009, 11:52:26 AM
Don't put quotes around $settingsPath. You also need to replace "settings.php" by $settingsPath.
OK I've done that and had partial success. The shoutbox on my main page seems to be using the settings from "settings1.php" instead of "settings.php". settings1.php should only be used on the /yshout/index.php version of the shoutbox.
The only variable that I need to be different is that on the main board, I need 18 lines displayed and on the /yshout/index.php I want 40 lines displayed.
Once again, here is my code from yshout.php as it stands:
// Figure out where the yshout folder is
global $yshoutdir;
$yshoutdir=(defined('SMF')||isset($yshout_from_index))?'yshout/':'';
if(isset($_REQUEST['file']) && $_REQUEST['file'][0]=='!') $settingsPath = 'settings1.php';
else $settingsPath='settings.php';
// Check configuration files
if(!file_exists($yshoutdir.$settingsPath))
{
echo 'Error: No settings.';
return;
}
if(!file_exists($yshoutdir.'_banlist.php'))
{
// If _banlist.php has been deleted, assume it should be reset to defaults
$ban_ips_readpost=$ban_ips_post=$ban_names_readpost=$ban_names_post=array();
$sbMaintenance=false;
writeBanList();
}
// Load settings
require_once($yshoutdir.$settingsPath);
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance;
require_once($yshoutdir.'_banlist.php');
and this is the code from the yshout/index.php where i added the "!"
// YSHOUT HERE - <head> code
global $boardurl,$shoutFile;
$boardurl=".."; // change this to the relative or absolute path to the forum root
$shoutFile='!home';
if(!file_exists("$boardurl/Themes"))
x nneonneo;
What I say is that the chat does that the forum sometimes does not connect with the database and gives mistakes constant.
I am sure this has been asked before, but I get this error. What should I do?
Fatal error: Call to undefined function allowedTo() in /home/c732108/public_html/forum/yshout/yshout.php on line 69
Hi,
I installed this today, and everything went fine. However later I decided that I didn't want to use it after all. So I un-installed it, and again everything said it went fine.
However now my forum has crashed, and I'm not sure why? I'm getting this now:
Internal Server ErrorThe 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 Error Document to handle the request.I had made a backup before I installed it and uploaded these files thinking it would fix the problem. I even reinstalled a backup of my database, still with no luck?? What am I overlooking here?
I have manually reinstall all the files this mod has changed?
./index.php
./Themes/default/index.template.php
./Themes/default/languages/Modifications.english.php
./Themes/default/languages/Modifications.english-utf8.php
------------------------------------------------------------------------------------------
EDIT
I found the problem, it was being caused by some permission errors left over from the mod.
I am sure this has been asked before, but I get this error. What should I do?
Fatal error: Call to undefined function allowedTo() in /home/c732108/public_html/forum/yshout/yshout.php on line 69
thanks sunking .. i'll give it a shot ... the best !
sunking .. it worked .. i have a scrollbar now ... just want to ask , is it possible for the shoutbox position to be reversed ? instead of having messages at the bottom , i would like to start from the top :)
Open /yshout/settings.php and change $reverseshouts to true.
-
Quote from: t0k3nBuDz on January 12, 2009, 05:00:50 PM
I am sure this has been asked before, but I get this error. What should I do?
Fatal error: Call to undefined function allowedTo() in /home/c732108/public_html/forum/yshout/yshout.php on line 69
Quote from: SunKing on January 13, 2009, 08:27:19 AM
Open /yshout/settings.php and change $reverseshouts to true.
This reply was for me? I just want to make sure before I do something I shouldn't be doing... (edit) I see now that it was not for me, is to reverse the messages. Thats nice....I will use that too. Thanks.
BTW, I am extremely grateful you all take the time out of your busy schedules to help a n00b like me. After trying to read this tread, it seams this could be a full time job, just answering questions and dealing with issues. So.....Thanks
REPOSTED
OK I've done that and had partial success. The shoutbox on my main page seems to be using the settings from "settings1.php" instead of "settings.php". settings1.php should only be used on the /yshout/index.php version of the shoutbox.
The only variable that I need to be different is that on the main board, I need 18 lines displayed and on the /yshout/index.php I want 40 lines displayed.
Once again, here is my code from yshout.php as it stands:
// Figure out where the yshout folder is
global $yshoutdir;
$yshoutdir=(defined('SMF')||isset($yshout_from_index))?'yshout/':'';
if(isset($_REQUEST['file']) && $_REQUEST['file'][0]=='!') $settingsPath = 'settings1.php';
else $settingsPath='settings.php';
// Check configuration files
if(!file_exists($yshoutdir.$settingsPath))
{
echo 'Error: No settings.';
return;
}
if(!file_exists($yshoutdir.'_banlist.php'))
{
// If _banlist.php has been deleted, assume it should be reset to defaults
$ban_ips_readpost=$ban_ips_post=$ban_names_readpost=$ban_names_post=array();
$sbMaintenance=false;
writeBanList();
}
// Load settings
require_once($yshoutdir.$settingsPath);
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance;
require_once($yshoutdir.'_banlist.php');
and this is the code from the yshout/index.php where i added the "!"
// YSHOUT HERE - <head> code
global $boardurl,$shoutFile;
$boardurl=".."; // change this to the relative or absolute path to the forum root
$shoutFile='!home';
if(!file_exists("$boardurl/Themes"))
@zach21uk: Sorry, that code had a slight problem. Try replacing
if(isset($_REQUEST['file']) && $_REQUEST['file'][0]=='!') $settingsPath = 'settings1.php';
by
if((isset($shoutFile) && $shoutFile[0]=='!') || (isset($_REQUEST['file']) && $_REQUEST['file'][0]=='!')) $settingsPath = 'settings1.php';
@Casal: Try the tips for "high-bandwidth usage" on the main mod page.
The two settings files still seem to be getting confused. I updated to the new code you provided, but settings1.php is still being used on the main shoutbox, which is supposed to be using settings.php
Also - Can someone tell me where I can control the overall WIDTH of the shoutbox
Quote from: zach21uk on January 14, 2009, 06:34:59 AM
Also - Can someone tell me where I can control the overall WIDTH of the shoutbox
Go in index.template.php - find:
#yshout {
font-size: 10px;
overflow: hidden;
width:420px; <- add this with width that you want
@zach21uk: Oops...
The problem with $maxLines is that it affects the chats/home.txt file directly, i.e. that's exactly the number of lines shown in the file, and exactly the number of lines processed by the shoutbox.
In this case, I'm actually not sure how you'd make this work. I know that if the shoutboxes used different $shoutFiles, then this wouldn't be an issue, but since they use the same one they will affect each other when shouts are made via either box.
However, I think I have a fix.
1) In yshout.php, find
function truncateChat($maxLines,$chatPath,$historyPath) {
and add after it
$maxLines = 40;
where 40 is bigger than either $maxLines.
2) Find
function readChat($chatPath=false, $force=false) {
global $user,$reverseShouts;
and replace it by
function readChat($chatPath=false, $force=false) {
global $user,$reverseShouts,$maxLines;
3) Find
if(file_exists($chatPath))
$chatText = file_get_contents($chatPath);
and replace by
if(file_exists($chatPath)) {
require_once("class.tail.php");
$mytail = new tail($chatPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines($maxLines);
$chatText =$mytail->output(PLAIN);
}
This should allow both shoutboxes to use a different $maxLines without trouble.
That nailed it!! Thanks so much for getting that working. I know its been a pain to get working, but thank you so much nnenneo - and thanks from all the people at www.hailingfrequency.co.uk/boards too, who have been bugging me for this feature for ages.
I can't find any permission neither the shoutbox appeared in admin mode
(http://i42.tinypic.com/4q23q8.jpg)
pl see this image i instal Advace nneonneo's Shoutbox box for board 1.1.7 on Helios Multi Theme:
previous one not working on that and this one not accept the FTP root ID and Pass.
Quote from: nneonneo on January 12, 2009, 10:25:29 AM
OK. Let me try this...
These are instructions for making an online-users list. They are most definitely alpha instructions, so they might not work 100%.
In yshout/js/yshout.js, change
function unloadChat() {
to
function setStatus(status) {
new ajax (yshout_php, {
postBody: 'reqtype=status&status=' + status + '&file=' + shoutFile
});
}
function unloadChat() {
setStatus("off");
In yshout.php, change
// Load settings
require_once($yshoutdir."settings.php");
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance;
to
if(!file_exists($yshoutdir.'_status.php'))
{
// If _status.php has been deleted, assume it should be reset to defaults
$online_list=array();
$sbMaintenance=false;
writeBanList();
}
// Load settings
require_once($yshoutdir."settings.php");
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance;
require_once($yshoutdir.'_banlist.php');
global $online_list;
require_once($yshoutdir.'_status.php');
Change
case "autoshout":
if(isMod())
processCommand($_POST["shout"]);
break;
}
to
case "autoshout":
if(isMod())
processCommand($_POST["shout"]);
break;
case "status":
setStatus($_POST['status']=='on');
break;
}
function getStatus() {
global $online_list;
$list=$online_list;
if(isset($list[0]) && $list[0] >= 1) {
$list[0] = $list[0] . ' guest' . (($list[0]!=1) ? 's': '');
} else {
unset($list[0]);
}
return '<br /><div id="status">Users currently viewing the shoutbox: '.implode(', ', $list).'</div>';
}
function writeStatus() {
global $online_list, $yshoutdir;
$writeText = "<"."?php\n"; // php header
$writeText .= '$online_list = '.var_export($online_list,true).";\n";
$writeText .= '?'.'>'; // end tag
$handle = fopen($yshoutdir."_status.php", "w");
if($handle===false) die('File error (writeStatus); aborted');
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two bans happen simultaneously
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeStatus); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
function setStatus($online) {
global $user, $online_list;
if($user['id']==0) {
if($online)
$online_list[0]++;
elseif($online_list[0] >= 1)
$online_list[0]--;
} else {
if($online && loadMemberData(Array($user['id']),false,'profile')!==false) {
global $user_profile;
$profile=$user_profile[$user['id']];
$a_style = ' class="userclass" style="color: '.(empty($profile['member_group_color']) ? $profile['post_group_color'] : $profile['member_group_color']).'"';
$online_list[$user['id']]="<a$a_style href=\"index.php?action=profile;u=".$user['id'].'">'.$user['name'].'</a>';
} elseif(!$online) {
unset($online_list[$user['id']]);
}
}
writeStatus();
global $chatPath;
touch($chatPath);
}
Change
return $chatText.' '; // hack: totally empty responses can break some browsers
to
return $chatText.getStatus().' '; // hack: totally empty responses can break some browsers
You forgot setStatus('on')
Quote from: nneonneo on January 12, 2009, 10:25:29 AM
These are instructions for making an online-users list. They are most definitely alpha instructions, so they might not work 100%.
;)
Where can i modify the template of shoutbox...??
Tnx...
Is it possible to move the Today at 18:42:03 in Adv1.22 (smf 2.04) just like the normal one? (smf 1.1.7)
and if yes, tell me how please
so, next to the adminlinks
edit : is there also a way to increase the size of the font in the shout?
Quote from: SunKing on January 03, 2009, 03:39:39 PM
@Appendix
What version of SMF and what version of Shoutbox are you using?
@blakey
Are you using a custom theme?
Also, what version of SMF and what version of Shoutbox are you using?
@juniorj23
So your problem is solved?
@allart and @Nequil
I'm afraid that will have to be answered by nneonneo. ;)
@zach21uk
The time format is located at the very bottom of the settings.php in your yshout folder.
Im using Dilber MC and Version 1.1.7.
I install the code and see no changes, nothing added in admin, nor the shout box?
Quote from: Don Pepito on January 20, 2009, 10:27:20 AM
Where can i modify the template of shoutbox...??
Tnx...
In Admin - Current Theme - Modify the index template [main template]
Quote from: lorddusk on January 20, 2009, 12:43:47 PM
edit : is there also a way to increase the size of the font in the shout?
In first code you entered when you installed shoutbox was some .css included
find: font-size: 10px; and change 2 your will
@ blakeyYou didn't put code in index.template.php / did you? See code in first post and directions what to do.
Or maybe you forgot 2 Apply mod?
What i ment is that i want to change the template of displaying shouts....
Something like this...
Poster:Message [time]
Quote from: kabu on December 18, 2008, 04:12:02 PM
Hi I used the search in this topic but I couldn't find the answer.
My problem is I have auto embeded video clips mod installed and whenever someone types a link of say a youtube video the video is embeded onto the shoutbox. When you click the play button the video plays for a while and then stop playing. I'm guessing because the shoutbox is auto refreshed?
Is there anyway to stop the auto embed without removing the auto embed mod?
I have same problem..i have instaled AEVA mod...
Any "fix" for this?
@wrbex
You can add tags such as [img] to the settings.php in the yhsout folder. This will make shoutbox ignore the included tag.
Hey All,
I have 3 questions regarding this shoutbox.
1/ what code edits do I need to do to place it under the news?
2/ What code edits do I need to do to add the smiley bar ? and when the smiley bar is added will it automatically pick up my default forum smiley's?
3/ What edits do I need to do to add a scroll bar to the shoutbox?
Thanks all
@I AM Legend: You should probably read the main mod page (http://custom.simplemachines.org/mods/index.php?mod=585); everything you've asked for (and more!) has a link on there.
ok i did a search, cant really find why this is happening.
i can see the shoutbox, but my users cant once they log in. any reason for this?
also, how can i position the shoutbox to the right like this one? http://bobthepleo.com/forums/
thanks! great chat box btw.
i use SMF 1.1.7 with themes Hobbit . anybody can help me add this chatbox to my site ?? :( ..
my error :
Fatal error: require_once() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/teenp0/public_html/diendan/yshout/yshout.php on line 195
Quote from: changaroo on January 21, 2009, 01:31:46 AM
ok i did a search, cant really find why this is happening.
i can see the shoutbox, but my users cant once they log in. any reason for this?
also, how can i position the shoutbox to the right like this one? http://bobthepleo.com/forums/
thanks! great chat box btw.
For your first question you have to set the permissions then the second, give me your index.template.php and i'll figure it out.
Quote from: kuzjnvn on January 21, 2009, 01:37:37 AM
i use SMF 1.1.7 with themes Hobbit . anybody can help me add this chatbox to my site ?? :( ..
my error :
Fatal error: require_once() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/teenp0/public_html/diendan/yshout/yshout.php on line 195
It seems as if your missing Sources/Subs-Post.php
Thanks, here is my index.template.php attached.
I will look into the permissions right now.
Thanks for your help!
<?php
// Version: 1.1 RC2; 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 RC2';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
$settings['use_image_buttons'] = true;
/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
//load font style
if (isset($_SESSION['font-style'])) {
$options['fontstyle'] = $_SESSION['font-style'];
} elseif (isset($_COOKIE['font-style'])) {
$options['fontstyle'] = $_COOKIE['font-style'];
}
//load width style
if (isset($_SESSION['width-style'])) {
$options['widthstyle'] = $_SESSION['width-style'];
} elseif (isset($_COOKIE['width-style'])) {
$options['widthstyle'] = $_COOKIE['width-style'];
}
if (isset($_GET['widthstyle'])) {
$options['widthstyle'] = $_GET['widthstyle'];
$_SESSION['width-style'] = $options['widthstyle'];
setcookie ('width-style', $options['widthstyle'], time()+31536000, '/', false);
}
if (isset($_GET['fontstyle'])) {
$options['fontstyle'] = $_GET['fontstyle'];
$_SESSION['font-style'] = $options['fontstyle'];
setcookie ('font-style', $options['fontstyle'], time()+31536000, '/', false);
}
}
// The main sub template above the content.
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// test for joomla integration
global $wrapped, $jsmfConfig, $header_style , $toolbar_style , $footer_style;
if(isset($wrapped) && $wrapped==true)
$context['joomla_wrapped']=true;
elseif(isset($wrapped) && $wrapped==false)
$context['joomla_wrapped']=false;
elseif(isset($jsmfConfig) && $jsmfConfig->wrapped)
$context['joomla_wrapped']=true;
elseif(isset($jsmfConfig) && !$jsmfConfig->wrapped)
$context['joomla_wrapped']=false;
else
$context['joomla_wrapped']=false;
// 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'], '" />
<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?rc2p"></script>
<script language="JavaScript" type="text/javascript">
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
</script>
<title>', $context['page_title'], '</title>';
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
if(!empty($options['fontstyle']))
$fontstyle=$options['fontstyle'];
else
$fontstyle='f-default';
if(!empty($options['widthstyle']))
$widthstyle=$options['widthstyle'];
else
$widthstyle='w-wide';
// the color choices
if(!empty($settings['header_style']))
$header_style=$settings['header_style'];
else
$header_style='dark';
if(!empty($settings['toolbar_style']))
$toolbar_style=$settings['toolbar_style'];
else
$toolbar_style='blue';
if(!empty($settings['footer_style']))
$footer_style=$settings['footer_style'];
else
$footer_style='dark';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/template_css.css?rc2" />';
if($context['browser']['is_ie'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/template_ie.css?rc2" />';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/header_'.$header_style.'.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/toolbar_'.$toolbar_style.'.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/footer_'.$footer_style.'.css?rc2" />
';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" 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" />';
// 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
// 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">
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">
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>
</head>';
if(!$context['joomla_wrapped']){
echo '
<body id="page_bg" class="'.$widthstyle.' '.$fontstyle.' header-'.$header_style.' toolbar-'.$toolbar_style.' footer-'.$footer_style.'">
<div id="header">
<div class="wrapper">
<div id="access">
<div id="selectors">
<span class="font-selector"> </span>
<span class="width-selector"> </span>
</div>
<div id="buttons">
<a href="',$scripturl,'?widthstyle=w-fluid" title="fluid width" class="fluid"><span class="button"> </span></a>
<a href="',$scripturl,'?widthstyle=w-wide" title="wide width" class="wide"><span class="button"> </span></a>
<a href="',$scripturl,'?widthstyle=w-thin" title="thin width" class="thin"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-larger" title="Increase size" class="lrg"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-default" title="Default size" class="med"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-smaller" title="Decrease size" class="sml"><span class="button"> </span></a>
</div>
</div>
<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news'])) {
echo '<div id="top">', $context['random_news_line'] , '</div>';
}
echo '
</div>
</div>
<div id="toolbar">
<div class="wrapper">
<div id="nav">',template_menu(),'
</div>
</div>
</div>';
echo '
<div id="showcase">
<div class="wrapper">
<div class="padding">
' , leftmenu(), '
</div>
</div>
</div>
';
echo '
<div id="mainbody">
<div class="wrapper">
<div id="mainbody-2">
<div id="mainbody-3">
<div id="mainbody-4">
<div id="mainbody-5">
<div id="mainbody-padding">
<table class="mainbody" cellspacing="0">
<tr>
<td valign="top" class="mainbody" id="mainmen">';
}
if ($context['joomla_wrapped'])
echo '<div class="titlebg" style="overflow: hidden;"><div id="smf_menu">',template_menu2(),'</div></div>';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
if ($context['joomla_wrapped']) {
echo'
<div style="padding: 5px; text-align: center;">
<div class="smalltext">' ,theme_copyright(),'<br />
brought to you by <a href="http://www.changaroo.com">changaroo</a> productions
</div></div>';
}
if(!$context['joomla_wrapped'])
echo '
<br /><br />
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="wrapper">
<div class="padding">
<table class="footer" cellspacing="0">
<tr valign="top">
<td class="footer">
<div class="moduletable center">
' ,theme_copyright(),'<br />
copyright atlshutterbugs.com © 2008-200∞
</div>
</td>
</tr>
</table>
</div>
</div>
</div>';
echo '
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<span class="pathway">';
// 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'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="pathway">' . $tree['name'] . '</a>' : $tree['name'] , '<img src="'.$settings['images_url'].'/arrow.png" style="margin: 0 12px 0 12px" alt="" />';
else
echo $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
}
echo '</span>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul>';
// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
// Show the [help] button.
// echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// How about the [search] button?
//if ($context['allow_search'])
// echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu2()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul>';
// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , ' | </a></li>';
// How about the [search] button?
//if ($context['allow_search'])
// echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , ' | </a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , ' | </a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , ' | </a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , ' | </a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , ' | </a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , ' | </a></li>';
// Show the [help] button.
echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , ' | </a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , ' | </a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , ' </a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
// Generate a strip of buttons.
function template_button_strip_mill($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'] : '') . '>'. ($custom_td!='' ? '<'.$custom_td.'>' : '') . $txt[$value['text']] . ($custom_td!='' ? '</'.$custom_td.'>' : '') .'</a>';
$button_strip[$key] = $buttons[$key];
}
if (empty($button_strip))
return ' ';
echo implode(' | ', $button_strip);
}
function leftmenu()
{
global $settings, $buttons, $context, $txt, $scripturl;
// personal info etc.
echo '<table class="showcase" cellspacing="0">
<tr valign="top">';
echo '
<td class="showcase">
<div class="moduletable">';
if (!empty($context['user']['avatar']))
echo '<div class="avatar">', $context['user']['avatar']['image'], '</div><div class="profile_info">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '<h3>', $txt['hello_member_ndt'], ' <b>', $context['user']['name'], '</b></h3>';
echo '<ul id="useropts">';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a> ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>', $txt[616], '</b></li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '<li>
', $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'], '</li>';
}
echo '<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
<li>', $context['current_time'],'</li>
</ul>
</div>
</td>';
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
', $txt['welcome_guest'], '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" style="margin-bottom: 4px;" size="10" />
<input type="password" name="passwrd" style="margin-bottom: 4px;" size="10" /><br />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />';
}
if (!empty($context['user']['avatar'])) {
echo ' </div>';
}
echo ' </div>
</td>';
echo '
<td class="showcase">
<div class="moduletable">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 4px 0;">
<input type="text" name="search" value="" size="30" style="margin-bottom: 4px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="margin-bottom: 4px;" /><br />
<a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
<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><br />
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '- ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span> -
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>
</td>';
echo '
</tr>
</table>';
}
?>
Sorry but can I get a demo of what it looks like right now?
PM'd ya :) thanks!
<?php
// Version: 1.1 RC2; 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 RC2';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
$settings['use_image_buttons'] = true;
/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
//load font style
if (isset($_SESSION['font-style'])) {
$options['fontstyle'] = $_SESSION['font-style'];
} elseif (isset($_COOKIE['font-style'])) {
$options['fontstyle'] = $_COOKIE['font-style'];
}
//load width style
if (isset($_SESSION['width-style'])) {
$options['widthstyle'] = $_SESSION['width-style'];
} elseif (isset($_COOKIE['width-style'])) {
$options['widthstyle'] = $_COOKIE['width-style'];
}
if (isset($_GET['widthstyle'])) {
$options['widthstyle'] = $_GET['widthstyle'];
$_SESSION['width-style'] = $options['widthstyle'];
setcookie ('width-style', $options['widthstyle'], time()+31536000, '/', false);
}
if (isset($_GET['fontstyle'])) {
$options['fontstyle'] = $_GET['fontstyle'];
$_SESSION['font-style'] = $options['fontstyle'];
setcookie ('font-style', $options['fontstyle'], time()+31536000, '/', false);
}
}
// The main sub template above the content.
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// test for joomla integration
global $wrapped, $jsmfConfig, $header_style , $toolbar_style , $footer_style;
if(isset($wrapped) && $wrapped==true)
$context['joomla_wrapped']=true;
elseif(isset($wrapped) && $wrapped==false)
$context['joomla_wrapped']=false;
elseif(isset($jsmfConfig) && $jsmfConfig->wrapped)
$context['joomla_wrapped']=true;
elseif(isset($jsmfConfig) && !$jsmfConfig->wrapped)
$context['joomla_wrapped']=false;
else
$context['joomla_wrapped']=false;
// 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'], '" />
<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?rc2p"></script>
<script language="JavaScript" type="text/javascript">
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
</script>
<title>', $context['page_title'], '</title>';
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
if(!empty($options['fontstyle']))
$fontstyle=$options['fontstyle'];
else
$fontstyle='f-default';
if(!empty($options['widthstyle']))
$widthstyle=$options['widthstyle'];
else
$widthstyle='w-wide';
// the color choices
if(!empty($settings['header_style']))
$header_style=$settings['header_style'];
else
$header_style='dark';
if(!empty($settings['toolbar_style']))
$toolbar_style=$settings['toolbar_style'];
else
$toolbar_style='blue';
if(!empty($settings['footer_style']))
$footer_style=$settings['footer_style'];
else
$footer_style='dark';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/template_css.css?rc2" />';
if($context['browser']['is_ie'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/template_ie.css?rc2" />';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/header_'.$header_style.'.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/toolbar_'.$toolbar_style.'.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/footer_'.$footer_style.'.css?rc2" />
';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" 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">
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">
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>
</head>';
if(!$context['joomla_wrapped']){
echo '
<body id="page_bg" class="'.$widthstyle.' '.$fontstyle.' header-'.$header_style.' toolbar-'.$toolbar_style.' footer-'.$footer_style.'">
<div id="header">
<div class="wrapper">
<div id="access">
<div id="selectors">
<span class="font-selector"> </span>
<span class="width-selector"> </span>
</div>';
// 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
echo '<div id="buttons">
<a href="',$scripturl,'?widthstyle=w-fluid" title="fluid width" class="fluid"><span class="button"> </span></a>
<a href="',$scripturl,'?widthstyle=w-wide" title="wide width" class="wide"><span class="button"> </span></a>
<a href="',$scripturl,'?widthstyle=w-thin" title="thin width" class="thin"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-larger" title="Increase size" class="lrg"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-default" title="Default size" class="med"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-smaller" title="Decrease size" class="sml"><span class="button"> </span></a>
</div>
</div>
<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news'])) {
echo '<div id="top">', $context['random_news_line'] , '</div>';
}
echo '
</div>
</div>
<div id="toolbar">
<div class="wrapper">
<div id="nav">',template_menu(),'
</div>
</div>
</div>';
echo '
<div id="showcase">
<div class="wrapper">
<div class="padding">
' , leftmenu(), '
</div>
</div>
</div>
';
echo '
<div id="mainbody">
<div class="wrapper">
<div id="mainbody-2">
<div id="mainbody-3">
<div id="mainbody-4">
<div id="mainbody-5">
<div id="mainbody-padding">
<table class="mainbody" cellspacing="0">
<tr>
<td valign="top" class="mainbody" id="mainmen">';
}
if ($context['joomla_wrapped'])
echo '<div class="titlebg" style="overflow: hidden;"><div id="smf_menu">',template_menu2(),'</div></div>';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
if ($context['joomla_wrapped']) {
echo'
<div style="padding: 5px; text-align: center;">
<div class="smalltext">' ,theme_copyright(),'<br />
brought to you by <a href="http://www.changaroo.com">changaroo</a> productions
</div></div>';
}
if(!$context['joomla_wrapped'])
echo '
<br /><br />
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="wrapper">
<div class="padding">
<table class="footer" cellspacing="0">
<tr valign="top">
<td class="footer">
<div class="moduletable center">
' ,theme_copyright(),'<br />
copyright atlshutterbugs.com © 2008-200∞
</div>
</td>
</tr>
</table>
</div>
</div>
</div>';
echo '
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<span class="pathway">';
// 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'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="pathway">' . $tree['name'] . '</a>' : $tree['name'] , '<img src="'.$settings['images_url'].'/arrow.png" style="margin: 0 12px 0 12px" alt="" />';
else
echo $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
}
echo '</span>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul>';
// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
// Show the [help] button.
// echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// How about the [search] button?
//if ($context['allow_search'])
// echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu2()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul>';
// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , ' | </a></li>';
// How about the [search] button?
//if ($context['allow_search'])
// echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , ' | </a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , ' | </a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , ' | </a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , ' | </a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , ' | </a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , ' | </a></li>';
// Show the [help] button.
echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , ' | </a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , ' | </a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , ' </a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
// Generate a strip of buttons.
function template_button_strip_mill($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'] : '') . '>'. ($custom_td!='' ? '<'.$custom_td.'>' : '') . $txt[$value['text']] . ($custom_td!='' ? '</'.$custom_td.'>' : '') .'</a>';
$button_strip[$key] = $buttons[$key];
}
if (empty($button_strip))
return ' ';
echo implode(' | ', $button_strip);
}
function leftmenu()
{
global $settings, $buttons, $context, $txt, $scripturl;
// personal info etc.
echo '<table class="showcase" cellspacing="0">
<tr valign="top">';
echo '
<td class="showcase">
<div class="moduletable">';
if (!empty($context['user']['avatar']))
echo '<div class="avatar">', $context['user']['avatar']['image'], '</div><div class="profile_info">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '<h3>', $txt['hello_member_ndt'], ' <b>', $context['user']['name'], '</b></h3>';
echo '<ul id="useropts">';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a> ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>', $txt[616], '</b></li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '<li>
', $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'], '</li>';
}
echo '<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
<li>', $context['current_time'],'</li>
</ul>
</div>
</td>';
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
', $txt['welcome_guest'], '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" style="margin-bottom: 4px;" size="10" />
<input type="password" name="passwrd" style="margin-bottom: 4px;" size="10" /><br />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />';
}
if (!empty($context['user']['avatar'])) {
echo ' </div>';
}
echo ' </div>
</td>';
echo '
<td class="showcase">
<div class="moduletable">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 4px 0;">
<input type="text" name="search" value="" size="30" style="margin-bottom: 4px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="margin-bottom: 4px;" /><br />
<a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
<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><br />
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '- ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span> -
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>
</td>';
echo '
</tr>
</table>';
}
?>
Tell me how that shows up.
I just tried it, it doesnt show anything. :(
I don't know then sorry, wait for SunKing he'll probably be able to help you.
thanks for your help though! i really appreciate you trying.
Quote from: ameo on January 20, 2009, 04:03:45 PM
Quote from: lorddusk on January 20, 2009, 12:43:47 PM
edit : is there also a way to increase the size of the font in the shout?
In first code you entered when you installed shoutbox was some .css included
find: font-size: 10px; and change 2 your will
Thanks, but i still need to know if you can move the place of the Timestamp, and how to do it.
Quote from: faizulhaque on January 18, 2009, 08:36:39 AM
(http://i42.tinypic.com/4q23q8.jpg)
pl see this image i instal Advace nneonneo's Shoutbox box for board 1.1.7 on Helios Multi Theme:
previous one not working on that and this one not accept the FTP root ID and Pass.
I have the same problem, but i'm using default template
Please guys help me...
I want to modify the way of displaying shouts.....
Where can i find the way of displaying..??
I wanna change it to Poster : Shout [time]...
Please guys help me...
Subs-Post.php where i can find that file ???
Quote from: SunKing on January 20, 2009, 05:56:45 PM
@wrbex
You can add tags such as [img] to the settings.php in the yhsout folder. This will make shoutbox ignore the included tag.
Hm...I'm newbie, can you be more precise, what, where?
i have installed AdvSB_1.22 on my SMF1.1.5. but the ajax function is not working. (i must refresh the page for reading new messages). The "sound on/off button" not working. "hide admin links" button not working.
What can i doing?
Thank you.
Quote from: nneonneo on January 20, 2009, 10:51:21 PM
@I AM Legend: You should probably read the main mod page (http://custom.simplemachines.org/mods/index.php?mod=585); everything you've asked for (and more!) has a link on there.
Sweet ty
Quote from: Ezechiele on January 21, 2009, 05:15:09 AM
Quote from: faizulhaque on January 18, 2009, 08:36:39 AM
(http://i42.tinypic.com/4q23q8.jpg)
pl see this image i instal Advace nneonneo's Shoutbox box for board 1.1.7 on Helios Multi Theme:
previous one not working on that and this one not accept the FTP root ID and Pass.
I have the same problem, but i'm using default template
If you enter the FTP info it should work fine. It's just something that happens with the SMF package installer from time to time.
My problem with this was every time I made a shout it would just keep adding lines and adding lines. There was no height to the box. How do I set the height or max number of lines to show?
ok i finally got it to show... but, only i seem to be able to see it?
what do i change in the permissions to get the other users to see it?
nvm. i got it :)
ok new question... how do i uncenter the chat messages? like if i want to justify it to the left?
How do i change the name color? the names are in color blue i want to change them.
QuotePlease guys help me...
I want to modify the way of displaying shouts.....
Where can i find the way of displaying..??
I wanna change it to Poster : Shout [time]...
Please guys help me...
Hi guys
First I want to say that this is awesome mod!Amazing job,thank you man.
Now one question - shrink and expand button is not working for me ???
Everything else is perfect,only this is bugging me :(
hey nneoneo's after i add the user image to the shoutbox and all some user name is longer than some and the image is kinda out of order how can i fix it so that all image is in line???
Hey !
I've got a question: I'm currently using Midnight Sun theme on my forum. But, when i install the theme on the site with the shoutbox after editing the Index.template.php my shoutbox is at the Top left corner.
I'm a really newbie when it comes to Php etc.
So, how can i make the shoutbox be where it is when i use SMF core for an example ?
Any help is very Appreciated !
Edit: I'm using SMF 2.0 beta 4
Quote from: Mythers on January 22, 2009, 03:10:11 PM
Hey !
I've got a question: I'm currently using Midnight Sun theme on my forum. But, when i install the theme on the site with the shoutbox after editing the Index.template.php my shoutbox is at the Top left corner.
I'm a really newbie when it comes to Php etc.
So, how can i make the shoutbox be where it is when i use SMF core for an example ?
Any help is very Appreciated !
Edit: I'm using SMF 2.0 beta 4
Post your index.template.php.
I'll do it for you.
Quote from: mantodeus on January 22, 2009, 11:08:04 AM
Hi guys
First I want to say that this is awesome mod!Amazing job,thank you man.
Now one question - shrink and expand button is not working for me ???
Everything else is perfect,only this is bugging me :(
Post your index.template.php
I'll see why it isn't working.
echo '<div style="text-align: left">';
echo '</div>';
why doesnt that align the chat to the left? save me mrmoney :D
Quote from: changaroo on January 22, 2009, 08:45:30 PM
echo '<div style="text-align: left">';
echo '</div>';
why doesnt that align the chat to the left? save me mrmoney :D
Post your yshout.php, I'll make the required edits to align left.
<?php
// nneonneo's AJAX shoutbox
// Version 1.22
// Figure out where the yshout folder is
global $yshoutdir;
$yshoutdir=(defined('SMF')||isset($yshout_from_index))?'yshout/':'';
// Check configuration files
if(!file_exists($yshoutdir.'settings.php'))
{
echo 'Error: No settings.';
return;
}
if(!file_exists($yshoutdir.'_banlist.php'))
{
// If _banlist.php has been deleted, assume it should be reset to defaults
$ban_ips_readpost=$ban_ips_post=$ban_names_readpost=$ban_names_post=array();
$sbMaintenance=false;
writeBanList();
}
// Load settings
require_once($yshoutdir."settings.php");
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance;
require_once($yshoutdir.'_banlist.php');
// Figure out which file we're logging chats to
global $shoutFile;
if(!isset($shoutFile))
$shoutFile='home';
if(isset($_REQUEST['file']))
$shoutFile=$_REQUEST['file'];
$shoutFile=preg_replace('/[^A-Za-z0-9_]/','',$shoutFile);
global $chatPath,$historyPath;
$chatsFullDir=$yshoutdir.$chatsDir.'/';
$chatPath=$chatsFullDir.sprintf($chatFormat,$shoutFile);
$historyPath=($historyFormat==='')?'':$chatsFullDir.sprintf($historyFormat,$shoutFile);
// If the shoutbox isn't require'd from SMF, we need to load some SMF components.
$loadedFromSMF=true;
if(!defined('SMF'))
{
$loadedFromSMF=false;
session_start();
require(dirname(__FILE__) . "/../SSI.php");
require_once($sourcedir . '/Subs-Post.php');
$defaultEncoding=(empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']);
header('Content-type: text/html; charset='.$defaultEncoding);
}
// Set up some useful globals
global $func,$smcFunc,$ip,$isSMF1,$user;
$ip = $_SERVER['REMOTE_ADDR'];
$isSMF1 = isset($func);
if(!$isSMF1)
$func=$smcFunc;
$maxLines+=1; // off-by-one correction
$user=$context['user']; // shortcut, for brevity
if(!$loadedFromSMF)
{
loadUserSettings();
loadPermissions();
loadTheme();
writeLog(); // mark user as online
}
// Are you banned from reading the shoutbox?
if(in_array($ip, $ban_ips_readpost) || in_array($user['username'], $ban_names_readpost) || in_array($user['name'], $ban_names_readpost))
{
echo $txt['yshout_banned'];
return;
}
if(!allowedTo('yshout_view'))
{
if(isGuest())
echo $txt['yshout_no_guests'];
return;
}
// Check guest status and grab guest username
if(isGuest())
{
if($autoGuestName!==false)
$user['username']=$user['name']=$_COOKIE['username']=$autoGuestName.substr(md5($ip),0,4);
elseif(isset($_POST['username']) || isset($_COOKIE['username']))
{
$requsername=isset($_POST['username'])?$_POST['username']:$_COOKIE['username'];
$requsername=$func['htmlspecialchars'](html_entity_decode(urldecode($requsername)),ENT_QUOTES);
$user['username']=$user['name']=$_COOKIE['username']=$requsername;
}
}
// Check user group membership
$user['is_sbmod']=false;
$user['can_sbpost']=false;
if(allowedTo('yshout_moderate'))
$user['is_sbmod']=true;
if(allowedTo('yshout_post'))
$user['can_sbpost']=true;
if($loadedFromSMF)
{
// Initialize the shoutbox and quit
initShoutbox($user,true);
return;
}
// Permission checks
function isGuest($user=false)
{
if($user===false) global $user;
return !$user['is_logged'];
}
function isMod($user=false)
{
if($user===false) global $user;
return $user['is_admin'] || $user['is_sbmod'];
}
function isPostBanned($user=false)
{
global $ip,$ban_ips_post,$ban_names_post;
if($user===false) global $user;
return in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post);
}
// $_GET commands
// administrative: ban/unban and delete
if(isset($_GET['banid']))
{
if(!isset($_GET['mode']))
{
global $boardurl;
doMsg(<<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<base href="$boardurl/" />
<meta http-equiv="content-type" content="text/html; charset=$defaultEncoding" />
<title>{$txt['yshout_ban_conf']}</title>
<script type="text/javascript">
//<![CDATA[
function ajaxGet(args) {
window.location=window.location+'&'+args;
}
//]]>
</script>
</head>
<body>
<h1>{$txt['yshout_select_mode']}</h1>
<p><a href="javascript:ajaxGet('banid={$_GET['banid']}&sesc={$_GET['sesc']}&mode=rp');">{$txt['yshout_rp']}</a></p>
<p><a href="javascript:ajaxGet('banid={$_GET['banid']}&sesc={$_GET['sesc']}&mode=p');">{$txt['yshout_p']}</a></p>
</body>
</html>
EOF
);
exit;
}
if(isMod())
{
$error=checkSession('request','',false);
if($error!=='')
{
loadLanguage('Errors');
die($txt[$error]);
}
if(!is_numeric($_GET['banid']))
{
// not an ID, so probably an IP
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_ips_',$_GET['mode'],$_GET['banid']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
exit;
}
if(loadMemberData(Array($_GET['banid']),false,'minimal')===false)
{
doMsg($txt['yshout_error'].$txt['yshout_no_user']);
exit;
}
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_names_',$_GET['mode'],$user_profile[$_GET['banid']][$isSMF1?'memberName':'member_name']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(isset($_GET['unban']))
{
if(isMod())
{
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_'.$_GET["type"].'s_','u',$_GET['unban']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(isset($_GET['delete']))
{
if(isMod())
{
$error=checkSession('request','',false);
if($error!=='')
{
loadLanguage('Errors');
die($txt[$error]);
}
$success=deleteShout($_GET['delete'],$chatPath);
if(isset($_GET['history']) && !$success)
$success=deleteShout($_GET['delete'],$historyPath);
if($success)
echo $txt['yshout_del_success'];
}
exit;
}
// Regular user $_GET commands: history, help
if(isset($_GET["history"]))
{
history();
exit;
}
if(isset($_GET["help"]))
{
help();
exit;
}
// If $_GET doesn't carry a command, check the request type
if(!isset($_POST["reqtype"]))
{
echo $txt['yshout_no_action'];
return;
}
$reqType = $_POST["reqtype"];
function initShoutbox($user,$fromSMF)
{
// This function initializes the shoutbox: it prints the tool links,
// current shouts and shout form
global $gzipCompression,$txt,$user,$maxUsernameChars,$maxShoutChars,$sbMaintenance,$autoGuestName,$shoutFormOnTop;
if($gzipCompression && !$fromSMF) ob_start("ob_gzhandler");
// Language check -- only admins will see this
if($user['is_admin'] && !isset($txt['yshout_history']) && !isset($_COOKIE['yShout_read_txt_notice']))
{
global $user_info,$language,$settings;
$user_language=isset($user_info['language']) ? $user_info['language'] : $language;
if($user_language != 'english' || $settings['theme_dir'] != $settings['default_theme_dir'])
echo '<span style="color:red;background:white">
Warning! The shoutbox text files for your language are not installed.
This may cause the shoutbox and admin settings to appear wrong.<br /><br />
To fix this problem, copy <strong>',$settings['default_theme_dir'],'/languages/Modifications.english.php</strong>
to <strong>',$settings['theme_dir'],'/languages/Modifications.',$user_language,'.php</strong> and translate as desired.<br /><br />
To <strong>ignore</strong> this notice, click <a href="javascript:set_cookie(\'yShout_read_txt_notice\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">here</a>.<br /><br /></span>';
}
// Tool links (History, Commands, etc.)
echo '<span id="yshout-toollinks">';
echo '[<a href="javascript:goTo(\'history\')">',$txt['yshout_history'],'</a>] ';
echo '[<a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>]';
if(isMod())
{
echo ' [<a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>]';
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' [<a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>]';
else
echo ' [<a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>]';
echo ' [<a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>]';
}
echo '</span>'; // yshout-toollinks
if(!$shoutFormOnTop)
echo '<div id="shouts">',readChat(),'</div>';
// Shout form
echo '
<form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;">
<fieldset>';
$inputForumName=' <input id="forum-name" type="text" maxlength="'.$maxUsernameChars.'" ';
$inputShoutText=' <input id="shout-text" type="text" maxlength="'.$maxShoutChars.'" ';
$inputShoutButton=' <input id="shout-button" type="submit" ';
if(isPostBanned())
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',$txt['yshout_p_banned'],'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_banned'],'" disabled="disabled" />';
elseif(!isMod() && $sbMaintenance!==false)
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',$sbMaintenance,'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_maintenance'],'" disabled="disabled" />';
elseif(!$user['can_sbpost'])
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',isGuest()?$txt['yshout_no_guests']:$txt['yshout_no_posting'],'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_maintenance'],'" disabled="disabled" />';
else
{
if(isGuest() && $autoGuestName===false)
echo '
',$inputForumName,'value="',$user['name'], '" />';
else
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />';
echo '
',$inputShoutText,'value="" />
',$inputShoutButton,'value="',$txt['yshout_shout_button'],'" />';
}
echo '
</fieldset>
</form>';
if($shoutFormOnTop)
echo '<div id="shouts">',readChat(),'</div>';
if($gzipCompression && !$fromSMF) ob_end_flush();
}
// Figure out the request
switch($reqType) {
case "init":
initShoutbox($user,false);
break;
case "shout":
if(isPostBanned()) break;
if(!$user['can_sbpost']) break;
if(!isMod() && $sbMaintenance!==false) break;
$shoutText = $_POST["shout"];
if($shoutText[0]=='/' && $allowCommands)
{
if(isMod())
{
if(processCommand($shoutText))
break;
}
elseif(!isGuest() || $guestCommands)
{
$shoutText=substr($shoutText,0,$maxShoutChars);
if(processUserCommand($shoutText)) break;
}
}
$shoutName = $user['name'];
if(!isMod())
$shoutText=substr($shoutText,0,$maxShoutChars);
makeShout($shoutText,$user);
break;
case "refresh":
refreshChats(false);
break;
case "autoshout":
if(isMod())
processCommand($_POST["shout"]);
break;
}
function doMsg($msg)
{
echo $msg; // tell user
$_SESSION['readingCmd']=$msg; // make sure user keeps seeing this message; see readChat
}
function processCommand($text) {
global $reqType, $maxLines, $ip, $user, $bannedCommands, $txt, $sbMaintenance;
global $ban_ips_readpost, $ban_ips_post, $ban_names_readpost, $ban_names_post;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces.
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
case "/clear":
global $chatPath, $historyPath;
$fileContents='';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$handle=fopen($chatPath, 'w');
fputs($handle,'');
fclose($handle);
if($historyPath !== '')
{
$handle=fopen($historyPath, 'a');
fputs($handle,$fileContents);
fclose($handle);
}
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat();
return true;
case "/lock":
if($args=='')
{
doMsg($txt['yshout_error'].$txt['yshout_lock_arg_error']);
return true;
}
if($sbMaintenance !== false)
doMsg(sprintf($txt['yshout_lock_changed'],$args));
else
doMsg(sprintf($txt['yshout_lock_success'], $args));
$sbMaintenance = $args;
writeBanList();
return true;
case "/unlock":
if($sbMaintenance === false)
{
doMsg($txt['yshout_error'].$txt['yshout_unlock_already']);
return true;
}
$sbMaintenance = false;
writeBanList();
doMsg($txt['yshout_unlock_success']);
return true;
case "/banlist": // who's banned?
$_SESSION['readingCmd']=$text;
$temp=Array();
echo '<table>
<caption>',$txt['yshout_banlist_caption'],'</caption>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_ips_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_ips_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_names_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_names_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '</table>';
return true;
case "/ban": // need to be more specific!
doMsg($txt['yshout_error'].$txt['yshout_ban_type_error']);
return true;
case "/banuser":
case "/banip":
$type=($cmd=='/banip')?'ban_ips_':'ban_names_'; // prefixes for variables
$ar=explode(' ',$args,2); // true argument array. the "2" ensures that we cut only once: mode can't have spaces but user can.
if(count($ar)!=2) // whoops: only one argument?
{
doMsg($txt['yshout_error'].$txt['yshout_ban_mode_error']);
return true;
}
$mode=$ar[0]; // set up vars
$id=$ar[1];
doBan($type,$mode,$id);
return true;
case "/impersonate":
// <user> [userlevel] [ip] [userid] /[shout text]
$slashpos=strpos($args,' /'); // use ' /' as a separator, so we can see how many args came before
if($slashpos===false) // no shout? invalid formatting?
{
doMsg($txt['yshout_error'].$txt['yshout_imp_slash_error']);
return true;
}
$shout=substr($args,$slashpos+2);
$ar=explode(' ',substr($args,0,$slashpos));
$name='';
$userlevel=0;
$userid=0;
switch(count($ar)) // how many args did we get?
{
case 0: // no args
doMsg($txt['yshout_error'].$txt['yshout_imp_uname_error']);
return true;
case 4: // reverse order to save space: we just set them from the back!
$userid=intval($ar[3]);
case 3:
$ip=$ar[2]; // corrupt the global >:D
case 2:
$userlevel=intval($ar[1]);
case 1:
$name=html_entity_decode($ar[0]);
break;
default:
doMsg($txt['yshout_error'].$txt['yshout_imp_max4_error']); // just so they know that we only have 4 params
return true;
}
$ip.='.'; // to set off the impersonated msgs
$fakeuser=array('id'=>$userid,'name'=>$name,'is_admin'=>($userlevel==2)?1:0,'is_sbmod'=>($userlevel==1)?1:0,'is_logged'=>($userlevel==-1)?0:1); // fake SMF $user array
makeShout($shout,$fakeuser);
return true;
default: // not a command
return processUserCommand($text);
}
return false;
}
function processUserCommand($text) {
global $reqType,$chatPath,$historyPath,$maxLines,$ip,$ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$user,$bannedCommands,$func;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces.
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
case "/help":
if(empty($args)) help();
elseif($args[0]!='/') help('/'.$args);
else help($args);
$_SESSION['readingCmd']=$text;
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat();
return true;
case "/pi":
$s_pi='141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609';
$n=5;
if($args!='') $n=intval($args);
$res=($n==0)?"PI IS EXACTLY 3!":'3.'.substr($s_pi,0,$n-1).(substr($s_pi,$n-1,1)+(substr($s_pi,$n,1)>=5?1:0));
// all that nasty little bit does is add the first n-2 chars, then add the last digit and increment if rounding is necessary.
makeShout($res);
return true;
case "/me":
$newText = cleanupShout($args.' ');
$shoutName=$user['name'];
makeRawShout("<span class=\"meaction\"> * $shoutName $newText</span>",$user);
return true;
default:
return false;
}
return false;
}
// utility functions for banning and deleting
function doBan($type,$mode,$id)
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$txt;
switch($mode)
{
case 'u': // nice guy
$r=$type.'readpost'; // need to search both ban arrays. Search this one first...
$index=array_search($id,$$r); // where is my little banned user?
if($index===false)
{
$r=$type.'post'; // ...and this one second on failure.
$index=array_search($id,$$r);
if($index===false) // whoops, both searches failed!
{
doMsg($txt['yshout_error'].'Couldn\'t find user to unban!');
return false;
}
}
array_splice($$r,$index,1); // cut the 1 element loose with splice. $$r is used because $r is the string variable denoting the target array.
doMsg("Success: unbanned $id.");
break;
case 'rp':
array_push(${$type.'readpost'},$id); // easy, huh!
doMsg("Success: banned $id from reading and posting.");
break;
case 'p':
array_push(${$type.'post'},$id);
doMsg("Success: banned $id from posting.");
break;
default:
doMsg($txt['yshout_error']."Invalid mode $mode! Use only 'u', 'rp' or 'p'!");
return false;
}
writeBanList(); // write the final report
return true;
}
function writeBanList() // generate our dynamic ban list, which is 'require'd at the start of this script
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance,$yshoutdir;
$writeText = "<"."?php\n"; // php header
$writeText .= '$ban_ips_readpost = '.var_export($ban_ips_readpost,true).";\n"; // bans
$writeText .= '$ban_ips_post = '.var_export($ban_ips_post,true).";\n";
$writeText .= '$ban_names_readpost = '.var_export($ban_names_readpost,true).";\n";
$writeText .= '$ban_names_post = '.var_export($ban_names_post,true).";\n";
$writeText .= '$sbMaintenance = '.var_export($sbMaintenance,true).";\n";
$writeText .= '?'.'>'; // end tag
$handle = fopen($yshoutdir."_banlist.php", "w");
if($handle===false) die('File error (writeBanList); aborted');
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two bans happen simultaneously
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeBanList); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
function deleteShout($spanTitle, $chatPath) {
$fileContents = '';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$newFileContents=preg_replace('/<p[^>]*><span class="shout-timestamp" title="'.str_replace('|','\|',$spanTitle).'">.+\n/','',$fileContents);
if($fileContents == $newFileContents) return false;
$handle = fopen($chatPath, "w");
fputs($handle, $newFileContents);
fclose($handle);
return true;
}
// utility functions for shouting
function cleanupShout($text) {
global $func,$bannedCode,$context;
$text = $func['htmlspecialchars'](stripslashes($text), ENT_QUOTES);
foreach($bannedCode as $searchString)
$text = preg_replace('/'.preg_quote($searchString,'/').'/i','',$text);
preparsecode($text);
$text = parse_bbc($text);
censorText($text);
return $text;
}
function makeShout($text,$user=false) {
if($user===false)
global $user;
$text = cleanupShout($text.' ');
$a_style = "";
global $user_profile;
if(loadMemberData(Array($user['id']),false,'profile')!==false)
{
$profile=$user_profile[$user['id']];
$a_style = ' class="userclass" style="color: '.(empty($profile['member_group_color']) ? $profile['post_group_color'] : $profile['member_group_color']).'"';
}
$shoutName=$user['name'];
$userID=$user['id'];
if(isGuest($user))
$writeText=$shoutName;
else
$writeText="<a$a_style href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
$writeText.=": $text";
makeRawShout($writeText,$user);
}
function makeRawShout($text,$user=false) {
global $maxLines,$chatPath,$historyPath,$ip;
if($user===false)
global $user;
$emTitle=time()." | $ip";
$banID=isGuest($user)?$ip:$user['id'];
$timestamp="<span class=\"shout-timestamp\" title=\"$emTitle\"><timeval=".time()."></span>";
$delLink="<a href=\"javascript:ajaxGet('delete=$emTitle&sesc=<sesc>')\">del</a>";
$banLink="<a href=\"javascript:ajaxGet('banid=$banID&sesc=<sesc>')\">ban</a>";
$adminlinks="<span class=\"shout-adminlinks\">$delLink $banLink </span>";
writeLine("<p class=\"shout\">$timestamp $adminlinks$text</p>\n",$chatPath);
truncateChat($maxLines,$chatPath,$historyPath);
refreshChats(true);
}
function truncateChat($maxLines,$chatPath,$historyPath) {
$fileContents = '';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$lines = explode("\n", $fileContents);
if(count($lines) > $maxLines) {
$newText = substr($fileContents, strpos($fileContents, "\n") + 1);
$handle = fopen($chatPath, "w");
fputs($handle, $newText);
fclose($handle);
if($historyPath !== '')
{
// History
$oldText = substr($fileContents, 0, strpos($fileContents, "\n") + 1);
$handle = fopen($historyPath, "a");
fputs($handle, $oldText);
fclose($handle);
}
}
}
function writeLine($writeText,$chatPath) {
$handle = fopen($chatPath, "a");
if($handle===false) die('File error (writeLine); aborted');
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two shouts happen simultaneously
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeLine); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
// utility functions for reading shouts
function processChats($chatText, $user=false) {
if($user===false)
global $user;
if(!isMod($user) || isset($_COOKIE['yShout_hideadmlinks']))
$chatText = preg_replace('/<span class="shout-adminlinks".+?<\/span>/','',$chatText);
if(!isMod($user))
$chatText = preg_replace('/<span class="shout-timestamp" title="(\d+) \| [0-9\.]+">/','<span class="shout-timestamp" title="\\1 | logged">',$chatText);
global $sc;
if(isMod($user))
$chatText = preg_replace('/<sesc>/',$sc,$chatText);
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
return $chatText;
}
function readChat($chatPath=false, $force=false) {
global $user,$reverseShouts;
if($chatPath === false)
global $chatPath;
if(isset($_SESSION['readingCmd']) && !$force)
{
$c=$_SESSION['readingCmd'];
if($c[0]=='/') // it's a command, redo command to retain the message
{
if(isMod()) processCommand($c);
else processUserCommand($c);
}
else
echo $c;
return ' ';
}
$chatText = "";
if(file_exists($chatPath))
$chatText = file_get_contents($chatPath);
$chatText=processChats($chatText,$user);
if($reverseShouts)
$chatText=implode("\n", array_reverse(explode("\n", $chatText)));
return $chatText.' '; // hack: totally empty responses can break some browsers
}
function refreshChats($forceRefresh=false) {
global $chatPath,$user,$maxLines,$gzipCompression,$updateTimeout,$updatePeriod;
if(!file_exists($chatPath))
writeLine('',$chatPath);
$time=filemtime($chatPath);
$start_time=time();
$heartBeatSent=false;
if(!$forceRefresh)
{
session_write_close(); // so that future session requests succeed
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
@session_start(); // restart session, so updates to $_SESSION are applied
}
if($gzipCompression && !$heartBeatSent) ob_start("ob_gzhandler");
echo readChat();
if($gzipCompression && !$heartBeatSent) ob_end_flush();
}
// help and history handlers
function help($command='')
{
global $user,$defaultEncoding,$txt;
$cmdlist=$txt['yshout_cmdlist'];
$cmdlistadmin=$txt['yshout_cmdlistadmin'];
if(isMod())
$cmdlist=array_merge($cmdlist,$cmdlistadmin);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_cmd_reference']; ?></title>
<style type="text/css">
/*<![CDATA[*/
.meaction {
color: red;
}
/*]]>*/
</style>
</head>
<body>
<?php
if($command=='')
{
echo '<h1>',$txt['yshout_shoutbox'],' ',$txt['yshout_commands'],'</h1><div>';
foreach($cmdlist as $cmd=>$desc)
{
echo "$cmd$desc<br />\n";
}
echo '</div>';
}
else
{
echo '<div>';
if(isset($cmdlist[$command])) echo "$command{$cmdlist[$command]}<br />\n";
else echo "$command not found";
echo '</div>';
}
?>
</body>
</html>
<?php
}
function history()
{
global $chatPath,$historyPath,$boardurl,$gzipCompression,$defaultEncoding,$txt;
$n=250;
if(isset($_GET['n'])) $n=intval($_GET['n']); // integers only!
if($gzipCompression) ob_start("ob_gzhandler");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<base href="<?php echo $boardurl,'/'; ?>" />
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></title>
<script type="text/javascript">
//<![CDATA[
function ajaxGet(args) {
window.location=window.location+'&'+args+'&'+'sesc=<?php global $sc; echo $sc; ?>';
}
//]]>
</script>
<style type="text/css">
/*<![CDATA[*/
/* form and toollink CSS omitted */
#yshout {
font-size: 10px;
overflow: hidden;
}
#yshout #shouts { /* main shouts area */
color: #000000;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #000000;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 6pt;
color: #141414;
}
/* from default theme */
.meaction {
color: red;
}
a:link {
color: #476C8E;
}
/*]]>*/
</style>
</head>
<body>
<h1><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></h1>
<div id="yshout">
<div id="shouts">
<?php
$text='';
if($historyPath !== '')
{
global $user;
require_once("class.tail.php");
$mytail = new tail($historyPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines($n);
$text=$mytail->output(PLAIN);
}
$text.=file_get_contents($chatPath);
echo processChats($text,$user);
?>
</div>
</div>
</body>
</html>
<?php
if($gzipCompression) ob_end_flush();
exit;
}
?>
Hi there,
I got a "Template Parse Error" ? Has this already been covered? I'm not exactly the best at coding! I've posted the code below anywho. Any help would be appriceated.
<?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'] = false;
/* 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'] = false;
// load custom language strings
loadLanguage('ThemeStrings');
}
// 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>
<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" />';
#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;
}
</style>';
// YSHOUT END
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
</head>
<body>';
// The top area with logo, avatar, user info, etc.
echo '
<table class="tborder" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="margin:auto; text-align:left;">
<tr class="windowbg">';
if (!empty($context['user']['avatar']))
echo '<td valign="middle" align="center" style="padding:5px;">', $context['user']['avatar']['image'], '</td>';
echo '
<td valign="middle" align="left" width="100%" class="tborder" style="border:0px;">';
if ($context['user']['is_logged'])
{
echo '
', $txt['hello_member'], ' <b>', $context['user']['name'], '</b>';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '
<br />', $context['current_time'];
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<br />
<b>', $txt[616], '</b>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<br />
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=regcenter">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'];
echo '<br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>';
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
', $txt['welcome_guest'], '<br />
', $context['current_time'], '<br />
<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'] . '\');"' : '', '>
<div style="text-align: right;">
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" /><br />
', $txt['smf52'], '
<input type="hidden" name="hash_passwrd" value="" />
</div>
</form>';
}
echo '
</td>
</tr>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<tr class="windowbg2">
<td colspan="2" height="24" class="tborder" style="border-width:1px 0 0 0; padding-left: 1ex;">
<b>', $txt[102], ':</b> ', $context['random_news_line'], '
</td>
</tr>';
echo '
</table>
<br />
<div align="center">';
// Show the menu here, according to the menu sub template.
template_menu();
echo '
</div>
<br />';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<br />
<div align="center">
', theme_copyright(), ' <br /> ',$txt['mystica'],' <br /> ',$txt['rw_copy'],'
</div>';
// Show the load time?
if ($context['show_load_time'])
echo '
<div align="center" class="smalltext">
', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '
</div>';
// 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>';
// And then we're done!
echo '
</body>
</html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
// Folder style or inline? Inline has a smaller font.
echo '<span class="nav"', $settings['linktree_inline'] ? ' 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 the | | |-[] Folders.
if (!$settings['linktree_inline'])
{
if ($link_num > 0)
echo str_repeat('<img src="' . $settings['images_url'] . '/icons/linktree_main.gif" alt="| " border="0" />', $link_num - 1), '<img src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />';
echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" /> ';
}
// 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['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 $settings['linktree_inline'] ? ' | ' : '<br />';
}
echo '</span>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];
// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" border="0" />' : $txt[182]), '</a>', $context['menu_separator'];
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" border="0" />' : $txt[2]), '</a>', $context['menu_separator'];
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];
// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];
// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" border="0" />' : $txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" border="0" />' : $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" border="0" />' : $txt[108]), '</a>';
}
// Generate a strip of buttons, out of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
if (empty($button_strip))
return '';
// 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'] : '') . '>' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . ($value['lang'] ? $context['user']['language'] . '/' : '') . $value['image'] . '" alt="' . $txt[$value['text']] . '" border="0" />' : $txt[$value['text']]) . '</a>';
$button_strip[$key] = $buttons[$key];
}
echo '
<td ', $custom_td, '>', implode($context['menu_separator'], $button_strip) , '</td>';
}
?>
Thanks!
Sorry if this has already been covered!
Ed x
Quote from: ameo on May 07, 2008, 11:46:19 AM
I made sort of guide for dummies, or something like that, to place this shoutbox in News field, and make it look cool on forum.
Personally, I believe this is the best position for shoutbox, and if you don't need News on your forum you could place shoutbox instead.
NOTE: I wrote tutorial and it works for 1.17 !!!
NOTE 2: With nneonneo's help - this works like a charm with version 1.21 also :)
For 1.21 installation see step 4 (http://postthatpic.com/files/2526/4.png) instead of step 1(http://postthatpic.com/files/2526/1.png), and then
follow all other steps normally.
(http://postthatpic.com/files/2526/1.png)STEP 1
First steps you already know, but I'll repeat it just in case;
First download yShout and install it.
If you're using different theme than default one after
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
you must add this code into your index.template.php :
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" 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;
}
</style>';
// YSHOUT END
(http://postthatpic.com/files/2526/2.png)
Then do this:
Of course you need news box to be displayed in order to see shoutbox in your index page.
To do that go to Theme options and click to:
1. DISABLE eNews (http://postthatpic.com/files/2526/inflame.gif) [it is very dangerous to leave it enabled, so if it is checked,
you must uncheck it]
&[/]
2. Show news fader on board index [check it]
3. fading delay - set to 0
Click save, then in News box put this code
a) for 1.15-1.17 <div id="yshout">',$txt['yshout_loading'],'
b) for 1.21 <div id="yshout">Loading shoutbox...</div>
instead of putting second code somewhere else:
And save it.
(http://postthatpic.com/files/2526/3.png)
If you wish to change News to Shout box or Shoutbox you'll need to find file index.english-utf8.php / index.english.php or of any other language file you're using. They are stored under Forum/Themes/default/languages/ In there you'll need to edit string $txt[102] = 'News';
to $txt[102] = 'Shoutbox'; and re-upload that file to it's place. You'll need to replace old file with that new-one if you didn't delete old one first.
// GUIDE FOR DUMMIES IS FINISHED // I guess that's it. I hope it shall be helpful to at least someone.[/]
Step 4 is actually step 1 FOR 1.21 installation
(http://postthatpic.com/files/2526/4.png)
In index.template.php, after
// 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" />';
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
Best of luck 2 everyone[/hr]
@lorddusk, Don Pepito: Edit yshout.php, and change this line:
writeLine("<p class=\"shout\">$timestamp $adminlinks$text</p>\n",$chatPath);
to your liking. Affects new shouts only.
$timestamp is the [time], $adminlinks are the "del" and "ban" buttons, $text is the shout.
@kuzjnvn: Try this: edit yshout.php, and add above
require_once($sourcedir . '/Subs-Post.php');
this line:
global $sourcedir;
@wrbex: Open yshout/settings.php, and edit the $bannedCode section to add [img] and [/img] tags.
@renkliforum: Did you install the <head> code? The javascript is required for the shoutbox to work.
@Quexinos: Edit yshout/settings.php and change $maxLines to your liking. You may need to /clear the shoutbox to make it take effect.
@dangerboy: The names use the forum colours for consistency. If you want to change that, edit yshout.php and change these lines:
$a_style = "";
global $user_profile;
if(loadMemberData(Array($user['id']),false,'profile')!==false)
{
$profile=$user_profile[$user['id']];
$a_style = ' class="userclass" style="color: '.(empty($profile['member_group_color']) ? $profile['post_group_color'] : $profile['member_group_color']).'"';
}
to
$a_style = ' class="userclass" style="color: orange"';
Do make a backup in case you want to change it back.
@changaroo: In index.template.php, add
style="text-align: left"
after
<div id="yshout"
to justify the text.
@mantodeus: Did you install it manually? For AdvSB, there is some extra code that goes with the shrink/expand. See this page (SMF2) (http://custom.simplemachines.org/mods/index.php?action=parse&attach=77560&smf_version=2.0_Beta_4&mod=585) or this page (SMF1) (http://custom.simplemachines.org/mods/index.php?action=parse&attach=77560&smf_version=1.1.7&mod=585) for more information.
@juniorj23: You can't really do much about it, since all the avatars can be different sizes.
@EdwardR: You didn't quite paste in the entire shoutbox code:
if (!empty($context['current_board']))
echo '
<link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
Just remove the code from #yshout p to // YSHOUT END, and try it again.
Quote from: nneonneo on January 23, 2009, 09:13:17 AM
.....
@mantodeus: Did you install it manually? For AdvSB, there is some extra code that goes with the shrink/expand. See this page (SMF2) (http://custom.simplemachines.org/mods/index.php?action=parse&attach=77560&smf_version=2.0_Beta_4&mod=585) or this page (SMF1) (http://custom.simplemachines.org/mods/index.php?action=parse&attach=77560&smf_version=1.1.7&mod=585) for more information.
....
I am using SMF 2 Beta 3.1 and I just uploaded the package AdvSB and hit apply mode.I ma using default theme and I applied also bulgarian language to this mode,translation from the first post.
Have I to make any other changes ?
EDIT : Okay I followed the instructions from the link which you gave me and now it is working ! Thanks
ok thnx
Quote from: nneonneo on January 23, 2009, 09:13:17 AM
@lorddusk, Don Pepito: Edit yshout.php, and change this line:
writeLine("<p class=\"shout\">$timestamp $adminlinks$text</p>\n",$chatPath);
to your liking. Affects new shouts only.
$timestamp is the [time], $adminlinks are the "del" and "ban" buttons, $text is the shout.
Thanks, it worked, but i have a new question, the darker gray stripes, can you delete them? ( i mean the stripes that seperates the shouts... )
Quote from: MrMoney on January 22, 2009, 08:25:34 PM
Quote from: Mythers on January 22, 2009, 03:10:11 PM
Hey !
I've got a question: I'm currently using Midnight Sun theme on my forum. But, when i install the theme on the site with the shoutbox after editing the Index.template.php my shoutbox is at the Top left corner.
I'm a really newbie when it comes to Php etc.
So, how can i make the shoutbox be where it is when i use SMF core for an example ?
Any help is very Appreciated !
Edit: I'm using SMF 2.0 beta 4
Post your index.template.php.
I'll do it for you.
?php
// Version: 2.0 Beta 4; 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'] = '2.0 Beta 4';
/* 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'] = true;
/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;
/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;
/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;
/* Call to Theme String for languages */
if(loadlanguage('ThemeStrings') == false)
loadLanguage('ThemeStrings', 'english');
}
// The main sub template above the content.
function template_html_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_html_safe'], '" />
<meta name="keywords" content="', $context['meta_keywords'], '" />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?b4"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/theme.js?b4"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_default_theme_url = "', $settings['default_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'], '";', $context['show_pm_popup'] ? '
if (confirm("' . $txt['show_personal_messages'] . '"))
window.open("' . $scripturl . '?action=pm");' : '', '
var ajax_notification_text = "', $txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
// ]]></script>
<title>', $context['page_title_html_safe'], '</title>';
// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />';
// The ?b4 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', $context['theme_variant'], '.css?b4" />';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/print.css?b4" media="print" />';
echo '
<link rel="stylesheet" type="html" href="', $settings['theme_url'], '/resources.html?b4" />';
// IE7 needs some fixes for styles.
if ($context['browser']['is_ie7'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ie7.css" />';
// ..and IE6!
elseif ($context['browser']['is_ie6'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ie6.css" />';
// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" />
<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_html_safe'], ' - 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" />';
// 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
// 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
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", ', empty($options['collapse_header']) ? 'false' : 'true', ');
mainHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
mainHeader.setOptions("collapse_header", "', $context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>';
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var PreloadImages = new Array(
"/images/submenu_top.png",
"/images/submenu_bg.png"
);
var myImages = new Array();
for(var i = 0; i < PreloadImages.length; i++)
{
myImages[i] = new Image();
myImages[i].src = "'. $settings['theme_url'] .'" + PreloadImages[i];
}
// ]]></script>';
echo '
</head>
<body>';
}
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<div id="wrapper">
<div id="shad-l">
<div id="shad-r">
<div id="head-l">
<div id="head-r">
<div id="header">
<div id="userarea">';
if ($context['user']['is_logged'])
{
echo '
<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt['msg_alert_you_have'], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
echo '
<a href="', $scripturl, '?action=unread">',$txt['showunread2'],'</a> /
<a href="', $scripturl, '?action=unreadreplies">',$txt['showreplies2'],'</a> /
<a href="', $scripturl, '?action=profile;sa=showPosts">',$txt['ownposts2'],'</a><br />
', $context['current_time'],'';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo sprintf($txt['welcome_forum']);
echo '
<br/>', $context['current_time'],'<br />';
}
echo '
</div>
<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
echo '
</div>
</div>
</div>
<div id="toolbar">
',template_menu(),'
</div>
<div id="bodyarea">';
// Show the navigation tree.
theme_linktree();
}
function template_body_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="foot-l">
<div id="foot-r">
<div id="footer">
<div id="footerarea">
<span class="smalltext">Midnight Sun by <a href="http://www.dzinerstudio.com"><b>Antechinus</b></a> | <a href="', $settings['theme_url'], '/resources.html?b4" target="_blank"><b>Resources</b></a> | <a href="http://www.dzinerstudio.com">DzinerStudio</a>
</span>';
echo '
</div>
</div>
</div>
</div>';
// Show the load time?
echo'
<div id="basebar" style="height: 20px; text-align: center; ">
<span class="smalltext">', theme_copyright(), ' </span>';
if ($context['show_load_time'])
echo '<span class="smalltext">| '. $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</span>';
echo '
</div>';
}
function template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
</div>
</div>
</div>
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show = false)
{
global $context, $settings, $options, $shown_linktree;
// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;
//!!! Temporarily don't do it twice.
if (!empty($shown_linktree))
return;
$shown_linktree = true;
echo '
<ul id="linktree">';
// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li', ($link_num == count($context['linktree']) - 1) ? ' class="last"' : '', '>';
// 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 $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>' : '<span>' . $tree['name'] .'</span>';
// 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 ' >';
echo '
</li>';
}
echo '
</ul>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div class="tabs">
<ul>';
foreach ($context['menu_buttons'] as $act => $button)
{
echo ' <li><a ', $button['active_button'] ? ' class="current"' : '' , ' href="', $button['href'], '">
<span class="menu-left"></span>
<span class="menu-right">' , $button['title'] , '</span></a>';
// Does this button have any subbuttons?
if(!empty($button['sub_buttons']))
{
echo '
<div class="sub">
<ul>';
foreach($button['sub_buttons'] as $sub_button)
echo '
<li><a href="', $sub_button['href'], '">' , $sub_button['title'] , '</a></li>';
echo '
</ul>
</div>';
}
echo' </li>';
}
echo '
</ul>
</div>';
}
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $context, $txt, $scripturl;
// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a href="' . $value['url'] . '" ' . (isset($value['custom']) ? $value['custom'] : '') . '><span>' . $txt[$value['text']] . '</span></a>';
}
if (empty($buttons))
return '';
// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>', '<span class="last">', $buttons[count($buttons) - 1]);
echo '
<div class="buttonlist', $direction != 'top' ? '_bottom' : '', '">
<ul class="clearfix">
<li>', implode('</li><li>', $buttons), '</li>
</ul>
</div>';
}
?>
@lorddusk: edit yshout.css or index.template.php
add after
#yshout hr { /* shout divider */
the line
display: none;
If you can't find #yshout hr, just add
#yshout hr {
display: none;
}
near other similar-looking blocks
Quote from: Mythers on January 23, 2009, 04:33:54 PM
?php
// Version: 2.0 Beta 4; 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'] = '2.0 Beta 4';
/* 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'] = true;
/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;
/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;
/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;
/* Call to Theme String for languages */
if(loadlanguage('ThemeStrings') == false)
loadLanguage('ThemeStrings', 'english');
}
// The main sub template above the content.
function template_html_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_html_safe'], '" />
<meta name="keywords" content="', $context['meta_keywords'], '" />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?b4"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/theme.js?b4"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_default_theme_url = "', $settings['default_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'], '";', $context['show_pm_popup'] ? '
if (confirm("' . $txt['show_personal_messages'] . '"))
window.open("' . $scripturl . '?action=pm");' : '', '
var ajax_notification_text = "', $txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
// ]]></script>
<title>', $context['page_title_html_safe'], '</title>';
// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />';
// The ?b4 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', $context['theme_variant'], '.css?b4" />';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/print.css?b4" media="print" />';
echo '
<link rel="stylesheet" type="html" href="', $settings['theme_url'], '/resources.html?b4" />';
// IE7 needs some fixes for styles.
if ($context['browser']['is_ie7'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ie7.css" />';
// ..and IE6!
elseif ($context['browser']['is_ie6'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ie6.css" />';
// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" />
<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_html_safe'], ' - 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" />';
// 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
// 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
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", ', empty($options['collapse_header']) ? 'false' : 'true', ');
mainHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
mainHeader.setOptions("collapse_header", "', $context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>';
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var PreloadImages = new Array(
"/images/submenu_top.png",
"/images/submenu_bg.png"
);
var myImages = new Array();
for(var i = 0; i < PreloadImages.length; i++)
{
myImages[i] = new Image();
myImages[i].src = "'. $settings['theme_url'] .'" + PreloadImages[i];
}
// ]]></script>';
echo '
</head>
<body>';
}
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<div id="wrapper">
<div id="shad-l">
<div id="shad-r">
<div id="head-l">
<div id="head-r">
<div id="header">
<div id="userarea">';
if ($context['user']['is_logged'])
{
echo '
<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt['msg_alert_you_have'], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
echo '
<a href="', $scripturl, '?action=unread">',$txt['showunread2'],'</a> /
<a href="', $scripturl, '?action=unreadreplies">',$txt['showreplies2'],'</a> /
<a href="', $scripturl, '?action=profile;sa=showPosts">',$txt['ownposts2'],'</a><br />
', $context['current_time'],'';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo sprintf($txt['welcome_forum']);
echo '
<br/>', $context['current_time'],'<br />';
}
echo '
</div>
<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
echo '
</div>
</div>
</div>
<div id="toolbar">
',template_menu(),'
</div>
<div id="bodyarea">';
// Show the navigation tree.
theme_linktree();
}
function template_body_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="foot-l">
<div id="foot-r">
<div id="footer">
<div id="footerarea">
<span class="smalltext">Midnight Sun by <a href="http://www.dzinerstudio.com"><b>Antechinus</b></a> | <a href="', $settings['theme_url'], '/resources.html?b4" target="_blank"><b>Resources</b></a> | <a href="http://www.dzinerstudio.com">DzinerStudio</a>
</span>';
echo '
</div>
</div>
</div>
</div>';
// Show the load time?
echo'
<div id="basebar" style="height: 20px; text-align: center; ">
<span class="smalltext">', theme_copyright(), ' </span>';
if ($context['show_load_time'])
echo '<span class="smalltext">| '. $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</span>';
echo '
</div>';
}
function template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
</div>
</div>
</div>
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show = false)
{
global $context, $settings, $options, $shown_linktree;
// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;
//!!! Temporarily don't do it twice.
if (!empty($shown_linktree))
return;
$shown_linktree = true;
echo '
<ul id="linktree">';
// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li', ($link_num == count($context['linktree']) - 1) ? ' class="last"' : '', '>';
// 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 $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>' : '<span>' . $tree['name'] .'</span>';
// 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 ' >';
echo '
</li>';
}
echo '
</ul>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div class="tabs">
<ul>';
foreach ($context['menu_buttons'] as $act => $button)
{
echo ' <li><a ', $button['active_button'] ? ' class="current"' : '' , ' href="', $button['href'], '">
<span class="menu-left"></span>
<span class="menu-right">' , $button['title'] , '</span></a>';
// Does this button have any subbuttons?
if(!empty($button['sub_buttons']))
{
echo '
<div class="sub">
<ul>';
foreach($button['sub_buttons'] as $sub_button)
echo '
<li><a href="', $sub_button['href'], '">' , $sub_button['title'] , '</a></li>';
echo '
</ul>
</div>';
}
echo' </li>';
}
echo '
</ul>
</div>';
}
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $context, $txt, $scripturl;
// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a href="' . $value['url'] . '" ' . (isset($value['custom']) ? $value['custom'] : '') . '><span>' . $txt[$value['text']] . '</span></a>';
}
if (empty($buttons))
return '';
// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>', '<span class="last">', $buttons[count($buttons) - 1]);
echo '
<div class="buttonlist', $direction != 'top' ? '_bottom' : '', '">
<ul class="clearfix">
<li>', implode('</li><li>', $buttons), '</li>
</ul>
</div>';
}
?>
<?php
// Version: 2.0 Beta 4; 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'] = '2.0 Beta 4';
/* 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'] = true;
/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;
/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;
/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;
/* Call to Theme String for languages */
if(loadlanguage('ThemeStrings') == false)
loadLanguage('ThemeStrings', 'english');
}
// The main sub template above the content.
function template_html_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_html_safe'], '" />
<meta name="keywords" content="', $context['meta_keywords'], '" />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?b4"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/theme.js?b4"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_default_theme_url = "', $settings['default_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'], '";', $context['show_pm_popup'] ? '
if (confirm("' . $txt['show_personal_messages'] . '"))
window.open("' . $scripturl . '?action=pm");' : '', '
var ajax_notification_text = "', $txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
// ]]></script>
<title>', $context['page_title_html_safe'], '</title>';
// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />';
// The ?b4 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', $context['theme_variant'], '.css?b4" />';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/print.css?b4" media="print" />';
echo '
<link rel="stylesheet" type="html" href="', $settings['theme_url'], '/resources.html?b4" />';
// IE7 needs some fixes for styles.
if ($context['browser']['is_ie7'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ie7.css" />';
// ..and IE6!
elseif ($context['browser']['is_ie6'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ie6.css" />';
// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" />
<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_html_safe'], ' - 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" />';
// 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
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", ', empty($options['collapse_header']) ? 'false' : 'true', ');
mainHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
mainHeader.setOptions("collapse_header", "', $context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>';
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var PreloadImages = new Array(
"/images/submenu_top.png",
"/images/submenu_bg.png"
);
var myImages = new Array();
for(var i = 0; i < PreloadImages.length; i++)
{
myImages[i] = new Image();
myImages[i].src = "'. $settings['theme_url'] .'" + PreloadImages[i];
}
// ]]></script>';
echo '
</head>
<body>';
}
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<div id="wrapper">
<div id="shad-l">
<div id="shad-r">
<div id="head-l">
<div id="head-r">
<div id="header">
<div id="userarea">';
if ($context['user']['is_logged'])
{
echo '
<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt['msg_alert_you_have'], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
echo '
<a href="', $scripturl, '?action=unread">',$txt['showunread2'],'</a> /
<a href="', $scripturl, '?action=unreadreplies">',$txt['showreplies2'],'</a> /
<a href="', $scripturl, '?action=profile;sa=showPosts">',$txt['ownposts2'],'</a><br />
', $context['current_time'],'';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo sprintf($txt['welcome_forum']);
echo '
<br/>', $context['current_time'],'<br />';
}
echo '
</div>
<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
echo '
</div>
</div>
</div>';
// 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
echo '<div id="toolbar">
',template_menu(),'
</div>
<div id="bodyarea">';
// Show the navigation tree.
theme_linktree();
}
function template_body_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="foot-l">
<div id="foot-r">
<div id="footer">
<div id="footerarea">
<span class="smalltext">Midnight Sun by <a href="http://www.dzinerstudio.com"><b>Antechinus</b></a> | <a href="', $settings['theme_url'], '/resources.html?b4" target="_blank"><b>Resources</b></a> | <a href="http://www.dzinerstudio.com">DzinerStudio</a>
</span>';
echo '
</div>
</div>
</div>
</div>';
// Show the load time?
echo'
<div id="basebar" style="height: 20px; text-align: center; ">
<span class="smalltext">', theme_copyright(), ' </span>';
if ($context['show_load_time'])
echo '<span class="smalltext">| '. $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</span>';
echo '
</div>';
}
function template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
</div>
</div>
</div>
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show = false)
{
global $context, $settings, $options, $shown_linktree;
// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;
//!!! Temporarily don't do it twice.
if (!empty($shown_linktree))
return;
$shown_linktree = true;
echo '
<ul id="linktree">';
// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li', ($link_num == count($context['linktree']) - 1) ? ' class="last"' : '', '>';
// 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 $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>' : '<span>' . $tree['name'] .'</span>';
// 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 ' >';
echo '
</li>';
}
echo '
</ul>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div class="tabs">
<ul>';
foreach ($context['menu_buttons'] as $act => $button)
{
echo ' <li><a ', $button['active_button'] ? ' class="current"' : '' , ' href="', $button['href'], '">
<span class="menu-left"></span>
<span class="menu-right">' , $button['title'] , '</span></a>';
// Does this button have any subbuttons?
if(!empty($button['sub_buttons']))
{
echo '
<div class="sub">
<ul>';
foreach($button['sub_buttons'] as $sub_button)
echo '
<li><a href="', $sub_button['href'], '">' , $sub_button['title'] , '</a></li>';
echo '
</ul>
</div>';
}
echo' </li>';
}
echo '
</ul>
</div>';
}
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $context, $txt, $scripturl;
// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a href="' . $value['url'] . '" ' . (isset($value['custom']) ? $value['custom'] : '') . '><span>' . $txt[$value['text']] . '</span></a>';
}
if (empty($buttons))
return '';
// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>', '<span class="last">', $buttons[count($buttons) - 1]);
echo '
<div class="buttonlist', $direction != 'top' ? '_bottom' : '', '">
<ul class="clearfix">
<li>', implode('</li><li>', $buttons), '</li>
</ul>
</div>';
}
?>
Try that.
Quote from: changaroo on January 22, 2009, 09:04:58 PM
<?php
// nneonneo's AJAX shoutbox
// Version 1.22
// Figure out where the yshout folder is
global $yshoutdir;
$yshoutdir=(defined('SMF')||isset($yshout_from_index))?'yshout/':'';
// Check configuration files
if(!file_exists($yshoutdir.'settings.php'))
{
echo 'Error: No settings.';
return;
}
if(!file_exists($yshoutdir.'_banlist.php'))
{
// If _banlist.php has been deleted, assume it should be reset to defaults
$ban_ips_readpost=$ban_ips_post=$ban_names_readpost=$ban_names_post=array();
$sbMaintenance=false;
writeBanList();
}
// Load settings
require_once($yshoutdir."settings.php");
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance;
require_once($yshoutdir.'_banlist.php');
// Figure out which file we're logging chats to
global $shoutFile;
if(!isset($shoutFile))
$shoutFile='home';
if(isset($_REQUEST['file']))
$shoutFile=$_REQUEST['file'];
$shoutFile=preg_replace('/[^A-Za-z0-9_]/','',$shoutFile);
global $chatPath,$historyPath;
$chatsFullDir=$yshoutdir.$chatsDir.'/';
$chatPath=$chatsFullDir.sprintf($chatFormat,$shoutFile);
$historyPath=($historyFormat==='')?'':$chatsFullDir.sprintf($historyFormat,$shoutFile);
// If the shoutbox isn't require'd from SMF, we need to load some SMF components.
$loadedFromSMF=true;
if(!defined('SMF'))
{
$loadedFromSMF=false;
session_start();
require(dirname(__FILE__) . "/../SSI.php");
require_once($sourcedir . '/Subs-Post.php');
$defaultEncoding=(empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']);
header('Content-type: text/html; charset='.$defaultEncoding);
}
// Set up some useful globals
global $func,$smcFunc,$ip,$isSMF1,$user;
$ip = $_SERVER['REMOTE_ADDR'];
$isSMF1 = isset($func);
if(!$isSMF1)
$func=$smcFunc;
$maxLines+=1; // off-by-one correction
$user=$context['user']; // shortcut, for brevity
if(!$loadedFromSMF)
{
loadUserSettings();
loadPermissions();
loadTheme();
writeLog(); // mark user as online
}
// Are you banned from reading the shoutbox?
if(in_array($ip, $ban_ips_readpost) || in_array($user['username'], $ban_names_readpost) || in_array($user['name'], $ban_names_readpost))
{
echo $txt['yshout_banned'];
return;
}
if(!allowedTo('yshout_view'))
{
if(isGuest())
echo $txt['yshout_no_guests'];
return;
}
// Check guest status and grab guest username
if(isGuest())
{
if($autoGuestName!==false)
$user['username']=$user['name']=$_COOKIE['username']=$autoGuestName.substr(md5($ip),0,4);
elseif(isset($_POST['username']) || isset($_COOKIE['username']))
{
$requsername=isset($_POST['username'])?$_POST['username']:$_COOKIE['username'];
$requsername=$func['htmlspecialchars'](html_entity_decode(urldecode($requsername)),ENT_QUOTES);
$user['username']=$user['name']=$_COOKIE['username']=$requsername;
}
}
// Check user group membership
$user['is_sbmod']=false;
$user['can_sbpost']=false;
if(allowedTo('yshout_moderate'))
$user['is_sbmod']=true;
if(allowedTo('yshout_post'))
$user['can_sbpost']=true;
if($loadedFromSMF)
{
// Initialize the shoutbox and quit
initShoutbox($user,true);
return;
}
// Permission checks
function isGuest($user=false)
{
if($user===false) global $user;
return !$user['is_logged'];
}
function isMod($user=false)
{
if($user===false) global $user;
return $user['is_admin'] || $user['is_sbmod'];
}
function isPostBanned($user=false)
{
global $ip,$ban_ips_post,$ban_names_post;
if($user===false) global $user;
return in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post);
}
// $_GET commands
// administrative: ban/unban and delete
if(isset($_GET['banid']))
{
if(!isset($_GET['mode']))
{
global $boardurl;
doMsg(<<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<base href="$boardurl/" />
<meta http-equiv="content-type" content="text/html; charset=$defaultEncoding" />
<title>{$txt['yshout_ban_conf']}</title>
<script type="text/javascript">
//<![CDATA[
function ajaxGet(args) {
window.location=window.location+'&'+args;
}
//]]>
</script>
</head>
<body>
<h1>{$txt['yshout_select_mode']}</h1>
<p><a href="javascript:ajaxGet('banid={$_GET['banid']}&sesc={$_GET['sesc']}&mode=rp');">{$txt['yshout_rp']}</a></p>
<p><a href="javascript:ajaxGet('banid={$_GET['banid']}&sesc={$_GET['sesc']}&mode=p');">{$txt['yshout_p']}</a></p>
</body>
</html>
EOF
);
exit;
}
if(isMod())
{
$error=checkSession('request','',false);
if($error!=='')
{
loadLanguage('Errors');
die($txt[$error]);
}
if(!is_numeric($_GET['banid']))
{
// not an ID, so probably an IP
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_ips_',$_GET['mode'],$_GET['banid']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
exit;
}
if(loadMemberData(Array($_GET['banid']),false,'minimal')===false)
{
doMsg($txt['yshout_error'].$txt['yshout_no_user']);
exit;
}
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_names_',$_GET['mode'],$user_profile[$_GET['banid']][$isSMF1?'memberName':'member_name']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(isset($_GET['unban']))
{
if(isMod())
{
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_'.$_GET["type"].'s_','u',$_GET['unban']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(isset($_GET['delete']))
{
if(isMod())
{
$error=checkSession('request','',false);
if($error!=='')
{
loadLanguage('Errors');
die($txt[$error]);
}
$success=deleteShout($_GET['delete'],$chatPath);
if(isset($_GET['history']) && !$success)
$success=deleteShout($_GET['delete'],$historyPath);
if($success)
echo $txt['yshout_del_success'];
}
exit;
}
// Regular user $_GET commands: history, help
if(isset($_GET["history"]))
{
history();
exit;
}
if(isset($_GET["help"]))
{
help();
exit;
}
// If $_GET doesn't carry a command, check the request type
if(!isset($_POST["reqtype"]))
{
echo $txt['yshout_no_action'];
return;
}
$reqType = $_POST["reqtype"];
function initShoutbox($user,$fromSMF)
{
// This function initializes the shoutbox: it prints the tool links,
// current shouts and shout form
global $gzipCompression,$txt,$user,$maxUsernameChars,$maxShoutChars,$sbMaintenance,$autoGuestName,$shoutFormOnTop;
if($gzipCompression && !$fromSMF) ob_start("ob_gzhandler");
// Language check -- only admins will see this
if($user['is_admin'] && !isset($txt['yshout_history']) && !isset($_COOKIE['yShout_read_txt_notice']))
{
global $user_info,$language,$settings;
$user_language=isset($user_info['language']) ? $user_info['language'] : $language;
if($user_language != 'english' || $settings['theme_dir'] != $settings['default_theme_dir'])
echo '<span style="color:red;background:white">
Warning! The shoutbox text files for your language are not installed.
This may cause the shoutbox and admin settings to appear wrong.<br /><br />
To fix this problem, copy <strong>',$settings['default_theme_dir'],'/languages/Modifications.english.php</strong>
to <strong>',$settings['theme_dir'],'/languages/Modifications.',$user_language,'.php</strong> and translate as desired.<br /><br />
To <strong>ignore</strong> this notice, click <a href="javascript:set_cookie(\'yShout_read_txt_notice\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">here</a>.<br /><br /></span>';
}
// Tool links (History, Commands, etc.)
echo '<span id="yshout-toollinks">';
echo '[<a href="javascript:goTo(\'history\')">',$txt['yshout_history'],'</a>] ';
echo '[<a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>]';
if(isMod())
{
echo ' [<a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>]';
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' [<a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>]';
else
echo ' [<a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>]';
echo ' [<a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>]';
}
echo '</span>'; // yshout-toollinks
if(!$shoutFormOnTop)
echo '<div id="shouts">',readChat(),'</div>';
// Shout form
echo '
<form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;">
<fieldset>';
$inputForumName=' <input id="forum-name" type="text" maxlength="'.$maxUsernameChars.'" ';
$inputShoutText=' <input id="shout-text" type="text" maxlength="'.$maxShoutChars.'" ';
$inputShoutButton=' <input id="shout-button" type="submit" ';
if(isPostBanned())
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',$txt['yshout_p_banned'],'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_banned'],'" disabled="disabled" />';
elseif(!isMod() && $sbMaintenance!==false)
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',$sbMaintenance,'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_maintenance'],'" disabled="disabled" />';
elseif(!$user['can_sbpost'])
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',isGuest()?$txt['yshout_no_guests']:$txt['yshout_no_posting'],'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_maintenance'],'" disabled="disabled" />';
else
{
if(isGuest() && $autoGuestName===false)
echo '
',$inputForumName,'value="',$user['name'], '" />';
else
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />';
echo '
',$inputShoutText,'value="" />
',$inputShoutButton,'value="',$txt['yshout_shout_button'],'" />';
}
echo '
</fieldset>
</form>';
if($shoutFormOnTop)
echo '<div id="shouts">',readChat(),'</div>';
if($gzipCompression && !$fromSMF) ob_end_flush();
}
// Figure out the request
switch($reqType) {
case "init":
initShoutbox($user,false);
break;
case "shout":
if(isPostBanned()) break;
if(!$user['can_sbpost']) break;
if(!isMod() && $sbMaintenance!==false) break;
$shoutText = $_POST["shout"];
if($shoutText[0]=='/' && $allowCommands)
{
if(isMod())
{
if(processCommand($shoutText))
break;
}
elseif(!isGuest() || $guestCommands)
{
$shoutText=substr($shoutText,0,$maxShoutChars);
if(processUserCommand($shoutText)) break;
}
}
$shoutName = $user['name'];
if(!isMod())
$shoutText=substr($shoutText,0,$maxShoutChars);
makeShout($shoutText,$user);
break;
case "refresh":
refreshChats(false);
break;
case "autoshout":
if(isMod())
processCommand($_POST["shout"]);
break;
}
function doMsg($msg)
{
echo $msg; // tell user
$_SESSION['readingCmd']=$msg; // make sure user keeps seeing this message; see readChat
}
function processCommand($text) {
global $reqType, $maxLines, $ip, $user, $bannedCommands, $txt, $sbMaintenance;
global $ban_ips_readpost, $ban_ips_post, $ban_names_readpost, $ban_names_post;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces.
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
case "/clear":
global $chatPath, $historyPath;
$fileContents='';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$handle=fopen($chatPath, 'w');
fputs($handle,'');
fclose($handle);
if($historyPath !== '')
{
$handle=fopen($historyPath, 'a');
fputs($handle,$fileContents);
fclose($handle);
}
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat();
return true;
case "/lock":
if($args=='')
{
doMsg($txt['yshout_error'].$txt['yshout_lock_arg_error']);
return true;
}
if($sbMaintenance !== false)
doMsg(sprintf($txt['yshout_lock_changed'],$args));
else
doMsg(sprintf($txt['yshout_lock_success'], $args));
$sbMaintenance = $args;
writeBanList();
return true;
case "/unlock":
if($sbMaintenance === false)
{
doMsg($txt['yshout_error'].$txt['yshout_unlock_already']);
return true;
}
$sbMaintenance = false;
writeBanList();
doMsg($txt['yshout_unlock_success']);
return true;
case "/banlist": // who's banned?
$_SESSION['readingCmd']=$text;
$temp=Array();
echo '<table>
<caption>',$txt['yshout_banlist_caption'],'</caption>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_ips_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_ips_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_names_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_names_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '</table>';
return true;
case "/ban": // need to be more specific!
doMsg($txt['yshout_error'].$txt['yshout_ban_type_error']);
return true;
case "/banuser":
case "/banip":
$type=($cmd=='/banip')?'ban_ips_':'ban_names_'; // prefixes for variables
$ar=explode(' ',$args,2); // true argument array. the "2" ensures that we cut only once: mode can't have spaces but user can.
if(count($ar)!=2) // whoops: only one argument?
{
doMsg($txt['yshout_error'].$txt['yshout_ban_mode_error']);
return true;
}
$mode=$ar[0]; // set up vars
$id=$ar[1];
doBan($type,$mode,$id);
return true;
case "/impersonate":
// <user> [userlevel] [ip] [userid] /[shout text]
$slashpos=strpos($args,' /'); // use ' /' as a separator, so we can see how many args came before
if($slashpos===false) // no shout? invalid formatting?
{
doMsg($txt['yshout_error'].$txt['yshout_imp_slash_error']);
return true;
}
$shout=substr($args,$slashpos+2);
$ar=explode(' ',substr($args,0,$slashpos));
$name='';
$userlevel=0;
$userid=0;
switch(count($ar)) // how many args did we get?
{
case 0: // no args
doMsg($txt['yshout_error'].$txt['yshout_imp_uname_error']);
return true;
case 4: // reverse order to save space: we just set them from the back!
$userid=intval($ar[3]);
case 3:
$ip=$ar[2]; // corrupt the global >:D
case 2:
$userlevel=intval($ar[1]);
case 1:
$name=html_entity_decode($ar[0]);
break;
default:
doMsg($txt['yshout_error'].$txt['yshout_imp_max4_error']); // just so they know that we only have 4 params
return true;
}
$ip.='.'; // to set off the impersonated msgs
$fakeuser=array('id'=>$userid,'name'=>$name,'is_admin'=>($userlevel==2)?1:0,'is_sbmod'=>($userlevel==1)?1:0,'is_logged'=>($userlevel==-1)?0:1); // fake SMF $user array
makeShout($shout,$fakeuser);
return true;
default: // not a command
return processUserCommand($text);
}
return false;
}
function processUserCommand($text) {
global $reqType,$chatPath,$historyPath,$maxLines,$ip,$ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$user,$bannedCommands,$func;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces.
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
case "/help":
if(empty($args)) help();
elseif($args[0]!='/') help('/'.$args);
else help($args);
$_SESSION['readingCmd']=$text;
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat();
return true;
case "/pi":
$s_pi='141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609';
$n=5;
if($args!='') $n=intval($args);
$res=($n==0)?"PI IS EXACTLY 3!":'3.'.substr($s_pi,0,$n-1).(substr($s_pi,$n-1,1)+(substr($s_pi,$n,1)>=5?1:0));
// all that nasty little bit does is add the first n-2 chars, then add the last digit and increment if rounding is necessary.
makeShout($res);
return true;
case "/me":
$newText = cleanupShout($args.' ');
$shoutName=$user['name'];
makeRawShout("<span class=\"meaction\"> * $shoutName $newText</span>",$user);
return true;
default:
return false;
}
return false;
}
// utility functions for banning and deleting
function doBan($type,$mode,$id)
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$txt;
switch($mode)
{
case 'u': // nice guy
$r=$type.'readpost'; // need to search both ban arrays. Search this one first...
$index=array_search($id,$$r); // where is my little banned user?
if($index===false)
{
$r=$type.'post'; // ...and this one second on failure.
$index=array_search($id,$$r);
if($index===false) // whoops, both searches failed!
{
doMsg($txt['yshout_error'].'Couldn\'t find user to unban!');
return false;
}
}
array_splice($$r,$index,1); // cut the 1 element loose with splice. $$r is used because $r is the string variable denoting the target array.
doMsg("Success: unbanned $id.");
break;
case 'rp':
array_push(${$type.'readpost'},$id); // easy, huh!
doMsg("Success: banned $id from reading and posting.");
break;
case 'p':
array_push(${$type.'post'},$id);
doMsg("Success: banned $id from posting.");
break;
default:
doMsg($txt['yshout_error']."Invalid mode $mode! Use only 'u', 'rp' or 'p'!");
return false;
}
writeBanList(); // write the final report
return true;
}
function writeBanList() // generate our dynamic ban list, which is 'require'd at the start of this script
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance,$yshoutdir;
$writeText = "<"."?php\n"; // php header
$writeText .= '$ban_ips_readpost = '.var_export($ban_ips_readpost,true).";\n"; // bans
$writeText .= '$ban_ips_post = '.var_export($ban_ips_post,true).";\n";
$writeText .= '$ban_names_readpost = '.var_export($ban_names_readpost,true).";\n";
$writeText .= '$ban_names_post = '.var_export($ban_names_post,true).";\n";
$writeText .= '$sbMaintenance = '.var_export($sbMaintenance,true).";\n";
$writeText .= '?'.'>'; // end tag
$handle = fopen($yshoutdir."_banlist.php", "w");
if($handle===false) die('File error (writeBanList); aborted');
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two bans happen simultaneously
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeBanList); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
function deleteShout($spanTitle, $chatPath) {
$fileContents = '';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$newFileContents=preg_replace('/<p[^>]*><span class="shout-timestamp" title="'.str_replace('|','\|',$spanTitle).'">.+\n/','',$fileContents);
if($fileContents == $newFileContents) return false;
$handle = fopen($chatPath, "w");
fputs($handle, $newFileContents);
fclose($handle);
return true;
}
// utility functions for shouting
function cleanupShout($text) {
global $func,$bannedCode,$context;
$text = $func['htmlspecialchars'](stripslashes($text), ENT_QUOTES);
foreach($bannedCode as $searchString)
$text = preg_replace('/'.preg_quote($searchString,'/').'/i','',$text);
preparsecode($text);
$text = parse_bbc($text);
censorText($text);
return $text;
}
function makeShout($text,$user=false) {
if($user===false)
global $user;
$text = cleanupShout($text.' ');
$a_style = "";
global $user_profile;
if(loadMemberData(Array($user['id']),false,'profile')!==false)
{
$profile=$user_profile[$user['id']];
$a_style = ' class="userclass" style="color: '.(empty($profile['member_group_color']) ? $profile['post_group_color'] : $profile['member_group_color']).'"';
}
$shoutName=$user['name'];
$userID=$user['id'];
if(isGuest($user))
$writeText=$shoutName;
else
$writeText="<a$a_style href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
$writeText.=": $text";
makeRawShout($writeText,$user);
}
function makeRawShout($text,$user=false) {
global $maxLines,$chatPath,$historyPath,$ip;
if($user===false)
global $user;
$emTitle=time()." | $ip";
$banID=isGuest($user)?$ip:$user['id'];
$timestamp="<span class=\"shout-timestamp\" title=\"$emTitle\"><timeval=".time()."></span>";
$delLink="<a href=\"javascript:ajaxGet('delete=$emTitle&sesc=<sesc>')\">del</a>";
$banLink="<a href=\"javascript:ajaxGet('banid=$banID&sesc=<sesc>')\">ban</a>";
$adminlinks="<span class=\"shout-adminlinks\">$delLink $banLink </span>";
writeLine("<p class=\"shout\">$timestamp $adminlinks$text</p>\n",$chatPath);
truncateChat($maxLines,$chatPath,$historyPath);
refreshChats(true);
}
function truncateChat($maxLines,$chatPath,$historyPath) {
$fileContents = '';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$lines = explode("\n", $fileContents);
if(count($lines) > $maxLines) {
$newText = substr($fileContents, strpos($fileContents, "\n") + 1);
$handle = fopen($chatPath, "w");
fputs($handle, $newText);
fclose($handle);
if($historyPath !== '')
{
// History
$oldText = substr($fileContents, 0, strpos($fileContents, "\n") + 1);
$handle = fopen($historyPath, "a");
fputs($handle, $oldText);
fclose($handle);
}
}
}
function writeLine($writeText,$chatPath) {
$handle = fopen($chatPath, "a");
if($handle===false) die('File error (writeLine); aborted');
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two shouts happen simultaneously
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeLine); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
// utility functions for reading shouts
function processChats($chatText, $user=false) {
if($user===false)
global $user;
if(!isMod($user) || isset($_COOKIE['yShout_hideadmlinks']))
$chatText = preg_replace('/<span class="shout-adminlinks".+?<\/span>/','',$chatText);
if(!isMod($user))
$chatText = preg_replace('/<span class="shout-timestamp" title="(\d+) \| [0-9\.]+">/','<span class="shout-timestamp" title="\\1 | logged">',$chatText);
global $sc;
if(isMod($user))
$chatText = preg_replace('/<sesc>/',$sc,$chatText);
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
return $chatText;
}
function readChat($chatPath=false, $force=false) {
global $user,$reverseShouts;
if($chatPath === false)
global $chatPath;
if(isset($_SESSION['readingCmd']) && !$force)
{
$c=$_SESSION['readingCmd'];
if($c[0]=='/') // it's a command, redo command to retain the message
{
if(isMod()) processCommand($c);
else processUserCommand($c);
}
else
echo $c;
return ' ';
}
$chatText = "";
if(file_exists($chatPath))
$chatText = file_get_contents($chatPath);
$chatText=processChats($chatText,$user);
if($reverseShouts)
$chatText=implode("\n", array_reverse(explode("\n", $chatText)));
return $chatText.' '; // hack: totally empty responses can break some browsers
}
function refreshChats($forceRefresh=false) {
global $chatPath,$user,$maxLines,$gzipCompression,$updateTimeout,$updatePeriod;
if(!file_exists($chatPath))
writeLine('',$chatPath);
$time=filemtime($chatPath);
$start_time=time();
$heartBeatSent=false;
if(!$forceRefresh)
{
session_write_close(); // so that future session requests succeed
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
@session_start(); // restart session, so updates to $_SESSION are applied
}
if($gzipCompression && !$heartBeatSent) ob_start("ob_gzhandler");
echo readChat();
if($gzipCompression && !$heartBeatSent) ob_end_flush();
}
// help and history handlers
function help($command='')
{
global $user,$defaultEncoding,$txt;
$cmdlist=$txt['yshout_cmdlist'];
$cmdlistadmin=$txt['yshout_cmdlistadmin'];
if(isMod())
$cmdlist=array_merge($cmdlist,$cmdlistadmin);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_cmd_reference']; ?></title>
<style type="text/css">
/*<![CDATA[*/
.meaction {
color: red;
}
/*]]>*/
</style>
</head>
<body>
<?php
if($command=='')
{
echo '<h1>',$txt['yshout_shoutbox'],' ',$txt['yshout_commands'],'</h1><div>';
foreach($cmdlist as $cmd=>$desc)
{
echo "$cmd$desc<br />\n";
}
echo '</div>';
}
else
{
echo '<div>';
if(isset($cmdlist[$command])) echo "$command{$cmdlist[$command]}<br />\n";
else echo "$command not found";
echo '</div>';
}
?>
</body>
</html>
<?php
}
function history()
{
global $chatPath,$historyPath,$boardurl,$gzipCompression,$defaultEncoding,$txt;
$n=250;
if(isset($_GET['n'])) $n=intval($_GET['n']); // integers only!
if($gzipCompression) ob_start("ob_gzhandler");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<base href="<?php echo $boardurl,'/'; ?>" />
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></title>
<script type="text/javascript">
//<![CDATA[
function ajaxGet(args) {
window.location=window.location+'&'+args+'&'+'sesc=<?php global $sc; echo $sc; ?>';
}
//]]>
</script>
<style type="text/css">
/*<![CDATA[*/
/* form and toollink CSS omitted */
#yshout {
font-size: 10px;
overflow: hidden;
}
#yshout #shouts { /* main shouts area */
color: #000000;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
color: #000000;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 6pt;
color: #141414;
}
/* from default theme */
.meaction {
color: red;
}
a:link {
color: #476C8E;
}
/*]]>*/
</style>
</head>
<body>
<h1><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></h1>
<div id="yshout">
<div id="shouts">
<?php
$text='';
if($historyPath !== '')
{
global $user;
require_once("class.tail.php");
$mytail = new tail($historyPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines($n);
$text=$mytail->output(PLAIN);
}
$text.=file_get_contents($chatPath);
echo processChats($text,$user);
?>
</div>
</div>
</body>
</html>
<?php
if($gzipCompression) ob_end_flush();
exit;
}
?>
Ohhh, sorry I meant Index.template.php.
So am I the only one who can't get a fixed height on this thing?
Quote from: Quexinos on January 24, 2009, 03:11:05 AM
So am I the only one who can't get a fixed height on this thing?
You edit the edit the yshout #shouts css code for height:Xpx then upload, then ctrl+f5
... I'm not entirely sure what you said there but I think I can figure it out, thanks ^_^..
actually what file am I supposed to edit?
NM found it, thanks.
One last question
What happens if I did the scroll bar thing and a scroll bar didn't show up at all ? O_o
Quote from: Quexinos on January 24, 2009, 04:16:41 AM
... I'm not entirely sure what you said there but I think I can figure it out, thanks ^_^..
actually what file am I supposed to edit?
NM found it, thanks.
One last question
What happens if I did the scroll bar thing and a scroll bar didn't show up at all ? O_o
Try to set the Max Lines higher in yshout/settings.php
here ya go mr money!
Quote from: changaroo on January 24, 2009, 02:31:58 PM
here ya go mr money!
Try this.
<?php
// Version: 1.1 RC2; 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 RC2';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
$settings['use_image_buttons'] = true;
/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
//load font style
if (isset($_SESSION['font-style'])) {
$options['fontstyle'] = $_SESSION['font-style'];
} elseif (isset($_COOKIE['font-style'])) {
$options['fontstyle'] = $_COOKIE['font-style'];
}
//load width style
if (isset($_SESSION['width-style'])) {
$options['widthstyle'] = $_SESSION['width-style'];
} elseif (isset($_COOKIE['width-style'])) {
$options['widthstyle'] = $_COOKIE['width-style'];
}
if (isset($_GET['widthstyle'])) {
$options['widthstyle'] = $_GET['widthstyle'];
$_SESSION['width-style'] = $options['widthstyle'];
setcookie ('width-style', $options['widthstyle'], time()+31536000, '/', false);
}
if (isset($_GET['fontstyle'])) {
$options['fontstyle'] = $_GET['fontstyle'];
$_SESSION['font-style'] = $options['fontstyle'];
setcookie ('font-style', $options['fontstyle'], time()+31536000, '/', false);
}
}
// The main sub template above the content.
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// test for joomla integration
global $wrapped, $jsmfConfig, $header_style , $toolbar_style , $footer_style;
if(isset($wrapped) && $wrapped==true)
$context['joomla_wrapped']=true;
elseif(isset($wrapped) && $wrapped==false)
$context['joomla_wrapped']=false;
elseif(isset($jsmfConfig) && $jsmfConfig->wrapped)
$context['joomla_wrapped']=true;
elseif(isset($jsmfConfig) && !$jsmfConfig->wrapped)
$context['joomla_wrapped']=false;
else
$context['joomla_wrapped']=false;
// 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'], '" />
<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?rc2p"></script>
<script language="JavaScript" type="text/javascript">
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
</script>
<title>', $context['page_title'], '</title>';
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
if(!empty($options['fontstyle']))
$fontstyle=$options['fontstyle'];
else
$fontstyle='f-default';
if(!empty($options['widthstyle']))
$widthstyle=$options['widthstyle'];
else
$widthstyle='w-wide';
// the color choices
if(!empty($settings['header_style']))
$header_style=$settings['header_style'];
else
$header_style='dark';
if(!empty($settings['toolbar_style']))
$toolbar_style=$settings['toolbar_style'];
else
$toolbar_style='blue';
if(!empty($settings['footer_style']))
$footer_style=$settings['footer_style'];
else
$footer_style='dark';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/template_css.css?rc2" />';
if($context['browser']['is_ie'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/template_ie.css?rc2" />';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/header_'.$header_style.'.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/toolbar_'.$toolbar_style.'.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/footer_'.$footer_style.'.css?rc2" />
';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" 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" />';
// 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: 11px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts { /* main shouts area */
horizontal-align; left:
}
#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
// 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">
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">
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>
</head>';
if(!$context['joomla_wrapped']){
echo '
<body id="page_bg" class="'.$widthstyle.' '.$fontstyle.' header-'.$header_style.' toolbar-'.$toolbar_style.' footer-'.$footer_style.'">
<div id="header">
<div class="wrapper">
<div id="access">
<div id="selectors">
<span class="font-selector"> </span>
<span class="width-selector"> </span>
</div>
<div id="buttons">
<a href="',$scripturl,'?widthstyle=w-fluid" title="fluid width" class="fluid"><span class="button"> </span></a>
<a href="',$scripturl,'?widthstyle=w-wide" title="wide width" class="wide"><span class="button"> </span></a>
<a href="',$scripturl,'?widthstyle=w-thin" title="thin width" class="thin"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-larger" title="Increase size" class="lrg"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-default" title="Default size" class="med"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-smaller" title="Decrease size" class="sml"><span class="button"> </span></a>
</div>
</div>
<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news'])) {
echo '<div id="top">', $context['random_news_line'] , '</div>';
}
echo '
</div>
</div>
<div id="toolbar">
<div class="wrapper">
<div id="nav">',template_menu(),'
</div>
</div>
</div>';
echo '
<div id="showcase">
<div class="wrapper">
<div class="padding">
' , leftmenu(), '
</div>
</div>
</div>
';
echo '
<div id="mainbody">
<div class="wrapper">
<div id="mainbody-2">
<div id="mainbody-3">
<div id="mainbody-4">
<div id="mainbody-5">
<div id="mainbody-padding">
<table class="mainbody" cellspacing="0">
<tr>
<td valign="top" class="mainbody" id="mainmen">';
}
if ($context['joomla_wrapped'])
echo '<div class="titlebg" style="overflow: hidden;"><div id="smf_menu">',template_menu2(),'</div></div>';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
if ($context['joomla_wrapped']) {
echo'
<div style="padding: 5px; text-align: center;">
<div class="smalltext">' ,theme_copyright(),'<br />
brought to you by <a href="http://www.changaroo.com">changaroo</a> productions
</div></div>';
}
if(!$context['joomla_wrapped'])
echo '
<br /><br />
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="wrapper">
<div class="padding">
<table class="footer" cellspacing="0">
<tr valign="top">
<td class="footer">
<div class="moduletable center">
' ,theme_copyright(),'<br />
copyright atlshutterbugs.com © 2008-200∞
</div>
</td>
</tr>
</table>
</div>
</div>
</div>';
echo '
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<span class="pathway">';
// 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'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="pathway">' . $tree['name'] . '</a>' : $tree['name'] , '<img src="'.$settings['images_url'].'/arrow.png" style="margin: 0 12px 0 12px" alt="" />';
else
echo $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
}
echo '</span>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul>';
// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
// Show the [help] button.
// echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// How about the [search] button?
//if ($context['allow_search'])
// echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu2()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul>';
// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , ' | </a></li>';
// How about the [search] button?
//if ($context['allow_search'])
// echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , ' | </a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , ' | </a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , ' | </a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , ' | </a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , ' | </a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , ' | </a></li>';
// Show the [help] button.
echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , ' | </a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , ' | </a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , ' </a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
// Generate a strip of buttons.
function template_button_strip_mill($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'] : '') . '>'. ($custom_td!='' ? '<'.$custom_td.'>' : '') . $txt[$value['text']] . ($custom_td!='' ? '</'.$custom_td.'>' : '') .'</a>';
$button_strip[$key] = $buttons[$key];
}
if (empty($button_strip))
return ' ';
echo implode(' | ', $button_strip);
}
function leftmenu()
{
global $settings, $buttons, $context, $txt, $scripturl;
// personal info etc.
echo '<table class="showcase" cellspacing="0">
<tr valign="top">';
echo '
<td class="showcase">
<div class="moduletable">';
if (!empty($context['user']['avatar']))
echo '<div class="avatar">', $context['user']['avatar']['image'], '</div><div class="profile_info">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '<h3>', $txt['hello_member_ndt'], ' <b>', $context['user']['name'], '</b></h3>';
echo '<ul id="useropts">';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a> ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>', $txt[616], '</b></li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '<li>
', $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'], '</li>';
}
echo '<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
<li>', $context['current_time'],'</li>
</ul>
</div>
</td>';
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
', $txt['welcome_guest'], '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" style="margin-bottom: 4px;" size="10" />
<input type="password" name="passwrd" style="margin-bottom: 4px;" size="10" /><br />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />';
}
if (!empty($context['user']['avatar'])) {
echo ' </div>';
}
echo ' </div>
</td>';
echo '
<td class="showcase">
<div class="moduletable">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 4px 0;">
<input type="text" name="search" value="" size="30" style="margin-bottom: 4px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="margin-bottom: 4px;" /><br />
<a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
<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><br />
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '- ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span> -
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>
</td>';
echo '
</tr>
</table>';
}
?>
Thanks for this, I'm trying it now!
Quote from: nneonneo on January 23, 2009, 09:13:17 AM
@EdwardR: You didn't quite paste in the entire shoutbox code:
if (!empty($context['current_board']))
echo '
<link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
Just remove the code from #yshout p to // YSHOUT END, and try it again.
I receive this error in firefox:
The image "http://www.twilightbite.com/Themes/Dreamlike/images/date.png" cannot be displayed, because it contains errors.
I receive spaces in chrome browser. I opened the images in paint.NET, resaved, and re-uploaded but I still get the same errors that the images cannot be loaded in the browser.
Any suggestions?
PS. This thread is WAY TOO LONG. A suggestion is to create an FAQ instead of expecting people to read 250 pages of posts. Just a thought :)
@lph2005: Where are you getting this error?
As for a FAQ, that's what the main mod page is for. Your question has never been asked IIRC.
Quote from: lph2005 on January 25, 2009, 01:07:34 PM
I receive this error in firefox:
The image "http://www.twilightbite.com/Themes/Dreamlike/images/date.png" cannot be displayed, because it contains errors.
I receive spaces in chrome browser. I opened the images in paint.NET, resaved, and re-uploaded but I still get the same errors that the images cannot be loaded in the browser.
Any suggestions?
PS. This thread is WAY TOO LONG. A suggestion is to create an FAQ instead of expecting people to read 250 pages of posts. Just a thought :)
Solved: This is the solution. FTP into the server. Delete the .png files. Upload .png files in binary and not ASCII. Hope this helps someone else struggling with images.
Glad to hear it's resolved.
That's the first time I have heard of having to get images working like that.
Quote from: waremock on July 10, 2008, 10:47:10 AM
Thanks for helping me to uses the same shoutbox on all my boards. It works great.
How did you do that.
I want the same.
Stef.
If you mean for more than one theme, you simply install the mod for the default theme (like normal) then make the index.template.php changes to any custom theme's index.template.php.
The only thing that will have to be tweaked might be the placement of the shoutbox in each theme as themes can vary drastically. I have added it to 30 different themes or more. Every time I have used that same procedure.
I have attached several custom theme index.template.php's here (http://www.empireofthesun.net/forum/index.php?topic=1532.msg2957#msg2957). You may want to see if yours is in there. They are for 1.1.x and SMF 2.0 themes and all are the Advanced shoutbox.
Quote from: SunKing on January 25, 2009, 07:00:10 PM
If you mean for more than one theme, you simply install the mod for the default theme (like normal) then make the index.template.php changes to any custom theme's index.template.php.
The only thing that will have to be tweaked might be the placement of the shoutbox in each theme as themes can vary drastically. I have added it to 30 different themes or more. Every time I have used that same procedure.
I have attached several custom theme index.template.php's here (http://www.empireofthesun.net/forum/index.php?topic=1532.msg2957#msg2957). You may want to see if yours is in there. They are for 1.1.x and SMF 2.0 themes and all are the Advanced shoutbox.
I mean in different forums on the same domain.
Stef.
I got the message: No database selected.
Thirst i see the shoutbox for one second and than it shows: No database selected
Someone an idea??
Stef.
Quote from: MrMoney on January 24, 2009, 07:26:57 PM
Quote from: changaroo on January 24, 2009, 02:31:58 PM
here ya go mr money!
Try this.
<?php
// Version: 1.1 RC2; 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 RC2';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
$settings['use_image_buttons'] = true;
/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
//load font style
if (isset($_SESSION['font-style'])) {
$options['fontstyle'] = $_SESSION['font-style'];
} elseif (isset($_COOKIE['font-style'])) {
$options['fontstyle'] = $_COOKIE['font-style'];
}
//load width style
if (isset($_SESSION['width-style'])) {
$options['widthstyle'] = $_SESSION['width-style'];
} elseif (isset($_COOKIE['width-style'])) {
$options['widthstyle'] = $_COOKIE['width-style'];
}
if (isset($_GET['widthstyle'])) {
$options['widthstyle'] = $_GET['widthstyle'];
$_SESSION['width-style'] = $options['widthstyle'];
setcookie ('width-style', $options['widthstyle'], time()+31536000, '/', false);
}
if (isset($_GET['fontstyle'])) {
$options['fontstyle'] = $_GET['fontstyle'];
$_SESSION['font-style'] = $options['fontstyle'];
setcookie ('font-style', $options['fontstyle'], time()+31536000, '/', false);
}
}
// The main sub template above the content.
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// test for joomla integration
global $wrapped, $jsmfConfig, $header_style , $toolbar_style , $footer_style;
if(isset($wrapped) && $wrapped==true)
$context['joomla_wrapped']=true;
elseif(isset($wrapped) && $wrapped==false)
$context['joomla_wrapped']=false;
elseif(isset($jsmfConfig) && $jsmfConfig->wrapped)
$context['joomla_wrapped']=true;
elseif(isset($jsmfConfig) && !$jsmfConfig->wrapped)
$context['joomla_wrapped']=false;
else
$context['joomla_wrapped']=false;
// 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'], '" />
<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?rc2p"></script>
<script language="JavaScript" type="text/javascript">
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
</script>
<title>', $context['page_title'], '</title>';
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
if(!empty($options['fontstyle']))
$fontstyle=$options['fontstyle'];
else
$fontstyle='f-default';
if(!empty($options['widthstyle']))
$widthstyle=$options['widthstyle'];
else
$widthstyle='w-wide';
// the color choices
if(!empty($settings['header_style']))
$header_style=$settings['header_style'];
else
$header_style='dark';
if(!empty($settings['toolbar_style']))
$toolbar_style=$settings['toolbar_style'];
else
$toolbar_style='blue';
if(!empty($settings['footer_style']))
$footer_style=$settings['footer_style'];
else
$footer_style='dark';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/template_css.css?rc2" />';
if($context['browser']['is_ie'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/template_ie.css?rc2" />';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/header_'.$header_style.'.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/toolbar_'.$toolbar_style.'.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/footer_'.$footer_style.'.css?rc2" />
';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" 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" />';
// 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: 11px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts { /* main shouts area */
horizontal-align; left:
}
#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
// 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">
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">
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>
</head>';
if(!$context['joomla_wrapped']){
echo '
<body id="page_bg" class="'.$widthstyle.' '.$fontstyle.' header-'.$header_style.' toolbar-'.$toolbar_style.' footer-'.$footer_style.'">
<div id="header">
<div class="wrapper">
<div id="access">
<div id="selectors">
<span class="font-selector"> </span>
<span class="width-selector"> </span>
</div>
<div id="buttons">
<a href="',$scripturl,'?widthstyle=w-fluid" title="fluid width" class="fluid"><span class="button"> </span></a>
<a href="',$scripturl,'?widthstyle=w-wide" title="wide width" class="wide"><span class="button"> </span></a>
<a href="',$scripturl,'?widthstyle=w-thin" title="thin width" class="thin"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-larger" title="Increase size" class="lrg"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-default" title="Default size" class="med"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-smaller" title="Decrease size" class="sml"><span class="button"> </span></a>
</div>
</div>
<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news'])) {
echo '<div id="top">', $context['random_news_line'] , '</div>';
}
echo '
</div>
</div>
<div id="toolbar">
<div class="wrapper">
<div id="nav">',template_menu(),'
</div>
</div>
</div>';
echo '
<div id="showcase">
<div class="wrapper">
<div class="padding">
' , leftmenu(), '
</div>
</div>
</div>
';
echo '
<div id="mainbody">
<div class="wrapper">
<div id="mainbody-2">
<div id="mainbody-3">
<div id="mainbody-4">
<div id="mainbody-5">
<div id="mainbody-padding">
<table class="mainbody" cellspacing="0">
<tr>
<td valign="top" class="mainbody" id="mainmen">';
}
if ($context['joomla_wrapped'])
echo '<div class="titlebg" style="overflow: hidden;"><div id="smf_menu">',template_menu2(),'</div></div>';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
if ($context['joomla_wrapped']) {
echo'
<div style="padding: 5px; text-align: center;">
<div class="smalltext">' ,theme_copyright(),'<br />
brought to you by <a href="http://www.changaroo.com">changaroo</a> productions
</div></div>';
}
if(!$context['joomla_wrapped'])
echo '
<br /><br />
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="wrapper">
<div class="padding">
<table class="footer" cellspacing="0">
<tr valign="top">
<td class="footer">
<div class="moduletable center">
' ,theme_copyright(),'<br />
copyright atlshutterbugs.com © 2008-200∞
</div>
</td>
</tr>
</table>
</div>
</div>
</div>';
echo '
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<span class="pathway">';
// 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'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="pathway">' . $tree['name'] . '</a>' : $tree['name'] , '<img src="'.$settings['images_url'].'/arrow.png" style="margin: 0 12px 0 12px" alt="" />';
else
echo $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
}
echo '</span>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul>';
// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
// Show the [help] button.
// echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// How about the [search] button?
//if ($context['allow_search'])
// echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu2()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul>';
// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , ' | </a></li>';
// How about the [search] button?
//if ($context['allow_search'])
// echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , ' | </a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , ' | </a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , ' | </a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , ' | </a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , ' | </a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , ' | </a></li>';
// Show the [help] button.
echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , ' | </a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , ' | </a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , ' </a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
// Generate a strip of buttons.
function template_button_strip_mill($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'] : '') . '>'. ($custom_td!='' ? '<'.$custom_td.'>' : '') . $txt[$value['text']] . ($custom_td!='' ? '</'.$custom_td.'>' : '') .'</a>';
$button_strip[$key] = $buttons[$key];
}
if (empty($button_strip))
return ' ';
echo implode(' | ', $button_strip);
}
function leftmenu()
{
global $settings, $buttons, $context, $txt, $scripturl;
// personal info etc.
echo '<table class="showcase" cellspacing="0">
<tr valign="top">';
echo '
<td class="showcase">
<div class="moduletable">';
if (!empty($context['user']['avatar']))
echo '<div class="avatar">', $context['user']['avatar']['image'], '</div><div class="profile_info">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '<h3>', $txt['hello_member_ndt'], ' <b>', $context['user']['name'], '</b></h3>';
echo '<ul id="useropts">';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a> ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>', $txt[616], '</b></li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '<li>
', $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'], '</li>';
}
echo '<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
<li>', $context['current_time'],'</li>
</ul>
</div>
</td>';
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
', $txt['welcome_guest'], '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" style="margin-bottom: 4px;" size="10" />
<input type="password" name="passwrd" style="margin-bottom: 4px;" size="10" /><br />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />';
}
if (!empty($context['user']['avatar'])) {
echo ' </div>';
}
echo ' </div>
</td>';
echo '
<td class="showcase">
<div class="moduletable">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 4px 0;">
<input type="text" name="search" value="" size="30" style="margin-bottom: 4px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="margin-bottom: 4px;" /><br />
<a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
<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><br />
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '- ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span> -
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>
</td>';
echo '
</tr>
</table>';
}
?>
nothing happens :(
can u tell me what i need to add?
The sample images for the shoutbox show one line for each person. Mine shows 2 lines (date, text). Where in the code do I change this so that one line is shown?
- FWIW - The people on the site have used the shoutbox constantly since installing it. They love it. Thank you!
Quote from: changaroo on January 25, 2009, 08:09:33 PM
Quote from: MrMoney on January 24, 2009, 07:26:57 PM
Quote from: changaroo on January 24, 2009, 02:31:58 PM
here ya go mr money!
Try this.
<?php
// Version: 1.1 RC2; 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 RC2';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
$settings['use_image_buttons'] = true;
/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
//load font style
if (isset($_SESSION['font-style'])) {
$options['fontstyle'] = $_SESSION['font-style'];
} elseif (isset($_COOKIE['font-style'])) {
$options['fontstyle'] = $_COOKIE['font-style'];
}
//load width style
if (isset($_SESSION['width-style'])) {
$options['widthstyle'] = $_SESSION['width-style'];
} elseif (isset($_COOKIE['width-style'])) {
$options['widthstyle'] = $_COOKIE['width-style'];
}
if (isset($_GET['widthstyle'])) {
$options['widthstyle'] = $_GET['widthstyle'];
$_SESSION['width-style'] = $options['widthstyle'];
setcookie ('width-style', $options['widthstyle'], time()+31536000, '/', false);
}
if (isset($_GET['fontstyle'])) {
$options['fontstyle'] = $_GET['fontstyle'];
$_SESSION['font-style'] = $options['fontstyle'];
setcookie ('font-style', $options['fontstyle'], time()+31536000, '/', false);
}
}
// The main sub template above the content.
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// test for joomla integration
global $wrapped, $jsmfConfig, $header_style , $toolbar_style , $footer_style;
if(isset($wrapped) && $wrapped==true)
$context['joomla_wrapped']=true;
elseif(isset($wrapped) && $wrapped==false)
$context['joomla_wrapped']=false;
elseif(isset($jsmfConfig) && $jsmfConfig->wrapped)
$context['joomla_wrapped']=true;
elseif(isset($jsmfConfig) && !$jsmfConfig->wrapped)
$context['joomla_wrapped']=false;
else
$context['joomla_wrapped']=false;
// 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'], '" />
<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?rc2p"></script>
<script language="JavaScript" type="text/javascript">
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
</script>
<title>', $context['page_title'], '</title>';
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
if(!empty($options['fontstyle']))
$fontstyle=$options['fontstyle'];
else
$fontstyle='f-default';
if(!empty($options['widthstyle']))
$widthstyle=$options['widthstyle'];
else
$widthstyle='w-wide';
// the color choices
if(!empty($settings['header_style']))
$header_style=$settings['header_style'];
else
$header_style='dark';
if(!empty($settings['toolbar_style']))
$toolbar_style=$settings['toolbar_style'];
else
$toolbar_style='blue';
if(!empty($settings['footer_style']))
$footer_style=$settings['footer_style'];
else
$footer_style='dark';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/template_css.css?rc2" />';
if($context['browser']['is_ie'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/template_ie.css?rc2" />';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/header_'.$header_style.'.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/toolbar_'.$toolbar_style.'.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/footer_'.$footer_style.'.css?rc2" />
';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" 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" />';
// 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: 11px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts { /* main shouts area */
horizontal-align; left:
}
#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
// 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">
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">
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>
</head>';
if(!$context['joomla_wrapped']){
echo '
<body id="page_bg" class="'.$widthstyle.' '.$fontstyle.' header-'.$header_style.' toolbar-'.$toolbar_style.' footer-'.$footer_style.'">
<div id="header">
<div class="wrapper">
<div id="access">
<div id="selectors">
<span class="font-selector"> </span>
<span class="width-selector"> </span>
</div>
<div id="buttons">
<a href="',$scripturl,'?widthstyle=w-fluid" title="fluid width" class="fluid"><span class="button"> </span></a>
<a href="',$scripturl,'?widthstyle=w-wide" title="wide width" class="wide"><span class="button"> </span></a>
<a href="',$scripturl,'?widthstyle=w-thin" title="thin width" class="thin"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-larger" title="Increase size" class="lrg"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-default" title="Default size" class="med"><span class="button"> </span></a>
<a href="',$scripturl,'?fontstyle=f-smaller" title="Decrease size" class="sml"><span class="button"> </span></a>
</div>
</div>
<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news'])) {
echo '<div id="top">', $context['random_news_line'] , '</div>';
}
echo '
</div>
</div>
<div id="toolbar">
<div class="wrapper">
<div id="nav">',template_menu(),'
</div>
</div>
</div>';
echo '
<div id="showcase">
<div class="wrapper">
<div class="padding">
' , leftmenu(), '
</div>
</div>
</div>
';
echo '
<div id="mainbody">
<div class="wrapper">
<div id="mainbody-2">
<div id="mainbody-3">
<div id="mainbody-4">
<div id="mainbody-5">
<div id="mainbody-padding">
<table class="mainbody" cellspacing="0">
<tr>
<td valign="top" class="mainbody" id="mainmen">';
}
if ($context['joomla_wrapped'])
echo '<div class="titlebg" style="overflow: hidden;"><div id="smf_menu">',template_menu2(),'</div></div>';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
if ($context['joomla_wrapped']) {
echo'
<div style="padding: 5px; text-align: center;">
<div class="smalltext">' ,theme_copyright(),'<br />
brought to you by <a href="http://www.changaroo.com">changaroo</a> productions
</div></div>';
}
if(!$context['joomla_wrapped'])
echo '
<br /><br />
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="wrapper">
<div class="padding">
<table class="footer" cellspacing="0">
<tr valign="top">
<td class="footer">
<div class="moduletable center">
' ,theme_copyright(),'<br />
copyright atlshutterbugs.com © 2008-200∞
</div>
</td>
</tr>
</table>
</div>
</div>
</div>';
echo '
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<span class="pathway">';
// 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'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="pathway">' . $tree['name'] . '</a>' : $tree['name'] , '<img src="'.$settings['images_url'].'/arrow.png" style="margin: 0 12px 0 12px" alt="" />';
else
echo $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
}
echo '</span>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul>';
// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
// Show the [help] button.
// echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// How about the [search] button?
//if ($context['allow_search'])
// echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu2()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul>';
// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , ' | </a></li>';
// How about the [search] button?
//if ($context['allow_search'])
// echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , ' | </a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , ' | </a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , ' | </a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , ' | </a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , ' | </a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , ' | </a></li>';
// Show the [help] button.
echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , ' | </a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , ' | </a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , ' </a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
// Generate a strip of buttons.
function template_button_strip_mill($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'] : '') . '>'. ($custom_td!='' ? '<'.$custom_td.'>' : '') . $txt[$value['text']] . ($custom_td!='' ? '</'.$custom_td.'>' : '') .'</a>';
$button_strip[$key] = $buttons[$key];
}
if (empty($button_strip))
return ' ';
echo implode(' | ', $button_strip);
}
function leftmenu()
{
global $settings, $buttons, $context, $txt, $scripturl;
// personal info etc.
echo '<table class="showcase" cellspacing="0">
<tr valign="top">';
echo '
<td class="showcase">
<div class="moduletable">';
if (!empty($context['user']['avatar']))
echo '<div class="avatar">', $context['user']['avatar']['image'], '</div><div class="profile_info">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '<h3>', $txt['hello_member_ndt'], ' <b>', $context['user']['name'], '</b></h3>';
echo '<ul id="useropts">';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a> ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>', $txt[616], '</b></li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '<li>
', $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'], '</li>';
}
echo '<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
<li>', $context['current_time'],'</li>
</ul>
</div>
</td>';
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
', $txt['welcome_guest'], '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" style="margin-bottom: 4px;" size="10" />
<input type="password" name="passwrd" style="margin-bottom: 4px;" size="10" /><br />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />';
}
if (!empty($context['user']['avatar'])) {
echo ' </div>';
}
echo ' </div>
</td>';
echo '
<td class="showcase">
<div class="moduletable">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 4px 0;">
<input type="text" name="search" value="" size="30" style="margin-bottom: 4px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="margin-bottom: 4px;" /><br />
<a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
<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><br />
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '- ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span> -
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>
</td>';
echo '
</tr>
</table>';
}
?>
nothing happens :(
can u tell me what i need to add?
If that didn't work then I don't know.
Hey, I had to uninstall the ShoutBox due to resource constraints, but the Shoutbox bar still appears on my forum. Any way to get rid of that? I assume it's a pretty simple line in one of the .php files.
The bar will be in the index.template.php. Just open that file and search for shout.
What code is being added to get it centered? I dont see anywhere to justify or to add a line of code for that?
Quote from: SunKing on January 25, 2009, 11:40:17 PM
The bar will be in the index.template.php. Just open that file and search for shout.
Thanks.
First off great shoutbox mod! Wish I had found it when I we were using a phpnuke website I would have asked for permission to port it.
http://www.noordinaryclan.com (http://www.noordinaryclan.com)
I am running into a problem with adding smilies to the shoutbox. As far as I can tell I have the code in the right spots with the right syntax but I am not getting any kind of smiley popup. I am attaching my index.template.php file for reference. I can provide user access to the forums and ftp access if need be. Thank for your help.
I'm suggesting a future add-on.
how about a history archive function? I've run into the issue where the history is to big and It can't call itself up anymore.
1 more problem when i ave like over 10 users online the chatbox freezes why is this dose it have do with my hosting or database???????
@shanksta13
Glad you got it sorted.
@phyrstorm
Have you added the animatedcollapse.js to the /yshout/js/ folder and the smiley.php to the yshout/ folder?
@Krandall
You can save the history text file as history.{somedate}.txt then use a simply call to it from a link for archiving purposes. That's what I do and it seems to work great.
@juniorj23
The shoutbox doesn't touch any database. Hosting could be a factor, and there are some tips on improving the performance of the shoutbox on the first page of this thread.
Sweet, thanks man!!!! How about this one.
Right now I haev it set that the shout is only brought up on a specific board called like this:
/ YSHOUT HERE - shoutbox code
global $board;
if(isset($board) && $board==32) {
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>';
}
How can I make it so instead of based on board, based on an entire category?
http://www.simplemachines.org/community/index.php#c18
I know it has something to do with the #c18 but I can't figure it out. Any ideas?
The Java script is in the yshout/js and mymod folder and the smiley.php is in the yshout and mymod folders to make sure.
OK. I have attached the file with a few fixes. Both the animatedcollapse.js and the smiley.php were being called from the mymod/ folder. I fixed that.
animatedcollapse.js is now called from /yshout/js (like it should be) so double check that that file is in there. Also, smiley.php is now called from /yshout/ so make sure it is in there. You can completely delete the mymod folder if you want to.
I didn't check through all of the shoutbox code, only the calls to those two files. If you have any other errors with the shoutbox, please do not hesitate to ask.
Well shoot, still nothing. I double checked the location of the files and they are in the yshout/js and yshout directory where they should be. Any other ideas becuase everyone really wants the smileys back on the shoutbox like our old site.
When you type too many characters, it doesn't shift to the next line... It extends it all the way to the end! I have the width of the shoutbox at 100%
SunKing - could you maybe help me on getting the shoutbox justified to the left? all the shouts are centered right now.
nvm i solved it.
"text-align:left;"
instead of
horizontal-align
Quote from: changaroo on January 27, 2009, 07:29:42 PM
nvm i solved it.
"text-align:left;"
instead of
horizontal-align
Oh my bad, I'm getting things confused.
its all good :) i just wasnt sure what to add where. but i went off what ya started :)
It works, but it keeps loading and loading in Opera, all versions...
Quote from: nneonneo on January 23, 2009, 09:13:17 AM
@renkliforum: Did you install the <head> code? The javascript is required for the shoutbox to work.
yes, the following code's are in my index.template.php.
// 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[[CDATA[
window.onload=function(){loadChat();};
var shoutFile="',$shoutFile,'";
var yshout_php="',$scriptpath,'?yshout',$args,'";
// ]]]]><![CDATA[></script>
<script src="',$boardurl,'/yshout/js/yshout.js?July062008" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">
soundManager.url="',$boardurl,'/yshout/soundmanager2.swf";
soundManager.debugMode = false;soundManager.consoleOnly = false;
soundManager.onload = function()
{
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/chat.mp3", autoPlay:false});
}
</script>';
// YSHOUT END - <head> code
it's the true code or not?
@ renkliforum : did you put second code? Also, you probably downloaded latest version, which maybe won't work with SMF 1.1.5. Please update your forum. Un-updated forum is a security risk.
Quote from: ameo on January 28, 2009, 04:48:20 PM
@ renkliforum : did you put second code? Also, you probably downloaded latest version, which maybe won't work with SMF 1.1.5. Please update your forum. Un-updated forum is a security risk.
i have update my forum, the second code are installed. but it's not worked.. what can i doing?
any idea for my issue ? :(
Quote3. download smiley.php and safe in mymod dir. (download smiley_SMF2.php instead for SMF 2.x, but name it smiley.php)
where can i download smiley.php
thanks
Quote from: davebonner on January 29, 2009, 09:02:46 AM
Quote3. download smiley.php and safe in mymod dir. (download smiley_SMF2.php instead for SMF 2.x, but name it smiley.php)
where can i download smiley.php
thanks
Hey Dave, fancy meeting you here. :D The same place you got that quote from the files are attatched.
http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
thanks for pointing me in the same direction , didnt see links before lol
Running smf 2.0 Beta 4 and installed new copy of this Shout Box v 1.22 - installed fine.
Users can type in messages fine.
However when the Admin tries to delete a line I get the error message:
"Session verification failed. Please try logging out and back in again, and then try again."
I can't delete any lines and I am logged in just fine.
Help!
Quote from: PerryM on January 29, 2009, 10:24:52 PM
Running smf 2.0 Beta 4 and installed new copy of this Shout Box v 1.22 - installed fine.
Users can type in messages fine.
However when the Admin tries to delete a line I get the error message:
"Session verification failed. Please try logging out and back in again, and then try again."
I can't delete any lines and I am logged in just fine.
Help!
Try making all files with-in the yshout folder writeable. See if that helps.
Quote from: Sandmansa on January 29, 2009, 11:33:30 PM
Quote from: PerryM on January 29, 2009, 10:24:52 PM
Running smf 2.0 Beta 4 and installed new copy of this Shout Box v 1.22 - installed fine.
Users can type in messages fine.
However when the Admin tries to delete a line I get the error message:
"Session verification failed. Please try logging out and back in again, and then try again."
I can't delete any lines and I am logged in just fine.
Help!
Try making all files with-in the yshout folder writeable. See if that helps.
All files and folders already had read/write access. But thanks for helping.
Hello everybody
Great mod :D I had it working on my other forum and I want it on the new one it pwn them all.
But I can get it to shout ???
I have changed cmod to 777 on nearly everything that has to do with shoutbox but still it does not show.
Any ideas why ???
I guess this has been up before but when I use the search here I can't find the answer.
Thanks in Advance :)
Scarmix
guys 1 more problem sometimes am on the shoutbox when am to write something i can't see the curser where am to to write the text and some time the shoutbox just close up and i ave to refresh to see it again plzz help me..
@ScarMix
What version of SMF and what version of the shoutbox?
@juniorj23
http://www.simplemachines.org/community/index.php?topic=137508.msg1831947#msg1831947
so what about the close up part ????
Sorry, somehow I overlooked that part of the question. I have that happen on mine sometimes as well, but I am not exactly sure what causes it. That is a question probably best suited for nneonneo.
@ SunKing: I'm using SMF 2.04 beta and AdvSB_1.22
as sooon as he is online ask him about it
@ScarMix
If it shows but won't shout, try this:
Quote from: Final60 on November 24, 2008, 07:18:11 AM
In yshout/js/yshout.js, change
function complex_escape(text) {
return escape(textToEntities(text.replace(/&#/g, "&#"))).replace(/\+/g, "%2B");
}
to
function complex_escape(text) {
return text.replace(/&#/g, "&#").php_to8bit().php_urlencode();
}
If there is more to it than that, post or PM a link to your site. I'll be more than happy to install it for you if required.
SunKing thanks for the support but I can't get it to work :( I changed the code as you told me to do. So I changed it back to as it was before.
I thought that it might be because the history isn't read but I entered the text Hello and it shows in the shoutbox. The problem is that it does not enter it to the history file :( .
I hope you can help me out.
Best Regards Scarmix
If you PM me a link to your site, I can get it set up for you.
I would like to move the "open smiley | close" links to the right of the shout button (on the same line) Could someone advise me on how to do this?
Thanks
Post your yshout.php and I will take a look.
<?php
// nneonneo's AJAX shoutbox
// Version 1.22
// Figure out where the yshout folder is
global $yshoutdir;
$yshoutdir=(defined('SMF')||isset($yshout_from_index))?'yshout/':'';
// Check configuration files
if(!file_exists($yshoutdir.'settings.php'))
{
echo 'Error: No settings.';
return;
}
if(!file_exists($yshoutdir.'_banlist.php'))
{
// If _banlist.php has been deleted, assume it should be reset to defaults
$ban_ips_readpost=$ban_ips_post=$ban_names_readpost=$ban_names_post=array();
$sbMaintenance=false;
writeBanList();
}
// Load settings
require_once($yshoutdir."settings.php");
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance;
require_once($yshoutdir.'_banlist.php');
// Figure out which file we're logging chats to
global $shoutFile;
if(!isset($shoutFile))
$shoutFile='home';
if(isset($_REQUEST['file']))
$shoutFile=$_REQUEST['file'];
$shoutFile=preg_replace('/[^A-Za-z0-9_]/','',$shoutFile);
global $chatPath,$historyPath;
$chatsFullDir=$yshoutdir.$chatsDir.'/';
$chatPath=$chatsFullDir.sprintf($chatFormat,$shoutFile);
$historyPath=($historyFormat==='')?'':$chatsFullDir.sprintf($historyFormat,$shoutFile);
// If the shoutbox isn't require'd from SMF, we need to load some SMF components.
$loadedFromSMF=true;
if(!defined('SMF'))
{
$loadedFromSMF=false;
session_start();
require(dirname(__FILE__) . "/../SSI.php");
require_once($sourcedir . '/Subs-Post.php');
$defaultEncoding=(empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']);
header('Content-type: text/html; charset='.$defaultEncoding);
}
// Set up some useful globals
global $func,$smcFunc,$ip,$isSMF1,$user;
$ip = $_SERVER['REMOTE_ADDR'];
$isSMF1 = isset($func);
if(!$isSMF1)
$func=$smcFunc;
$maxLines+=1; // off-by-one correction
$user=$context['user']; // shortcut, for brevity
if(!$loadedFromSMF)
{
loadUserSettings();
loadPermissions();
loadTheme();
writeLog(); // mark user as online
}
// Are you banned from reading the shoutbox?
if(in_array($ip, $ban_ips_readpost) || in_array($user['username'], $ban_names_readpost) || in_array($user['name'], $ban_names_readpost))
{
echo $txt['yshout_banned'];
return;
}
if(!allowedTo('yshout_view'))
{
if(isGuest())
echo $txt['yshout_no_guests'];
return;
}
// Check guest status and grab guest username
if(isGuest())
{
if($autoGuestName!==false)
$user['username']=$user['name']=$_COOKIE['username']=$autoGuestName.substr(md5($ip),0,4);
elseif(isset($_POST['username']) || isset($_COOKIE['username']))
{
$requsername=isset($_POST['username'])?$_POST['username']:$_COOKIE['username'];
$requsername=$func['htmlspecialchars'](html_entity_decode(urldecode($requsername)),ENT_QUOTES);
$user['username']=$user['name']=$_COOKIE['username']=$requsername;
}
}
// Check user group membership
$user['is_sbmod']=false;
$user['can_sbpost']=false;
if(allowedTo('yshout_moderate'))
$user['is_sbmod']=true;
if(allowedTo('yshout_post'))
$user['can_sbpost']=true;
if($loadedFromSMF)
{
// Initialize the shoutbox and quit
initShoutbox($user,true);
return;
}
// Permission checks
function isGuest($user=false)
{
if($user===false) global $user;
return !$user['is_logged'];
}
function isMod($user=false)
{
if($user===false) global $user;
return $user['is_admin'] || $user['is_sbmod'];
}
function isPostBanned($user=false)
{
global $ip,$ban_ips_post,$ban_names_post;
if($user===false) global $user;
return in_array($ip, $ban_ips_post) || in_array($user['username'], $ban_names_post) || in_array($user['name'], $ban_names_post);
}
// $_GET commands
// administrative: ban/unban and delete
if(isset($_GET['banid']))
{
if(!isset($_GET['mode']))
{
global $boardurl;
doMsg(<<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<base href="$boardurl/" />
<meta http-equiv="content-type" content="text/html; charset=$defaultEncoding" />
<title>{$txt['yshout_ban_conf']}</title>
<script type="text/javascript">
//<![CDATA[
function ajaxGet(args) {
window.location=window.location+'&'+args;
}
//]]>
</script>
</head>
<body>
<h1>{$txt['yshout_select_mode']}</h1>
<p><a href="javascript:ajaxGet('banid={$_GET['banid']}&sesc={$_GET['sesc']}&mode=rp');">{$txt['yshout_rp']}</a></p>
<p><a href="javascript:ajaxGet('banid={$_GET['banid']}&sesc={$_GET['sesc']}&mode=p');">{$txt['yshout_p']}</a></p>
</body>
</html>
EOF
);
exit;
}
if(isMod())
{
$error=checkSession('request','',false);
if($error!=='')
{
loadLanguage('Errors');
die($txt[$error]);
}
if(!is_numeric($_GET['banid']))
{
// not an ID, so probably an IP
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_ips_',$_GET['mode'],$_GET['banid']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
exit;
}
if(loadMemberData(Array($_GET['banid']),false,'minimal')===false)
{
doMsg($txt['yshout_error'].$txt['yshout_no_user']);
exit;
}
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_names_',$_GET['mode'],$user_profile[$_GET['banid']][$isSMF1?'memberName':'member_name']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(isset($_GET['unban']))
{
if(isMod())
{
$oldread=isset($_SESSION['readingCmd'])?$_SESSION['readingCmd']:NULL;
doBan('ban_'.$_GET["type"].'s_','u',$_GET['unban']);
if($oldread==NULL) unset($_SESSION['readingCmd']);
else $_SESSION['readingCmd']=$oldread;
}
exit;
}
if(isset($_GET['delete']))
{
if(isMod())
{
$error=checkSession('request','',false);
if($error!=='')
{
loadLanguage('Errors');
die($txt[$error]);
}
$success=deleteShout($_GET['delete'],$chatPath);
if(isset($_GET['history']) && !$success)
$success=deleteShout($_GET['delete'],$historyPath);
if($success)
echo $txt['yshout_del_success'];
}
exit;
}
// Regular user $_GET commands: history, help
if(isset($_GET["history"]))
{
history();
exit;
}
if(isset($_GET["help"]))
{
help();
exit;
}
// If $_GET doesn't carry a command, check the request type
if(!isset($_POST["reqtype"]))
{
echo $txt['yshout_no_action'];
return;
}
$reqType = $_POST["reqtype"];
function initShoutbox($user,$fromSMF)
{
// This function initializes the shoutbox: it prints the tool links,
// current shouts and shout form
global $gzipCompression,$txt,$user,$maxUsernameChars,$maxShoutChars,$sbMaintenance,$autoGuestName,$shoutFormOnTop,$settings;
if($gzipCompression && !$fromSMF) ob_start("ob_gzhandler");
// Language check -- only admins will see this
if($user['is_admin'] && !isset($txt['yshout_history']) && !isset($_COOKIE['yShout_read_txt_notice']))
{
global $user_info,$language,$settings;
$user_language=isset($user_info['language']) ? $user_info['language'] : $language;
if($user_language != 'english' || $settings['theme_dir'] != $settings['default_theme_dir'])
echo '<span style="color:red;background:white">
Warning! The shoutbox text files for your language are not installed.
This may cause the shoutbox and admin settings to appear wrong.<br /><br />
To fix this problem, copy <strong>',$settings['default_theme_dir'],'/languages/Modifications.english.php</strong>
to <strong>',$settings['theme_dir'],'/languages/Modifications.',$user_language,'.php</strong> and translate as desired.<br /><br />
To <strong>ignore</strong> this notice, click <a href="javascript:set_cookie(\'yShout_read_txt_notice\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">here</a>.<br /><br /></span>';
}
// Tool links (History, Commands, etc.)
echo '<div id="yshout-toollinks" style="text-align: left; margin-top: 5px;">';
// Commands
echo '<a href="javascript:goTo(\'help\')" onclick="NewWindow(getURL(\'help\'),\'help\',\'620\',\'440\',\'no\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/info.png" alt="',$txt['yshout_commands'],'" /></a> ';
// History
echo '<a href="javascript:goTo(\'history\')" onclick="NewWindow(getURL(\'history\'),\'history\',\'620\',\'440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/date.png" alt="',$txt['yshout_history'],'" /></a> ';
// Shout Sound Control
if(!isset($_COOKIE['shoutSound']))
echo '<a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/unmute.png" alt="UseSound" /></a> ';
else
echo '<a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/mute.png" alt="NoSound" /></a> ';
// Extended History
if(isMod())
{
echo '<a href="javascript:goTo(\'history&n=+100000\')" onclick="NewWindow(getURL(\'history&n=+100000\'),\'exthistory\',\'620\',\'440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/calendar.png" alt="',$txt['yshout_exthistory'],'" /></a> ';
// Admin Links
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' <a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/cog_delete.png" alt="',$txt['yshout_hide'],$txt['yshout_admlinks'],'" /></a>';
else
echo ' <a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/cog_add.png" alt="',$txt['yshout_show'],$txt['yshout_admlinks'],'" /></a>';
// Return to Chat
// echo ' <a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>';
}
echo '</div>'; // yshout-toollinks
if(!$shoutFormOnTop)
echo '<div id="shouts">',readChat(),'</div>';
// Shout form
echo '
<form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;">
<fieldset>';
$inputForumName=' <input id="forum-name" type="text" maxlength="'.$maxUsernameChars.'" ';
$inputShoutText=' <input id="shout-text" name="shout_text" type="text" maxlength="'.$maxShoutChars.'" ';
$inputShoutButton=' <input id="shout-button" type="submit" ';
if(isPostBanned())
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',$txt['yshout_p_banned'],'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_banned'],'" disabled="disabled" />';
elseif(!isMod() && $sbMaintenance!==false)
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',$sbMaintenance,'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_maintenance'],'" disabled="disabled" />';
elseif(!$user['can_sbpost'])
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />
',$inputShoutText,'value="',isGuest()?$txt['yshout_no_guests']:$txt['yshout_no_posting'],'" disabled="disabled" />
',$inputShoutButton,'value="',$txt['yshout_maintenance'],'" disabled="disabled" />';
else
{
if(isGuest() && $autoGuestName===false)
echo '
',$inputForumName,'value="',$user['name'], '" />';
else
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />';
echo '
',$inputShoutText,'value="" />
',$inputShoutButton,'value="',$txt['yshout_shout_button'],'" />';
}
echo '
</fieldset>
</form>';
if($shoutFormOnTop)
echo '<div id="shouts">',readChat(),'</div>';
if($gzipCompression && !$fromSMF) ob_end_flush();
}
// Figure out the request
switch($reqType) {
case "init":
initShoutbox($user,false);
break;
case "shout":
if(isPostBanned()) break;
if(!$user['can_sbpost']) break;
if(!isMod() && $sbMaintenance!==false) break;
$shoutText = $_POST["shout"];
if($shoutText[0]=='/' && $allowCommands)
{
if(isMod())
{
if(processCommand($shoutText))
break;
}
elseif(!isGuest() || $guestCommands)
{
$shoutText=substr($shoutText,0,$maxShoutChars);
if(processUserCommand($shoutText)) break;
}
}
$shoutName = $user['name'];
if(!isMod())
$shoutText=substr($shoutText,0,$maxShoutChars);
makeShout($shoutText,$user);
break;
case "refresh":
refreshChats(false);
break;
case "autoshout":
if(isMod())
processCommand($_POST["shout"]);
break;
}
function doMsg($msg)
{
echo $msg; // tell user
$_SESSION['readingCmd']=$msg; // make sure user keeps seeing this message; see readChat
}
function processCommand($text) {
global $reqType, $maxLines, $ip, $user, $bannedCommands, $txt, $sbMaintenance;
global $ban_ips_readpost, $ban_ips_post, $ban_names_readpost, $ban_names_post;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces.
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
case "/clear":
global $chatPath, $historyPath;
$fileContents='';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$handle=fopen($chatPath, 'w');
fputs($handle,'');
fclose($handle);
if($historyPath !== '')
{
$handle=fopen($historyPath, 'a');
fputs($handle,$fileContents);
fclose($handle);
}
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat();
return true;
case "/lock":
if($args=='')
{
doMsg($txt['yshout_error'].$txt['yshout_lock_arg_error']);
return true;
}
if($sbMaintenance !== false)
doMsg(sprintf($txt['yshout_lock_changed'],$args));
else
doMsg(sprintf($txt['yshout_lock_success'], $args));
$sbMaintenance = $args;
writeBanList();
return true;
case "/unlock":
if($sbMaintenance === false)
{
doMsg($txt['yshout_error'].$txt['yshout_unlock_already']);
return true;
}
$sbMaintenance = false;
writeBanList();
doMsg($txt['yshout_unlock_success']);
return true;
case "/banlist": // who's banned?
$_SESSION['readingCmd']=$text;
$temp=Array();
echo '<table>
<caption>',$txt['yshout_banlist_caption'],'</caption>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_ips_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_ip_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_ips_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=ip');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_rp'],'</td><td>';
$temp=Array();
foreach($ban_names_readpost as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '<tr><td>',$txt['yshout_username_bans'],$txt['yshout_p'],'</td><td>';
$temp=Array();
foreach($ban_names_post as $i)
$temp[]="<a href=\"javascript:ajaxGet('unban=$i&type=name');\">$i</a>";
echo implode($temp,','),'</tr>';
echo '</table>';
return true;
case "/ban": // need to be more specific!
doMsg($txt['yshout_error'].$txt['yshout_ban_type_error']);
return true;
case "/banuser":
case "/banip":
$type=($cmd=='/banip')?'ban_ips_':'ban_names_'; // prefixes for variables
$ar=explode(' ',$args,2); // true argument array. the "2" ensures that we cut only once: mode can't have spaces but user can.
if(count($ar)!=2) // whoops: only one argument?
{
doMsg($txt['yshout_error'].$txt['yshout_ban_mode_error']);
return true;
}
$mode=$ar[0]; // set up vars
$id=$ar[1];
doBan($type,$mode,$id);
return true;
case "/impersonate":
// <user> [userlevel] [ip] [userid] /[shout text]
$slashpos=strpos($args,' /'); // use ' /' as a separator, so we can see how many args came before
if($slashpos===false) // no shout? invalid formatting?
{
doMsg($txt['yshout_error'].$txt['yshout_imp_slash_error']);
return true;
}
$shout=substr($args,$slashpos+2);
$ar=explode(' ',substr($args,0,$slashpos));
$name='';
$userlevel=0;
$userid=0;
switch(count($ar)) // how many args did we get?
{
case 0: // no args
doMsg($txt['yshout_error'].$txt['yshout_imp_uname_error']);
return true;
case 4: // reverse order to save space: we just set them from the back!
$userid=intval($ar[3]);
case 3:
$ip=$ar[2]; // corrupt the global >:D
case 2:
$userlevel=intval($ar[1]);
case 1:
$name=html_entity_decode($ar[0]);
break;
default:
doMsg($txt['yshout_error'].$txt['yshout_imp_max4_error']); // just so they know that we only have 4 params
return true;
}
$ip.='.'; // to set off the impersonated msgs
$fakeuser=array('id'=>$userid,'name'=>$name,'is_admin'=>($userlevel==2)?1:0,'is_sbmod'=>($userlevel==1)?1:0,'is_logged'=>($userlevel==-1)?0:1); // fake SMF $user array
makeShout($shout,$fakeuser);
return true;
default: // not a command
return processUserCommand($text);
}
return false;
}
function processUserCommand($text) {
global $reqType,$chatPath,$historyPath,$maxLines,$ip,$ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$user,$bannedCommands,$func;
if($text[0]!='/') return false; // no slash, no service
$data=explode(' ',$text,2); // "2" means to make the first "word" separated from the rest
$cmd=$data[0]; // first word is the cmd. No cmds can have spaces.
$args=(isset($data[1])?$data[1]:''); // are there even any arguments?
if(in_array($cmd,$bannedCommands)) return false;
switch($cmd) {
case "/help":
if(empty($args)) help();
elseif($args[0]!='/') help('/'.$args);
else help($args);
$_SESSION['readingCmd']=$text;
return true;
case "/return": // I'm done reading
unset($_SESSION['readingCmd']);
echo readChat();
return true;
case "/pi":
$s_pi='141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609';
$n=5;
if($args!='') $n=intval($args);
$res=($n==0)?"PI IS EXACTLY 3!":'3.'.substr($s_pi,0,$n-1).(substr($s_pi,$n-1,1)+(substr($s_pi,$n,1)>=5?1:0));
// all that nasty little bit does is add the first n-2 chars, then add the last digit and increment if rounding is necessary.
makeShout($res);
return true;
case "/me":
$newText = cleanupShout($args.' ');
$shoutName=$user['name'];
makeRawShout("<span class=\"meaction\"> * $shoutName $newText</span>",$user);
return true;
case "/wh":
$newText = cleanupShout($args.' ');
$shoutName=$user['name'];
makeRawShout('<span style="color: gray">'." [$shoutName whispers] $newText</span>",$user);
return true;
default:
return false;
}
return false;
}
// utility functions for banning and deleting
function doBan($type,$mode,$id)
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$txt;
switch($mode)
{
case 'u': // nice guy
$r=$type.'readpost'; // need to search both ban arrays. Search this one first...
$index=array_search($id,$$r); // where is my little banned user?
if($index===false)
{
$r=$type.'post'; // ...and this one second on failure.
$index=array_search($id,$$r);
if($index===false) // whoops, both searches failed!
{
doMsg($txt['yshout_error'].'Couldn\'t find user to unban!');
return false;
}
}
array_splice($$r,$index,1); // cut the 1 element loose with splice. $$r is used because $r is the string variable denoting the target array.
doMsg("Success: unbanned $id.");
break;
case 'rp':
array_push(${$type.'readpost'},$id); // easy, huh!
doMsg("Success: banned $id from reading and posting.");
break;
case 'p':
array_push(${$type.'post'},$id);
doMsg("Success: banned $id from posting.");
break;
default:
doMsg($txt['yshout_error']."Invalid mode $mode! Use only 'u', 'rp' or 'p'!");
return false;
}
writeBanList(); // write the final report
return true;
}
function writeBanList() // generate our dynamic ban list, which is 'require'd at the start of this script
{
global $ban_ips_readpost,$ban_ips_post,$ban_names_readpost,$ban_names_post,$sbMaintenance,$yshoutdir;
$writeText = "<"."?php\n"; // php header
$writeText .= '$ban_ips_readpost = '.var_export($ban_ips_readpost,true).";\n"; // bans
$writeText .= '$ban_ips_post = '.var_export($ban_ips_post,true).";\n";
$writeText .= '$ban_names_readpost = '.var_export($ban_names_readpost,true).";\n";
$writeText .= '$ban_names_post = '.var_export($ban_names_post,true).";\n";
$writeText .= '$sbMaintenance = '.var_export($sbMaintenance,true).";\n";
$writeText .= '?'.'>'; // end tag
$handle = fopen($yshoutdir."_banlist.php", "w");
if($handle===false) die('File error (writeBanList); aborted');
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two bans happen simultaneously
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeBanList); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
function deleteShout($spanTitle, $chatPath) {
$fileContents = '';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$newFileContents=preg_replace('/<p[^>]*><span class="shout-timestamp" title="'.str_replace('|','\|',$spanTitle).'">.+\n/','',$fileContents);
if($fileContents == $newFileContents) return false;
$handle = fopen($chatPath, "w");
fputs($handle, $newFileContents);
fclose($handle);
return true;
}
// utility functions for shouting
function cleanupShout($text) {
global $func,$bannedCode,$context;
$text = $func['htmlspecialchars'](stripslashes($text), ENT_QUOTES);
foreach($bannedCode as $searchString)
$text = preg_replace('/'.preg_quote($searchString,'/').'/i','',$text);
preparsecode($text);
$text = parse_bbc($text);
censorText($text);
return $text;
}
function makeShout($text,$user=false) {
if($user===false)
global $user;
$text = cleanupShout($text.' ');
$a_style = "";
global $user_profile;
if(loadMemberData(Array($user['id']),false,'profile')!==false)
{
$profile=$user_profile[$user['id']];
$a_style = ' class="userclass" style="color: '.(empty($profile['member_group_color']) ? $profile['post_group_color'] : $profile['member_group_color']).'"';
}
$shoutName=$user['name'];
$userID=$user['id'];
if(isGuest($user))
$writeText=$shoutName;
else
$writeText="<a$a_style href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
$writeText.=": $text";
makeRawShout($writeText,$user);
}
function makeRawShout($text,$user=false) {
global $maxLines,$chatPath,$historyPath,$ip;
if($user===false)
global $user;
$emTitle=time()." | $ip";
$banID=isGuest($user)?$ip:$user['id'];
$timestamp="<span class=\"shout-timestamp\" title=\"$emTitle\"><timeval=".time()."></span>";
$delLink="<a href=\"javascript:ajaxGet('delete=$emTitle&sesc=<sesc>')\">del</a>";
$banLink="<a href=\"javascript:ajaxGet('banid=$banID&sesc=<sesc>')\">ban</a>";
$adminlinks="<span class=\"shout-adminlinks\">$delLink $banLink </span>";
writeLine("<p class=\"shout\">$timestamp $adminlinks$text</p>\n",$chatPath);
truncateChat($maxLines,$chatPath,$historyPath);
refreshChats(true);
}
function truncateChat($maxLines,$chatPath,$historyPath) {
$fileContents = '';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$lines = explode("\n", $fileContents);
if(count($lines) > $maxLines) {
$newText = substr($fileContents, strpos($fileContents, "\n") + 1);
$handle = fopen($chatPath, "w");
fputs($handle, $newText);
fclose($handle);
if($historyPath !== '')
{
// History
$oldText = substr($fileContents, 0, strpos($fileContents, "\n") + 1);
$handle = fopen($historyPath, "a");
fputs($handle, $oldText);
fclose($handle);
}
}
}
function writeLine($writeText,$chatPath) {
$handle = fopen($chatPath, "a");
if($handle===false) die('File error (writeLine); aborted');
$failcount=0;
while( !flock($handle, LOCK_EX) ) // just IN CASE two shouts happen simultaneously
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeLine); aborted'); // one second
}
fwrite($handle, $writeText);
flock($handle, LOCK_UN);
fclose($handle);
}
// utility functions for reading shouts
function processChats($chatText, $user=false) {
if($user===false)
global $user;
if(!isMod($user) || isset($_COOKIE['yShout_hideadmlinks']))
$chatText = preg_replace('/<span class="shout-adminlinks".+?<\/span>/','',$chatText);
if(!isMod($user))
$chatText = preg_replace('/<span class="shout-timestamp" title="(\d+) \| [0-9\.]+">/','<span class="shout-timestamp" title="\\1 | logged">',$chatText);
global $sc;
if(isMod($user))
$chatText = preg_replace('/<sesc>/',$sc,$chatText);
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
return $chatText;
}
function readChat($chatPath=false, $force=false) {
global $user,$reverseShouts;
if($chatPath === false)
global $chatPath;
if(isset($_SESSION['readingCmd']) && !$force)
{
$c=$_SESSION['readingCmd'];
if($c[0]=='/') // it's a command, redo command to retain the message
{
if(isMod()) processCommand($c);
else processUserCommand($c);
}
else
echo $c;
return ' ';
}
$chatText = "";
if(file_exists($chatPath))
$chatText = file_get_contents($chatPath);
$chatText=processChats($chatText,$user);
if($reverseShouts)
$chatText=implode("\n", array_reverse(explode("\n", $chatText)));
return str_replace("\n","\n<hr class=\"shout-separator\" />",$chatText.' '); // hack: totally empty responses can break some browsers
}
function refreshChats($forceRefresh=false) {
global $chatPath,$user,$maxLines,$gzipCompression,$updateTimeout,$updatePeriod;
if(!file_exists($chatPath))
writeLine('',$chatPath);
$time=filemtime($chatPath);
$start_time=time();
$heartBeatSent=false;
if(!$forceRefresh)
{
session_write_close(); // so that future session requests succeed
while((time() - $start_time < $updateTimeout) && ($time==filemtime($chatPath)))
{
usleep($updatePeriod*1000);
// heartbeat - check connection to ensure client is still connected
echo ' ';
flush();
ob_flush();
$heartBeatSent=true;
clearstatcache();
}
@session_start(); // restart session, so updates to $_SESSION are applied
}
if($gzipCompression && !$heartBeatSent) ob_start("ob_gzhandler");
echo readChat();
if($gzipCompression && !$heartBeatSent) ob_end_flush();
}
// help and history handlers
function help($command='')
{
global $user,$defaultEncoding,$txt,$settings;
$cmdlist=$txt['yshout_cmdlist'];
$cmdlistadmin=$txt['yshout_cmdlistadmin'];
if(isMod())
$cmdlist=array_merge($cmdlist,$cmdlistadmin);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_cmd_reference']; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo $settings['theme_url']; ?>/css/style.css?b21" />
<style type="text/css">
/*<![CDATA[*/
.meaction {
color: red;
}
/*]]>*/
</style>
</head>
<body>
<?php
if($command=='')
{
echo '<h1>',$txt['yshout_shoutbox'],' ',$txt['yshout_commands'],'</h1><div style="border:1px solid #aaaaaa;">';
foreach($cmdlist as $cmd=>$desc)
{
echo "$cmd$desc<br />\n";
}
echo '</div>';
}
else
{
echo '<div>';
if(isset($cmdlist[$command])) echo "$command{$cmdlist[$command]}<br />\n";
else echo "$command not found";
echo '</div>';
}
?>
</body>
</html>
<?php
}
function history()
{
global $chatPath,$historyPath,$boardurl,$gzipCompression,$defaultEncoding,$txt,$settings;
$n=250;
if(isset($_GET['n'])) $n=intval($_GET['n']); // integers only!
if($gzipCompression) ob_start("ob_gzhandler");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<base href="<?php echo $boardurl,'/'; ?>" />
<meta http-equiv="content-type" content="text/html; charset=<?php echo $defaultEncoding ?>" />
<title><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></title>
<script type="text/javascript">
//<![CDATA[
function ajaxGet(args) {
window.location=window.location+'&'+args+'&'+'sesc=<?php global $sc; echo $sc; ?>';
}
//]]>
</script>
<link rel="stylesheet" type="text/css" href="<?php echo $settings['theme_url']; ?>/css/style.css?b21" />
</head>
<body>
<h1><?php echo $txt['yshout_shoutbox'],' ',$txt['yshout_history']; ?></h1>
<div id="yshout">
<div id="shouts">
<?php
$text='';
if($historyPath !== '')
{
global $user;
require_once("class.tail.php");
$mytail = new tail($historyPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines($n);
$text=$mytail->output(PLAIN);
}
$text.=file_get_contents($chatPath);
echo processChats($text,$user);
?>
</div>
</div>
</body>
</html>
<?php
if($gzipCompression) ob_end_flush();
exit;
}
?>
Quote from: Krandall on January 26, 2009, 08:02:42 PM
Sweet, thanks man!!!! How about this one.
Right now I haev it set that the shout is only brought up on a specific board called like this:
/ YSHOUT HERE - shoutbox code
global $board;
if(isset($board) && $board==32) {
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>';
}
How can I make it so instead of based on board, based on an entire category?
http://www.simplemachines.org/community/index.php#c18
I know it has something to do with the #c18 but I can't figure it out. Any ideas?
bump :(
can the smilies be added without the animation? Can the show/close be instant?
Thanks
Me and my forum members LOVE nneonneo's Shoutbox
In order to minimize server load, I like to have an emulation of nneonneo's Shoutbox .
I want to display latest shouts on every page of my Forum but without any refresh.
Just display the latest "10" shouts made (from home.txt).
There will be also the whole "shout_form" form (or a link, or only the button "Shout") and if someone click on it, will be taken to the ONE and ONLY fully functioning chatting page: www.mysite.com/smf/yshout/
I guess that it would require a new file "yshout_emu.php" in /smf/yshout/ to be included in the "index.template.php" of my Theme...
There would be NO need for the /smf/yshout/js/moo.ajax.js and other yshout scripts to load on every page...
That would result in a faster running SMF with the beauty of nneonneo's Shoutbox included.
Would you please try to filter out "yshout.php" and create a new "yshout_emu.php" ?
If you like my idea and you are going to work on that please let me know so I 'll be grateful to you and wait for your response.
Thank you in advance.
Yiorgos
@Krandall
I have messed around with a bunch of configurations trying to get it to apply to an entire category, but I think that it is still calling from individual boards, preventing the category declaration from working. You may try setting up an array of boards to display it in (then just include each board from that category).
@shortchange
Removing the Open|Close is quite simple, but placing it beside the shout button and getting it to layout right hasn't been quite as easy. I am still trying to get it to look right over there. As far as making the smiley Open|Close "instant", I think you can find var collapse1=new animatedcollapse("smiley_pic", 1000, false in your index.template.php in your index.template.php and change it to var collapse1=new animatedcollapse("smiley_pic", 0, false
@Yiorgos
I have PM'd you. ;)
Sorry for being so impatient :)
Thank you for looking into this!
-Randy
@Yiorgos: I see one (easy) way to do it: you simply don't add the AJAX bit, and replace it with something that simply changes the shout_form (once loaded) to a simple link. With an instant-on shoutbox, you would see the whole shoutbox, but with the AJAX gone, they would just see a link to the full shoutbox instead.
@shortchange: Change the value 1000 in
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
to something lower (minimum 10). 20 should make the transition fast enough for most users.
Hi :)
I still don't understand why when I press shout it does not add it to history-file???
Please help me it got to be something simple I have missted because everything else works...
Best Regards
Scarmix
Thank you nneonneo
I 'll try that tonight
Your shoutbox is the most valuable customization ever made for SMF.
Thank you SunKing for adding extras to our shoutboxes.
Dear, nneonneo. :(
How to put, scrooll bar onto conversation area?
The described method here, did not work for me.
I made everything, step by step, and nothing happen.
http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
Any solution?
I'm try this shout onto Skin Dark Night
http://custom.simplemachines.org/themes/index.php?lemma=577
Screen here:
http://custom.simplemachines.org/themes/index.php?action=download;lemma=577;id=4179;image
Screen my site here?( No incorporate theme)
(http://i44.tinypic.com/k16r6h.jpg)
Onto Default theme working corretly( icorporate the theme)
(http://i41.tinypic.com/2nu7l2x.jpg)
But, my question is. The scrollbar.
Any help is very welcome.
Regards.
When I installed the mod to Extreme61, it gave me this error...
Fatal error: main() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/local/lib/php') in /home/www/mysite.com/forum/yshout/yshout.php on line 195
What do i do?
Quote from: Fattredd on February 03, 2009, 09:24:36 PM
When I installed the mod to Extreme61, it gave me this error...
Fatal error: main() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/local/lib/php') in /home/www/mysite.com/forum/yshout/yshout.php on line 195
What do i do?
Have you tried using cMod and change the file to 777?
hey i added the pic of the user when they are chatting in the shoutbox but the pic was too big so i resize it so all over the forum the pic is small how can i get the users pic to be small in the shoutbox and big in the forum???
Thank you for your previous help.
I've installed the avea link mod. How do I prevent a pasted link in the shoutbox from being translated into video (because of the avea) mod. I tried adding
$context['disableAEVAC'] = 1 ;
to settings.php but that didn't do anything.
thank you.
Solution:
Quote from: Polymath on February 04, 2009, 03:23:59 PM
You must find in the relevant SOURCE file where that string or data is put through the function "parse_bbc". Then on the line BEFORE it, add:
$context['aeva_disable'] = 1;
Thank you. For anyone else:
Open yshout.php
find
$text = parse_bbc($text);
Paste before it
$context['aeva_disable'] = 1;
Quote from: arkanoidblue on February 03, 2009, 01:54:04 PM
Dear, nneonneo. :(
How to put, scrooll bar onto conversation area?
The described method here, did not work for me.
I made everything, step by step, and nothing happen.
http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
Any solution?
I'm try this shout onto Skin Dark Night
http://custom.simplemachines.org/themes/index.php?lemma=577
Screen here:
http://custom.simplemachines.org/themes/index.php?action=download;lemma=577;id=4179;image
Screen my site here?( No incorporate theme)
(http://i44.tinypic.com/k16r6h.jpg)
Onto Default theme working corretly( icorporate the theme)
(http://i41.tinypic.com/2nu7l2x.jpg)
But, my question is. The scrollbar.
Any help is very welcome.
Regards.
I set the height in the yshout.css file. Play with it until you get it the size you want.
How can i remove the "tool-links" from above the chat?
How can i make it to be centralized on screen, instead of being on the left of the screen?
Thanks... :)
hea.. i am getting error in your sb... it wqas working fine for me but now i have started to get error since i decided to change my host... When in i changed host sb stopped working, i thought of reinstalling it once again/.. And so removed it but when i again installed that i started get "Modification parse error"
I installed in manually in my default core theme and it started to show but while i tryto shout i get this error:-
QuoteWarning: fopen(yshout/chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /home/desirock/public_html/yshout/yshout.php on line 699
File error (writeLine); aborted
I have just freshly installed this so no chance of edit in any script... using AdvSB_1.22
Please solve this up...
Quote from: desi.rockerz on February 05, 2009, 03:25:52 AM
hea.. i am getting error in your sb... it wqas working fine for me but now i have started to get error since i decided to change my host... When in i changed host sb stopped working, i thought of reinstalling it once again/.. And so removed it but when i again installed that i started get "Modification parse error"
I installed in manually in my default core theme and it started to show but while i tryto shout i get this error:-
QuoteWarning: fopen(yshout/chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /home/desirock/public_html/yshout/yshout.php on line 699
File error (writeLine); aborted
I have just freshly installed this so no chance of edit in any script... using AdvSB_1.22
Please solve this up...
Make sure all of the yshout files have read/write permissions on the webserver.
Anyone have this working with 2.0 RC1 yet? I tried to manually install things, but when I add the "shoutbox();" to index.template.php it causes most of the page to be reproduced several times. I thought I'd done something stupid and put the code within a loop, but I've checked and I can't see that I have.
Update:OK, I fixed things. Not quite sure what I did wrong, but going back to a clean source and applying everything manually fixed things nicely :)
plzz helppp
tell me how to do ths?
i m using smf 1.1.8 and 1.22 (not advancd )
Great mod nneonneo!
I have a little question, is there a way to set up a time between shouts. Something like a longer flood control?
I want to put a 10 second "waiting time" before posting another shout.
Quote from: Pratt on February 05, 2009, 11:24:41 AM
Great mod nneonneo!
I have a little question, is there a way to set up a time between shouts. Something like a longer flood control?
I want to put a 10 second "waiting time" before posting another shout.
check settings.js
I upgraded my forum to RC1 and now my shoutbox is hosed. Instead of displaying the shoutbox, its just showing the forum again inside the shoutbox. any ideas how to fix this please?
Quote from: shortchange on February 05, 2009, 11:56:51 AM
Quote from: Pratt on February 05, 2009, 11:24:41 AM
Great mod nneonneo!
I have a little question, is there a way to set up a time between shouts. Something like a longer flood control?
I want to put a 10 second "waiting time" before posting another shout.
check settings.js
Thank You Very Much! ;D
now when i try to send a message its not sending whats the cause
Quote from: sbmcos on February 05, 2009, 10:34:20 AM
plzz helppp
tell me how to do ths?
i m using smf 1.1.8 and 1.22 (not advancd )
If the shoutbox has it's own div-tag you could use:
float: right;
on that div and it should work.
If there is no "main" div around the shout box then you could make one.
I think something like this would do the job (shoutBox -1.22 for SMF 1.1.8)
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div ="yshoutWrapper">
echo '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
And add this to the CSS code:
#yshoutWrapper{
float: left;
}
I don't know if it works because I can't try it out but it should do ;)
It might need some more to be done. But I can't say because I cant see your code.
A link to your site would be good :)
Quote from: juniorj23 on February 05, 2009, 04:05:11 PM
now when i try to send a message its not sending whats the cause
same here :(
http://dakaration.com
i entered the first block of code correctly... but where should i enter the second shoutbox block of code?? I tried some random places but it is appearing anywhere like first thing before forum logo..etc..
How can I removed the function of "smilies" from the shoutbox?
The shoutbox cannot appear in my theme, why? I'm using SMF 2 and I already select the additional theme but it's not working. Trying to add it manually but the code is already added by the package manager. It's not showing up. But it shows in default theme.
Quote from: zach21uk on February 05, 2009, 12:38:46 PM
I upgraded my forum to RC1 and now my shoutbox is hosed. Instead of displaying the shoutbox, its just showing the forum again inside the shoutbox. any ideas how to fix this please?
This was the issue I had. I solved it by removing 1.21 completely (back to new files infact) and then manually applying 1.22Adv. Worked fine after that.
@ScarMix: Make sure the permissions on the history file are correct; 644 or 666 are usually the correct settings.
@arkanoidblue: You just need to add the code from that page to your theme's index.template.php. There's a big CSS block there. If you aren't seeing the scrollbar, try setting a smaller height: value.
@juniorj23: I think if you add CSS like this:
#yshout .avatar {
width: 50px;
}
it should resize the avatars correctly.
@Ellion Cold:
1) edit index.template.php or yshout.css, and change
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
to
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
display: none;
}
2) edit the same CSS, and add text-align: center;
after
#yshout {
@zach21uk: You should reapply the mod -- the upgrade has undone the mod's changes.
@Patriot89: You mean to prevent smileys from showing up? Edit yshout.php and change
parse_bbc($text);
to
parse_bbc($text, false);
Also, based on my limited testing, this mod is compatible with SMF 1.1.8 and SMF 2.0RC1. If anyone encounters issues, please post them.
If you are upgrading from 2.0b4 to 2.0RC1, you will likely have to reapply the mod. Custom themes will likely be unaffected.
If you are upgrading from 1.1.7 to 1.1.8 via the Package Manager patch, you don't have to do anything. The shoutbox should still be functional.
nneonneo i update my forum and when i try to install the shoutbox its not installing on the index.template.php
how can i fix this
2.0rc1
when i want to install ( 2.0RC1 ) it gives me an error
Execute Modification ./Themes/default/index.template.php Test failed
5. Add After ./Themes/default/index.template.php Test failed
all else is succesfull:
Quote
Find:
echo ' <div class="buttonlist', $direction != 'top' ? '_bottom' : '', '"> <ul class="clearfix"> <li>', implode('</li><li>', $buttons), '</li> </ul> </div>'; }
Quote
Add After:
function shoutbox() { global $txt, $options, $settings, $context, $boarddir; echo '<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;"><a href="#" onclick="sbToggle(); return false;"><img id="upshrinkSB" src="', $settings['images_url'], '/', empty($options['collapse_shoutbox']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="Shrink or Expand the ShoutBox" align="bottom" /></a> '; // Block Title echo '<span style="width:49%"></span><span>ShoutBox</span>'; echo '</div><div id="upshrinkSBHeader"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', '> <table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;"> <tr> <td class="windowbg" width="6%" align="left" valign="top">'; // SHOUTBOX HERE global $txt,$context,$boarddir; if(allowedTo('yshout_view')) { echo '<div id="yshout">'; include_once($boarddir.'/yshout/yshout.php'); echo '</div>'; } elseif($context['user']['is_guest']) echo $txt['yshout_no_guests']; // SHOUTBOX END echo ' </td> </tr> </table></div>'; }
Is it safe to execute???
after installl this is what i get
Fatal error: Call to undefined function shoutbox() in /home/dakarat/public_html/forum/Sources/Load.php(1944) : eval()'d code on line 360
@juniorj23: I think your problem the same as lorddusk's.
@lorddusk: There's a tiny little difference between the new and old. You will have to make that change manually until I can patch the existing package.
For reference:
Edit index.template.php and find
echo '
<div class="buttonlist', $direction != 'top' ? '_bottom' : '', '">
<ul class="clearfix">
<li>', implode('</li><li>', $buttons), '</li>
</ul>
</div>';
}
and add after it
function shoutbox()
{
global $txt, $options, $settings, $context, $boarddir;
echo '<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;"><a href="#" onclick="sbToggle(); return false;"><img id="upshrinkSB" src="', $settings['images_url'], '/', empty($options['collapse_shoutbox']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="Shrink or Expand the ShoutBox" align="bottom" /></a> ';
// Block Title
echo '<span style="width:49%"></span><span>ShoutBox</span>';
echo '</div><div id="upshrinkSBHeader"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
</tr>
</table></div>';
}
http://dakaration.com/forum/index.php look at this error i get after i add that
Quote from: nneonneo on November 26, 2008, 06:28:53 PM
To prevent notification for hidden boards, wrap both NOTIFICATION blocks in this code, substituting <BoardIDs> with a comma-separated list of hidden boards (e.g. 3,5,8)
if(!in_array($board, array(<BoardIDs>))) {
// YSHOUT -- NOTIFICATION
...
// YSHOUT -- NOTIFICATION END
}
I dont get this part, care to explain please?
i need to hide boards 16 21 and 22
@nneonneo: I have tried it at 644, 666 and 777 and nothing works :( I really want it to work because it's a brilliant mod... but this is not working :(
@juniorj23: Post index.template.php.
@lorddusk: replace <BoardIDs> by 16,21,22.
@ScarMix: try chmodding the chats folder the same. Check the owner of the files, too, if that doesn't work.
here it is
I have done it over again because I upgraded to 2.0 RC1 today still no difference and I have changed the folder. But I don't know how to check who's the owner?
@juniorj23: You should have "added after" instead of replacing that code.
ohh k thanks
I don't know what to do :(
I get now what you mean about owner but it till does not happen anything :(
are my paths wrong?:
/yshout/chats/history.home.txt
/yshout/chats/home.txt
/yshout/yshout.php
did just discover that when I enter /yshout/index.php in the address it says:
Shoutbox
Loading...
/yshout/yshout.php:
Nothing to do.
should it be like that?
Also now I saw with FireBug that the style changes to invalid-shout somtimes. Hope that this gives you an idea of why it does not work. Thanks dude for the help so far :)
@nneonneo
hello bro
please help
i want to install this mod to my forum but i was not able to install it
please look to my forum www.motousers.or.id
let me know
thx
i've send you email @nneoneo
Quote from: ameo on May 07, 2008, 11:46:19 AM
I made sort of guide for dummies, or something like that, to place this shoutbox in News field, and make it look cool on forum.
Personally, I believe this is the best position for shoutbox, and if you don't need News on your forum you could place shoutbox instead.
NOTE: I wrote tutorial and it works for 1.17 !!!
NOTE 2: With nneonneo's help - this works like a charm with version 1.21 also :)
For 1.21 installation see step 4 (http://postthatpic.com/files/2526/4.png) instead of step 1(http://postthatpic.com/files/2526/1.png), and then
follow all other steps normally.
(http://postthatpic.com/files/2526/1.png)STEP 1
First steps you already know, but I'll repeat it just in case;
First download yShout and install it.
If you're using different theme than default one after
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
you must add this code into your index.template.php :
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" 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;
}
</style>';
// YSHOUT END
(http://postthatpic.com/files/2526/2.png)
Then do this:
Of course you need news box to be displayed in order to see shoutbox in your index page.
To do that go to Theme options and click to:
1. DISABLE eNews (http://postthatpic.com/files/2526/inflame.gif) [it is very dangerous to leave it enabled, so if it is checked,
you must uncheck it]
&[/]
2. Show news fader on board index [check it]
3. fading delay - set to 0
Click save, then in News box put this code
a) for 1.15-1.17 <div id="yshout">',$txt['yshout_loading'],'
b) for 1.21 <div id="yshout">Loading shoutbox...</div>
instead of putting second code somewhere else:
And save it.
(http://postthatpic.com/files/2526/3.png)
If you wish to change News to Shout box or Shoutbox you'll need to find file index.english-utf8.php / index.english.php or of any other language file you're using. They are stored under Forum/Themes/default/languages/ In there you'll need to edit string $txt[102] = 'News';
to $txt[102] = 'Shoutbox'; and re-upload that file to it's place. You'll need to replace old file with that new-one if you didn't delete old one first.
// GUIDE FOR DUMMIES IS FINISHED // I guess that's it. I hope it shall be helpful to at least someone.[/]
Step 4 is actually step 1 FOR 1.21 installation
(http://postthatpic.com/files/2526/4.png)
In index.template.php, after
// 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" />';
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
Best of luck 2 everyone[/hr]
how about put it under the news.... ??
any guide for thix?
Tried installing Shoutbox 1.22 on SMF 2.0 RC 1 (both are fresh install)
I got these error messages
Type Action Description
* 1. Execute Modification ./index.php Test successful
1. Add Before ./index.php Test successful
2. Execute Modification themes/install-2.0b4.xml Modification parse error
3. Execute Modification themes/install-2.0b4.xml Modification parse error
4. Execute Modification languages/english_all.xml Modification parse error
5. Execute Modification languages/english_all.xml Modification parse error
6. Execute Modification permissions/install-perms-2.0.xml Modification parse error
7. Execute Modification permissions/install-perms-2.0.xml Modification parse error
8. Extract Tree ./yshout
any idea?
edit: in the error log
Apply Filter: Only show the error messages of this URL http://domain.tld/index.php?action=admin;area=packages;sa=install;package=SB_1.22.zip
Apply Filter: Only show the errors with the same message
2: fclose(): supplied argument is not a valid stream resource
Apply Filter: Only show the errors from this file
File: /home/path/public_html/Sources/Subs-Package.php
Line: 2424
Smileys :(
I have just upgraded to RC1 an added the shoutbox :)
I have followed the original instructions with the changed sections, I have followed, and used the instructions from Sunking.
I cannot put smiley.php & animatedcollapse into the yshout folder, no matter what I do to try and get it there, I have tried to create a file and paste but it wont let me do that either :(
Anyway, the smileys are there and they show and can be used but I cant get it to collapse. I have my shoutbox near the bottom of the forum, between the main posts and the Info centre, which is where I have always had it with collapsible smileys when using 1.1.x
Any help would be appreciated.
Hi, I did this before but I'm not sure what I'm doing wrong this time. I installed SB_1.17 and I am using the Site Integration mod. This is the code I used on a custom action page:
<?php
// 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
// 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
?>
This is the error I'm getting:
Fatal error: require_once() [function.require]: Failed opening required '/Subs-Post.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/lluther/public_html/yshout/yshout.php on line 195
Any ideas?
I installed in 1.1.8, and when I shout, nothing appears.. But they exist in history. Why is this? I'm using custom theme and already edit index.template
@LLUTHER: You might try this (http://www.simplemachines.org/community/index.php?topic=137508.msg1544760#msg1544760)
Thanks ameo! That worked great.
One last problem... I am trying to get the autoscroll to work. It acts like it is working... But the scrollbar only 'twitches' in IE... Does nothing in Firefox. I edited it correctly... Here's the link: http://www.llutherforum.com/index.php?action=chat
Hi,
I today have had shoutbox working for over a week now, Theres been no edits or mods installed and the shoutbox is no longer working?
The bar where i type my message appears then disappears in space off two seconds, It was working fine this morning and now its stopped working on its own?
What could be the problem or how can i fix this error?, Hope someone can help me out here, Thanks
Since i installed the Shoutbox on RC1 the admin links del/ban stopped working, please help, because my forummembers are a bit spamming.....
Quote from: meehan09 on February 09, 2009, 06:59:37 AM
Hi,
I today have had shoutbox working for over a week now, Theres been no edits or mods installed and the shoutbox is no longer working?
The bar where i type my message appears then disappears in space off two seconds, It was working fine this morning and now its stopped working on its own?
What could be the problem or how can i fix this error?, Hope someone can help me out here, Thanks
same here
Suggested add-on if this is not already implementable. A smiley limit in the chat per post.
Ive had the shoutbox for over a month and it seems to freeze and stick sometimes?, Can this be resolved anyway?.
It sometimes freezes and messages take a while to show and then today it wouldnt let some members post at all untill someone who could see the box typed messages one after each other and it seemed to unfreeze and start to work again?
Can anyone help me with this issue, Thanks in advance!
Is there some way to put this box on a separate page with the least amount of box.
@aotcsw > try this mod :)
Quote from: ameo on February 08, 2009, 01:08:47 PM
@LLUTHER: You might try this (http://www.simplemachines.org/community/index.php?topic=137508.msg1544760#msg1544760)
I discovered the Shoutbox by default informs all guests we have a shoutbox. Except we have limited the shoutbox to the Admins. I had to go in and nul the string blabbing this to the world. Any chance the default could be to NOT reveal this information? Or at not show it to groups not allowed to use it?
Grazie,
Cal
Sweet thanks!
Hi
Is it possible to move the shout box from the top of the forum down to the bottom located below whos online etc?
At the moment i have this installed and its located at the top of page, Is it possible to edit and move to bottom below whos online?
Id be greatfull if someone could help me move my shout box, Thanks
Quote from: ivantoar on February 08, 2009, 08:27:05 AM
I installed in 1.1.8, and when I shout, nothing appears.. But they exist in history. Why is this? I'm using custom theme and already edit index.template
SAME HERE!
But if I go to the FORUM/yshout.php direct, then i can send nd receive there..
Any suggestions?
Quote from: dsanchez on February 11, 2009, 05:35:47 AM
Hello, I have two questions:
1) It's possible to forbid guests to post in the shoutbox?
2) It's possible to allow only certain groups (for instance, mods) to use the shoutbox?
I would like to test the shoutbox only with my mods before making it public to the forum...
Thanks!
Yeah, just go to the permissions area in your admin control panel! ;)
Hey guys.what's the version of the nneonneo's Shoutbox i use for smf 1.1.8 ?
Ps: I never used this before.
I need a version to full install.
Thx in advanced :) !
Hi all,
First off my i say i'm no good with PHP and just trying to get used to modding this type of code...
I'm currently using SMF 2.0 RC1 and have tried to install the nneonneo's Shoutbox MOD but can't get it to work on the SageGreyIs theme?
Like i said i have no idea about PHP and have tried to follow the instructions but to no avale??
So with desperation I am willing to give admin details (which i will change after.LOL) for someone to install for me....yes i know bad idea but have tried and can't get it to work!!!!
If anyone could help me with this i would be very gratefull.
Cheers
Quote from: Daggers on February 08, 2009, 03:20:05 AM
Smileys :(
I have just upgraded to RC1 an added the shoutbox :)
I have followed the original instructions with the changed sections, I have followed, and used the instructions from Sunking.
I cannot put smiley.php & animatedcollapse into the yshout folder, no matter what I do to try and get it there, I have tried to create a file and paste but it wont let me do that either :(
Anyway, the smileys are there and they show and can be used but I cant get it to collapse. I have my shoutbox near the bottom of the forum, between the main posts and the Info centre, which is where I have always had it with collapsible smileys when using 1.1.x
Any help would be appreciated.
I got this working by copying the mymod folder into the root directory, public_html/mymod
:D
where do i get smiley.php at?
At the bottom of this post...
http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
Hi,
Everytime someone posts in the shout on my site it redirects them to my portamx frontpage. I thought I read somewheres it was a bug in ie before but in my case it happens on all browsers :(
Any ideas how to fix this?
Could you please help on the sound mod.
I made modifications as directed. SoundManager is installed and it will play the sound when soundManager.play('sound'); is placed in a different location but it plays the sound whenever page refreshes and not when the shoutbox refreshes. I guess that would show that I have the soundManager files in the right place.
In it's current state it will not play a sound. I am using SMF 2.0 RC1
yshouts.js
if (!textValid) {
$("shout-text").className="shout-invalid";
$("shout-text").focus();
return false;
} else {
$("shout-text").className="shout-valid-shout";
}
return true;
}
function ltrim(text) {
return text.replace(/^\s*/g,'');
}
var request;
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML))
soundManager.play('sound');
oldShouts = $("shouts").innerHTML;
}
function doRefresh() {
if($("yshout").style.display == "none") {refreshSet = false; return;};
set_cookie("yShout_open","true",duplicateWait);
request=new ajax (yshout_php, {
postBody: 'reqtype=refresh&file=' + shoutFile,
update: $('shouts'),
onComplete: schedRefresh
});
index.template.php
// 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>
<script type="text/javascript" src="',$boardurl,'/yshout/js/soundmanager2.js"</script>
<script type="text/javascript">
soundManager.url="',$boardurl,'/yshout/";
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function()
{
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/sound.mp3", autoPlay:false});
}
</script>
<style type="text/css">
#yshout {
font-size: 12px;
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;
font-size: 8pt;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 8pt;
color: #141414;
}
#yshout #shout-form {
margin: 0;
padding: 0;
}
#yshout #shout-form fieldset {
border: none;
}
#yshout #forum-name {
color: #666666;
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
Any help would be appreciated.
I have one problem neon as i already told there:
http://www.simplemachines.org/community/index.php?topic=256732.new#new
Installing RateThatTopic, shoutbox return me this error:
QuoteNotice: Undefined index: topic in /home/crazyzone/data/www/crazyzone.biz/Sources/Load.php on line 1737
Here the part of code
Quote//RateThatTopic mod
Line 1737 if ( $_GET['topic'] ){
$context['html_headers'] .= '
<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/rating.css" />';
}
you have some solution ?
Quote from: Pho3niX90 on February 11, 2009, 03:07:41 PM
Quote from: ivantoar on February 08, 2009, 08:27:05 AM
I installed in 1.1.8, and when I shout, nothing appears.. But they exist in history. Why is this? I'm using custom theme and already edit index.template
SAME HERE!
But if I go to the FORUM/yshout.php direct, then i can send nd receive there..
Any suggestions?
Sorry to bump again this, nobody have solution for non displaying shoutbox ???
Hey :D
I'm using SB_1.13_SMF2.tgz on a beta 3.1 forum (not mine) and I wanted to know if there was a way to make new shouts show at the top of the shoutbox?
The owner of the site is willing to pay you for it lol.
Jade: I believe you can do that by editing settings.php
// The shoutbox usually shows shouts with the newest chats at the bottom.
// If you want the newest ones at the top, set this to true.
$reverseShouts=true;
Or maybe I misunderstood the question.
Quote from: meehan09 on February 11, 2009, 11:47:43 AM
Hi
Is it possible to move the shout box from the top of the forum down to the bottom located below whos online etc?
At the moment i have this installed and its located at the top of page, Is it possible to edit and move to bottom below whos online?
Id be greatfull if someone could help me move my shout box, Thanks
Find
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
And add this code before the above code
// 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
It would be better to just copy and paste the existing in case the code is not exact. That should put the box where you want it.
Quote from: Arebias on February 16, 2009, 04:23:07 PM
Jade: I believe you can do that by editing settings.php
// The shoutbox usually shows shouts with the newest chats at the bottom.
// If you want the newest ones at the top, set this to true.
$reverseShouts=true;
Or maybe I misunderstood the question.
Not sure what file that's in.. this is 1.13 by the way :).
what exactly i put in block for tinyportal block?
If you put first code in index.template.php of theme you're using this should be enough:
<div id="yshout"></div>
Quote from: ameo on February 17, 2009, 11:40:30 AM
If you put first code in index.template.php of theme you're using this should be enough:
<div id="yshout"></div>
i have this:
Parse error: syntax error, unexpected '<' in /home/myhome/public_html/forum/Sources/Load.php(1991) : eval()'d code(52) : eval()'d code on line 1
hey i got a serious problem some of the members reported that they are "banned" but when i check the ban list no name is in it even me the admin is getting this error.
Quote
i have this:
Parse error: syntax error, unexpected '<' in /home/myhome/public_html/forum/Sources/Load.php(1991) : eval()'d code(52) : eval()'d code on line 1
Try putting complete 2nd. code:
// 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
tq. but that only show
Shout Box
...loading shoutbox...
its saying locked
Can anyone help me with this message:
"Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 17619247 bytes) in /var/www/web46/web/newforum/yshout/class.tail.php on line 228"
What should I do to fix history?
Where would I have to put the code to have it show up below my stats on the main page.
www.mustangmodding.com
I have installed this shoutbox and auto embed videos mod.
How can i block auto embed videos only from shoutbox ?
Quote from: skipisl on February 17, 2009, 04:04:06 PM
Can anyone help me with this message:
"Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 17619247 bytes) in /var/www/web46/web/newforum/yshout/class.tail.php on line 228"
What should I do to fix history?
you dont have enough memory left. remove unused themes or things not needed
the command:
/me
Alot of people are using that command on teh shoutbox to impost as an administrator.
How do i modify this so instead of the name turning red it will be white?
Also
How do I make the /impost command for admin only?
Alot of mods are using it sadly...
I've been working on this for hours . I have the code as the same as below and still no sound . I dont know what else to do , shout box is working great except for no sound . can someone help me please .
Quote from: nneonneo on August 19, 2007, 03:39:56 PM
Adding sound:
Get SoundManager2 (http://www.schillmania.com/projects/soundmanager2/)
Place soundmanager2.js in yshout/js
Place soundmanager2.swf in yshout/
Place the desired sound in yshout/ and change the URL below to match (MUST BE MP3!)
Place the following code after
<script src="',$boardurl,'/yshout/js/yshout.js?July062008" type="text/javascript"></script>
in index.template.php:
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">soundManager.url="',$boardurl,'/yshout/";
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function() {
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/sound.mp3", autoPlay:false});
}</script>
(if it does not work, you may have an older soundmanager2, try adding "soundmanager2.swf" after soundManager.url="',$boardurl,'/yshout/)
In yshout/js/yshout.js, after
function shoutDone() {
add
$('shouts').innerHTML = this.transport.responseText;
oldShouts = $('shouts').innerHTML;
(that step is optional, but it stops the sound when you shout, and only sounds when others shout)
Replace
var request;
// This gets called each refresh; it reloads the shoutboxes content.
by
function ltrim(text) {
return text.replace(/^\s*/g,'');
}
var request;
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML))
soundManager.play('sound');
oldShouts = $("shouts").innerHTML;
EDIT: Update for newer Soundmanager version (dated Mar 31 2008)
EDIT2: Complete instructions.
EDIT3: Update for new shoutbox versions (1.20+)
I recently attempted to install this mod on 2.0 RC1 and am recieving this error:
Screenshot (http://www.oh-wow.org/misc/ajax.jpg)
I have no other mods installed, only custom themes, but error appears to be stopping on the default theme.
A question for nneonneo concerning the notification of pots and topic in the shoutbox.
Is there a way to assign a certain member to announce a new post or topic was made?
I wanted to make it look like a forum bot feature.
Similar to the Welcome Mod where you can assign a user to greet new members, instead that user will be the one announcing the new replies and posts in the shoutbox.
I am using SMF 1.1.8 btw and version 1.21 of your shoutbox.
:( :( I keep getting this error message when typing in the shoutbox - ""File error (writeLine); aborted"
I have used it on 7 sites and never had a problem, until now, lol, using new smf 2.01RC
My shoutbox is down and have 1400 members, lol, getting kinda hairy in there, lol.
If you could help me out asap, I would be in your debt 4ever.
Mike
Quote from: forodecano on February 18, 2009, 02:30:53 PM
I have installed this shoutbox and auto embed videos mod.
How can i block auto embed videos only from shoutbox ?
I'm having the same issue, the videos don't look too nice in the shoutbox ;-) and you can't even look at them as they start all over again when the shoutbox refreshes...
Any idea would be greatly appreciated
How can I make it so /impersonate command only works for admin's?
Thanks
Hi, can you try my shoutbox?
www.allymcbeal.it/forums
I'd like if it was more bigger, if I can write more word for all the page.
I put an image, I need the word can be writed for all the red line.
Thanks
Im having real problems with this mod i've been trying to install this shoutbox for the past 3 hours ive removed it reuploaded it and everything possible ive edited my index.template.php page appropriately too but i don't see this mod anywhere in the admin section apart from on packages installed page... what am i doing wrong ive never had any problems installing mods before....
my site is www.vyb3.co.uk i just don't know whats happening with this, any help is appreciated
Pls ..how to input a custom number to make it display # of shouts in that box?..Searched..and nothing.
Quote from: Denied` on February 21, 2009, 06:19:26 AM
Pls ..how to input a custom number to make it display # of shouts in that box?..Searched..and nothing.
<your forum directory>/yshout/yshout.php
Look for this line : // Set the maximum amount of lines to be displayed at a time
// After changing this, /clear the shoutbox to make the change
// take effect.
$maxLines=25;
And edit the number of lines to display. Save and upload.
Hi :)
Thanks for this mod :)
I have this problem: when i write shout, i have this error:
Warning: fopen(yshout/chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /home/macrofor/public_html/smf2rc/yshout/yshout.php on line 699
File error (writeLine); aborted
Help please?
Antonio
I fixed it.
But now I have another questions.
I asked in the past, but I can't understand how to insert a board around my shout box?
Quote from: nneonneo on July 21, 2008, 12:09:25 PM
@allymcbeal: Something like
<div class="tborder" style="margin-top: 1ex;">
<div class="catbg" style="padding: 5px 5px 5px 10px;">
Shoutbox
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
!!SHOUTBOX CODE HERE!!
</table>
</div>
should make it look like one of the categories.
If you just want a simple line around it, you can simply use style="border: 1px white;" or a similar declaration in the yshout div.
I can't do it? Can you help me again?
Thanks.
Hi, love the shoutbox. My members are asking for the ability to edit their shouts though if they mistyped. How would I go about doing that?
Thanks in advance.
Hello. My shoutbox won't show when wrapped under mkportal.....
OK people, when asking for help provide links to your sites, so people who are able to help you could see what's the problem exactly when shoutbox won't appear.
And always see if shoutbox is working in default core theme before doing any modifications.
Easiest way to find out if something is wrong is to go to your forum/yshout/yshout.php
to discover whether there's some kind of error or not. Start from there.
@ Gravitysuit - that option isn't available in current version of shoutbox., so if they mistyped, they'll just have to live with that and enter correct words in second post.
still waiting te exactly code to put in block... for tinyportal... tq
Hi :-)
I have big problem....i banned myself !
Hoe can resolve it?
Thanks!
Antonio
Quote from: fotografo74 on February 22, 2009, 08:18:53 AM
Hi :-)
I have big problem....i banned myself !
Hoe can resolve it?
Thanks!
Antonio
I solved!
I deleted my username from _banlist.php file in yshout folder :-)
Antonio
Quote from: ameo on February 22, 2009, 06:17:26 AM@ Gravitysuit - that option isn't available in current version of shoutbox., so if they mistyped, they'll just have to live with that and enter correct words in second post.
I understand. They're just spoiled from Vbulletin. Thanks for the response though.
NEVERMIND THIS: I fixed it.
One more question, however:
I go to edit the theme's stylesheet to change the /me text color. (When they emote in the shoutbox.) by default it says:
/* /me uses this a lot. (emote, try typing /me in a post.) */
.meaction
{
color: red;
}
...
So then I change the color to "yellow", or even the hex code of yellow, and I can see the emote change in the preview, but it refuses to change it upon saving. The style saves, but it immediately goes back to red.
What am I doing wrong?
You maybe didn't clear cache - [Ctrl+F5] to do it so.
Or maybe it uses some other .css color, like your admin color red in .css style of your theme.
Quote from: JackWise on February 21, 2009, 06:22:13 PM
I,
I installed this mod in my forum (I'm Admin), but I don't see the shout in any place.
I changed from my theme (ferrytema) to default theme-core, but the shout didn't appear.
Can you help me ?
Thanks,
JW
HI,
This is my site :
http://www.linkswarez.com/
I tried this, but see nothing :
http://www.linkswarez.com/yshout/yshout.php
If you get 404 error when going to that page that simply means shoutbox is not installed.
Did you click on Apply mod during installation?
Quote from: qubbah on February 17, 2009, 11:42:13 AM
Quote from: ameo on February 17, 2009, 11:40:30 AM
If you put first code in index.template.php of theme you're using this should be enough:
<div id="yshout"></div>
what did u mean about first code?
i have this:
Parse error: syntax error, unexpected '<' in /home/myhome/public_html/forum/Sources/Load.php(1991) : eval()'d code(52) : eval()'d code on line 1
yes.......... i have got it... tq...
but ine question.. can me make auto scroll? i mean scroll when the thext is overflow.
Quote from: vantian on June 24, 2008, 10:56:12 PM
Hi, I have just installed Auto Embed Video/Audio Clips.
But I didn't realise it would also work in the ShoutBox. Auto Embed help says that to disable it I need to add:
$context['disableAEVAC'] = 1 ;
before the line where the string or data is put through the function "parse_bbc" in the relevant SOURCE file.
Could someone, please, tell me where should I add this line in nneonneo's Shoutbox?
Thanks in advance.
from nneonneo
Quote
Well, look for parse_bbc in yshout/yshout.php and add before the two or so places it appears.
There's a slight catch; you need to add the line "global $context;" right above it or the changes won't take.
what must we change in yshout/yshout.php?
I tried to install this mod - and i was succesful a bit.
Shoutbox is visible, but its impossible to post anything.
There are also dead admin links: everything except "extended history".
How can i fix it?
http://prawotest.comyr.com/index.php
EDIT
And i wonder if its possibble to plae shoutbox on the bottom of the page. :)
I might be wrong, but maybe all goes wrong if you don't use right mod. Not every version is for SMF 2.
And people, you can't expect everything to be fine when complete SMF 2 is still not out, just RC's are
- and it's clearly stated that you don't use them on working sites with active community if you don't know what you're doing.
Though nneonneo does his best to make new versions as soon as he can, he and other developers must
take some time to complete updates. Please try 2 understand.
Quote
@ Pavulon - make up your mind. I went to your site and there's another shoutbox there. If you still want this you might remove the other one. However, I cannot help you with - unable to post anything - and nneonneo isn't here at the moment.
- It is possible to place it on the bottom, but it doesn't look so good at all.
ameo - i was trying to solve that problem.
Im still searching for the solution.
Another shoutbox was also a test shoutbox - ******ty javascipt one.
but if neo's shoutbox wolnd't manage to work properly i'd be forced to used that one :/
Quote from: ameo on February 23, 2009, 06:49:48 AM
@ gubbah
If I understood nneonneo correctly, then in yshout.php find this:
// utility functions for shouting
and replace everthing that & everything underneath it with this;
// utility functions for shouting
function cleanupShout($text) {
global $func,$bannedCode,$context;
$text = $func['htmlspecialchars'](stripslashes($text), ENT_QUOTES);
foreach($bannedCode as $searchString)
$text = preg_replace('/'.preg_quote($searchString,'/').'/i','',$text);
global $context['disableAEVAC'] = 1 ;
preparsecode($text);
$text = parse_bbc($text);
censorText($text);
return $text;
}
@ Pavulon - make up your mind. I went to your site and there's another shoutbox there. If you still want this you might remove the other one. However, I cannot help you with - unable to post anything - and nneonneo isn't here at the moment.
- It is possible to place it on the bottom, but it doesn't look so good at all.
p.s. I might be wrong, but maybe all goes wrong if you don't use right mod. Not every version is for SMF 2.
And people, you can't expect everything to be fine when complete SMF 2 is still not out, just RC's are - and it's clearly stated that you don't use them on working sites with active community if you don't know what you're doing.
Though nneonneo does his best to make new versions as soon as he can, he and other developers must
take some time to complete updates. Please have understanding.
i have this:
Parse error: syntax error, unexpected '[', expecting ',' or ';' in /home/myhome/public_html/forum/yshout/yshout.php on line 611
That only means I misunderstood nneonneo. Try this instead:
// utility functions for shouting
function cleanupShout($text) {
global $func,$bannedCode,$context;
$text = $func['htmlspecialchars'](stripslashes($text), ENT_QUOTES);
foreach($bannedCode as $searchString)
$text = preg_replace('/'.preg_quote($searchString,'/').'/i','',$text);
global $context;
$context['disableAEVAC'] = 1 ;
preparsecode($text);
$text = parse_bbc($text);
censorText($text);
return $text;
I have the following problem:
I get in the schoutbox, "No database selected".
(see screenshot)
I know that the shoutbox don`t use the database.
In the Log i get this message:
http://www.kaartenleggen.nl/zigeunerkaarten/index.php?yshout&action=admin
: No database selected
SELECT mem.*, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
FROM smf_members AS mem
LEFT JOIN smf_attachments AS a ON (a.id_member = 2)
WHERE mem.id_member = 2
LIMIT 1
Bestand: /home/kaarten/domains/kaartenleggen.nl/public_html/zigeunerkaarten/Sources/Load.php
Regel: 350
When i refresh the page i see for one second the shoutbox and than i get the mesage.
I figured out that it had someting to do with SSI.php.
I have shared the user database from two forums.
Please some help.
Stef.
I get these errors no matter which version I use:
3. Execute Modification languages/english_all.xml Modification parse error
4. Execute Modification - Modification parse error
5. Execute Modification permissions/install-perms-1.1.xml Modification parse error
6. Execute Modification - Modification parse error
I get these errors no matter which version I use:
3. Execute Modification languages/english_all.xml Modification parse error
4. Execute Modification - Modification parse error
5. Execute Modification permissions/install-perms-1.1.xml Modification parse error
6. Execute Modification - Modification parse error
SMF 1.1.8
MySQL 5.0.67
PHP 5.2.5
I get "loading shoutbox" all the time despite I am loged as admin. What could be wrong? Thanks.
Quote from: dsanchez on February 24, 2009, 03:47:04 AM
I get "loading shoutbox" all the time despite I am loged as admin. What could be wrong? Thanks.
could you ATTACH here your index.template.php?
your second code should look like this in order for your shoutbox 2 work:
// 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
I'm not sure really how to exactly achieve what you planed - making it part of your forum - catbg and rest of stuff, but it messed up your code, so shoutbox didn't display at all.
thanks. I've tried your code, unfortunatley it shows still
"Shout Box
...loading shoutbox...
"
:(
Thanks ameo for your help installing the script.
Does anybody know how to edit it so that i can make the width the full width of my forum and maybe add a border and change the background colour, i tried editing yshout/index.php but coduln't get it to change... i dont really know what i'm doing i guess...
I also have similar questions regarding changing the look/layout.
Below is a picture of the shoutbox in action. Here is what I am wanting to do:
A.) Change the color of the scroll bar to blend better with the forum color or eliminate all together yet leaving it's functionality. i.e.; Scroll with mouse scroll wheel.
B.) Change the size and color of the toolbar at the top. History, commands, etc. as well as the Date/TimeStamp as to be less prominent.
If you could just tell me where to find these settings I can go from there.
Thanks
I sort of figured our some editing, but i want a border around the whole thing and i want to change the word shout box to something else anybody have any ideas? to see the shoutbox in action go here: www.vyb3.co.uk/smforums/index.php login is guest password is guest
You see the gaps in between where u write your shout and the shoutbox i want this to be filled with color #323232 and i want a border around the whole box. If anybody has any ideas, i'm grateful thanks.
This nneonneo s Shoutbox working perfect with Simple Portal Block...
I Made custom block for this!
Quote from: _System32_ on February 24, 2009, 09:10:05 AM
This nneonneo s Shoutbox working perfect with Simple Portal Block...
I Made custom block for this!
how u make it?
Quote from: qubbah on February 24, 2009, 09:38:06 AM
how u make it?
This very easy...
1. Create this Custom Block PHP in this Simple portal admin
2. Insert this next code
Show normal-->
// 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
or 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
or 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
Select that appears anywhere, not put it Collapsible and press OK.
how u make it?
3. Select that appears anywhere, not put it Collapsible and press OK.
This very easy, I Make this custom php with uploading to host..
Ok, it works now
I just copied this piece of code from the forum default template, instead of the piece of code someone else suggested for the templates different than default.
Now I am just wanting to know how to avoid guests to see and post in the shoutbox...
// 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 = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";
</script>
<script src="',$boardurl,'/yshout/js/yshout.js?May122008" 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;
}
</style>';
// YSHOUT END
Ok, so my shoutbox is finally working like a charm ;)
Now I just have a big question:
I want all guests able to SEE what we talk in the shoutbox, but I dont want them to post anything unless they register in the forum.
How can I accomplish that?
Thanks!
View
Admin > Permissions > Guest > Shoutbox > Post > make the necessary changes.
Moderate
I don't see anything related to the shoutbox mod in the permissions area....
hey guys I've installed the advanced version through package system in the forum but dont get any sound, I have even tried to manual install with all thats been written on the sound but to no avale. could someone explain how to do it?
I am using a custom theme and have the shout box in a simple portal block, I have tried it out of the block but still doesnt work :( any idea's?
When you click on Permissions you should see a list of user groups that you have and Guest should be one of those groups. Look for 'MODIFY' that corresponds to that 'GUEST' user group. It is after clicking 'MODIFY' that you will see a list of categorized privileges. Look for shoutbox.
Yes, I did that.
Not, shoutbox does not show up :( (my other mods yes: googlemap, ads mods, etc..)
Quote from: ameo on February 23, 2009, 08:24:17 AM
That only means I misunderstood nneonneo. Try this instead:
// utility functions for shouting
function cleanupShout($text) {
global $func,$bannedCode,$context;
$text = $func['htmlspecialchars'](stripslashes($text), ENT_QUOTES);
foreach($bannedCode as $searchString)
$text = preg_replace('/'.preg_quote($searchString,'/').'/i','',$text);
global $context;
$context['disableAEVAC'] = 1 ;
preparsecode($text);
$text = parse_bbc($text);
censorText($text);
return $text;
its still embedding the video url...
Quote from: dsanchez on February 24, 2009, 11:22:39 AM
Yes, I did that.
Not, shoutbox does not show up :( (my other mods yes: googlemap, ads mods, etc..)
Ok. First try this:
Change your theme to the Core SMF theme and then go to the Admin section and see if it is there. If so then make the changes. You can then go and edit your themes language.php for that particular theme later by using this link and parsing the mod for instructions.
http://custom.simplemachines.org/mods/index.php?mod=585
or Open
/sources/ManagePermissions.php
Find this code
// YSHOUT HERE - permissions
$permissionList['membergroup']['yshout'] = array('yshout_view' => false, 'yshout_post' => false, 'yshout_moderate' => false);
// YSHOUT END - permissions
and change the
yshout_view' => false, to
yshout_view' => true,I believe that will work for you.
I'm trying to get this working with smf 2 rc1. I worked fine in the beta 4 but now it's erroring and doesn't install due to failed tests.
Where the shoutbox is meant to be it has this error
Fatal error: Call to undefined function allowedto() in /home/errclan/public_html/forum/yshout/yshout.php on line 69
Quote from: Arebias on February 24, 2009, 09:02:30 AM
I also have similar questions regarding changing the look/layout.
Below is a picture of the shoutbox in action. Here is what I am wanting to do:
A.) Change the color of the scroll bar to blend better with the forum color or eliminate all together yet leaving it's functionality. i.e.; Scroll with mouse scroll wheel.
B.) Change the size and color of the toolbar at the top. History, commands, etc. as well as the Date/TimeStamp as to be less prominent.
If you could just tell me where to find these settings I can go from there.
Thanks
Like arebias, I would like to change look & layout.
Can anyone help us ?
Best regards,
JW
How can i have this in the catogary ??
My host just installed php 5 now shoutbox history returns
QuoteShout Box History
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 7100080 bytes) in /home/cadcamco/public_html/horide/yshout/class.tail.php on line 228
Any ideas as I can't seem to search this thread.
TIA
Delete the history.home.txt from yshout/chats and start a new history.
Quote from: Bulakbol on February 25, 2009, 10:45:36 PM
Delete the history.home.txt from yshout/chats and start a new history.
For whatever reason I couldn't delete the history from my chats, but I edited the settings.php file to read
$historyFormat='history1.%s.txt';
And that worked
The history file wasn't 7megs in size?? is this a limitation of the software ::)
Most hosts limit memory to 8 megs.
you can't. no1 ever put it there.
Hello,
Thanks for this great shoutbox.
I have one question.
Is it possible to have two forums and that one shoutbox works in both the forums.
I also have the member tables connected.
Please advise.
Stef.
I just installed this in a fresh copy of 1.1.8 and everything went well. I just had one question though, if anyone can steer me in the right direction. Is there somewhere I can increase the font size for the shouts themselves.....There so small it's kind of hard to see.
Thanks
Can anyone send me or is there attached smiley_SMF2.php file??? I can't find it anywhere, and I am using SMF 2.0RC1. Standard smileys are working, but custom won't work with this version of smiley.php file that I am using.
Thank you
Quote from: Cobra97 on February 26, 2009, 07:16:54 PM
I just installed this in a fresh copy of 1.1.8 and everything went well. I just had one question though, if anyone can steer me in the right direction. Is there somewhere I can increase the font size for the shouts themselves.....There so small it's kind of hard to see.
You can increase font size by going to index.template.php and finding in first code:
#yshout {
font-size: 13px;
I changed to 13 but you can change to any size U want.
Can you help to add a line around my shoutbox? Like a rectangle? I can't do it.
Quote from: picos on February 25, 2009, 05:25:34 AM
I'm trying to get this working with smf 2 rc1. I worked fine in the beta 4 but now it's erroring and doesn't install due to failed tests.
Where the shoutbox is meant to be it has this error
Fatal error: Call to undefined function allowedto() in /home/errclan/public_html/forum/yshout/yshout.php on line 69
Same here.
I'm sure this is something simple and I'm just missing it. The shoutbox works great and the scrollbar works pretty good, but I have this retarded problem.
When you only show 12 shouts on the page and the scrollbar is set at 20, then obviously it's fail.
How can I increase the number of visible shouts to say... 50? That way the scrollbar can scrollback and it make sense.
Figured it out, it was in settings.php
I having a problem with mine, no error install went fine, everything appears to be working except the text and bg color are the same (black) need to highlight text to see it.
see image:
(http://i41.tinypic.com/71mia0.jpg)
im pretty sure this is a CSS error, but ive tried a few edits and nothing changed for me
Quote from: johncccccc on February 27, 2009, 08:08:54 PM
I having a problem with mine, no error install went fine, everything appears to be working except the text and bg color are the same (black) need to highlight text to see it.
see image:
(http://i41.tinypic.com/71mia0.jpg)
im pretty sure this is a CSS error, but ive tried a few edits and nothing changed for me
I'm still a noob here, but try searching for this line in your css template:
/* use dark grey for the text, leaving black for headers etc */
Then change the hex code under that line to whatever text color you want.
Im looking to change the background to gray though, to match the BG of the forum i can mess with the text later, any ideas on that?
I have certainly asked this once before and feel a little embarrased but can't find any reference to it. I have upgraded my version to 1.22 Adv shoutbox and lost my previous modifications, particulary an addition I made, with your help, to make the two line shouts into one line.
Any chance you may help me once again in fixing this.
Thank you
(sorry my bad eng lang, my natural lang is other)
I'm incorporated chat in my forum (diggfm.org - sorry, no english here) and make minor quick adjustments to suit my needs.
You can include them to update in next version.
yshot.php ver 1.22
Function to automaticaly clean chat history
$maxHistoryLines contains num of lines in history file, after reaching that it simply not grow.
Quotefunction truncateChat($maxLines,$chatPath,$historyPath,$maxHistoryLines) {
$fileContents = '';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$lines = explode("\n", $fileContents);
if(count($lines) > $maxLines)
{
$newText = substr($fileContents, strpos($fileContents, "\n") + 1);
$handle = fopen($chatPath, "w");
fputs($handle, $newText);
fclose($handle);
if($historyPath !== '')
{
if(file_exists($historyPath)) $fileContentsHist = file_get_contents($historyPath);
$lines = explode("\n", $fileContentsHist);
// History
if(count($lines) > $maxHistoryLines)
{
unset($lines[0]);
$oldText=implode("\n",$lines);
$handle = fopen($historyPath, "w");
fputs($handle, $oldText);
fclose($handle);
}
$oldText = substr($fileContents, 0, strpos($fileContents, "\n") + 1);
$handle = fopen($historyPath, "a");
fputs($handle, $oldText);
fclose($handle);
}
}
}
function
initShoutbox($user,$fromSMF)(modification to this function required for russian lang compatibility)
without update it writes history in pseudocode and also incorrectly counts symbols in chat line:
Quote...........
case "shout":
if(isPostBanned()) break;
if(!$user['can_sbpost']) break;
if(!isMod() && $sbMaintenance!==false) break;
$shoutText = $_POST["shout"];
$shoutText=html_entity_decode($shoutText,ENT_COMPAT,'cp1251');
if($shoutText[0]=='/' && $allowCommands)
{
if(isMod())
{
...........
Hey I set the permissions for a certain member group to not be able to post in shout box but they still can post in the shoutbox, any ideas?
I apologize for not responding for the last two weeks.
It seems I somehow managed to un-notify the thread, and because I'm kind of lazy (:P) I didn't come back to check for replies manually.
Since over 80 replies have been made since I last replied, I ask that any unanswered questions be asked again.
Again, sorry for the trouble.
OK, let me try replying to a few of these...
@Rafferty: Edit settings.php and remove the <br /> from preg_timeformat
@serafimus: Does the character problem happen in UTF8, or only in CP1251? I can't reproduce the problem in UTF8 mode.
nneonneo, I'm trying to get this working with smf 2 rc1. I worked fine in the beta 4 but now it's erroring and doesn't install due to failed tests.
Where the shoutbox is meant to be it has this error
Fatal error: Call to undefined function allowedto() in /home/errclan/public_html/forum/yshout/yshout.php on line 69
Quote from: nneonneo on March 01, 2009, 12:15:56 AM
OK, let me try replying to a few of these...
@Rafferty: Edit settings.php and remove the <br /> from preg_timeformat
@serafimus: Does the character problem happen in UTF8, or only in CP1251? I can't reproduce the problem in UTF8 mode.
Thank you very much, works fine.
I'm sorry for asking a question again. I have a problem with Smiley tool bar. :) I have smiley.php and use SMF 2 RC1. Can anyone attach, or send me smiley_SMF2.php so I can have custom smilies???
@bramar: attached here: http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091
@picos: It seems that problem is becoming more common. I still cannot track down the source. What other mods do you have installed?
I uninstalled all the other mods and I even tried a fresh install of smf 2rc1. The same issue appears... have you managed to get the shoutbox working with SMF rc1 at all?
Thanks!
Yes, on my personal test server, it works fine...
Does it work on /yshout/index.php? Does it show "nothing to do" on yshout/yshout.php?
Quote from: nneonneo on March 01, 2009, 12:15:56 AM
@serafimus: Does the character problem happen in UTF8, or only in CP1251? I can't reproduce the problem in UTF8 mode.
CP1251
(i'm not tested in UTF8, because dont use it on forum... but, yes, it should work fine without corrections in UTF8)
hey i put my shout box on a page of its own but it keep on saying shoutbox loading and nothing else... http://dakaration.com/chatroom.html
@juniorj23: Did you follow the example given on yshout/index.php? It looks as if there is only the <div id="yshout"> part, without any of the JavaScript...
I don't know what happened, but all of a sudden, I get this error:
Warning: include_once(yshout/yshout.php)failed to open stream: No such file or directory in /
home/.sites/143/site2/web/forum/index.php on line
42Warning: include_once(): Failed opening 'yshout/yshout.php' for inclusion (include_path='.:/php/includes:/home/solarspeed/php/share/pear') in
home/.sites/143/site2/web/forum/index.php on line
42 AND THEN... I try to uninstall it and get this error:
2.[/t] Execute Modification ./Themes/default/index.template.php Test failed 3.[/t] Execute Modification ./Themes/default/index.template.php Test failed I have attached both my index.php and index.template.php. Can someone please help me and look at them and tell what I did wrong? I am new to manually changing things and don't want to mess things up. Thanks a million. VR[/hr] |
|
Can you check to make sure the yshout/ directory is still there? If not, upload it again from the package's zip file.
here's a screenshot of what I have:
Why is yshout.php renamed to yshout2.php? Also, which version of the shoutbox (AdvSB or SB, plus version number) are you using?
Ooops, forgot to change that back to yshout.php.
My original error message is this:
Warning: fopen(yshout/chats/home.txt)failed to open stream: Permission denied in /home/.sites/143/site2/web/forum/yshout/yshout.php on line 684
File error (writeLine); aborted
Then I was trying to figure it out. File yshout.php attached
Hi
I wonder if anyone will know why this is happening.
I managed to get the shoutbox to work in Firefox from a simpleportal block. However, when I view the same page in IE the block is there but the shoutbox stuff isn't. The block height is at a minimum. I was wondering if there is a way to force the block height in php to reveal the shout box.
The code that works in the block is this.
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
I also removed this code from the indextemplate.php
Here is the page that I have the shoutbox:
www.HopeCentreBurundi.com
Thanks for any advise ?
nneonneo could you be so kind and check this problem
Forum (http://www.hspsibinj.com/index.php?option=com_smf&Itemid=35&)
shoutbox is after few seconds gone, and it looks like it refreshes itself invisible.
it shows up itself but problem is in that that disappears. i don't want that to happen.
any way to stop it?
Is possible to add some button like "BOLD" "UNDErline" "change colour" ecc...?
@ameo: I get the error "Error: No settings" on http://www.hspsibinj.com/index.php?option=com_smf&Itemid=35&yshout. Can you check the settings.php file and make sure the paths are right?
@victoryrock: To fix that, you should chmod the chats folder and the .txt files within it to 755, 777, 644 or 666 depending on what works (the correct setting varies from host to host).
@Groundhog: It works for me in IE 8 (using compatibility mode to force it to behave as IE 7). Does it occur if you logout?
@allymcbeal: It should be possible, based on the smiley script, but so far nobody has done it :(
Quote from: nneonneo on March 03, 2009, 07:43:50 AM
It works for me in IE 8 (using compatibility mode to force it to behave as IE 7). Does it occur if you logout?
Interesting, I didn't think to log out of IE, However, I had misunderstood what my problem was. ::) It's me that is the problem. :-[
I was logged in on FF as Admin and logged in on IE as a regular user. Logging out as you suggested brought the IE (Guest) shoutbox back. I had wrongly assumed that admin & regular members permissions would allow them to see the shoutbox. So it was nothing to do with IE.
My fault entirely. I found the relevant Permission settings for regular members and all is OK now.
Thanks for taking the time to answer quickly and for a providing great mod that works... 8)
Thanks for the fix nneonneo. Just don't know how it changed premissions all by itself. I didn't change anything.
Thanks Again!
Quote from: nneonneo on March 03, 2009, 07:43:50 AM
@victoryrock: To fix that, you should chmod the chats folder and the .txt files within it to 755, 777, 644 or 666 depending on what works (the correct setting varies from host to host).
@ nneonneo:
well, shoutbox is located under forum/yshout/
then comes the settings file.
You can check it yourself, I attached it here, but that only shows on second code,
[no settings message]. I'm not sure how's upon your installation but I always get that error.
It doesn't concern me to much, but, as I said, issue is in refreshing shoutbox. It hides to refresh itself. I find that very weird because I did several installations for myself and others
and never had that kind of issue.
Hello,
I have a question.
Is it possible to make something like this:
// Logging folder for the chats
$chatsDir='home/name/domains/domain.com/public_html/smf/chats';
I have forum1 and forum2.
I like it when i shout in forum1 that i can see it in forum2.
Also when i shout in forum2 that i can see it in forum1.
Is this possible.
Thanks,
Stef.
@ameo: You turned off $gzipCompression, right?
@Normally: Yep, change this line in yshout.php:
$chatsFullDir=$yshoutdir.$chatsDir.'/';
and replace by
$chatsFullDir='/home/name/domains/domain.com/public_html/smf/chats/';
or whatever absolute path you want.
well it writes $gzipCompression=false;
i didn't touch a single thing. should I?
Oh yes, it was in your settings file...I should not have asked that silly question :P
It seems that occasionally, readChat stops working; I've never seen that before. Can you try putting error_reporting(E_ALL); near the top of yshout.php, and seeing if any warnings/errors show up?
Quote from: nneonneo on March 03, 2009, 07:56:55 PM
@Normally: Yep, change this line in yshout.php:
$chatsFullDir=$yshoutdir.$chatsDir.'/';
and replace by
$chatsFullDir='/home/name/domains/domain.com/public_html/smf/chats/';
or whatever absolute path you want.
I replaced this code, but nothing changed.
Do i have to change some more code?
Stef.
Hi all,
I just installed AdvSB_1.22 on a fresh 1.1.8. I'm trying to figure our how to make the sound work, I thought it said it was built in to this version? What am I missing here, I don't see anyway to turn the sound on.........
Thanks in advance for the help
I Marking one Custom Advanced Shoutbox.
This contain:
- Scrollbar
- Admin panel settings.
- And new style (.CSS).
based in nneonneos Shoutbox.
Quote from: Arebias on February 24, 2009, 09:02:30 AM
I also have similar questions regarding changing the look/layout.
Below is a picture of the shoutbox in action. Here is what I am wanting to do:
A.) Change the color of the scroll bar to blend better with the forum color or eliminate all together yet leaving it's functionality. i.e.; Scroll with mouse scroll wheel.
B.) Change the size and color of the toolbar at the top. History, commands, etc. as well as the Date/TimeStamp as to be less prominent.
If you could just tell me where to find these settings I can go from there.
Thanks
I will bump this back up to top
@Arebias: take a look at the CSS block in index.template.php or yshout.css. All the necessary appearance changes can be made there.
@Normally: It is working for me. Perhaps you can try a relative path from $yshoutdir, e.g.
$chatsFullDir=$yshoutdir.'../../chats/';
@Cobra97: Does the mute/unmute button work?
@_System32_: What are you asking? If you want to have permission to alter the shoutbox and rerelease it, I ask only that you credit me and yurivish, and that you give me a copy or link to the final release.
Quote from: nneonneo on March 04, 2009, 06:52:56 PM
@Cobra97: Does the mute/unmute button work?
Yes, I can see the little red sign appear on it when I hit mute, then disappear when I hit it again...so I'm guessing that means it's working?
Never mind, I got it...............The mute button is reversed from what I would normally see. When you see the mute sign, it's not muted.
Hello nneonneo,
This works now:
$chatsFullDir='/home/name/domains/domain.com/public_html/smf/[b]yshout[/b]/chats/';
I was forgotten to put in the line of code "yshout/.
But now i can`t post in forum2.
Only post in forum1.
All two shoutboxes i can read.
Do you have any solution for it.
Stef.
update 10-03-2009:
In firebug i get this message:
request is undefined
unloadChat()
[Break on this error] request.abort(); yshout.j...uly062008 (regel 85)
and
POST http://www.kaartenleggen.nl/zigeunerkaarten/index.php?yshout
http://www.kaartenleggen.nl/zigeunerkaarten/index.php?yshout
POST http://www.kaartenleggen.nl/zigeunerkaarten/index.php?yshout
http://www.kaartenleggen.nl/zigeunerkaarten/index.php?yshout
500 Internal Server Error 233ms moo.ajax.js (regel 41)
Hi guys
I'm currently getting an error when I place the code to insert my shoutbox where I want it:
Notice: Undefined index: yshout_shoutbox in /home/excell/domains/the-excellent.info/public_html/Sources/Load.php(1732) : eval()'d code on line 571
Any ideas?
Quote from: lorddusk on February 09, 2009, 07:54:39 AM
Since i installed the Shoutbox on RC1 the admin links del/ban stopped working, please help, because my forummembers are a bit spamming.....
got the ban tool working after some tweaking, still havnt fixed the delete one
hello all,
I have a probleme:
Fatal error: Call to undefined function allowedTo() in /home/zeus/www/smf/yshout/yshout.php on line 69
==>line 69:
if(!allowedTo('yshout_view'))
plz help me for this probleme,
@Normally: What happens if you try to shout?
@cdch: You can just replace $txt['yshout_shoutbox'] by "Shout Box" (with quotes).
@lemaitrezeus: What modifications are you running, and what version of SMF?
smf 1.1.8 version
manuel of nneonneo's shoutbox in smf mod
i m a noob and it s my first forum smf
I've tried installing this on 2.0rc1... both on an updated forum and a forum installed clean. The shout box works for administrators but not for other users.
has anyone else come across this?
Quote from: gothicfires on March 07, 2009, 08:28:42 PM
I've tried installing this on 2.0rc1... both on an updated forum and a forum installed clean. The shout box works for administrators but not for other users.
has anyone else come across this?
You have to change the permissions. You do this just like you would modify membergroup permissions.
hey guys, i read about 30 pages back since the search function hasn't given me anything relevant.
i have the latest version installed (simple, not advanced). it installs perfectly. the shoutbox shows up, everything looks good.
but the moment i try to post a shout, nothing happens. it's as if the post button is dead. everyone on my forums experiences the same thing.
the permissions are set. relevant files are chmodded to 755. am i missing something?
@dystemper
Quoteit's as if the post button is dead.
That's like the problem I had. Are you sure that you have set the user permissions for
all the relevant groups that will need to shout? It's worth checking again.
Quote from: Groundhog on March 07, 2009, 11:29:39 PM
@dystemper Quoteit's as if the post button is dead.
That's like the problem I had. Are you sure that you have set the user permissions for all the relevant groups that will need to shout? It's worth checking again.
yessir, i even set it so guests can view and post in the shoutbox. i tried it in firefox, ie, and chrome, and still no go. i'm thinking there's a conflict somewhere.
also, changed to the default theme, and the post button still doesn't work.
i'll be clear: i get absolutely ZERO errors on the install. the shoutbox looks normal, nobody can post unfortunately.
the link to my forums if anyone wants to take a look: http://ls.vexed.ca/index.php
edit: i just did a manual install, by hand... same issue. everything looks good until i go to post. permissions are definitely functioning correctly because the shoutbox gets locked when somebody does not have permission to post (but has permission to view).
any known conflicts with other plugins?
******************FIXED*************************
after going through code line by line, manually installing and uninstalling the simple and advanced versions of the plugins, i decided to unload all plugins on my board to find out if there's a conflict.
i found the conflicting plugin: jQLightbox (http://custom.simplemachines.org/mods/index.php?mod=1605)
in case you have the same issue as me -- permissions all set, installation seems error-free, and a functional looking shoutbox, but when you go to post, nothing happens -- make sure jQLightbox (version 0.3) is not installed.
I have problem with separators. I have changed display mode to reverse and I have somethink like this on picture. What I need to change to have separators like in normal mode?
@biohrd: add something like
#yshout hr {
display: none;
}
to the CSS block.
Quote from: nneonneo on March 07, 2009, 08:36:16 AM
@Normally: What happens if you try to shout?
Nothing happens.
In Forum1 all works.
In Forum2 i see all, but when i want to shout, can type, send, and than nothing happens.
Thanks for all the help.
Stef.
Quote from: nneonneo on March 09, 2009, 11:21:17 AM
@biohrd: add something like
#yshout hr {
display: none;
}
to the CSS block.
I don't want totally disappear this bar. I only want order like in normal mode.
how do you change it to where anyone can use the chat box and is there an SSI for this chat box to use it outside of the forums?
Quote from: SkyLineR34 on March 10, 2009, 12:43:01 PM
how do you change it to where anyone can use the chat box and is there an SSI for this chat box to use it outside of the forums?
see
permissions in admin panel. each member group has permissions, whether to only see shoutbox. see and post, see post and moderate. set this for every group at your will and enjoy.
This shoutbox is made for forum purposes only. You can only set it in special forum page, for example, and for that you can use Custom Actions mod.
SMF 1.1.8
SB 1.22
SB 'times out' after a certain amount of time; can't tell exactly what it is, but it's in few minutes, and will not refresh. Using the "instant-on" shoutbox code in a theme from Bloc called Azure.
Did the manual install option. I tried using the original 1.16 behavior code, but the SB never loads
when I do. Users have to refresh the entire forum to see changes in SB.
I have the $updateTimeout set at 0, and refreshTime set at 250ms.
Thanks.
Hi,
How can I put an initial message in shout ?
Best regards,
JW
how can i get the smiley bar to work using tp and a php box any help be appreciated thxs
This is guide for dummies on how to make shoutbox normally display as the part of the forum:
Start with installation normally, but do not add second code.
Second code is this, and should be included in BoardIndex.template of the theme!!!
Put this:
// YSHOUT HERE - shoutbox code
echo '
<table border="0" width="100%" class="tborder" cellspacing="' , ($context['browser']['is_ie'] || $context['browser']['is_opera6']) ? '1' : '0' , '" cellpadding="4" style="margin-bottom: 2ex;">
<tr>
<td class="catbg" style="padding: 5px; vertical-align: middle; text-align: left; ">', $txt['yshout_shoutbox'],'     </td>
</tr>
<tr>
<td valign="middle" align="left">
<div id="yshout">Loading...</div>';
just before this:
// Show the news fader? (assuming there are things to show...)
And if you want border around your shoutbox, all you need to do is to go into style.css
and find .tborder see whats written under that - usually it's
border: 1px solid #000; <- where #000 is black color, and copy-paste to index.template.php
where #yshout is, and you're ready to go.
p.s. This however might not work in some themes, which have different way of positioning shoutbox, but in most of themes that will work, and you'll finally have shoutbox styled as the rest of your forum. :)
:D YAY for my 300.th post :D
SMF 1.1.8
AdvSB_1.22
hello.
I would like user online in the Shoutbox
http://www.thaiadmin.org/board/index.php?action=chat
(http://img116.imageshack.us/img116/2238/boxx02.jpg)
thank you.
i tried that and it doesnt work when i press shout on shout box it redirects me 2 home page this has got me beat , all i want is the smilies bar (sighs)
Quote from: ccvortex on March 10, 2009, 08:09:52 PM
SMF 1.1.8
SB 1.22
SB 'times out' after a certain amount of time; can't tell exactly what it is, but it's in few minutes, and will not refresh. Using the "instant-on" shoutbox code in a theme from Bloc called Azure.
Did the manual install option. I tried using the original 1.16 behavior code, but the SB never loads
when I do. Users have to refresh the entire forum to see changes in SB.
I have the $updateTimeout set at 0, and refreshTime set at 250ms.
Thanks.
Anyone?
@Normally: Do you mind if I just take a look? I'll need the forum address.
@biohrd: OK, it's a slight bug in the current version.
In yshout.php, change
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
return $chatText;
}
to
$chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);
return trim($chatText);
}
@SkyLineR34: Another possible solution for SSI is suggested by the yshout/index.php file.
@ccvortex: How long does it take before updates cease? It's possible that a failed update can cause the shoutbox to stop working. You can try this fix:
In moo.ajax.js, change
if (this.transport.readyState == 4 && this.transport.status == 200) {
to
if (this.transport.readyState == 4) {// && this.transport.status == 200) {
Let me know if this fix works.
@JackWise: Can you clarify? What do you mean by an initial message?
@UkGangsta: Try this code (complete set):
echo '
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div><div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
in the TP block; you also have to add the script link
<script src="',$boardurl,'/mymod/animatedcollapse.js" type="text/javascript"></script>
somewhere in the <head> of index.template.php.
@ameo: Nice guide. I was wondering if the tags <table> <tr> etc. should be closed or not?
@live.mk: It's possible, but it will not be too accurate since users can sign on and off at any time.
I think the idea is like this: you add an entry to _banlist.php (using this file because it is a dynamic data file) which stores the users online and the last time they did anything. Then, whenever yshout.php is called, you can append or update the user's timestamp, and when the refresh happens, you can tack on this information (removing users who last updated more than X minutes ago and are considered inactive).
Sorry I can't give you any specific code right now; if you know PHP I hope this is enough to make it work.
hey i am using verison1.22 advance shoutbox i want the shoutbox to appear inside a box and want the backgrounf color of the box to be black
hers how it looks like now.....
http://i40.tinypic.com/wbw7io.jpg
i hope you got what i mean :D...please help
Quote from: nneonneo on March 13, 2009, 11:38:11 PM
@Normally: Do you mind if I just take a look? I'll need the forum address.
http://www.kaartenleggen.nl/zigeunerkaarten
and
http://www.kaartenleggen.nl/lenormandkaarten
i pm testaccount.
Thanks
Quote from: nneonneo on March 13, 2009, 11:38:11 PM
@ccvortex: How long does it take before updates cease? It's possible that a failed update can cause the shoutbox to stop working. You can try this fix:
In moo.ajax.js, change
if (this.transport.readyState == 4 && this.transport.status == 200) {
to
if (this.transport.readyState == 4) {// && this.transport.status == 200) {
Let me know if this fix works.
Looks like it's timing out after 2 or 3 minutes but I can't be sure because to see if it's timed out I need to refresh the forum which restets the 'timer'...
I'll try the js fix and re-post.
Thanks for the reply nneonneo, and I guess if all else fails I could go back to version 1.0.4 which was working fine with the exception of it's lack of color control.
@ nneonneo
Nope, that didn't work :(
Again though, I am using the "instant on" one because the other 1.1.6 one won't load.
Would you mind if I took a look?
Please do; should I PM you the info?
PM sent nneonneo.
OK, so I've been thinking about making another release which should fix a few long-standing bugs (among them: most of the collisions with other mods).
But there's one bug I really want to fix: the "allowedTo" bug (anyone who's experienced it should know what I mean). The problem is, I've never been able to reproduce the bug myself, so I'm asking anyone who's experienced it: if you fixed it, how it was fixed, and if it isn't fixed, if I can take a look at the forum to determine the cause. Hopefully, this can be resolved, since it's one of the few things I have never been able to resolve satisfactorily.
Thanks!
nneonneo is a pimp; fixed my SB in no time. Thanks nneonneo! :)
Also, I saw a post that had code to put a border around the SB, but it didn't work for me; I think it was adding a .tdborder or something.
Here's a way I know it works: in your index.template.php find the first block of yshout css--it should look like this:
#yshout {
font-size: 10px;
overflow: hidden;
}
All you need to do is add these one or two lines to it:
border: 4px solid #6d6d6d;
border-style: double;
So the whole thing would be:
#yshout {
font-size: 10px;
overflow: hidden;
border: 4px solid #6d6d6d;
border-style: double;
}
Change the color and border style to whatever you want.
@ccvortex thnx for the code it worked well but i not wanted to add a boder but also change the background color of shout box :(..can this be done?
There is no background color, but let me see if I can find a way to create one.
OK, just add this to the same block of css that has the border code:
background-color: #ffffff;
Change the ffffff to whatever color you want.
thnx man tht worked :D
No problem.
Here's some CSS basics for nneonnoe's Shout Box:
index.template.php
Find:
#yshout {
font-size: 10px;
overflow: hidden;
}
and add the following between the brackets as you see fit:
To add a border use:
border: 4px solid #000000;
border-style: double;
you can change the 4px to whatever width you want, the #000000 to whatever color you want and you change the style(or just delete the line) to any of these:
http://www.w3schools.com/css/pr_border-style.asp
To add a background color, add this:
background-color: #ffffff;
change the fffff to whatever color you want.
To add a background image, add this:
background-image: url(link.to.your.file);
There are a plethora of background image properties you can use to control it.
See the list here:
http://www.w3schools.com/css/css_background.asp
If you want to get really fancy you can add transparencies to the background (or foreground!) of the shout box by reading up on this:
http://www.w3schools.com/Css/css_image_transparency.asp
It works really well in FireFox and *might* work in IE (shocker, I know, something not working right in IE?!?!)
If you can think of any other way you would like to mod the css let me know and I'll see if I can help :)
I have installed the shoutbox but noting happens on my forum. I have 2.0 rc 1 installed. Please help it is not visible on my forum. I have did this.
// YSHOUT HERE - shoutbox code
echo '
<table border="0" width="100%" class="tborder" cellspacing="' , ($context['browser']['is_ie'] || $context['browser']['is_opera6']) ? '1' : '0' , '" cellpadding="4" style="margin-bottom: 2ex;">
<tr>
<td class="catbg" style="padding: 5px; vertical-align: middle; text-align: left; ">', $txt['yshout_shoutbox'],'     </td>
</tr>
<tr>
<td valign="middle" align="left">
<div id="yshout">Loading...</div>';
But now all i see is loading....
www.basenjill.nl/forum
greetz reeldragon
First off, thanks for this. It's awesome. I have it installed and running as best as I can.
Two things I'd like and can't figure out.
The scroll bar and making it a collapsable box. I'm using Girlyman and Default Multicolor themes. I've attached a screenshot of what I've got so far. It's the GM theme but Default looks the same.
Any help?
Oh also, the sound only works on my core theme..any ideas?
edit: I've finally figured out the scrollbar. Still need help on the box and the sound. Although the sound doesn't bother me that much.
Still have no luck on the box. :-[ Anyone? I think I've read about 200 pages and nothing i have tried has worked.
I have a major problem guys
For some reason ( I don't know when it happened) the history has stopped working !
When I click History, all I get is blank page ! just empty white page !!
Can someone please tell me how I can fix this ?
Thank You.
I have the upshrink working on mine and all I can do to help is post where I put the code to make it work. Maybe it will help you.
The First section:
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", ', empty($options['collapse_header']) ? 'false' : 'true', ');
mainHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
mainHeader.setOptions("collapse_header", "', $context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>';
// script for shoutbox upshrink
echo '<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the shoutbox header object.
var sbHeader = new smfToggle("upshrinkSB", ', empty($options['collapse_shoutbox']) ? 'false' : 'true', ');
sbHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
sbHeader.setOptions("collapse_shoutbox", "', $context['session_id'], '");
sbHeader.addToggleImage("upshrinkSB", "/upshrink.gif", "/upshrink2.gif");
sbHeader.addTogglePanel("upshrinkSBHeader");
function sbToggle() { sbHeader.toggle(); }
// ]]></script>';
echo '
</head>
<body>';
//Display ads on the top of the page
if (function_exists("show_topofpageAds"))
{
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
The second section (end of code):
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $custom_td = '')
{
global $settings, $context, $txt, $scripturl;
// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a href="' . $value['url'] . '"' . (isset($value['active']) ? ' class="active"' : '') . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '><span>' . $txt[$value['text']] . '</span></a>';
if (empty($buttons))
return '';
// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>', '<span class="last">', $buttons[count($buttons) - 1]);
echo '
<div class="buttonlist', $direction != 'top' ? '_bottom' : '', '">
<ul class="clearfix">
<li>', implode('</li><li>', $buttons), '</li>
</ul>
</div>';
}
function shoutbox()
{
global $txt, $options, $settings, $context, $boarddir;
echo '<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;"><a href="#" onclick="sbToggle(); return false;"><img id="upshrinkSB" src="', $settings['images_url'], '/', empty($options['collapse_shoutbox']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="Shrink or Expand the ShoutBox" align="bottom" /></a> ';
// Block Title
echo '<span style="width:49%"></span><span>ShoutBox</span>';
echo '</div><div id="upshrinkSBHeader"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
</tr>
</table></div>';
}
?>
Quote from: Arebias on March 16, 2009, 12:46:29 PM
I have the upshrink working on mine and all I can do to help is post where I put the code to make it work. Maybe it will help you.
Thank for trying. No luck with it. I tried quite a few combinations and no dice. I'm gonna attach my index.template if anyone wants to take a look.
*begging* O:)
Quote from: lorddusk on March 06, 2009, 05:43:26 PM
Quote from: lorddusk on February 09, 2009, 07:54:39 AM
Since i installed the Shoutbox on RC1 the admin links del/ban stopped working, please help, because my forummembers are a bit spamming.....
got the ban tool working after some tweaking, still havnt fixed the delete one
Edit to that, they both stopped working now.....
We only have Simple Portal installed + The Shoutbox Adv v.22
(http://i39.tinypic.com/347wxnk.png)
thats what i get when clicking on DEL
Quote from: lorddusk on March 17, 2009, 11:04:30 AM
Quote from: lorddusk on March 06, 2009, 05:43:26 PM
Quote from: lorddusk on February 09, 2009, 07:54:39 AM
Since i installed the Shoutbox on RC1 the admin links del/ban stopped working, please help, because my forummembers are a bit spamming.....
got the ban tool working after some tweaking, still havnt fixed the delete one
Edit to that, they both stopped working now.....
We only have Simple Portal installed + The Shoutbox Adv v.22
(http://i39.tinypic.com/347wxnk.png)
thats what i get when clicking on DEL
bump....
its important!
Hi.
This mod has been installed since my forum opended 5months ago, today i experianced a template phrase in cache i managed to fix this by adding ?> to the end of file i edited witch was a modifications.english in cache directory.
Since ive fixed this iam now getting a error in shout box at top but everythings still working fine just the errors showing at top
Notice: Undefined index: pm_register_body_desc in /home/reptiles/public_html/Sources/Load.php(1962) : eval()'d code on line 1353
[History] [Commands] [ExtendedHistory] [HideAdminLinks] [ReturnToShoutbox]
Ive attachted a screen shot of my shoutbox. Iam also using 2.0 Beta 4.
I hope someone can help me out, Thanks in advance.
Hi there !
I also have a problem belong the shoutbox in a box within Simple portal.
As described from Nintendofanthr33 I disabled it in the index.template.php and put the code given in a php block.
As admin it works perfect, as user there is no content of the box, also tried as different user. As guest it correctly shows the text "Please log on .."
You can llok at www.c23.at to take a look. You will se the guest text, registered member see nothing within this box.
@ c23_Mike: did you look into your permissions for each member group - because since version 1.20 this shoutbox has option in permissions that allow various user groups to see it, post in it, and modify. Admin Panel - Permissions. See options for shoutbox in Guests, Members, and Super Moderators.
just one note
People, you have to be sure upon shoutbox installation that everything is all right with normal installation,
and that goes for shoutbox first displaying in default theme [core], and that everyone can see your shoutbox
- that means setting permissions for everyone, and then if something's wrong, or you want something modified
you should [step1] read first post [step2] search this thread [3]post a reply if you didn't find answer to your question
by following steps 1 & 2.
Quote from: 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
hhhmmm.. interesting.. do you mind sharing the ways solving the issues..??
because i have the same now..
the text color is yellow in FF (after i changed the index.template.php), but the color doesn't change in IE.
anyway, thanks a lot for the shoutbox.
really great job..
Hi there !
@ameo: Thanks that was the right hint! :P shame about me, that was just a rtfm thing. Maybe describe these ptions on the mod side. I would never have looked there!
And this thread is maybe full of information, but over 200 sites is annoying to read :-\
Quote from: Old Lynx on March 16, 2009, 08:36:35 AM
I have a major problem guys
For some reason ( I don't know when it happened) the history has stopped working !
When I click History, all I get is blank page ! just empty white page !!
I would
greatly appreciate any help ...someone .. anyone !!! :(
If anyone is interested I've done the coding for a collapsible news fader for 1.1.8 with the shoutbox inside it and customised css for the Blue Ace theme.
http://www.simplemachines.org/community/index.php?topic=299608.msg1984510#msg1984510
Quote from: Antechinus on March 21, 2009, 01:29:16 AM
If anyone is interested I've done the coding for a collapsible news fader for 1.1.8 with the shoutbox inside it and customised css for the Blue Ace theme.
http://www.simplemachines.org/community/index.php?topic=299608.msg1984510#msg1984510
That's really swell Antechinus. So nice of you. Thank you.
I have a huge problem...
I installed the advanced shoutbox on my forums and It wasn't showing up, so I uninstalled it.
Upon uninstallation, I clicked "home" on my forums, and all of a sudden EVERYTHING doesn't work.
I get this:
500 Internal Server Error
Internal 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.
Apache/1.3.41 Server at speedscapers.com Port 80
I cannot access my error logs because NOTHING on my forum works. Every page is the same 500 internal server error
Very quick and probably stupid question - do Admins and global mods have the ability to delete shouts?
I'm pretty sure you could enable that.
Hi.
This mod has been installed since my forum opended 5months ago, today i experianced a template phrase in cache i managed to fix this by adding ?> to the end of file i edited witch was a modifications.english in cache directory.
Since ive fixed this iam now getting a error in shout box at top but everythings still working fine just the errors showing at top
Notice: Undefined index: pm_register_body_desc in /home/reptiles/public_html/Sources/Load.php(1962) : eval()'d code on line 1353
[History] [Commands] [ExtendedHistory] [HideAdminLinks] [ReturnToShoutbox]
Ive attachted a screen shot of my shoutbox. Iam also using 2.0 Beta 4.
I hope someone can help me out, Thanks in advance.
@reeldragon: Have you added the <head> code?
@kyinhi: Does this link (http://www.simplemachines.org/community/index.php?topic=137508.msg1984516#msg1984516) help?
@meehan09: Put $txt['pm_register_body_desc']=''; somewhere in Modifications.english.php.
@Old Lynx: What's the URL for the history page? Any errors in forum error log?
@impennetrate: What about the server error logs? Try chmod'ding the index.php file to 755/644/777 or whatever the default is on your host.
@Vampy: Admins do, by default, but global mods do not. This is easy to change: give the global mods the "Moderate shoutbox" permission and they will be able to ban and delete.
Hi there !
Other question: Is it possible to reorder the sort? So that new Items are always on top, and older items are down? Like the sort order possible in smf?
aww guys i think i made a mistake..
i get this error:
Fatal error: Call to undefined function shoutbox() in /home/**/public_html/**/Sources/Load.php(1991) : eval()'d code on line 404
I can't access admin because of that stupid error so i can't uninstall the mod..
I tried to use error_reporting(0); but with no luck either..
Even if i remove access to the mod via the db i can still get the msg, so i dunno how to solve this, please help me :(
@c23_Mike: $reverseShouts in yshout/settings.php
@Claud: Go to index.template.php and remove the call to shoutbox().
Hi there !
Wonderful! You already have thought about that! Just one entry to change ;-) I love it every day more!
Just my scrolling is now wrong, but I will fix that.
Quote from: nneonneo on March 22, 2009, 07:12:33 PM
@c23_Mike: $reverseShouts in yshout/settings.php
@Claud: Go to index.template.php and remove the call to shoutbox().
Sorry, it didnt work.. i tried to reverse all changes, and manually check the file.. aswell as the files:
/Sources/ManagePermissions.php
/Themes/default/languages/Modifications.english.php
index.php
If you got any other ideas, please tell me :(
I even tried to replace the index.template.php with an original one which didnt work either..
EDIT::: Never mind, i changed the default skin (via phpmyadmin), and then i could uninstall the mod :)
from the time i have installed pretty urls the shout box(i am using neenones Advanced AJAX Shoutbox 1.22 ) is geeting closed after like 10-15 sec of the full page being load
take a look at this screeny you'll get what i mean.
http://img22.imageshack.us/img22/3582/dfsadasda.jpg
but i refresh or type the command /return normal sb comes back but it returns to position shown in the above pic :'( helppp
so is the problem with pretty urls ,shoutbox or my setings? and how do i solve this
Do one thing you keep the pretty urls only for boards not for action it will solve ;D
did tht too , its still the same
Quote from: nneonneo on March 22, 2009, 04:38:12 PM
@Vampy: Admins do, by default, but global mods do not. This is easy to change: give the global mods the "Moderate shoutbox" permission and they will be able to ban and delete.
Thanks for that nneonneo - right now I'm having an issue installing - I get an error message on index.template - I backed that file up and went ahead an installed it anyway just to see, only to get a fatal error message - so I had to replace index.template and uninstall - Luckily this was only on my test site. Once I've sussed out the problem (maybe a mod clash) I'll reinstall and change that setting
Thank you :D
Quote from: lorddusk on March 18, 2009, 10:36:53 AM
Quote from: lorddusk on March 17, 2009, 11:04:30 AM
Quote from: lorddusk on March 06, 2009, 05:43:26 PM
Quote from: lorddusk on February 09, 2009, 07:54:39 AM
Since i installed the Shoutbox on RC1 the admin links del/ban stopped working, please help, because my forummembers are a bit spamming.....
got the ban tool working after some tweaking, still havnt fixed the delete one
Edit to that, they both stopped working now.....
We only have Simple Portal installed + The Shoutbox Adv v.22
(http://i39.tinypic.com/347wxnk.png)
thats what i get when clicking on DEL
bump....
its important!
why do i keep being ignored
Ive added this code to Modifications.english.php has told
$txt['pm_register_body_desc']='';
Iam still getting this error at top of shout box ?, I hope you can help solve this error.
Thanks again nneonneo
Quote from: JackWise on March 11, 2009, 06:18:56 PM
Hi,
How can I put an initial message in shout ?
Best regards,
JW
Hi,
Any answer for my question ?
Several users think that de writable box is for search the forum.
I would like to put an initial message.
JW
Hi there !
Ok, maybe i am too stupid, or I am just not a programmer. As now the newest posts are always on top, the scrolling is wrong, because it always scrolls down. How can I turn that off. It must be something in the code here: http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
But what exactly to turn that scrolling off?
@lorddusk: Let me take a look. I'll need moderator permissions to test deletion (by PM please)
@meehan09: Did you put it after the <?php line?
@JackWise: I asked before -- what do you mean by an "initial message"? Is it some text which is visible in the box itself?
If so, it's actually a fairly easy change:
In yshout.php:
Add
class="shout-placeholder" onfocus="if(this.className == \'shout-placeholder\') this.className=\'\'; this.value=\'\';"
after
$inputShoutText=' <input id="shout-text"
And add after
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />';
echo '
',$inputShoutText,'value="
the text you want shown.
The placeholder can be styled using a block like this in CSS:
#yshout .shout-placeholder {
color: #666666;
}
When the user clicks in the box, the placeholder will vanish.
@c23_Mike: autoScroll in yshout/settings.js, if you are running AdvSB.
Quote from: nneonneo on March 23, 2009, 07:33:59 PM
@lorddusk: Let me take a look. I'll need moderator permissions to test deletion (by PM please)
@meehan09: Did you put it after the <?php line?
@JackWise: I asked before -- what do you mean by an "initial message"? Is it some text which is visible in the box itself?
If so, it's actually a fairly easy change:
In yshout.php:
Add
class="shout-placeholder" onfocus="if(this.className == \'shout-placeholder\') this.className=\'\'; this.value=\'\';"
after
$inputShoutText=' <input id="shout-text"
And add after
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />';
echo '
',$inputShoutText,'value="
the text you want shown.
The placeholder can be styled using a block like this in CSS:
#yshout .shout-placeholder {
color: #666666;
}
When the user clicks in the box, the placeholder will vanish.
@c23_Mike: autoScroll in yshout/settings.js, if you are running AdvSB.
nneonneo, I'm afraid to do the change, because my code is a little bit different.
When you say :
after
$inputShoutText=' <input id="shout-text"
I have :
$inputShoutText=' <input id="shout-text" name="shout_text" type="text" maxlength="'.$maxShoutChars.'" ';
And then you say to put the text I want , but I think the line of code is incomplete.
Can you help again please ?
JW
Actually, I meant exactly what I said. Both lines are incomplete because you should add the code inside the line, at exactly the point indicated, for it to work.
Quote from: MRDJ on March 23, 2009, 06:55:43 AM
from the time i have installed pretty urls the shout box(i am using neenones Advanced AJAX Shoutbox 1.22 ) is geeting closed after like 10-15 sec of the full page being load
take a look at this screeny you'll get what i mean.
http://img22.imageshack.us/img22/3582/dfsadasda.jpg
but i refresh or type the command /return normal sb comes back but it returns to position shown in the above pic :'( helppp
so is the problem with pretty urls ,shoutbox or my setings? and how do i solve this
bump
I'm using 2.0 RC1 and default theme.
Install is OK; but i can't shout, i have in shout box : Write error (writeLine); aborted
and in error log plenty of errors like this :
/index.php?action=admin;area=packages;sa=list;package=SB_1.22.zip
2: file_exists() [<a href='function.file-exists'>function.file-exists</a>]: Unable to access /yshout/chats/history.home.txt
File: /mnt/167/sda/5/3/mydomain/forum/Sources/Subs-Package.php
Line: 380
/index.php?action=admin;area=packages;sa=list;package=SB_1.22.zip
2: file_exists() [<a href='function.file-exists'>function.file-exists</a>]: Unable to access /yshout/chats/.htaccess
File: /mnt/167/sda/5/3/mydomain/forum/Sources/Subs-Package.php
Line: 380
/index.php?action=admin;area=packages;sa=list;package=SB_1.22.zip
2: file_exists() [<a href='function.file-exists'>function.file-exists</a>]: Unable to access /themes/install-2.0b4.xml
In subs-package.php line 380 I have:
// If this is a file, and it doesn't exist.... happy days!
if (substr($file_info['filename'], -1, 1) != '/' && !file_exists($destination . '/' . $file_info['filename']))
$write_this = true;
Quote from: MRDJ on March 23, 2009, 10:57:06 PM
Quote from: MRDJ on March 23, 2009, 06:55:43 AM
from the time i have installed pretty urls the shout box(i am using neenones Advanced AJAX Shoutbox 1.22 ) is geeting closed after like 10-15 sec of the full page being load
take a look at this screeny you'll get what i mean.
http://img22.imageshack.us/img22/3582/dfsadasda.jpg
but i refresh or type the command /return normal sb comes back but it returns to position shown in the above pic :'( helppp
so is the problem with pretty urls ,shoutbox or my setings? and how do i solve this
bump
tried solving it myself unisntalled adv sb and installed 1.22 normal one its still the same so please help ....my members are going crazy
Hi there!
Quote@c23_Mike: autoScroll in yshout/settings.js, if you are running AdvSB.
Doesn´t work, as far I tried already. I use the codes given from the mod site http://custom.simplemachines.org/mods/index.php?mod=585 and also from there the scrollbar http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
.
After posting or scrolling to top to the last message, some seconds later the scroll bar wents down.
@nneonneo
Ive tried adding ( $txt['pm_register_body_desc']=''; ) after <?php and at the end before ?>
And it still showing the error i attached has screen shot on earlyier post?... Do you know why this error is displaying and could you have a look into this for me?
Thanks in advance :)
@MRDJ: disable $gzipCompression (yshout/settings.php)
@c23_Mike: are you using AdvSB?
@gwalior: chmod yshout/chats and files in it to 777/755/644 or whatever the host uses
@meehan09: you can add error_reporting(0); to the top of yshout.php to disable the message.
Quote from: nneonneo on March 24, 2009, 11:51:21 AM
@gwalior: chmod yshout/chats and files in it to 777/755/644 or whatever the host uses
Chmod function in not allowed at my host (free.fr) but my FTP says files are 755
Try deleting the text files (after making a backup).
humm... don't understand, my server told me : my IP adress open too much connections...
Nous avons détécté que votre adresse IP ouvrait trop de connexions vers notre serveur web.
Nous vous rappelons que ces pratiques sont strictement inutile et n'ont pour unique conséquence de ralentir les serveurs.
Quote from: nneonneo on March 23, 2009, 07:33:59 PM
@lorddusk: Let me take a look. I'll need moderator permissions to test deletion (by PM please)
@meehan09: Did you put it after the <?php line?
@JackWise: I asked before -- what do you mean by an "initial message"? Is it some text which is visible in the box itself?
If so, it's actually a fairly easy change:
In yshout.php:
Add
class="shout-placeholder" onfocus="if(this.className == \'shout-placeholder\') this.className=\'\'; this.value=\'\';"
after
$inputShoutText=' <input id="shout-text"
And add after
echo '
',$inputForumName,'value="',$user['name'], '" disabled="disabled" />';
echo '
',$inputShoutText,'value="
the text you want shown.
The placeholder can be styled using a block like this in CSS:
#yshout .shout-placeholder {
color: #666666;
}
When the user clicks in the box, the placeholder will vanish.
@c23_Mike: autoScroll in yshout/settings.js, if you are running AdvSB.
Many thanks for your patience nneonneo.
It's already running.
JW
Hi there !
Yes the AdvSB I use ...
nneonneo gzip compression was alreday disabled so i enabled it and disabled it but its still the same :(
if i disabled pretty url's mod the shout box works normally but as soon as i enable it goes back to being getting minimized
Searched topic and didn't find solution. I just installed this manually on smf 1.1.8, pretty much fresh install with TP 1 beta 3.
the yshout dir in root has chmod 777 on all files folders...I get this error:
Warning: require_once(yshout/settings.php) [function.require-once]: failed to open stream: No such file or directory in /home/lexurldo/domains/motleypixel.com/public_html/pack562/yshout/yshout.php on line 22
Fatal error: require_once() [function.require]: Failed opening required 'yshout/settings.php' (include_path='/usr/local/lib/php') in /home/lexurldo/domains/motleypixel.com/public_html/pack562/yshout/yshout.php on line 22
the include_path is throwing me off...not sure what's going on here.
Thanks,
Roy
I have a request/question - I searched this topic and couldn't find it, so if it;s already been asked, my apologies
In 2.0RC1 is there any way to have the both the shoutbox AND news fader, but have the SB appear between the navigation buttons and the news -
Like this?
Hi Nneonneo,
First of all I'd like to say how well of a job you've done creating such a marvellous shoutbox and also for keeping this thread alive and helping people so much. I'm sure everyone appreciates it.
I just had 2 small questions to ask (Sorry if they've been asked before, Too many pages too look through xD)
1) I want to add your shoutbox in a tinyportal upper panel block, I have set it so that everyone can see it but when I try log in from a normal account I can't view it, I can only see it as an admin.
2) The other thing is for my other site where the shoutbox is above my logo and the buttons. I want to be able to move it under logo and buttons....How do I do so?
All help appreciated thank you :)
Hi I installed your shoutbox but my members cant see it and only my admins can!
Help please!
shadowclash & randommaker, try to read guidelines next time.
This shoutbox has permissions. That means you have to go to Permissions under Admin panel and enable viewing and writing in shoutbox, for every member-group - guests, members, global-moderators!
hey, i love this shoutbox. And i used the code change posted here to show posts in the shoutbox when they are posted. But i recently descovered that even if the user can't see or use a board they can see the new post and the link to it in the shoutbox. Is there anyway to only show new posts in the boards the user can view?
Quote from: MRDJ on March 24, 2009, 09:05:26 AM
Quote from: MRDJ on March 23, 2009, 10:57:06 PM
Quote from: MRDJ on March 23, 2009, 06:55:43 AM
from the time i have installed pretty urls the shout box(i am using neenones Advanced AJAX Shoutbox 1.22 ) is geeting closed after like 10-15 sec of the full page being load
take a look at this screeny you'll get what i mean.
http://img22.imageshack.us/img22/3582/dfsadasda.jpg
but i refresh or type the command /return normal sb comes back but it returns to position shown in the above pic :'( helppp
so is the problem with pretty urls ,shoutbox or my setings? and how do i solve this
bump
tried solving it myself unisntalled adv sb and installed 1.22 normal one its still the same so please help ....my members are going crazy
Move the codes up and down in index.template.php (the second code of shoutbox, not the CSS one)
Also look that yshout.php and yshout folder has permissions 777 or 755.
well i installed the mod in my forum but i dont see the shoutbox i have already edited the "index.template.php" first step but now im stuk cuz i dont understand the second step this one
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:
Code: [Select]
// 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
were do i need to put this code exactly notice that i dont know nothing about php hehe i just read and follow instructions and thanks
(http://img27.imageshack.us/img27/4296/mmmkxy.jpg)
mm i think this code is already in mu index.template ::) can someone tell me what coud be the problem
i tried looking on the default theme but i can see it but can write it just send me back to the portal
im using smf 2.04 and simple portal 2.5
edited:
i cheked this out and its 777
QuoteAlso look that yshout.php and yshout folder has permissions 777 or 755.
did the permisions to all
QuoteThis shoutbox has permissions. That means you have to go to Permissions under Admin panel and enable viewing and writing in shoutbox, for every member-group - guests, members, global-moderators!
and i dont want it were its at i want it were the news come on
My shoutbox won't log the history
When I click "extend history" with 200 back, a blank page comes up with the header
Shout Box History but nothing below it. The permissions for all of the files are set to 777. Help is needed urgently
<3
Hi,
Ive today moved servers today witch supports PHP5....
And when i access main page and look in shout box iam getting a error: ( this has only happended after upgrade and nameserver change )
Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for 'BST/1.0/DST' instead in /home/reptiles/public_html/Sources/Subs.php on line 805
Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for 'BST/1.0/DST' instead in /home/reptiles/public_html/Sources/Subs.php on line 818
[History] [Commands] [ExtendedHistory] [HideAdminLinks] [ReturnToShoutbox]
Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for 'BST/1.0/DST' instead in /home/reptiles/public_html/Sources/Subs.php on line 805
Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for 'BST/1.0/DST' instead in /home/reptiles/public_html/Sources/Subs.php on line 818
Ive also attached a screen shot of the shout box ( for example go here : www.exoticforums.co.uk )
I hope someone can help me fix this problem,
Kind Regards,
Paul Meehan
anyone? :-\
Quote from: sombra on March 31, 2009, 11:17:59 AM
anyone? :-\
what makes you think you deserve any help - you run warez forum, which is illegal!
There - I said it.
Well we aren't talking about Wares forums, witch you don't need to know were is located. We aren't hosting the servers and the page is located in a country were the laws doesn't prohibit it and I didn't know publishing links was ilegal! what you said before
3 if you wont give suport that this forum is about why take the time to post any coments that wont give any help to anyone?
the topic here is nneonneo's Shoutbox not what ameo has in mind
@sombra
Try the file in my attachment..
If it doesnt work, let me try via FTP as such and a test account..
So PM me the details if you wish me to take a look..
thanks flames now i can see the shoutbox but i still got the problem that i cant write in it it has the permisions i was thinking can pretty url can it be the problem i read somthing about it in other user requesting help here
(http://img401.imageshack.us/img401/8614/thanks.jpg)
every time i try to shout somthing it redirects me to the portal of the forum
and thanks for the edit and i dont know how to make a test account in my ftp
other thing i notice is that this problem happends in the default theme two
i found somthing new and i think its the problem wen i try to chat in the shoutbot it redirects me to the portal and i notice that the url was somthing strange
http://www.todoilegal.net/?
that url comes up wen i try to chat posible solutions for this?
reading from previus post here i notice that sombody said that if you canot enter this url its becouse its nots instaled or somthings its wrong
http://todoilegal.net/yshout/yshout.php
and the answer is i cant go to that link it has an error
Fatal error: Cannot redeclare ssi_thankyouposttopresived() (previously declared in /home/todoile1/public_html/SSI.php:1843) in /home/todoile1/public_html/SSI.php on line 2027
How can I disable Tags, IE [img][/img]
and www. links?
Thanks!!!
is there anyway to allow users to hide the shoutbox if they want to?
Sorry but can I have some noob question here please?
I am using the smf v 1.1.8 with dilber_MC theme and a modification of simple portal 2.2..
I installed the basic shoutbox via package option on my site and it goes out well but neither do I found any shoutbox in my forum when it was finish installed...
I tried to modify my index.template theme to let it show but I can't find the code corresponding to the one posted here..
Could someone help me so the shout box could be seen? Again my current theme is the Dilber multi color by harzem..
TIA
jhd_20
Quote from: thedukeisnotdead on April 04, 2009, 01:03:25 AM
How can I disable Tags, IE [img][/img]
and www. links?
Thanks!!!
Bump. I really need help on this
thanks
Hmmm....
Just installed the latest version. Many thanks for this mod though.
In theory it should be good, but it's just far too buggy.
Shame as it could be good though. :(
I am happy I got my shout box to work on my forum and with tiny portal :)
I do how ever have an issue with my Admin powers.
The shout box will not allow me or any of my other moderators or admins to delete a shout.
(http://i43.tinypic.com/2hrh002.png)
I have tried logging out and logging in as the suggestion in the shout box mentions but, no dice.
Am I missing something? Is there somewhere in the ADMIN section of my control panel for more options maybe?
Please assist and advize :)
TY
hi , i have a big problem with nneonneo Shoutbox, look, what's the problem ? The Shoutbox is in the header, help me please :( :'(
(http://img19.imageshack.us/img19/5787/dibujovnu.jpg)
@ jhd 20 - code which is posted here you must enter into index.template.php of current theme, and after that you must go to permissions so you can enable seeing shoutbox // posting in it // moderating it - to various membergroups - Guests, Members, Global Moderators.
@ thedukeisnotdead - In your yshout folder there is file called settings.php. In it you'll find
// An array of strings to delete from the input.
// By default, this includes the list, center, left and right tags.
$bannedCode=Array('[list]','[/list]','[center]','[/center]',
'[left]','[/left]','[right]','[/right]',
'[img]', '[/img]');
See img ! That's what you need to add to disable images. Then only links will show.
I'll not tell you how to disable links, though, it's the same thing, but links should not be disabled.
I mean, what's the use of it, anyway. Though, I believe you can also disable youtube in that way if it bothers you,
yet I'm not completely sure on that one. Note that smileys will be disabled to, because they are images also.
@remus 0000 - That is not very big problem. Just find where you placed the other code and put it in the same box where you put first code, but put it just before the last } bracket.
So, I installed the SB to the theme I'm using and it works great, except...
As soon as the page loads the shout messages are right under the "shoutbox" title, which is how I was planning them to show up but after a second or so a white empty lines appears and moves the SB a bit down the page, then eventually another empy lines comes right after the first and that's where it settlers, it's as if it added 2 <br/> after a while it's running, which makes no sense to me
Any reasons this might be happening?
Forum's always http://www.alcatrazfumetteria.com/forum/index.php
Update:
Restoring the tool bar (I removed it for the looks of it) seems to cut down on one of the 2 white lines, now there's just an extra one appearing...
Guys, i got a question i want to know it i can put this shoutbox like this forum shown in the image:
http://i40.tinypic.com/65aaog.jpg
Regards
@ didi_ghost - that is not nneonneo's shoutbox, however you can put it like that, by looking at some previous posts, especially ones that have the code for installation into news [for that see the link in first page]. you simply put that other code <div id="yshout></div>
into that block in portal, after you've put first code into index.template.php of your current theme. There are several modifications and ideas how to place shoutbox where, which various people have written, in this thread, as well as how to include that smileys.
Hello! I have a SMF 1.1.8 and I installed the Advanced AJAX Shoutbox 1.22. So my question is you know how the chat box extends up to 25 lines? Is there a way to shorten it to only about 10?
http://img15.imageshack.us/img15/5892/shoutbox.gif (http://img15.imageshack.us/img15/5892/shoutbox.gif)
See?? Is there a way to make the shout box not extend like that? Thanks :x
Quote from: ameo on April 09, 2009, 04:43:34 PM
@ Mdk 001 - please don't double post - delete your post but put text into previous post which is also yours. nneonneo or someone who knows more will help you in the soon future.
Yeah,my bad,I didn't think about editing my previous post
Anything for advance shoutbox scroll bar in 2.0 RC1 ? I was searching if it the 1.1.x modifications could be made to work with 2.x versions...
Edit:-
I am using Dark Break theme and the advance shoutbox messes up the whole page out..
I am trying to get the shoutbox in place in this code..
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div id="nav">
<ul>';
foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a ', $button['active_button'] ? ' class="current"' : '' , ' href="', $button['href'], '"><span>', $button['title'], '</span></a></li>';
echo '
</ul>
</div>';
}
I tried maupulating but didnt succeed...Any help on getting the layout as it is and the shoutbox properly in the forum...:)
how can we change the shout time like smf shoutbox...
its change {today} - to the {day}name.
and the time using 24hours not using am/pm
I've used sb 1.17 in smf 1.1.4
and have some questions & errors.
First i've tried Notifying users of new topics and replies in the forum: see http://www.simplemachines.org/community/index.php?topic=137508.msg1817042#msg1817042.
But After i posted reply , the page send and return, it said "sorry you must log in first" or something like this.
I've attached yshout.php and post.php here.
Thank you
It is possible to change the time to
ToDay
Yesterday
3 Days ago
4 Days ago
How can i do that?
Ok, I know I saw someone else have the same problems as me. I just can't find the solution for it in all these pages! ;D
I added the smileys to the shoutbox. It works great and with no errors. I do get errors now though when I try to edit the smileys. What's the fix for this?
Now I'm second guessing myself on whether or not I've seen anyone else have the same error I am. When I go to edit the smileys, this is the error I get
8: Undefined index: id
File: /home/*******/public_html/*******/Themes/default/languages/Post.english.php (editsmileys sub template - eval?)
Line: 316
8: Undefined index: description
File: /home/*******/public_html/*******/Themes/default/languages/Post.english.php (editsmileys sub template - eval?)
Line: 284
8: Undefined index: location
File: /home/*******/public_html/*******/Themes/default/languages/Post.english.php (editsmileys sub template - eval?)
Line: 282
8: Undefined index: filename
File: /home/*******/public_html/*******/Themes/default/languages/Post.english.php (editsmileys sub template - eval?)
Line: 280
8: Undefined index: code
File: /home/*******/public_html/*******/Themes/default/languages/Post.english.php (editsmileys sub template - eval?)
Line: 278
It happens on a few different lines but all point to the Post.english.php file.
I also get a really strange error when I try to manually install games into my arcade (e-arcade):
2: require(mymod/smiley.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory
File: /home/*******/public_html/*******/Themes/default/Admin.template.php (main_above sub template - eval?)
Line: 612
Any help or ideas/suggestions on how I can fix these errors will be greatly appreciated! :D
Can someone please tell me how to edit the timestamp on my shoutbox? I know that the timestamp can be controlled in settings.php however I do not know how to acheive the effect I want.
What I would like to do is condense the timestamp down - currently it is like this "[Today at 09:28 AM]" - I would like to change it so its like this....."[09:28 AM]" - so it just shows the time rather than the day or date.
How can I accomplish this?
Many thanks
Zach
I am migrating my website to a new webhost because my old one was horrible. I got a second domain www.gwgoodolddays.net to go with my original www.gwgoodolddays.com. I plan to move the original domain name over to the new host after I am sure that I want to stick with them.
I have moved my entire forum directory and database to the new host and used the repair_settings.php to fix the differences (the user account was 8 characters but only 7 with the new webhost causing all sorts of issues).
I now have most of the issues worked out but I am getting the following error when i try to load http://gwgoodolddays.net
QuoteFatal error: Call to undefined function shoutbox() in /home/gwgoodo/public_html/forums/Sources/Load.php(1975) : eval()'d code on line 360
What files and sections to I need to edit to successfully move this mod? remember not only is the domain name changing (for now) but also the local path was "/home/gwgoodol" but is now "/home/gwgoodo/". Thanks for any help.
Quote from: ameo on April 08, 2009, 07:27:17 AM
@ jhd 20 - code which is posted here you must enter into index.template.php of current theme, and after that you must go to permissions so you can enable seeing shoutbox // posting in it // moderating it - to various membergroups - Guests, Members, Global Moderators.
Pardon Sir but I've been searching for that code for a while but I can't just find it..
If you kindly may post it once again..
TIA once again
jhd_20
Thank you mod writers. Quick question, i've got this mod working great on the default smf template. I didn't do any custom theme edits because i wanted the shout box to show up in a portal so i can put it to the side and forgo having it on top of the page. Unfortuanlly its not showing up in the portal. The php code i have in my simple portal php block is,
Quote// 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
Nothing shows up in the block, can someone point me to what i did wrong?
Quote from: frantic on April 19, 2009, 08:08:47 PM
Thank you mod writers. Quick question, i've got this mod working great on the default smf template. I didn't do any custom theme edits because i wanted the shout box to show up in a portal so i can put it to the side and forgo having it on top of the page. Unfortuanlly its not showing up in the portal. The php code i have in my simple portal php block is,
Nothing shows up in the block, can someone point me to what i did wrong?
That's just the style and other stuffs needed for the shoutbox,not the actual SB itself
That part goes in the <head> tag while the code you have to put in the box can be found in the mod page
thanks, i can get the instant on code to work and make it appear in a portal, i'm on rc1, can't get the 1.6 behavior thing to work. Unfortunally if i try to shout it refreshes the whole page every single time no shout. The history tab, commands, etc don't do anything. At the bottom of my broswer says error on the page when i try those buttons. Anyone have any ideas?
i could try un-installing the normal shout and install the advance but i get this error. All i really want is get it in a portal and working
QuoteDescription
1. Execute Modification ./index.php Test successful
1. Add Before ./index.php Test successful
2. Execute Modification ./Themes/default/index.template.php Test failed
1. Add Before ./Themes/default/index.template.php Test successful
2. Add After ./Themes/default/index.template.php Test successful
3. Add Before ./Themes/default/index.template.php Test successful
4. Replace ./Themes/default/index.template.php Test successful
5. Add After ./Themes/default/index.template.php Test failed
3. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
1. Add Before ./Themes/default/languages/Modifications.english.php Test successful
4. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
5. Execute Modification ./Themes/default/languages/Modifications.english_british.php Skipping file
6. Execute Modification ./Themes/default/languages/Modifications.english_british-utf8.php Skipping file
7. Execute Modification ./Sources/ManagePermissions.php Test successful
1. Add After ./Sources/ManagePermissions.php Test successful
8. Extract Tree ./yshout
9. Extract File ./Themes/default/css/yshout.css
10. Extract File ./Themes/default/images/calendar.png
11. Extract File ./Themes/default/images/info.png
12. Extract File ./Themes/default/images/cog_delete.png
13. Extract File ./Themes/default/images/cog_add.png
14. Extract File ./Themes/default/images/smile.png
15. Extract File ./Themes/default/images/date.png
16. Extract File ./Themes/default/images/mute.png
17. Extract File ./Themes/default/images/unmute.png
Is there a way to get a "Who's Online" for the Shoutbox?
scratch that i fixed my own problem :). It was a case of me not knowing how to read the directions properly.
Quote from: zach21uk on April 17, 2009, 04:15:53 AM
Can someone please tell me how to edit the timestamp on my shoutbox? I know that the timestamp can be controlled in settings.php however I do not know how to acheive the effect I want.
What I would like to do is condense the timestamp down - currently it is like this "[Today at 09:28 AM]" - I would like to change it so its like this....."[09:28 AM]" - so it just shows the time rather than the day or date.
How can I accomplish this?
Many thanks
Zach
Bumped - Please help
hello, first this shoutbox is awesome, thanks to nneonneo.
I use this shoutbox + scrollbar + simley on a custom theme.
unfortunatly , only 1 thing don't work.. button to hide smileys
When i click on "close" , nothing happens.
i have smf 1.17 , use SB_1.22.zip, i downloaded animatedcollapse.js and smiley.php and upload in the right dir (actually, click on smiley works well)
I have a lot of package installed, so thanks to help me a little
link to my forum
http://rpgmakerxp-factory.net/forum/index.php
Hi. How do I put the shoutbox at the bottom of the page?
i got this message when try to reinstall, the mod
you have already installed the mod , this is danger for you forum
can help me to fix,please
Quote from: LLStarks on April 27, 2009, 09:52:39 PM
Hi. How do I put the shoutbox at the bottom of the page?
In the first page of this topic :
QuoteSecond, find the desired location of the shoutbox and place at that location (in the index.template.php file!) *one* of the two blocks below:
So ypu must modify your index.template.php and put the code.
For my forum I make a table and pasted code inside
Quoteyou have already installed the mod , this is danger for you forum
Try to uninstall, check for files can't deleted and install again
With advanced shoutbox, how do I change that the sound is always on by default.
Quote from: Mdk001 on April 08, 2009, 07:42:32 AM
So, I installed the SB to the theme I'm using and it works great, except...
As soon as the page loads the shout messages are right under the "shoutbox" title, which is how I was planning them to show up but after a second or so a white empty lines appears and moves the SB a bit down the page, then eventually another empy lines comes right after the first and that's where it settlers, it's as if it added 2 <br/> after a while it's running, which makes no sense to me
Any reasons this might be happening?
Forum's always http://www.alcatrazfumetteria.com/forum/index.php
Update:
Restoring the tool bar (I removed it for the looks of it) seems to cut down on one of the 2 white lines, now there's just an extra one appearing...
I could totally use some help with this, isn't anyone around?
Here is the shoutbox mod: http://custom.simplemachines.org/mods/index.php?mod=585
PLEASE HELP ME!
Index Template:
<?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'] = true;
/* 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" />';
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<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>
</head>
<body>
<div id="wrapper">
<div id="hdr-l">
<div id="hdr-r">
<div id="hdr">
<div id="userarea">
', $context['current_time'],'<br />';
if($context['user']['is_logged'])
{
echo $txt['hello_member_ndt'] , ' <strong>' , $context['user']['name'] , '</strong><br />';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ' [<a href="', $scripturl, '?action=pm">', $context['user']['messages'], '/<strong>', $context['user']['unread_messages'] , '</strong></a> PM]';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '[<strong>Maintenace</strong>]';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
[<a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] , ' APPROVE</a> ]';
echo '
<a href="', $scripturl, '?action=unread">Unread</a> /
<a href="', $scripturl, '?action=unreadreplies">Replies</a>';
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
', $txt['welcome_guest'], '<br />';
}
echo '
</div>
<a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
echo '
</div>
</div>
</div>
<div id="tpmenubar">
',template_menu(),'
</div>
<div id="extras">
<div id="searcharea">';
echo '
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/search.png" align="middle" alt="" style="margin: 0 1ex;" /></a>
<input class="searchbox" type="text" name=""search"" value="', $txt[182], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt[182], '...\';" style="width: 170px;" />';
// 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>
</div>
<div id="statsbox">';
echo '
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '- ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span> -
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>';
echo '
</div>
</div>
<div id="bodyarea">';
}
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="ftr">
<div id="ftr-l">
<div id="ftr-r">
<div id="ftrarea">
<span class="smalltext">', theme_copyright(), '<br />
<strong>DsV1</strong> Theme by <a href="http://www.dzinerstudio.com" target="_blank">DzinerStudio</a></span>';
// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext"><br />', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';
echo '
</div>
</div>
</div>
</div>';
// 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>
</div>
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="nav" style="margin: 1ex 8px 2ex 8px;">';
// 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 $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'];
// 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 ' &#0187; ';
}
echo '</div>';
}
// 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', 'forum')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if (isset($_GET['board']) || isset($_GET['topic']))
$current_action = 'forum';
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 '
<ul id="topmenu">';
// Show the [home] button.
echo '<li><a' , $current_action=='home' ? ' class="chosen"' : '' , ' href="', $scripturl, '">' , $txt[103] , '</a></li>';
// Show the [help] button.
echo '<li><a' , $current_action=='help' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// Show the [shop] button.
echo '<li><a' , $current_action=='shop' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=shop">' , $txt[shp] , '</a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo '<li><a' , $current_action=='search' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a' , $current_action=='calendar' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a' , $current_action=='admin' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a' , $current_action=='profile' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a' , $current_action=='pm' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a ' , $current_action=='mlist' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// the [gallery] button
if ($context['allow_smfgallery_view'])
echo '<li><a ' , $current_action=='gallery' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=gallery">' , $txt[gal] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li class="last"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
if ($context['user']['is_guest'])
{
echo '<li><a' , $current_action=='login' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
echo '<li class="last"><a' , $current_action=='register' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
}
echo '
</ul>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
Can someone please add it to my index.template!
Hello all.
I found that if cookies does not contain SMF_cookies then yshout identified user as guest. it possible when user logged not permanent. There is a decision of the given problem?
Two questions:
1) I finally got around to upgrading to 1.22, but the old tweaks I used to use to change the colors of the shouters' names no longer works - ie, I had this code:
#shouts .owner a {
color: #00F;
text-decoration: underline;
}
#shouts .moderator a {
color: #00F;
text-decoration: underline;
}
#shouts .user a {
color: #00F;
text-decoration: underline;
}
but it no longer works. I saw that the color coding was now "built in", but is there any way to modify it in the css?
2) Did anyone ever get alternating colors for shouts working?
Thanks!
Hi,
How can I make my shoutbox look like the image that is in the modifications?
(this one)
(http://img201.imageshack.us/img201/2087/imgily.png)
Hi :D
I install nneonneo's AJAX ShoutBox in my SMF (1.1.4). and i can´t fixe two problems:
1. The shout appear in the Log in page;
2. The shout appear in all boards.
How can i make the shout appear only in the main board?
Note: I don´t have any informations about shoutbox in :"Features and Options", and i can not upgrade to SMF 1.1.8 because my server don´t have the basic requirements
Tanks for the help!!
Hey
I have the scroll bar showing up in my shoutbox, the only problem is it doesn't scroll. It shows the bar but won't let me scroll up or down at all. Any ideas?
Hello,
I have actually fixed the above issue. But what I am looking for now is how to get the scroll bar to automatically stay on the bottom, unless you move it up. Right now it is scrolled to the top and showing the oldest post in the shoutbox first, I want it to always show the newest
I cannot find a copy for SMF version 1.1.8 - could be I am having a senior moment
Hey nneonneo, sup? Been a while since I've visited :) Your mod works as great as ever, but I have a minor inconvenience:
My shoutbox is used a LOT, so my history file gets full pretty often, like 7-8 days to 2 weeks. Everytime, I have to empty the history.home.txt file. Recently, what I've been doing is renaming that file with today's date, and then when the shoutbox gets used, a new history.home.txt file gets made. The problem is that only I have access to the cPanel and not the other staff of my forum. I'd rather not give them the password to my cPanel ;)
So, my question is: can you implement a command like /clearhistory that would rename the history.home.txt file with today's date? That would be such a big help :)
i cant get the scroll bar to work, i did all the edits listed here
http://www.simplemachines.org/community/index.php?topic=137508.msg1532028#msg1532028
using 2.0 RC1 custom theme
can anyone get me on the right path?
edit: nvm i got it
With advanced shoutbox, how do I change that the sound is always ON, by default.
sorry i am confused im new to smf which mod do i download for smf 2.0 :s sorry for the inconvinience
Quote from: vetro on May 10, 2009, 11:31:39 AM
sorry i am confused im new to smf which mod do i download for smf 2.0 :s sorry for the inconvinience
you download latest SB 1.22 (http://custom.simplemachines.org/mods/index.php?mod=585) mod version
I put some jquery, jcarousel plugin on my site. by including the jquery plugin, my shoutbox stops from working. Disappears.
Any way to fix this?
Is there a way to remove the title "Shout Box" above the box? The font is big and the spacing is huge, it takes up a lot of space. I'd like the box to be flush under my menu bar.
http://forum.ezmodeunlocked.com
I looked around but couldn't find an answer to this, sorry if it's been posted. This is a long thread. :)
Thanks to anyone who can help!
Been running shout succesfully now for about 6months. no issues. I recently within the last 2 days have started seeing MySQL errors come through, closing the chat saying this:
QuoteWarning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/raptors/public_html/forum/Sources/Subs.php on line 321
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/*****/public_html/forum/Sources/Errors.php on line 123
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/*****/public_html/forum/Sources/Errors.php on line 124
I can refresh the page, and they go away and chat resumes as normal. has anyone seen anything like this or have any suggestions?
thanks-
Randy
anyone know how to make the timestamp + text on the same line???
(http://img4.imageshack.us/img4/9654/twolines.gif)
mine looks like this, i just want each chat on one line but i cant seem to figure it out anywhere, ive looked through all the code...
Quote from: Sman1400 on May 13, 2009, 04:16:36 AM
anyone know how to make the timestamp + text on the same line???
mine looks like this, i just want each chat on one line but i cant seem to figure it out anywhere, ive looked through all the code...
In your yshouts directory find and open settings.php
Look for this code at the bottom:
return ' '. timeformat(intval($matches[1]), true).'<br />';
And change to this:
return ' '. timeformat(intval($matches[1]), true).'';
Then save and upload.
Remember to always save a backup version of what you are working on.
hy ,nneonneo,ihave downloaded your shoutbox,it works great, but i also have some errors on my forum after i download the shoutbox,would you help me to fix it?(below)
"Warning: mysql_query(): supplied argument is not a valid
MySQL-Link resource in .../forum/Sources/Subs.php on line 321" or
"Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later."
could someone help me please
hello all,
Can someone help me on this.
my forum is 1.1.8 and what version of SB should i install?
thank you.. :D
Is it possible to add a scrollbar but have it not drag a reader down to the bottom whenever a new person shouts?
Quote from: LLStarks on May 14, 2009, 08:51:21 PM
Is it possible to add a scrollbar but have it not drag a reader down to the bottom whenever a new person shouts?
You can open settings.php in yshouts directory and adjust this code:
// The shoutbox usually shows shouts with the newest chats at the bottom.
// If you want the newest ones at the top, set this to true.
// You may also wish to check autoScroll in yshout/settings.js.
$reverseShouts=false;
// If you reverse the shouts, you might want the shout form to be on top
// rather than on the bottom. Set this to true to move the shout form
// to the top (the tool links will stay above the form)
$shoutFormOnTop=false;
That of-course would require the newest shouts to be up top. But also notice the reference to settings.js in which you can turn off Auto Scroll:
// Autoscroll? Default is on, but if you have $reverseShouts on, you probably
// want autoscroll off.
var autoScroll=true;
Quote from: Krandall on May 12, 2009, 04:25:43 PM
Been running shout succesfully now for about 6months. no issues. I recently within the last 2 days have started seeing MySQL errors come through, closing the chat saying this:
QuoteWarning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/raptors/public_html/forum/Sources/Subs.php on line 321
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/*****/public_html/forum/Sources/Errors.php on line 123
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/*****/public_html/forum/Sources/Errors.php on line 124
I can refresh the page, and they go away and chat resumes as normal. has anyone seen anything like this or have any suggestions?
thanks-
Randy
Quote from: loongeer on May 13, 2009, 06:09:35 PM
hy ,nneonneo,ihave downloaded your shoutbox,it works great, but i also have some errors on my forum after i download the shoutbox,would you help me to fix it?(below)
"Warning: mysql_query(): supplied argument is not a valid
MySQL-Link resource in .../forum/Sources/Subs.php on line 321" or
"Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later."
could someone help me please
Thoughts on these 2? Seems we're having the same issues
Hi All,
Running SMF 2.0RC1
I seem to have a corrupted "./Themes/default/index.template.php" File.
The error I'm getting is this.....
Find
echo '
<div class="buttonlist', $direction != 'top' ? '_bottom' : '', '">
<ul class="clearfix">
<li>', implode('</li><li>', $buttons), '</li>
</ul>
</div>';
}
Then Add After
function shoutbox()
{
global $txt, $options, $settings, $context, $boarddir;
echo '<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;"><a href="#" onclick="sbToggle(); return false;"><img id="upshrinkSB" src="', $settings['images_url'], '/', empty($options['collapse_shoutbox']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="Shrink or Expand the ShoutBox" align="bottom" /></a> ';
// Block Title
echo '<span style="width:49%"></span><span>ShoutBox</span>';
echo '</div><div id="upshrinkSBHeader"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
</tr>
</table></div>';
}
When I look in the Directory For all my themes and at the file in question, the code it's looking for is there.
Why does the Mod Fail?
Can anyone help me?
Have you installed any other mods prior to this mod?
If not then just upload a fresh index.template.php from the default theme by downloading the index.template.php~ then rename that file index.template.php and upload to the /themes/default/ folder and over write the existing.
Quote from: Arebias on May 15, 2009, 04:04:02 PM
Have you installed any other mods prior to this mod?
If not then just upload a fresh index.template.php from the default theme by downloading the index.template.php~ then rename that file index.template.php and upload to the /themes/default/ folder and over write the existing.
Hi,
Thank you for responding.
I have installed other mods so I'm leery of restoring the backup. I ended up with the Ajax Shout. It's nice but it does no open a separate window for the chat unless I click use pop-ups. It ends up just changing the current window to the chat and if I want to go back to the forum I have to click the back arrow.
Not a show stopper, but a bit anoying.
Hmm i have my shout box working 99% :)
theres one thing though, when im on the boards index the shoutbox's scroll bar stays at the top(opposed to moving to the bottom) and sometimes when i try to shout on the index nothing happens
when im on anything else (like the topics displayed or a post) the scrollbar goes to the bottom liek it sohuld and shouts can be made
any ideas?
I have 1.22 installed and as it is, only admins can see the shout box. What setting do I change to enable every registered member of the forum to see it?
Quote from: Dipper on May 15, 2009, 10:35:59 PM
I have 1.22 installed and as it is, only admins can see the shout box. What setting do I change to enable every registered member of the forum to see it?
You need to go into Permissions and enable it for each Member Group you wish to have Read/Shout/Moderate privileges.
Don't forget to look at Guests as well and change the permissions accordingly to your needs.
And a word of warning!
If you intend to keep the knowledge of the shoutbox a secret, you need to go in and edit the string that blabs to EVERYONE not allowed to use it that they aren't allowed to see it.
Which pretty well tells the world you have it... could revealing the existence of the shoutbox be an option that is set to "don't blab about it with a taunt"?
We use it for admin and moderation purposes only and having shoutbox telling the world it was there resulted in some urgent string editing on my part.
It's a really great MOD and we do rely upon it, but defaulting to not revealing a guest or member can not use it would really be appreciated.
Grazie,
Cal
Quote from: Sman1400 on May 15, 2009, 05:04:31 PM
Hmm i have my shout box working 99% :)
theres one thing though, when im on the boards index the shoutbox's scroll bar stays at the top(opposed to moving to the bottom) and sometimes when i try to shout on the index nothing happens
when im on anything else (like the topics displayed or a post) the scrollbar goes to the bottom liek it sohuld and shouts can be made
any ideas?
My guess is that you are using Internet Explorer. I find that the Java in Internet Explorer tends to be really slow sometimes responding.
Just a guess. ;D
is possible to make the size the letter more big?? please let me know
i need all the ways to put the code in my index.template.php but something happend i cant. here is the file, can pplease any of you pros can do it? becuse i try and i try and nothing man
this attachment is a clean copy of the file, here is a picture of were i want the shout box to appear if is possible, please help me and sorry im dont know nothing about php.
(http://img56.imageshack.us/img56/4641/pleasev.th.jpg) (http://img56.imageshack.us/my.php?image=pleasev.jpg)
Quote from: biohazardjoker on May 17, 2009, 01:03:49 AM
is possible to make the size the letter more big?? please let me know
same question, it sure is tiny!!!
Quote from: biohazardjoker on May 17, 2009, 01:03:49 AM
is possible to make the size the letter more big?? please let me know
ftp to:
Your Theme > CSS > yshout.css
Open this style sheet in an editor and look for:
#yshout {
font-size: 11px;
color: #00FF00;
overflow: auto;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
That font size setting adjusts the size of the font for shouts. There are others there that you can change to adjust appearance as well. You might want to change the color, background, size, etc... All these settings are in here. You can adjust the style for each individual theme that you have using the yshout.css
I am getting a TEST FAILED when trying uninstall this MOD.
My index.template.php is located here:
http://www.victoryrock.org/neo/ (http://www.victoryrock.org/neo/)
Can someone please assist me?
Thanks,
victoryrock
Quote from: Arebias on May 21, 2009, 06:11:39 AM
Quote from: biohazardjoker on May 17, 2009, 01:03:49 AM
is possible to make the size the letter more big?? please let me know
ftp to:
Your Theme > CSS > yshout.css
Open this style sheet in an editor and look for:
#yshout {
font-size: 11px;
color: #00FF00;
overflow: auto;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
That font size setting adjusts the size of the font for shouts. There are others there that you can change to adjust appearance as well. You might want to change the color, background, size, etc... All these settings are in here. You can adjust the style for each individual theme that you have using the yshout.css
Got it, thanks!
Quote from: victoryrock on May 21, 2009, 12:08:41 PM
I am getting a TEST FAILED when trying uninstall this MOD.
My index.template.php is located here:
http://www.victoryrock.org/neo/ (http://www.victoryrock.org/neo/)
Can someone please assist me?
Thanks,
victoryrock
No one can see your index.template.php because php is made that way - it cannot be seen online.
You'll need to download it on your disc and attach it here in your forum post. Personally I'd help you
but advanced shoutbox can be trouble because it adds some stuff in your database and that is out
of my knowledge.
Here is my php file. I had trouble attaching it originally.
Quote from: ameo on May 22, 2009, 03:48:45 AM
No one can see your index.template.php because php is made that way - it cannot be seen online.
You'll need to download it on your disc and attach it here in your forum post. Personally I'd help you
but advanced shoutbox can be trouble because it adds some stuff in your database and that is out
of my knowledge.
Here is my screenshot of my uninstall attempt.
Don't know why there is 2 of them.
I removed shoutbox lines manually. Try to download this and replace it with current one.
Ameo,
It worked yes, but the header of Shoutbox is still there which is what I am trying to remove in the first place.
I could just disable Shoutbox entirely in the persmissions, but the Header is still there.
When I try to uninstall I am still getting the TEST FAILED error
OKAY, I removed some more lines, but I'm not really sure, so here's what you must do. You must go in FTP and rename index.template.php to index.template2.php - so you'll have backup if something goes wrong. If it doesn't you may use this one:
Whoa...i got some pretty funky errors:
go here: http://www.victoryrock.org/forum/index.php (http://www.victoryrock.org/forum/index.php)
OK. That index.template2.php I told you to make, you need to get it back unfortunatelly. I'll pm you.
Ameo...for a not so pro guy, you sure helped me out...Thanks Again! :)
When in Admin Panel, I cannot access the "Ultimate Profile" Admin option. It defaults to "Basic Settings".
I'm not even certain what file(s) are involved (admin template? sources load?).
Could I receive some direction on where and what to look for?
Hey.
I have Advanced AJAX Shoutbox installed in my forum.
there is a tab that you can click on to see all shouts ( admin can see / mods )( LOG )
how do i go about clearing that list as the shout box is used a lot. and it goes back from when the forum first opened nearly a month ago. so as you can imagine its pretty full
Thanks.
Quote from: redsc on May 23, 2009, 06:29:24 PM
Hey.
I have Advanced AJAX Shoutbox installed in my forum.
there is a tab that you can click on to see all shouts ( admin can see / mods )( LOG )
how do i go about clearing that list as the shout box is used a lot. and it goes back from when the forum first opened nearly a month ago. so as you can imagine its pretty full
Thanks.
ftp: to your forum/yshout/chats directory. Download 'history.home.txt' and 'home.txt'
Upload a blank copy of each and overwrite what is on the server. You can save the downloaded copies as reference locally.
Quote from: Arebias on May 23, 2009, 07:45:35 PM
Quote from: redsc on May 23, 2009, 06:29:24 PM
Hey.
I have Advanced AJAX Shoutbox installed in my forum.
there is a tab that you can click on to see all shouts ( admin can see / mods )( LOG )
how do i go about clearing that list as the shout box is used a lot. and it goes back from when the forum first opened nearly a month ago. so as you can imagine its pretty full
Thanks.
ftp: to your forum/yshout/chats directory. Download 'history.home.txt' and 'home.txt'
Upload a blank copy of each and overwrite what is on the server. You can save the downloaded copies as reference locally.
thats great and works a treat thanks :)
also i have allowed noise to be displayed when new message / shout is typed. but does not make a noice / play the mp3 file in the folder.
why is this ? and how do i make it to make the noise ?
thanks.
A couple of minor (I hope) purely cosmetic questions.
Shoutbox is installed and up and running fine. I have a non-default theme (wannaseedie's Sweet Dream), so I used the parsing instructions to insert the code onto the theme's index.template. To make it easier on these old eyes of mine, I edited the yshout header portion to increase the font size a smidge and put a little more space between the lines.
Now I'm trying to get fancy, but I've run up against the limits of my meager php coding skillz. I'd like to change the title of the SB and center it. I'd also like to put a border of some kind around it (or possibly bars across the top and bottom) something that delineates it but integrates it into the theme, too, if that makes any sense.
A copy of the theme's index.template is attached and a link to the forum is here (http://quantum-sky.org/eclipsingbinary/index.php).
If someone can help me out with what edits to make, I would much appreciate it.
Try this and see how that looks...unfortunately, I no longer have a 1.1.x series test site, so it's all from memory...lol
Well, it kinda works. The title bar looks great, with 'Shout Box' centered and the bar matching. The shouts themselves are centered, too, which is unexpected but okay. On the downside, the shouts themselves have disappeared (I suspect the font hex color got changed to white?). And the SMF and theme copyright notices are appearing between the title bar and the shouts.
I see the possible culprit for both problems. I am using a new editor and it "autocloses" and "prewrites" etc....... > :(
Open your index.template.php and go to line 388. That line should look like this:
echo '<br /><div class="bar" style="text-align:center;"><b>',$txt['yshout_shoutbox'],'</b></div><br /><br />';
My editor didn't make the second <div> a </div>. That should fix everything. Sorry about that.
Shoutbox isn't visible to me (admin) after installation.
I am using SMF RC1-1.
Thanks for the house call, Sun King. :)
I've continued working on getting a space between the commands line and the shout, with no success. Maybe a <p> instead of an <b />?
Quote from: Krandall on May 12, 2009, 04:25:43 PM
Been running shout succesfully now for about 6months. no issues. I recently within the last 2 days have started seeing MySQL errors come through, closing the chat saying this:
QuoteWarning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/raptors/public_html/forum/Sources/Subs.php on line 321
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/*****/public_html/forum/Sources/Errors.php on line 123
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/*****/public_html/forum/Sources/Errors.php on line 124
I can refresh the page, and they go away and chat resumes as normal. has anyone seen anything like this or have any suggestions?
thanks-
Randy
*bump*
To Mystery and all RC1-1 upgraders...when I upgraded the installer happened to delete my yshout folder from the FTP server...so you might wanna check if that's still there...can't run the shoutbox without it ;)
Um, no one has posted a reply to this, so please help:-
Quote from: machmanx on May 08, 2009, 12:02:34 AM
I have a minor inconvenience:
My shoutbox is used a LOT, so my history file gets full pretty often, like 7-8 days to 2 weeks. Everytime, I have to empty the history.home.txt file. Recently, what I've been doing is renaming that file with today's date, and then when the shoutbox gets used, a new history.home.txt file gets made. The problem is that only I have access to the cPanel and not the other staff of my forum. I'd rather not give them the password to my cPanel ;)
So, my question is: can you implement a command like /clearhistory that would rename the history.home.txt file with today's date? That would be such a big help :)
Can some one tell me how the shoutbox mod identifies if a user is logged in or not? I have been trying to integrate SMF in to my CMS and things are going pretty well and I can be auto signed in to SMF using the hooks that have been written in to the software. I can access the admin, profile etc but it will not allow me to use the shoutbox.
When I get to the forum, the shout box very briefly shows that I can post in the shout but it is then quickly disabled once the page fully loads. What could be stopping this from recognising that I am actually signed in?
If I use firebug and delete the disabled="disabled" from the page source it will allow shouts.
Any ideas?
It's a minor cosmetic, thing, but it's bugging me not being able to figure out how to do it. How do I put a blank line between the toollinks and the shouts?
Has support stopped for this mod?
Quote from: picos on May 28, 2009, 04:48:49 AM
Has support stopped for this mod?
don't be ridiculous. support didn't stop. nneonneo is just absent for a while, but he usually answers all the questions
on which no1 knows answer when he gets back. you'll just have to wait a little while, since your problem is probably little bit
more complicated than others.
LOL! I wasn't sure as I looked back and saw he hadn't been on recently so thought I would ask. Everyone deserves a break but I was just wanting to clarify.
;D
Quote from: machmanx on May 26, 2009, 12:24:41 PM
To Mystery and all RC1-1 upgraders...when I upgraded the installer happened to delete my yshout folder from the FTP server...so you might wanna check if that's still there...can't run the shoutbox without it ;)
Its there, but I still can't see the shoutbox.
Mystery, check your permissions to see if you've enabled viewing of the shoutbox.
OR, I highly recommend going to the mod link, and then looking at the manual install instructions. Then see if every group of code is actually present on your files in the server. Sometimes, the autoinstaller tends to write the same code twice in the same file...so you may want to check that too, for duplicate groups of code.
2 questions.
1. If I am looking at the immediate history and have the scrollbar enabled, why do new posts force me to the bottom of the shoutbox?
2. How do I move the location of the shoubox to the bottom of the SMF 2.0 theme?
Also, how do I have the shoutbox load as a collapsed entity?
HI guys. I've this mod installed- everything's Just fine. I've added the scroll bar- which is working correctly too.
1) But one thing: With scrollbar or without it- my shout box sometimes is missing the last entry.
4 example: I'm writing a text, what is shown a while, and next it's hidding under a text-write box. Sometimes whole message, sometimes a half... Sometimes it's happened that the SB is "jumping" – show/hide/show/hide... last message.
2) Sometimes sb refresh is stucked and I have to refresh it with "web browser refresh button"
What's wrong?
And is there any possibility to disable smiley's in shout box?
is there any way to set permissions for the shoutbox?
in the admin, in members > permissions, I can't set anything related to the shoutbox....
thanks a lot
Quote from: Arebias on February 24, 2009, 12:26:06 PM
Quote from: dsanchez on February 24, 2009, 11:22:39 AM
Yes, I did that.
Not, shoutbox does not show up :( (my other mods yes: googlemap, ads mods, etc..)
Open
/sources/ManagePermissions.php
Find this code
// YSHOUT HERE - permissions
$permissionList['membergroup']['yshout'] = array('yshout_view' => false, 'yshout_post' => false, 'yshout_moderate' => false);
// YSHOUT END - permissions
and change the yshout_view' => false, to yshout_view' => true,
I believe that will work for you.
I never found that code in the "ManagePermissions.php" file :(
FORUM VERSION: SMF 1.1.9
Hi
I am using a custom theme. The shoutbox doesn't show. What would I add so it would show? I am using the overviewlight theme.
Thanks
Joe
www.3smf.com/thechill
Quote from: Joe N on June 06, 2009, 12:50:33 PM
FORUM VERSION: SMF 1.1.9
Hi
I am using a custom theme. The shoutbox doesn't show. What would I add so it would show? I am using the overviewlight theme.
Thanks
Joe
www.3smf.com/thechill
bump
Quote from: Joe N on June 06, 2009, 12:50:33 PM
FORUM VERSION: SMF 1.1.9
Hi
I am using a custom theme. The shoutbox doesn't show. What would I add so it would show? I am using the overviewlight theme.
Thanks
Joe
www.3smf.com/thechill (http://www.3smf.com/thechill)
You will need to go here: http://custom.simplemachines.org/mods/index.php?action=parse
and manually make the changes to the index.template.php for the custom theme that you are using.
The example parsed is for nneonneo's SB 1.22 version and SMF 1.1.9 If you are using a different SB version then you will need to select the appropriate one and parse for that version.
Remember to make backups of any file you are manipulating so you can return to previous state quickly if you do something wrong. ;)
God, now I got a more serious problem. After updating to RC1, the shoutbox refreshes on the new skins for the first couple replies or maybe the first 10-20 seconds. After that, the shoutbox won't refresh anymore and I have to reload the page to get it to scroll again. Then the same issue repeats. Why won't the shoutbox refresh properly in the new update?
BTW, I cannot hear the sound I have set for the Shout Box either. Everything worked fine on 2.0 beta 4, but not RC1. What's going on here?
Edit: To add, it seems like the shoutbox works fine when using 2.0 beta 4 skins on RC1. It's just the new skins that the shoutbox has problems on :(
Update 1: Never mind, I fixed it on my own...had to modify a bit of code, but now it works!
This is a long thread, I searched it, but didn't found anything. Sorry if there were something about this.
After few seconds the whole shoutbox disappears. And in folowing I cant do anything.
I have SMF 2.0 RC1-1. What can be wrong?
Please, help.
Quote from: ziemek8 on June 08, 2009, 08:34:17 AM
This is a long thread, I searched it, but didn't found anything. Sorry if there were something about this.
After few seconds the whole shoutbox disappears. And in folowing I cant do anything.
I have SMF 2.0 RC1-1. What can be wrong?
Please, help.
FORUM URL?
Is it for all membergroups?
is there a way to open the shoutbox in a pop-up window?
Quote from: Joe N on June 08, 2009, 01:12:56 PM
FORUM URL?
Is it for all membergroups?
http://archeos.pl/forum/ - the bottom of the page (if You go there quick You can see for a few second the input for the message in shoutbox).
Yes, this is for all membergroups, i tried and wrote in the Permisions Source not false but true in this, but that does not help.
'yshout_view' => array(true, 'yshout', 'yshout'),
'yshout_post' => array(true, 'yshout', 'yshout'),
'yshout_moderate' => array(false, 'yshout', 'yshout'),
@dsanchez Just open (give a link, or write a script to open that url) a http://[your forum url]/yshout/
Quote from: ziemek8 on June 08, 2009, 03:24:27 PM
@dsanchez Just open (give a link, or write a script to open that url) a http://[your forum url]/yshout/
but if i put that url it shows a blank page
http://curefans.com/yshout/
?
http://www.robotparty.us/what.jpg
This pops up for a few moments before disappearing. Is advertising spam a feature of this shoutbox?
And sometimes it doesn't disappear at all.
advertising spam is certainly not a feature of shoutbox. if you downloaded it from original location - this site, you have to check your forum for safety. don't allow guests to post, and make sure your forum isn't under some kind of spam attack.
It could be something as benign as someone posting image BBC in the shoutbox.
For some reason i get these when i used the shout box.
Warning: Unknown(): write failed: No space left on device (28) 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 (/tmp) in Unknown on line 0
Warning: session_write_close(): write failed: No space left on device (28) in /home/content/s/p/o/spokanedubs/html/forum/yshout/yshout.php on line 748
Warning: session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in /home/content/s/p/o/spokanedubs/html/forum/yshout/yshout.php on line 748
Quote from: sevacycles on June 11, 2009, 02:54:36 AM
For some reason i get these when i used the shout box.
Warning: Unknown(): write failed: No space left on device (28) 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 (/tmp) in Unknown on line 0
Warning: session_write_close(): write failed: No space left on device (28) in /home/content/s/p/o/spokanedubs/html/forum/yshout/yshout.php on line 748
Warning: session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in /home/content/s/p/o/spokanedubs/html/forum/yshout/yshout.php on line 748
[/quote]
i do the stuff for put a smiley bar but i get this error:
(http://img197.imageshack.us/img197/4350/55855735.th.jpg) (http://img197.imageshack.us/i/55855735.jpg/)
please i do all the other stuff but this error appear please any help will be good
Remove the ' after <div id="yshout>
In other words...change echo '<div id="yshout">' <div class="smalltext"
to echo '<div id="yshout"><div class="smalltext"
How to remove image emoticons in the shoutbox? I have AdvSB 1.22 in SMF 2.0 RC1-1.
TY for you help but i have another error , please sorry for my noob and poor understand of this matter of php, please check the picture and if you can please help me and ty again.
(http://img197.imageshack.us/img197/254/90511097.th.jpg) (http://img197.imageshack.us/i/90511097.jpg/)
Quote from: SunKing on June 12, 2009, 11:38:03 PM
Remove the ' after <div id="yshout>
In other words...change echo '<div id="yshout">' <div class="smalltext"
to echo '<div id="yshout"><div class="smalltext"
Change </script>
</div>;
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
to </script>
</div>';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
I am using smf 2 rc1-1 with default theme. It installed sucessfully but problem is it is visible to me only(administrator) and not visible to other members and mods.
Set your permissions within SMF's admin area.
perfect now i get no errors but were is suppose to appear the smileys??? becuse i dont see any bar of smiley in the screen, the smileys appear but went io try to use it dissapear, is very weird i cant put a picture becuse happend very very fast
Quote from: SunKing on June 13, 2009, 10:24:49 PM
Change </script>
</div>;
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
to </script>
</div>';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
i try my best and i get the picture look on the red arrows were the items appears, please i really want this mod, please help im sure we are almost done with this here is the picture , the problem is appear in that section and then like 4 seconds the item dissapeair, sorry for my bad inglish i speak spanish, please check the picture.
(http://img199.imageshack.us/img199/788/uuul.th.jpg) (http://img199.imageshack.us/i/uuul.jpg/)
hi all
i've just put this shoutbox back on my forum to see how it's come on in the last year and when we try to submit a shout it just refreshes the forum page.........anyone know how to fix this please ?
Dave
i have another problem this time i need to put this code in the Notifying users of new topics and replies in the forum mod but i have a doub, my invisible forums ids are 212 and 211.
how i use this part of code to make this 2 forums invisible in the notification on the chat?
if(!in_array($board, array(<BoardIDs>))) {
// YSHOUT -- NOTIFICATION
...
// YSHOUT -- NOTIFICATION END
}
Quote from: mr_fix_it on June 16, 2009, 01:00:06 PM
hi all
i've just put this shoutbox back on my forum to see how it's come on in the last year and when we try to submit a shout it just refreshes the forum page.........anyone know how to fix this please ?
Dave
I'm using SMF 2.0 RC1-1
Dave - I noticed that when I installed the mod on my page, some of the folders weren't created correctly in the "yshout" folder in the root. What you want to go ahead and do is locate the shoubox package that you downloaded, uncompress it, and copy the folders over that are missing/set as 0byte files. The ones that I had to change were: "chats" and "js" folders in the "yshout" folder. This fixed my problem.
My only issue now is that I don't see any menu options in the admin area for the shoutbox. This isn't a HUGE issue, as it works fine out of the box, but I'd love to be able to change the settings as I'm supposed to. I looked through the thread briefly, but...didn't see a fix... If someone knows, lemme know...if not, then I'll try and make it work for me.
Quote from: jkrlvgn on June 17, 2009, 10:47:21 AM
Quote from: mr_fix_it on June 16, 2009, 01:00:06 PM
hi all
i've just put this shoutbox back on my forum to see how it's come on in the last year and when we try to submit a shout it just refreshes the forum page.........anyone know how to fix this please ?
Dave
I'm using SMF 2.0 RC1-1
Dave - I noticed that when I installed the mod on my page, some of the folders weren't created correctly in the "yshout" folder in the root. What you want to go ahead and do is locate the shoubox package that you downloaded, uncompress it, and copy the folders over that are missing/set as 0byte files. The ones that I had to change were: "chats" and "js" folders in the "yshout" folder. This fixed my problem.
My only issue now is that I don't see any menu options in the admin area for the shoutbox. This isn't a HUGE issue, as it works fine out of the box, but I'd love to be able to change the settings as I'm supposed to. I looked through the thread briefly, but...didn't see a fix... If someone knows, lemme know...if not, then I'll try and make it work for me.
thanks for that.......i have now tried this and it's still not working.......?
Dave
This is a great mod and i am using this sbox in my smf 2 rc1-1 with default theme. I want to ask a question 'How to remove [history]and[command] placed above sbox?
i have now got this shoutbox working but i removed the text from the top that says Shout Box but it's now leaving a blank space where the text was.......anyone know how to take out the space please ?
Dave
Hi,
when I include this :
<script type="text/javascript" src="/jquery-1.2.1.pack.js"></script>
In my pages, The shoutbox disappears.
How can I solve this?
Anyone using it for SMF 1.1.9 and working properly?
Cuz on the mod page i only see its working with 1.1.8
It should work just fine with 1.1.9.
Whats de difference then between:
* AdvSB_1.22.zip
and
* SB_1.22.zip
Both work on SMF 1.1.9? What are the main differences?
AdvSB_1.22 (Advnaced Shoutbox) is a compilation of many of the feature requests such as sound, icons instead of text for links, general look and layou, etc.
Is it possible to add a horizontal line after every shout?
I think it gives me my users a better overview.
I'm using 1.1.9 and nneonneo's AJAX ShoutBox 1.22
use the AdvSB_1.22 which is nneonneo's shoutbox with horizontal line and other stuff added to it
Thx for the reply.
I uninstalled the old one, tried to install the advanced one, but the packet manager cant create the files.....told me i has to insert ftp-data, I gave em everything and it does nothing. So I installed Profile-Managment-Mod, to see if my ftp-access is broken, without problems. Reinstalled the old 1, everything works fine. Ok I can life with that. Littlebit confused but it's OK.
Attach your yshout.php here and I will add those horizontal lines for you.
Hmm this would be great
Oops Sry, typed the letters wrong and attached it twice :/
Try it now. It should be what you wanted.
Yeahr that's perfect, THANK you a lot....great support....now I can go to bed :)
SunKing, Do you know why when I include jquery-1.2.1.pack.js in the page, Shoutbox stops working? I need to include this js file to work some ajax myself.
It has to do with OnLoad events. The shoutbox loads an event and then jquery loads an event effectively disabling the SB's event. There are workarounds where you have multiple onload events. Google for it....there are several workaround methods. Unfortunately, I do not remember any of them off the top of my head. ;D
Quote from: asmith on June 21, 2009, 11:26:04 PM
SunKing, Do you know why when I include jquery-1.2.1.pack.js in the page, Shoutbox stops working? I need to include this js file to work some ajax myself.
why are you using such and old version?
When I do the workaround for the multiplae onload events, Where in shoutbox I must modify?
The workaround I used edited the body tag in the index.template.php.
My body tag does not have anything about onload.
shoutbox onload is being fired somewhere else.
You add an onload event to the body tag which in turn loads addtional events.
hi i am using smf 1.1.9 with ReDark theme. This mod installed sucessfully. Since i am not using default theme, so i make changes in index.template.php file of my theme. I want to place the sbout below the news. In the manual this code is given:-
Quote// 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
Where to insert in index.template.php file, so that shout box visible just below the news ?
You don't. You edit the boardindex.template.php to put the shoutbox there.
But where to put above code in boardindex.template.php, so that it appear below news?
You will see a block of code labeled "news fader". Put it after that. I will give better instructions when I get home if you need.
thanks alot sunking, you are simply genius. I sucessfully placed the sbox below the news fader but there is 1 line always comes up automatically after it loads. The line is:-
"Notice: Undefined index: naffiliatessn in /home/orpat100/public_html/Sources/Load.php(1987) : eval()'d code on line 394 "
How to remove it? And one more thing, i want to change the color of all texts like user shouts, commands,etx, currently it is black. My theme background is also black, so it is visible clearly.
Fatal error: Call to undefined function shoutbox() in /home/a9603718/public_html/Sources/Load.php(2295) : eval()'d code on line 379
i got this error when i tried to install advande_shoutboux by neoneo's
mysite is http://pinoygroundz.comuf.com
ill attached my load.php
@delhi
That error is from affiliates mod.
@hero
You need to add the shoutbox function to the bottom of your themes index.template.php
Quote from: SunKing on June 24, 2009, 09:29:23 AM
@hero
You need to add the shoutbox function to the bottom of your themes index.template.php
but the error is in load.php
No, the error is eval'd in Load.php.
how can i fix this? can you tell me step by step? thank you or shoud i edit my load.php
Do not mess with the load.php
You said it is affiliate error, so i have to uninstall it first?
And one more thing, i want to change the color of all texts like user shouts, commands,etx, currently it is black. My theme background is also black, so it is not visible clearly. Or tell me how to set white color background of shoutbox?
@delhi
Just ask in the appropriate mod thread about the affiliates error. As far as changing the text color, that can be controlled by the <style> stuff listed in your header right with the yshout code. Change #yshout #shouts { /* main shouts area */
}
to #yshout #shouts { /* main shouts area */
color:#ffffff;
}
Hi,
using nneonneo's AJAX ShoutBox for a long time (version 1.11).
Today I asked my host to change PHP to 5 and, after some problems with my sites...., it stop working
Now only the "...loading shoutbox..." is shown :'(
I use english default theme but I cannot remember how I made some changes to show it in a separate board, bla, bla, bla ...
So... is there a easy way to try to fix it? Will I have to manually... delete it? >:(
Any help?
EDIT: SOLVED! :D
PHP 5 : it does not accept 777 permission. I changed to 755 and everything is okay now! ;)
Quote from: mr_fix_it on June 18, 2009, 04:56:10 PM
i have now got this shoutbox working but i removed the text from the top that says Shout Box but it's now leaving a blank space where the text was.......anyone know how to take out the space please ?
Dave
anyone know how to sort this please ?
Hello. I am using AdvSB_1.22 for SMF 1.1.9. I thought I installed everything correctly, but I got this error:
Fatal error: Call to undefined function allowedto() in /home/public_html/forums/yshout/yshout.php on line 69
And here are lines 62-74 of yshout.php:
62- // Are you banned from reading the shoutbox?
63- if(in_array($ip, $ban_ips_readpost) || in_array($user['username'], $ban_names_readpost) || in_array($user['name'],
64- $ban_names_readpost))
65- {
66- echo $txt['yshout_banned'];
67- return;
68- }
69- if(allowedTo('yshout_view'))
70- {
71- if(isGuest())
72- echo $txt['yshout_no_guests'];
73- return;
74- }
I have no idea what I should do. Can anyone help me out?
is that "allowedTo" or "allowedto" just guessing lol
I got that error before too, but it seemed to fix itself.
Okay, I have the SB installed, and did so manually.
I have a few errors and questions if I may.
1. I get this in the shoutbox and it wont go away
QuoteNotice: Undefined offset: 1 in /var/www/testforum/Sources/TPSubs.php on line 181
2. NO smileys option
3. and MOST important, the SB is growing with every shout, making the site Lonnnnnnng. How do I edit or adjust this.?
4. Oh and yeah, I DO NOT want it on my Home page, how to remove it from on the home page..?
Thanks in advance for any assistance for this NOOB :P
Here's some answers:
For 2) you need to add smileys manually - see link in first post of this topic on how to do it.
For 4) If you don't want it on the home page download Cutom Actions Mod (http://custom.simplemachines.org/mods/index.php?mod=331) and insert second code in empty field box.
That will make it show on custom page.
for 3) find in the css (either in yshout.css or in the head section of index.template.php) #yshout #shouts { and on a new line under that add these two lines:
height:200px; /* whatever height you want */
overflow:auto; /* adds scrollbar - change auto to hidden to hide it */
Can i have the turkish translation manual, Thanks,
Dubish
please check this and help me..its urgent help pls...
http://www.simplemachines.org/community/index.php?topic=321359.0
Hey guys.
Today i did move all my forum to a new hosting.
Everything was right, but i have a problem with Shoutbout History.
I CAN'T SEE ALL SHOUTBOX HISTORY!!!!
Always appear this.
Shout Box History
Fatal error: Out of memory (allocated 40108032) (tried to allocate 16252928 bytes) in /home/techno1n/public_html/yshout/class.tail.php on line 228
This is my forum: http://technoinvite.net
Someone would help me ? what's wrong? :(
Quote from: nneonneo on August 19, 2007, 03:39:56 PM
Adding sound:
Get SoundManager2 (http://www.schillmania.com/projects/soundmanager2/)
Place soundmanager2.js in yshout/js
Place soundmanager2.swf in yshout/
Place the desired sound in yshout/ and change the URL below to match (MUST BE MP3!)
Place the following code after
<script src="',$boardurl,'/yshout/js/yshout.js?July062008" type="text/javascript"></script>
in index.template.php:
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">soundManager.url="',$boardurl,'/yshout/";
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function() {
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/sound.mp3", autoPlay:false});
}</script>
(if it does not work, you may have an older soundmanager2, try adding "soundmanager2.swf" after soundManager.url="',$boardurl,'/yshout/)
In yshout/js/yshout.js, after
function shoutDone() {
add
$('shouts').innerHTML = this.transport.responseText;
oldShouts = $('shouts').innerHTML;
(that step is optional, but it stops the sound when you shout, and only sounds when others shout)
Replace
var request;
// This gets called each refresh; it reloads the shoutboxes content.
by
function ltrim(text) {
return text.replace(/^\s*/g,'');
}
var request;
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML))
soundManager.play('sound');
oldShouts = $("shouts").innerHTML;
EDIT: Update for newer Soundmanager version (dated Mar 31 2008)
EDIT2: Complete instructions.
EDIT3: Update for new shoutbox versions (1.20+)
Hey i cant get this to work has it been updated recently? after i do these modifications every time i shout it just directs me to the top of the page. Im running version 1.22 with smf 2-1
i solved problem myself....
Hey guys.
Today i did move all my forum to a new hosting.
Everything was right, but i have a problem with Shoutbout History.
I CAN'T SEE ALL SHOUTBOX HISTORY!!!!
Always appear this.
Shout Box History
Fatal error: Out of memory (allocated 40108032) (tried to allocate 16252928 bytes) in /home/techno1n/public_html/yshout/class.tail.php on line 228
This is my forum: http://technoinvite.net
Someone would help me ? what's wrong? :(
someone would help me?
Quote from: elfugazi on July 02, 2009, 08:17:37 PM
Hey guys.
Today i did move all my forum to a new hosting.
Everything was right, but i have a problem with Shoutbout History.
I CAN'T SEE ALL SHOUTBOX HISTORY!!!!
Always appear this.
Shout Box History
Fatal error: Out of memory (allocated 40108032) (tried to allocate 16252928 bytes) in /home/techno1n/public_html/yshout/class.tail.php on line 228
This is my forum: http://technoinvite.net
Someone would help me ? what's wrong? :(
It means, that your VPS / Server has to low RAM.
Make some Apache tuning (if you are not on a shared hosting), or change your Webserver to lighttpd / nginx / litespeed - all this webservers use much less resources than apache.
Or add more RAM to your server ;)
Hi i am using smf 1.1.9 with ReDARK theme. This mod install sucessfully but 2 error line are displaying everytime as shoutbox load. The error line is same. First time appear after page loaded and second time it appear when user shout 1st time. Location is within sbox. This is the error:-
error now i am getting after disabling eval code:-
Undefined index: naffiliatessn
File: /home/orpat100/public_html/Themes/default/languages/Modifications.english.php
Line: 394
Where abouts in index.template.php would I put the code to make it appear just above the forum board index [Just under the main menu]
@DELHI_BOY
That error has nothing to do with the shoutbox. The shoutbox simply shows any error your forum may be having. That error is from an affiliates mod. You need to post your error in the thread for the affiliates mod you have installed.
@alex clone
Find // Show the menu here, according to the menu sub template.
template_menu();
and put the shoutbox code just after it.
Quote from: master2oo8 on July 04, 2009, 09:33:40 AM
Quote from: elfugazi on July 02, 2009, 08:17:37 PM
Hey guys.
Today i did move all my forum to a new hosting.
Everything was right, but i have a problem with Shoutbout History.
I CAN'T SEE ALL SHOUTBOX HISTORY!!!!
Always appear this.
Shout Box History
Fatal error: Out of memory (allocated 40108032) (tried to allocate 16252928 bytes) in /home/techno1n/public_html/yshout/class.tail.php on line 228
This is my forum: http://technoinvite.net
Someone would help me ? what's wrong? :(
It means, that your VPS / Server has to low RAM.
Make some Apache tuning (if you are not on a shared hosting), or change your Webserver to lighttpd / nginx / litespeed - all this webservers use much less resources than apache.
Or add more RAM to your server ;)
buy more RAM? :( Oh no man, i can't do it.
i would delete all history log to starts again? teach me how do it :)
Quote from: mr_fix_it on June 18, 2009, 04:56:10 PM
i have now got this shoutbox working but i removed the text from the top that says Shout Box but it's now leaving a blank space where the text was.......anyone know how to take out the space please ?
Dave
can anyone help me with this please ?
Quote from: ameo on June 28, 2009, 11:11:06 AM
Here's some answers:
For 2) you need to add smileys manually - see link in first post of this topic on how to do it.
For 4) If you don't want it on the home page download Cutom Actions Mod (http://custom.simplemachines.org/mods/index.php?mod=331) and insert second code in empty field box.
That will make it show on custom page.
Thanks for help on these, all is good except for 1
The mod to REMOVE shoutbox from home page "tiny portal" is not compatable with 1.1.8 smf. And I have not yet upgraded site as I will have to do it manually since my package manager isnt working.
So I ask for the last question..? Is their another way to remove the SB from the home page.
http://www.combatlifesavers.us
Thanks
i have a theme with a ad box how do i put the shoutbox where ads should go instead of the ads
@ airborne - you should be able to remove it from home page by removing that second code from your index.template.php . It is enough for it to be in custom actions box, now.
@ evolution 25 - if you wish someone to help you you need to provide more information. at least link to your forum, and your index.template.php file.
please help with my question :(
Quote from: elfugazi on July 14, 2009, 11:35:52 AM
please help with my question :(
There should be a file php.ini in the root folder of your forum. You can edit it to arrange for more RAM eg:
memory_limit=32M
We have installed the shoutbox on SMF2, but cannot find a way to view the shoutbox history. Can anyone help?
how do i put the shoutbox in the middle right before the forum where would i put the code
Quote from: ameo on July 13, 2009, 07:07:45 AM
@ airborne - you should be able to remove it from home page by removing that second code from your index.template.php . It is enough for it to be in custom actions box, now.
Thanks but no cigar...
Removing the second block of code, removes it from forum as well... :-(
please help , i'm trying to install the mod ... after the test ... these are the report of test ..
2. Execute Modification themes/install-1.1.xml Modification parse error
3. Execute Modification - Modification parse error
4. Execute Modification languages/english_all.xml Modification parse error
5. Execute Modification - Modification parse error
6. Execute Modification permissions/install-perms-1.1.xml Modification parse error
7. Execute Modification - Modification parse error
and came with error log after tested as below ...
2: fclose(): supplied argument is not a valid stream resource
File: /home/janichan/domains/*/public_html/Sources/Subs-Package.php
Line: 1908
2: fopen(/home/janichan/domains/janicha.net/public_html/index.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied
File: /home/janichan/domains/janicha.net/public_html/Sources/Subs-Package.php
Line: 1901
Please help , thank you in advance.
hello nneonneo, how can i disable HISTORY on other members? Thanks!
Quote from: ClOuD_Za on July 16, 2009, 04:55:41 PM
please help , i'm trying to install the mod ... after the test ... these are the report of test ..
2. Execute Modification themes/install-1.1.xml Modification parse error
3. Execute Modification - Modification parse error
4. Execute Modification languages/english_all.xml Modification parse error
5. Execute Modification - Modification parse error
6. Execute Modification permissions/install-perms-1.1.xml Modification parse error
7. Execute Modification - Modification parse error
and came with error log after tested as below ...
2: fclose(): supplied argument is not a valid stream resource
File: /home/janichan/domains/*/public_html/Sources/Subs-Package.php
Line: 1908
2: fopen(/home/janichan/domains/janicha.net/public_html/index.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied
File: /home/janichan/domains/janicha.net/public_html/Sources/Subs-Package.php
Line: 1901
Please help , thank you in advance.
Still looking for help .... please.
Can you help me nneonn ?? i get this error after i paste the code you gave us to paste in the index.template.php for custom templates.
http://www.simplemachines.org/community/index.php?topic=325013.0
alright i managed to paste it in another place the code and i finally dont get any errors anymore the thing now is that .. i can view the shoutbox ONLY as admin accessuser... regular users cant view it at all.
why?
You must enable it in Permissions for all membergroups. That's been answered dozens of times already. Please use search for future reference.
I'm not sure if this has been mentioned before..
(I didn't find it in the search function)
I noticed the /clear command only clears up the history that shows on the current screen.
It does not erase the the entire history file therefore manually clearing the file with an editor is necessary.
So I made a slight modification to the Shout Box that adds a proper erase procedure.
-------------------------------------------
Adding the /erase history command:
Navigate to ...Your site/public_html/yshout.php
Find:
case "/clear":
global $chatPath, $historyPath;
$fileContents='';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$handle=fopen($chatPath, 'w');
fputs($handle,'');
fclose($handle);
if($historyPath !== '')
{
$handle=fopen($historyPath, 'a');
fputs($handle,$fileContents);
fclose($handle);
}
return true;
Add this after above code:
case "/erase":
global $chatPath, $historyPath;
$fileContents='';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$handle=fopen($historyPath, 'w');
fputs($handle,'');
fclose($handle);
if($historyPath !== '')
{
$handle=fopen($historyPath, 'a');
fputs($handle,$fileContents);
fclose($handle);
}
return true;
---------------------------------
Navigate to:
Your site/public_html/Themes/default/languages/Modifications.english.php
or if you use utf-8 settings go to:
Your site/public_html/Themes/default/languages/Modifications.english-utf8.php
Find:
$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' => ' <message>: Emotes the message (e.g. <span class="meaction"> * Nathaniel likes dogs</span>)');
$txt['yshout_cmdlistadmin'] = array(
'/clear' => ': Completely empty the Shout Box.',
Add this after above code:
'/erase' => ': Erase entire Shout Box history.',
Done.
---------------------------------
Now you can use the /erase command to erase the entire history of the Shout Box.
Note: If you only use the /erase command it will erase the extended history and put what is showing on your screen in there (recent history). If you want to erase absolutely everything... use the /clear command followed by the /erase command.
UD
Need Help ...
After I edit my custome template code.
Shoutbox got the whole page triple times sequently.
I'm using SUNSET theme with 2.0 RC2
hi
i just updated SMF 1.1.9 to SMF 1.1.10 but Shoutbox do not works ? when i try to install again i got message that the file is maybe corupted and not for that version, could u please helkp on thios , is teher working copy for smf 1.1.10
THANKS
Hi nneonneo,
how i can put the shoutbox only in the index page of the forum (not in all bords/pages of the forum)??
thanks!
Hello, if anybody can check. www.raitq.kim3.pl/smf - shoutbox doesnt work - only refreshes page and no submitting - works good on standard layout
edit: works, osrry
how do i put shoutbox as a portamx block
Nneonneo:
I love this mod and it is working great for me! I do have one question though that I was hoping you could help me with. They would not help me in the general help area for this so hopefully you can. Please see the link below to my other thread. Thanks!
http://www.simplemachines.org/community/index.php?topic=326404.0
I'm not sure if anybody can help but here:
(http://i26.tinypic.com/10qm6o2.png)
Notice, there's two boxes to post a shout (One surrounded by white, another above it..)
The top one works, the bottom doesn't.
We haven't tested it in every browser but in firefox, it is like that.. In opera, it is not.
I downloaded the mod via a firefox browser, I can not find the mod in my admin screen in SMF. so it is sitting in a folder on my desktop.
I have no problem with FTP to my server, I just do not know what to do with the files in the mod folder on my desktop.
The only think I am able to update in SMF is the SMF version the only "packeges I can see are some jeep avitars and I can not browse for anything else, when I try to connect to the SMF server it tell me to go to the SMF url
Sorry to sound like such a retard here but I have only had the form for about a week
hey nneonneo, maybe you can give me some advice for this tiny shoutbox problem:
Everytime the History file (history.home.txt f.i.) is getting bigger than approx. 5mb, noone can read the history anymore by clicking the history link of the shoutbox, or specifing an "how far to go back" value. If we click on the history link, just a white page appears with nothing in it.
So everytime the history file is bigger than approx. 5mb I have to manually delete it and then the history works again until it's 5mb in size again...
and it's getting uncomfortable as the history is getting 5mb in size every week instead of every month or so...
I was wondering if it is only a matter of some variables in your code, or if it is a technical issue with php or my webspace server..
if there is a simple solution for this problem, let me know :)
thx so far and keep up your good work!
vast, how in the world underdog's post on this page wouldn't help you? it explains everything you need to do to fix your issue.
Quote from: ameo on July 27, 2009, 08:00:56 AM
vast, how in the world underdog's post on this page wouldn't help you? it explains everything you need to do to fix your issue.
because it does not solve my problem.
it is just another way to delete the extended history.. it does not solve the ~5mb max-history-file problem.
I was looking for a solution which does one of the following:
- extend the maximum file size limit of the extended history file (larger than ~5mb, up to no limit - well, maybe I should mention: the file is getting bigger than ~5mb+ everything is in this file, but when clicking on the history link it cannot open and show files larger than ~5mb+)
- history volumes. automatically create new extended history files when they reach approx 5mb.
- max size of history file is approx. 5mb, BUT all new lines kick the oldest lines out of the file. would work too.
Here are my changes to ASB 1.22 and SB 1.22
1. Clicking on username puts "To <username>:" into msg form
Open /yshout/yshout.php and search for:
if(loadMemberData(Array($user['id']),false,'profile')!==false)
{
$profile=$user_profile[$user['id']];
$a_style = ' class="userclass" style="color: '.(empty($profile['member_group_color']) ? $profile['post_group_color'] : $profile['member_group_color']).'"';
}
2. Podmieniamy tym kodem:
if(loadMemberData(Array($user['id']),false,'profile')!==false)
{
$profile=$user_profile[$user['id']];
$a_style = ' class="userclass" style="color: '.(empty($profile['member_group_color']) ? $profile['post_group_color'] : $profile['member_group_color']).'"';
if(empty($profile['member_group_color']))
$userColor = '#cd4a2c';
else
$userColor = $profile['member_group_color'];
}
We need to change on #cd4a2c to color of our user without special color group$userColor = '#cd4a2c';
Search for:
$shoutName=$user['name'];
$userID=$user['id'];
if(isGuest($user))
$writeText=$shoutName;
else
$writeText="<a$a_style href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
$writeText.=": $text";
makeRawShout($writeText,$user);
}
Replace with:
$shoutName=$user['name'];
$userID=$user['id'];
if(isGuest($user))
$writeText=$shoutName;
else
$writeText="<a href=\"index.php?action=profile;u=$userID\"><img src=\"http://burning-brushes.pl/Themes/BB/images/profil.gif\" /></a> <a$a_style href=\"javascript:void(0);\" onclick=\"replaceText('To [color=$userColor][i][b]$shoutName"."[/b][/i][/color]: ', document.forms.shout_form.shout_text); return false; \">$shoutName</a>";
$writeText.=": $text";
makeRawShout($writeText,$user);
}
And we replace http://burning-brushes.pl/Themes/BB/images/profil.gif
with
http://domain.com/Themes/ourtheme/images/profil.gif
It will give us small icon near username (it links to user's profile)
2. Hidding form with nickname
#yshout #forum-name {
Right after this, we add:
display: none;
3. Moving toolbar at bottom (only Advanced Shoutbox!)
Open /yshout/yshout.php and find:
/ Tool links (History, Commands, etc.)
echo '<div id="yshout-toollinks" style="text-align: left; margin-top: 5px;">';
// Commands
echo '<a href="javascript:goTo(\'help\')" onclick="NewWindow(getURL(\'help\'),\'help\',\'620\',\'440\',\'no\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/info.png" alt="',$txt['yshout_commands'],'" /></a> ';
// History
echo '<a href="javascript:goTo(\'history\')" onclick="NewWindow(getURL(\'history\'),\'history\',\'620\',\'440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/date.png" alt="',$txt['yshout_history'],'" /></a> ';
// Shout Sound Control
if(!isset($_COOKIE['shoutSound']))
echo '<a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/unmute.png" alt="UseSound" /></a> ';
else
echo '<a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/mute.png" alt="NoSound" /></a> ';
// Extended History
if(isMod())
{
echo '<a href="javascript:goTo(\'history&n=+100000\')" onclick="NewWindow(getURL(\'history&n=+100000\'),\'exthistory\',\'620\',\'440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/calendar.png" alt="',$txt['yshout_exthistory'],'" /></a> ';
// Admin Links
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' <a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/cog_delete.png" alt="',$txt['yshout_hide'],$txt['yshout_admlinks'],'" /></a>';
else
echo ' <a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/cog_add.png" alt="',$txt['yshout_show'],$txt['yshout_admlinks'],'" /></a>';
// Return to Chat
// echo ' <a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>';
}
echo '</div>'; // yshout-toollinks
Cut it and paste right after this:
// Shout form
echo '
<form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;">
<fieldset>';
4. Fix opening in new window
Advanced Shoutbox 1.22
Open /yshout/yshout.php and replace this:
// Commands
echo '<a href="javascript:goTo(\'help\')" onclick="NewWindow(getURL(\'help\'),\'help\',\'620\',\'440\',\'no\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/info.png" alt="',$txt['yshout_commands'],'" /></a> ';
// History
echo '<a href="javascript:goTo(\'history\')" onclick="NewWindow(getURL(\'history\'),\'history\',\'620\',\'440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/date.png" alt="',$txt['yshout_history'],'" /></a> ';
with this:
// Commands
echo '<a href="javascript:goTo(\'help\')" onclick="window.open(getURL(\'help\'),\'help\',\'width=620,height=440\',\'resizable=no\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/info.png" alt="',$txt['yshout_commands'],'" /></a> ';
// History
echo '<a href="javascript:goTo(\'history\')" onclick="window.open(getURL(\'history\'),\'history\',\'width=620,height=440\',\'resizable=yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/date.png" alt="',$txt['yshout_history'],'" /></a> ';
and this:
// Extended History
if(isMod())
{
echo '<a href="javascript:goTo(\'history&n=+100000\')" onclick="NewWindow(getURL(\'history&n=+100000\'),\'exthistory\',\'620\',\'440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/calendar.png" alt="',$txt['yshout_exthistory'],'" /></a> ';
with this::
// Extended History
if(isMod())
{
echo '<a href="javascript:goTo(\'history&n=+100000\')" onclick="window.open(getURL(\'history&n=+100000\'),\'exthistory\',\'width=620,height=440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/calendar.png" alt="',$txt['yshout_exthistory'],'" /></a> ';
[/code]
Shoutbox 1.22
Open /yshout/yshout.php and replace this:
echo '[<a href="javascript:goTo(\'history\')">',$txt['yshout_history'],'</a>] ';
echo '[<a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>]';
with this:
echo '[<a href="javascript:goTo(\'history\')" onclick="window.open(getURL(\'history\'),\'history\',\'width=620,height=440\',\'resizable=yes\',\'center\');return false" onfocus="this.blur()">',$txt['yshout_history'],'</a>] ';
echo '[<a href="javascript:goTo(\'history\')" onclick="window.open(getURL(\'history\'),\'history\',\'width=620,height=440\',\'resizable=yes\',\'center\');return false" onfocus="this.blur()">',$txt['yshout_commands'],'</a>]';
Here you can download profile icon:
(http://burning-brushes.pl/Themes/BB/images/profil.gif)
http://burning-brushes.pl/Themes/BB/images/profil.gif
http://burning-brushes.pl/Themes/BB/images/profil.gif
This is how my ASB looks like:
(http://burning-brushes.pl/imghost/uploads/34c69aa5ef.png)
http://burning-brushes.pl/imghost/uploads/34c69aa5ef.png
http://burning-brushes.pl/imghost/uploads/34c69aa5ef.png
All those changes are written by me.
Regards - voythas.
Burning-Brushes.pl (http://burning-brushes.pl/) | voythas deviantArt (http://voythas.deviantart.com/)
Is the mod compatible with the newest RC? SMF 2.0 rc1-2? The reason I ask is that I have just upgraded my forum from 2.0 rc1 to rc1-2 and the shoutbox has stopped working.
I also tried installing the shoutbox on a fresh smf 2 rc1-2 install and its not working there either. The shoutbox displays, but you cannot post anything or use any of the links.
I'm trying determine if the mod just isnt compatible, or if there is a server issue.
Quote from: wrbex on January 20, 2009, 05:51:48 PM
Quote from: kabu on December 18, 2008, 04:12:02 PM
Hi I used the search in this topic but I couldn't find the answer.
My problem is I have auto embeded video clips mod installed and whenever someone types a link of say a youtube video the video is embeded onto the shoutbox. When you click the play button the video plays for a while and then stop playing. I'm guessing because the shoutbox is auto refreshed?
Is there anyway to stop the auto embed without removing the auto embed mod?
I have same problem..i have instaled AEVA mod...
Any "fix" for this?
If this hasn't been answered:
find:
$text = parse_bbc($text);
replace with:
$context['aeva_disable'] = 1;
$text = parse_bbc($text);
$context['aeva_disable'] = 0;
This disables Aeva in the Shoutbox.
does anyone know how change color of shoutbox and put it in a portamx block
add scroll shows already installed but is not scroll bar
Quote from: zach21uk on July 28, 2009, 10:09:38 AM
Is the mod compatible with the newest RC? SMF 2.0 rc1-2? The reason I ask is that I have just upgraded my forum from 2.0 rc1 to rc1-2 and the shoutbox has stopped working.
I also tried installing the shoutbox on a fresh smf 2 rc1-2 install and its not working there either. The shoutbox displays, but you cannot post anything or use any of the links.
I'm trying determine if the mod just isnt compatible, or if there is a server issue.
Does anyone know this?
Quote from: zach21uk on July 29, 2009, 03:40:03 AM
Quote from: zach21uk on July 28, 2009, 10:09:38 AM
Is the mod compatible with the newest RC? SMF 2.0 rc1-2? The reason I ask is that I have just upgraded my forum from 2.0 rc1 to rc1-2 and the shoutbox has stopped working.
I also tried installing the shoutbox on a fresh smf 2 rc1-2 install and its not working there either. The shoutbox displays, but you cannot post anything or use any of the links.
I'm trying determine if the mod just isnt compatible, or if there is a server issue.
Does anyone know this?
I've got it working fine on SMFRC1.2 - had to logout and in again and do a cache clear I will admit - and some of my users had to do a forced refresh to be able to post (once the permissions had been sorted). But it is working fine for me.
Quote from: underdog_01 on July 20, 2009, 01:27:47 AM
I'm not sure if this has been mentioned before..
(I didn't find it in the search function)
I noticed the /clear command only clears up the history that shows on the current screen.
It does not erase the the entire history file therefore manually clearing the file with an editor is necessary.
So I made a slight modification to the Shout Box that adds a proper erase procedure.
You freakin' rock! Thanks for the great tip!
how to change the refresh rate of nneonneo's shoutbox?
I am using nneonneo's AJAX Shoutbox 1.22
Please help...
Quote from: lyer on July 30, 2009, 01:30:31 AM
how to change the refresh rate of nneonneo's shoutbox?
I am using nneonneo's AJAX Shoutbox 1.22
Please help...
Open your /yshout/settings.js file and edit:
var refreshTime=150;
I have today installed the shoutbox on to smf SMF 2.0 RC1.2.
And when on index page here : www.exoticforums.co.uk.
I getting this error when iam a member or guest???
Shout Box
Fatal error: Call to undefined function allowedTo() in /home/reptiles/public_html/yshout/yshout.php on line 69
How can i fix this please, hope someone can help me out, thankyou in advance :)
Have an older version on a website that works fine. New version on new website has the following issue:
Hitting enter or pressing "Shout" does not post the text. If not at Home, it will refresh you at Home when you shout.
I've tried chmodding the folder and contents to 777. Also checked all membergroups to have permission.
how can i add more commands i looked at the yshoutl.php file
and added
case "/j":
$newText = cleanupShout($args.' ');
$shoutName=$user['name'];
makeRawShout("<span class=\"meaction\"> * $shoutName rolls a joint</span>",$user);
return true;
to the function processUserCommand($text) {
but it dont work is ther anything else i need todo ?
nver mind i fagard it out was looking in the wrong file lol
ok seems im nealy there
i added
case "/c":
$newText = cleanupShout($args.' ');
$shoutName=$user['name'];
makeRawShout("<span style=\"color: blue\"> 3</span>",$user);
makeRawShout("<span style=\"color: blue\"> 2</span>",$user);
makeRawShout("<span style=\"color: blue\"> 1</span>",$user);
makeRawShout("<span style=\"color: blue\"> GO</span>",$user);
return true;
to get count down 321 go it work but not properly it prints the shout out many time seems like it duplicates the shouts allready there then adds the coundown can u see any thing wring with it ?
I get an error on installation (on of the Find/replace things) what should i do? i really want this lol
I'm having some problems too.
I successfully installed the mod,and it works perfectlt on the default theme. ;)
But I want to add the chatbox on my other theme(no default)
I'm using the "kelo-it" theme and I want the shoutbox on there.
Here's the index.template.php
<?php
// Version: 1.1.5; 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.5';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
$settings['use_image_buttons'] = true;
/* 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, $language, $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 ?finll 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" />
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/ie6lte.css?fin11" />
<![endif]-->';
/* 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']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}
// 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>
</head>
<body>
<div id="wrapper">
<div id="header-l">
<div id="header-r">
<div id="header">
<div id="logo">';
if (empty($settings['header_logo'])){
echo '<a href="'.$scripturl.'" title="" class="logo-txt">', $context['forum_name'], '</a>';
}
else {
echo '<a href="'.$scripturl.'" title="" class="logo"> </a>';
}
echo'
</div>
</div>
</div>
</div>
<div id="mainnav-l">
<div id="mainnav-r">
<div id="mainnav">
',template_menu(),'
</div>
</div>
</div>';
echo'
<div id="userbar-l">
<div id="userbar-r">
<div id="userbar">
<div id="topbar">';
// The information that will be shown to the member when he/she is logged on
if($context['user']['is_logged'])
{
echo '
<div id="loggedin">
<b>', $txt[248], '</b> ', $context['user']['name'];
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ',<br />', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'], '.';
echo '
</div>
<div id="loggedin2">
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>
</div>';
}
// The login box which will only be shown to the guests
else
{
echo '
<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" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input name="user" type="text" onfocus="if(this.value==\'', $txt[35], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[35], '\';" value="', $txt[35], '" />
<input name="passwrd" type="password" onfocus="if(this.value==\'', $txt[36], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[36], '\';" value="', $txt[36], '" />
<input name="sa" class="submit" src="', $settings['images_url'], '/custom/go_icon.png" type="image" value="', $txt[34], '" />
<input type="hidden" name="cookielength" value="-1" />
</form>';
}
echo'
</div>
<div id="searcharea">
<form action="', $scripturl, '?action=search2" method="post">
<input name="search" type="text" onfocus="if(this.value==\'', $txt[182], '\')value=\'\';" onblur="if(this.value==\'\')value=\'', $txt[182], '\';" value="', $txt[182], '" />
<input name="sa" class="submit" src="', $settings['images_url'], '/custom/go_icon.png" type="image" value="', $txt[182], '"/>';
// 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>
</div>
</div>
</div>
</div>';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo'
<div id="footer-l">
<div id="footer-r">
<div id="footer">
' ,theme_copyright(),' | Theme kelo-lt by <a href="http://padexx.de">padexx</a>
</div>
</div>
</div>';
echo'
<div id="footer2">';
// Show the load time?
if ($context['show_load_time'])
{
echo '
<p class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</p>';
}
// 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>
</div>
</div>
</body>
</html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $txt, $options;
echo '
<div class="pathway-l">
<div class="pathway-r">
<div class="pathway">';
// 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'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '">' . $tree['name'] . '</a>' : $tree['name'] , ' » ';
else
echo $tree['name'];
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
}
echo '</div></div></div><span style="display: none">kelo-lt Theme designed by <a href="http://padexx.de/" target="_blank" title="SMF Themes & webdesign solutions">padexx</a></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';
}
// Start of the tab section.
echo '
<ul>';
// Show the default [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'home' ? 'current' : '' , '"><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
// Show the [help] button.
echo ($current_action=='help' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'help' ? 'current' : '' , '"><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo ($current_action=='search' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'search' ? 'current' : '' , '"><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action=='admin' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'admin' ? 'current' : '' , '"><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action=='profile' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'profile' ? 'current' : '' , '"><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action=='pm' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'pm' ? 'current' : '' , '"><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action=='calendar' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'calendar' ? 'current' : '' , '"><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action=='mlist' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'mlist' ? 'current' : '' , '"><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action=='login' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'login' ? 'current' : '' , '"><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action=='register' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'register' ? 'current' : '' , '"><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action=='logout' || $context['browser']['is_ie4']) ? '' : '' , '
<li class="' , $current_action == 'logout' ? 'current' : '' , '"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
echo '</ul>';
// The end of tab section.
}
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
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> </td>';
echo '
<td class="buttons">', implode('</td><td class="buttons">', $button_strip) , '</td>';
}
function showcase()
{
global $settings, $buttons, $context, $txt, $scripturl;
// personal info etc.
echo '
<div class="userinfo">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '<h3>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</h3>';
echo '
<div id="useropts">
<ul>';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a> ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>', $txt[616], '</b></li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
echo '
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
</ul>
</div>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
', $txt['welcome_guest'], '
<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'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" />
<input type="password" name="passwrd" size="10" />
<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>
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />';
}
echo ' </div>';
echo '
<div class="searchfield">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 4px 0;">
<input type="text" name="search" value="" size="30" style="margin-bottom: 4px;" />
<input type="submit" name="submit" value="', $txt[182], '" style="margin-bottom: 4px;" /><br />
<b><a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a></b>
<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><br />
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '- ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span> -
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>
<div class="clr"></div>
';
}
?>
I would like to add the shoutbox on this theme if possible the same way it would look in the default theme.
Please if possbile add the nessesary sripts on my template,thank you.
hello how do you add this to a portamx block
(http://img269.imageshack.us/img269/8497/mysite.png)
i wonder how to put shoutbox in these section of my site? the red circle.. i want to my shoutbox in the portion.. im using blackday theme by nesianstyles..
EDIT: i found it
@ k2omonster - I've attached intdex template.php into this post - it should make your shoutbox show in kelo-lt.
note that you can't put shoutbox just anywhere - there are some positions where it can be. for special positions
you should ask people who make themes, i guess. they should have better knowledge in that.
@ evolution 25 - try with adding this piece of code in block:
<div id="yshout">Loading shoutbox...</div>
note that this is second piece of code and after you put first - usual and necessary piece of code for shoutbox to work,
you don't need to enter second one in index.template.php but THIS ONE into your portamx block.
if you didn't understand anything pm me, and i'll explain it more.
i cant understand the procedure you gave in Adding a smileys bar: i tried to follow your instruction but it gives parse error., im using SMF 2.0RC1-2
Hi, how to disable shoubox in viewforum and topics?
I'm using SB for SMF 2.0 RC1.2
maly_pirat
im currently using neoneo's shoutbox 1.22 and simple portal 2.2.2 how can i add the shoutbox to the portal block?
Is it possible to show Shoutbox only in board index - first page of forum?
Quote from: herohenson on August 12, 2009, 11:54:37 PM
im currently using neoneo\'s shoutbox 1.22 and simple portal 2.2.2 how can i add the shoutbox to the portal block?
As long as you have the nneonneo package installed correctly, using one of the initialize codes from the first page should work...
Create a custom html block and put this code in it...
(http://i766.photobucket.com/albums/xx301/askus/custom_nneonneo_html_block-1.jpg)
Place it where you want, change the background color, etc.
BTW - The smiley bar works great. I have it installed and working correctly.
UD
Hi, how to disable shoubox in viewforum and topics?
I'm using SB for SMF 2.0 RC1.2
maly_pirat
Quote from: ExSpirit on August 13, 2009, 12:23:30 AM
Is it possible to show Shoutbox only in board index - first page of forum?
UPDATE:I found a solution for this problem, this is simple ;-)
Description: SB be only show on index, on rest pages be disable.
1] Cut the php code responsible for show SB on all pages.
(// YSHOUT HERE - shoutbox code //
to // YSHOUT END - shoutbox code)
2] Open: BoardIndex.template.php (on the def style)
find:
template_info_center(); and before add code from #1
Thats all, SB show at bottom page
PS. Sorry for my English, it's not good ;-P
PS2. I tested on SMF 2.0 RC1.2 and darkbreak style.
Thx, I managed to move to to index only with moving
// Show the shoutbox!
shoutbox();
from index.template to BoardIndex.template.
I only have 1 more question, is it possible to make ShoutBox hidden by default? User can show/Hide it but when they first see it it's open...
Hello.
I have 1 big problem with this shoutbox, I can't use it even if i'm logged in. it just display msg that i must be loged in to use shoutbox. It happens on every theme that i use. Before i installed it on my site i tried it localy and it worked fine, on default theme and on other theme that i used.
I'm using SMF 1.1.10
Shoutbox version 1.22
Quote from: Yabco on August 14, 2009, 10:33:00 AM
Hello.
I have 1 big problem with this shoutbox, I can't use it even if i'm logged in. it just display msg that i must be loged in to use shoutbox. It happens on every theme that i use. Before i installed it on my site i tried it localy and it worked fine, on default theme and on other theme that i used.
I'm using SMF 1.1.10
Shoutbox version 1.22
Check your permissions.
UD
Quote from: 01_Underdog on August 14, 2009, 03:35:51 PM
Quote from: Yabco on August 14, 2009, 10:33:00 AM
Hello.
I have 1 big problem with this shoutbox, I can't use it even if i'm logged in. it just display msg that i must be loged in to use shoutbox. It happens on every theme that i use. Before i installed it on my site i tried it localy and it worked fine, on default theme and on other theme that i used.
I'm using SMF 1.1.10
Shoutbox version 1.22
Check your permissions.
UD
i've done that already, just frogot to mention :P
bu default only admin can see shoutbox, like i said in my previous post i can see shoutbox, but i cant use it because it say that im not loged in.
can you help me install advance shoutbox to my site? i cant install it, even manually.. thanks pm me
Quote from: Yabco
i've done that already, just frogot to mention :P
bu default only admin can see shoutbox, like i said in my previous post i can see shoutbox, but i cant use it because it say that im not loged in.
Navigate to
public_html / yshout / yshout.phpFind and compare the following code:
if(!allowedTo('yshout_view'))
{
if(isGuest())
echo $txt['yshout_no_guests'];
return;
}
// Check guest status and grab guest username
... I included the last line as a reference point in case your code is messed up.
Compare this part of the code to yours and make sure it matches.
Also locate this code from the same file:
find:
// Check user group membership
$user['is_sbmod']=false;
$user['can_sbpost']=false;
if(allowedTo('yshout_moderate'))
$user['is_sbmod']=true;
if(allowedTo('yshout_post'))
$user['can_sbpost']=true;
if($loadedFromSMF)
{
// Initialize the shoutbox and quit
initShoutbox($user,true);
return;
}
// Permission checks
function isGuest($user=false)
{
if($user===false) global $user;
return !$user['is_logged'];
}
Compare the code and make sure it matches as well.
UD
this code matches. i've installed SB using Package Manager so i didn't even unzip it on my pc. What i did was only manual editing of index.template.php for 2nd theme i use. Also i've tried to instal AdvSB and it happens to that one too :P
Is it possible to make ShoutBox hidden by default? User can show/Hide it but when they first visit website it's open... It's also Shown to guests...
Just to correct myself from a previous post...
For adding the shoutbox to a portal block... Use a php block instead of html.
Just put the same code that is contained in your public_html / Themes / YOUR THEME / BoardIndex.template.php
ie.
Use this code for a regular shoutbox:
echo '
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
Use this code for shoutbox with smileys (after you have added the appropriate modifications and files):
echo '
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
';
It also restricts the positioning of the portal to the extreme top, bottom, left or right of your site pages. For right blocks I suggest putting a break after the timestamp.
ExSpirit:
This will also give the option of expand/collapse.
Although, adjusting it to initially appear collapsed is not a regular option for the simple portal - however I am not positive if that is the case for other types of portals.
It can however, be done manually by adjusting the code although I have not experimented in such an endeavor.
I have the shoutbox on my forum page using the javascript upshrink for expand/collapse and a nice 'bg' border around it like the info center and message boards , however it currently expands/collapses the darn info center with it although I have assigned its own variables in the index.template.php file. When I get it working correctly I will let you know.
UD
//Edit -Fixed: Oops... I had an image from my site in there.
@UD
i've just finished doing those changes you suggested but it didn't help me, i'm still getting "Sorry, you must be logged in to use the shoutbox!" msg. I can see sb when site is loading but when it fully loads i have the above msg... :/ It doesn't matter if i use this:
echo '
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
or this:
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
code. Funny thing is that i have exactly the same setup on my local machine and it works fine. So i think it may be sth wrong with my hosting. Old php version or something like that.
May wrong chmod settings cause thak kind of problems?
Quote from: nneonneo on March 05, 2007, 09:36:22 PM
1) Disabling BBC: there are two spots in yshout/yshout.php where the code "[list]" (*with quotes*) is found. Add "[img" (no closing bracket) and whatever other tags you want to disable to *each* instance of the replacing code.
It should look a bit like this
str_replace(array("[list]",[*other replaces*],"[right]","[img")"",$newText));
It will disable images, but please do note that some raw BBC will show through (unless you do some more advanced PHP stuff, like adding preg_replace).
Is this gone in 1.22? I cant find this anywhere in the yshout.php file. Is there a new way of blocking bbc code? Sorry if this has been answered, I searched an searched but found nothing...[/list][/list]
Quote from: Yabco on August 15, 2009, 08:11:25 AM
this code matches. i've installed SB using Package Manager so i didn't even unzip it on my pc. What i did was only manual editing of index.template.php for 2nd theme i use. Also i've tried to instal AdvSB and it happens to that one too :P
when i trying to install AdvSB_1.22 Shout box i always for FTP Information required error...and i dont know how to proced to next step...
I put
FTP Server: localhost
Port: 21
Username: hyper
Password: ****(ftp pass)
Local path to SMF: /usr/export/www/hosting/hyper
But still no luck please help me to sort out this issue
Quote from: Yabco on August 15, 2009, 06:21:49 PM
@UD
i've just finished doing those changes you suggested but it didn't help me, i'm still getting "Sorry, you must be logged in to use the shoutbox!" msg. I can see sb when site is loading but when it fully loads i have the above msg...
...Funny thing is that i have exactly the same setup on my local machine and it works fine. So i think it may be sth wrong with my hosting. Old php version or something like that.
May wrong chmod settings cause thak kind of problems?
You said you have it installed on a local machine?
Well... Let's do a little process of elimination here..
Copy the yshout.php file from the local to the one having issues.
Then you can eliminate the possibilty of an error in the code of the permissions check from that file.
I sent you a PM
UD
How to disable it writing to the history logs? I had about a 20MB text file, cleared and it went from slow to fast. Need this stopping, thanks.
Quote from: rotorsrule on August 15, 2009, 08:25:35 PM
Quote from: nneonneo on March 05, 2007, 09:36:22 PM
1) Disabling BBC: there are two spots in yshout/yshout.php where the code "[list]" (*with quotes*) is found. Add "[img" (no closing bracket) and whatever other tags you want to disable to *each* instance of the replacing code.
It should look a bit like this
str_replace(array("[list]",[*other replaces*],"[right]","[img")"",$newText));
It will disable images, but please do note that some raw BBC will show through (unless you do some more advanced PHP stuff, like adding preg_replace).
Is this gone in 1.22? I cant find this anywhere in the yshout.php file. Is there a new way of blocking bbc code? Sorry if this has been answered, I searched an searched but found nothing...[/list][/list]
Open Settings.php there you can set which words are auto deleted at $bannedCode...
// An array of strings to delete from the input.
// By default, this includes the list, center, left and right tags.
$bannedCode=Array('[list]','[/list]','[center]','[/center]','[left]','[/left]','[right]','[/right]');
Anyone figured out a way to auto hide the Shoutbox? I am still trying but no luck, looks like I'll have to remove it since it's a bit annoying for those who doesn't want to chat..
Hello!
I have a problem - I want to switch off bbcode in shoutbox. Is it possible?
If not, is it possible to switch some tags like img, flash?
I try this:
http://www.simplemachines.org/community/index.php?topic=137508.msg1550994#msg1550994
But it seems that it doesn't work.
Quote from: Carnaggee on August 21, 2009, 02:35:03 PM
Hello!
I have a problem - I want to switch off bbcode in shoutbox. Is it possible?
If not, is it possible to switch some tags like img, flash?
I try this:
http://www.simplemachines.org/community/index.php?topic=137508.msg1550994#msg1550994
But it seems that it doesn't work.
Read post above yours...
I make sth like this:
// An array of strings to delete from the input.
// By default, this includes the list, center, left and right tags.
$bannedCode=Array('[list]','[/list]','[center]','[/center]','[left]','[/left]','[right]','[/right]','[img]','[/img]','[flash]','[url]');
But the img tag still works :( any ideas?
Alright, asking in a support thread is ALWAYS my last resort, but I can't really figure this out, although it's a very simple problem. Well, I actually have two problems, but one is insignificant. My pressing issue is that the buttons (History, Usesounds, commands, etc..) are just plain text, not actual buttons. It looks really sloppy and, for lack of a better word, noobish. I'm nearly 100% sure the error is on my part. I've installed the latest version of ADVShoutbox on my custom theme, AA Damage v2, and have copied in the code that was pointed out earlier in this support thread to my index.template.php file. Is there a simple fix for my lack of buttons, or did I mess up somewhere else entirely? My PHP is rudimentary at best compared to the mod author's, so sorry for my nubbish ways. Also, on a side-note, I couldn't get the scroll bar to work. I put the code correctly in the .js file and in my index.template.php. It's not really that big of a deal, but meh, it's kind of annoying >.< Thanks in advance.
Quote from: Carnaggee on August 21, 2009, 03:42:32 PM
I make sth like this:
// An array of strings to delete from the input.
// By default, this includes the list, center, left and right tags.
$bannedCode=Array('[list]','[/list]','[center]','[/center]','[left]','[/left]','[right]','[/right]','[img]','[/img]','[flash]','[url]');
But the img tag still works :( any ideas?
Try like this:
$bannedCode=Array('[list]','[/list]','[center]','[/center]','[left]','[/left]','[right]','[/right]','[img','[/img]');
Quote from: Maulth on August 21, 2009, 03:49:43 PM
Alright, asking in a support thread is ALWAYS my last resort, but I can't really figure this out, although it's a very simple problem. Well, I actually have two problems, but one is insignificant. My pressing issue is that the buttons (History, Usesounds, commands, etc..) are just plain text, not actual buttons. It looks really sloppy and, for lack of a better word, noobish. I'm nearly 100% sure the error is on my part. I've installed the latest version of ADVShoutbox on my custom theme, AA Damage v2, and have copied in the code that was pointed out earlier in this support thread to my index.template.php file. Is there a simple fix for my lack of buttons, or did I mess up somewhere else entirely? My PHP is rudimentary at best compared to the mod author's, so sorry for my nubbish ways. Also, on a side-note, I couldn't get the scroll bar to work. I put the code correctly in the .js file and in my index.template.php. It's not really that big of a deal, but meh, it's kind of annoying >.< Thanks in advance.
You have to copy all images which ware placed in your default template directory's image folder to your template image folder...
I've tried this way and it doesn't work. I don't know why.
However the tags which were default banned like [ceneter] don't work.
[EDIT] OK it's working :) Soo lame - I modify fiees in Packages catalogue, not in dir/yshout :P
decided to try out advsb 1.22 on SMF 1.1.10 and it worked great ... hit uninstall and nothing but internal server errors
the cpanel log listed - Premature end of script headers: /home/xxxxx/public_html/forum/index.php
I checked file and directory permissions and most everything is 755
tried restoring the .php~ files but it didn't help
tried reloading a fresh index.php, didn't help
any suggestions on what to do next?
not sure how I missed this the first time
QuoteError 500: Internal Server Error
[www.silenthuntermods.com] [Sat Jul 25 18:48:31 2009] [error] [client 85.218.166.43] Premature end of script headers: index.php, referer:http://www.silenthuntermods.com/forum/index.php?action=post;msg=251;topic=109.0;a9d54dbdb1=bf057acaabc97004b55375aecbe79df9 (http://www.silenthuntermods.com/forum/index.php?action=post;msg=251;topic=109.0;a9d54dbdb1=bf057acaabc97004b55375aecbe79df9)
Error 500: Script Execution Failure
Description: The server encountered an internal error or misconfiguration and was unable to complete your request.
Most common reasons for returning this error message are:
• File Upload Mode
When you upload Perl, CGI scripts via FTP you should use always ASCII mode. If you get "Error 500: Script Execution Failure" you should check whether your FTP client uses ASCII mode when uploading your scripts, because if it uses BINARY mode to upload your scripts they won't work on the server. The problem caused by wrong upload mode is associated with the way different operating systems handle the "end of line" character. Unix system uses a "line-feed" (LF), Windows uses a "carriage-return" (CR) and "line-feed" (LF) pair. That's why it is very important that you set the uploading mode to ASCII.
• File Permissions
When you upload scripts via FTP the file permissions are set by default to 755. If you get "Error 500: Script Execution Failure" you should check whether your scripts have 755 permissions. Otherwise your scripts have lower level of permissions and does not support execution upon request. The octal representation of the 755 permission is equal to the following textual format: -rwxr-xr-x
Most FTP clients support the CHMOD command which is used for setting file permissions. In case you have set improper permissions to your scripts, use your FTP client and set "Read, Write, Execute" permissions for the owner, "Read, Execute" permissions for the group and everyone else.
• Script Errors
This is the third well known reason for getting "Error 500: Script Execution Failure" upon execution of your scripts. Check your scripts for any obvious syntax or programming errors to make sure your code is not broken.
Remember: When you get a "Error 500: Script Execution Failure", you should always check for any file uploading problems (ASCII/BINARY) and the executable permission settings. Once those are checked and verified, it looks like there is a syntax error or some other problem in the script.
at the time of failure the forum and database were up to date.
when I installed the mod it did access the server ftp to chmod some files
I checked file and directory permissions again and they seem to be ok
I was using the package manager so could binary uploading for scripts be an issue?
Since last posting I have tried repair_settings.php and replacing SMF files from the install package (index.php, SSI.php, settings.php, all source files, all default theme files) with no success.
all files have since been put back to their time of failure state.
I have a support ticket in with the host so they can check things on their end ... is there anything else I can try on my end?
Hi Nneonneo,
i just installed the yshout on my second forum and everything goes fine during the installation. after some modification, the shoutbox appeared on the center box of my TP php box but when i try to test it by typing test message on the text box and hit the submit button it doesnt work. is there anything that i missed on the modification?
Thanks and best regards.
Greetings,
I'm using SMF 2.0 RC1-1 with default theme (visually moded) - and your shoutbox is doing fine, but I have one collision with another mod (see images below)
When I perform roll-over gesture on hot brackets mod I should get this image like on image #2, but, when shoutbox is installed, I get image #1 so is there any way to make those two mods working together?
I believe this is 99% related to your mod because when I uninstalled it, hot brackets mod worked as on image#2 (meaning like it should)
I'm posting this at some peoples request.
Expand/Collapse for SMF 1.1.x
CLICK HERE (http://askusaquestion.net/index.php/topic,4.msg11.html#msg11) to view these edits.
I am having issues with this site omitting some code inside code blocks that I submit for some unknown reason, therefore I provided a link (above) to my site with the appropriate edits.
There are many other edits in that thread for nneonneo shoutbox (also including SMF 2.0 edits).
UD
after messing with just about everything I could think of with no succes and no support from our host, we have figured out that the CGI scrpits are busted and PHP seems to have crashed >:(
I waited 15 hours for a support ticket response that read "Your domain is loading fine with no probs on our end, please contact us if the prob persists on your end" so within 30 min I responded with a link to our forum ... it's been 36 hours since then with no response ...
we are now looking for another host, see ya'll in the hosting category :-\
great mod 8) I still plan to check out the basic version when we get up and running again ;)
Quote from: oops on August 26, 2009, 09:14:11 AM
after messing with just about everything I could think of with no succes and no support from our host, we have figured out that the CGI scrpits are busted and PHP seems to have crashed >:(
I waited 15 hours for a support ticket response that read "Your domain is loading fine with no probs on our end, please contact us if the prob persists on your end" so within 30 min I responded with a link to our forum ... it's been 36 hours since then with no response ...
we are now looking for another host, see ya'll in the hosting category :-\
great mod 8) I still plan to check out the basic version when we get up and running again ;)
Please don't be offended at my next few questions, as I have no idea how knowledgable you are with modifying your sites files.
... Are you positive that you didn't edit your index and/or boardindex files and mess it up to make them disfunctional?
A simple mistake like screwing up the php start tag could cause an error such as you have discribed. It is possible that the smf staff tested your site with the default theme and not the one in question.
I suggest testing your theme you are having issues with locally using EasyPHP to determine if it is your error (or an error from a modification that incorrectly placed some code).
If you need instructions...
<== try the globe over there.
UD
no prob 01_Underdog this could help someone, I have minimal knowledge for modding my files but I seem to manage.
the mod was installed via the package manager and uninstalled the same way, the install was errorless so I didn't need to manually modify any files ... the first error was produced as soon as I hit the uninstall button
I assummed it was my error from the start but in an attempt to carpet bomb the problem I installed a fresh forum that I was going to point at the old database ... trying to run the install file resulted in the same 500 error.
I restored files, renamed files, removed files, replaced files ... no php will run.
a phpinfo.php file was placed in the public_html directory and it wont run either
none of the CGI scripts in cpanel appear to be functioning
i used xampp to rebuild the forum with a copy of the db on my pc and it works fine...
if i did manage to mess up any of the files then the prob should have gone away with the fresh install I would think
the error is effecting every theme ... any and all forum access attempts produce a 500 error
it's been almost 36 hours waiting for a reply from my host about the support ticket and I have run out of patience with them.
edit: sorry i stopped the math yesterday to prevent further frustration, in 5 min it's been 36 hours
Does anyone know how to fix problem on my forum? :(
Quote from: Maulth on August 21, 2009, 03:49:43 PM
Alright, asking in a support thread is ALWAYS my last resort, but I can't really figure this out, although it's a very simple problem. Well, I actually have two problems, but one is insignificant. My pressing issue is that the buttons (History, Usesounds, commands, etc..) are just plain text, not actual buttons. It looks really sloppy and, for lack of a better word, noobish. I'm nearly 100% sure the error is on my part. I've installed the latest version of ADVShoutbox on my custom theme, AA Damage v2, and have copied in the code that was pointed out earlier in this support thread to my index.template.php file. Is there a simple fix for my lack of buttons, or did I mess up somewhere else entirely? My PHP is rudimentary at best compared to the mod author's, so sorry for my nubbish ways. Also, on a side-note, I couldn't get the scroll bar to work. I put the code correctly in the .js file and in my index.template.php. It's not really that big of a deal, but meh, it's kind of annoying >.< Thanks in advance.
Command Icons for nneonneo shoutbox v1.22I will give you some basic instructions to change the text commands to icons for what is visible by all your users. I did not bother with
HideAdminLinks or
ReturnToShoutbox as it is only the administration staff of your site that will see that text.
If you want to change those... This will probably allow you to figure it out.
Navigate to:
public_html / Themes / default / languages / index.english.php(or... whatever index language file you use for your site)
find:
?>
Put this before above code:
$txt[6011] = $boardurl . '/yshout/yshout_icons/';
Navigate to:
public_html / yshout / yshout.phpFind:
// Tool links (History, Commands, etc.)
echo '<span id="yshout-toollinks">';
echo '[<a href="javascript:goTo(\'history\')">',$txt['yshout_history'],'</a>] ';
echo '[<a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>]';
if(isMod())
{
echo ' [<a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'history&n=\'+history_number)}else{void(0)}">',$txt['yshout_exthistory'],'</a>]';
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' [<a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>]';
else
echo ' [<a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>]';
echo ' [<a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>]';
}
echo '</span>'; // yshout-toollinks
Replace it with:
// Tool links (History, Commands, etc.)
echo '<span id="yshout-toollinks">';
echo '[<a href="javascript:goTo(\'history\')"><img src="', $txt[6011] , 'history1.gif"
alt="[Shoutbox History]"></a>] ';
echo '[<a href="javascript:goTo(\'help\')"><img src="', $txt[6011] , 'info1.png"
alt="[Shoutbox Commands]"></a>]';
if(isMod())
{
echo ' [<a href="javascript:history_number=prompt(\'How far back?\',200);if(history_number){goTo(\'history&n=\'+history_number)}else{void(0)}"><img src="', $txt[6011] , 'ext_history.gif"
alt="[Extended History]"></a>]';
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo ' [<a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_hide'],$txt['yshout_admlinks'],'</a>]';
else
echo ' [<a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();">',$txt['yshout_show'],$txt['yshout_admlinks'],'</a>]';
echo ' [<a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>]';
}
echo '</span>'; // yshout-toollinks
Navigate to:
public_html / yshoutCreate an empty folder in this directory named
yshout_iconsNow find 3 images and pre-size them at around 20x20...
history1.gif – Icon for your resent history.
ext_history.gif – Icon for your extended history.
help1.png – Icon for the help menu.
Put all 3 images in the
yshout_icons folder.
Done.
You can use
gif, png or jpg type image files but whatever you choose – make sure it matches the file name inside the
yshout.php edit I just gave you.
The example I gave you uses
gif files for the history and a
png file for the help menu.
UD
//Edit -> Proper boardurl fixed. The folder you use for storing your shoutbox history commands icons can be changed in the language file edit. Reference this thread - reply number 5616 (scroll down on this page).
Quote from: wladymeer on August 26, 2009, 05:17:20 PM
Does anyone know how to fix problem on my forum? :(
Concerning the nneonneo shoutbox I assume?
We need to know the specific issue you are having with this mod.
-------------------------------------
oops:
Your problem has gone beyond any issues with nneonneo shoutbox (even though it may have started while trying to install this mod), therefore you should be starting a new thread in the appropriate topic with this issue.
BTW - imao - it sounds like you messed up one of your main files in your server index located before public_html. (ie. fantasticodata)
There is a text log file in there... perhaps reading it could shed some light as to when something went awry.
Copy all your db files from the server.. If you can't figure it out then you will have to get them to reinstall all the main files and start anew with a fresh smf install.. then put back your db files after reinstalling whatever theme you were using.
I don't know what you use to access your server files, but imao try Filezilla (freeware). You will be able to take a look at what is going on.
UD
If you mean this "zero sized reply" I don't think it was because of nneonneo shoutbox but as I don't have much time at the moment I will first try to fix that before we get back to this minor one :)
I agree UD but I think it may go beyond SMF
I do use Filezilla and it does do what I need so far. I took a look at the fantasticodata directory and no files in there have been modified for quite some time
if the host ever gets back to me ... with something SMF related I'll post up a thread
thanks for the input
@ 01_Underdog I'm not sure how good you are at coding, I presume you're good, but I have a question for you.
I followed you example and I had some troubles with displaying of images because SMF are somehow connected with forum name. What I need is them not to be connected with that but with with subfolder.
If I have forum in custom named folder www.page.com/thisgreatforum how would paths to images look like?
Quote from: ameo on August 27, 2009, 02:25:00 PM
@ 01_Underdog I'm not sure how good you are at coding, I presume you're good, but I have a question for you.
I followed you example and I had some troubles with displaying of images because SMF are somehow connected with forum name. What I need is them not to be connected with that but with with subfolder.
If I have forum in custom named folder www.page.com/thisgreatforum how would paths to images look like?
The setup I posted would have the image files placed in:
YOUR SITE URL / public_html / yshout / yshout_images... and then the 3 image files.
The language file is where I set up the images destination. If you want to have your own location for those files, just change that.
So...
Instead of:
$txt[6011] = $boardurl . '/yshout/yshout_icons/';
For your example you would change that to:
$txt[6011] = 'http://www.page.com/thisgreatforum/';
... and put the image files directly into your
thisgreatforum folder.
//Edit => I fixed the 'boardurl' from the original post, so it should work for everyone. If it doesn't then follow the instructions in this post.UD
For some reason this mode has caused me big trouble tonight and as my host says this mod used a lot of virtual memory which at the resulted with my forum not working for a day until I put backup files - is there any way to optimize it as besides that, I really dig into it?
Quote from: wladymeer on August 27, 2009, 05:03:15 PM
For some reason this mode has caused me big trouble tonight and as my host says this mod used a lot of virtual memory which at the resulted with my forum not working for a day until I put backup files - is there any way to optimize it as besides that, I really dig into it?
Read:
High bandwidth use for large forums: ... from page 1 of this thread.
UD
Does forum with 37 members fits in "large forums"? :)
my forum is blank
Is there any way to prevent history log from saving?
Hi nneonneo!
Please, is there aniway to put de date and time smaller than the rest of the shout? Thanls!
history in my shoutbox doesn't show up anymore (a blank page appears instead)
SMF 1.1.10
nneonneo's shoutbox 1.22
does anybody have suggestions about what to check? :(
This mod does NOT play nice with JQuery, if JQuery is included in the page it will override the $ function and break the shout box. If you have JQuery included and your shoutbox isn't working, this could be the reason.
One way is to use the noConflict() function of JQuery, the other is to modify the yshout box javascript(which is the path i took)
My Fix:
yshout.js: Replace all occurrences of $( with $y(
moo.ajax.js: Replace all occurrences of $( with $y(
hi how center the shoutbox?
Thanks you
=)
Hi,
Guys, I am in big trouble, I banned myself in shoutbox..how to unban ? :'(
nneonneo's AJAX ShoutBox
Thanks,
LOL chaitu_cheat. you are so funny. don't you have global moderators on your forum which can do that for you?
PM them. That's the best way. Other way includes FTP access, through which you find yshout folder on your forum
and inside of it find _banlist.php - download - open with editor such as notepad and delete your name from list. then re-upload again.
hi how center the shoutbox?
Thanks you
=)
http://nneonneo.net46.net/smf/
I cant seem to get passed the Shoutbox loading....went through the threads and cannot find anything on point so i appologize if I missed it.
Site: www.ibrr.org/forum/ (http://www.ibrr.org/forum/) Site Info: smf 1.1.10 simple portal 2.2.2
I am a cut and paste type of experience person. Tried the chmod and didn't work. Banlist, class, docs, index and settings files are all 666, the rest are set to 755.
I'd actually prefer to put the shoutbox in a simpleportal block [fixed this] but all that matters is to simply get it to work. I also ran your test thru a browser and got 'nothing to do.'
any help would be great!
i am editing as i don't want to bump the post. so, i went ahead and added a portal box and put the final third of the mod script in a custom php box minus the 'SHOUT BOX' words and still get the 'loading...' showing. the first two sets of script are placed precisely where they are supposed to be. switched to default core theme and it works perfectly. so i guess the overall question is how to make it work on intifada?
i will stay with the default theme for now and i guess the post is 'closed' as i am happy. sorry to have bothered anyone who spent any time on it and thanks for all that ya'll do!
SMF 1.1.10 SimplePortal 2.3
This shoutbox is great :) thanks for you efforts
Our shoutbox appears to be fully functional but I get the following error running the shoutbox in a SP custom php block on the portal page
Undefined variable: scripturl
/forum/Themes/default/languages/Themes.english-utf8.php (portal_below sub template - eval?)
the error occurs once for each initial page view
I added the smiley bar and adjusted font sizes.
EDIT: would it be better to ask at the SP forum?
the return to shoutbox button does nothing
Hi guys i just finished to tweak this codes and tested on SMF 1.1.10 and TP 0.98
this will display your Nneonneo shoutbox on the left or right block of your TP themes. hope you like it.. ;D thanks to nneonneo for the great mods
on index.template.php
Find this
// 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" />';
add this after
// 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: 11px;
overflow: 170px;
}
#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: 1px;
padding: none;
}
#yshout #shout-form fieldset {
border: 1px;
}
#yshout #forum-name {
width: 150px;
margin-right: 5px;
}
#yshout #shout-text {
width: 150px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
create a PHP block on your TP either left or right and put this code
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<br /><b>:: CHAT RIGHT HERE ::</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
ok, got the error fixed 8)
all the block need was a
global $scripturl;
it seems to function well so far; our code variation places the input bars at the top and has the messages in a top down ordering with a smiley bar at the bottom. Still thinking about the sound effect and relocating the smiley bar.
I did the install using the index.template.php code in a block, no adjustments made to index.template.php.
Simple Portal Custom PHP center block code
// YSHOUT HERE - <head> code
global $boardurl,$shoutFile,$scripturl;
$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[
if (window.addEventListener){
window.addEventListener("load", function(){loadChat();}, false);
} else if (window.attachEvent){
window.attachEvent("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>
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">soundManager.url="',$boardurl,'/yshout/";
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function() {
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/chat.mp3", autoPlay:false});
}</script>
<script src="',$boardurl,'/mymod/animatedcollapse.js" type="text/javascript"></script>
<style type="text/css">
#yshout {
font-size: 13px;
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-size: 8pt;
font-style: normal;
font-weight: normal;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 7pt;
color: #141414;
}
#yshout #shout-form {
margin: 0;
padding: 0;
}
#yshout #shout-form fieldset {
border: none;
}
#yshout #forum-name {
width: 130px;
margin-right: 5px;
}
#yshout #shout-text {
width: 570px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
// 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>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
Cheers
my issue should be considered fixed as i upgraded to simpleportal 2.2.3. thanx.
Same code for center the shoutbox
Thanks
I'm having problems un-installing this shout box ::)
I keep getting an error message as follows -
Session verification failed. Please try logging out and back in again, and then try again.
Anybody help?
TIA
Kevin.
Quote from: Exterminator2006 on September 08, 2009, 07:22:32 PM
Same code for center the shoutbox
Thanks
You really want it set up like that?
Ok...
Navigate to this file:public_html / Themes / YOUR THEME / BoardIndex.template.php
If you used my
expand/collapse set up...
find:
<td class="windowbg" width="49%" align="left" valign="top">';
Replace with:
<td class="windowbg" width="49%" align="center" valign="top">';
If you use this execution code:
// 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
Replace with:
// YSHOUT HERE - shoutbox code
echo '
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
<center><div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></center>';
// YSHOUT END - shoutbox code
If you use this execution code:
// 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
Replace with:
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
echo '<center><div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div></center>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
UD
Quote from: Kevin Deguara on September 11, 2009, 03:44:59 PM
I'm having problems un-installing this shout box ::)
I keep getting an error message as follows -
Session verification failed. Please try logging out and back in again, and then try again.
Anybody help?
TIA
Kevin.
Navigate to public_html / Themes / YOUR THEME / index.template.php
Find and delete:
// 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[[CDATA[
window.
var shoutFile="',$shoutFile,'";
var yshout_php="',$scriptpath,'?yshout',$args,'";
// ]]]]><![CDATA[></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 {
color: #666666;
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
... basically delete all the code between the two yshout remark tags.
Navigate to: public_html / Themes / YOUR THEME / BoardIndex.template.php
Find and delete:
// YSHOUT HERE - shoutbox code
- ANY CODE THAT IS BETWEEN THESE yshout REMARK TAGS -
// YSHOUT END - shoutbox code
... I didn't bother putting the actual code in that code block. Just find the start/finish remark tags for the yshout in that file and erase what is between them (and the remark tags themselves).
This should solve the problem for you.
UD
Quote from: dany_danay on August 30, 2009, 01:23:50 PM
Hi nneonneo!
Please, is there aniway to put de date and time smaller than the rest of the shout? Thanls!
Navigate to:
public_html / Themes / YOUR THEME / index.template.phpfind:
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
}
Replace with:
#yshout .shout-timestamp {
font-size: 8px;
font-style: normal;
font-weight: normal;
color: #330099
}
... just change the font-size and color to what you specifically want for your forum. This is just an example from how I have it set in my forum.
To change the
del / ban buttons size and color:
find:
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 6pt;
color: #141414;
}
Change the font-size and the color to what you want... I assume you get the idea.
All the edits for the look and feel are in this file (including line spacing). Change stuff around a bit and use some trial and error to get it to look the way you want.
------------------------------
If you also want it to break down to another line after the date/time instead of showing the date/time and shout on one line...
Navigate to:
public_html/yshout/settings.phpFind:
// Function to customize the timestamp.
// Default formatting: [(SMF user profile timestamp)]
function preg_timeformat($matches)
{
// format: <timeval=(value)>
// return ''; // to disable the timestamp
return '['.timeformat(intval($matches[1])).']';
}
Replace with:
// Function to customize the timestamp.
// Default formatting: [(SMF user profile timestamp)]
function preg_timeformat($matches)
{
// format: <timeval=(value)>
// return ''; // to disable the timestamp
return '['.timeformat(intval($matches[1])).']<br />';
}
UD
Quote from: wladymeer on August 29, 2009, 02:58:59 PM
Is there any way to prevent history log from saving?
Navigate to:
public_html / yshout / yshout.phpFind and delete:
if($historyPath !== '')
{
// History
$oldText = substr($fileContents, 0, strpos($fileContents, "\n") + 1);
$handle = fopen($historyPath, "a");
fputs($handle, $oldText);
fclose($handle);
}
... Now only roughly the last 12 shouts will be recorded in your history file.
I did write a tutorial on adding an
/erase command to the shoutbox in this thread. I fail to understand why it isn't good enough for people.
I suppose I could write a command that turns on/off the history... maybe later.
//Edit - I found another solution:You can also stop the history from being recorded by doing this:
Navigate to: public_html / yshout / settings.phpFind:
// History format - set to '' to disable archiving.
$historyFormat='history.%s.txt';
Replace with:
// History format - set to 'history.%s.txt' to enable archiving.
$historyFormat='';
UD
Hi, I have recently installed your shoutbox, it looks nice but i have a strange message while using it.
It appears twice - the first one pops up on page load, the second one on refresh I think:
QuoteWarning: Invalid argument supplied for foreach() in /var/www/localhost/htdocs/forum/Sources/Load.php on line 1428
[History] [Commands] [ExtendedHistory] [ShowAdminLinks] [ReturnToShoutbox]
Warning: Invalid argument supplied for foreach() in /var/www/localhost/htdocs/forum/Sources/Load.php on line 1428
...
shouts here
Here's a small bit of my Load.php:
<1404> // Okay, #4 - perhaps it's an IP address? We're gonna want to use that one, then. (assuming it's the IP or something...)
<1405> if (!empty($do_fix) || preg_match('~^http[s]://[\d\.:]+($|/)~', $detected_url) == 1)
<1406> {
<1407> // Caching is good ;).
<1408> $oldurl = $boardurl;
<1409>
<1410> // Fix $boardurl and $scripturl.
<1411> $boardurl = $detected_url;
<1412> $scripturl = strtr($scripturl, array($oldurl => $boardurl));
<1413> $_SERVER['REQUEST_URL'] = strtr($_SERVER['REQUEST_URL'], array($oldurl => $boardurl));
<1414>
<1415> // Fix the theme urls...
<1416> $settings['theme_url'] = strtr($settings['theme_url'], array($oldurl => $boardurl));
<1417> $settings['default_theme_url'] = strtr($settings['default_theme_url'], array($oldurl => $boardurl));
<1418> $settings['actual_theme_url'] = strtr($settings['actual_theme_url'], array($oldurl => $boardurl));
<1419> $settings['images_url'] = strtr($settings['images_url'], array($oldurl => $boardurl));
<1420> $settings['default_images_url'] = strtr($settings['default_images_url'], array($oldurl => $boardurl));
<1421> $settings['actual_images_url'] = strtr($settings['actual_images_url'], array($oldurl => $boardurl));
<1422>
<1423> // And just a few mod settings :).
<1424> $modSettings['smileys_url'] = strtr($modSettings['smileys_url'], array($oldurl => $boardurl));
<1425> $modSettings['avatar_url'] = strtr($modSettings['avatar_url'], array($oldurl => $boardurl));
<1426>
<1427> // Clean up after loadBoard().
<1428> foreach ($board_info['moderators'] as $k => $dummy) // Yeah thats the one
<1429> {
<1430> $board_info['moderators'][$k]['href'] = strtr($dummy['href'], array($oldurl => $boardurl));;
<1431> $board_info['moderators'][$k]['link'] = strtr($dummy['link'], array('"' . $oldurl => '"' . $boardurl));;
<1432> }
<1433> foreach ($context['linktree'] as $k => $dummy)
<1434> $context['linktree'][$k]['url'] = strtr($dummy['url'], array($oldurl => $boardurl));
<1435> }
My smf version is 2.0 RC1.2 and I'm using lite version of shoutbox 1.22.
Thanks for any advice
Quote from: radzior on September 13, 2009, 06:07:02 PM
Hi, I have recently installed your shoutbox, it looks nice but i have a strange message while using it.
It appears twice - the first one pops up on page load, the second one on refresh I think:
QuoteWarning: Invalid argument supplied for foreach() in /var/www/localhost/htdocs/forum/Sources/Load.php on line 1428
[History] [Commands] [ExtendedHistory] [ShowAdminLinks] [ReturnToShoutbox]
Warning: Invalid argument supplied for foreach() in /var/www/localhost/htdocs/forum/Sources/Load.php on line 1428
...
shouts here
Here's a small bit of my Load.php:
<1404> // Okay, #4 - perhaps it's an IP address? We're gonna want to use that one, then. (assuming it's the IP or something...)
<1405> if (!empty($do_fix) || preg_match('~^http[s]://[\d\.:]+($|/)~', $detected_url) == 1)
<1406> {
<1407> // Caching is good ;).
<1408> $oldurl = $boardurl;
<1409>
<1410> // Fix $boardurl and $scripturl.
<1411> $boardurl = $detected_url;
<1412> $scripturl = strtr($scripturl, array($oldurl => $boardurl));
<1413> $_SERVER['REQUEST_URL'] = strtr($_SERVER['REQUEST_URL'], array($oldurl => $boardurl));
<1414>
<1415> // Fix the theme urls...
<1416> $settings['theme_url'] = strtr($settings['theme_url'], array($oldurl => $boardurl));
<1417> $settings['default_theme_url'] = strtr($settings['default_theme_url'], array($oldurl => $boardurl));
<1418> $settings['actual_theme_url'] = strtr($settings['actual_theme_url'], array($oldurl => $boardurl));
<1419> $settings['images_url'] = strtr($settings['images_url'], array($oldurl => $boardurl));
<1420> $settings['default_images_url'] = strtr($settings['default_images_url'], array($oldurl => $boardurl));
<1421> $settings['actual_images_url'] = strtr($settings['actual_images_url'], array($oldurl => $boardurl));
<1422>
<1423> // And just a few mod settings :).
<1424> $modSettings['smileys_url'] = strtr($modSettings['smileys_url'], array($oldurl => $boardurl));
<1425> $modSettings['avatar_url'] = strtr($modSettings['avatar_url'], array($oldurl => $boardurl));
<1426>
<1427> // Clean up after loadBoard().
<1428> foreach ($board_info['moderators'] as $k => $dummy) // Yeah thats the one
<1429> {
<1430> $board_info['moderators'][$k]['href'] = strtr($dummy['href'], array($oldurl => $boardurl));;
<1431> $board_info['moderators'][$k]['link'] = strtr($dummy['link'], array('"' . $oldurl => '"' . $boardurl));;
<1432> }
<1433> foreach ($context['linktree'] as $k => $dummy)
<1434> $context['linktree'][$k]['url'] = strtr($dummy['url'], array($oldurl => $boardurl));
<1435> }
My smf version is 2.0 RC1.2 and I'm using lite version of shoutbox 1.22.
Thanks for any advice
.... Does line <1436> have another closing bracket for the sub routine?
I'm referring to the last line here.. but I'll show the part of the routine you listed even though it actually begins further back with this...
if (isset($detected_url) && $detected_url != $boardurl)
{
The part of the routine you are showing:
// Okay, #4 - perhaps it's an IP address? We're gonna want to use that one, then. (assuming it's the IP or something...)
if (!empty($do_fix) || preg_match('~^http[s]://[\d\.:]+($|/)~', $detected_url) == 1)
{
// Caching is good ;).
$oldurl = $boardurl;
// Fix $boardurl and $scripturl.
$boardurl = $detected_url;
$scripturl = strtr($scripturl, array($oldurl => $boardurl));
$_SERVER['REQUEST_URL'] = strtr($_SERVER['REQUEST_URL'], array($oldurl => $boardurl));
// Fix the theme urls...
$settings['theme_url'] = strtr($settings['theme_url'], array($oldurl => $boardurl));
$settings['default_theme_url'] = strtr($settings['default_theme_url'], array($oldurl => $boardurl));
$settings['actual_theme_url'] = strtr($settings['actual_theme_url'], array($oldurl => $boardurl));
$settings['images_url'] = strtr($settings['images_url'], array($oldurl => $boardurl));
$settings['default_images_url'] = strtr($settings['default_images_url'], array($oldurl => $boardurl));
$settings['actual_images_url'] = strtr($settings['actual_images_url'], array($oldurl => $boardurl));
// And just a few mod settings :).
$modSettings['smileys_url'] = strtr($modSettings['smileys_url'], array($oldurl => $boardurl));
$modSettings['avatar_url'] = strtr($modSettings['avatar_url'], array($oldurl => $boardurl));
// Clean up after loadBoard().
foreach ($board_info['moderators'] as $k => $dummy)
{
$board_info['moderators'][$k]['href'] = strtr($dummy['href'], array($oldurl => $boardurl));;
$board_info['moderators'][$k]['link'] = strtr($dummy['link'], array('"' . $oldurl => '"' . $boardurl));;
}
foreach ($context['linktree'] as $k => $dummy)
$context['linktree'][$k]['url'] = strtr($dummy['url'], array($oldurl => $boardurl));
}
}
UD
I think it would be nice if the admin can limit the number of posts in the shoutbox. While it is one of the most useful modifications of smf it should be limited in order too keep the forum alive and the chat as a supplement. So it would be nice if the admin could limit the maximum number of messages posted on the shoutbox according to usergroups. Thank you for a great MOD!
Quote from: 01_Underdog on September 14, 2009, 12:03:01 AM.... Does line <1436> have another closing bracket for the sub routine?
Yea it does, the problem dissapeared anyway. idk how but messages are gone. There could be some issues with mysql. Thanks anyway
Edit:
Opps, it looks like the problem appears while using https instead of http. My ssl certificate isnt signed, could this cause an issue?
Quote from: rebus on August 30, 2009, 06:25:40 PM
history in my shoutbox doesn't show up anymore (a blank page appears instead)
SMF 1.1.10
nneonneo's shoutbox 1.22
does anybody have suggestions about what to check? :(
Please, any tip on this? Thanks :(
Hi!
Is it possible to change font in the History, because it's too small. I know where to change font size for shoutbox but I don't know where to look for history font size.
Quote from: Carnaggee on September 19, 2009, 07:49:37 AM
Hi!
Is it possible to change font in the History, because it's too small. I know where to change font size for shoutbox but I don't know where to look for history font size.
Navigate to: public_html / yshout / yshout.phpFind:
#yshout #shouts { /* main shouts area */
color: #000000;
}
Replace with:
#yshout #shouts { /* main shouts area */
font-size: 18px;
color: #000000;
}
--------------------------------
I set it to
18px with that example. Experiment with it to set it to the size you want.
UD
ok ive tried and tried to get this to work with extreme6 theme and i cant can anyone help me please? :-[
heres the code i''m currently using
<?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.4';
/* 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'] = true;
/* 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>
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/mootools.js"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/imagemenu.js"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/imagemenu2.js"></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>';
echo '
</head>
<body>
<div id="sag1">
<div id="sol1">
<div id="alt1">
<div id="altsag1">
<div id="altsol1">
<div id="ust1">
<div id="ustsag1">
<div id="ustsol1">
<div id="wrapper"/>
<div id="header">
<div id="head-l">
<div id="head-r">
<div id="userarea">';
if ($context['user']['is_logged'])
{
echo '<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
echo '<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br /><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
', $txt['welcome_guest'], '<br />
', $context['current_time'],'<br />';
}
echo '
</div>
<a href="'.$scripturl.'?action=forum" title=""><span id="logo"> </span></a>';
echo '
</div>
</div>
</div>
<div id="navb">
<div id="navb-l">
<div id="navb-r">
<div id="navarea">
<div id="arama">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input class="inputbox" type="text" name="search" value="', $txt[182], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt[182], '...\';" />';
// 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>
</div>
</div></div></div></div>
<div id="toolbar">',template_menu(),'</div>
<div id="mainarea">
<div id="sag">
<div id="sol">
<div id="alt">
<div id="altsag">
<div id="altsol">
<div id="ust">
<div id="ustsag">
<div id="ustsol">';
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div><br />';
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footer">
<div id="footer-l">
<div id="footer-r">
<div id="footerarea">
<span class="smalltext">', theme_copyright(), '<br /><font color="#757575">Theme </font><font color="#858585"><b>Extreme6 By</b></font> <a href="http://www.fussilet.com" target="_blank">Fussilet</a></span>';
// Show the load time?
if ($context['show_load_time'])
echo '
<p align="center"><span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span></p>';
// 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>
</div>
</div>
</div>';
// 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>';
echo '
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 0ex; padding-bottom: 0ex; padding-left: 2ex;">';
// 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['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 ' | ';
}
echo '</div>';
}
// Show the menu up top. Something like [home] [help] [pm] [logout] [login] ...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div id="kwick">
<ul class="kwicks">';
// Show the [home] button.
echo '<li><a href="', $scripturl, '" class="kwick opt1">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.png" alt="' . $txt[103] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[103]), '</span></a></li>';
// The [IRC] button
if ($context['allow_memberlist'])
echo '<li><a target="_blank" href="', $scripturl, '?action=chat" class="kwick opt12">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/mibbit.png" alt="' . $txt[331] .'" style="margin: 0px 0;" border="0" /><span>' : $txt[331]), '</span></a></li>';
// Show the [help] button.
echo '<li><a href="', $scripturl, '?action=help" class="kwick opt2" >', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.png" alt="' . $txt[119] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[119]), '</span></a></li>';
// How about the [search] button?
if ($context['allow_search'])
echo '<li><a href="', $scripturl, '?action=search" class="kwick opt3">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.png" alt="' . $txt[182] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[182]), '</span></a></li>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin']){
echo '<li><a href="', $scripturl, '?action=admin" class="kwick opt4">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.png" alt="' . $txt[2] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[2]), '</span></a></li>';
}
// Edit Profile [profile] :x
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile" class="kwick opt5">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.png" alt="' . $txt[79] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[467]), '</span></a></li>';
// The Private Message [PM]!
if ($context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm" class="kwick opt6">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/pm.png" alt="' . $txt[144] . '" style="margin: 0px 0;" border="0" /><span>' : $txt['smf199']), '</span></a></li>';
// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar" class="kwick opt7">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.png" alt="' . $txt['calendar24'] . '" style="margin: 0px 0;" border="0" /><span>' : $txt['calendar24']), '</span></a></li>';
// The [member] list button :)
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist" class="kwick opt8">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/members.png" alt="' . $txt[331] .'" style="margin: 0px 0;" border="0" /><span>' : $txt[331]), '</span></a></li>';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login" class="kwick opt9">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.png" alt="' . $txt[34] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[34]), '</span></a></li>';
// If the user is a guest, show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register" class="kwick opt10">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.png" alt="' . $txt[97] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[97]), '</span></a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '" class="kwick opt11">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.png" alt="' . $txt[108] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[108]), '</span></a></li>';
echo '</ul></div>';
}
// Generate a strip of buttons.
function 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> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
Hi, I wanted to modify a little bit your shoutbox.
I added new theme setting for shoutbox - every user can specify if they want to have newest shouts first.
I added $options variable as global and I am certain that it is vissible in yshout settings.php file (I echoed it and it is succesfully displayed).
The problem is, if I use variable to assign value to $reverseShouts var it doesn't work. It doesn't apply changes - even if value should be set to 1(true), it acts like it is set to 0(false). I echoed variable $reverseShouts - and it is set to 1(true) but behaviour of shoutbox is like it is set to 0.
I think it is not needed to explain, that if values are set to 0(false) it acts like it should :) But it means no difference between false and true :/
When I commented echo '<div id="yshout">';
it worked... but of course this will prevent shoutbox from refreshing.
Appreciate any help.
EDIT:
I seem to know what is the problem. When shoutbox loads for the first time order of shouts is as planned. But it instantly refreshes, and there is no longer $options array loaded. So after reload value is 0, so there is no shouts reverse. But still I don't know how to keep $options array loaded for all refreshes.
Please ignore last post. I managed to find solution. If anybody wants to allow users to make their own choice, if newest shouts should be on top or on bottom here is how to mod files to achieve that:
./Themes/default/Profile.template.php
Find:
<tr>
<td colspan="2">
<input type="hidden" name="default_options[view_newest_first]" value="0" />
<label for="view_newest_first"><input type="checkbox" name="default_options[view_newest_first]" id="view_newest_first" value="1"', !empty($context['member']['options']['view_newest_first']) ? ' checked="checked"' : '', ' class="check" /> ', $txt['recent_posts_at_top'], '</label>
</td>
</tr>
Add after:
<tr>
<td colspan="2">
<input type="hidden" name="default_options[sb_view_newest_first]" value="0" />
<label for="sb_view_newest_first"><input type="checkbox" name="default_options[sb_view_newest_first]" id="sb_view_newest_first" value="1"', !empty($context['member']['options']['sb_view_newest_first']) ? ' checked="checked"' : '', ' class="check" /> Shout box: ', $txt['recent_posts_at_top'], '</label>
</td>
</tr>';
./Themes/default/Settings.template.php
Find:
array(
'id' => 'view_newest_first',
'label' => $txt['recent_posts_at_top'],
'default' => true,
),
Add after:
array(
'id' => 'sb_view_newest_first',
'label' => 'Shout box: '. $txt['recent_posts_at_top'],
'default' => true,
),
In ./yshout/settings.php
Find:
$reverseShouts=false;
Replace with:
$reverseShouts=$_COOKIE['yShout_reverse']
And in file where you have your shoutbox
Find:
// YSHOUT HERE - shoutbox code
Add after:
$reverse = $options['sb_view_newest_first'];
echo '
<script type="text/javascript">
<!--
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
createCookie("yShout_reverse", "',$reverse,'", "1");
// -->
</script>';
EDIT:
And of course you might wanna have autoscroll adjusted to user's setting :)
In ./yshout/settings.js
Find:
var autoScroll=off;
Replace with:
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
return "";
}
if(getCookie('ys_order') == 1) {
var autoScroll=0;
}
else {
var autoScroll=1;
}
shout box installed...
but not coming in the forum.... it is not appearing where is the setings for this....
thank u in advance....
Post link to your forum please.
www.studentsmantra.net
Ok, I can't tell where shoutbox should be, there are no shoutbox container on main page. And forum is for registered only.
ya forum is for reg people :) then i have installed shoutbox... it was succesful... but not coming.....
So maybe it wasn't?
Very important is that shoutbox is in <div> container with specified ID. I can't tell you if you have that. Check all steps manually.
We moved the shoutbox to it's own page using the custom action mod, the goal is to have a social page where the content auto refreshes so activity doesn't go unnoticed (no manual page refreshes).
We seem to have run into another problem, when I add the changes to the yshout.js file to add the sound effect, the shoutbox disappears (everything below the main menu disappears) when the shout button is pressed.
I uploaded the latest soundmanager files from the posted link already and tried adding "soundmanager2.swf" after soundManager.url="',$boardurl,'/yshout/ but neither helped, there are no errors in the forum or server from this action ... any suggestions
A feature I plan to have a go at when I have time is having the post updates separate from the shouts, prolly at the bottom of the shoutbox as to not clutter it up with post updates while members are using it ... any suggestions or should I see what I can come up with?
hmm, auto refreshing "Who's Online" would be sweet on that page too
hi everyone,
after updating SMF from 2.0 RC1 to RC1.2 and reinstalling nneonneo's shoutbox (lite ver.) everything is working just fine on default theme, but on Crip's newest Back'n'Black there appeared 3x php delimiters " ?> "
here's the location of them:
http://img97.imageshack.us/img97/6057/clipboard01mw.jpg
(http://img97.imageshack.us/img97/6057/clipboard01mw.jpg)
and the third one is shown in the top left corner of the page
i guess i messed something up while editing index.template.php or some other files from BacknBlack folder -.-
i know this is pretty trival problem, but i realy can't find a way to fix this; i've already spent couple of hours checking php files in BnB theme, but no luck
i'd appreciate if someone could help me out
ps. attached index.template.php from BnB theme, if needed i will upload other .php files
EDIT:
solved.
i kept looking a bit more but still i wasnt able to locate the problem, so i uploaded/installed fresh BnB theme and added SBox code manually to index.template.php - now everythign look like it should
I have a problem, i follow the parser correctly in all points, for install shoutbox in my theme overview..
The problem is that the shoutbox dont appear.. say "shoutbox" but nothing happen...
Look this screenshoots of my portal and forum:
(http://i35.tinypic.com/14nikr4.jpg)
(http://i38.tinypic.com/i539so.jpg)
So... What happen?? and i cant find an option to activate in admin options..
Please Help me !
Sorry for my bad english im from argentina !
Bye
Thanks for this Mod! I am having problems though getting it to work.
I am using SMF 1.1.10 with tinyportal 1.0 beta 4 with Silent Wave theme.
I have the shout/chat box displayed in the bottom panel of my tinyportal. The problem is once you login it directs you to the tinyportal main page. (this is what I want it to do) But the shout/chat area says Invalid request variable. Then if you go to the forum and then click home again the chat area begins to work.
What is causing this?
it seems a though a variable is not being declared on the tinyportal homepage....What variable would this be?
Thanks in advance,
Austin
PLEASE somebody know what is my problem???
Quote from: S.N.K.! on September 29, 2009, 02:59:16 PM
I have a problem, i follow the parser correctly in all points, for install shoutbox in my theme overview..
The problem is that the shoutbox dont appear.. say "shoutbox" but nothing happen...
Look this screenshoots of my portal and forum:
(http://i35.tinypic.com/14nikr4.jpg)
(http://i38.tinypic.com/i539so.jpg)
So... What happen?? and i cant find an option to activate in admin options..
Please Help me !
Sorry for my bad english im from argentina !
Bye
Quote from: S.N.K.! on September 29, 2009, 02:59:16 PM
I have a problem, i follow the parser correctly in all points, for install shoutbox in my theme overview..
The problem is that the shoutbox dont appear.. say "shoutbox" but nothing happen...
Look this screenshoots of my portal and forum:
(http://i35.tinypic.com/14nikr4.jpg)
(http://i38.tinypic.com/i539so.jpg)
So... What happen?? and i cant find an option to activate in admin options..
Please Help me !
Sorry for my bad english im from argentina !
Bye
nneonneo shoutbox only installs the language edits into english language files.
You will have to add the edits to your language files.
If you need instructions to do this... In your site, navigate to
Admin / Server Settings ... Tell me what it says for
Default Forum Language.
After you enter the proper edits, the permissions will have to be set properly for the mod.
UD
Yes, i have spanish_es-utf8 but ive done that, i modified the language file... modifications.spanish.... etc etc.,.
But nothing change,..,
Sorry for my bad english, im argentinian..
I said that I solved this problem myself, which I thought I did but now i noticed I didn't Please Help..
Thanks for this Mod! I am having problems though getting it to work.
I am using SMF 1.1.10 with tinyportal 1.0 beta 4 with Silent Wave theme.
I have the shout/chat box displayed in the bottom panel of my tinyportal. The problem is once you login it directs you to the tinyportal main page. (this is what I want it to do) But the shout/chat area says Invalid request variable. Then if you go to the forum and then click home again the chat area begins to work.
What is causing this?
it seems a though a variable is not being declared on the tinyportal homepage....What variable would this be?
Thanks in advance,
Austin
I get the following errors once in a while, then maybe by the next day is fixed, is but is getting worst and worst, is it maybe because the file is getting to big
fopen(yshout/chats/home.txt) [function.fopen]: failed to open stream: Read-only file system in /home/xecoflc/public_html/forum/yshout/yshout.php on line 684File error (writeLine); aborted
hi.. i cant set a permissions for disabling people who are not registered with our site..how to fixed this? no settings for shoutmix inside my admin panel.. but shoutmix works very well :)
masterofpiece what are you talking about? this is not shoutmix shoutbox, it's nneonneo's shoutbox.
lol im sorry for that.. yes, i mean nneonneo's shoutbox.. i cant set a permissions inside SMF, there is no panel for that in my SMF, admin T.T
hi.. this is my problem, i already copy all of the code for installing nneonneo's shouthox inside my SMF, but this problem occur.. please help
Attach your index.template.php and I will have a look at it.
Please help me, when i install this "nneonneo's Shoutbox" and didnt see the shoutbox, i uninstalled it, then after that i have this error...
Internal 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.
Apache/1.3.41 Server at www Port 80
Please help me...
@ SunKing - I helped masterofpiece overPM. His problem is resolved now. :)
@ameo
Ok, thanks.
@mrbond
Please attach index.template.php
the problem is i cannot access our website cause of the internal server error 500. After i installed this mod...
Hi really want to install shout box to my forum i use smf 1.1.10 and helios theme.pls tell me what version of shoutbox is compatible with 1.1.10.i see the tutorial on how to install it but i dont know where to find the yshout code fo the file i download pls tell how to find the code.cause i install it in my theme and it is succesfull but i cannot see the shoutbox in my board only yhe word shoutbox and the setting.thank's pls help me
@ mrbond - did you install advanced version of shoutbox or normal? You could still see files over FTP manager.
@erwin524 - Last version of shoutbox 1.22 is compatible with SMF 1.1.10. You can find codes and description where to enter them in first post of this thread. If you get some kind of error message involving language then you should read what error says and follow the procedure on how to fix it. It's clearly described in error description itself.
hi i download 1.22 and upload it to my smf,i follow the instruction on the fisrt post and install it on my theme,it was a succesfull install but no shoutbox appear on my board pls tell what is wrong in my installation?
is there a video tutorial on how to install this in costum theme?if none pls some create a video tutorial pls.
don't spam the topic with your questions [double posting IS considered as spam]. you can give us link to your web-page so we can see what's the problem. and you can also attach your index.template.php of your theme here in your post so someone can add yshout to it if you didn't put it right. you can also send me private message if you wish, i could install it for you. and tell you what you did wrong, or what you missed to do.
Quote from: S.N.K.! on October 02, 2009, 10:29:49 PM
Yes, i have spanish_es-utf8 but ive done that, i modified the language file... modifications.spanish.... etc etc.,.
But nothing change,..,
Sorry for my bad english, im argentinian..
My apologies for taking so long to respond but I have been busy.
Yes, the language file is..
Modifications.whatever-language and when the permissions do not show up for the SB in the
Admin/Permissions/Select Permission panel this is usually the issue.
However, there is also a minor add-on edit for the ManagePermissions.php file as well.
As for the SB only showing its title at the top of your forum... I would hazard a guess and say that you did not put the initializing code in the correct place. It looks like you added it to the BoardIndex.php file but in the incorrect location.
I am going to log on to your forum now and see if you got it functioning yet.
UD
Quote from: mrbond on October 15, 2009, 12:26:04 AM
the problem is i cannot access our website cause of the internal server error 500. After i installed this mod...
Contact your server and have them reset your SMF forum to the default settings and theme. This should allow you to access your site.
Other then that you can use FTP (as suggested by ameo) or use 3rd part software such as FileZilla to access and edit your sites files to see what the issue is.
--------------------------------------
NOTE TO ALL:The
Expand/Collapse (http://www.simplemachines.org/community/index.php?topic=137508.msg2229376#msg2229376) routine that I wrote has been edited for minor corrections and the edits for SMF v2.0 Rc1.x have been added.
UD
hmmm...sorry for changing the subject, :P , just wondering if I can adjust this to where it shows in certain boards? and not the main index, thanks!!!
Quote from: PHPLearner on October 25, 2009, 12:24:12 AM
hmmm...sorry for changing the subject, :P , just wondering if I can adjust this to where it shows in certain boards? and not the main index, thanks!!!
Yes.
Do you have a portal installed?
Also... What version of SMF are you using?
UD
Hello,
Where i need to upload the files to? witch map?
and i got an layout upgrade from DARK F but where i need to place the code now?
Regards, Milan
Quote from: 01_Underdog on October 25, 2009, 01:42:26 AM
Quote from: PHPLearner on October 25, 2009, 12:24:12 AM
hmmm...sorry for changing the subject, :P , just wondering if I can adjust this to where it shows in certain boards? and not the main index, thanks!!!
Yes.
Do you have a portal installed?
Also... What version of SMF are you using?
UD
Thanks for the reply, I am using 1.1.9 and no portals installed, Thanks again!! :)
Quote from: PHPLearner on October 25, 2009, 07:33:45 PM
Quote from: 01_Underdog on October 25, 2009, 01:42:26 AM
Quote from: PHPLearner on October 25, 2009, 12:24:12 AM
hmmm...sorry for changing the subject, :P , just wondering if I can adjust this to where it shows in certain boards? and not the main index, thanks!!!
Yes.
Do you have a portal installed?
Also... What version of SMF are you using?
UD
Thanks for the reply, I am using 1.1.9 and no portals installed, Thanks again!! :)
Imao - you should update your forum to v 1.1.10.
Even the latest version of the v1's will most likely not be supported in the near future.
It would be easiest for you to install the latest version of one of the portals for smf. ie. Simple Portal
Then you can illiminate the initialize code from wherever you put it (I assume BoardIndex.php) and put it in a php block on the portal. From there you can have it show up on 1 or multiple boards of your choice.
With the Portal... You can design a nice home page (portal page as it's called) or you can disable it and just have your forum as is with the shoutbox blocks only.
If you need more help just reply to the thread again.
CLICK HERE to learn what to put in a php block. (http://www.simplemachines.org/community/index.php?topic=137508.msg2214618#msg2214618)UD
Hello brothers...
I have been getting this error in the shoutbox since i installed this mod.
Notice: Use of undefined constant menu_button - assumed 'menu_button' in /home/agantuk/public_html/forum/Sources/Load.php(1730) : eval()'d code on line 16
and also except me(Admin) no once can see this shoutbox...
Is there anyone know how to fix it..
please help me
Agantuk, you probably didn't put second piece of code in the right place. Try putting it just before the last bracket of the same box where the first piece of code is. So, just before the very end of box - before last }. As for no1 can see the shoutbox problem - it's been explained multiple times. You need to enable shoutbox in Permissions, for every member group. Members, Global moderators... etc.
Hi,
Is there a way to limit the number of shouts say to 10?
I want to install this in a new theme
and when I try the package parser it says this
Error: Modification XML file (/tmp/smf_xml/themesinstall-1.1.xml) doesn't exist!
Error: Modification XML file (/tmp/smf_xml/languagesenglish_all.xml) doesn't exist!
Error: Modification XML file (/tmp/smf_xml/permissionsinstall-perms-1.1.xml) doesn't exist!
I want to install the nneonneo sb 1.22 in another theme.
I have the sb installed and working in a theme, but I want it in another theme.
Any idea whats the code for it showing in the forum?
Also I want it to show above forum stats - below recent posts.
Any idea how?
Thanks for your help.
Quote from: thechamp on November 02, 2009, 10:46:17 AM
Hi,
Is there a way to limit the number of shouts say to 10?
Navigate to:
yshout / settings.phpFind:
// Set the maximum amount of lines to be displayed at a time
// After changing this, /clear the shoutbox to make the change
// take effect.
$maxLines=10;
The $maxLines variable is the one you want to change to reflect how many lines you want your shoutbox to be maxed out at.
This part is right at the top of that file and yours may not be set to the number I have shown in the code block.
UD
cool, thanks for your help, mine was set to 25, changed it to 10, thanks a lot :)
Quote from: kurosaki00 on November 06, 2009, 10:12:08 PM
I want to install this in a new theme
and when I try the package parser it says this
Error: Modification XML file (/tmp/smf_xml/themesinstall-1.1.xml) doesn't exist!
Error: Modification XML file (/tmp/smf_xml/languagesenglish_all.xml) doesn't exist!
Error: Modification XML file (/tmp/smf_xml/permissionsinstall-perms-1.1.xml) doesn't exist!
I want to install the nneonneo sb 1.22 in another theme.
I have the sb installed and working in a theme, but I want it in another theme.
Any idea whats the code for it showing in the forum?
Also I want it to show above forum stats - below recent posts.
Any idea how?
Thanks for your help.
On
Page 1 (http://www.simplemachines.org/community/index.php?topic=137508.0) of this thread - look under the heading:
Installation to Other Themes.
You need to do the index.template.php edit and also
one of the initialize codes goes into your BoardIndex.template.. You can try to put it smack in the middle of your info center as you wish but I suggest placing it right above it.
UD
It was working fine for a long time.
Now it is broken. My host fix some server problem and I'm not sure if it is related to this or not. It was not working than host support change permissions to 777 and it is working (wrong) now.
The problem: you enter a SHOUT and it is listed in the first line instead of the last one.
The shout history does not change.
If you enter another shout it replaces the previous one. The history is remained.
Attached jpgs for example. I shout test, test 1 and test 2.
Any help? All files are 777 permission.
Quote from: jossanaijr on November 09, 2009, 07:18:26 AM
It was working fine for a long time.
Now it is broken. My host fix some server problem and I'm not sure if it is related to this or not. It was not working than host support change permissions to 777 and it is working (wrong) now.
The problem: you enter a SHOUT and it is listed in the first line instead of the last one.
The shout history does not change.
If you enter another shout it replaces the previous one. The history is remained.
Attached jpgs for example. I shout test, test 1 and test 2.
Any help? All files are 777 permission.
Anything done from the server (except 3 digit code permissions) shouldn't affect your shoutbox. Are you sure you didn't edit a file that changed the settings?
First place to check is the
/ yshout / settings.php file.
Look for...
// The shoutbox usually shows shouts with the newest chats at the bottom.
// If you want the newest ones at the top, set this to true.
$reverseShouts=false;
// If you reverse the shouts, you might want the shout form to be on top
// rather than on the bottom. Set this to true to move the shout form
// to the top (the tool links will stay above the form)
$shoutFormOnTop=false;
The remarks make the settings self explanatory. If adjusting these settings doesn't fix the issue.. then I assume the installation of another mod has messed up one of the file edits. Probably the index.template.php from your theme.
UD
Quote from: 01_Underdog on November 09, 2009, 12:24:02 AM
Quote from: kurosaki00 on November 06, 2009, 10:12:08 PM
I want to install this in a new theme
and when I try the package parser it says this
Error: Modification XML file (/tmp/smf_xml/themesinstall-1.1.xml) doesn't exist!
Error: Modification XML file (/tmp/smf_xml/languagesenglish_all.xml) doesn't exist!
Error: Modification XML file (/tmp/smf_xml/permissionsinstall-perms-1.1.xml) doesn't exist!
I want to install the nneonneo sb 1.22 in another theme.
I have the sb installed and working in a theme, but I want it in another theme.
Any idea whats the code for it showing in the forum?
Also I want it to show above forum stats - below recent posts.
Any idea how?
Thanks for your help.
On Page 1 (http://www.simplemachines.org/community/index.php?topic=137508.0) of this thread - look under the heading: Installation to Other Themes.
You need to do the index.template.php edit and also one of the initialize codes goes into your BoardIndex.template.. You can try to put it smack in the middle of your info center as you wish but I suggest placing it right above it.
UD
thanks bro! everything working like a charm!
Quote from: 01_Underdog on November 09, 2009, 05:00:20 PM
Quote from: jossanaijr on November 09, 2009, 07:18:26 AM
It was working fine for a long time.
Now it is broken. My host fix some server problem and I'm not sure if it is related to this or not. It was not working than host support change permissions to 777 and it is working (wrong) now.
The problem: you enter a SHOUT and it is listed in the first line instead of the last one.
The shout history does not change.
If you enter another shout it replaces the previous one. The history is remained.
Attached jpgs for example. I shout test, test 1 and test 2.
Any help? All files are 777 permission.
Anything done from the server (except 3 digit code permissions) shouldn't affect your shoutbox. Are you sure you didn't edit a file that changed the settings?
First place to check is the / yshout / settings.php file.
Look for...
// The shoutbox usually shows shouts with the newest chats at the bottom.
// If you want the newest ones at the top, set this to true.
$reverseShouts=false;
// If you reverse the shouts, you might want the shout form to be on top
// rather than on the bottom. Set this to true to move the shout form
// to the top (the tool links will stay above the form)
$shoutFormOnTop=false;
The remarks make the settings self explanatory. If adjusting these settings doesn't fix the issue.. then I assume the installation of another mod has messed up one of the file edits. Probably the index.template.php from your theme.
UD
Solved when I changed to $gzipCompression=false;
Thank you!
I realise it's early days but will RC2 be supported at some point?
I tried installing 1.22 (which seems to install fine on RC2) but the Shoutbox doesn't seem to show up.
I'm not that confident in doing a manual install either!
In SMF RC2 shoutbox is working well.
Problem is in installation, I believe.
Apparently, when installing code for display of shoutbox doesn't install in index.template.php
So, let's say you wanna install in default theme - Curve. You need to install shoutbox, as usually,
and you need to open index.template. php and in 3.rd box from bottom, just before last bracket,
you need to insert code for display
// 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
.
Then shoutbox will display, and don't forget to change permissions for each membergroup so it could display for them too.
If you need to see it to believe it see it here: The X WEB (http://www.air.vlexo.net/forum/index.php)
Thanks ameo, that sounds simple enough, I'l give it a try :)
Quote from: ameo on November 10, 2009, 10:23:19 AM
and you need to open index.template. php and in 3.rd box from bottom, just before last bracket,
Sorry, don't understand that bit, can you elaborate for this thicky :)
I've tried it in a few places but it just messes up the formatting completely...
hmmm...
try like this: find this $shown_linktree = true;
and after that, and before bracket place the code.
In the end it will look like this:
$shown_linktree = true;
// 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
}
Awesome! That's working perfectly now 8)
Thanks so much I really appreciate the help :)
I've updated today to 2.0 RC2, and now my IE users cant shout anymore, all other browsers can but IE cant,
whats going on?
Firefox is going on. Tell them to download and install now or suffer forever. O:)
Quote from: ameo on November 14, 2009, 06:05:01 AM
Firefox is going on. Tell them to download and install now or suffer forever. O:)
I couldn't disagree more :) Opera is much better - less security holes, better handles error in code.
But everything is better than IE :)
But strange, I didn't have problems when I tested nneonneo's Shoutbox on IE.
Quote from: ameo on November 14, 2009, 06:05:01 AM
Firefox is going on. Tell them to download and install now or suffer forever. O:)
that wasnt the answer i was waiting for...
anyway they are kinding hating me now, because they cant/want to install FF and they want to shout also..
Quote from: lorddusk on November 14, 2009, 06:39:56 AM
Quote from: ameo on November 14, 2009, 06:05:01 AM
Firefox is going on. Tell them to download and install now or suffer forever. O:)
that wasnt the answer i was waiting for...
anyway they are kinding hating me now, because they cant/want to install FF and they want to shout also..
I just tested this locally with IE on smf2 rc2 and I don't see any issues.
You must manually add the index.template.php edits (from the first page of this thread) and I suggest using the second initialize code.
If you are using the theme that is default for rc2 then you will need to edit the template in the 'core' folder.
UD
Quote from: 01_Underdog on November 15, 2009, 04:07:08 PM
Quote from: lorddusk on November 14, 2009, 06:39:56 AM
Quote from: ameo on November 14, 2009, 06:05:01 AM
Firefox is going on. Tell them to download and install now or suffer forever. O:)
that wasnt the answer i was waiting for...
anyway they are kinding hating me now, because they cant/want to install FF and they want to shout also..
I just tested this locally with IE on smf2 rc2 and I don't see any issues.
You must manually add the index.template.php edits (from the first page of this thread) and I suggest using the second initialize code.
If you are using the theme that is default for rc2 then you will need to edit the template in the 'core' folder.
UD
nope doesnt work :(
lorddusk -
Do you remember seeing any errors in the tests while installing the sb on rc2?
If you can't recall then uninstall the sb and reinstall it - if you see any error flags from the test screen, tell us what file the error was in (or do a screen print and attach it).
BTW - rc2 uses functions on the main forum page now, so the initialize code for the sb must go inside one of these functions after the global call. The global must include $context, $txt and $scripturl.
What theme are you using and where do you have the sb appearing on your forum page?
UD
Expand/Collapse for SMF v2.0 Rc1.x
------------------------------------------
I am having some issues with this site not saving exactly everything I put inside code blocks for some reason, therefore I have included a link listed below with the appropriate SMF 2.0 (Rc1.x and Rc2) edits.
CLICK HERE (http://askusaquestion.net/index.php?topic=4.msg315#msg315) to view the proper SMF 2.0 edits for nneonneo shoutbox.
Tested and working well. If you are having issues with this mod on other themes then the ones mentioned in the link, I will get it working for you upon request.
UD
hey UD, how are you? ;D
For those edits (particularly the "mymod" part), you can simply remove the mymod part completely and add the smiley.php directly into the yshout folder.
require('smiley.php');
loadSmileys();
Just tidies things up a bit and removes the need to create a new folder.
Quote from: SunKing on November 16, 2009, 08:59:45 PM
hey UD, how are you? ;D
For those edits (particularly the "mymod" part), you can simply remove the mymod part completely and add the smiley.php directly into the yshout folder.
require('smiley.php');
loadSmileys();
Just tidies things up a bit and removes the need to create a new folder.
Yes I suppose one could do that. I was concentrating on getting it working properly for rc2.
Tested and working good on Rc2 using the Core and Curve themes.
I will test and get it working on other themes that people are having troubles with upon request.
UD
Hi,
I'm trying to use AdvSB_1.22 on SMF 1.1.10.
I couldn't use package manager (hoster problems) so I made all the changes manually.
The problem is that when the shoutbox tries to open, instead of the shoutbox I see a replication of the forum main page, so if I put the shoutbox on the main page I just see 3-4 indented main pages. What could I have done wrong? :-[
First check file index.php in root directory for SB entry, if it's ok, check all of them one by one.
Thanks WilK! I was forgetting the change in index.php and did another couple of errors, now it's all right. ;)
EDIT: NVM found the fix posted in here already.
Thanks for the mod.
Hi,
I'm wondering if there's a way to add a font color bar to the shoutbox so the users can choose their own font color. Is this possible? Most shoutboxes have bbcode buttons on them which make this easier. How come this one doesn't?
ok after i installed this it worked great on my theme with the php edits however i installed it on avci2 and it appears to have the box for it on the main page but there is no chat box and also now i get thiss when trying to install any packages
You cannot download or install new packages because the Packages directory or one of the files in it are not writable!
Quote from: ameo on November 11, 2009, 03:25:52 AM
hmmm...
try like this: find this $shown_linktree = true;
and after that, and before bracket place the code.
In the end it will look like this:
$shown_linktree = true;
// 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
}
I'm not having any luck getting this up & running on my TestForum with default theme so I can later get it up on my main forum with the custom "Distinct" theme :'(
This edit results in this error & the ShoutBox does not render properly:
Fatal error: Call to undefined function annoyuser() in /home/XXXX/public_html/TestForum/Sources/Load.php on line 1826 (shown below)
AnnoyUser('popup');
if (isset($modSettings['integrate_load_theme']) && function_exists($modSettings['integrate_load_theme']))
call_user_func($modSettings['integrate_load_theme']);
SMF 2 RC 2
Annoy User Mod http://custom.simplemachines.org/mods/index.php?mod=2232
i cannot filnd that in the file you suggested to try
and another thing i noticed is when i install the mod i get like 4 parse erors
Description
1. Execute Modification ./index.php Test successful
2. Execute Modification themes/install-1.1.xml Modification parse error
3. Execute Modification - Modification parse error
4. Execute Modification languages/english_all.xml Modification parse error
5. Execute Modification - Modification parse error
6. Execute Modification permissions/install-perms-1.1.xml Modification parse error
7. Execute Modification - Modification parse error
8. Delete Tree yshout
i have attched the php file that i modded earlier the way it worked on my theme adv2 it worked 100% on this theme it makes a box it want to be there but there is noting in the box and also there is so reference of it in permission it is like it is not installing
I am sorry if this was answered before but I just can't find it. I am using SMF 1.1.11 and have AdvSB_1.22. I followed the instructions to enable smileys and for the most part, it's working perfectly. But, if you try to edit the smiley list order, you can't. It won't load any smileys. After checking the error logs, they are flooded with errors such as this. But these errors only appear when you try to edit the smiley list order.
http://xxxxxx.com/smfbb/index.php?action=smileys;sa=setorder
2: Invalid argument supplied for foreach()
File: /home/XXXXXX/public_html/smfbb/Themes/default/languages/Post.english.php (setorder sub template - eval?)
Line: 564
http://xxxxxx.com/smfbb/index.php?action=smileys;sa=setorder
8: Undefined index: rows
File: /home/xxxxxx/public_html/smfbb/Themes/default/languages/Post.english.php (setorder sub template - eval?)
Line: 564
http://xxxxxx.com/smfbb/index.php?action=smileys;sa=setorder
8: Undefined index: description
File: /home/xxxxxx/public_html/smfbb/Themes/default/languages/Post.english.php (setorder sub template - eval?)
Line: 559
http://xxxxxx.com/smfbb/index.php?action=smileys;sa=setorder
8: Undefined index: title
File: /home/XXXXXX/public_html/smfbb/Themes/default/languages/Post.english.php (setorder sub template - eval?)
Line: 556
There appears to be a conflict but I just don't know what to do. Help please.
can someone help me get the sound to work on this i have attached my index.template.php file and everything is already in the yshout folder i followed the instruction in this thread and cannot get it to work the mp3 i am using is names chat.mp3
Quote from: sattninja on December 06, 2009, 05:57:05 AM
can someone help me get the sound to work on this i have attached my index.template.php file and everything is already in the yshout folder i followed the instruction in this thread and cannot get it to work the mp3 i am using is names chat.mp3
We have never got the sound to work neither so we just ignore it. We asked pages and pages back but no one ever answered so we kinda just shrugged and gave up. (Actually Sandman asked for me and it went unanswered ... but most of his questions get unanswered for some reason. Actually, his last one did as well..) After all, it works without it.
WOW
thats promising :-[ :-[ :-[
Quote from: sattninja on December 06, 2009, 06:24:44 AM
WOW
thats promising :-[ :-[ :-[
Don't get me wrong. I think just that so many people ask questions that it is probably hard to keep up and sometimes questions need to be asked a few times or maybe no one knows the answer? The creator does still check this thread but he is also busy in other threads as well so last he was in this one was a few pages back (http://www.simplemachines.org/community/index.php?topic=137508.msg1989080#msg1989080). And it is frowned upon to message people when you can just post. But if you get an answer I will be very happy because that was one thing that really attracted me to this mod was possible sound in the shoutbox as people don't just sit there and watch it refresh on my forums (well not me anyway haha). But Sandman helped me realize there were emoticons in the shoutbox. Now that is cool! But again he had to figure out what he was doing wrong on his own. We still are getting conflicts but at least it works. Hope we both get answers soon!
it works perfectly for me but like you said sound is a must i followed the instructions and added all the code but still dont work guess we will wait
Please forgive, but I'm not catching/understanding the "Put the
include back and it'll work".
I appreciate the response. I just need a tad bit more info to implement it.
Quote from: Arantor on December 02, 2009, 05:17:45 AM
Quote from: Chazz CC on December 02, 2009, 03:26:53 AM
This edit results in this error & the ShoutBox does not render properly:
Fatal error: Call to undefined function annoyuser() in /home/XXXX/public_html/TestForum/Sources/Load.php on line 1826 (shown below)
AnnoyUser('popup');
if (isset($modSettings['integrate_load_theme']) && function_exists($modSettings['integrate_load_theme']))
call_user_func($modSettings['integrate_load_theme']);
SMF 2 RC 2
Annoy User Mod http://custom.simplemachines.org/mods/index.php?mod=2232
For some reason the include to AnnoyUser.php has been removed. Put the include back and it'll work.
I am still in need of help with my issue that I posted here. Does anyone have any ideas on how to fix this?
http://www.simplemachines.org/community/index.php?topic=137508.msg2388907#msg2388907
i have no border around my shoutbox how can i add a border
(http://img692.imageshack.us/img692/9990/capturekd.jpg)
Quote from: sattninja on December 08, 2009, 07:03:01 PM
i have no border around my shoutbox how can i add a border
(http://img692.imageshack.us/img692/9990/capturekd.jpg)
Yes. Use the expand/collapse I wrote for this shoutbox.
It is posted here:
My forum (http://askusaquestion.net/index.php/topic,4.msg315.html#msg315)There are posts in that thread for different versions of SMF - choose whichever one matches your forum.
These are manual edits, I have not bothered to write auto-installs for it yet.
UD
I made my own code to get sound to work. However, my version of the mod is so heavily modded, that it's not easy to split out the sound part.
happy to know that but that doesn't help us :-[ :-[ :-[
can someone tell me how to install this on RC 2
@ sattninja - you can find instructions on how to do that on 2 pages before this. - look @ the bottom of thread.
Is there no help for my inqury?
http://www.simplemachines.org/community/index.php?topic=137508.msg2388907#msg2388907
I can provide more info if needed.
Hello. Great mod. I would like to move the timestamp so that it is directly under the member name.
[Member's Name:]
[Timestamp]
Message..................
Where can I do this at?
really like this plugin :)
Quote from: Atheos23 on December 18, 2009, 12:26:22 PM
Hello. Great mod. I would like to move the timestamp so that it is directly under the member name.
[Member's Name:]
[Timestamp]
Message..................
Where can I do this at?
Is there an answer for this?
I modded my version a lot. One of them was to implement today and yesterday. So yes, it's possible.
Quote from: Santa Kühne on December 21, 2009, 06:54:12 PM
I modded my version a lot. One of them was to implement today and yesterday. So yes, it's possible.
Advance version of SB has today and yesterday already implemented. :)
Hint: try searching through yshout.php file :)
Quote from: WilK on December 21, 2009, 06:56:58 PM
Advance version of SB has today and yesterday already implemented. :)
That version didn't fullfill my needs, so I did my own version.
Ok guys, thanks for taking an interest. As I am not a programmer, could you give me a hint as to where I could start on this treasure hunt? I understand that you do not reccommend adding a break (?) so there is no other way? Thanks again.
I parse the code when submitted, then it's all saved in the home.txt file as HTML code. So I'm only using php when people are submitting a post (except for the today and yesterday function).
So my text file is bigger, but that's it.
But where does a simple <br /> come into all this?
get the gist of what you guys are talking about and I will take your advice Grinch. Thank you for your help.
Quote from: ameo on December 15, 2009, 05:35:56 AM
@ sattninja - you can find instructions on how to do that on 2 pages before this. - look @ the bottom of thread.
hi,
i did exactly the same as you described in your post.
i installed the newest 1.22 shoutbox package on my smf 2.0 RC2
shoutbox apears on the right place, also i can post shouts and they are shown.
but i get these errors:
QuoteWarning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/data_6b3dfb2ee9aaccacb992db00c4ca8bfe-SMF-modSettings.php) is not within the allowed path(s): (/var/www/vhosts/####.net/subdomains/test/httpdocs:/tmp) in /var/www/vhosts/####.net/subdomains/test/httpdocs/Sources/Load.php on line 2614
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/lang_index+Modifications_english_newyear2x.php) is not within the allowed path(s): (/var/www/vhosts/####.net/subdomains/test/httpdocs:/tmp) in /var/www/vhosts/####.net/subdomains/test/httpdocs/Sources/Load.php on line 1892
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/####.net/subdomains/test/httpdocs/Sources/Load.php:2614) in /var/www/vhosts/####.net/subdomains/test/httpdocs/yshout/yshout.php on line 46
any idea how to fix this?
@Kadeux
You could try putting the yshout folder in your forum's root folder and adjust the paths (for links and such) to it as needed.
I want to place the shoutbox in the info center.
Below recent posts but above forum stats
any idea how please?
Move the include block from the index.template.php to where you want it in the BoardIndex.template.php
ty worked like a charm
Quote from: Angie KidneyKorner on December 06, 2009, 06:15:13 AM
Quote from: sattninja on December 06, 2009, 05:57:05 AM
can someone help me get the sound to work on this i have attached my index.template.php file and everything is already in the yshout folder i followed the instruction in this thread and cannot get it to work the mp3 i am using is names chat.mp3
We have never got the sound to work neither so we just ignore it. We asked pages and pages back but no one ever answered so we kinda just shrugged and gave up. (Actually Sandman asked for me and it went unanswered ... but most of his questions get unanswered for some reason. Actually, his last one did as well..) After all, it works without it.
I got the sound to work without knowing it until my user test it with me and i heard the sound when he shouts at me. All i did was followed the instructions in this topic, nothing more.
Quote from: kurosaki00 on December 31, 2009, 12:34:39 AM
ty worked like a charm
You are quite welcome. Glad I could help.
Hello. We have succesfully installed the shoutbox onto an SMF version 1.1.1 forum, but have a slight problem. The "tools" links and the text on the "Shout!" button dissapear after the page is loaded. The links are then replaced with only the brackets, "[]".
(http://www.trades-usa.com/example.gif)
Please let me know if anyone has any suggestions!
in the advanced sb installation do we really need ftp information.
since my server does not have ftp access, so can we skip it
which mod uses it?
I can install the normal nneonneo shoutbox, but not the advanced one.
To all those who have installed this in SMF 2 RC2,
This mod doesn't say that it's compatible with SMF 2 RC2. Did you installed it manually? Thanks
@ sherwinaval - look HERE (http://www.simplemachines.org/community/index.php?topic=137508.msg2350432#msg2350432)
It's compatible, and isn't so hard to install
thanks.. will try it later today :)
Cool fix, it did worked flawlessly :) thanks.
Just another question, when i try to delete a shout, it says "Session verification failed.... blah blah blah..." I did what it says to log out and login again, but still the same thing.
Any ideas? THanks
Im using ADVSB1.22 with the latest SMF 2.0 and Simple Portal and ahve a few questions...
1.) can i put the timestamp on the same line before the users name or leave ti where it is and make the font size pretty small?
I have both //yshout here codes that are suppose to be in my themes index.template.php in a simple portal block, and not in my index.template.php file...
2.)i want to add smiley icon and bar with the other history icons etc, up top...the tut i found was no help...
3.)the big bold letters SHOUTBOX up top how do i change or remove them?
Cant seem to find out where...
TY!
Quote from: Rep99099 on January 09, 2010, 07:16:00 PM
Im using ADVSB1.22 with the latest SMF 2.0 and Simple Portal and ahve a few questions...
1.) can i put the timestamp on the same line before the users name or leave ti where it is and make the font size pretty small?
I have both //yshout here codes that are suppose to be in my themes index.template.php in a simple portal block, and not in my index.template.php file...
2.)i want to add smiley icon and bar with the other history icons etc, up top...the tut i found was no help...
3.)the big bold letters SHOUTBOX up top how do i change or remove them?
Cant seem to find out where...
TY!
1 - Yes you can change the font size and color of the timestamp.
Find:
#yshout .shout-timestamp {
font-style: normal;
font-weight: normal;
}
Make your adjustment here.
For an example - Replace above code with this:
#yshout .shout-timestamp {
font-size: 8px;
font-style: normal;
font-weight: normal;
color: #330099
}
Change font size and color to your liking.
<<<<>>>>
2 - I made tuts for a smiley bar and changing the commands to icons that work perfectly.
CLICK HERE (http://askusaquestion.net/index.php/topic,4.msg6.html#msg6) and scroll down to the various functions you wish to adjust.
Note:
I recently changed this edit due to the rc2 language files setup. Language $txt files are not used.. variable for url is set directly in the yshout.php file after the $boardurl is called in the global.
This is due to the fact that most $txt language edits done to modify an existing mod for rc2 must be adjusted in both the default/language files and also the cache folder.
Less edits are necessary by not doing the $txt language edits and setting the variable in the yshout.php file itself.
<<<<>>>>
3 - In the initialize code you will see this variable: $txt['yshout_shoutbox']
This is the title for the shoutbox that is set in the language php file.
You can change it in the language file or just put the edit right in the initialize code.
UD
so i would change the $txt['yshout_shoutbox'] in the yshout.php file to:
$txt['myshoutboxname'] ?
any way to put the timestamp on the same line as username?
Quote from: Rep99099 on January 10, 2010, 12:26:40 AM
so i would change the $txt['yshout_shoutbox'] in the yshout.php file to:
$txt['myshoutboxname'] ?
any way to put the timestamp on the same line as username?
I will have to get back to you on this one.
I just got a new PC with Windows 7 and I can't seem to get the mysql to install properly with EasyPHP so therefore I am currently unable to install and test things locally such as adjusting the layout of the shoutbox for you. (I won't do it on my own site - I prefer to test these things on my pc)
However, if you wish to experiment:
In the yshout.php file...
find:
// utility functions for reading shouts
Directly under this code is where the variable is set that contains the timestamp and the shout text.
You can try experimenting with it a bit to try and change the look of what is displayed.
My apologies, as I have already stated - currently I am not able to do the adjustments and testing myself until I install EasyPHP properly on my Windows 7 later this week.
UD
Quote from: Rep99099 on January 10, 2010, 12:26:40 AM
so i would change the $txt['yshout_shoutbox'] in the yshout.php file to:
$txt['myshoutboxname'] ?
No.. this variable is set in the language files.
You stated that you are using a portal block to display the shoutbox, therefore...
It is echoed (displayed) in the initialize code that you placed in your php portal block.
Just set it in your block just before the second bit of code you added (initialize code)
ie.
$txt['yshout_shoutbox'] = 'My Shoutbox';
UD
// 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[
if (window.addEventListener){
window.addEventListener("load", function(){loadChat();}, false);
} else if (window.attachEvent){
window.attachEvent("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 #shouts {
}
#yshout {
font-size: 14px;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
border: 0px solid #777777;
padding: 0px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
margin-top: 0;
}
#yshout hr { /* shout divider */
color: #fa0000;
height: 1px;
border: 0;
background-color:#cccccc;
}
#yshout .shout-timestamp {
font-weight: normal;
font-style: normal;
font-size:.7em;
color: #000000;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 8pt;
color: #000000;
}
#yshout #shout-form {
}
#yshout #shout-form fieldset {
border: none;
}
#forum-name, #shout-text, #shout-button {
font-size: 16px;
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;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
// 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
Quote from: Rep99099 on January 10, 2010, 01:00:23 AM
// 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[
if (window.addEventListener){
window.addEventListener("load", function(){loadChat();}, false);
} else if (window.attachEvent){
window.attachEvent("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 #shouts {
}
#yshout {
font-size: 14px;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
border: 0px solid #777777;
padding: 0px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
margin-top: 0;
}
#yshout hr { /* shout divider */
color: #fa0000;
height: 1px;
border: 0;
background-color:#cccccc;
}
#yshout .shout-timestamp {
font-weight: normal;
font-style: normal;
font-size:.7em;
color: #000000;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 8pt;
color: #000000;
}
#yshout #shout-form {
}
#yshout #shout-form fieldset {
border: none;
}
#forum-name, #shout-text, #shout-button {
font-size: 16px;
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;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
// 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
<<<<<>>>>>
Find:
// 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
Replace with:
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
$shouts_title = 'My Title For The Shoutbox';
if(allowedTo('yshout_view'))
{
echo '<br /><b>', $shouts_title ,'</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
Edit this line to what you want displayed as your title:
$shouts_title = 'My Title For The Shoutbox';
UD
TY!, works PERFECT!
But is there anyway I can remove the title completely? there is a title in my portal block :)
I was successful adding the smiley bar, but is there any javascript file that or a way i can put a smiley icon next to the admin functions/icons on top of the shoutbox and have it open and close by clicking only 1 icon instead of 2...?
or if just the open and close options would work if i could put those above the shoutbox next to the other icons
@Rep99099
Just remove this whole line to remove the title completely:
echo '<br /><b>', $shouts_title ,'</b><br /><br />';
Did you ever get the timestamp on the same line as username sorted?
no i can cahnge teh size now but nto able to put on same line,
Type Action Description
* 1. Execute Modification ./index.php Test successful
1. Add Before ./index.php Test successful
* 2. Execute Modification ./Themes/default/index.template.php Test failed
1. Add Before ./Themes/default/index.template.php Test successful
2. Add After ./Themes/default/index.template.php Test successful
3. Add Before ./Themes/default/index.template.php Test successful
4. Replace ./Themes/default/index.template.php Test failed
5. Add After ./Themes/default/index.template.php Test failed
* 3. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
1. Add Before ./Themes/default/languages/Modifications.english.php Test successful
4. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
5. Execute Modification ./Themes/default/languages/Modifications.english_british.php Skipping file
6. Execute Modification ./Themes/default/languages/Modifications.english_british-utf8.php Skipping file
* 7. Execute Modification ./Sources/ManagePermissions.php Test successful
1. Add After ./Sources/ManagePermissions.php Test successful
8. Extract Tree ./yshout
9. Extract File ./Themes/default/css/yshout.css
10. Extract File ./Themes/default/images/calendar.png
11. Extract File ./Themes/default/images/info.png
12. Extract File ./Themes/default/images/cog_delete.png
13. Extract File ./Themes/default/images/cog_add.png
14. Extract File ./Themes/default/images/smile.png
15. Extract File ./Themes/default/images/date.png
16. Extract File ./Themes/default/images/mute.png
17. Extract File ./Themes/default/images/unmute.png
I get this errors when installing the shoutbox in the default theme. By installing it in a custom theme i get the same errors . I tried too install it and i added the following code as mentioned in the topic
$shown_linktree = true;
// 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
}
It did work i saw a sort of shoutbox but when i typ much things in the shoutbox it gets big. I need too scroll down for my forum lol
thanks SK title removed!
now for timestamp to be on same line as username???
Hey, I read alot...
But why not upload a new Shoutbox ? For example nneonneo's Shoutbox SMF 2.0 RC2 FIX!
my forum
also using the scrollbar and the auto scroll effect in the tutorial.
my shout bar and new shouts are on the bottom, when i scroll up to read old shouts, in 5 seconds or it will auto take me to the bottom, or when a new shout is entered, this is a very active chatbox, and id like to be able to scroll up and read old posts without being took down to the bottom where new shouts are again, and also be able to (when scrollbar is at bottom viewing new shouts) haveit auto scroll with the new shouts...
make sense? lol
still cant figure out the timestamp on same line as suername
Quote from: Rep99099 on January 10, 2010, 01:36:50 AM
TY!, works PERFECT!
But is there anyway I can remove the title completely? there is a title in my portal block :)
I was successful adding the smiley bar, but is there any javascript file that or a way i can put a smiley icon next to the admin functions/icons on top of the shoutbox and have it open and close by clicking only 1 icon instead of 2...?
or if just the open and close options would work if i could put those above the shoutbox next to the other icons
I can re-write your block for you to show the smiley bar the way you want but I need to know what version of smf you are using first.
btw - to read old shouts why not use history command instead of scrolling?
UD
Quote from: Rep99099 on January 10, 2010, 01:36:50 AM
I was successful adding the smiley bar, but is there any javascript file that or a way i can put a smiley icon next to the admin functions/icons on top of the shoutbox and have it open and close by clicking only 1 icon instead of 2...?
or if just the open and close options would work if i could put those above the shoutbox next to the other icons
Ok... I read on another post you made that you are using smf2 rc2, so I made the block code for you:
Portal PHP block code For Nneonneo Shoutbox with smiley bar for SMF2 Rc2.x:
(smf 2.0 mymod files must be present and yshout.php file must be edited as per smiley add-on)
// --nneonneo shoutbox with smiley bar-- php block code for SMF 2.0 Rc2.x
// Visit http://askusaquestion.net/ for other block requests
// Shoutbox smiley files and edits must be present
// Smiley toggle icon must be put in /Themes/YOUR_THEME(S)/images/sb_smiley.gif for all themes your users have access to
// Smiley border style can be changed on the line below
$smiley_border = 'windowbg2';
// Do not change the file directory in variable below
// Unless you edit the collapse object aswell
$smiley_bar = "sb_smiley.gif";
$smiley_text = 'Toggle Smiley Bar';
// 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[
if (window.addEventListener){
window.addEventListener("load", function(){loadChat();}, false);
} else if (window.attachEvent){
window.attachEvent("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 #shouts {
overflow: visible;
width: 100%;
height: 100%;
}
#yshout {
font-size: 14px;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
border: 0px solid #777777;
padding: 0px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
margin-top: 0;
}
#yshout hr { /* shout divider */
color: #fa0000;
height: 1px;
border: 0;
background-color:#cccccc;
}
#yshout .shout-timestamp {
font-weight: normal;
font-style: normal;
font-size:.7em;
color: #000000;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 8pt;
color: #000000;
}
#yshout #shout-form {
}
#yshout #shout-form fieldset {
border: none;
}
#forum-name, #shout-text, #shout-button {
font-size: 16px;
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;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
// YSHOUT START - Shoutbox initialize code with smiley bar
global $txt, $context, $settings, $options;
$options['collapse_header_sm'] = isset($options['collapse_header_sm']) ? $options['collapse_header_sm'] : true ;
echo '
<h4>
<img class="icon" id="upshrink_sm" src="', $settings['images_url'], '/'.$smiley_bar.'" alt="*" title="', $smiley_text, '" style="margin-left;" align="right" />
</h4>
<div id="upshrinkHeaderSM"', empty($options['collapse_header_sm']) ? '' : ' style="display: none;"', '>
<div class="'.$smiley_border.'">';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
<script type="text/javascript">
</script> </div></div>
</div>';
echo '
<div id="yshout">',$txt['yshout_loading'],'</div>';
// YSHOUT END - shoutbox initialize code with smiley bar
// YSHOUT - Smiley bar collapse object for SMF 2.0 Rc2.x - START
$smiley_text = 'Toggle Smiley Bar';
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oSmileyToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_sm']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderSM\'
],
aSwapImages: [
{
sId: \'upshrink_sm\',
srcExpanded: smf_images_url + \'/sb_smiley.gif\',
altExpanded: ', JavaScriptEscape($smiley_text), ',
srcCollapsed: smf_images_url + \'/sb_smiley.gif\',
altCollapsed: ', JavaScriptEscape($smiley_text), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_sm\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkSM\'
}
});
// ]]></script>';
// YSHOUT - Smiley bar collapse object - END
NOTE: Please read the remarks from the beginning of the block code for proper instructions.
... This already includes the edits to style that you did. I didn't really double check these settings you made, however I added some height, width and overflow to the visible shouts so that it displays correctly in a top or bottom block.
If you (or anyone) would like the changes to the style for a side block I can provide it... I have a nice one in my arcade.
UD
\\Edit -Ignore the above code...I was in error... Although it works, it is not proper and will give errors if style codes are not put in the head code (in index.template.php).
I have come up with another way of having multiple style edits within the head code... posted on my site for those that want to know how.
thanks!
sometimes my shoutbox will go blank once in a while till i type, any ideas?
Quote from: Rep99099 on January 12, 2010, 02:16:35 PM
thanks!
sometimes my shoutbox will go blank once in a while till i type, any ideas?
The only time I have seen it do that is after deleting a shout in which case I use refresh afterwards.
I will test it for a bit and see if it does this for me after typing shouts.
UD
Quote from: Rep99099 on January 12, 2010, 02:16:35 PM
thanks!
sometimes my shoutbox will go blank once in a while till i type, any ideas?
I didn't have this problem at all after testing it for a while.
However, I see that the issue may have been a small bit of code I left in there from the old unnecessary collapse object (for the sb itself).
I made another block with the other initialize code and also edited the other post which now has the correction.
Try this:
// --nneonneo shoutbox with smiley bar-- php block code for SMF 2.0 Rc2.x
// Visit http://askusaquestion.net/ for more block requests
// Shoutbox smiley files and edits must be present
// Smiley toggle icon must be put in /Themes/YOUR_THEME(S)/images/sb_smiley.gif for all themes your users have access to
// Smiley border style can be changed on the line below
$smiley_border = 'windowbg2';
// Do not change the file directory in variable below
// Unless you edit the collapse object aswell
$smiley_bar = "sb_smiley.gif";
$smiley_text = 'Toggle Smiley Bar';
// 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[
if (window.addEventListener){
window.addEventListener("load", function(){loadChat();}, false);
} else if (window.attachEvent){
window.attachEvent("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 #shouts {
overflow: visible;
width: 100%;
height: 100%;
}
#yshout {
font-size: 14px;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
border: 0px solid #777777;
padding: 0px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
margin-top: 0;
}
#yshout hr { /* shout divider */
color: #fa0000;
height: 1px;
border: 0;
background-color:#cccccc;
}
#yshout .shout-timestamp {
font-weight: normal;
font-style: normal;
font-size:.7em;
color: #000000;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 8pt;
color: #000000;
}
#yshout #shout-form {
}
#yshout #shout-form fieldset {
border: none;
}
#forum-name, #shout-text, #shout-button {
font-size: 16px;
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;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
// YSHOUT START - Shoutbox initialize code with smiley bar
global $txt, $context, $settings, $options, $boarddir;
$options['collapse_header_sm'] = isset($options['collapse_header_sm']) ? $options['collapse_header_sm'] : true ;
echo '
<h4>
<img class="icon" id="upshrink_sm" src="', $settings['images_url'], '/'.$smiley_bar.'" alt="*" title="', $smiley_text, '" style="margin-left;" align="right" />
</h4>
<div id="upshrinkHeaderSM"', empty($options['collapse_header_sm']) ? '' : ' style="display: none;"', '>
<div class="'.$smiley_border.'">';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
<script type="text/javascript">
</script> </div></div>
</div>';
if(allowedTo('yshout_view'))
{
echo '
<div id="yshout"';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
if ($context['user']['is_guest'])
{
echo $txt['yshout_no_guests'];
}
// YSHOUT END - shoutbox initialize code with smiley bar
// YSHOUT - Smiley bar collapse object for SMF 2.0 Rc2.x - START
$smiley_text = 'Toggle Smiley Bar';
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oSmileyToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_sm']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderSM\'
],
aSwapImages: [
{
sId: \'upshrink_sm\',
srcExpanded: smf_images_url + \'/sb_smiley.gif\',
altExpanded: ', JavaScriptEscape($smiley_text), ',
srcCollapsed: smf_images_url + \'/sb_smiley.gif\',
altCollapsed: ', JavaScriptEscape($smiley_text), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_sm\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkSM\'
}
});
// ]]></script>';
// YSHOUT - Smiley bar collapse object - END
UD
It appears as the shoutbox is installed correctly, however after the first text entry is made, the input field, usersname field and 'shout' button disappear. I am thinking a carriage return should be inserted in the code somewhere so these items are below the output messages and I haven't a clue where or otherwise put it. If in fact that is the answer. I'm not a developer. Please help.
I have 2 questions, which may have been covered... but the thread is 290 pages long.
1) Is there a way to increase the refresh rate? I look through the code and there are plenty of instances of the word refresh, but none that has a value to it that I can edit.
2) I installed it with the TANGO skin, and it now only shows the SB on hte index, and not when viewing a thread. Is that by design, or something that can fix that?
Quote from: TheTripleB on January 13, 2010, 08:32:38 PM
I have 2 questions, which may have been covered... but the thread is 290 pages long.
1) Is there a way to increase the refresh rate? I look through the code and there are plenty of instances of the word refresh, but none that has a value to it that I can edit.
2) I installed it with the TANGO skin, and it now only shows the SB on hte index, and not when viewing a thread. Is that by design, or something that can fix that?
I believe the adjustments you are looking for can be done in:
/ yshout / settings.php It is displayed on the forum index page by default.
You can have it show up wherever you wish by manually putting the initialize code in the appropriate location.
The easiest way to get the sb to show anywhere you want is to put the initialize code in a portal block which would give you control as to where it is displayed.
UD
Hi, When will this be released for 2.0 RC2?
Thanks
Quote from: MH-MINI on January 13, 2010, 10:36:11 PM
Hi, When will this be released for 2.0 RC2?
Thanks
nneonneo shoutbox adv v1.22 already works with smf2 rc2
There is a list of manual edits in case it will not install correctly (install and use edits to fix any errors shown).
To view the edits - bring up the modification download screen, choose your SMF version and click on parse.
UD
Quote from: 01_Underdog on January 13, 2010, 10:39:13 PM
CLICK HERE (http://custom.simplemachines.org/mods/index.php?action=parse) to view the edits.
Haha? Dead link?
Quote from: MH-MINI on January 13, 2010, 10:48:47 PM
Quote from: 01_Underdog on January 13, 2010, 10:39:13 PM
CLICK HERE (http://custom.simplemachines.org/mods/index.php?action=parse) to view the edits.
Haha? Dead link?
Ya... The parse drop down menu uses POST (I think) and didn't provide a link. You will have to navigate to the download page for the mod, choose your SMF version on the drop down menu and click on parse.
I installed this on my smf 2.0 rc2 test forum without any troubles.
UD
So I install the mod first, ignore the errors and then follow the instructions?
Thanks
Quote from: MH-MINI on January 13, 2010, 11:14:32 PM
So I install the mod first, ignore the errors and then follow the instructions?
Thanks
Yes.
Just jot down which file(s) it showed errors that it tried to edit.
Navigate to that file and use the parse edits as a reference where needed.
UD
Quote from: ameo on November 11, 2009, 03:25:52 AM
hmmm...
try like this: find this $shown_linktree = true;
and after that, and before bracket place the code.
In the end it will look like this:
$shown_linktree = true;
// 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
}
This "solution" for to see the chat in SMF 2.0 RC2 ... create distortions in the them. Thouse are:
(http://img44.imageshack.us/img44/6746/margen.png)
(http://img693.imageshack.us/img693/4096/margen2.png)
Had to change some of the proposed code? Any other solution?
Quote from: Arantor on January 14, 2010, 02:55:47 AM
Quote from: 01_Underdog on January 13, 2010, 10:56:26 PM
Ya... The parse drop down menu uses POST (I think) and didn't provide a link. You will have to navigate to the download page for the mod, choose your SMF version on the drop down menu and click on parse.
Actually... that's not entirely accurate. When you're on the parse page, check out the "Installation instructions for xxxxxx" - it's actually a link to the GET version of the page ;)
For 2.0 RC2, last version of shoutbox, it's http://custom.simplemachines.org/mods/index.php?action=parse;mod=585;attach=77561;smf_version=2.0_RC2
Thanks for the info.
The full url didn't show up in the browser on the parse page after using the drop down menu (that uses - GET) so I just directed the user to the drop down menu itself. However, I now notice that the link is actually available at the top-left of the parse page in the page title.
UD
Quote from: kr5323 on January 14, 2010, 05:24:46 PM
Quote from: ameo on November 11, 2009, 03:25:52 AM
hmmm...
try like this: find this $shown_linktree = true;
and after that, and before bracket place the code.
In the end it will look like this:
$shown_linktree = true;
// 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
}
I tested this by placing an initialize code in the same place as shown above (index.template.php file of your theme) and it seems to be working just fine (using curve or core). Perhaps all the breaks are mis-aligning your theme somehow.
Try replacing the above code with this:
$shown_linktree = true;
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<br /><strong>',$txt['yshout_shoutbox'],'</strong><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
}
Another solution may be placing the initialize code in a different part of your index.template.php or perhaps putting the initialize code in your BoardIndex.template.php instead.
UD
Hi,
I installed the latest ADV for 2.0RC2,
and i have a kind of a little problem here :
(http://i48.tinypic.com/vdjqeb.png)
Please help me?
Quote from: lorddusk on January 16, 2010, 07:51:20 AM
Hi,
I installed the latest ADV for 2.0RC2,
and i have a kind of a little problem here :
(http://i48.tinypic.com/vdjqeb.png)
Please help me?
Is this the immediate result after installing the sb, or have you done any modifications to the code?
Quote from: 01_Underdog on January 17, 2010, 01:58:47 AM
Quote from: lorddusk on January 16, 2010, 07:51:20 AM
Hi,
I installed the latest ADV for 2.0RC2,
and i have a kind of a little problem here :
(http://i48.tinypic.com/vdjqeb.png)
Please help me?
Is this the immediate result after installing the sb, or have you done any modifications to the code?
immediate after installation...
Quote from: lorddusk on January 17, 2010, 05:32:14 AM
immediate after installation...
What is the part that you covered up with your image editor??
It appears as though another mod or possibly scripted ads from your site may be conflicting with the sb.
Give me a link to your site please.
UD
Quote from: 01_Underdog on January 17, 2010, 07:15:05 PM
What is the part that you covered up with your image editor??
My IP Adress
Quote from: 01_Underdog on January 17, 2010, 07:15:05 PM
It appears as though another mod or possibly scripted ads from your site may be conflicting with the sb.
Give me a link to your site please.
UD
http://www.peellan.nl
Quote from: lorddusk on January 18, 2010, 01:23:04 PM
Quote from: 01_Underdog on January 17, 2010, 07:15:05 PM
What is the part that you covered up with your image editor??
My IP Adress
Quote from: 01_Underdog on January 17, 2010, 07:15:05 PM
It appears as though another mod or possibly scripted ads from your site may be conflicting with the sb.
Give me a link to your site please.
UD
http://www.peellan.nl
Your forum is Dutch, correct?
Try checking your
/ Themes / default / languages / Modifications.dutch.phpSomewhere in this file there should be the following language code:
// ---- 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' => ' <message>: Emotes the message (e.g. <span class="meaction"> * Nathaniel likes dogs</span>)');
$txt['yshout_cmdlistadmin'] = array(
'/clear' => ': Completely empty the Shout Box.',
'/erase' => ': Erase entire Shout Box history.',
'/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' => ' <mode> <username>: 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' => ' <mode> <IP>: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate' => ' <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote><div>
<user>: 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' => ' <message>: 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 ----
If it isn't in that file then find and place the language code I listed above
BEFORE this code in that file:
?>
(located at the end of the file)
If it doesn't solve the issue then we try something else.
UD
didnt work, still the same.
Im going to try to do a fresh install of SMF, because this forum has had MANY upgrades, and might have had enough :P
Hello!
I installed the simple version of nneonneo's Shoutbox on RC2.0. It looks a very nice mod - fast and very helpful!
Unfortunately I've a problem with it. When I try to click an admin link (del, ban), I've got a message "Session verification failed. Please try logging out and back in again, and then try again."
I'm logged in as admin of the forum. The text command for banning is working just fine. What can be done with this session verification?
Thanks in advance!
One more problem - for some reason there is an error when function unloadChat() is called - "request is null or not an object" or something like this. Because of this the chat cannot be uploaded and this causes problems with forum's connection to the database.
Just an FYI
I have downloaded and installed SMF 2.0 RC2 and the advanced shoutbox 1.22
I have -NO- mods installed and installed this first and I am getting the same issue as lorddusk.
I have manually/visually verified every install edit is correct and where it should be.
I am a complete novice with SMF, but I was pretty decent at installing/troubleshooting mods for my vBulletin and did that for 8 years, so I am not lost at editing files.
(edit add:) It's worth noting, after installing Simple Portal, on the main/default index: if I refresh the page a whole bunch of times I very briefly see a tiny error message pop up on the line below the word shoutbox.
Error: No Settings
Don't know if that will help or not.
hi,
i have this mod installed, and i put my shoutbox on my simple portal left block.
problem is...when there are sentences or messages that are very long, a horizontal scroll bar will appear and to read it i have to use the scroll bar.
what i want is when there are long messages it would just break to the next line rather than the a long message appearing horizontally.
anyone?
im using smf ver. 1.1.11
shoutbox ver - SB_1.22
Try this:
Open yshout.css (or check the top of your index.template.php for some versions) and find #yshout #shouts {
Just beneath this line add a new line containing word-wrap:break-word; That should then break the sentences (or words if needed) and drop them down to the next line.
Quote from: psynx on January 22, 2010, 09:17:03 AM
hi,
i have this mod installed, and i put my shoutbox on my simple portal left block.
problem is...when there are sentences or messages that are very long, a horizontal scroll bar will appear and to read it i have to use the scroll bar.
what i want is when there are long messages it would just break to the next line rather than the a long message appearing horizontally.
anyone?
im using smf ver. 1.1.11
shoutbox ver - SB_1.22
I'm not exactly sure how you have it set up...
You may have to delete the yshout style code from your themes index.template.php before using this...
Side block for nneonneo shoutbox - SMF v1.1.1x (without smileys)
// YSHOUT - nneonneo shoutbox side-block for SMF
global $txt,$context,$boarddir, $boardurl, shoutFile;
// YSHOUT START - style code
$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: 13px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
overflow: visible;
width: 100%;
height: 300px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-size: 0pt;
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 {
color: #cccccc;
width: 90px;
margin-right: 2px;
}
#yshout #shout-text {
width: 130px;
margin-right: 2px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - style code
// YSHOUT HERE - shoutbox initialize code
if(allowedTo('yshout_view'))
{
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
... you can also set up the permissions on your block not to allow certain user groups to view it such disallowing guests.
I adjusted it so that the timestamp is not visible for the side block (imao - not enough room to show it properly) but it is still visible in the history file.
UD
\\Edit -Ignore the above code... I was in error... Although it works, it is not proper and will give errors if style codes are not put in the head code (in index.template.php).
I have come up with another way of having multiple style edits within the head code... posted on my site for those that want to know how.
Quote from: SunKing on January 22, 2010, 10:47:19 AM
Try this:
Open yshout.css (or check the top of your index.template.php for some versions) and find #yshout #shouts {
Just beneath this line add a new line containing word-wrap:break-word; That should then break the sentences (or words if needed) and drop them down to the next line.
That DOES fix the problem...
But it creates a new one.
Now when I submit a shout..the shout box keeps growing and growing with every post.
hello,
thanks for the reply.
i am confuse on where to put those codes you guys have mentioned?
i have added the codes which Sunking says.
and also i adjusted the width and height of my shoutbox.
experimenting on this code below#yshout #shouts {
word-wrap:break-word;
overflow: auto;
width: 235px; /* the width you want to display */
height: 200px; /* the height you want to display */
overall i have this yshout codes in my index.template.php
// 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 {
color: #666666;
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
// 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 #shouts {
word-wrap:break-word;
overflow: auto;
width: 235px; /* the width you want to display */
height: 200px; /* the height you want to display */
}
#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 {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
width: 215px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code
Not sure why it would start doing that..but the fix for that would be to add 2 lines of code to the #yshout #shout class:
height:180px;
overflow:auto;
You can set the 180px obviously to whatever height you want.
@psynx
The location of the css for this shoutbox varies depending on the version. You obviously have the css in the top of your index.template.php (looks like it's in there twice in fact). If you attach your index.template.php, I will make the edits for you and remove the second instance of the yshout. ;)
alright...
please take a loot at the attached files.
my index.template.php
IMAO - I find it better to remove the style script from the index.template.php file altogether and just put it in the block itself.
This way, no matter where you locate a block to view the shoutbox, the style can be edited to have it display properly (top/bottom or sides).
UD
\\Edit -I was in error... Although it works, it is not proper and will give errors if style codes are not put in the head code (in index.template.php).
I have come up with another way of having multiple style edits within the head code... posted on my site for those that want to know how.
Quote from: psynx on January 22, 2010, 01:35:27 PM
hello,
thanks for the reply.
i am confuse on where to put those codes you guys have mentioned?
i have added the codes which Sunking says.
and also i adjusted the width and height of my shoutbox.
experimenting on this code below#yshout #shouts {
word-wrap:break-word;
overflow: auto;
width: 235px; /* the width you want to display */
height: 200px; /* the height you want to display */
Try using a percentage for your width instead of px
Quote from: SunKing on January 22, 2010, 01:36:08 PM
Not sure why it would start doing that..but the fix for that would be to add 2 lines of code to the #yshout #shout class:
height:180px;
overflow:auto;
You can set the 180px obviously to whatever height you want.
I'm not finding a 'class' paired with shout when I text search in the yshout.css or the index.template.
Also...I was switching between themes..and it is still broken with the default rounted theme...but it looks right on the core-theme (save the whole ever growing box)
Tell you what, would you like an admin account to come look for yourself?
@01_Underdog
i did try the code you say but i got a template parse error.
@Thanatos0042
Certainly. I can get you squared away in no time.
@psynx
File attached, although everything looked in place already aside from the doubled code, which I removed.
Quote from: psynx on January 22, 2010, 02:20:32 PM
@01_Underdog
i did try the code you say but i got a template parse error.
The code I gave yo above was to be put into a php block.. it would not crash your board.. if there were any errors it would just show in the block .. and there aren't any as far as I can see.
If you are just talking about editing the width of shouts for the style in your themes index.template.php then you must not have entered the code properly.
I have a side block with smileys that I use myself... I also have one for SMF v1.1.1x which I have tested and works just fine.
Try this php code in your side block:
// YSHOUT - nneonneo shoutbox with smiley bar - portal block code for smf 1.1.x
// Put smiley.php and animatedcollapse.js in a folder named mymod and put this folder in your main directory
// The images for the expand/collapse of the smiley bar can be edited below (default are images from smiley folder)
global $context, $txt, $settings, $boardurl,$shoutFile, $boarddir;
$smiley_bar1 = $boardurl . '/Smileys/default/smiley.gif';
$smiley_bar2 = $boardurl . '/Smileys/default/undecided.gif';
// YSHOUT START - style code
$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: 13px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
overflow: visible;
width: 100%;
height: 300px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-size: 0pt;
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 {
color: #cccccc;
width: 90px;
margin-right: 2px;
}
#yshout #shout-text {
width: 130px;
margin-right: 2px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - style code
// YSHOUT - Shoutbox initialize code (using animated collapse for the smiley bar) - START
if(allowedTo('yshout_view'))
{
echo '
<script src="',$boardurl,'/mymod/animatedcollapse.js" type="text/javascript"></script>
<div align="left">
<a href="javascript:collapse1.slideup()"><img src="', $smiley_bar2 , '" alt="Close Smiley" title="Close Smiley" style="margin-right: 2ex;" align="right" /></img></a>
<a href="javascript:collapse1.slidedown()"><img src="', $smiley_bar1 , '" alt="Open Smiley" title="Open Smiley" style="margin-right: 2ex;" align="right" /></img></a>';
require('mymod/smiley.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/false), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>';
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
if ($context['user']['is_guest'])
{
echo $txt['yshout_no_guests'];
}
// YSHOUT - shoutbox initialize code - END
UD
\\Edit -Ignore the above code... I was in error... Although it works, it is not proper and will give errors if style codes are not put in the head code (in index.template.php).
I have come up with another way of having multiple style edits within the head code... posted on my site for those that want to know how.
Database error in block code. Please check the code.
PM sent with details.
I have go leave for awhile, so I'll check back later when I am home.
thanks again for all your assistance.
Well, that explains why you're not replying in the shoutbox.... ;D
I can move it around some more if you need. Just let me know if that is what you wanted.
Quote from: psynx on January 22, 2010, 02:36:13 PM
Database error in block code. Please check the code.
I am testing it now and it seems to be working ok.
it refreshes and messages will temporary disappear for seconds...that is not good.
Try this index.template.php. And I'll start on adding it to the portal block.
It appears as the shoutbox is installed correctly, however after the first text entry is made, the input field, usersname field and 'shout' button disappear. I am thinking a carriage return should be inserted in the code somewhere so these items are below the output messages and I haven't a clue where or otherwise put it. If in fact that is the answer. I'm not a developer. Please help.
Top of page on left at
http://glendive-mt.net/SMF20/index.php (http://glendive-mt.net/SMF20/index.php)
Having a quick glance at that site, I think it's actually where you have the block of code (that calls the shoutbox) located in the index.template.php. If you would like, you can create a temp admin account there and I can straighten it out for you. Just PM me the details if you would like to do this. I also understand if you'd rather not. ;) I don't get offended at that.
Quote from: Boby_ on January 21, 2010, 05:37:48 AM
One more problem - for some reason there is an error when function unloadChat() is called - "request is null or not an object" or something like this. Because of this the chat cannot be uploaded and this causes problems with forum's connection to the database.
Any ideas about this problem? It makes the shoutbox virtually unusable.
Is this mod membergroup based? :-\
@Boby_
Let me know if that has indeed solved your problems.
@BlueDevil
Through the use of permissions, yes.
Quote from: SunKing on January 23, 2010, 01:22:44 PM
Having a quick glance at that site, I think it's actually where you have the block of code (that calls the shoutbox) located in the index.template.php. If you would like, you can create a temp admin account there and I can straighten it out for you. Just PM me the details if you would like to do this. I also understand if you'd rather not. ;) I don't get offended at that.
Thanks for the tip SunKing; I think I finally got it using your suggestion.
Glad you have it sorted.
hi one of my mods banned me from shout by mistake how do i unban myself?
thanks
EDIT: it's ok now i have found a file with the banlist on it and removed my name. It would be good if there was a way to make admin unbanable
Hi,
I noticed there are some issues with SMF 2.0 RC2.
does anyone know if the bugs have been fixed?
Is it ok to install the latest shoutbox with RC2?
thank you!
(http://img94.imageshack.us/img94/7164/newbitmapimagehr.png)
how can i put a neoneo shoutbox here? this is a blackday theme help me thanks
Using SMF 1.1.11 & Tinyportal v1.0 beta 4
Installed nneonneo shoutbox and added smiley bar
When i try to delete shout .. giving error :
Session verification failed. Please try logging out and back in again, and then try again.
Please Fix it
HELLO????
is anyone supporting this?
Im wondering if this is safe to use on RC2.
can anyone verify this?
Quote from: synicfan on January 29, 2010, 04:07:31 PM
Hi,
I noticed there are some issues with SMF 2.0 RC2.
does anyone know if the bugs have been fixed?
Is it ok to install the latest shoutbox with RC2?
thank you!
is there any way to make the shoutbox visible in the forum index only?
@rebus
Add the block of code that would normally go right around the menu in your index.template.php to the top of the BoardIndex.template.php just above the news section. You may have to play around with the alignment of the shoutbox a little bit, but that will get you very close.
Quote from: SunKing on February 02, 2010, 03:29:29 PM
@rebus
Add the block of code that would normally go right around the menu in your index.template.php to the top of the BoardIndex.template.php just above the news section. You may have to play around with the alignment of the shoutbox a little bit, but that will get you very close.
Great suggestion, SunKing, thanks a lot! :)
Quote from: ameo on November 10, 2009, 10:23:19 AM
In SMF RC2 shoutbox is working well.
Problem is in installation, I believe.
Apparently, when installing code for display of shoutbox doesn't install in index.template.php
So, let's say you wanna install in default theme - Curve. You need to install shoutbox, as usually,
and you need to open index.template. php and in 3.rd box from bottom, just before last bracket,
you need to insert code for display
// 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
.
Then shoutbox will display, and don't forget to change permissions for each membergroup so it could display for them too.
If you need to see it to believe it see it here: The X WEB (http://www.air.vlexo.net/forum/index.php)
Hi
Does it work with SimplePortal 2.3.1 © 2008-2009, SimplePortal?
I try it, and when I Shout at Forum it goes to Home and no Shout apears.
Tnks in advance.
Quote from: SunKing on January 27, 2010, 10:45:21 AM
@Boby_
Let me know if that has indeed solved your problems.
No. It haven't. I still have MySQL connection problems when shoutbox is active and the forum has a lot of visitors.
Hey peeps - going through this and it's all rather confusing!
To answer to people, yes, you can install this mod on a fresh install of 2.0 RC2 but I am sure there needs to be some manual modding after. I've inserted the code manually myself as the package manager just seems to miss something.
The forum in question is threepwud.com (I know I shouldn't link but perhaps this is the best way to show my problem) - it displays thusly. Is there anything I can do to get it to display properly? Would this script from above work or is that for something completely different?
// 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
Alright folks, so I've changed the code for
// 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
and added it in the news section and hey it works so much better. But between the avatar on top there is a huge gap - how do I rid myself of that?
(http://threepwud.com/stuff/pics/screenshot.jpg)
i installed this mod mannualy because i use a custom theme
the problem is if i type a word in the box and click shout i cant see the word i was typing i only can see if i click on the history tab
did i miss something?
please help
cheers
This happened to me, motomaniacs. Depending on the theme you've used, could be this code:
// 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
I placed it where it was manually suggested but I moved it elsewhere and it worked much better (for me, anyways). Could you PM a link so I'm sure it's the same problem? Cheers matey
could you suggest what code should be fixed?
I have read through the thread and found somthing I need, but it doesn't help me.
I have the shoutbox installed, but I can't seem to get the text in it to align to the left, it is currently centered.
I think it is this code i need to change
Quote<td class="catbg"> News</td>
</tr>
<tr>
<td valign="middle" align="center" height="60">
But I don't know where to find it?
Any help or other ways to get the text to align to the left would be appreciated.
i have problem...
img31.imageshack.us/img31/2279/chatxg.png
and I would like to make it look so
img513.imageshack.us/img513/9990/beztytuulgc.png
BoardIndex.template.php
<?php
// Version: 2.0 RC2; BoardIndex
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Show some statistics if stat info is off.
if (!$settings['show_stats_index'])
echo '
<p id="stats">
', $txt['members'], ': ', $context['common_stats']['total_members'], ' &#8226; ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' &#8226; ', $txt['topics'], ': ', $context['common_stats']['total_topics'], '
', ($settings['show_latest_member'] ? '<br />' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
</p>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div class="tborder marginbottom">
<h3 id="newsfader" class="catbg">
<img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
', $txt['news'], '
</h3>
<div class="windowbg2" id="smfNewsFader">
<div id="smfFadeScroller"><span>', $context['news_lines'][0], '</span></div>
</div>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[
// Create a news fader object.
var oNewsFader = new smf_NewsFader({
sSelf: \'oNewsFader\',
sFaderControlId: \'smfFadeScroller\',
aFaderItems: [
"',
implode('",
"', $context['fader_news_lines']), '"],
sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
});
// Create the news fader toggle.
var smfNewsFadeToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
aSwappableContainers: [
\'smfNewsFader\'
],
aSwapImages: [
{
sId: \'newsupshrink\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_news_fader\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'newsupshrink\'
}
});
// ]]></script>';
}
/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
and boards. (see below.) */
foreach ($context['categories'] as $category)
{
// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;
echo '
<div class="categoryframe tborder clearfix">
<h3 class="catbg', $category['new'] ? '2' : '', '">';
if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="floatright" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a href="', $category['collapse_href'], '">', $category['collapse_image'], '</a> ';
echo $category['link'];
echo '
</h3>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
echo '
<table cellspacing="1" class="bordercolor boardsframe">';
/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg icon">
<a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';
// If the board or children is new, show an indicator.
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/on', $board['new'] ? '' : '2', '.gif" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';
echo '
</a>
</td>
<td class="windowbg2 info">
<h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
// Has it outstanding posts for approval?
if ($board['can_approve_posts'] && ($board['unapproved_posts'] || $board['unapproved_topics']))
echo '
<a href="', $scripturl, '?action=moderate;area=postmod;sa=', ($board['unapproved_topics'] > $board['unapproved_posts'] ? 'topics' : 'posts'), ';brd=', $board['id'], ';', $context['session_var'], '=', $context['session_id'], '" title="', sprintf($txt['unapproved_posts'], $board['unapproved_topics'], $board['unapproved_posts']), '" class="moderation_link">(!)</a>';
echo '
</h4>
<p>', $board['description'] , '</p>';
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
// Show some basic information about the number of posts, etc.
echo '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg stats smalltext">
', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</td>
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg2 smalltext lastpost">';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<strong>', $txt['last_post'], '</strong> ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'];
echo '
</td>
</tr>';
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $child['name'] . '</a>';
// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > $child['unapproved_posts'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';
$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
}
echo '
<tr>
<td class="windowbg3 smalltext largepadding"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td>
</tr>';
}
}
echo '
</table>';
}
echo '
</div>';
}
if ($context['user']['is_logged'])
{
echo '
<div id="modbuttons_bottom" class="modbuttons clearfix">
<div id="posticons" class="clearfix marginbottom">
<div class="smalltext floatleft">
<img src="', $settings['images_url'], '/new_some.gif" alt="" align="middle" /> ', $txt['new_posts'], '
<img src="', $settings['images_url'], '/new_none.gif" alt="" align="middle" style="margin-left: 4ex;" /> ', $txt['old_posts'], '
</div>';
// Mark read button.
$mark_read_button = array(
'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']),
);
// Show the mark all as read button?
if ($settings['show_mark_read'] && !empty($context['categories']))
template_button_strip($mark_read_button, 'top');
echo '
</div>
</div>';
}
// top stats collapse object.
echo '
<script language="JavaScript" type="text/javascript"><!-- // -->';
echo chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(84) . chr(65) . chr(91);
echo '
var current_header_tops = ', empty($options['collapse_header_tops']) ? 'false' : 'true', ';
function shrinkHeaderTOPS(mode)
{';
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkTOPS=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_tops", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink_tops").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderTOPS").style.display = mode ? "none" : "";
current_header_tops = mode;
}
// ';
echo chr(93) . chr(93) . chr(62);
echo '
</script>';
//shoutbox
echo'<div class="tborder" style="margin-top: 0;">
<div class="catbg" style="padding: 5px 5px 5px 10px;">
<center>.:: Shoutbox - Tu nie zadajemy pytań, od tego jest forum! ::.</center>
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg">
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'</div>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Pokaż Emotki</a> | <a href="javascript:collapse1.slideup()">Zamknij</a>';
require('mymod/smiley_SMF_2.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
</td>
</tr>
</table>
</div><br />';
//top stats start. by www.gorselsanatlar.org
loadLanguage('Stats');
echo '<br />
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<div class="catbg" style="padding: 6px; vertical-align: middle; text-align: center; ">
<a href="#" onclick="shrinkHeaderTOPS(!current_header_tops); return false;"><img id="upshrink_tops" src="', $settings['images_url'], '/', empty($options['collapse_header_tops']) ? 'collapse.gif' : 'expand.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin-right: 2ex;" align="right" /></a>
', $txt['forum_stats'], '
</div>
<div id="upshrinkHeaderTOPS"', empty($options['collapse_header_tops']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr>
<td class="titlebg" width="10%" colspan="2" align="center">', $txt['new'] ,' ', $txt['members_title'], '</td>
<td class="titlebg" width="24%" colspan="2" align="center">', $txt['top_topics_views'], '</td>
<td class="titlebg" width="66%" colspan="3" align="center">', $txt['recent_posts'], '</td>
</tr>
<tr>
<td class="windowbg2" width="10%" colspan="2" valign="top"><span class="smalltext"><b>', $txt['user'], '</b></span><br />';
foreach ($context['new_members'] as $poster)
{
echo '
<img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="10" height="10" />
<span class="smalltext">',$poster['link'], '</span><br />';
}
echo '
</td>
<td class="windowbg2" width="18%" valign="top"><span class="smalltext"><b>', $txt['board_topics'], '</b></span><br />';
foreach ($context['top_topics_views'] as $topic)
echo '
<img alt="" src="', $settings['images_url'], '/email_sm.gif', '" width="10" />
<span class="smalltext">', $topic['link'], '</span><br />';
echo '</td>
<td class="windowbg2" width="6%" align="right" valign="top"><span class="smalltext"><b>', $txt['views'] ,'</b></span><br />';
foreach ($context['top_topics_views'] as $topic)
echo '
<img alt="" src="', $settings['images_url'], '/icons/field_valid.gif" height="8" />
<span class="smalltext">', $topic['num_views'], '</span><br />';
echo '</td>
<td class="windowbg2" width="22%" rowspan="3" valign="top"><span class="smalltext"><b>', $txt['board_topics'], '</b></span><br />';
if (!empty($context['latest_posts']))
foreach ($context['latest_posts'] as $post)
echo '
<img src="', $settings['images_url'], '/email_sm.gif', '" width="10" alt="" />
<span class="smalltext" font size="2"><a href="',$post['href'],'">', $post['short_subject'], '</a></span><br />';
echo '</td>
<td class="windowbg2" width="14%" rowspan="3" valign="top"><span class="smalltext"><b>', $txt['author'] ,'</b></span><br />';
if (!empty($context['latest_posts']))
foreach ($context['latest_posts'] as $post)
echo '
<img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="10" height="10" />
<span class="smalltext">', $post['poster']['link'], '</span><br />';
echo'
</td>
<td class="windowbg2" width="20%" rowspan="3" valign="top"><span class="smalltext"><b>', $txt['date'] ,'</b></span><br />';
if (!empty($context['latest_posts']))
foreach ($context['latest_posts'] as $post)
echo '
<img alt="" src="', $settings['images_url'], '/icons/calendar.gif', '" width="10" />
<span class="smalltext">', $post['time'], '</span><br />';
echo '</td>
</tr>
<tr>
<td class="titlebg" width="20%" colspan="2" align="center">', $txt['top_posters'], '</td>
<td class="titlebg" width="24%" colspan="2" align="center">', $txt['top_starters'], '</td>
</tr>
<tr>
<td class="windowbg2" width="14%" valign="top"><span class="smalltext"><b>', $txt['user'], '</b></span><br />';
foreach ($context['top_posters'] as $poster)
echo '
<img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="10" height="10" />
<span class="smalltext">', $poster['link'], '</span><br />';
echo '</td>
<td class="windowbg2" valign="top" align="right" width="6%"><span class="smalltext"><b>', $txt['posts'], '</b></span><br />';
foreach ($context['top_posters'] as $poster)
echo '
<img alt="" src="', $settings['images_url'], '/icons/field_valid.gif" height="8" />
<span class="smalltext">', $poster['num_posts'], '</span><br />';
echo '</td>
<td class="windowbg2" valign="top" width="18%"><span class="smalltext"><b>', $txt['user'], '</b></span><br />';
foreach ($context['top_starters'] as $poster)
echo '
<img alt="" src="', $settings['images_url'], '/icons/online.gif', '" width="10" height="10" />
<span class="smalltext">', $poster['link'], '</span><br />';
echo '</td>
<td class="windowbg2" valign="top" align="right" width="6%"><span class="smalltext"><b>', $txt['board_topics'], '</b></span><br />';
foreach ($context['top_starters'] as $poster)
echo '
<img alt="" src="', $settings['images_url'], '/icons/field_valid.gif" height="8" />
<span class="smalltext">', $poster['num_topics'], '</span><br />';
echo '</td>
</tr>
</table>
</div>
</div>';
//top stats finish. by www.gorselsanatlar.org
template_info_center();
}
function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Here's where the "Info Center" starts...
echo '
<div class="tborder clearfix" id="infocenterframe">
<h3 class="catbg">
<img id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '
</h3>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
//Old Recent Posts Bar is removed !
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '</h4>
<div class="windowbg">
<p class="section">
<a href="', $scripturl, '?action=calendar' . '"><img src="', $settings['images_url'], '/icons/calendar.gif', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
</p>
<div class="sectionbody windowbg2 smalltext">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span> ';
/* Each member in calendar_birthdays has:
id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
foreach ($context['calendar_birthdays'] as $member)
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</span> ';
/* Each event in calendar_events should have:
title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
foreach ($context['calendar_events'] as $event)
echo '
', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: #FF0000;">*</a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
// Show a little help text to help them along ;).
if ($context['calendar_can_edit'])
echo '
(<a href="', $scripturl, '?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">', $txt['calendar_how_edit'], '</a>)';
}
echo '
</div>
</div>
</div>';
}
// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['forum_stats'], '</h4>
<div class="windowbg">
<p class="section">
<a href="', $scripturl, '?action=stats"><img src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
</p>
<div class="windowbg2 sectionbody middletext">
', $context['common_stats']['total_posts'], ' ', $txt['posts_made'], ' ', $txt['in'], ' ', $context['common_stats']['total_topics'], ' ', $txt['topics'], ' ', $txt['by'], ' ', $context['common_stats']['total_members'], ' ', $txt['members'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>"' . $context['latest_post']['link'] . '"</strong> ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</div>
</div>
</div>';
}
// "Users online" - in order of activity.
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['online_users'], '</h4>
<div class="windowbg">
<p class="section">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
</p>
<div class="windowbg2 sectionbody">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];
// Handle hidden users and buddies.
$bracketList = array();
if ($context['show_buddies'])
$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];
if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';
echo $context['show_who'] ? '</a>' : '', '
<div class="smalltext">';
// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
{
echo '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);
// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br /><br /><hr>[' . implode('] [', $context['membergroups']) . ']';
}
echo '
</div>
<hr class="hrcolor" />
<div class="smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</div>
</div>
</div>
</div>';
// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['personal_message'], '</h4>
<div class="windowbg">
<p class="section">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
</p>
<div class="windowbg2 sectionbody">
<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
<div class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</div>
</div>
</div>
</div>';
}
// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['login'], ' <a href="', $scripturl, '?action=reminder" class="smalltext">', $txt['forgot_your_password'], '</a></h4>
<div class="windowbg">
<p class="section">
<a href="', $scripturl, '?action=login"><img src="', $settings['images_url'], '/icons/login.gif', '" alt="', $txt['login'], '" /></a>
</p>
<div class="windowbg2 sectionbody">
<form id="infocenter_login" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">
<ul class="reset horizlist clearfix">
<li>
<label for="user">', $txt['username'], ':<br />
<input type="text" name="user" id="user" size="15" class="input_text" /></label>
</li>
<li>
<label for="passwrd">', $txt['password'], ':<br />
<input type="password" name="passwrd" id="passwrd" size="15" class="input_password" /></label>
</li>
<li>
<label for="cookielength">', $txt['mins_logged_in'], ':<br />
<input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" class="input_text" /></label>
</li>
<li>
<label for="cookieneverexp">', $txt['always_logged_in'], ':<br />
<input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="input_check" /></label>
</li>
<li>
<input type="submit" value="', $txt['login'], '" class="button_submit" />
</li>
</ul>
</form>
</div>
</div>
</div>';
}
// Info center collapse object.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oInfoCenterToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderIC\'
],
aSwapImages: [
{
sId: \'upshrink_ic\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_ic\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkIC\'
}
});
// ]]></script>';
echo '
</div>
</div>';
}
?>
My nneonneo's AJAX ShoutBox version for anyone to use.
Custom:
Scroll in chat
Sound works!!!
Address people (doubbleclick on their names in the chat or write [name]: e.g. Akyhne:)
Your own text in different color
Focus on chat input field (quick write - write, press [Enter], write, press [Enter], write, press [Enter])**
Smiley bar (it points to my specific smilieys folder, you need to change that)
Helptext (You need to customize that as well help.english.php)
Member group color
And.. a few more I don't remember
*Don't* ask for support or cutomization. I did most of the changes a year ago, and don't remember what I did. Use a compare tool like Notepad++ to see changes in the files.
** Note this option can be annmoying, as it keeps getting focus on the chat, when scrolling down or being on another tab in the browser.
I have had this mod on our site for quite a while and it has always worked great once I got it installed and configured correctly. Now I have the following problem.
The SB Auto Scroll does not work on two pages only. 'Admin' and 'Media Gallery'.
* However *
Once in the 'Admin' section if I click on any of the sub areas within this it works.
In the 'Media' section it works again only when I select 'My Albums'.
Could someone please help me isolate the php file I need to inspect to see if some code was changed from a Mod Install?
:-\ :'(
Anyone supporting this mod anymore?
I will also add to my previous post that when I click on Admin and am at the password log in screen it works but once I get to the main Admin page it no longer works.
I have tried adding the shoutbox to a Custom Action Page using the method that ameo posted (http://www.simplemachines.org/community/index.php?topic=137508.msg1544760#msg1544760), but I can't get it working:
$boardurl = 'http://www.mysite.com/forums';
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?Aug92007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
</head>
<body>
<br /><b>Shout Box</b><br /><br />
<div id="yshout">Shoutbox loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
When I type something and click the 'Shout!' button, I get this error where the posts ought to be, and it then disappears after a few moments:
QuoteWarning: fopen(chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /home/mysite/public_html/forums/yshout/yshout.php on line 779
File error (writeLine); aborted
Also, if I try to access yshout.php directly, which I thought would display the shoutbox on its own, I simply get a white page saying "Nothing to do."
Can anyone help me please?
First, you may want to check the chmod permissions on the home.txt to make sure it's in fact writable (may want to check the history.home.txt file as well).
Second, try navigating your browser to /yshout/index.php instead of /yshout/yshout.php.
Quote from: SunKing on February 21, 2010, 01:10:12 PMFirst, you may want to check the chmod permissions on the home.txt to make sure it's in fact writable (may want to check the history.home.txt file as well).
chmodding home.txt to 0777 seems to work, thanks. Is it bad that I don't have a history.home.txt file though...?
Quote from: SunKing on February 21, 2010, 01:10:12 PMSecond, try navigating your browser to /yshout/index.php instead of /yshout/yshout.php.
That doesn't work, the file doesn't exist so I get a 404 error. I've also tried /yshout/index.html as that's in the directory, but it's an empty file!
I'd really like to get that resolved, because after seeing the Custom Action Page version working, I'd prefer to contain the shoutbox in an Iframe to prevent the rest of the page adjusting when new posts are added. Any ideas?
You can simply create an empty text file called history.home.txt (make sure the chmod permissions are set correctly ;)), but I think the mod does this automatically once you actually have history in the shoutbox.
It has been a while since I have used this, but I seem to remember in certain situations needing to swap $boarddir with $boardurl, or vice versa, and in other cases, not needing the global at all, but rather using it as a relative link.
Try each of the following variations and see if on works for you:
Default configuration (for reference):
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
Variation 1 (using $boardurl):
global $txt,$context,$boardurl;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boardurl.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
Variation 2 (using a relative path):
global $txt,$context;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once(yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
Hope that helps. ;)
It does seem to work on the Custom Action Page using this code:
// begin yshout
$boardurl = 'http://www.mysite.com/forums';
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?Aug92007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<br /><b>Shout Box</b><br /><br />
<div id="yshout">Shoutbox loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// end yshout
And the history file is being written to now, after I manually created it. Thanks for the suggestion.
But what I want is to display the shoutbox in an iFrame, which I thought I could do by using /yshout/yshout.php as the source, however this just displays the text "Nothing to do." Is it possible?
I know exactly ---> <--- much about iframes. I would think you could just add the yshout call to an html file and then load that html file into an iframe.
so say you'd have the iframe hold a file called myShout.html and the contents of that file would be:
<html><head>
<title>Shoutbox</title>
</head>
<body>
<?
global $boarddir;
include($boarddir.'/yshout/yshout.php');
?>
</body>
</html>
Please do not use that code verbatim as it's just an example. ;)
You may need to make an include to SSI.php too...but that'll head you (hopefully) in the right direction.
After playing around with it a lot, this is how it works the way I had in mind:
echo '<div style="width:100%;height:300px;overflow:auto;overflow-x:hidden">';
$boardurl = 'http://www.mysite.com/forums';
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?Aug92007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<div id="yshout">Shoutbox loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
</div>';
Thanks for your help SunKing, I'm glad to be able to move on now! :)
Glad you have it sorted.
Hi guys.
We have a problem:
(http://img694.imageshack.us/img694/4566/yshout.th.jpg) (http://img694.imageshack.us/i/yshout.jpg/)
I have read past few pages but no one has solution...
Forum 2.0 RC2 fresh new install. Theme orange, but same is on default. Shotbox is first mod installed and for now only one
Two things come to mind straight away for that. One, either the css for the shoutbox is missing, or the link to it is pointing to the wrong location, or 2) where you have added the code that calls the shoutbox needs to be moved (it's been placed inside an area that is causing the odd layout).
To fix, check that the css is indeed where it should be and linked to correctly, and/or adjust the position of the include block to a new location. This last part may take a few tries on a custom theme to get it just right.
It isn't available for SMF 2.0 RC2 ?
I have placed code exactly as mentioned in Installation Instructions for 2.0 RC2, I checked out, all files, all code is on place where it should be. I've attached index.template.php
Quote from: SunKing on February 28, 2010, 11:25:30 AM
Two things come to mind straight away for that. One, either the css for the shoutbox is missing, or the link to it is pointing to the wrong location, or 2) where you have added the code that calls the shoutbox needs to be moved (it's been placed inside an area that is causing the odd layout).
To fix, check that the css is indeed where it should be and linked to correctly, and/or adjust the position of the include block to a new location. This last part may take a few tries on a custom theme to get it just right.
Help me on this one, where do I look for css from yshout? I can't find him
The file you attached has no code for the shoutbox whatsoever. The css for the shoutbox will be located in one of two places. It will either have its own css file at /yourtheme/css/yshout.css (would be installed into the default theme's folder initially), or the css will be added to the <head></head> section of your theme's index.template.php (again, added to the default theme initially).
I apologize if this has been answered before. This thread is fairly long and I am not sure what exactly to search for (though I did try google).
I have 1.22 SB installed. It worked the first day I installed it, but now I can't send "shouts" even as an Administrator. My name (Exodus) is greyed out, I can type things into the box, but hitting enter/shout doesn't send anything.
The shoutbox should be open to guests. Again, it worked on the first day, but I am not sure what's up now or how to fix it. There is no history because in an attempt to fix this I uninstalled the mod and attempted to reinstall it, but that did not solve the problem.
exodusdb.com/smf/index.php
Welcome to SMF!
It seems to be something with the shoutbox when called from the index.template.php. If I access the shoutbox via /yshout/index.php, I am able to shout just fine. This tells me that the mod itself is installed fine and chmod permissions seem to be OK. Have you installed any other mods since it was working, such as Pretty URLs or maybe something utilizing some javascript (it may be an onload conflict)?
Quote from: SunKing on March 01, 2010, 07:23:48 AM
The file you attached has no code for the shoutbox whatsoever. The css for the shoutbox will be located in one of two places. It will either have its own css file at /yourtheme/css/yshout.css (would be installed into the default theme's folder initially), or the css will be added to the <head></head> section of your theme's index.template.php (again, added to the default theme initially).
Sorry my bad, wrong template, I attached now the right one. I found that css is in first block of code that start with #yshout. But I can't figure out whats wrong. As I said forum is latest 2.0 RC2 and only 3 mod installed so far(Ad mod, & arcade)
Quote from: SunKing on March 02, 2010, 02:29:07 AM
Welcome to SMF!
It seems to be something with the shoutbox when called from the index.template.php. If I access the shoutbox via /yshout/index.php, I am able to shout just fine. This tells me that the mod itself is installed fine and chmod permissions seem to be OK. Have you installed any other mods since it was working, such as Pretty URLs or maybe something utilizing some javascript (it may be an onload conflict)?
Hmm, I see it works directly. I installed SMF Arcade and SMF Gallery mods afterwords. The only thing I remember doing, I went to change the permissions to allow guests and such to use the shoutbox, thats around when it seem to stop working. I thought maybe I set the permissions wrong, but I am an Administrator so...
If it helps here is the index.template.php
@Zwerko
The css for it is indeed at the top of the index.template.php, but I believe the problem with your layout was caused simply by the position of the shoutbox. I moved it so that it now extends the width of the header and attached the file below.
Enjoy.
@Torch068
I think you problem may lie in the way the URLs are being treated. When viewing the sourcecode for the yshout/yshout.php, the paths to the shoutbox files are relative (../yshout/yshout.php), but when viewing the sourcecode for your main site, the paths are full paths (www.yoursite.com/smf/yshout/index.php). The relative paths work, as you can see, but the full paths do not want to cooperate. I have attached your index.template.php with the yshout paths edited to be relative. Make a backup of the existing index.template.php and then upload this attached one so that it overwrites what is there.
Quote from: SunKing on March 02, 2010, 02:50:00 PM
@Zwerko
The css for it is indeed at the top of the index.template.php, but I believe the problem with your layout was caused simply by the position of the shoutbox. I moved it so that it now extends the width of the header and attached the file below.
Enjoy.
Yessss that's do the trick :) Now box is moved to the right and I reduced lines to 5 so everything looks match nicer. Thanks a lot SunKing :)
Glad I could help.
Using the template file you submitted does not work. But I think we're on the right path with the suggestion. Because it definitely works if you go directly to www.exodusdb.com/smf/yshout/index.php
I've just noticed the mod's throwing JavaScript errors. (I mainly use Firefox which doesn't flag them like IE does.)
Quote'Class' is undefined
moo.ajax.js
Code: 0
Line: 4
Char: 1
URI: http://www.mysite.com/forums/yshout/js/moo.ajax.js
'board_url' is undefined
yshout.js
Code: 0
Line: 16
Char: 1
URI: http://www.mysite.com/forums/yshout/js/yshout.js?July062008
How can I fix this?
Sorry to bump this myself, but it's actually holding up an entire relaunch for my site. Is there any more information I can provide that would help someone identify a solution for these JavaScript errors?
In addition to the two above, I also get this one when browsing the forum on any page that doesn't contain the shoutbox itself (as detailed on the previous page of this topic, I only display the shoutbox on a Custom Action Page).
QuoteMessage: Object expected
Line: 78
Char: 2
Code: 0
URI: http://www.mysite.com/forums/yshout/js/yshout.js?July062008
It seems it's all quite a mess...
Here's what's in the <head> section of my index.template.php:
// 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 {
color: #666666;
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
And here's what's on my Custom Action Page:
// begin yshout
echo '<div style="margin:0;width:100%;height:200px;overflow:auto;overflow-x:hidden;line-height: 150%; font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 11px;">';
$boardurl = 'http://www.mysite.com/forums';
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?Aug92007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<div id="yshout">Shoutbox loading...<br /><br />If it doesn\'t load, consider updating your browser.<br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
</div>';
// end yshout
The shoutbox displays and works perfectly well, so these errors don't seem to be harming the functionality. But it doesn't look good when visitors have that yellow exclamation mark in the bottom-left corner of their Internet Explorer signifying JavaScript errors. Is there some way I can at least suppress these errors, that are doing no harm beyond merely existing?
Any help appreciated, thanks.
How to remove the chat from the top and bring up the end of the page?
?????????????
Quote from: tonnybarros on March 07, 2010, 09:11:37 PM
How to remove the chat from the top and bring up the end of the page?
Hmmmm. Maybe a slight bit more detail is in order here. Maybe it's just me and it is late here. But that request has sort of a broad scope of what you could mean.
Straight up (re)install on 2.0RC3?
aka, is it working with the latest release?
Quote from: nneonneo on November 26, 2008, 06:28:53 PM
To open links in the same window, use
"[iurl=http://" instead of "[url=http://".
what is this mean?
Quote from: nneonneo on August 19, 2007, 03:39:56 PM
Adding sound:
Get SoundManager2 (http://www.schillmania.com/projects/soundmanager2/)
Place soundmanager2.js in yshout/js
Place soundmanager2.swf in yshout/
Place the desired sound in yshout/ and change the URL below to match (MUST BE MP3!)
Place the following code after
<script src="',$boardurl,'/yshout/js/yshout.js?July062008" type="text/javascript"></script>
in index.template.php:
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">soundManager.url="',$boardurl,'/yshout/";
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function() {
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/sound.mp3", autoPlay:false});
}</script>
(if it does not work, you may have an older soundmanager2, try adding "soundmanager2.swf" after soundManager.url="',$boardurl,'/yshout/)
In yshout/js/yshout.js, after
function shoutDone() {
add
$('shouts').innerHTML = this.transport.responseText;
oldShouts = $('shouts').innerHTML;
(that step is optional, but it stops the sound when you shout, and only sounds when others shout)
Replace
var request;
// This gets called each refresh; it reloads the shoutboxes content.
by
function ltrim(text) {
return text.replace(/^\s*/g,'');
}
var request;
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML))
soundManager.play('sound');
oldShouts = $("shouts").innerHTML;
EDIT: Update for newer Soundmanager version (dated Mar 31 2008)
EDIT2: Complete instructions.
EDIT3: Update for new shoutbox versions (1.20+)
The sound only play when refresh the whole webpage.. not when enter new post in shoutbox..
Quote from: weekend camper on March 09, 2010, 11:53:53 PM
Straight up (re)install on 2.0RC3?
aka, is it working with the latest release?
So that is a 'no' on it working straight up with the latest RC3 release .... at least on my site.
I'll see if I can dig into why.
Following this thread, as I'd like to be able to use the mod on RC3 as well.
Can we add bot auto responder?
Installed on my test server with RC3 and it was borked in a big way.
Apparently the installer will need a fairly/somewhat major rewrite, especially regarding language files and permissions. I'll see where a manual install gets me in a few days.
@edit: I see that there is already "2.0RC3" manual install instructions on the main mod download page (you have to click the drop down menu to see the options). I'll have to try that out.
I did the manual install and it kicked the shout entry field to the right of the posted shouts.
changed the header css in index.template.php (in part) to:
#yshout #shout-form {
float: left;
margin: 0px;
padding: 0px;
}
and that seemed to work, at least on FF in Ubuntu.
Quote from: Akyhne on July 28, 2009, 11:31:08 AM
Quote from: wrbex on January 20, 2009, 05:51:48 PM
Quote from: kabu on December 18, 2008, 04:12:02 PM
Hi I used the search in this topic but I couldn't find the answer.
My problem is I have auto embeded video clips mod installed and whenever someone types a link of say a youtube video the video is embeded onto the shoutbox. When you click the play button the video plays for a while and then stop playing. I'm guessing because the shoutbox is auto refreshed?
Is there anyway to stop the auto embed without removing the auto embed mod?
I have same problem..i have instaled AEVA mod...
Any "fix" for this?
If this hasn't been answered:
find:
$text = parse_bbc($text);
replace with:
$context['aeva_disable'] = 1;
$text = parse_bbc($text);
$context['aeva_disable'] = 0;
This disables Aeva in the Shoutbox.
Tried this, didn't work.
After finding out the mod was called AEVC I changed that and also changed "text" to "newtext"
So my replacement looked like:
$context['aevc_disable'] = 1;
$newtext = parse_bbc($newtext);
$context['aevc_disable'] = 0;
I changed this in yshout.php and indeed the autoembed function for video was disabled in the shoutbox but at the same time smileys stopped showing up in the shoutbox.
I noticed you didn't mention a file to make this changes, so did I made the corrections in the wrong file???
What can I do to make sure the shoutbox won't show movies but DOES show smileys?
Thanks!
Installed nneonneo shoutbox, when i try to delete shout .. giving error :
Session verification failed. Please try logging out and back in again, and then try again.
Any idea's anyone?
which package do i download for smf rc1.2?
how do i input this into portamx?
Thanks.
This is kind of off topic but how did this topic get 5,901 replies and 1241203 views???!
I am using SB_1.22 on SMF 2.0 RC3 & it shows up on every page... Is there a way to have it ONLY on the index page?
Thank you for your time & efforts.
Funnily enough, I just installed SB_1.22 on SMF 2.0 RC3, and for me the SHoutbox doesn't show at all! It shows up in my permissions, so it must have installed, but it's no where to be seen on the forum.
Quote from: MothMan on April 20, 2010, 11:45:05 PM
Funnily enough, I just installed SB_1.22 on SMF 2.0 RC3, and for me the SHoutbox doesn't show at all! It shows up in my permissions, so it must have installed, but it's no where to be seen on the forum.
MothMan - I too had that problem.. Go back to the download area, and about half way down are the codes that need to be copy & pasted
http://custom.simplemachines.org/mods/index.php?mod=585
What needs to be done is you must manually enter the codes into the Index template.. Now, The first section of code was easy. The second code section was all trial & error.. It took me about an hour of fiddling with it to get the shout box where I wanted it. (Remember to only use one of the codes. Either instant on, or delayed)
@Scarecrow7170: glad that you got it figured out.
Scarecrow, thanks for the tip!
I think, though, that I'll hold off.
My previous SMF install ended up chock full of manually entered code, and when we started to run into problems, it was impossible to clean everything out. So this time around I'm hoping to only use complete package installs, so I can easily uninstall if necessary.
Hrmm, well, I rethought my reluctance to manually code in the required bits (as it's only two small, easily located, bits of code), and got the shoutbox working on 2.0 RC3.
But, question is, could someone direct me on where to put the shoutbox placement segment of the code, in order to have the shoutbox show up in the collapsable header area of the forum (up where the user avatar, search box, etc it)
I was able to get it in there, but when I did that, the shout didn't work quite right, as each new shout appeared to the right of the previous one, rather than below it.
Even better (maybe) might be if the shotubox could be made to be collapsable itself... then I could leave it where it currently is (just below the main menu), but be collapsable so it doesn't take up much room if users don't want it.
Quote from: MothMan on April 23, 2010, 12:37:34 AM
Hrmm, well, I rethought my reluctance to manually code in the required bits (as it's only two small, easily located, bits of code), and got the shoutbox working on 2.0 RC3.
But, question is, could someone direct me on where to put the shoutbox placement segment of the code, in order to have the shoutbox show up in the collapsable header area of the forum (up where the user avatar, search box, etc it)
I was able to get it in there, but when I did that, the shout didn't work quite right, as each new shout appeared to the right of the previous one, rather than below it.
Even better (maybe) might be if the shotubox could be made to be collapsable itself... then I could leave it where it currently is (just below the main menu), but be collapsable so it doesn't take up much room if users don't want it.
The placement depends on the theme really.. that is why it is trial & error. As for me I put it just below the main buttons.. unfortunately it separates the other buttons (Admin tools ect are below the chat).
In my theme I put it just above this line
Quote// The main content should go here.
So it looks like this -
Quote// 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
// The main content should go here.
echo '
<div id="content_section"><div class="frame">
<div id="main_content_section">';
}
However I actually don't like it there... But works for now.
I'm using the Default theme, and currently, I've got the placement code just before:
// show the main menu here, according to the menu subtemplate
Which places the shoutbox just above the main menu (Home, Help, Admin, etc).
THe placement is fine for me, but I'm looking for a way to make the shoutbox collapsable, as it takes up a lot of vertical space, and would be great if people can minimize it when they aren't using it.
Oh, I found the required code here:
http://www.simplemachines.org/community/index.php?topic=137508.msg1630197#msg1630197
Just had to change upshrink.gif and upshrink2.gif both to .png and it's working as intended.
edit: I'd posted the wrong URL, fixed now.
I installed your shoutbox on my forum..is there any way to not have shout box come up on every page, like only on index page?
We (Simply4Friends & I) are using SB_1.22 on SMF 2.0 RC3 & it shows up on every page... Is there a way to have it ONLY on the index page?
Thank you for your time & efforts.
PS - We got it figured out.. Thanks anyway
Is anybody using this mod with the AF316 theme?
I have sat here for hours trying to get it to work even with the places people have suggested for other themes but no luck whatsoever!
Any help would be really appriciated as I do not want to change themes.
Running into a few errors.. wondering if I may get some help.. lol
We are running 2.0 RC3 and using SB_1.22
here are the errors we are having when entering the smiley coding -
QuoteWebpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Timestamp: Sat, 1 May 2010 07:22:44 UTC
Message: 'this.opt.oSmileyLocations[...][...][...].sSrc' is null or not an object
Line: 1418
Char: 4
Code: 0
URI: xxxxxourdomain.com/Themes/default/scripts/editor.js?rc3
Message: Object required
Line: 14
Char: 2
Code: 0
URI: xxxxxourdomain.com/yshout/js/yshout.js?July062008
Also causes all BBC info on posting to disappear. :'( :'(
Please help.. ty
We are useing SMF 2.0 RC3 & Have decided to use the coding minus the smiley coding.. however still getting errors. I have removed the package.. no dice.
however when I remove the following code we get no errors:
Quote// 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[
if (window.addEventListener){
window.addEventListener("load", function(){loadChat();}, false);
} else if (window.attachEvent){
window.attachEvent("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
This is an example error.. but happens on every page. And always on line 15
(http://i577.photobucket.com/albums/ss213/Targa5150/error.jpg)
http://www.site.com/forums/index.php?shout_text=test#
This cames up when i try to shout.. Is there anything ive missed in the Source?
nvm, i fixed it
I am so confused. I am trying to provide a shoutbox for any registered member of the forum. The site (when I got it) has a shoutbox show up when the admin is signed in. It doe not show up when any other regular user is signed in. What the owner wants is for all registered members to be able to use the shout box.
Please help!
I have read and re-read practically this entire thread (hours of reading and am no farther than when I started). I am guessing the shoutbox code is already somewhere in the index.template.php for the theme and I need to add something somewhere but I am stuck. I do not see it and don't know what to look for. I have also tried the admin area but cannot seem to figure that out either. Feeling really dumb right now.
We are using the Overview light theme.
Quote from: WildAmbitions on May 20, 2010, 05:22:49 PM
I am so confused. I am trying to provide a shoutbox for any registered member of the forum. The site (when I got it) has a shoutbox show up when the admin is signed in. It doe not show up when any other regular user is signed in. What the owner wants is for all registered members to be able to use the shout box.
Please help!
I have read and re-read practically this entire thread (hours of reading and am no farther than when I started). I am guessing the shoutbox code is already somewhere in the index.template.php for the theme and I need to add something somewhere but I am stuck. I do not see it and don't know what to look for. I have also tried the admin area but cannot seem to figure that out either. Feeling really dumb right now.
We are using the Overview light theme.
Are you sure you have set permissions for each member group?
Navigate to here in your forumAdmin/Permissions/[select membergroup]/Modify
Then look for the settings to allow that member group shout priviledges.
What version of this is compatible with smf 1.1.11?
Quote from: uninvited13th on June 18, 2010, 05:19:56 AM
What version of this is compatible with smf 1.1.11?
Take a look at the page where you downloaded this from and it will tell you what versions it's compatible with. Also be sure to COMPLETELY uninstall AJAX Chat Integration and any other chat/shout Mods you might have installed.
Quote from: mrtrc266 on June 19, 2010, 01:33:44 AM
Quote from: uninvited13th on June 18, 2010, 05:19:56 AM
What version of this is compatible with smf 1.1.11?
Take a look at the page where you downloaded this from and it will tell you what versions it's compatible with. Also be sure to COMPLETELY uninstall AJAX Chat Integration and any other chat/shout Mods you might have installed.
I dont know if its really compatible with smf 1.1.11
Someone who installed it in 1.1.11??
Hello there! I'd really like to put this on my SMF2RC3 board, but there are parts in the index.template file that it disagrees with, mainly the table stuff I think.
Any chance of an tiny tiny update for RC3? Pretty please? ;)
^ +1
bump
seriously, why not?
Whilst I appreciate the enthusiasm W4, I don't think bumping is looked upon as the thing to do here. ;) Perhaps the author is away or something. :(
I have smf 2.0 rc3 with nneonneo's AJAX ShoutBox ver 1.22
i have added the smiley's bar via this link in the original post see http://www.simplemachines.org/community/index.php?topic=137508.msg1388091#msg1388091 (thank you pongsak!)
the smilies work fine in the shoutbox, however when i reply to a topic and try to click a smiley to put in a thread, it posts instead to the shoutbox. is this a common problem or something that somebody can help me with?
when i go to http://www.mydomain/yshout/yshout.php it says nothing to do and i don't get errors in my shoutbox.
thanks
Quote from: chinaren on June 26, 2010, 04:09:28 AM
Hello there! I'd really like to put this on my SMF2RC3 board, but there are parts in the index.template file that it disagrees with, mainly the table stuff I think.
Any chance of an tiny tiny update for RC3? Pretty please? ;)
Quote from: w4rheart on June 28, 2010, 06:45:14 AM
^ +1
i have it working fine with smf 2.0 rc3. have a smiley problem with my board but more of a nuisance than a problem. i could always take away the smiley's for the sb if i needed to per my above post.
did you even try to install it?
Quotedid you even try to install it?
??? Yes. Did you see my explanation of the errors?
Did you install the shoutbox when your board was RC3? If so, how did you adjust the table entries? That's all that's giving me problems, as RC3 doesn't use tables.
MMmmm. Maybe if I try it in compatibility mode as RC2. ~ponders~
I've got this mod installed on 2.0RC3, and it had been working perfectly... but for some reason over the last couple weeks it's been acting up, where at random times, all of the existing shouts being displayed disappear.
If you post a shout, or refresh the page, all the old shouts come back. They just randomly disappear.
Any suggestions?
Sigh... I'm another victim of the parse error:
2. Execute Modification themes/install-2.0b4.xml Modification parse error
3. Execute Modification themes/install-2.0b4.xml Modification parse error
4. Execute Modification languages/english_all.xml Modification parse error
5. Execute Modification languages/english_all.xml Modification parse error
6. Execute Modification permissions/install-perms-2.0.xml Modification parse error
7. Execute Modification permissions/install-perms-2.0.xml Modification parse error
I've seen a few questions here, but no definite answer. Is there one?
Auto scroll not working.
How do you add a BBC bar.
Shoutbox tends to time out when you goto a new tab or exit webbrowser to look at something else even if its just for 1 min
How do you add a link on the SHOUTBOX history to navigate back to the forums?
Also there is not a small bug on the forums when using Internet Explorer.. I can no longer highlight any text on the forums.
Its not letting me click and drag accross.. I have no idea what could be causing this.
Need help to fix this issue
Thanks. i ve tried to install nneonneo's Shoutbox. I did half of the manual installation . That is because i dont know how to do the other half. Well when it says
"..., find the desired location of the shoutbox and place at that location (in the index.template.php file!)"
i dont know what to do. I want the shoutbox to be at the header of the forum, above the boards, how can i do that . After what code should i paste my given code ?
And in SMF 2.0 RC3 this shoutbox works?
where's admin settings i can see it in modification Features and Options ??????
No help for this whatsoever? :(
Quote from: Gryzor on July 17, 2010, 03:19:31 AM
Sigh... I'm another victim of the parse error:
2. Execute Modification themes/install-2.0b4.xml Modification parse error
3. Execute Modification themes/install-2.0b4.xml Modification parse error
4. Execute Modification languages/english_all.xml Modification parse error
5. Execute Modification languages/english_all.xml Modification parse error
6. Execute Modification permissions/install-perms-2.0.xml Modification parse error
7. Execute Modification permissions/install-perms-2.0.xml Modification parse error
I've seen a few questions here, but no definite answer. Is there one?
Quote from: TheKillers on July 20, 2010, 04:17:34 AM
And in SMF 2.0 RC3 this shoutbox works?
For me it works. But i have a problem with it. The PM popup doesn't open because of this line of yshout :-\
window.onload=function(){
loadChat();
};
When i delete this code, PM popup works. Do someone have a solution for this please? :'(
Hi and thank you very much for this great mod :)
Unfortunately I have a problem. I've got SMF 1.1.11 and TinyPortal. I've installed the latest version and the shoutbox appears with no problem at all, with all the options and the text field to shout.
Problem is... I can't shout. If I try to write something and then click on Shout... nothing happens! It's not a permission problem because I'm using my Admin account.
The very odd thing is that if I try to access the shoutbox using /yshout/index.php link it works, I can see the shoutbox and I can write in it. What I write in the /yshout/index.php separate page shows up in the regular Shoutbox too.
What can be the problem? Shouldn't be a ftp permission since I can shout in the separate page. Can you help me? Thank you ^^
Everything works great, just it doesn't collapse messages, what can be wrong?
Hello community,
my English is not so good, because I'm a german ;D.
I downloaded version 1.22 and the nneonneo Shoutbox installed by a package manager in my SMF 2.0RC3.
I also changed the Index.template already, but I do not see the shoutbox, but only the title Shout Box.
Can not see the shoutbox itself also.
What am I doing wrong?
What I have to change?
I have been running the Shoutbox to the already once on another forum, but I do not remember how I had done it (almost a year since white).
I thank you in advance for the help.
Greeting
it looks like this shoutbox is not so much compatible with current version of smf 2.0.RC3 and that author has, probably because he's busy,
discontinued support for it, and discontinued debugging it for current version of SMF.
The version attached to this post is for use with a portal
nneonneo shoutbox for -SMF 2.0 rc3 with a portal installed- is attached.
This is the regular version with smileys.
block codes are shown during install. (you can not use the old initialize code)
The following index.template style edit must be performed to all your theme's like files... (installation already places this edit for your default theme)
Navigate to: Themes -> YOUR_THEME -> index.template.php
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" />';
Add this after the above code:
/* YSHOUT START */
/* Set $action_b to the url (whole or in part) to flag when you want the specific style to take effect */
$action_a = $_SERVER["REQUEST_URI"];
$action_b = "action=CHOOSE_BOARD_OR_URL";
global $boardurl,$shoutFile;
/* Yshout START <head> code for specified action */
if ((strstr($action_a,$action_b)))
{
$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: 13px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
overflow: visible;
width: 100%;
height: 300px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-size: 0pt;
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 {
color: #cccccc;
width: 90px;
margin-right: 2px;
}
#yshout #shout-text {
width: 130px;
margin-right: 2px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
}
/* YSHOUT END - <head> code for specific action */
/* YSHOUT START - <head> code for regular style setup */
else
{
$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[
if (window.addEventListener){
window.addEventListener("load", function(){loadChat();}, false);
} else if (window.attachEvent){
window.attachEvent("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: 11px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
font-size: 13px;
overflow: visible;
width: 100%;
height: 100%;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-size: 6pt;
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: 90px;
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 for regular style setup */
/* YSHOUT END */
That code can be edited so the first set of style attributes pertain to certain boards (side blocks perhaps).
The default setup is for top/bottom blocks.
Every so ofter I come across this this error message ... it may happen maybe once a month and it does not show up in the error log on smf 2.0 rc3. Any ides of why this happens just once a month? If it is a server ordeal, what should i tell them?
the Error code that shows up on shout is posted below ... Thanks, MC
HTTP/1.1 200 OK Date: Sat, 25 Sep 2010 19:51:15 GMT Server: Apache Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
OK
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.
Having some issues when trying to install this with TinyPortal.
So, from a fresh install of 2.0 R3, I install several themes and then install Tiny Portal. After that I install the package from -Underdog- (thanks :)) I did try to hand install as well. Both display the following error:
QuoteNotice: Undefined index: show_download in /home/jhaegele/novahomebrew.com/Sources/TPSubs.php on line 201
The web site is novahomebrew.com
Any help is greatly appreciated. I will be continuing to see if I can find the issue.
-Jay
Quote from: JayH on October 06, 2010, 08:03:15 PM
Having some issues when trying to install this with TinyPortal.
So, from a fresh install of 2.0 R3, I install several themes and then install Tiny Portal. After that I install the package from -Underdog- (thanks :)) I did try to hand install as well. Both display the following error:
QuoteNotice: Undefined index: show_download in /home/jhaegele/novahomebrew.com/Sources/TPSubs.php on line 201
The web site is novahomebrew.com
Any help is greatly appreciated. I will be continuing to see if I can find the issue.
-Jay
That's your Tiny Portal checking a variable that is undefined. ::)
Navigate to: Sources / TPSubs.php
Find:
function tp_getbuttons()
{
global $scripturl, $txt, $context;
loadlanguage('TPortal');
$buts = array();
Add
after above code:
if (empty($context['TPortal']['show_download'])) {$context['TPortal']['show_download'] = 0;}
hope somebody can make auto chat operator thats can shout random with several text.
Hi nneonneo; I make a roll dice command (like /roll in wolrd of warcarft)
(http://imgur.com/ABhcpl.jpg) (http://imgur.com/ABhcp.png)
In yshout.php
Put after:
case "/wh":
$newText = cleanupShout($args.' ');
$shoutName=$user['name'];
makeRawShout('<span style="color: gray">'." [$shoutName whispers] $newText</span>",$user);
return true
this:
case "/roll":
if ($args!='') $newText = 'rolls '.diceRoll($args);
else $newText = 'rolls '.diceRoll(100);
$shoutName=$user['name'];
makeRawShout('<span style="color: yellow">'."* $shoutName $newText</span>",$user);
return true;
and put at the end of the script before
?>
this:
function diceRoll($count=100) {
if (preg_match('/^\d+$/', $count)) {
if ($count<=500){
$roll = mt_rand(0, $count);
}
else {
$count = 100;
$roll = mt_rand(0, $count);
}
}
else {
$count = 100;
$roll = mt_rand(0, $count);
}
return $roll.' (0 - '.$count.')';
}
I just post this if someone is interested.
Cya.
Hi,
I have Rc4 and TinyPortal 1.0 RC1 on my forum and I installed AdvSB_1.22.zip manualy and it works well on the default theme.
However I have the folow issue with the Theme Design-Blue by Fussilet:
Notice: Undefined variable: newtheme in /home/.../public_html/Sources/Load.php on line 1363
Notice: Undefined variable: newtheme in /home/.../public_html/Sources/Load.php on line 1363
Fatal error: Call to undefined function tpcheckadminareas() in /home/.../public_html/Sources/Subs.php on line 4078
(http://img843.imageshack.us/img843/6907/shoutboxnr.png)
Thanks for your atention and suport.
Hi again.
I play it around and fixed the issue on Load.php
Where was:
// TinyPortal $newtheme=TP_loadTheme();
if($newtheme!=$id_theme && $newtheme>0)
$id_theme=$newtheme;
// end TinyPortal
I replaced with:
// TinyPortal $newtheme=TP_loadTheme();
if (!empty($newtheme))
$newtheme = (int) $newtheme;
// end TinyPortal
But I still have the Subs.php issue... if anyone else whants to play it around... be my guest. I will appreciate
all suport.
Regards
unofficial to 2.0 rc 4 and 1.1.12 with some change to smf.pl and friedns
it's look that :
(http://www.divshare.com/img/13348017-366.png)
included:
scrollbar, sound and some more
Quote from: cieplutki on November 28, 2010, 07:53:35 AM
unofficial to 2.0 rc 4 and 1.1.12 with some change to smf.pl and friedns
it's look that :
(http://www.divshare.com/img/13348017-366.png)
included:
scrollbar, sound and some more
uploaded and installed on rc4 and it doesnt show is there a check box or menu option somewhere ???
@turtleautos if you use smf 1.1.* chek default theme ;) or if use 2.0 only admins -> Permissions
Shoutbox
View shoutbox
Post in shoutbox
Moderate shoutbox
Can someone who has got the shout box collapse shrink/unshrink to work with RC4 please attach a copy of the default theme index.template.php so I can have a reference. I have tried just about everything I can and still can't get that to work with RC4.
Quote from: cieplutki on November 28, 2010, 03:46:50 PM
@turtleautos if you use smf 1.1.* chek default theme ;) or if use 2.0 only admins -> Permissions
Shoutbox
View shoutbox
Post in shoutbox
Moderate shoutbox
all i get when installed is the title shout box with the option of smileys etc but no atual box and no where to shout ????
hey guys plz help its too urgent i installed nneonneo's Shoutbox
only me the admin can see it. others are not able to see it help me what and where to do. plz help me
:'( :'( :'( :-[ :-[ :-[ :-[.
help yaar im waiting . plz someone pm me
Quote from: aniket786 on December 15, 2010, 11:38:46 AM
help yaar im waiting . plz someone pm me
look at permissions groups in administrator panel.
hey dude what and where to permission set. only administrator can see it. plz tell where to change
Try:
(http://www.divshare.com/img/13529077-6fa.png)
Hi guys ;)
Just a small question ...
Haven't you had a problem with high server load / overload?
Is it possible to load it from some cache?
THX
Quote from: cieplutki on December 16, 2010, 11:13:43 AM
Try:
(http://www.divshare.com/img/13529077-6fa.png)
i have the same problem with turtle, its just a bar with smiley options and some language i dont understand. no chatting is seen anywhere
To change
.:: Shoutbox - Tu nie zadajemy pytañ, od tego jest forum! ::.
and
Poka¿ Emotki | Zamknij
BoardIndex.template.php near line 232 and 237
<center>.:: Shoutbox - Tu nie zadajemy pytań, od tego jest forum! ::.</center>
and
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Pokaż Emotki</a> | <a href="javascript:collapse1.slideup()">Zamknij</a>';
Quoteecho'<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<div class="tborder" style="margin-top: 0;">
<div class="catbg" style="padding: 5px 5px 5px 10px;">
<center>.:: Shoutbox - Tu nie zadajemy pytań, od tego jest forum! ::.</center>
</div>
<tr>
<td class="windowbg">
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'</div>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Pokaż Emotki</a> | <a href="javascript:collapse1.slideup()">Zamknij</a>';
all it's polish lang
Pokaż Emotki = Open Emoticon
Zamknij = Close
demo (http://www.zion-dc.ovh.org/index.php)
Change:
.:: Shoutbox - Tu nie zadajemy pytań, od tego jest forum! ::. to .:: Shoutbox ::.
Pokaż Emotki to Open
Zamknij to Close
new sb on attach
will this new zip be working(different) already? the previous one just didnt have a bar to type chat in, but it installed flawlessly on rc4 curv
Working on smf 2.0 RC4 living demo (http://www.zion-dc.ovh.org/index.php)
Quote from: cieplutki on December 18, 2010, 03:41:11 PM
Working on smf 2.0 RC4 living demo (http://www.zion-dc.ovh.org/index.php)
its all in english now but still no chatbar
the instructions you gave, do i replace something or add before or after? there's some code here similar but i have no idea what to do with your instructions
Quote from: -Underdog- on September 18, 2010, 01:44:52 PM
The version attached to this post is for use with a portal
nneonneo shoutbox for -SMF 2.0 rc3 with a portal installed- is attached.
This is the regular version with smileys.
block codes are shown during install. (you can not use the old initialize code)
The following index.template style edit must be performed to all your theme's like files... (installation already places this edit for your default theme)
Navigate to: Themes -> YOUR_THEME -> index.template.php
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" />';
Add this after the above code:
/* YSHOUT START */
/* Set $action_b to the url (whole or in part) to flag when you want the specific style to take effect */
$action_a = $_SERVER["REQUEST_URI"];
$action_b = "action=CHOOSE_BOARD_OR_URL";
global $boardurl,$shoutFile;
/* Yshout START <head> code for specified action */
if ((strstr($action_a,$action_b)))
{
$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: 13px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
overflow: visible;
width: 100%;
height: 300px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-size: 0pt;
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 {
color: #cccccc;
width: 90px;
margin-right: 2px;
}
#yshout #shout-text {
width: 130px;
margin-right: 2px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
}
/* YSHOUT END - <head> code for specific action */
/* YSHOUT START - <head> code for regular style setup */
else
{
$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[
if (window.addEventListener){
window.addEventListener("load", function(){loadChat();}, false);
} else if (window.attachEvent){
window.attachEvent("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: 11px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
font-size: 13px;
overflow: visible;
width: 100%;
height: 100%;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
}
#yshout .shout-timestamp {
font-size: 6pt;
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: 90px;
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 for regular style setup */
/* YSHOUT END */
That code can be edited so the first set of style attributes pertain to certain boards (side blocks perhaps).
The default setup is for top/bottom blocks.
so i install this after installing the neoneo shoutbox?
im using ezportal what do i put in the php block?
im almost there!!! shoutbox has bar and commands and i can type already and see results! :)but this error loads each time i refresh page...
Notice: Undefined index: modsettings_title in /home/myname/public_html/Sources/Subs.php on line 4162
Notice: Undefined variable: chatButton in /home/myname/public_html/Sources/Subs.php on line 4386
Notice: Undefined variable: chatLink in /home/myname/public_html/Sources/Subs.php on line 4387
QuoteFatal error: Call to undefined function preparsecode() in /home/geeksoup/public_html/yshout/yshout.php on line 611
I get the above error when posting, anyone got any ideas? Thanks.
Quote from: ggman on December 19, 2010, 02:24:06 AM
so i install this after installing the neoneo shoutbox?
im using ezportal what do i put in the php block?
that code is an insert for all your themes index.template.php files (default theme edit is done during install).
That install requires you to manually edit all the different themes.
You know most portals have their own built in shoutboxes that are fairly decent. Have you tried the one in the portal you are using?
You may like it.
anyone? really this is the last mod ill ever need in my site :(
the last is always the toughest lol
Notice: Undefined index: modsettings_title in /home/myname/public_html/Sources/Subs.php on line 4265
Notice: Undefined variable: chatButton in /home/myname/public_html/Sources/Subs.php on line 4497
Notice: Undefined variable: chatLink in /home/myname/public_html/Sources/Subs.php on line 4498
using ezportal btw, not really fond of the shoutbox it has, this is similar to that other guys issues with tinyportal so i think granting that i can already type stuff that it can be fixed, just that the errors need to be addressed coz it comes up every so often and is really distracting
subs problem with this, anyone care to help as a christmas gift? :) thanks in advance
Quote from: cieplutki on December 18, 2010, 03:41:11 PM
Working on smf 2.0 RC4 living demo (http://www.zion-dc.ovh.org/index.php)
ok how do i get the chatbar to appear?
on this post http://www.simplemachines.org/community/index.php?topic=137508.msg2883848#msg2883848 on attach
still can't be seen by admins and regular members, seems weird only global mods can see the chat
god whay ...
(http://www.divshare.com/img/13616210-cce.png)
its working now, but sometimes it's not. really weird. like it just works at random with ADMIN account and other membergroups EXCEPT GLOBAL moderators. such a random problem i know :(
install the shoutbox and edit the index.temple file, but the only thing that appear is this:
(http://img156.imageshack.us/img156/4933/86840677.png)
btw, how can i change the shoutbox position below home.forum/help?
it's on smf 1.1.12 ??
and ... reference theme ???
edit only index.template.php
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" />';
and add after
// 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,'/mymod/animatedcollapse.js" type="text/javascript"></script>
<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>
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">soundManager.url="',$boardurl,'/yshout/soundmanager2.swf";
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function() {
soundManager.createSound({id:"aSound", url:"', $boardurl, '/yshout/chat.mp3", autoPlay:false});
}</script>
<style type="text/css">
#yshout {
font-size: 10px;
overflow: hidden;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts { /* main shouts area */
overflow: auto;
width: 665px; /* the width you want to display */
height: 150px; /* the height you want to display */
}
#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 {
color: #666666;
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
its on smf2 rc4, with reference theme.
install on all themes, and that same bug
How can I make the shout bigger in text?
It says I'm not login although I was login. When I logout and login again It allowes me to use it but again after an hour the same problem happens. Please help me
i'm using this mod but first i dont get icons in shoutbox so i copyied image files to theme\images folder.
but this problem occuring im using 2.0 rc4 i guess.
(http://i52.tinypic.com/2nid4z8.jpg)
I have installed this shoutbox onto my website.
One question as I am new to all this, how do i get it to show on my homepage. I have installed it on all themes, but none of them show it in the theme when i select it. It is showing as installed but i have no idea. I am using SMF 2.0 RC2.
Thanks
Been using this plugin for ... 2 years now? Not had a single problem. Until recently, been getting a strange error. I've made not changes to my boards (outside of regular SMF updates), and I'm now getting this error in the shoutbox:
Warning: session_write_close() [function.session-write-close]: write failed: No space left on device (28) in /home/content/m/a/t/mathmission01/html/FFF/yshout/yshout.php on line 748
Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in /home/content/m/a/t/mathmission01/html/FFF/yshout/yshout.php on line 748
Warning: Unknown(): write failed: No space left on device (28) 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 (/tmp) in Unknown on line 0
I have over 90GBs of space on the server, and easily over 900GBs of transfer. I'm just not entirely sure what I should ask them.
Quote from: mathmission on February 16, 2011, 09:51:32 AM
I have over 90GBs of space on the server, and easily over 900GBs of transfer. I'm just not entirely sure what I should ask them.
You can test cleaning your /forum/yshout/chats/history.home.txt
Quote from: Arantor on February 16, 2011, 10:02:24 AM
Quote from: mathmission on February 16, 2011, 09:51:32 AM
I have over 90GBs of space on the server, and easily over 900GBs of transfer. I'm just not entirely sure what I should ask them.
Don't delete the history.home.txt file. Tell your host about that error, only they can fix it.
I dont say delete file.
i am not able to get this to work for smf 1.1.13
is it not supported?
Quote from: kirankuruvila on February 19, 2011, 02:54:27 AM
i am not able to get this to work for smf 1.1.13
is it not supported?
I recently upgraded my board from 1.1.7 to 1.1.13 and i installed the shoutbox with the instructions designated for the 1.1.7 version.
Hopefully it works just fine!
Hi, can anyone tell me how they managed to get the timestamp on its own (separate) line, either above or below the shout? I don't actually know any PHP, so every time I try, I break the shoutbox. xD Thanks!
Edit: Never mind, I realized that the adv shoutbox had this, so I switched over.
Quote from: cieplutki on November 28, 2010, 07:53:35 AM
unofficial to 2.0 rc 4 and 1.1.12 with some change to smf.pl and friedns
it's look that :
(http://www.divshare.com/img/13348017-366.png)
included:
scrollbar, sound and some more
Thank you for your update. It works fine with rc5. Just some notes,
when you click the user name, it always do like this:
How to disable it?
Do
RvG:
read this post http://www.simplemachines.org/community/index.php?topic=137508.msg2178905#msg2178905 1 step
will that be fixed on your unofficial version? :)
I am using 2.0 RC5 and installed the 1.22 version. When I did, I set the emulate version to RC4. Installed it. Set the permissions and then set the emulate back to RC5.
I am not seeing it on my board? The permissions are all set properly as well. My theme is BacknBlack if that matters.
Any ideas?
how can I add a little text to the shoutbox?
(http://i54.tinypic.com/28amdfc.png)
I'm wondering if anyone can help. I've installed this on a fresh install of SMF 2.0RC5, no problems. Using the RC5 of the theme ACTUALISM, and am wondering where I might insert the two bits of code into the index.template.php for that theme, and have the shoutbox at the bottom of the screen, rather than the top. Any help would be greatly appreciated.
Can anyone help with my shoutbox, I need to change the font size from 10pt to 16/18 when i get into the style sheet I cant change the font can highlight the code and nothing else.
Rob
Thank you for your none help with this fantastic help forum.
Hey people,
Using this on my forum 1.1.12 atm but the permissions dont work? Id like to remove the shoutbox area complete from view of guests and certain member groups?
Is this possible?
Many thanks,
Adam
Quote from: EGCoopey on March 15, 2011, 09:36:36 PM
I am using 2.0 RC5 and installed the 1.22 version. When I did, I set the emulate version to RC4. Installed it. Set the permissions and then set the emulate back to RC5.
I am not seeing it on my board? The permissions are all set properly as well. My theme is BacknBlack if that matters.
Any ideas?
Same here,
Using RC5 and 1.22, installation went perfect.
Extracted manually the yshout folder to my forum root.
Permissions are set ok, but nether i (admin) or any members can see it.
I'm using default theme
How to solve this?
Installing the forum is problematic, according to 1x instukcji manual. Something is always in fashion 1.6 breaks down in at least to me.
Cieplutki thank you for your version of the shoutbox, it works fine on SMF 2.0 RC5
If you want a French translation, you can take it and integrate (join the file extension)
Is it normal that "bbcodes" does not work on the shoutbox?
I also wanted to know if his would be better to put a single link o show and hide Smilies?
Sorry for my bad English.
Quote from: Grosraisin on April 17, 2011, 10:59:42 AM
Cieplutki thank you for your version of the shoutbox, it works fine on SMF 2.0 RC5
If you want a French translation, you can take it and integrate (join the file extension)
Is it normal that "bbcodes" does not work on the shoutbox?
I also wanted to know if his would be better to put a single link o show and hide Smilies?
Sorry for my bad English.
bbcode was off
to be on please open youshout.pl
find
$codes = array('tag' => 'url');
$text = parse_bbc($text, true, '', $codes);
//$text = parse_bbc($text);
replace to
Quoteparse_bbc($text);
I have $ reverseShouts = true; messages appear on top, but scroll is to down, how to fix this?
Hey everyone,
I had the regular version of 1.22 installed on my 2.0 RC5 for a while now. It was working fine until I tried to move it from index.template.php to Boardindex, where my theme crashed. No worries there, since I just installed a different theme and reinstalled the shoutbox. However, anytime anybody tries to post in it now, it simply changes the URL in the address bar to "/forums/?#".
It works for me, but no one else. Already checked permissions, though logically it couldn't be that since the other administrators on my site get the same result.
The only editing I've done to yshout.php was remove "header('Content-type: text/html; charset='.$defaultEncoding);", since that was giving me an error anytime the shoutbox loaded, and I failed to deduce why.
Any help with this would be greatly appreciated.
Hy i use 2.0 rc5 with custom theme but on the custome theme the Shoutfield doesnt appear
look screen in attachment
i really want these shoutbox and on default theme all works fine but not on custom
if i refresh it says "shoutbox loading..." for 3seconds and nothing appear
please help
thanks in advance
edit: i fixxed it
it wasn error:
Undefined index: spoiler_for in ...
in the language.php now it works fine :)
for the other users if you use Custom theme and got the same issue look in your Errorlogs and try to fix this errors
Quote from: cieplutki on April 21, 2011, 09:25:28 AM
bbcode was off
to be on please open youshout.pl
find
$codes = array('tag' => 'url');
$text = parse_bbc($text, true, '', $codes);
//$text = parse_bbc($text);
replace to
Quoteparse_bbc($text);
Quote
Its still not working.
I am:
Found:
$ codes = array ('tag' => 'url');
$ text = parse_bbc ($ text, true,'', $ code);
/ / $ text = parse_bbc ($ text);
Replaced and all lines by:
parse_bbc ($ text);
But its still not working.
Link: http://prez-me-all.redheberg.com/elevenn/index.php
User: test
Password: test
Thank you again.
I just corrected my problem.
Should not I remove the 2 lines before:
/ / $ text = parse_bbc ($ text);
@
Grosraisinthat should be
Quote// utility functions for shouting
function cleanupShout($text) {
global $func,$bannedCode,$context;
$text = $func['htmlspecialchars'](stripslashes($text), ENT_QUOTES);
foreach($bannedCode as $searchString)
$text = preg_replace('/'.preg_quote($searchString,'/').'/i','',$text);
preparsecode($text);
$text = parse_bbc($text);
censorText($text);
return $text;
}
and you have that
Quote// utility functions for shouting
function cleanupShout($text) {
global $func,$bannedCode,$context;
$text = $func['htmlspecialchars'](stripslashes($text), ENT_QUOTES);
foreach($bannedCode as $searchString)
$text = preg_replace('/'.preg_quote($searchString,'/').'/i','',$text);
preparsecode($text);
$codes = array('tag' => 'url');
$text = parse_bbc($text, true, '', $codes);
//$text = parse_bbc($text);
censorText($text);
return $text;
}
I had:
// utility functions for shouting
function cleanupShout($text) {
global $func,$bannedCode,$context;
$text = $func['htmlspecialchars'](stripslashes($text), ENT_QUOTES);
foreach($bannedCode as $searchString)
$text = preg_replace('/'.preg_quote($searchString,'/').'/i','',$text);
preparsecode($text);
$codes = array('tag' => 'url');
$text = parse_bbc($text);
censorText($text);
return $text;
}
But it worked xD
For this to be emptied its cache (not type) something I had not done the first time. And you simply remove the / /
For the cons I have a Bug. After a /me in chat, I'm linking to the selection of the ban. But I do not know why, I just wanted to change the color and its not even change.
Example:
Quote[Aujourd'hui à 21:58:43] Grosraisin: Pour Grosraisin: gfdg
[Aujourd'hui à 21:58:46] * Grosraisin sdjhgsqk
[Aujourd'hui à 21:58:48] Grosraisin: ghq //** Link -->
Sélection du mode de bannissement:
Lecture et envoi
Envoi seulement
the shoutbox was installed with no problems, it is displaying the shouts incorrectly, it was installed by uploading the package. I also have no settings in the Admin panel. I don't know if it is a java problem or a code issue. smf 2.0 RC5 running in RC4 compatability mode with PHP4. I have 755 all files in yshout file, they were 666.
(http://www.cruspeed.com/images/shout_error.gif)
Hallo.
I wonder if i can change the situation nneonneo shoutbox.
When i install the mod ... it install under the avatar, in the user's welcome area, and i would like to put under the menu (home-help-search-admin-moderate ...).
Is it possible?
PD: I use smf 2.0 RC5 and default theme - curve
hey i need help
i've installed this Shoutbox but it doesn't show up anywhere
i see it in installed section list but not on menu or website at all
can someone help?
Français:
Re,
Je viens de finir ma customisation de la chatbox pour mon forum, pour ceux qui veul voir je la met en attachement.
Version basée sur celle de cieplutki. Merci a lui.
Changlogs:
Intégration sur le template Darkmark
Nettoyage des répertoires
Ajout d'icons
Traduction Française (une meilleur traduction est a venir) et anglaise
Ajouts de divers paramètres CSS 3.
Liens des outils en bas
Seulement SMF 2.0
English:
Re,
I just finished my customization of the chatbox to my forum, for those spineless see I put in attachment.
Version based on that of cieplutki. Thank you to him.
ChangLog:
Integration on the template Darkmark
Cleaning Directories
Adding icons
French translation (a better translation is coming soon) and English
Additions of various parameters CSS 3.
Tool links at bottom
Only SMF 2.0
heah it's nice very good job
(http://img805.imageshack.us/img805/1383/85420458.png)
so you wron search
look ;) (http://www.simplemachines.org/community/index.php?topic=137508.msg2892271#msg2892271)
and when you install ... any error ???
try this pack
Hello,
I have a little trouble with a script from the shoutbox.
This script:
<script src="',$boardurl,'/yshout/js/yshout.js?" type="text/javascript"></script>
Break this script:
<script src="http://www.google.com/jsapi"></script>
<script>google.load("jquery", "1");</script>
<script type="text/javascript" src="', $settings['theme_url'], '/scripts/jquery.ez-bg-resize.js" charset="utf-8"></script>
<script>
$(document).ready(function() {
$("body").ezBgResize({
img : "', $settings['theme_url'], '/images/theme/bg.jpg",
});
});
</script>
Would you have any idea to fix the bug.
Thank you.
Please update for 2.0Gold
Thank's
Utilise mon lien il marche très biens. (voir un peu plus haut)
For those looking for an ajax shoutbox take a look to this mod: http://custom.simplemachines.org/mods/index.php?mod=1295 it works in SMF 2.0 Final as it seems like this one isn't updated anymore
Merci Grosraisin ;)
----------------------
I would like to delete the ban on admins as well as on itself
not working in 2.0 any chance of an update?
Good evening all:
There have been some minor CSS updates in SMF 2.0 Gold (Final) which resulted in the shoutbox appearing incorrectly. This has been remedied in the "1.22b" release. No other changes were made.
If anyone wants to apply the changes themselves, here they are (in XML form):
<file name="$themedir/index.template.php">
<operation error="ignore">
<search position="replace"><![CDATA[ #yshout .shout { /* one shout */]]></search>
<add><![CDATA[ #yshout #shouts .shout { /* one shout */
float: none;]]></add>
</operation>
</file>
P.S. I'm not dead, just really busy these days, so I haven't had time to respond to your comments. Thank you all for your continued support of this mod!
EDIT: removed redundant float:left on fieldset
hello nneonneo, Shoutbox appearing again incorrectly in 1.22b :(
(http://img11.hostingpics.net/thumbs/mini_993785ecr0182.jpg) (http://www.hostingpics.net/viewer.php?id=993785ecr0182.jpg)
Diddo. Looking for a demo or a live view.
All referenced links are dead.
@Markco: Whoops, I forgot to test this with an avatar. Fixed.
I changed
echo '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
to
echo '<br clear="all" /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
in index.template.php.
@FinsandFur: I haven't had a live demo site for quite some time; if anyone is willing to donate two forums on a domain, I'd be very grateful.
Quote from: nneonneo on July 10, 2011, 11:24:48 AM
@Markco: Whoops, I forgot to test this with an avatar. Fixed.
I changed
echo '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
to
echo '<br clear="all" /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
in index.template.php.
Shoutbox appearing always incorrectly in 1.22b while the modification is present :'(
@Markco: Please describe what looks wrong.
Same problem in post:
http://www.simplemachines.org/community/index.php?topic=137508.msg3105232#msg3105232
Can you please describe *what* is wrong?
I say that with this modification:
Quoteecho '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
to
echo '<br clear="all" /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
that changes nothing the problem the shootbox always appears incorrectly, as in screen shot of this post:
http://www.simplemachines.org/community/index.php?topic=137508.msg3105232#msg3105232
All I see is misplaced "Shout Box" text, which is fixed by this. Are you saying something else is wrong in that picture? If so, I can't see it.
installed but not seen, permits?
UPDATE: Doesnt matter now!
just installed. i dont see anything. Not a shoutbox, or sections in admin panel... but there are options for each membergroups.
How can i see this shoutbox?
- Turkish translation is too old.
- Had to do manual edits to install.
- There is no directions after installation.
- Couldnt find the options nor the shoutbox evenafter setting the permissions. I couldnt see anything about the shoutbox other than the options in permissions page.
Uninstalled. Looking/waiting for a better shoutbox/chat mod.
Installed 1.1.2b on a 1.1.14 and it tells me its for the wrong version.. So I uninstalled and tried the 1.1.2 and it says the same thing. I am assuming I put something in the database or edited a file when i did that? Can you tell me what to change so I can try to reinstall the 1.1.2?
Thanks!
@bruce86, PLAYBOY: What theme are you using?
@imburner: Version was incorrect in the package; this has been corrected. Download 1.22b again and try it.
Mineral
You have to perform a manual installation to themes other than Core and Curve. See Installation to Other Themes (http://custom.simplemachines.org/mods/index.php?mod=585#post_otherthemes) for details.
@PLAYBOY: I also apologize for the out-of-date Turkish translation. I welcome updates.
The new strings are:
$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';
If these strings are translated, I can update the Turkish translation to 1.22.
Its ok. I dont need the support anymore. I uninstalled the mod already.
Right now im trying "SMFPacks Shoutbox"
They are very very good with only one major issue of IE compability. If they fix that pretty soon then i ll get that. Otherwise i may just come back here.
Thx anyways.
So this was a error in the version I took last night?? Should I download the b for my 1.1.14? I did both last night and they didnt work.
I uploaded a fixed one a few hours ago.
Hi nneonneo, I've been using your wonderful plugin for a 2 years now but only recently I've encountered problems after upgrading from 1.4 (? forgot) to 2.0. It seems some members can't post anything. Check out this screenshot:
(http://i.imgur.com/9LwsA.png)
even more troubling, one of my full administrator (with all access) cant even post. the problem is not faced by any particular group but across all groups but randomly.
Do you have any idea why this is happening?
Hello nneonneo!
I still have a weird looking shoutbox in curve even if I downloaded the package today.
it looks awful :(
https://lh5.googleusercontent.com/-VRWph8TYHwc/TjhUz1rZPnI/AAAAAAAAEL4/64wgyX-eCWA/s1152/shoutbox.jpg
Hi nneonneo, thanks for wonderful chatbox, i use it for 7 mos now and it drive lot of traffic on my site
i like to have a dispaly of smileys on my chat box i read some instructions but seem's all greek to me.
i hope you could help, i attached my "index.template.php"
my site is http://uploadingtips.com
(http://lulzimg.com/i24/60eb12.png)
Hey, its a nice shoutbox, but it wont work for me <.<
When i "Shout", my message wont appear, or when i will look into history, i get a White page....
I installed per Manager, and copied the "yshout" ordner manually into my Forums Root.
My version is SMF 2.0.1, pls help ..
Hey nneoneo,
i use your great mod (SB_1.22b on SMF 2.0.1). But of one day to the next it was not possible to send messages into the shoutbox. On pressing the 'shout!'-button, nothing happens.
If i comment out the <link [...]=yshout.js?062008[...]> in the head, then it works. But it still does not reload the shoutbox, it reloads the whole smf.
I have this problem too. It seems related to the background image for the curve theme. As soon as enough Shout lines appear, that bottom boarder appears in the wrong place.
Any ideas on how to correct for this?
Quote from: rufen on August 02, 2011, 03:51:30 PM
Hello nneonneo!
I still have a weird looking shoutbox in curve even if I downloaded the package today.
https://lh5.googleusercontent.com/-VRWph8TYHwc/TjhUz1rZPnI/AAAAAAAAEL4/64wgyX-eCWA/s1152/shoutbox.jpg
how do you unban ppl in this this shoutbox?
My shouts are not appearing either? Is this due to some incorrect Apache settings, PHP settings, file permissions or some SMF code that's effecting the shoutbox?
It all worked fine when I tested it on XAMPP, on my localhost. But once I installed it to my forum on my DirectAdmin server it didn't work anymore.
Please, tell me how to fix it, or release an update that'd fix this issue.
Mods installed: YouTube BBC.
Theme: A customized Curve based theme.
SMF version: 2.0.1
any way to get this on 2.0.1?
Hi,
Here's a new review of my personal shoutbox (nneonneo's Shoutbox)
*More cleanup code
*Guest cannot view chatbox
That one throws a error for me as well. Seems there was code that does not get removed after uninstalling the last versions
guys i want to use this mod
i have installed version SB_1.22b but dont know what to do next, i need a full guide thanks in advance
The shoutbox on my site refreshes correctly sometimes, and not at other times. emcache.com (http://emcache.com) is the site in question.
I have checked everything in all the yshout files and the general themes. Any ideas?
Problem Resolved
Hi everyone!
I've a problem with my shoutbox. I use smf 1.1.15 and I've just installed the 1.22 version of the neonneo's shoutbox but when I try to write something and I click "Send" nothing happens! Why?
Please help me, thanks!
Similar issues. I upgraded to 1.1.15. My shoutbox displays, but when I attempt to enter a shout, the text doesn't take, and it returns my message board html in the shoutbox area. The shoutbox works fine with the default theme and it worked fine with the custom theme I was using (http://custom.simplemachines.org/themes/index.php?lemma=305) until I did the upgrade. The rest of my upgrade seems to be fine. Any ideas?
Solved. I thought I had updated the shoutbox code in the head section of my template, but I guess I had not. Blame poor vim skills for that one!
Quote from: kriskd on November 27, 2011, 04:11:36 PM
Solved. I thought I had updated the shoutbox code in the head section of my template, but I guess I had not. Blame poor vim skills for that one!
I had updated that code but it doesn't work :'(
Fresh install of this addon on a fresh install of SMF 2.0.1, and it is not working. Shout button does not react to being clicked/enter button pressed.
I have done some testing and figured out that this mod is breaking autosuggest on my board. This shoutbox is crucial, and autosuggest is pretty crucial too. Any suggestions on how to resolve this or why it might be happening? It reliably breaks when testing it on a fresh install of the board. See here...
http://www.simplemachines.org/community/index.php?topic=463505.0
Does not work at all in 2.0.2 or if it does I must be blind.
Hi it works for me on 2.02 but it works little bit strange please see picture...
(http://www.mojaladja.com/BRISIMEnneo.JPG)
(http://www.mojaladja.com/BRISIMEnenenene.JPG)
Can u please give me proper code how to fix this ?
Thanks in advance !
Screws up pretty weirdly in 2.02.. I have it in the boardindex, and it shows the board index 3 times now. o.O;
bump?
here i remade it works with 2.0.2 now
Unless you have permission to distribute the updated mod, from the author, you will have to remove that update, I'm afraid.
are u police or something? show me your batch if so
or even better show me where's the license for this shoutbox
I'm not police, but I can readily call the moderators in to remove the link.
That's the point, there IS no licence for the mod. In absence of that, the rule has always been to follow the SMF licence for modifications, which means no derived works and no redistribution (which is basically what copyright law would provide for too)
I just installed SB_1.22b on default curve 2.02 and it seems to be working fine?
Quote from: mcrat on January 17, 2012, 06:35:02 AM
I just installed SB_1.22b on default curve 2.02 and it seems to be working fine?
Yeah, regulat SB will do its just AdvSB that makes problems on 2.0.2
Quote from: arrowtotheknee on January 17, 2012, 05:21:49 AM
I'm not police, but I can readily call the moderators in to remove the link.
That's the point, there IS no licence for the mod. In absence of that, the rule has always been to follow the SMF licence for modifications, which means no derived works and no redistribution (which is basically what copyright law would provide for too)
Well why you just dont call in the author of this mod so he can speak for himself
PLUS
My derived work adds functionality for SMF 2.0.2 which is released under this license:
QuoteBSD License (SMF 2.0+)
Copyright © 2011 Simple Machines. All rights reserved.
Developed by: Simple Machines Forum Project
Simple Machines
http://www.simplemachines.org
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.
Neither the names of Simple Machines Forum, Simple Machines, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission.
U dick I'm thinking if you're not the police you must be a secret agent working for government or microsoft... call your mods I don't care if I get banned coz I have 0 respect for brown-nosers and snitches like u
It doesn't matter that you've released your work under BSD, the original isn't, and as such you do not have any right to redistribute code as such. If the original author had left a suitable licence, I wouldn't be bringing this up.
And the original author hasn't been around here for a long time. It is because of arrogance and disrespect from people like you, of not adhering to the terms of licences that SMF used to have its own no-fork, no-redistribute licence.
Let me make an official statement, if that's what you need to see.
Regardless of what the SMF license is... mods are licensed individually and do not have to follow the SMF license.
Any mod that does not indicate a specific license will default to the most restrictive license (no redistribution without permission).
Additionally, we have never allowed for users to redistribute a mod as an attachment in the message threads.
We have a very specific process for submitting, validating and accepting mods... mods as attachments bypass this process and thus, are not allowed.
As for the rest of it... Watch your language. There is no need for name calling or attitude like that. Arrow was very nice in his first message to you and your attack was uncalled for. If it continues, you WILL be banned.
Hello , I would like to ask something
I am using SMF 2.0.2 version .
I have downloaded the latest version of this shoutbox (SB_1.22b)
I am using also default theme.
Does it work properly? Because I won't to damage my files. Thanks
it will probably work.... since it was updated for 2.0 - but there are no guarantees.
Ehm.. is OP on a long vacation or did he abandon this mod?
sorry, so how (can?) we fork this mod?
You can try asking the author for permission, but I don't think anyone's heard from him in a long while, meaning that if your intention is to distribute one, you're probably better off writing one from scratch and using a BSD licence in the process (then there's absolutely no debate on ownership)
There are also other advantages to writing it from scratch as opposed to using a pre-built one, you can do things you wouldn't necessarily be able to do otherwise - it's possible with the changes in SMF 2.0 to write such a shoutbox with few (if any) edits to files in the system, but use the template layers and hooks to perform the integration.
The issue with this breaking autocomplete is really becoming a problem for me. I love this mod and want to keep it, but if the author is not maintaining it anymore I am going to have to look for alternatives. I mean, hey, it's free and I don't mean to be a nudge but I really do need to get this fixed. Would love to iron out the bug.
My users dont have access to it.. Whats wrong? I see shoutbox but they dont :S Its something with permissions? FIXD!
EDIT: So is there anyway to implement some text colors for users? We used to have vbulletin and they're used to modify their text xD
use bb code for color...brackets with "color=red" and "/color" in them with whatever color replacing the red?
red blue etc
I just installed this a few hours ago on 2.0.2. It works great. But I am the only one that can see it and I can not find how to set it for others to see.
permissions
Quote from: Kindred on March 08, 2012, 03:41:29 PM
permissions
Ok,
Let me phrase this another way. I go under permission and see General, board, edit profiles, and settings. I looked under all 4 of those and see nothing pertaining to the shout box.
Still new to SMF software and do not fully understand it yet.
under general permissions, you have a list of each membergroup
click modify and then find the shoutbox permission and set it (must be done for each membergroup which has its own permissions)
Quote from: Kindred on March 08, 2012, 03:55:40 PM
under general permissions, you have a list of each membergroup
click modify and then find the shoutbox permission and set it (must be done for each membergroup which has its own permissions)
Now that was very helpful and showed me stuff I did not know was there. Been wondering how to do the permission.
Thanks much.
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.
I have installed the ajax Chat 3.3a onto our forum version SMF 2.0.2.
It is working perfectly.
Is there any way I can add more smilies to the shout box?
Quote from: Grosraisin on November 03, 2011, 03:19:51 PM
Hi,
Here's a new review of my personal shoutbox (nneonneo's Shoutbox)
*More cleanup code
*Guest cannot view chatbox
thank you ;D
I have a question that may or may not have been asked. I skimmed through this giant thread and did not see it but I did not read everything either.
I have a couple sites that are both SMF 2.0.* using Simpleportal 2.3.4 with the v1.22 shoutbox. I am curious if it is possible to have those two sites share one single shoutbox? Currently the shoutbox is in a Simpleportal block that shows up on almost all pages. If this is possible pointing me in the direction of making it a reality would be greatly helpful.
Thanks.
jphilipg
may i know how to activate the shoutbox
Hi, ihave a problem with this shoutbox and smf 2.0.2...
the layout is completely gone...
anyone knows how to solve plz?
Hi, I have a version shoutbox SB_1.22 along with Emoticons, after the click on emoticon undecided.gif emoticon has a code:
:-\
after sending the message on shoutbox with emoticon undecided.gif isn't showing this emoticon only display such a text:
:-
In the folder mymod are two files smiley _ SMF_1.php and _SMF_2.php in in smiley_SMF_2.php is a code:
array('code' => ':-\\', 'filename' => 'undecided.gif', 'description' => $txt['icon_undecided']),
Between the marks ' ' is arranged code responsible for display this emoticon, correct code on this emoticon undecided.gif
this code:
:-\
So this emoticon displayed on the forum with such a code, after entry of that mark between these flags
':-\'
display error under shoutbox: Parse error: syntax error, unexpected T_STRING, expecting ')' in \virtual\NameWWW\smf\mymod\smiley_SMF_2.php on line 31
I ask for help how to correct this mistake would show this icon correctly.
Open BoardIndex.template.php your skin and near 220 linie
Quoteecho '<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<div class="tborder" style="margin-top: 0;">
<div class="catbg" style="padding: 5px 5px 5px 10px; border-radius: 5px;">
<center>.:: Shoutbox - Tu nie zadajemy pytań, od tego jest forum! ::.</center>
</div>
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg">
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'</div>
<div class="smalltext" style="padding-left:25px;"><a href="javascript:collapse1.slidedown()">Open Smiley</a> | <a href="javascript:collapse1.slideup()">Close</a>';
require('mymod/smiley_SMF_1.php');
loadSmileys();
echo '
<div id="smiley_pic">';
printSmileys('shout_form','shout_text');
echo '
</div>
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var collapse1=new animatedcollapse("smiley_pic", 1000, false)
</script>
</div>
</td>
</tr>
</table>
</div><br />';
change smiley_SMF_1.php to smiley_SMF_2.php
or download attach ;)
@ up
I don't need to change on smiley_SMF_2.php because is already placed this command from smiley_SMF_2.php
So it must be another error, error in some file from Shoutbox, not in BoardIndex.template.php
Shoutbox from the attachment has the same mistake.
Is it possible to use it outside SMF, through SSI or something?
Somebody will help me how to solve a problem from with the emoticon in shoutbox?
I read through most of the 300 plus pages, and only saw my question asked once(and it didn't help); so sorry if I am being redundant here. I am getting this error:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 439 bytes) in /home/content/65/9384965/html/yshout/class.tail.php on line 228
Chat is working fine, but the above error happens when I am trying to look at chat history. I contacted my host, and I have plenty of RAM, so it isn't a hosting issue. I considered uninstalling the mod, and re-installing it to see if that would help, but I received an error there too. ./Sources/ManagePermissions.php=test failed
Personally I would rather solve the fatal error, then try to unistall it anyway. Any suggestions?
Bradley, You have to edit the history log file. Use FTP to look in the Chats folder of the yshout folder. History.home.txt (or similar, the big file ). Download it, edit it to remove all but the bottom 400 lines or so ...upload it back and history should work again.
For me, I still get the blue background bar across the middle of the shoutbox. I know this is related to the background image but do not know how to change it.
Good Luck
Quote from: Molten Bear on October 18, 2012, 12:01:50 AM
Bradley, You have to edit the history log file. Use FTP to look in the Chats folder of the yshout folder. History.home.txt (or similar, the big file ). Download it, edit it to remove all but the bottom 400 lines or so ...upload it back and history should work again.
Genius. Thank you.
Quote from: Molten Bear on October 18, 2012, 12:01:50 AM
For me, I still get the blue background bar across the middle of the shoutbox. I know this is related to the background image but do not know how to change it.
Good Luck
Wish I could help you with that in return, but no idea... Thanks again though, much appreciated.
Quote from: underdog_01 on July 20, 2009, 01:27:47 AM
I'm not sure if this has been mentioned before..
(I didn't find it in the search function)
I noticed the /clear command only clears up the history that shows on the current screen.
It does not erase the the entire history file therefore manually clearing the file with an editor is necessary.
So I made a slight modification to the Shout Box that adds a proper erase procedure.
-------------------------------------------
Adding the /erase history command:
Navigate to ...Your site/public_html/yshout.php
Find:
case "/clear":
global $chatPath, $historyPath;
$fileContents='';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$handle=fopen($chatPath, 'w');
fputs($handle,'');
fclose($handle);
if($historyPath !== '')
{
$handle=fopen($historyPath, 'a');
fputs($handle,$fileContents);
fclose($handle);
}
return true;
Add this after above code:
case "/erase":
global $chatPath, $historyPath;
$fileContents='';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$handle=fopen($historyPath, 'w');
fputs($handle,'');
fclose($handle);
if($historyPath !== '')
{
$handle=fopen($historyPath, 'a');
fputs($handle,$fileContents);
fclose($handle);
}
return true;
---------------------------------
Navigate to:
Your site/public_html/Themes/default/languages/Modifications.english.php
or if you use utf-8 settings go to:
Your site/public_html/Themes/default/languages/Modifications.english-utf8.php
Find:
$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' => ' <message>: Emotes the message (e.g. <span class="meaction"> * Nathaniel likes dogs</span>)');
$txt['yshout_cmdlistadmin'] = array(
'/clear' => ': Completely empty the Shout Box.',
Add this after above code:
'/erase' => ': Erase entire Shout Box history.',
Done.
---------------------------------
Now you can use the /erase command to erase the entire history of the Shout Box.
Note: If you only use the /erase command it will erase the extended history and put what is showing on your screen in there (recent history). If you want to erase absolutely everything... use the /clear command followed by the /erase command.
UD
I've tried adding the /erase command to yshout.php file and all that does is makes my whole forum a blank screen
Quote from: Kaitlyn on October 19, 2012, 04:53:09 AMI've tried adding the /erase command to yshout.php file and all that does is makes my whole forum a blank screen
It worked nicely for me. Did you also put this code in your "Modifications.english.php"?
Quote from: underdog_01 on July 20, 2009, 01:27:47 AMNavigate to:
Your site/public_html/Themes/default/languages/Modifications.english.php
or if you use utf-8 settings go to:
Your site/public_html/Themes/default/languages/Modifications.english-utf8.php
Find:
$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' => ' <message>: Emotes the message (e.g. <span class="meaction"> * Nathaniel likes dogs</span>)');
$txt['yshout_cmdlistadmin'] = array(
'/clear' => ': Completely empty the Shout Box.',
Add this after above code:
'/erase' => ': Erase entire Shout Box history.',
Done.
is it possible to upload your yshout.php file can't seem to get the code to work correctly
I would like to remove these commands
/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?
* Kaitlyn <message>: Emotes the message (e.g. * Nathaniel likes dogs)
/impersonate <user> [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.
<user>: Username to use
[userlevel]: User Level to use. 0=normal, 1=mod, 2=admin
[ip]: IP address to use, as 1.2.3.4
[userid]: User ID from forum, to fix profile link
Quote from: rimh101 on July 20, 2012, 08:27:52 AM
Hi, I have a version shoutbox SB_1.22 along with Emoticons, after the click on emoticon undecided.gif emoticon has a code:
:-\
after sending the message on shoutbox with emoticon undecided.gif isn't showing this emoticon only display such a text:
:-
In the folder mymod are two files smiley _ SMF_1.php and _SMF_2.php in in smiley_SMF_2.php is a code:
array('code' => ':-\\', 'filename' => 'undecided.gif', 'description' => $txt['icon_undecided']),
Between the marks ' ' is arranged code responsible for display this emoticon, correct code on this emoticon undecided.gif
this code:
:-\
So this emoticon displayed on the forum with such a code, after entry of that mark between these flags
':-\'
display error under shoutbox: Parse error: syntax error, unexpected T_STRING, expecting ')' in \virtual\NameWWW\smf\mymod\smiley_SMF_2.php on line 31
I ask for help how to correct this mistake would show this icon correctly.
I'm having the same problem. All smilie images work in the shout box
except the undecided smiley ( :-\). The image appears fine in posts in the forum, but I only get the ':- \' text in the shoutbox, and not the image.
Anyone have an idea of why that is the only one not appearing as an image in the shoutbox?
Quote from: Kaitlyn on October 24, 2012, 05:21:16 AM
is it possible to upload your yshout.php file can't seem to get the code to work correctly
Sure. Here it is.
Sorry, to barge in, but was there a solution to this issue? I am running 2.0.2 and have the exact same problem, no box, text just keeps scrolling down and down with each post....
thanks
How can I change the order of the shouts? I want the newest shout to be on top and the oldest at the bottom.
Go into your FTP. In yshout.php find this line
$chatText = file_get_contents($chatPath)
Replace that line with
$chatText = implode('',array_reverse(file($chatPath)));
and the order of the chats will be reversed.
Quote from: br360 on July 06, 2013, 12:15:26 PM
Go into your FTP. In yshout.php find this line
$chatText = file_get_contents($chatPath)
Replace that line with
$chatText = implode('',array_reverse(file($chatPath)));
and the order of the chats will be reversed.
I dont see that line.
This is what in that file.
Quote<?
error_reporting(E_ALL);
ob_start();
set_error_handler('errorOccurred');
include 'include.php';
if (isset($_POST['reqFor']))
switch($_POST['reqFor']) {
case 'shout':
$ajax = new AjaxCall();
$ajax->process();
break;
case 'history':
// echo $_POST['log'];
$ajax = new AjaxCall($_POST['log']);
$ajax->process();
break;
default:
exit;
}
else
include 'example.html';
function errorOccurred($num, $str, $file, $line) {
$err = array (
'yError' => "$str. \n File: $file \n Line: $line"
);
if (function_exists('jsonEncode'))
echo jsonEncode($err);
else
echo $err['yError'];
exit;
}
?>
Are you sure it was nneonneo's Shoutbox that you installed? Not only is that not in any of the files, but it appears to be some sort of error that is being kicked out as well.
Nevermind I got it
Should I worry about the message my browser gives when I use this mod?
It returns: Refused to set unsafe header "Connection".
Can I also use this in an external page with SSI?
I tried to make it work on the same way by importing it into a theme. It displays everything but shouting doesn't work.
Thanks!
Moved to the Chat/Shoutboxes category.
Anyone have this mod working with a SMF v2.0.11 installation? It was what our old v1 forum was using, so I tried installing SB_1.22 on a clone running SMF 2.0.11 and TinyPortal 1.111, via the Package Manager. The install worked (at least for the default theme), but the functionality didn't: the home page displayed the text input interface without any actual Shoutbox, attempts to shout had no effect, and so on.
Being able to use it again is appealing, since our current Shoutbox uses auto-refresh, but I'm not sure how long a road it would be to get it there.
Thanks for the post, Ace. I was just going to try an install on 2.0.11 and after your post I decided to forget it.
Chat is perfect, working like a charm on 2.0.11 on curve and custom blu theme. I have installed most basic 1.22b version, edited setting.php to change max lines to 6 (was 12 )... I recommend it warmly
I'll give it another try. Perhaps I was too hasty.
Hi!
Is it a way to hide/show the shoutbox? Because I can't use jquery, and I don't know how to do it with mootools...
Thanks
Can you help me? In new php version I have this error:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /srv/psa05/xxxxxxx.xxxxxx/httpdocs/smf/Sources/Load.php(219)
In may lines of load.php and subs.php.
Can someone modify this file for me? Thank you.
re. ildragonero.info
I don't see any \e modifier being used in nneonneo's shoutbox code.
This is most likely due to your Simple Portal installation.
Update Simple Portal to version 2.3.6 (uninstall & delete 2.3.1 and then install 2.3.6).
Then do a manual edit from this reference: http://simpleportal.net/index.php?topic=10356.msg68208#msg68208
Quote from: Chen Zhen on January 22, 2017, 07:55:05 PM
re. ildragonero.info
I don't see any \e modifier being used in nneonneo's shoutbox code.
This is most likely due to your Simple Portal installation.
Update Simple Portal to version 2.3.6 (uninstall & delete 2.3.1 and then install 2.3.6).
Then do a manual edit from this reference: http://simpleportal.net/index.php?topic=10356.msg68208#msg68208
thank you very much. I will try soon as possible.
Can I update SimplePortal without losing datas and settings (after uninstall and delete)??
leonardus,
When uninstalling Simple Portal 2.3.1 it might give you the option to remove its database entries.
Just ensure you do not do so.. The default is to not remove anything so just don't change any option on that screen.
When you install SP 2.3.6 it should have all your old blocks and settings.
You will then need to do the manual edit from the link I provided.
Also I do not know what version of Nneonneo's shoutbox you have installed.
You should be using the latest advanced version.
It updates in the same fashion (uninstall old version and delete then install new version)
You should update SMF itself since that version you are using has security flaws.
SMF 2.0 RC2 should be upgraded to SMF 2.0.13 (Imo Large Upgrade package)
However this will involve installing all your mods anew. I suggest using all their most recent versions.
ref. http://wiki.simplemachines.org/smf/Upgrading
Regards.
Quote from: Xarkurai on November 21, 2013, 05:56:46 PM
Should I worry about the message my browser gives when I use this mod?
It returns: Refused to set unsafe header "Connection".
Can I also use this in an external page with SSI?
I tried to make it work on the same way by importing it into a theme. It displays everything but shouting doesn't work.
Thanks!
I had this same problem, but this question was never answered. It seems to be a bug caused by "moo.ajax.js" and how it directly assigns the connection header to close. In chrome, this causes many error messages but doesn't interfere with functionality. The fix for checking the browser version is this (taken directly from a more recent version of moo.ajax.js:
Find in /yshout/js/moo.ajax.js:
if (this.transport.overrideMimeType)
Replace with:
if (this.transport.overrideMimeType &&
(navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
It's not working anymore.
I get this javascript error:
QuoteUncaught TypeError: Cannot read property 'style' of null
at loadChat (yshout.js?July062008:14)
at index.php:30
has anyone installed this on 2.0.19?
I used to use this. Couldn't recommend it because we managed to take the site down multiple times with it. Ended up writing my own (no you can't have it, I don't have it any more)
I've been using this shoutbox for years and it's been working like a charm. For some reason however, chats aren't going into the chat history any longer. History is only showing the last 12 chats that are in the "live" chat box. I tried uninstalling/reinstalling the mod but am kind of at a loss. I know this is old/not supported anymore but would anyone have any ideas per-chance? Thanks much!! (PS: I'm on version 2.0.19)