Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
1 + 5 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: Profile field display somewhere else
by lelkins on 2008/12/2 14:52:24

OK, so I just finished up trying to improve this bit of my site, and I can't figure it out.
I want to have this code in an external file rather than coded straight into the block to make it easier to manage, but can't figure out how to do it.
So I have just a few questions which I hope someone could answer for me please.
1. Can I use the php include function in a block, if so, how do I code it?
2. To put this script into an external file, do I need to ammend it at all?
3. What file format would the external file be, I assumed php but I don't want to assume anything at the moment.

I hope someone can help me with this.

Thanks
Re: Profile field display somewhere else
by alfred on 2008/12/1 18:28:31

tsts
Re: Profile field display somewhere else
by lelkins on 2008/12/1 17:35:59

Quote:

by dhsoft on 2008/12/1 17:28:44

in a Block


global $xoopsUser;
$myField = '';
if (is_object( $xoopsUser )) {
$myField = $xoopsUser->getVar('user_from');
}
echo $myField;


WOOHOO!!! Now, one last question for you dhsoft...where do you live so I can give you a big fat sloppy man love kiss?

Cheers.
Re: Profile field display somewhere else
by alfred on 2008/12/1 17:28:44

in a Block

le="color: #000000"><?php global $xoopsUser; $myField = ''; if (is_object( $xoopsUser )) { $myField = $xoopsUser->getVar('user_from'); } echo $myField;
Re: Profile field display somewhere else
by lelkins on 2008/12/1 16:55:08

Thanks for the reply, but when I put it in a PHP Script custom block it shows the following error.

Parse error: syntax error, unexpected '<' in *********\xoopsblock.php(147) : eval()'d code on line 1

When I put it in an HTML custom block, it just shows the script.

What am I doing wrong?

Who's Online

181 user(s) are online (138 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits