News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Tiny Portal v0.4beta

Started by TommiU, February 18, 2005, 02:23:47 PM

Previous topic - Next topic

TommiU

http://mods.simplemachines.org/index.php?mod=97

kertokaa tästä Tiny Portalista ja sen asentamisesta? Onko hyvä?

TommiU

ongelma ladattaessa pakettia:

"Pakettien hallinta - Asenna muokkaus
Asenna muokkaus Install Actions for archive TinyPortal_v011.4beta.tar.gz:
Asentamalla tämän paketin tapahtuu seuraavaa:  Tyyypi Toiminta Kuvaus
1. Pura Tiedosto ./Themes/default/images/divider.gif 
2. Pura Tiedosto ./Themes/default/images/TPdivider.gif 
3. Pura Tiedosto ./Themes/default/images/TParticle.gif 
4. Pura Tiedosto ./Themes/default/images/TPdivider2.gif 
5. Pura Tiedosto ./Themes/default/images/TPleft.gif 
6. Pura Tiedosto ./Themes/default/images/TPred.gif 
7. Pura Tiedosto ./Themes/default/images/TPgreen.gif 
8. Pura Tiedosto ./Themes/default/images/TPdelete.gif 
9. Pura Tiedosto ./Themes/default/images/TPmodify.gif 
10. Pura Tiedosto ./Themes/default/images/english/forum.gif 
11. Pura Tiedosto ./Themes/default/images/english/tpadmin.gif 
12. Pura Tiedosto ./Themes/default/TPortalBlocks.template.php 
13. Pura Tiedosto ./Themes/default/TPortal.template.php 
14. Pura Tiedosto ./Themes/default/TPortalAdmin.template.php 
15. Pura Tiedosto ./Themes/default/TPmodules.template.php 
16. Pura Tiedosto ./Sources/TPortal.php 
17. Pura Tiedosto ./Sources/TPortalAdmin.php 
18. Pura Tiedosto ./Sources/TPmodules.php 
19. Pura Tiedosto ./Themes/default/languages/TPortal.english.php 
20. Pura Tiedosto ./Themes/default/languages/TPmodules.english.php 
21. Pura Tiedosto ./Themes/default/languages/TPortalAdmin.english.php 
22. Pura HakemistoPuu ./AplosRTE 
23. Toimeenpane Muokkaus index.php Onnistui
24. Toimeenpane Muokkaus ./Sources/Load.php Epäonnistui
25. Toimeenpane Muokkaus ./Themes/default/index.template.php Epäonnistui
26. Toimeenpane koodi tp_install.php"


TommiU

minne tämä pitää laittaa:

<id>
TinyPortal
</id>

<version>
0.4b
</version>

<mod info>
TinyPortal v0.4beta
</mod info>

<author>
Bloc
</author>

<homepage>
http://www.bloczone.net
</homepage>

<edit file>
index.php
</edit file>

<search for>
require_once($sourcedir . '/Security.php');
</search for>
<add after>
       // TinyPortal include
       require_once($sourcedir . '/TPortal.php');
</add after>

<search for>
// Is the forum in maintenance mode? (doesn't apply to administrators.)
</search for>
<add before>
        // TinyPortal
        TPortal_init();

</add before>


<search for>
// Action and board are both empty... BoardIndex!
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}
</search for>
<replace>
                // Action and board are both empty... BoardIndex!
                if (empty($board) && empty($topic))
                {
                        require_once($sourcedir . '/TPortal.php');
                        return 'TPortal';
                }
</replace>

<search for>
'.xml' => array('News.php', 'ShowXmlFeed'),
</search for>
<add after>
                'tpadmin' => array('TPortalAdmin.php', 'TPortalAdmin'),
                'forum' => array('BoardIndex.php', 'BoardIndex'),
                'tpmod' => array('TPmodules.php', 'TPmodules'),
</add after>


<edit file>
$sourcedir/Load.php
</edit file>

<search for>
// Start the linktree off empty..
$context['linktree'] = array();
</search for>
<replace>
        // Start the linktree off empty..not quite, have to insert forum
        $context['linktree'] = array(array('url' => $scripturl . '?action=forum', 'name' => 'Forum - Index'));
</replace>

<search for>
// Build up the linktree...
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '#' . $board_info['cat']['id'],
'name' => $board_info['cat']['name']
)),
</search for>
<replace>
                // Build up the linktree (adding TPortal forum index)
                $context['linktree'] = array_merge(
                        $context['linktree'],
                        array(array(
                                'url' => $scripturl . '?action=forum#' . $board_info['cat']['id'],
                                'name' => $board_info['cat']['name']
                        )),
</replace>

<edit file>
$themedir/index.template.php
</edit file>

<search for>
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
</search for>
<add after>
// TinyPortal
           require_once('SSI.php');
           loadtemplate('TPortalBlocks');
</add after>

<search for>
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
</search for>
<add after>

        <script language="JavaScript" type="text/javascript">
                var current_leftbar = ', empty($options['collapse_leftbar']) ? 'false' : 'true', ';

                function shrinkHeaderLeftbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        document.getElementById("upshrinkTempLeftbar").src = "', $scripturl, '?action=jsoption;var=collapse_leftbar;val=" + (mode ? 1 : 0) + ";sesc=', $context['session_id'], ';" + (new Date().getTime());';

        echo '
                        document.getElementById("upshrinkLeftbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("leftbarHeader").style.display = mode ? "none" : "";

                        current_leftbar = mode;
                }
         // --></script>
        <script language="JavaScript" type="text/javascript"><!--
                var current_rightbar = ', empty($options['collapse_rightbar']) ? 'false' : 'true', ';

                function shrinkHeaderRightbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        document.getElementById("upshrinkTempRightbar").src = "', $scripturl, '?action=jsoption;var=collapse_rightbar;val=" + (mode ? 1 : 0) + ";sesc=', $context['session_id'], ';" + (new Date().getTime());';

        echo '
                        document.getElementById("upshrinkRightbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("rightbarHeader").style.display = mode ? "none" : "";

                        current_rightbar = mode;
                }
       // --></script>
</add after>

<search for>
<body>';
</search for>
<add after>
// TinyPortal start
     if($context['TPortal']['fixed_width']!=0)
             echo '<table align="center" width="'.$context['TPortal']['fixed_width'].'" cellpadding="0" cellspacing="0" border="0"><tr><td>';

// TinyPortal end

</add after>


<search for>
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';
</search for>
<add after>

// TinyPortal
     if($context['TPortal']['showtop']==1)
     {
     // TinyPortal end
</add after>

<search for>
', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b>
</div>
</div>';
</search for>
<add after>

// TinyPortal
       }
//  end
</add after>



<search for>
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 2ex;" />';
</search for>
<replace>
             <a href="#" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="', $settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />
             <a href="#" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="', $settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempRightbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
</replace>

<search for>
// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
</search for>
<replace>
     // The main content should go here.  A table is used because IE 6 just can't handle a div.
        echo '<div id="bodyarea" style="padding: 10px 8px 0px 8px;">
        <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>';

         // TinyPortal integrated bars
          if($context['TPortal']['leftbar']){
              echo '<td width="' ,$context['TPortal']['leftbar_width'], '" style="padding: ' , isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' , 'px; background-color: #D4D4D4; padding-top: 4px;" valign="top">
                 <div id="leftbarHeader"', empty($options['collapse_leftbar']) ? '' : ' style="display: none;"', ' style="padding-top: 5px; width: ' ,$context['TPortal']['leftbar_width'], 'px;">';
                 TPortal_leftbar();
              echo '</div></td>';

          }

        echo '<td width="100%" align="left" valign="top" style="padding-top: 10px;" id="bodyarea">';
</replace>

<search for>
echo '</td>
</tr></table>';
</search for>
<replace>
   echo '</td>';

         // TinyPortal integrated bars
          if($context['TPortal']['rightbar']){
              echo '<td style="padding: ' , isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' , 'px; background-color: #D4D4D4; padding-top: 4px;" valign="top" align="right">
                 <div id="rightbarHeader"', empty($options['collapse_rightbar']) ? '' : ' style="display: none;"', ' style="width: ' ,$context['TPortal']['rightbar_width'], 'px; text-align: left; padding-top: 5px;">';
              TPortal_rightbar();
              echo '</div></td>';
          }

        echo '</tr></table></div';

</replace>

<search for>
<td valign="middle" align="center" style="white-space: nowrap;">
', theme_copyright(), '
</td>
</search for>
<replace>
                           <td valign="middle" align="center" style="white-space: nowrap;" class="smalltext">
                                        ', theme_copyright(), ' <br /><a href="http://www.bloczone.net" target="_blank">TinyPortal</a> v.0.4 beta by Bloc
                                </td>
</replace>

<search for>
echo '
</body>
</html>';
</search for>
<add before>
// TinyPortal
         echo '</div>';
     if($context['TPortal']['fixed_width']!=0)
             echo '</td></tr></table>';
// end

</add before>

<search for>
// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];
</search for>
<replace>
     // Show the [home] and [help] buttons.
        echo '
                                <a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
                                <a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/forum.gif" alt="Forum Index" style="margin: 2px 0;" border="0" />' : 'Forum Index'), '</a>', $context['menu_separator'], '
                                <a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];

</replace>

<search for>
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" style="margin: 2px 0;" border="0" />' : $txt[2]), '</a>', $context['menu_separator'];
</search for>
<replace>
      // Is the user allowed to administrate at all? ([admin])
        if ($context['allow_admin']){
                echo '
                                <a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" style="margin: 2px 0;" border="0" />' : $txt[2]), '</a>', $context['menu_separator'];
                echo '
                                <a href="', $scripturl, '?action=tpadmin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/tpadmin.gif" alt="Tiny Portal Admin" style="margin: 2px 0;" border="0" />' : 'TPadmin'), '</a>', $context['menu_separator'];

        }
</replace>


Owdy

Quote from: teresa on February 18, 2005, 02:31:32 PM
ongelma ladattaessa pakettia:


Se johtuu siitä että se on tehty 1.0 versiolle. Sun foorumi on vanha RC2 versio.  Compatible With:  1.0, 1.0.1

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Advertisement: