News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

nneonneo's Shoutbox

Started by nneonneo, December 26, 2006, 06:58:11 PM

Previous topic - Next topic

nneonneo

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)
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

jay.jarri

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

nneonneo

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.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

Quester

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.

brianjw

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.

nneonneo

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.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

shadow82x

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. :)
Colin B
Former Spammer, Customize, & Support Team Member

nneonneo

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.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

shadow82x

So do i move the big code or little. Also how do i get it directly below in index.template
Colin B
Former Spammer, Customize, & Support Team Member

magnitude

#729
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



nneonneo

@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.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

shadow82x

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..
Colin B
Former Spammer, Customize, & Support Team Member

nneonneo

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.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

magnitude

#733
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



hxxp:img452.imageshack.us/img452/3543/errortv5.jpg [nonactive]
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

brianjw

Instead of deleting a whole forum. Try backing up files before modifying as smf suggests ;)

contest25

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
hxxp:www.kannadasiri.com/portal/index.php [nonactive]


thanks

nneonneo

@magnitude: You are probably not using english-utf8.

Find Themes/default/languages/Modifications.english.php
and add, right before the ?> at the end:
// ---- Begin modification - nneonneo's Shoutbox ----
$txt['yshout_shoutbox'] = 'Shout Box';
$txt['yshout_loading'] = '...loading shoutbox...';
$txt['yshout_rp_banned'] = "Sorry, you've been banned from the shoutbox.";
$txt['yshout_no_guests'] = 'Sorry, you must be logged in to use the shoutbox!';
$txt['yshout_ban_conf'] = 'Ban Confirmation';
$txt['yshout_select_mode'] = 'Select Ban Mode:';
$txt['yshout_rp'] = 'Reading and Posting';
$txt['yshout_p'] = 'Posting only';
$txt['yshout_error'] = 'ERROR: ';
$txt['yshout_no_user'] = 'User not found.';
$txt['yshout_del_success'] = 'Shout deleted.';
$txt['yshout_no_action'] = 'Nothing to do.';
$txt['yshout_history'] = 'History';
$txt['yshout_commands'] = 'Commands';
$txt['yshout_exthistory'] = 'ExtendedHistory';
$txt['yshout_hide'] = 'Hide';
$txt['yshout_show'] = 'Show';
$txt['yshout_admlinks'] = 'AdminLinks';
$txt['yshout_return'] = 'ReturnToShoutbox';
$txt['yshout_p_banned'] = 'You are banned from posting.';
$txt['yshout_banned'] = 'Banned';
$txt['yshout_shout_button'] = 'Shout!';
$txt['yshout_banlist_caption'] = 'Shout Box Bans (click to unban)';
$txt['yshout_ip_bans'] = 'IP Bans for ';
$txt['yshout_username_bans'] = 'Username Bans for ';
$txt['yshout_ban_type_error'] = 'use /banuser or /banip!';
$txt['yshout_ban_mode_error'] = 'Must have mode argument.';
$txt['yshout_imp_slash_error'] = 'Prefix shout with "/" (slash character)! See "/help impersonate" for details.';
$txt['yshout_imp_uname_error'] = 'No username given!';
$txt['yshout_imp_max4_error'] = 'Maximum 4 arguments!';
$txt['yshout_cmd_reference'] = 'Command Reference';
$txt['yshout_cmdlist'] = array( '/help'    => ' [command]: Help on a command, or all if no command is specified.',
'/return' =>    ': Go back to the Shout Box.',
'/pi' =>    ' [digits]: What is the value of pi to the nth digit?',
'/me' =>    ' &lt;message&gt;: Emotes the message (e.g. <font color="red"> * Nathaniel likes dogs</font>)');
$txt['yshout_cmdlistadmin'] = array('/clear' =>   ': Completely empty the Shout Box.',
'/help'    => ' [command]: Help on a command, or all if no command is specified.',
'/return' =>    ': Go back to the Shout Box.',
'/banlist'   => ': List all bans currently in place. Unban the users by clicking on their names.',
'/banuser'   => ' &lt;mode&gt; &lt;username&gt;: Ban a user by name. You should use the user\'s real username, otherwise the ban can be evaded. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/banip' =>   ' &lt;mode&gt; &lt;IP&gt;: Ban a user by IP. Mode can be "u" to unban, "rp" for read and post bans, or "p" for a post ban.',
'/impersonate'=>' &lt;user&gt; [userlevel] [ip] [userid] /[shout text]: Impersonate a user. Shout text must be prefixed by a "/" or else it will fail.<blockquote>
&lt;user&gt;: Username to use<br />
[userlevel]: User Level to use. 0=normal, 1=mod, 2=admin<br />
[ip]: IP address to use, as 1.2.3.4<br />
[userid]: User ID from forum, to fix profile link</blockquote>');

// ---- End modification - nneonneo's Shoutbox ----

and things should work.

@contest25: A template parse error occurs when the code inserted isn't placed correctly and prevents PHP from reading the code correctly. Have you tried looking for the pieces of code specified, to place the shoutbox just underneath?
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

contest25

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



nneonneo

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.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

anD

#739
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.

Advertisement: