collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 424
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: Shoutbox Icon Rearrangement  (Read 10292 times)

0 Members and 1 Guest are viewing this topic.

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Shoutbox Icon Rearrangement
« on: February 05, 2015, 06:59:26 PM »
hello everyone :)

I was wondering if someone could tell me the code replacements to move the refresh icon, smiley / bbc options to below the shoutbox rather than at the top.

Thank you in advance!

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Shoutbox Icon Rearrangement
« Reply #1 on: February 05, 2015, 08:03:57 PM »
The file you're looking for is ./Themes/default/PortalShoutbox.template.php

Around here:

Code: [Select]
<div id="shoutbox_load_', $shoutbox['id'], '" style="float: right; display: none;"><img src="', $settings['sp_images_url'], '/loading.gif" alt="" /></div>
<a href="', $scripturl, '?action=portal;sa=shoutbox;shoutbox_id=', $shoutbox['id'], '" onclick="sp_refresh_shout(', $shoutbox['id'], ', last_refresh_', $shoutbox['id'], '); return false;">', sp_embed_image('refresh'), '</a> <a href="', $scripturl, '?action=portal;sa=shoutbox;shoutbox_id=', $shoutbox['id'], '">', sp_embed_image('history'), '</a>';

You can try just moving this portion around and see what result you get.

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: Shoutbox Icon Rearrangement
« Reply #2 on: February 06, 2015, 08:02:17 AM »
I maybe moved the above to inside another part of php but that seemed to cause an error page for me.. :(

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Shoutbox Icon Rearrangement
« Reply #3 on: February 06, 2015, 08:37:04 AM »
Be careful not to screw up <a> and <div>, that's very much likely the cause of your error :P
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: Shoutbox Icon Rearrangement
« Reply #4 on: February 06, 2015, 09:46:13 AM »
I can't seem to shift it any where without it throwing out errors at me :(

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Shoutbox Icon Rearrangement
« Reply #5 on: February 06, 2015, 10:19:37 AM »
Can you show me how you shifted it?

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: Shoutbox Icon Rearrangement
« Reply #6 on: February 07, 2015, 07:31:52 AM »
Simply moving the code you mentioned above to near where the input button is mentioned :x

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Shoutbox Icon Rearrangement
« Reply #7 on: February 07, 2015, 07:48:47 AM »
That's ok mate, but "how" is the key :P
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: Shoutbox Icon Rearrangement
« Reply #8 on: February 08, 2015, 05:04:36 AM »
Hey,

I seeked assistance moving the suggested code, so it wouldn't be a nuisance for causing errors, but with the changed code, the icons haven't budged :(

 
Code: [Select]
<?php

/**
 * @package SimplePortal
 *
 * @author SimplePortal Team
 * @copyright 2014 SimplePortal Team
 * @license BSD 3-clause
 *
 * @version 2.3.6
 */

function template_shoutbox_all()
{
global $context;

if ($context['SPortal']['core_compat'])
template_shoutbox_all_core();
else
template_shoutbox_all_curve();
}

function 
template_shoutbox_all_core()
{
global $context$txt;

echo '
<div class="tborder">
<div class="shoutbox_container">
<div class="catbg shoutbox_padding">
'
$context['SPortal']['shoutbox']['name'], '
</div>
<div class="shoutbox_page_index windowbg smalltext">
'
$txt['pages'], ': '$context['page_index'], '
</div>
<div class="windowbg shoutbox_body">
<ul class="shoutbox_list_all" id="shouts">'
;

if (!empty($context['SPortal']['shouts_history']))
foreach ($context['SPortal']['shouts_history'] as $shout)
echo '
'
, !$shout['is_me'] ? '<li class="smalltext"><strong>' $shout['author']['link'] . ':</strong></li>' '''
<li class="smalltext">'
str_replace('ignored_shout''history_ignored_shout'$shout['text']), '</li>
<li class="smalltext shoutbox_time">'
$shout['delete_link'], $shout['time'], '</li>';
else
echo '
<li class="smalltext">'
$txt['sp_shoutbox_no_shout'], '</li>';

echo '
</ul>
</div>
<div class="shoutbox_page_index windowbg smalltext">
'
$txt['pages'], ': '$context['page_index'], '
</div>
</div>
</div>'
;
}

function 
template_shoutbox_all_curve()
{
global $context$txt;

echo '
<div class="cat_bar">
<h3 class="catbg">
'
$context['SPortal']['shoutbox']['name'], '
</h3>
</div>
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="sp_content_padding">
<div class="shoutbox_page_index smalltext">
'
$txt['pages'], ': '$context['page_index'], '
</div>
<div class="shoutbox_body">
<ul class="shoutbox_list_all" id="shouts">'
;

if (!empty($context['SPortal']['shouts_history']))
foreach ($context['SPortal']['shouts_history'] as $shout)
echo '
'
, !$shout['is_me'] ? '<li class="smalltext"><strong>' $shout['author']['link'] . ':</strong></li>' '''
<li class="smalltext">'
str_replace('ignored_shout''history_ignored_shout'$shout['text']), '</li>
<li class="smalltext shoutbox_time">'
$shout['delete_link'], $shout['time'], '</li>';
else
echo '
<li class="smalltext">'
$txt['sp_shoutbox_no_shout'], '</li>';

echo '
</ul>
</div>
<div class="shoutbox_page_index smalltext">
'
$txt['pages'], ': '$context['page_index'], '
</div>
</div>
<span class="botslice"><span></span></span>
</div>'
;
}

function 
template_shoutbox_embed($shoutbox)
{
global $context$scripturl$settings$txt;

echo '
<form action="" method="post">
<div class="shoutbox_container">
<div class="shoutbox_info">
<div id="shoutbox_load_'
$shoutbox['id'], '" style="float: right; display: none;"><img src="'$settings['sp_images_url'], '/loading.gif" alt="" /></div>
<a href="'
$scripturl'?action=portal;sa=shoutbox;shoutbox_id='$shoutbox['id'], '" onclick="sp_refresh_shout('$shoutbox['id'], ', last_refresh_'$shoutbox['id'], '); return false;">'sp_embed_image('refresh'), '</a> <a href="'$scripturl'?action=portal;sa=shoutbox;shoutbox_id='$shoutbox['id'], '">'sp_embed_image('history'), '</a>';

if ($context['can_shout'])
echo ' <a href="#smiley" onclick="sp_collapse_object(\'sb_smiley_'$shoutbox['id'], '\', false); return false;">'sp_embed_image('smiley'), '</a> <a href="#style" onclick="sp_collapse_object(\'sb_style_'$shoutbox['id'], '\', false); return false;">'sp_embed_image('style'), '</a>';

echo '
</div>'
;

if ($context['can_shout'])
{
echo '
<div id="sp_object_sb_smiley_'
$shoutbox['id'], '" style="display: none;">';

foreach ($shoutbox['smileys']['normal'] as $smiley)
echo '
<a href="javascript:void(0);" onclick="replaceText(\' '
$smiley['code'], '\', document.getElementById(\'new_shout_'$shoutbox['id'], '\')); return false;"><img src="'$settings['smileys_url'], '/'$smiley['filename'], '" alt="'$smiley['description'], '" title="'$smiley['description'], '" /></a>';

if (!empty($shoutbox['smileys']['popup']))
echo '
<a onclick="sp_showMoreSmileys(\''
$shoutbox['id'], '\', \''$txt['more_smileys_title'], '\', \''$txt['more_smileys_pick'], '\', \''$txt['more_smileys_close_window'], '\', \''$settings['theme_url'], '\', \''$settings['smileys_url'], '\'); return false;" href="javascript:void(0);">['$txt['more_smileys'], ']</a>';

echo '
</div>
<div id="sp_object_sb_style_'
$shoutbox['id'], '" style="display: none;">';

foreach ($shoutbox['bbc'] as $image => $tag)
{
if (!in_array($tag['code'], $shoutbox['allowed_bbc']))
continue;

if (!isset($tag['after']))
echo '<a href="javascript:void(0);" onclick="replaceText(\''$tag['before'], '\', document.getElementById(\'new_shout_'$shoutbox['id'], '\')); return false;">';
else
echo '<a href="javascript:void(0);" onclick="surroundText(\''$tag['before'], '\', \''$tag['after'], '\', document.getElementById(\'new_shout_'$shoutbox['id'], '\')); return false;">';

echo '<img onmouseover="style_highlight(this, true);" onmouseout="if (window.style_highlight) style_highlight(this, false);" src="'$settings['images_url'], '/bbc/'$image'.gif" align="bottom" width="23" height="22" alt="'$tag['description'], '" title="'$tag['description'], '" style="background-image: url('$settings['images_url'], '/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>';
}

if (in_array('color'$shoutbox['allowed_bbc']))
echo '
<span id="sp_shoutbox_color_'
$shoutbox['id'], '">
<select id="sp_shoutbox_color_select_'
$shoutbox['id'], '" onchange="if (this.value) surroundText(\'[color=\'+this.value+\']\', \'[/color]\', document.getElementById(\'new_shout_'$shoutbox['id'], '\')); this.style.backgroundColor = this.options[this.selectedIndex].style.backgroundColor; return false;" style="height: 20px; line-height: 20px; position: absolute;">
<option value="">'
$txt['change_color'], '</option>
<option style="background-color: black;" value="black" title="'
$txt['black'], '"></option>
<option style="background-color: red;" value="red" title="'
$txt['red'], '"></option>
<option style="background-color: yellow;" value="yellow" title="'
$txt['yellow'], '"></option>
<option style="background-color: pink;" value="pink" title="'
$txt['pink'], '"></option>
<option style="background-color: green;" value="green" title="'
$txt['green'], '"></option>
<option style="background-color: orange;" value="orange" title="'
$txt['orange'], '"></option>
<option style="background-color: purple;" value="purple" title="'
$txt['purple'], '"></option>
<option style="background-color: blue;" value="blue" title="'
$txt['blue'], '"></option>
<option style="background-color: beige;" value="beige" title="'
$txt['beige'], '"></option>
<option style="background-color: brown;" value="brown" title="'
$txt['brown'], '"></option>
<option style="background-color: teal;" value="teal" title="'
$txt['teal'], '"></option>
<option style="background-color: navy;" value="navy" title="'
$txt['navy'], '"></option>
<option style="background-color: maroon;" value="maroon" title="'
$txt['maroon'], '"></option>
<option style="background-color: limegreen;" value="limegreen" title="'
$txt['lime_green'], '"></option>
<option style="background-color: white;" value="white" title="'
$txt['white'], '"></option>
</select>
</span>'
;
echo '
</div>'
;
}

echo '
<div class="shoutbox_body">
<ul class="shoutbox_list_compact" id="shouts_'
$shoutbox['id'], '"', !empty($shoutbox['height']) ? ' style="height: ' $shoutbox['height'] . 'px;"' '''>';

if (!empty($shoutbox['warning']))
echo '
<li class="shoutbox_warning smalltext">'
$shoutbox['warning'], '</li>';

if (!empty($shoutbox['shouts']))
foreach ($shoutbox['shouts'] as $shout)
echo '
<li class="smalltext">'
, !$shout['is_me'] ? '<a href="javascript:void(0);" title="'.$txt['sp_shoutbox_pm_title'].'" onclick="document.getElementById(\'new_shout_'$shoutbox['id']. '\').value=\'@' $shout['author']['name'] . ': \'">@ </a><strong>' $shout['author']['link'] . ':</strong> ' '''<span style="word-wrap: break-word;overflow-y: auto;overflow-x: hidden;">' $shout['text'], '</span><br /><span class="shoutbox_delete">', (!empty($shout['edit_link_js']) ? $shout['edit_link_js'] : '&nbsp;'), (!empty($shout['delete_link_js']) ? $shout['delete_link_js'] : '&nbsp;'), '</span><span class="smalltext shoutbox_time">'$shout['time'], '</span></li>';
else
echo '
<li class="smalltext">'
$txt['sp_shoutbox_no_shout'], '</li>';

echo '
</ul>
</div>'
;

if ($context['can_shout'])
echo '
<div class="shoutbox_input smalltext">
<input type="text" name="new_shout" id="new_shout_'
$shoutbox['id'], '" class="shoutbox_input sp_float_center input_text"'$context['browser']['is_ie'] ? ' onkeypress="if (sp_catch_enter(event)) { sp_submit_shout(' $shoutbox['id'] . ', \'' $context['session_var'] . '\', \'' $context['session_id'] . '\'); return false; }"' ''' />
<input type="submit" name="submit_shout" value="'
$txt['sp_shoutbox_button'], '" class="sp_float_center button_submit" onclick="sp_submit_shout('$shoutbox['id'], ', \''$context['session_var'], '\', \''$context['session_id'], '\'); return false;" />
</div>'
;

echo '

</div>
<input type="hidden" name="shoutbox_id" value="'
$shoutbox['id'], '" />
<input type="hidden" name="'
$context['session_var'], '" value="'$context['session_id'], '" />
</form>
<script language="Javascript" type="text/javascript"><!-- // --><![CDATA[
var last_refresh_'
$shoutbox['id'], ' = 'time(), ';';

if ($shoutbox['reverse'])
echo '
var objDiv = document.getElementById("shouts_'
$shoutbox['id'], '");
objDiv.scrollTop = objDiv.scrollHeight;'


if (!empty($shoutbox['refresh']))
echo '
var interval_id_'
$shoutbox['id'], ' = setInterval( "sp_auto_refresh_'$shoutbox['id'], '()", '$shoutbox['refresh'], ' * 1000);
function sp_auto_refresh_'
$shoutbox['id'], '()
{
if (window.XMLHttpRequest)
{
sp_refresh_shout('
$shoutbox['id'], ', last_refresh_'$shoutbox['id'], ');
last_refresh_'
$shoutbox['id'], ' += '$shoutbox['refresh'], ';
}
else
clearInterval(interval_id_'
$shoutbox['id'], ');
}'
;

// Setup the data for the popup smileys.
if (!empty($shoutbox['smileys']['popup']))
{
echo '
if (sp_smileys == undefined)
var sp_smileys = ['
;
foreach ($shoutbox['smileys']['popup'] as $smiley)
{
echo '
["'
$smiley['code'], '","'$smiley['filename'], '","'$smiley['js_description'], '"]';
if (empty($smiley['last']))
echo ',';
}
echo ']';

echo '
if (sp_moreSmileysTemplate == undefined)
{
var sp_moreSmileysTemplate =  '
JavaScriptEscape('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>' 
$txt['more_smileys_title'] . '</title>
<link rel="stylesheet" type="text/css" href="' 
$settings['theme_url'] . '/css/index' $context['theme_variant'] . '.css?fin20" />
</head>
<body id="help_popup">
<div class="padding windowbg">
<div class="cat_bar">
<h3 class="catbg">
$txt['more_smileys_pick'] . '
</h3>
</div>
<div class="padding">
%smileyRows%
</div>
<div class="smalltext centertext">
<a href="javascript:window.close();">' 
$txt['more_smileys_close_window'] . '</a>
</div>
</div>
</body>
</html>'
), '
}'
;
}

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

function 
template_shoutbox_xml()
{
global $context$txt;

echo '<''?xml version="1.0" encoding="'$context['character_set'], '"?''>
<smf>
<shoutbox>'
$context['SPortal']['shoutbox']['id'], '</shoutbox>';

if ($context['SPortal']['updated'])
{
echo '
<updated>1</updated>
<error>'
, empty($context['SPortal']['shouts']) ? $txt['sp_shoutbox_no_shout'] : 0'</error>
<warning>'
, !empty($context['SPortal']['shoutbox']['warning']) ? htmlspecialchars($context['SPortal']['shoutbox']['warning']) : 0'</warning>
<reverse>'
, !empty($context['SPortal']['shoutbox']['reverse']) ? 0'</reverse>';

foreach ($context['SPortal']['shouts'] as $shout)
echo '
<shout>
<id>'
$shout['id'], '</id>
<author>'
htmlspecialchars($shout['author']['link']), '</author>
<author_name>'
htmlspecialchars($shout['author']['name']), '</author_name>
<author_name_txt>'
$txt['sp_shoutbox_pm_title'] , '</author_name_txt>
<time>'
htmlspecialchars($shout['time']), '</time>
<timeclean>'
htmlspecialchars(strip_tags($shout['time'])), '</timeclean>
<delete>'
, !empty($shout['delete_link_js']) ? htmlspecialchars($shout['delete_link_js']) : 0'</delete>
<content>'
htmlspecialchars($shout['text']), '</content>
<is_me>'
$shout['is_me'] ? 0'</is_me>
</shout>'
;
}
else
echo '
<updated>0</updated>'
;

echo '
</smf>'
;
}

?>


Much appreciated if I could get the icons below the input bar for text
(even just the smileys/bbc code part)


Thank you