Skip to Content Skip to Menu

Display CB field in content.

8 years 7 months ago #277949 by Emily Button
Display CB field in content. was created by Emily Button
Hello,

I realise this topic has been covered numerous times and there will be lots of you out there who will tut and say "Not again!".

But please bear with me on this.

I am simply trying to put the firstname of the CB user into an article.
I have spent days going through forums, tutorials and 3rd party sites and still can't get this to work. I'm going mad with it!

I have the following:
Joomla Version 3.4.8.
CB version 2.13
Direct PHP running.

The code I have pieced together is:

<?php Global $_CB_framework;
$myid = $_CB_framework->myid():
$user =& cbuser::getuserdatainstance( $myid ( ;
?>

<?php $firstname = $cbUser->getField( 'firstname<?php ' ); ?>

You are logged in as <?php echo $firstname;?>


If anyone can please help me with this I would be so grateful, but please bear in mind that I am BLIND and use a screen reader to use a computer. This means that I have to scroll through lines of text a character at a time in order to understand what is on the screen. Yep, it takes ages to do the most simple things but I'm determined to crack this.

Many thanks in advance for your help and understanding.

Cheers,
Emily.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum