Version: 1.3, by Spike223
Developer Last Online: May 2007
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'] == 1 AND $profilefield['form'] == 0) // Ignore the required setting for fields on the options page
With:
PHP Code:
$optionalfield = '';
if($profilefieldname !== "fieldXX") {
if ($profilefield['required'] == 1 AND $profilefield['form'] == 0) // Ignore the required setting for fields on the options page
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.
Make sure your custom profile field has the following settings:
Required? No
Editable? Yes
Private? Yes
That's how I have it set so it's not a problem with someone else seeing it but the user has the option for their Google name it 2 spots but only the one under additional information is actually working. I went ahead and removed the addition to the template modifyprofile so now there is just the one spot to put in your google username. If anyone know how I can get it to just show up under the optional information instead of the additional information let me know. Thanks.
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?
Check your PHP code, make sure you replaced the "fieldXX" in the PHP scripts, too.