How to add Social Network

Post Reply
User avatar
LRAM
Master Bludit
Posts: 199
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Has thanked: 22 times
Been thanked: 2 times
Contact:

Hi
I use all the link available on bludit renaming with the right icone when needed
but I need more
How can I add what I need ?
thanks
Attachments
Social Network Bludit.png
Social Network Bludit.png (37.41 KiB) Viewed 3067 times
https://sucrepop.com
Candies for the ears
Jacob
Ssr. Bludit
Posts: 22
Joined: Sat Apr 25, 2020 10:09 am

Can you explain what do you want to do?
Add additional social network which is not exists in the list?
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

You can do it with the following steps.

1) site.class.php

Modify in the file site.class.php in the directory /bl-kernel the public $dbFields array (line 4) adding the new network:

Code: Select all

		'network'=>			'',
Add the following (around line 200):

Code: Select all

	public function network()
	{
		return $this->getField('network');
	}
2) theme.class.php

Modify in the file theme.class.php in the directory /bl-kernel/helpers the $socialNetworks array (line 8) adding the new network:

Code: Select all

		$socialNetworks = array(
			'github'=>'Github',
			'gitlab'=>'GitLab',
			'twitter'=>'Twitter',
			'facebook'=>'Facebook',
			'instagram'=>'Instagram',
			'codepen'=>'Codepen',
			'linkedin'=>'Linkedin',
			'mastodon'=>'Mastodon',
			'vk'=>'VK',
		        'network'=>'Network'
		);
3) settings.php

Modify the file settings.php in the directory /bl-kernel/admin/views adding to the section Social Network tab (line 339) the following with the name of the new network:

Code: Select all

		echo Bootstrap::formInputText(array(
			'name'=>'network',
			'label'=>'Network',
			'value'=>$site->network(),
			'class'=>'',
			'placeholder'=>'',
			'tip'=>''
		));
4) Modify the theme
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
LRAM
Master Bludit
Posts: 199
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Has thanked: 22 times
Been thanked: 2 times
Contact:

Thanks Edi
Yes I need to add other social networks dedicated to musicians

I will try the recommended modification.
But it will be lost with the next update I guess
https://sucrepop.com
Candies for the ears
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

I don't know if the following plugin suits your needs:

https://plugins.bludit.com/plugin/social-media-suite
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
lightmat
Sr. Bludit
Posts: 46
Joined: Fri Feb 21, 2020 10:53 pm

Edi wrote: Tue Jun 23, 2020 12:03 pm I don't know if the following plugin suits your needs:

https://plugins.bludit.com/plugin/social-media-suite
How do you get that Edi, i can't get to it?
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Seems that it is no longer available...
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
lightmat
Sr. Bludit
Posts: 46
Joined: Fri Feb 21, 2020 10:53 pm

No, it doesn't seem that way. That's also what I came up with.
Post Reply