Topic-icon SCLogin modifications

Active Subscriptions:

None
14 years 2 months ago #20335 by waqsha
SCLogin modifications was created by waqsha
Hello,

I am trying to add a link to the user's Kunena profile in the SCLogin module. I want that to appear after the user has logged in.
And lastly, center the profile pic in the module. Please see the attached image of what I am trying to achieve.

Any help will be appreciated. Thanks!

File Attachment:
The topic has been locked.
Active Subscriptions:

None
14 years 2 months ago #20359 by mtk
Replied by mtk on topic SCLogin modifications

waqsha wrote: Hello,

I am trying to add a link to the user's Kunena profile in the SCLogin module. I want that to appear after the user has logged in.
And lastly, center the profile pic in the module. Please see the attached image of what I am trying to achieve.

Any help will be appreciated. Thanks!

Hello,
for centering the picture, simple add:
#scprofile-pic{text-align:center}

for the Kunena Profile, simply take a look at the code of the Kunena Login Module.
you would have to load their classes:
// Kunena detection and version check
$minKunenaVersion = '1.7';
if (! class_exists ( 'Kunena' ) || version_compare(Kunena::version(), $minKunenaVersion, '<')) {
	echo JText::sprintf ( 'MOD_KUNENALOGIN_KUNENA_NOT_INSTALLED', $minKunenaVersion );
	return;
}
// Kunena online check
if (! Kunena::enabled ()) {
	echo JText::_ ( 'MOD_KUNENALOGIN_KUNENA_OFFLINE' );
	return;
}

require_once (dirname ( __FILE__ ) . DS . 'class.php');
and then, you'll be able to create a link:
<?php echo CKunenaLink::GetProfileLink ( $this->my->id, JText::_ ( 'MOD_KUNENALOGIN_MYPROFILE' ) ); ?>

let us know if that helped.

Mati
The topic has been locked.