TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 19, 2024, 02:21:37 AM

Login with username, password and session length
Members
  • Total Members: 3,881
  • Latest: fords8
Stats
  • Total Posts: 195,096
  • Total Topics: 21,211
  • Online today: 71
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 46
  • Total: 46

[Block] Show Nneonneo's Shoutbox in a block

Started by shadowclash1, March 27, 2009, 06:23:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

shadowclash1

Hi there. I have TinyPortal on my SMF 1.1.8 Forums.

What I have done is added a upper panel block added (PHP CODE) - the code for nneonneo's shoutbox. I have checked all the boxes so that guests, ungrouped members, moderators and global moderators can see the box...However I have found out that only Admin's can see the box....Normal members can't? Can someone please help me on how to let normal members see this box please? All help will be appreciated thanks.
(If you need to know my theme is overview by dzinerstudio - and the only mods im using is TP and the shoutbox)

Below is the code I used to insert Nneonneo's shoutbox in an upper panel block


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

G6Cad

Thats not our thing to support, you have to ask the people that made that shoutbox to help you out.
We only support our own shoutbox thats included in TP

jpacs29

#2
For the sake of using TP :D try the codes below, i just finished tweaking this codes and it works fine during my testing. this code is designed on the right or left block of your tp themes. Hope this can help you....

on your theme 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 after this 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: 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: 70px;
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 the left or right of your TP 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



by the way try to check your group permission