Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Custom new message info in theme

Asked Modified Viewed 1,633 times
T
t3s7
T
t3s7 10
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
asked
Junior Member

Helo. Its me again.
This time i want to add to my theme new pm message beside link to messages into my theme.
I like to do it like is in user_info_panel but doesnt work.
When i add this to my theme.php i have error:

Notice: Undefined variable: userdata

Ok. But what i must do?

I have:
$msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");

and
if ($msg_count) { echo "<a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count).($msg_count == 1)."</a>\n"; }
0 replies

2 posts

T
t3s7
T
t3s7 10
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
answered
Junior Member

Ahhh. Simple and i dont do this :D Thanks Matonor.
0 replies
M
Matonor
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
answered
Veteran Member

add $userdata to the gloabl statement of the function, eg.:
global $settings, $locale;

=>
global $settings, $locale, $userdata;
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

M
M
Impossible things are there to be made possible
  • Veteran Member, joined since
  • Contributed 1,022 posts on the community forums.
  • Started 3 threads in the forums
T
T
t3s7 10
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet