[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!
Suggested Hosts
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts
Contact:

Re: Social Networking Site profiles

Post by KellyBean »

Sure! I'm working on getting a test site started right now. But I'll rename this topic first. :)
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: 17409
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Social Networking Site profiles

Post by DavidIQ »

I've moved it anyways so I don't have to keep checking. Just rename it soon as you can. Thanks.
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.
DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: Social Networking Site profiles

Post by DJ Skitzo »

KellyBean wrote:For Bebo:
Icon: Image

Code: Select all

    ##############################################################
    ## MOD Title: Add Bebo Icon In Viewtopic
    ## MOD Author: KellyBean
    ## MOD Description: Adds a Bebo 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_bebo.png
    ##
    ##############################################################


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

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

    #
    #-----[ COPY ]------------------------------------------
    #
    imageset/icon_contact_bebo.png       to   imageset/icon_contact_bebo.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 ]--------------------------------------
    #
                   'bebo'      => request_var('bebo', $user->data['user_bebo']),

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

    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
                      'bebo'      => array('string', true, 4, 255),

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

    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
                         'user_bebo'   => $data['bebo'],


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

    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
                   'BEBO'   => $data['bebo'],

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

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

    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
       'IMG_ICON_CONTACT_BEBO'      => 'Bebo',

    #
    #-----[ 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_bebo'

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

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

    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
       'BEBO'               => 'Bebo',

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

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

    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
        'UCP_BEBO'            => 'Bebo Profile',

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

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


    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
             'BEBO_IMG'   => $user->img('icon_contact_bebo', $user->lang['BEBO']),

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


    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
             'BEBO_IMG'   => $user->img('icon_contact_bebo', $user->lang['BEBO']),

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

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


    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
       'BEBO_IMG'      => $user->img('icon_contact_bebo', 'BEBO'),

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

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

    #
    #-----[ 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 ]--------------------------------------
    #
                'bebo'      => $row['user_bebo'],

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

    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
          'U_BEBO'   => $user_cache[$poster_id]['bebo'],

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

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

    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
    img_icon_contact_bebo = icon_contact_bebo.png*20*20

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

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

    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
    .bebo-icon, .bebo-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.bebo-icon   { width: {IMG_ICON_CONTACT_BEBO_WIDTH}px; height: {IMG_ICON_CONTACT_BEBO_HEIGHT}px; }

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

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

    #
    #-----[ AFTER, ADD ]--------------------------------------
    #
    .bebo-icon, .bebo-icon a   { background-image: url("{IMG_ICON_CONTACT_BEBO_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="bebo">{L_UCP_BEBO}:</label></dt>
          <dd><input type="text" name="bebo" id="bebo" maxlength="255" value="{BEBO}" 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_BEBO --><li class="bebo-icon"><a href="http://www.bebo.com/{postrow.U_BEBO}" target="_blank" title="{L_BEBO}"><span>{L_BEBO}</span></a></li><!-- ENDIF -->


    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    # EoM
Let me know how that works. :)
Thank you very much, I will test it once I'v had some sleep. :)
User avatar
Eragon
Registered User
Posts: 218
Joined: Tue Oct 07, 2008 1:57 pm

Re: [BETA] Social Networking Site Buttons

Post by Eragon »

Nice mod :) I installed five minutes ago..

install.xml

Open: includes/acp/acp_styles.php
Find:

Code: Select all

			
'buttons'	=> array(
'icon_back_top', 'icon_reimg_zoom_in', 'icon_reimg_zoom_out','icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_gr', 'icon_contact_fb', 'icon_contact_ms', 'icon_contact_twit', 'icon_contact_blogger', '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',
),

'icon_reimg_zoom_in', 'icon_reimg_zoom_out','button_quick_reply', etc ? :)


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

Re: [BETA] Social Networking Site Buttons

Post by DavidIQ »

KellyBean: use smaller finds for the edits. That way for users that have modified it through other MODs, as is the case with Eragon, will be able to do the edit anyways. Find instructions are always defined as possibly partial so it shouldn't be an issue for anyone if you just do a partial find.

Eragon: You obviously already know where to put the edit so there's no need to accomodate your different file contents. ;)
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
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts
Contact:

Re: [BETA] Social Networking Site Buttons

Post by KellyBean »

Eragon: LOL!! Thanks! I missed that! It'll be fixed in the next download.

David: Thanks for the advice. Very good point. I'll fix that as well (new download will most likely be available later tonight). :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
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts
Contact:

Re: [BETA] Social Networking Site Buttons

Post by KellyBean »

First post updated with new download link. :)
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
Jemme
Registered User
Posts: 52
Joined: Mon Jul 23, 2007 5:13 pm
Location: Belgium
Contact:

Re: [BETA] Social Networking Site Buttons

Post by Jemme »

Hi, Just installed the MOD. Works great.
Would it be possible to add LinkedIn and NetLog to the list?
Thanks
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts
Contact:

Re: [BETA] Social Networking Site Buttons

Post by KellyBean »

Sure! It should be easy enough... I'll make up a couple of buttons later today. :)
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
Jemme
Registered User
Posts: 52
Joined: Mon Jul 23, 2007 5:13 pm
Location: Belgium
Contact:

Re: [BETA] Social Networking Site Buttons

Post by Jemme »

Brilliant! Thanks!
User avatar
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts
Contact:

Re: [BETA] Social Networking Site Buttons

Post by KellyBean »

Here are the buttons:
Image
Image

I'll add them to the MOD later tonight. :D

Jemme (or anyone who knows), can you give me an example url of each profile? I don't have a LinkedIn or a NetLog account. Thanks! :)
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: 17409
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: [BETA] Social Networking Site Buttons

Post by DavidIQ »

Linked In can vary depending on if you've accepted a free custom url or not. So for instance it can be this:

Code: Select all

http://www.linkedin.com/in/davidiq
Or some form of this:

Code: Select all

http://www.linkedin.com/pub/2/b28/123
Where anything after /pub/ can vary.
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
KellyBean
Registered User
Posts: 270
Joined: Wed Nov 07, 2007 3:06 pm
Location: Massachusetts
Contact:

Re: [BETA] Social Networking Site Buttons

Post by KellyBean »

Thanks David!
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
mreider
Registered User
Posts: 98
Joined: Fri Sep 19, 2003 9:30 pm

Re: [BETA] Social Networking Site Buttons

Post by mreider »

Here's a little bonus I cooked up :)

I'm sure it could be refined. But lets say you have a twitter account. Someone just added their twitter profile, so why not ask them to follow you? Booya! :)

I put this script just after the

Code: Select all

<fieldset>
tag. You can put it wherever you like probably

Code: Select all

<script>
				function updateTwitterMessage(){
				twitter_field = document.getElementById("twitter"); 
				if (twitter_field != ""){
					document.getElementById("twitter_message").innerHTML = "<a href='http://www.twitter.com/my_twitter' target='_blank'>Click here to follow me on Twitter!</a>";
				}
		}
	</script>	
Then change the <dd> tag for twitter to this:

Code: Select all

 <dd><input type="text" name="twitter" id="twitter" maxlength="255" value="{TWITTER}" class="inputbox" onBlur="updateTwitterMessage();" />
      			<div id="twitter_message"></div>
</dd>
Now when someone edits the twitter profile box, a message will appear under the input box asking them to follow you. Just repeat and change the ID's to do the same for other sites like facebook and myspace...

I'll leave that in your capable hands!
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17409
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: [BETA] Social Networking Site Buttons

Post by DavidIQ »

Why do it through javascript? This wouldn't work for those many people that have javascript disabled on their browsers. I'm really not seeing anything in your suggestion that couldn't be done through regular html... or am I not seeing something...
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.
Locked

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