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

Recent

Welcome to TinyPortal. Please login or sign up.

May 22, 2024, 02:51:46 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,197
  • Total Topics: 21,221
  • Online today: 154
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 146
  • Total: 146

USER CP - An alternative to Profile Screen

Started by akulion, October 18, 2006, 07:57:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ScoobyDan

Quote from: nokonium on October 28, 2006, 09:05:37 PM
If you use the custom action version, modified by J A C you will see member is changed to user, as long as you declare the missing global you will have no errors with that version.

I changed the line
global $context, $scripturl, $modSettings, $ID_MEMBER, $txt;
to
global $context, $scripturl, $modSettings, $ID_MEMBER, $txt, $user;
but I'm still getting errors.

Did I misinterpret what you meant by "declare the missing global"?

Nokonium


ScoobyDan

nokonium,

The error I'm getting is:
8: Undefined variable: user_info
File: /home/********/public_html/smf/Themes/default/languages/Profile.english.php (eval?)
Line: 61

I changed the line in 'usercp.template.php', if that helps.

Thanks for your support!

Nokonium

#133
A couple of follow up questions

What version of SMF?

What version of Tiny Portal?

Do you have usercp.php in Sources?

Do you have usercp.template.php in the default theme?

Have you added the code modification to the index.template of the theme that you are using?


// Edit Profile... [profile]

And find this under it


<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>

Replace that line with

<a href="', $scripturl, '?action=usercp">User CP</a>


OR

//Nokonium adapted
<a href="', $scripturl, '?action=usercp">' , $txt['cp_user'] , '</a>


AND

In  Index.english.php file in your languages directory.

Find

?>

Add before

// User Control Panel
$txt['cp_user'] = 'User CP';


ScoobyDan

nokonium,

Sorry, I should have added these details earlier ::)

SMF 1.1 RC3
TinyPortal v0.9.6beta

usercp.php in Sources CHECK
usercp.template.php in Themes/default CHECK
index.template.php modified as described CHECK

The Profile Control Panel works as expected in every way, but it still generates this one error.

Thanks for your help..

Daniel

Nokonium

I think I know what the problem is

QuoteI changed the line
global $context, $scripturl, $modSettings, $ID_MEMBER, $txt;
to
global $context, $scripturl, $modSettings, $ID_MEMBER, $txt, $user;
but I'm still getting errors.

Replace

$user

with

$user_info


ScoobyDan

nokonium,

Where is the smiley for smacking yourself on the forehead - one of those d'oh moments  ::)

It's obvious when you look at the error message ;D Maybe PHP isn't as hard as I thought it was! ;)

In case you hadn't realised - that sort it! ;D

Thanks again for your help

Daniel

Assistance

Quote from: ScoobyDan on November 01, 2006, 09:43:09 PM
Where is the smiley for smacking yourself on the forehead - one of those d'oh moments  ::)



Nokonium

It took me a while to realise that you had only added part of it.

We got there though  ;D