|
Joined: Sep 2006
Posts: 120
member
|
member
Joined: Sep 2006
Posts: 120 |
Well, I've beat my head against the wall too long!! The local store doesn't have the php/MYsql book that was recommended in to. So I'm here for some help. I'm playing with a Custom Island and I want to display some user info in it. Here's the island code: /* PHP CODE HERE */
/* BODY HERE */ $body = <<<EOF This is the Username = UUUU This is the Display name = DDDD This is the user number = NNNN EOF; How do I get the info and put it in where UUUU,DDDD and NNNN are? I know it's going to be php code but I can't find any sample in looking around here and at UBBDEV. I promise this is the last "DUMMIE" question I'll ask. I'll be ordering the book later. Thanks for reading
|
|
|
|
Joined: Jun 2006
Posts: 16,355 Likes: 125
|
Joined: Jun 2006
Posts: 16,355 Likes: 125 |
Well, in my pjirc chat addon at ubbdev I use this to pull the users public display name: $user.USER_DISPLAY_NAME
So i'd think ot pull the username it'd be: $user.USER_LOGIN_NAME And the User Number: $user.USER_ID
|
|
|
|
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
|
Pooh-Bah
Joined: Jul 2006
Posts: 2,143 |
Doesn't work. seems like $user is undefined there. hmm.
|
|
|
|
Joined: Jun 2006
Posts: 16,355 Likes: 125
|
Joined: Jun 2006
Posts: 16,355 Likes: 125 |
Ahh yeh, $user would have to be defined; Rick was doing it in a header island in a demo before, I wonder what he was using...
|
|
|
|
Joined: Sep 2006
Posts: 120
member
|
member
Joined: Sep 2006
Posts: 120 |
Well, that's good to hear because I thought it was me!!!
|
|
|
|
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
|
Pooh-Bah
Joined: Jul 2006
Posts: 2,143 |
No, it's not you. Doesn't answer your question though. I just have not figured out the answer yet.
|
|
|
|
Joined: Sep 2006
Posts: 120
member
|
member
Joined: Sep 2006
Posts: 120 |
Thanks David. I just can't believe that with all the samples I've looked at in two days and with my past life as a programmer, I can't get it to work. Of course, I didn't work in any of this modern stuff, just the old stuff, Fortran, assembly language, Cobol, and little C and C++ but none of it was Object Oriented stuff. I crack it one of these days. It just ordered the book by Luke willing and Laura Thompson - php and MySQL Web Development. Should be some heavy reading for me.
|
|
|
|
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
|
Pooh-Bah
Joined: Jul 2006
Posts: 2,143 |
Well, in this case you need to know smarty templates and how to pass variables to them for use. I've not spent any time at all with the smarty templates, hence my problem answering you.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
It appears that I'm not making the $user array available to any of the portal islands. That's probably something I'll need to address in the base code, and might be able to get in for 7.1.1.
|
|
|
|
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
|
Pooh-Bah
Joined: Jul 2006
Posts: 2,143 |
|
|
|
|
Joined: Sep 2006
Posts: 120
member
|
member
Joined: Sep 2006
Posts: 120 |
Wow, that's a relief. I'm not as dumb as I thought I was. You don't know how many different syntax's I tried!!! Can I get to them in a post?? If so , I can do a hidden post and operate from there until you get 7.1.1 modified. Now I can go eat dinner and not be thinking about it!!! Thanks Rick.
|
|
|
|
Joined: Jun 2006
Posts: 16,355 Likes: 125
|
Joined: Jun 2006
Posts: 16,355 Likes: 125 |
AHA, I thought I had it right lol... It's rick? :x
|
|
|
|
Joined: Sep 2006
Posts: 120
member
|
member
Joined: Sep 2006
Posts: 120 |
For now all I need is the Display name. I need to hook something to a Paypal order so I can identify the people when I get a payment that will only have their real name, etc.. .
|
|
|
|
Joined: Sep 2006
Posts: 120
member
|
member
Joined: Sep 2006
Posts: 120 |
I go the PHP and MySQL Web Dev book by Welling and Thomson todat. Wow!! Do I have some reading to do!! Glad to see it's a "Sams" book. They do good work. Look out now, I'll really be able to "BREAK" things!!!
Any idea if this $user fix will be included in 7.1.1 yet??
|
|
|
|
Joined: Jun 2006
Posts: 16,355 Likes: 125
|
Joined: Jun 2006
Posts: 16,355 Likes: 125 |
I have a ton of books on my Amazon list, i have numerous lists so if you get bored just search James Corthell and you'll see my reccommendations (well, what I want anyway).
|
|
|
|
Joined: Sep 2006
Posts: 120
member
|
member
Joined: Sep 2006
Posts: 120 |
I ordered from Amazon but they set the shipping date to May 1 to 15. Total ridiculous. I found a little local book store that had it and it's the Third Edition where Amazon's was the 2nd!!
|
|
|
|
Joined: Jun 2006
Posts: 16,355 Likes: 125
|
Joined: Jun 2006
Posts: 16,355 Likes: 125 |
The benefit of amazon is the user storefront where you can buy expensive books for very low prices (for instance, the $200 certification book I was looking for I got for a meezly $5+$3 shipping)...
The shipping date change however is kind of odd; kinda like my USB network adapters that got held in customs for 4 days on a "guarenteed 3 day shipping" from UPS :/...
|
|
|
1 members (Gizmo),
648
guests, and
53
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|