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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 141
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 124
  • Total: 124

menu and sitemap code

Started by Techdomain, September 24, 2006, 09:11:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Techdomain

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.

G6Cad


Techdomain


Techdomain

oooh... lots of things to play with there!

Vinspire

What does this do ? a bit confused :P

Techdomain

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)

akulion

hew jrw whle ur at it could u get the code for the shoutbox outta there too?

Techdomain

yes... what do you want to do with it if I may ask?

akulion

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

Techdomain

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

This website is proudly hosted on Crocweb Cloud Website Hosting.