I would add new input on the "my accout" page, in K2 ofc. I added new column in mysql named "fb" with settings like in "url".
Next I added code in the profile.php like this:
And it works, I checkec and link which I pasted in this field shows in datebase.
Now, how can I show that link in another places? I tried on the user's page. But this is not working.
For now I want in order to make it works, but later I'll have to add something like:but I have to define somewhere value 'userFB' right?
In general, like you for sure noticed, I want to give authors possibility to paste their facebook page, which will appear under his name on the article page, or in other places.
I hope you can help me, I'm stuck :D
Best.
Next I added code in the profile.php like this:
<input type="text" size="50" value="<?php echo $this->K2User->fb; ?>" name="fb" id="fb"/>And it works, I checkec and link which I pasted in this field shows in datebase.
Now, how can I show that link in another places? I tried on the user's page. But this is not working.
<span class="userFB">
<a href="<?php echo $this->user->profile->fb; ?>" target="_blank" rel="me">FACEBOOK</a>
</span>For now I want in order to make it works, but later I'll have to add something like:
<?php if ($this->params->get('userFB') && isset($this->user->profile->fb) && $this->user->profile->fb): ?>In general, like you for sure noticed, I want to give authors possibility to paste their facebook page, which will appear under his name on the article page, or in other places.
I hope you can help me, I'm stuck :D
Best.
Edited 11 years 9 months ago by Mikołaj Baczyński