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



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

Re: Saying Hello to Xoops signed in user
by ladysham on 2006/9/8 18:33:52

Great little hack. Thanks!
Re: Saying Hello to Xoops signed in user
by wcrwcr on 2006/9/8 17:35:26

Hi

@canbula & peekay

Thank you guys for your time

I?m using the peekay approach and everything is running smooth.

Thanks,
Wilson
Re: Saying Hello to Xoops signed in user
by Peekay on 2006/9/8 11:41:38

Or you could just put this in a PHP block...
le="color: #000000"><?php global $xoopsUser; if ($xoopsUser) { //User is logged in, display welcome message $uname = $xoopsUser->getVar('uname'); echo("Welcome, $uname"); } else { return false; }
Re: Saying Hello to Xoops signed in user
by canbula on 2006/9/8 10:40:09

you didn't understand me..look at this

<?php include("mainfile.php"); $yol = XOOPS_DB_HOST; $kullanici_adi = XOOPS_DB_USER; $kullanici_sifre = XOOPS_DB_PASS; $veritabani_adi = XOOPS_DB_NAME; $veritabani_oneki = XOOPS_DB_PREFIX; $veri_yolu = mysql_connect($yol, $kullanici_adi, $kullanici_sifre); if ( ! $veri_yolu ) die ("An error occured!"); mysql_select_db($veritabani_adi , $veri_yolu) or die ("An error occured!" . mysql_error() ); $sonuc = mysql_query("SELECT * FROM ".$veritabani_oneki."_users WHERE uid=".$_SESSION['xoopsUserId']." ORDER BY uname ASC limit 1",$veri_yolu); while($satir = mysql_fetch_array($sonuc)) { echo $satir['uname']; } mysql_close(); ?>


put this code in an external php file located in your XOOPS root directory..and call this file after login..you will see your user name
Re: Saying Hello to Xoops signed in user
by wcrwcr on 2006/9/8 9:25:18

I?ve tried

le="color: #000000"><?php mysql_query=SELECT * FROM xoops_users WHERE uid=".$_SESSION['xoopsUserId']; print "xoopsUserId";


But the block doesn?t shows up

Who's Online

229 user(s) are online (164 user(s) are browsing Support Forums)


Members: 0


Guests: 229


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