Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
vBGT [Google Talk Supprt] Details »»
vBGT [Google Talk Supprt]
Version: 1.3, by Spike223 Spike223 is offline
Developer Last Online: May 2007 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 08-25-2005 Last Update: Never Installs: 14
Template Edits
Code Changes Additional Files  
No support by the author.

vBGT [Google Talk Support]
By Spike223

Description::

This hack will add an icon which acts identically to the other four instant messager icons, it wil pop up a box and display the user's Google Talk Username. It will add this icon in three places, your member's list, postbit (both styles), and profile.


Version Info::

v 1.0:
- First Release
v 1.1:
- Added Image Alt Tags As Requested
v 1.2:
- Fixed Image Alt tage to match other 4 Im Clients'.
- Added bug so if GT is the only IM client the user has, it shows in their profile.
- vBulletin now pre-caches the template for faster load times.
v 1.3:
- the Google Talk Textbox shows by the other four when editing profiles.



Installation Instructions::

Firstly, you need to create a custom Profile Field. Make it a single-line textbox, and REMEMBER it's name. It should be something like "field__" where the __'s are a number.

Then, follow these directions. Sorry they're so crude, but I decided to document it 1/3 of the way in, and Notepad was the handiest way.

REMEMBER to replace, ANYWHERE you see "fieldXX" in this document, with your own field name from above, otherwise this hack will not function!

Here are the PHP and Template Modifications:

++ In sendmessage.php::

Replace:
PHP Code:
'aim'   => 'AIM'
With:
PHP Code:
'aim'   => 'AIM',
'gt'    => 'Google Talk'

Replace:
PHP Code:
case 'icq':
            
$userinfo['icq'] = trim(htmlspecialchars_uni($userinfo['icq']));
            break; 
With:
PHP Code:
case 'icq':
            
$userinfo['icq'] = trim(htmlspecialchars_uni($userinfo['icq']));
            break;
        case 
'gt':
            
$type 'gt';
            break; 
Replace:
PHP Code:
 // pre-cache templates used by specific actions 
$actiontemplates = array( 
    
'im' => array( 
        
'im_send_aim'
        
'im_send_icq'
        
'im_send_yahoo'
        
'im_send_msn'
        
'im_message' 
With:

PHP Code:
 // pre-cache templates used by specific actions 
$actiontemplates = array( 
    
'im' => array( 
        
'im_send_aim'
        
'im_send_icq'
        
'im_send_yahoo'
        
'im_send_msn'
        
'im_message'
        
'im_send_gt' 



Replace:
PHP Code:
if (empty($userinfo["$type"]))
    {
        
// user does not have this messaging meduim defined
        
eval(print_standard_error('error_immethodnotdefined'));
    } 
With:
PHP Code:
if (empty($userinfo["$type"]) and empty($userinfo['fieldXX']))
    {
        
// user does not have this messaging meduim defined
        
eval(print_standard_error('error_immethodnotdefined'));
    } 

++ In includes/functions_user.php::

Replace:
PHP Code:
        $optionalfield '';
        
        if (
$profilefield['required'] == AND $profilefield['form'] == 0// Ignore the required setting for fields on the options page 
With:
PHP Code:
        $optionalfield '';
        if(
$profilefieldname !== "fieldXX") {
        if (
$profilefield['required'] == AND $profilefield['form'] == 0// Ignore the required setting for fields on the options page 

Replace:
PHP Code:
                }
            }
        }
    
    } 
With:
PHP Code:
                }
            }
        }
    }
    } 


++ In Template modifyprofile::

Replace:
Code:
<td>$vbphrase[msn_messenger_handle]:<br /><input type="text" class="bginput" name="msn" value="$bbuserinfo[msn]" size="25" maxlength="50" /></td>
					<td>$vbphrase[yahoo_messenger_handle]:<br /><input type="text" class="bginput" name="yahoo" value="$bbuserinfo[yahoo]" size="25" maxlength="30" /></td>
				</tr>
With:
Code:
<td>$vbphrase[msn_messenger_handle]:<br /><input type="text" class="bginput" name="msn" value="$bbuserinfo[msn]" size="25" maxlength="50" /></td>
					<td>$vbphrase[yahoo_messenger_handle]:<br /><input type="text" class="bginput" name="yahoo" value="$bbuserinfo[yahoo]" size="25" maxlength="30" /></td>
				</tr><tr>
					<td>Google Talk:<br /><input type="text" class="bginput" name="fieldXX" id="ctb_fieldXX" value="$bbuserinfo[fieldXX]" size="25" maxlength="125" /></td>
				</tr>
++ In Template MEMBERINFO::

Replace:

Code:
<if condition="$userinfo['showyahoo']">
				<tr>
					<td>$userinfo[yahooicon]</td>
					<td><a href="#" onclick="return imwindow('yahoo', '$userinfo[userid]', 400, 200)">$userinfo[yahoo]</a></td>
				</tr>
				</if>
With:

Code:
<if condition="$userinfo['showyahoo']">
				<tr>
					<td>$userinfo[yahooicon]</td>
					<td><a href="#" onclick="return imwindow('yahoo', '$userinfo[userid]', 450, 200)">$userinfo[yahoo]</a></td>
				</tr>
				</if>
<if condition="$userinfo[fieldXX]">
				<tr>
					<td><a href="#" onclick="return imwindow('gt', '$userinfo[userid]', 450, 200)"><img src="images/misc/im_gt.gif" border="0" alt="Send a message via Google Talk to $userinfo[username]"></a></td>
					<td><a href="#" onclick="return imwindow('gt', '$userinfo[userid]', 450, 200)">$userinfo[fieldXX]</a></td>
				</tr>
				</if>
Replace:
Code:
<if condition="$show['hasimicons']>
With:
Code:
<if condition="$show['hasimicons'] or $userinfo[fieldXX]">
++ In template memberlist_resultsbit:

Replace:

Code:
<if condition="$show['imicons'] AND exec_switch_bg()"><td class="$bgclass">$userinfo[icqicon] $userinfo[aimicon] $userinfo[msnicon] $userinfo[yahooicon]</td></if>
With:

Code:
<if condition="$show['imicons'] AND exec_switch_bg()"><td class="$bgclass">$userinfo[icqicon] $userinfo[aimicon] $userinfo[msnicon] $userinfo[yahooicon] <if condition="$userinfo[fieldXX]"><a href="#" onclick="return imwindow('gt', '$userinfo[userid]', 400, 200)"><img src="images/misc/im_gt.gif" border="0" alt="Send a message via Google Talk to $userinfo[username]"></a></if></td></if>
++ In postbit and postbit_legacy Templates::

Find:

Code:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
Replace:

Code:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] <if condition="$post[fieldXX]"><a href="#" onclick="return imwindow('gt', '$userinfo[userid]', 400, 200)"><img src="images/misc/im_gt.gif" border="0" alt="Send a message via Google Talk to $post[username]"></a></if></div>

Create Template Called "im_send_gt", put this in it, but replace with HTML where it says __CONTENT HERE__.

The user's GT s/n for use in this template is "$userinfo[fieldXX]", no quotes.

Code:
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
	<td class="tcat">
		<span class="smallfont" style="float:right"><a href="#" onclick="self.close()">Close this window</a></span>
		Google Talk
	</td>
</tr>
<tr>
	<td class="panelsurround" align="center">
	<div class="panel">

		*** __CONTENT HERE__ ***

	</div>
	</td>
</tr>
</table>

</body>
</html>
Add whatever you like in it, but whatever you add will be displayed in the popup window for contacting that user. HTML is allowed in the template as usual.


Files To Upload::

Here's a GT logo:


Upload it to FORUM ROOT/images/misc/.


If you liked this hack, please click INSTALL!

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 08-29-2005, 05:02 PM
Lee's Avatar
Lee Lee is offline
 
Join Date: Jul 2004
Location: Texas
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Upgraded to v1.1. Awesome hack as usual - its use is becoming widespread around the forums as well!

But just so you know, Spike, some of the code in their still says "field10" and not "fieldXX" like it should. This makes some things harder to catch and fix since you don't say anything about a "field10" in this version.

For the alt messages, though, wouldn't it be more appropriate to have it say "Send a message via Google Talk to <user>"? The rest of the IMing icons have that as their alt message.
Reply With Quote
  #13  
Old 08-30-2005, 07:17 PM
yj_enquirer yj_enquirer is offline
 
Join Date: Jan 2005
Location: UK
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

gr8 hack.. and provided very much in time, especially GT is becoming very common, this shall go really well with the members.

Just a few questions...
1. Any chance of having the newly created custom profile field appear in the "Instant Messaging" section under the Users CP ==> Edit Profile ==> {Optional Information section} as opposed to it appearing by itself in a seperate section.

2. When I enter my GT addy, it does not appear in the "View Profile" page until and unless I include another IM ID, e.g. MSN. Is this happening for anyone else?

Cheers
Reply With Quote
  #14  
Old 08-30-2005, 08:41 PM
Spike223 Spike223 is offline
 
Join Date: Mar 2005
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Upgraded to Version 1.2.

Thanks to everyone who gave me ideas for the new version.

I am unable to display it in the Who's Online part, unfortunately, I've toyed with it for quite some time now, and it still puzzles me as to why it doesn't work.

I did fix the Precaching problem, also the one field10 i missed, and I changed and tested the new ALT tags on my forums, so everything should be in working order.

Oh, and if GT is the only IM name you have, it WILL show up in your Profile now.

Thanks to everyone for reporting these little things, this helps make the hack better for everyone!

And, MET, I think I'll have to pass on the ZIP file, this post should be enough to suffice. Thanks for the offer, though.
Reply With Quote
  #15  
Old 08-31-2005, 01:00 AM
Spike223 Spike223 is offline
 
Join Date: Mar 2005
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Upgraded to 1.3 with support on adding the GT textbox by the other four IM textboxes when editing your profile.
Reply With Quote
  #16  
Old 08-31-2005, 02:53 PM
Lee's Avatar
Lee Lee is offline
 
Join Date: Jul 2004
Location: Texas
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome as usual. I've been waiting for the GTalk box to get in there with the other IM fields, so this was treat. Working perfect, and I'm glad you took the alt message suggestion - it looks much nicer.

Something you may wat to consider is where Google Talk is headed in the future. If our prayers are answered, Google Talk will open up to the Jabber community with Server-to-Server support and transports. This would mean, in short, abolishing every other instant messenging system you have.

If Google decides for Server-to-Server support, this becomes a Jabber client. And more importantly, an amazingly popular VoIP-enhanced Jabber client. They might even be thinking about adding PC-to-Phone calls.

IF such happens, this hack may just become general Jabber support for vB, instead of strictly Google Talk. Or you may wish to name the field Google Talk (Jabber).
Reply With Quote
  #17  
Old 08-31-2005, 08:56 PM
Spike223 Spike223 is offline
 
Join Date: Mar 2005
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by speedpro50
Awesome as usual. I've been waiting for the GTalk box to get in there with the other IM fields, so this was treat. Working perfect, and I'm glad you took the alt message suggestion - it looks much nicer.

Something you may wat to consider is where Google Talk is headed in the future. If our prayers are answered, Google Talk will open up to the Jabber community with Server-to-Server support and transports. This would mean, in short, abolishing every other instant messenging system you have.

If Google decides for Server-to-Server support, this becomes a Jabber client. And more importantly, an amazingly popular VoIP-enhanced Jabber client. They might even be thinking about adding PC-to-Phone calls.

IF such happens, this hack may just become general Jabber support for vB, instead of strictly Google Talk. Or you may wish to name the field Google Talk (Jabber).
When the time comes, then I'll probably rename it to be just Jabber with Google in parenthesis, there ARE other Jabber networks out there. And, besides, what Google is speculating will take them quite some time, to develop, then test and test again, fix bugs, advertise, etc. We'll see what happens, but I always keep an eye on this thread, just in case.
Reply With Quote
  #18  
Old 09-06-2005, 08:35 AM
Colejo Colejo is offline
 
Join Date: Jul 2005
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have it installed and it works but I have one thing that doesn't look right. Under Edit Profile > Optional Information > Instant Messaging, it has the option for Google Talk. If I enter something in their and save, it won't stay there. But down under Additional Information it has the Custom Profile Field I created and I put the Google Talk name there and it saves and works. Do you know what I might have missed?
Reply With Quote
  #19  
Old 09-06-2005, 09:47 AM
Colejo Colejo is offline
 
Join Date: Jul 2005
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To get Google to show up under who's online couldn't you just add something to the whosonlinebit template under this:

<if condition="$vboptions['showimicons']">
<td class="alt2" align="center" nowrap="nowrap">
$userinfo[aimicon]
$userinfo[icqicon]
$userinfo[msnicon]
$userinfo[yahooicon]
Reply With Quote
  #20  
Old 09-06-2005, 10:50 AM
turksengel turksengel is offline
 
Join Date: Aug 2005
Location: Turkiye
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

do you plan to resease it for 3.5 ?
Reply With Quote
  #21  
Old 09-06-2005, 10:56 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure your custom profile field has the following settings:
Required? No
Editable? Yes
Private? Yes
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:56 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06802 seconds
  • Memory Usage 2,350KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (11)bbcode_code
  • (12)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete