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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 790
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 691
  • Total: 692
  • tino

SMF 1.1.4 Profile Error After Clean Install and Solution

Started by jwd98056, November 19, 2007, 12:13:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jwd98056

I started with a clean install of SMF 1.1.4 and then installed TP with the Package Manager.  I had the double Forum button issue which has already been addressed here and I fixed that  :up:.  Everthing was going well with setting up the SMF and TP until I tried to view a profile  :(.  It came back with an error that it couldn't redeclare a function in Profile.php and it referenced lines 2945 and 3002.  I went into Profile.php and found the following TP function declarations section, located at the end of the file, was repeated twice:

--------------------------------------------------------------------------------
// Tinyportal
function tpsummary($memID)
{
   global $txt, $user_profile, $db_prefix, $context, $db_prefix;

   loadtemplate('TPprofile');
   $context['page_title'] = $txt['tpsummary'];
   TP_profile_summary($memID);
}
function tparticles($memID)
{
   global $txt, $user_profile, $db_prefix, $context, $db_prefix;

   loadtemplate('TPprofile');
   $context['page_title'] = $txt['articlesprofile'];
   TP_profile_articles($memID);
}
function tpdownload($memID)
{
   global $txt, $user_profile, $db_prefix, $context, $db_prefix;

   loadtemplate('TPprofile');
   $context['page_title'] = $txt['downloadprofile'];
   TP_profile_download($memID);
}
function tpshoutbox($memID)
{
   global $txt, $user_profile, $db_prefix, $context, $db_prefix;

   loadtemplate('TPprofile');
   $context['page_title'] = $txt['shoutboxprofile'];
   TP_profile_shoutbox($memID);
}
function tpgallery($memID)
{
   global $txt, $user_profile, $db_prefix, $context, $db_prefix;

   loadtemplate('TPprofile');
   $context['page_title'] = $txt['galleryprofile'];
   TP_profile_gallery($memID);
}
function tplinks($memID)
{
   global $txt, $user_profile, $db_prefix, $context, $db_prefix;

   loadtemplate('TPprofile');
   $context['page_title'] = $txt['linksprofile'];
   TP_profile_links($memID);
}
--------------------------------------------------------------------------------

I deleted one of the sections and the profile functions seems to worked normally.  ;D

Jim (JD) in Renton, WA

jwd98056

I found similar problem in index.template.php in the default theme.  There were two sets of the sidebar shrink/expand buttons just to the right of the menu.  The following code was repeated:

-----------------------------------------------------------------------
// TinyPortal
    if($context['TPortal']['leftbar'])
             echo '<td style="padding-left: 1ex;"><a href="javascript:void(0);" 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;" /></td>';
         if($context['TPortal']['rightbar'])
             echo '<td style="padding-left: 1ex;"><a href="javascript:void(0);" 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;" /></td>';
// TinyPortal end
echo '
         </tr>
      </table>';

}
-----------------------------------------------------------------------

Deleting one set corrected the problem.

gautama


Zetan

Thanks jwd98056 for the feedback, pleased you fixed your problem  :)

G6Cad

jwd98056, please use the code tags when you post code in the posts, the posts does not generate the code correctly if you dont use codetags.

This website is proudly hosted on Crocweb Cloud Website Hosting.