News:

SMF 2.1.4 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

Mdk001

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

frantic

#5361
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? 

frantic

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
   


Patriot89

Is there a way to get a "Who's Online" for the Shoutbox?

frantic

scratch that i fixed my own problem  :).  It was a case of me not knowing how to read the directions properly.

zach21uk

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

kriss666

#5366
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
hxxp:rpgmakerxp-factory.net/forum/index.php [nonactive]

LLStarks

Hi. How do I put the shoutbox at the bottom of the page?

franklinrony

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
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

kriss666

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

zijO


With advanced shoutbox, how do I change that the sound is always on by default.

Mdk001

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 [nofollow]

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?

ultimate101

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 '&nbsp;&nbsp;[<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">&nbsp;</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 '&nbsp;&#38;#0187;&nbsp;';
}

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>&nbsp;</td>';

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

?>

ultimate101

Can someone please add it to my index.template!

CiQ

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?

glxpa

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!

DeviDarkL

Hi,

How can I make my shoutbox look like the image that is in the modifications?

(this one)

najaII

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

adamcanada

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?

adamcanada

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

Advertisement: