Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12376
Latest: Printablecalendars
New This Month: 3
New This Week: 0
New Today: 0
Stats
Total Posts: 40220
Total Topics: 7084
Most Online Today: 54
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 54
Total: 54

Author Topic: Adding Social Networks from Profile to show on comments  (Read 2256 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: 15109
    • 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
25753 Views
Last post November 22, 2011, 02:54:39 pm
by Vincent Volmer
2 Replies
4027 Views
Last post August 29, 2007, 09:28:03 am
by JCphotog
3 Replies
4131 Views
Last post October 20, 2008, 09:45:52 am
by tugistyle
0 Replies
2399 Views
Last post November 28, 2008, 06:15:18 am
by Nintendofanthr33
5 Replies
6099 Views
Last post August 25, 2014, 05:05:47 pm
by quiraskill

+- Recent Topics

Download System Lite by Rock Lee
June 03, 2020, 07:34:24 pm

Font question by SMFHacks
May 27, 2020, 08:15:26 am

Error message with latest SMF 2.1 Github build by Hatshepsut
May 25, 2020, 01:43:26 am

smfblog not working on 2.0.17 by tech9
May 20, 2020, 01:44:34 pm

Copyright removal by stbc
May 18, 2020, 01:27:57 am

Mod Verified User i can't square the image by Rock Lee
May 07, 2020, 07:56:10 pm

SMF4Mobile 2.0 released for SMF 2.0.x by SMFHacks
May 06, 2020, 12:13:14 pm

SMF Social Login Pro - Discontinued? by Nicole
May 02, 2020, 05:47:04 pm

Likes by SMFHacks
April 30, 2020, 09:50:35 pm

Upgrade Issue - by SMFHacks
April 28, 2020, 12:40:13 pm

Powered by EzPortal