Does anyone know where the code is that draws the tp menu and sitemap? I have some thoughts/ideas, but want to see the code to find out if my mods are possible/easy first.
TPortalBlocks.template.php
Thanks Mrs G6 :)
oooh... lots of things to play with there!
What does this do ? a bit confused :P
Just the code for all the blocks that display, such as sitemap, etc. I have a plan for making a nice menu that runs off the menu manager, and is splittable like this on my site here: http://www.njrunner.org
Obviously I want to make that in such a way that others will be able to emulate it (ie as a block code)
hew jrw whle ur at it could u get the code for the shoutbox outta there too?
yes... what do you want to do with it if I may ask?
smuggle it to china :P
im going to try and use it seperately on a page by putting it there and calling the required globals
lol... ok.
// TPortal shoutbox
function TPortal_shoutbox()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// Show the shoutbox, takes settings from tpadmin
if(isset($context['TPortal']['querystring']))
$tp_where=$context['TPortal']['querystring'];
else
$tp_where='';
if(!isset($context['TPortal']['shoutbox']))
$context['TPortal']['shoutbox']='';
if($context['TPortal']['shoutbox_usescroll']=='1')
echo '
<div id="marqueecontainer" onmouseover="copyspeed=pausespeed" onmouseout="copyspeed=marqueespeed">
<div id="vmarquee" class="smalltext" style="text-align: left;position: absolute; width: 98%;">
'.$context['TPortal']['shoutbox'].'
</div>
</div>';
else
echo '<table style="table-layout: fixed;" cellpadding="0" height="'.$context['TPortal']['shoutbox_height'].'" cellspacing="0" border="0" width="100%"><tr><td class="smalltext"><div style="height: '.$context['TPortal']['shoutbox_height'].'px; overflow: auto; width: 100%;">', $context['TPortal']['shoutbox'], '
</div></td></tr></table>';
// show archives
if($context['TPortal']['show_shoutbox_archive']>0){
echo '<div style="text-align: center; margin-top: 5px; " class="smalltext"><a href="',$scripturl,'?action=tpmod;sa=shoutbox;shouts='.$context['TPortal']['show_shoutbox_archive'].'">',$txt['tp-showshouts'],' ',$context['TPortal']['show_shoutbox_archive'],'</a></div>';
}
echo '
<form class="smalltext" style="margin-top: 8px; text-align: center;" name="tp-shoutbox" action="'.$scripturl.'?action=tpmod&id=shout" method="post">';
if(($context['TPortal']['guest_shout']) || (!$context['TPortal']['guest_shout'] && !$context['user']['is_guest'])){
echo '<textarea class="smalltext" name="tp-shout" style="margin-top: 1ex; width: 80%; height: 50px;" wrap="auto"></textarea>';
echo '<input style="margin-top: 4px;" class="smalltext" type="submit" name="shout_send" value="'.$txt['shout!'].'">';
}
if($context['user']['is_guest'] && $context['TPortal']['guest_shout'])
echo '<br /><input style="margin-top: 4px;" size="20" class="smalltext" type="text" name="tp-shout-name" value="'.$txt['tp-guest'].'">';
else
echo '<input type="hidden" name="tp-shout-name" value="'.$context['user']['name'].'">
';
echo '<input name="tp-shout-url" type="hidden" value="'.$tp_where.'"><input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
}
thats the raw code direct from tportalblocks
aaahhh now to go sell..ahem i mean yes thanks ill be sure to include it in my function :D lol
lol
rofl