• Welcome to Simple Machines Community Forum. Please login or sign up.
January 20, 2022, 03:10:46 PM

News:

Wondering if this will always be free?  See why free is better.


nneonneo's Shoutbox

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

Previous topic - Next topic

[unplugged]

« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



psynx

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?

iLLWiZ

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

ccbtimewiz

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.

nneonneo

@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);
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!

psynx

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?

nneonneo

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()".
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!

drinkingbuddies_ca

July 25, 2008, 02:12:34 PM #3087 Last Edit: July 25, 2008, 02:15:40 PM by drinkingbuddies_ca
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 "

nneonneo

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.
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!

drinkingbuddies_ca

permission added, sorry about that

drinkingbuddies_ca

hmm... i guess all is well now??? maybe it was just the <head> issue. dunno, thanks a ton though!!

Nequil

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?

nneonneo

@Nequil: yshout.php (sorry for not being clear)



Changing the timestamp
(previously posted by Youngie360G here; 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).']';
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!

drinkingbuddies_ca

Here's a question, how about a collapsible shoutbox?

Nequil

July 25, 2008, 03:35:40 PM #3094 Last Edit: July 25, 2008, 04:42:28 PM by Nequil
Thanks nneonneo all works :)

nneonneo

@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>&nbsp;';
// 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...
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!

Nequil

July 25, 2008, 04:42:00 PM #3096 Last Edit: July 25, 2008, 04:45:43 PM by Nequil
Is there a possibility to a divide the history logs into pages?

nneonneo

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....
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!

Adish - (F.L.A.M.E.R)

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.

nneonneo

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.
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!

Advertisement: