vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Support for Google Talk! (https://vborg.vbsupport.ru/showthread.php?t=95031)

Spike223 08-24-2005 10:00 PM

Support for Google Talk!
 
Alright, this is my first ever mod, I actually did it for someone else, and they suggested I post it here, but I'm no goood at making mods professional, so this is probably a very crude way of doing it to some of you, so bear with me, it does work, though.

Description:

This Mod will add popup links, just like Aim, Yahoo, ICQ, and MSN, but for Google Talk. IT will add them in the user's profile, their postbit (both styles), and the Member List (if enabled).


How To Install:

Firstly, you need to create a custom Profile Field, 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 "field10" in this document, with your own field name from above, otherwise it'll grab the wrong profile field!!!

Here's the mod instructions:

Quote:

Originally Posted by Instructions
Upload im_gt.gif into %FORUM_ROOT%/images/misc/ (image is below quote box)

++ 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:

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['field10']))
    {
        
// user does not have this messaging meduim defined
        
eval(print_standard_error('error_immethodnotdefined'));
    } 


++ 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[field10]">
                                <tr>
                                        <td><a href="#" onclick="return imwindow('gt', '$userinfo[userid]', 450, 200)"><img src="images/misc/im_gt.gif" border="0"></a></td>
                                        <td><a href="#" onclick="return imwindow('gt', '$userinfo[userid]', 450, 200)">$userinfo[field10]</a></td>
                                </tr>
                                </if>

++ 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[field10]"><a href="#" onclick="return imwindow('gt', '$userinfo[userid]', 400, 200)"><img src="images/misc/im_gt.gif" border="0"></a></if></td></if>

++ In Postbit and Postbit_Legacy Templates:: ***WARNING: NOT TESTED ON REGULAR POSTBIT STYLE, ONLY LEGACY!***

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[field10]"><a href="#" onclick="return imwindow('gt', '$userinfo[userid]', 400, 200)"><img src="images/misc/im_gt.gif" border="0"></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 is "$userinfo[field10]", 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, HTML allowed!, will be displayed in the popup window for contacting that user.

Any feedback is greatly appreciated, I pulled this together in about an hour or two. Here's my image, you can make your own if you like:

https://vborg.vbsupport.ru/

Thanks, hope it works!

If you liked this mod, please make sure to:

CLICK INSTALL!

Post yuor feedback, especially since this is my first mod!!!

Selene 08-25-2005 01:15 PM

any screenshots

hotrod1 08-25-2005 02:29 PM

<a href="http://www.guipowered.com/member.php?userid=1" target="_blank">http://www.guipowered.com/member.php?userid=1</a>

At that page take a look at the dialog box.

Spike223 08-25-2005 04:00 PM

Ahh, sorry, I should have done that. Here are some screens from my board: (it looks the exact same on the member's list, too)

Lee 08-25-2005 04:03 PM

It looks like a wonderful hack, and I have it installed and working, save one thing.

On any given member's profile page, the name refuses to show up next to the Google Talk image... perhaps someone could help me here? I've looked over the code, and I can't really figure out exactly what went wrong.

Example: http://www.zeldauniverse.net/forums/member.php?u=6838

Spike223 08-25-2005 04:21 PM

In your template "MEMBERINFO", make sure that you followed the directions in the mod exactly. Do you see text that matches this::

Code:

<if condition="$userinfo[field10]">
                                <tr>
                                        <td><a href="#" onclick="return imwindow('gt', '$userinfo[userid]', 450, 200)"><img src="images/misc/im_gt.gif" border="0"></a></td>
                                        <td><a href="#" onclick="return imwindow('gt', '$userinfo[userid]', 450, 200)">$userinfo[field10]</a></td>
                                </tr>
                                </if>

Make sure that you are using your correct profile field, NOT mine, which happened to be "field10" (unless yours is field10, as well). There are two places in this code where you must modify this, and I think that's your problem. :P

Lee 08-25-2005 05:14 PM

Ah, thank you for that. There was one field10 I had neglected to change, and that was the issue. It's working great now, awesome hack! You can check that same link again to see it, obviously.

And for those looking for a better speech bubble image, I went ahead and made one:

http://www.zeldauniverse.net/forums/...misc/im_gt.gif
http://www.zeldauniverse.net/forums/images/misc/im_gt.gif

yupfish 08-25-2005 05:27 PM

Thanks!

Spike223 08-25-2005 07:12 PM

We are in the works of porting this over to vBulletin 3.5, so when it is complete, I will post it in that section of the forums.

JsnakeJ 08-25-2005 08:26 PM

Wow thats quick since this just came out. Thank you, appreciate it.

Spike223 08-26-2005 01:57 AM

Thread Closed, This Hack is now official.

https://vborg.vbsupport.ru/showthread.php?t=95094


All times are GMT. The time now is 02:20 AM.

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.01152 seconds
  • Memory Usage 1,773KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete