Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4214
Latest: thatsjustit
New This Month: 5
New This Week: 0
New Today: 0
Stats
Total Posts: 42793
Total Topics: 7455
Most Online Today: 51
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 49
Total: 49

Author Topic: Adding Social Networks from Profile to show on comments  (Read 2844 times)

0 Members and 1 Guest are viewing this topic.

Offline Jonas1975

  • Sr. Member
  • ****
  • Posts: 318
    • View Profile
    • The Mobile Photography Blog
Adding Social Networks from Profile to show on comments
« on: July 12, 2014, 05:41:52 am »
I'm using a social networks mod that shows on the profile and in posts and I wanted to add to the gallery comments.

What is showing on Topics is this: http://themobilephotographyblog.com/windows-phone-photography-apps/timelapse-pro-windows-phone-8-app-review/

While is blank on Gallery comments: http://themobilephotographyblog.com/gallery/macro/flower-and-fly/4421#c8349

I know I have to add this (code used on topics):
Code: [Select]
// This shows the social media icons.
if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
echo '
<li class="im_icons">
<ul>
', !isset($context['disabled_fields']['facebook']) && !empty($message['member']['facebook']['link']) ? '<li>' . $message['member']['facebook']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['myspace']) && !empty($message['member']['myspace']['link']) ? '<li>' . $message['member']['myspace']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['twitter']) && !empty($message['member']['twitter']['link']) ? '<li>' . $message['member']['twitter']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['googleplus']) && !empty($message['member']['googleplus']['link']) ? '<li>' . $message['member']['googleplus']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['linkedin']) && !empty($message['member']['linkedin']['link']) ? '<li>' . $message['member']['linkedin']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['youtube']) && !empty($message['member']['youtube']['link']) ? '<li>' . $message['member']['youtube']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['deviantart']) && !empty($message['member']['deviantart']['link']) ? '<li>' . $message['member']['deviantart']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['pinterest']) && !empty($message['member']['pinterest']['link']) ? '<li>' . $message['member']['pinterest']['link'] . '</li>' : '', '';

// Any custom fields with Social Media?
if (!empty($message['member']['custom_fields']))
{
$shown = false;
foreach ($message['member']['custom_fields'] as $custom)
{
if ($custom['placement'] != 3 || empty($custom['value']))
continue;
if (empty($shown))
{
$shown = true;
}
echo '
<li><a href="', $custom['value'], '" title="', $custom['title'], ' - ', $custom['value'], '" target="_blank" /><img src="', $settings['images_url'], '/', $custom['customsmiicon'], '" /> </a></li>';
}
if ($shown)
echo '
</ul>
</li>';
}
Just need to understand where to add it, so can anyone help me on this?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16234
    • View Profile
Re: Adding Social Networks from Profile to show on comments
« Reply #1 on: July 12, 2014, 11:35:50 am »
The $message variable isn't loaded in the gallery. You would need to load the members information into the message variable or create a new varaible to load it.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Jonas1975

  • Sr. Member
  • ****
  • Posts: 318
    • View Profile
    • The Mobile Photography Blog
Re: Adding Social Networks from Profile to show on comments
« Reply #2 on: July 12, 2014, 02:44:10 pm »
The $message variable isn't loaded in the gallery. You would need to load the members information into the message variable or create a new varaible to load it.
Ok...  that's too "heavy" for me. I thought I would only had to copy/paste a part of the code to somewhere.

 

Related Topics

  Subject / Started by Replies Last post
22 Replies
28439 Views
Last post November 22, 2011, 02:54:39 pm
by Vincent Volmer
2 Replies
4597 Views
Last post August 29, 2007, 09:28:03 am
by JCphotog
3 Replies
4695 Views
Last post October 20, 2008, 09:45:52 am
by tugistyle
0 Replies
2631 Views
Last post November 28, 2008, 06:15:18 am
by Nintendofanthr33
5 Replies
7672 Views
Last post August 25, 2014, 05:05:47 pm
by quiraskill

+- Recent Topics

Permissions query by davejo
March 26, 2023, 04:43:48 am

prettyurls - TroubleShooting.wiki by SMFHacks
March 25, 2023, 01:49:35 pm

Download Gallery Option by SMFHacks
March 23, 2023, 09:34:02 am

Lost attachments by pete
March 22, 2023, 10:24:17 am

Additional Permissions by mickjav
March 18, 2023, 05:21:23 am

[Mod]Discord Web Hooks by SMFHacks
March 17, 2023, 08:48:30 am

Site upgrade to 2.1 by SMFHacks
March 12, 2023, 08:51:19 am

Theme/CSS design wanted by mickjav
March 11, 2023, 12:10:11 pm

Category Images by Anmer
March 10, 2023, 06:20:04 am

DownloadsPro - Topic Link by Anmer
March 08, 2023, 03:18:05 pm

Powered by EzPortal