Dobra, ogarnąłem trochę więcej.
Utworzyłem w bazie danych kolumnę fb, wzorując się na kolumnie url.
do profile.php dodałem
Kod PHP:
<input type="text" size="50" value="<?php echo $this->K2User->fb; ?>" name="fb" id="fb"/>
W user.php, analogicznie do wywoływania url, chciałem wywołać fb
Kod PHP:
//Tak wygląda wywołanie url
<?php if ($this->params->get('userURL') && isset($this->user->profile->url) && $this->user->profile->url): ?>
<span class="userURL">
<?php echo JText::_('K2_WEBSITE_URL'); ?>:
<a href="<?php echo $this->user->profile->url; ?>" target="_blank" rel="me"><?php echo $this->user->profile->url; ?></a>
</span>
<?php endif; ?>
/Zmodyfikowane, żeby wywoływało fb
<?php if ($this->params->get('userURL') && isset($this->user->profile->fb) && $this->user->profile->fb): ?>
<span class="userFB">
<a href="<?php echo $this->user->profile->fb; ?>" target="_blank" rel="me">FACEBOOK</a>
</span>
<?php endif; ?>
Jak widzicie pozamieniałem url na fb, ale nie wiem co zrobić z "get('userURL')" to jest jakaś wartość, gdzieś zapisana. Jak pobrać to fb z bazy danych?
Pozdrawiam