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: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 559
  • Total: 559

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.

mfKG

#30
from 1 acces to the "User CP" i got 2 Sites of Errors ;(

".../index.php?action=usercp
8: Undefined variable: context
Datei: /home/www/web434/html/smf/Themes/default/usercp.template.php (eval?)
Zeile: 97"

and this on different (most) lines (92,76, and so on)

who can help?
(i also tried with a the "CostumActionMod",...the same)

JPDeni

At the beginning of the file add the line

global $context;

mfKG

ok, now the same Errors, but not context, now member:
(not added @ the beginning of the file,  the "function" starts (global $context, $db_prefix, $spcri......... ;))

"8: Undefined index: member
Datei: /home/www/web434/html/smf/Themes/default/usercp.template.php (eval?)
Zeile: many"

(and this:
8: Use of undefined constant usercp - assumed 'usercp'
Datei: /home/www/web434/html/smf/Themes/default/Arcade.template.php (eval?)
Zeile: 637)

knat

THANK YOU M8  :)  :)  :)

Thanks to you i now have a cool usercp on my site.. for that i thank you so much.. if i could give you karma i would  ;D

I moderated your usercp to fit what i wanted but i could not have done it without your code.. and that cool icon site  :D

Anyway here is a screenshot of what i have.. i know its in danish but it's still cool looking  8)


akulion

ur welcome knat :D

----------

@ mfkg:

usercp needs to be defined somewhere....

its not a big error, just a minor warning...

still - hopefully someone more experienced with PHP could help out soon :up:

JPDeni

mfkg, I would go back to using the php article that aku first posted, which is what I thought you were using in the first place, hence my suggestion to put the "global" line as the first line of the code. :)

Once you have aku's code working with no errors, then try the other stuff.

It looks like the $context array wasn't fully defined before the usercp file was executed, although I don't know why that would be. I also don't know why the Arcade.template.php file would have anything to do with this at all.

akulion

even after using the global line im gettin 1 error message :

Quote
8: Undefined index: member
File: /home/.cash/akulion/path-to-peace.net/forum/Themes/default/TPortal.template.php (eval?)
Line: 90

any ideas how to fix this one?

JPDeni

I hadn't looked at the code closely before. You don't need those $context['member']['id] variables at all. If no user is specified, it automatically goes to the user's own profile info.

mfKG

@JPDeni
Much THX, u got it ;)
put the "global $context;" at the beginning didnt help, but inside the function.
Then i removed all "$context['member']['id]" in the usercp.template, and then,...nice, no more errors ;),...
works nice,....

@Aku: Great/nice work, like this UserCP, know i just need to translate it ;)

aglioeolio


amazing MOD akullion  :laugh:

thatÂÃ,´s really hot... thanks

This website is proudly hosted on Crocweb Cloud Website Hosting.