add discord for social media

This commit is contained in:
Diego Najar 2021-03-19 16:01:38 -03:00
parent adb84d792d
commit 93077d2647
5 changed files with 41 additions and 1 deletions

View file

@ -406,6 +406,13 @@
'data' => array('save' => 'true')
));
echo Bootstrap::formInputText(array(
'name' => 'discord',
'label' => 'Discord',
'value' => $user->discord(),
'data' => array('save' => 'true')
));
echo Bootstrap::formInputText(array(
'name' => 'codepen',
'label' => 'CodePen',

View file

@ -409,6 +409,13 @@
<?php
echo Bootstrap::formTitle(array('title' => $L->g('Social Networks')));
echo Bootstrap::formInputText(array(
'name' => 'youtube',
'label' => 'YouTube',
'value' => $site->youtube(),
'data' => array('save' => 'true')
));
echo Bootstrap::formInputText(array(
'name' => 'twitter',
'label' => 'Twitter',
@ -423,6 +430,13 @@
'data' => array('save' => 'true')
));
echo Bootstrap::formInputText(array(
'name' => 'discord',
'label' => 'Discord',
'value' => $site->discord(),
'data' => array('save' => 'true')
));
echo Bootstrap::formInputText(array(
'name' => 'codepen',
'label' => 'CodePen',

View file

@ -34,6 +34,8 @@ class Site extends dbJSON {
'mastodon'=> '',
'dribbble'=> '',
'vk'=> '',
'discord'=> '',
'youtube'=> '',
'orderBy'=> 'date', // date or position
'extremeFriendly'=> true,
'autosaveInterval'=> 2, // minutes
@ -159,6 +161,16 @@ class Site extends dbJSON {
return $this->getField('facebook');
}
public function discord()
{
return $this->getField('discord');
}
public function youtube()
{
return $this->getField('youtube');
}
public function codepen()
{
return $this->getField('codepen');

View file

@ -120,6 +120,11 @@ class User {
return $this->getValue('facebook');
}
public function discord()
{
return $this->getValue('discord');
}
public function codepen()
{
return $this->getValue('codepen');
@ -179,6 +184,7 @@ class User {
$tmp['youtube'] = $this->youtube();
$tmp['twitter'] = $this->twitter();
$tmp['facebook'] = $this->facebook();
$tmp['discord'] = $this->discord();
$tmp['codepen'] = $this->codepen();
$tmp['instagram'] = $this->instagram();
$tmp['github'] = $this->github();

View file

@ -24,7 +24,8 @@ class Users extends dbJSON {
'linkedin'=>'',
'mastodon'=>'',
'vk'=>'',
'youtube'=>''
'youtube'=>'',
'discord'=>''
);
function __construct()