Okay, as far as I can tell, for this to work you must be using the development version of GTalk. To use this mod the phpbb GTalk mod must already be installed.
Code: Select all
##############################################################
## MOD Title: phpBB GTalk (Google Talk) Support (gtalk URI)
## MOD Author: ptlis < [email protected] > (Brian Ridley) http://www.ptlis.net
## MOD Description: Modifies the phpBB GTalk (Google Talk) Support mod to use
## the gtalk URI
## MOD Version: 1.0.0
##
## Installation Level: (Beginner)
## Installation Time: 2 Minutes
## Files To Edit: viewtopic.php
## includes/usercp_viewprofile.php
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## As with the phpBB GTalk (Google Talk) Support, this has been tested with
## phpBB 2.0.10 - 2.0.22 only, although I would imagine it should install
## sucessfully on previous and/or future revisions of the 2.0.xx release.
##
## This modification is Free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as published
## by the Free Software Foundation; either version 2 of the License, or (at
## your option) any later version.
##
## http://www.fsf.org/licensing/licenses/gpl.html
##############################################################
## MOD History:
##
## 2007-04-14 - Version 1.0.0
## - Initial addition of this mod to the /contrib/ section of the phpBB
## GTalk (Google Talk)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
privmsgs.php
#
#-----[ FIND ]------------------------------------------------
#
$gtalk_img = ( $privmsg['user_gtalk'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_gtalk'] . '" alt="' . $lang['GTALK'] . '" title="' . $lang['GTALK'] . '" border="0" /></a>' : '';
#
#-----[ REPLACE WITH ]----------------------------------------
#
$gtalk_img = ( $privmsg['user_gtalk'] ) ? '<a href="gtalk:chat?jid=' . $privmsg['user_gtalk'] . '"><img src="' . $images['icon_gtalk'] . '" alt="' . $lang['GTALK'] . '" title="' . $lang['GTALK'] . '" border="0" /></a>' : '';
#
#-----[ OPEN ]------------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------------
#
$gtalk_img = ( $profiledata['user_gtalk'] ) ? $profiledata['user_gtalk'] : ' ';
#
#-----[ REPLACE WITH ]----------------------------------------
#
$gtalk_img = ( $profiledata['user_gtalk'] ) ? '<a href="gtalk:chat?jid=' . $profiledata['user_gtalk'] . '"><img src="' . $images['icon_gtalk'] . '" alt="' . $lang['GTALK'] . '" title="' . $lang['GTALK'] . '" border="0" /></a>' : ' ';
#
#-----[ OPEN ]------------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------------
#
$gtalk_img = ( $postrow[$i]['user_gtalk'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_gtalk'] . '" alt="' . $lang['GTALK'] . '" title="' . $lang['GTALK'] . '" border="0" /></a>' : '';
#
#-----[ REPLACE WITH ]----------------------------------------
#
$gtalk_img = ( $postrow[$i]['user_gtalk'] ) ? '<a href="gtalk:chat?jid=' . $postrow[$i]['user_gtalk'] . '"><img src="' . $images['icon_gtalk'] . '" alt="' . $lang['GTALK'] . '" title="' . $lang['GTALK'] . '" border="0" /></a>' : '';
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
I'd appreciate if people would test this, and if there are any problems please post detailed accounts of them here.
ladybuggirl wrote:
does this mod work only with the subsilver template? i'm using the jasidog template and there is no imput field on the profile page, nor a button on any posts.
(it does show on the subilver template though)
Out of the box it does not (due to the relative crudeness of phpBB's templating system), however modifying other templates to support this is relatively trivial if you're familiar with HTML (the only issue is creating an appropriate GTalk image).
The following files need to be opened within your favourite text editor:
templates/[template name]/privmsgs_read_body.tpl
templates/[template name]/profile_add_body.tpl
templates/[template name]/profile_view_body.tpl
templates/[template name]/viewtopic_body.tpl
templates/[template name]/admin/user_edit_body.tpl
In each of these files there should be a single block of markup dealing with MSN, e.g. in profile_view_body.tpl for the subSilver template:
Code: Select all
<tr>
<td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_MESSENGER}:</span></td>
<td class="row1" valign="middle"><span class="gen">{MSN}</span></td>
</tr>
To add GTalk support for this file you must literally duplicate this chuck of markup below itself, then in the second instance of it replace the template variables L_MESSENGER with L_GTALK and MSN with GTALK. Follow this procedure for each of the five template files above.
Next you need to open
templates/[template name]/[template name].cfg and search for
$images['icon_msnm'] = "$current_template_images/{LANG}/icon_msnm.gif";, after this you need to add
$images['icon_gtalk'] = "$current_template_images/{LANG}/icon_gtalk.gif";.
Finally, create an appropriate GTalk image, name it icon_gtalk.gif and place it in
templates/[template name]/images/lang_english/ (or whatever language you're using within your phpBB installation).
Following these simple steps you can add GTalk support to any template.
ptlis
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.....my life is my own.