[ADB] Social Networking Site Buttons 2.1.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts

[ADB] Social Networking Site Buttons 2.1.0

Post by KellyBean »

Modification Name: Social Networking Site Buttons
Authors: KellyBean & Jaymie1989

Modification Description: Adds 8 new links/buttons next to the typical www, AIM, MSN, YIM buttons on the mini profile in viewtopic_body.html:

Bebo, Blogger, Facebook, GoodReads, LinkedIn, MySpace, NetLog and Twitter

Modification Version: 2.1.0

Screenshots:
Viewtopic:
Image

UCP:
Image

ACP:
Image

Viewprofile:
Image

Demo URL: here.

Modification Download: social_networking_buttons 2.1.0

To-Do List:
  • Additional Languages
Features:
  • Prosilver Compatible
  • subSilver2 Compatible
  • Auto-MOD Compatible
Suggestions and constructive criticism always welcome! :)

Thanks to Jaymie1989 for offering to help me with this MOD since I've had a super busy summer and haven't had the time to dedicate to finishing. As such, I added him as co-author.
Last edited by EXreaction on Sat Sep 05, 2009 1:08 am, edited 19 times in total.
Reason: Marked as abandoned
My Forum | My Design/How-to Site
Need help MODing or customizing your site? I can do it for a very reasonable fee. Contact me!

Image
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53523
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Social Networking Site profiles

Post by Brf »

You need to edit includes/acp/acp_styles.php and refresh your imageset,
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts

Re: Social Networking Site profiles

Post by KellyBean »

Thanks for the quick response!
Is this the only edit in includes/acp/acp_styles.php?

Find:

Code: Select all

'buttons'	=> array(
				'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_quick_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply', 'button_quick_reply',
Inline find:

Code: Select all

'icon_contact_msnm',
Inline after add:

Code: Select all

'icon_contact_gr',
I did that, refreshed the imageset, purged the cache, and still don't have anything.
My Forum | My Design/How-to Site
Need help MODing or customizing your site? I can do it for a very reasonable fee. Contact me!

Image
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53523
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Social Networking Site profiles

Post by Brf »

Does your button show up OK in styles/imagesets edit?
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts

Re: Social Networking Site profiles

Post by KellyBean »

You mean in the ACP? Yes.
My Forum | My Design/How-to Site
Need help MODing or customizing your site? I can do it for a very reasonable fee. Contact me!

Image
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53523
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Social Networking Site profiles

Post by Brf »

I am seeing this in your stylesheet:

Code: Select all

ul.profile-icons li.goodreads-icon	{ width: px; height: px; }
ul.profile-icons li.facebook-icon	{ width: px; height: px; }
ul.profile-icons li.blogger-icon	{ width: px; height: px; }
ul.profile-icons li.myspace-icon	{ width: px; height: px; }
ul.profile-icons li.twitter-icon	{ width: px; height: px; }

Code: Select all

.goodreads-icon, .goodreads-icon a		{ background-image: url(""); }
.facebook-icon, .facebook-icon a		{ background-image: url(""); }
.blogger-icon, .blogger-icon a			{ background-image: url(""); }
.myspace-icon, .myspace-icon a			{ background-image: url(""); }
.twitter-icon, .twitter-icon a			{ background-image: url(""); }
That indicates that those icons are not refreshed into your imageset in your database.
Did you refresh your style after refreshing the imageset?
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts

Re: Social Networking Site profiles

Post by KellyBean »

Should I have? :?

:lol: I just re-refreshed everything... first one way, then the other... one thing I noticed, when I edited the imageset, went to Select Image, and clicked the drop-down list, the goodreads button is listed without a name... just [en]

So it looks like this:
Image
My Forum | My Design/How-to Site
Need help MODing or customizing your site? I can do it for a very reasonable fee. Contact me!

Image
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53523
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Social Networking Site profiles

Post by Brf »

Your stylesheet looks fine now.
F5 your webbrowser.

That text name is in language/en/acp/styles.php
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts

Re: Social Networking Site profiles

Post by KellyBean »

OMG, It works!! :D :D :D :D THANKS for your help!

Now... honest opinions, please... is this good enough ( :oops: ) to attempt to put together as a MOD?
My Forum | My Design/How-to Site
Need help MODing or customizing your site? I can do it for a very reasonable fee. Contact me!

Image
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53523
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Social Networking Site profiles

Post by Brf »

Sure.
That sort of thing could be used for a bunch of different profile options.
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts

Re: Social Networking Site profiles

Post by KellyBean »

:D
My Forum | My Design/How-to Site
Need help MODing or customizing your site? I can do it for a very reasonable fee. Contact me!

Image
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18409
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón

Re: Social Networking Site profiles

Post by DavidIQ »

KellyBean,

If this is something you plan on releasing into our MODDB then you might want to take a look at this:
http://www.phpbb.com/mods/

You'll also want to convert all of your instructions to MODX format.

Once you do that you should post in MODs in Development following the guidelines found here. You've put a bit of work into this so you should consider releasing it to the MODDB ;)
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
will_hough
Former Team Member
Posts: 1955
Joined: Mon Feb 06, 2006 8:47 pm
Location: Michigan
Name: Will Hough

Re: Social Networking Site profiles

Post by will_hough »

Thanks for writing this MOD

I wrote it all up for Facebook in old school .mod format if anyone wants it. I'm going to leave it up to you to write it as MODX if you want.

Code: Select all

##############################################################
## MOD Title: Add Facebook Icon In Viewtopic
## MOD Author: KellyBean
## MOD Description: Addes a Facebook link and icon to viewtopic.
## 
## MOD Version: 0.0.1
##
## Installation Level: (Easy)
## Installation Time: 5 min
## 
## Files To Edit: includes/ucp/ucp_profile.php
## 			includes/acp/acp_styles.php
## 			language/en/common.php
## 			language/en/ucp.php
## 			memberlist.php
## 			viewtopic.php
## 			styles/prosilver/imageset/imageset.cfg
## 			styles/prosilver/theme/buttons.css
## 			styles/prosilver/theme/colours.css
## 			styles/prosilver/template/ucp_profile_profile_info.html
## 			styles/prosilver/template/viewtopic_body.html
## 
## Included Files: imageset/icon_contact_fb.png
## 
##############################################################


# 
#-----[ SQL ]--------------------------------------------- 
#

ALTER TABLE `phpbb_users` ADD `user_facebook` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';

# 
#-----[ COPY ]------------------------------------------ 
#
imageset/icon_contact_fb.png       to   imageset/icon_contact_fb.png

# 
#-----[ OPEN ]---------------------------------------------
# 
includes/ucp/ucp_profile.php

# 
#-----[ FIND ]---------------------------------------------
#
				$data = array(
					'icq'			=> request_var('icq', $user->data['user_icq']),
					'aim'			=> request_var('aim', $user->data['user_aim']),
					'msn'			=> request_var('msn', $user->data['user_msnm']),
					'yim'			=> request_var('yim', $user->data['user_yim']),
					'jabber'		=> utf8_normalize_nfc(request_var('jabber', $user->data['user_jabber'], true)),
					'website'		=> request_var('website', $user->data['user_website']),

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
					'facebook'      => request_var('facebook', $user->data['user_facebook']),

#
#-----[ FIND ]---------------------------------------------
#
						'website'		=> array(
							array('string', true, 12, 255),
							array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
						'facebook'      => array(
							array('string', true, 12, 255),
							array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),

#
#-----[ FIND ]---------------------------------------------
#
							'user_interests'=> $data['interests'],

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
							'user_facebook'	=> $data['facebook'],


#
#-----[ FIND ]---------------------------------------------
#
					'INTERESTS'	=> $data['interests'],

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
					'FACEBOOK'	=> $data['facebook'],

# 
#-----[ OPEN ]---------------------------------------------
#
language/en/acp/styles.php

#
#-----[ FIND ]---------------------------------------------
#
	'IMG_ICON_CONTACT_WWW'		=> 'Website',

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
	'IMG_ICON_CONTACT_FB'		=> 'Facebook',

# 
#-----[ OPEN ]---------------------------------------------
# 
includes/acp/acp_styles.php

#
#-----[ FIND ]---------------------------------------------
#
			'buttons'	=> array(
				'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',
			),

#
#-----[ IN_LINE FIND ]---------------------------------------------
#
'icon_contact_msnm'

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------------------
#
, 'icon_contact_fb'

# 
#-----[ OPEN ]---------------------------------------------
#
language/en/common.php

#
#-----[ FIND ]---------------------------------------------
#
	'GO'						=> 'Go',

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
	'FACEBOOK'					=> 'Facebook',

# 
#-----[ OPEN ]---------------------------------------------
# 
language/en/ucp.php

#
#-----[ FIND ]---------------------------------------------
#
	'UCP_JABBER'				=> 'Jabber address',

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
    'UCP_FACEBOOK'            => 'Facebook Profile',

# 
#-----[ OPEN ]---------------------------------------------
# 
memberlist.php

#
#-----[ FIND ]---------------------------------------------
# Around line 565
			'JABBER_IMG'	=> $user->img('icon_contact_jabber', $user->lang['JABBER']),


# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
			'FACEBOOK_IMG'	=> $user->img('icon_contact_fb', $user->lang['FACEBOOK']),

#
#-----[ FIND ]---------------------------------------------
# Around line 1492
			'JABBER_IMG'	=> $user->img('icon_contact_jabber', $user->lang['JABBER']),


# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
			'FACEBOOK_IMG'	=> $user->img('icon_contact_fb', $user->lang['FACEBOOK']),

# 
#-----[ OPEN ]---------------------------------------------
# 
viewtopic.php

#
#-----[ FIND ]---------------------------------------------
#
	'JABBER_IMG'		=> $user->img('icon_contact_jabber', 'JABBER') ,


# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
	'FACEBOOK_IMG'      => $user->img('icon_contact_fb', 'FACEBOOK'),

#
#-----[ FIND ]---------------------------------------------
#
				'aim'				=> '',
				'msn'				=> '',
				'yim'				=> '',

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
				'facebook'			=> '',

#
#-----[ FIND ]---------------------------------------------
#
				'jabber'		=> ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=jabber&u=$poster_id") : '',

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
				'facebook'		=> $row['user_facebook'],

#
#-----[ FIND ]---------------------------------------------
#
		'U_JABBER'		=> $user_cache[$poster_id]['jabber'],

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
		'U_FACEBOOK'	=> $user_cache[$poster_id]['facebook'],

# 
#-----[ OPEN ]---------------------------------------------
# 
styles/prosilver/imageset/imageset.cfg

#
#-----[ FIND ]---------------------------------------------
#
img_icon_contact_msnm = icon_contact_msnm.gif*20*20

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
img_icon_contact_fb = icon_contact_fb.png*20*20

# 
#-----[ OPEN ]---------------------------------------------
# 
styles/prosilver/theme/buttons.css

#
#-----[ FIND ]---------------------------------------------
#
.web-icon, .web-icon a			{ background: none top left no-repeat; }

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
.facebook-icon, .facebook-icon a	{ background: none top left no-repeat; }

#
#-----[ FIND ]---------------------------------------------
#
ul.profile-icons li.web-icon	{ width: {IMG_ICON_CONTACT_WWW_WIDTH}px; height: {IMG_ICON_CONTACT_WWW_HEIGHT}px; }

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
ul.profile-icons li.facebook-icon	{ width: {IMG_ICON_CONTACT_FB_WIDTH}px; height: {IMG_ICON_CONTACT_FB_HEIGHT}px; }

# 
#-----[ OPEN ]---------------------------------------------
# 
styles/prosilver/theme/colours.css

#
#-----[ FIND ]---------------------------------------------
#
.jabber-icon, .jabber-icon a		{ background-image: url("{IMG_ICON_CONTACT_JABBER_SRC}"); }

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
.facebook-icon, .facebook-icon a	{ background-image: url("{IMG_ICON_CONTACT_FB_SRC}"); }

# 
#-----[ OPEN ]---------------------------------------------
# 
styles/prosilver/template/ucp_profile_profile_info.html

#
#-----[ FIND ]---------------------------------------------
#
	<dl>
		<dt><label for="website">{L_WEBSITE}:</label></dt>
		<dd><input type="text" name="website" id="website" maxlength="255" value="{WEBSITE}" class="inputbox" /></dd>
	</dl>

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
	<dl>
		<dt><label for="facebook">{L_UCP_FACEBOOK}:</label></dt>
		<dd><input type="text" name="facebook" id="facebook" maxlength="255" value="{FACEBOOK}" class="inputbox" /></dd>
	</dl>

# 
#-----[ OPEN ]---------------------------------------------
# 
styles/prosilver/template/viewtopic_body.html

#
#-----[ FIND ]---------------------------------------------
#
					<!-- IF postrow.U_JABBER --><li class="jabber-icon"><a href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->

# 
#-----[ AFTER, ADD ]-------------------------------------- 
#
					<!-- IF postrow.U_FACEBOOK --><li class="facebook-icon"><a href="{postrow.U_FACEBOOK}" title="{L_FACEBOOK}"><span>{L_FACEBOOK}</span></a></li><!-- ENDIF -->


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM 
mreider
Registered User
Posts: 98
Joined: Fri Sep 19, 2003 9:30 pm

Re: Social Networking Site profiles

Post by mreider »

I just tried installing this but when I go to the UCP nothing appears - shouldn't there be a box or something that says "Facebook Details" or something? Like where you enter in your MSN username and stuff?

EDIT - I'm an idiot and missed a couple edits :) Works, great mod!
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts

Re: Social Networking Site profiles

Post by KellyBean »

This might be a silly question, but did you refresh your template and purge the cache?

ETA: LOL! No problem, I've been known to do that a couple of times! :lol:

I still need to get this into MODX... I've been really busy, but I will make time hopefully this week.
My Forum | My Design/How-to Site
Need help MODing or customizing your site? I can do it for a very reasonable fee. Contact me!

Image

Return to “[3.0.x] MODs in Development”