Add tripadvisor to social icons

Permalink
Hi all
How can I add an extra icon to the social icons?

I tried to follow these instructions:
https://documentation.concrete5.org/tutorials/add-new-links-to-the-s...
... and added the array alternatively to application/config/ or application/config/generated_overrides as concrete.php but both did not work.

Any suggestions?

pixeljunkie
 
mesuva replied on at Permalink Reply
mesuva
There's a bug in the current release that means it doesn't handle the extra icons you define correctly. A fix has been merged into the master.

The commit in github has lots of cleanup stuff, but it's really only about 10 lines of code that is needed.

If you see here:
https://github.com/concrete5/concrete5/pull/7141/commits/e2a0fe1b0bd...
Line 32-43 is what you'd need to add in to concrete/src/Sharing/SocialNetwork/ServiceList.php to fix things.

Once that is in place, this should work in /application/config/concrete.php
<?php
return [
    'social' => [
        'additional_services' =>
            [
                [
                    'trip_advisor', // the handle
                    'Trip Advisor', // the title which will be shown in the dropdown
                    'tripadvisor' // the icon name copied before
                ]
            ]
    ]
];


Without that code fix, you get an error if you've already used the facebook icon.
pixeljunkie replied on at Permalink Reply
pixeljunkie
Tx for getting back

I have inserted the code as outlined on Git. I added the code to config->generated_overrides->concrete.php and now I get this:

"Call to a member function getDisplayName() on null".

Hm. Any suggestion?

It is a bit demanding for a theme designer (truely in love with c5) to dig through core code just to figure out why features cease working after yet another update. ....
mesuva replied on at Permalink Reply
mesuva
I've you've run any upgrades recently, you may need to update the version that concrete5 is currently running in the /updates folder instead.

In this particular case a bug just slipped in at some point - in an ideal world you'd never have to edit any code, at least in this case it's open source and you can apply such fixes directly. A closed-source product you'd just have to wait!
pixeljunkie replied on at Permalink Reply
pixeljunkie
Thx for your speedy reply. Of course I acknowlegde the fact that it is oS. And, as mentioned before, at this point I would not trade c5 for anything else.

The site is currently running on 8.4.2. - so should I upgrade to 8.4.3 - would that do the job?
mesuva replied on at Permalink Reply
mesuva
The fix in github occurred after the latest release, so it won't directly fix the problem.
But it might be a good idea to update to the latest (after a good backup), _then_ apply the fix I suggested.
pixeljunkie replied on at Permalink Reply
pixeljunkie
Tx - I will try that and hope that the bug will get fixed with the next release.
:D