Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 173
Total: 173

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

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal