Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Gary on June 24, 2005, 12:30:09 PM

Title: Gmail Field
Post by: Gary on June 24, 2005, 12:30:09 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=160)

This mod will add a Gmail Icon on the Posts screen as well as the option to enter it in your profile. It will also double up as an email field.

Tested with 1.0.3, 1.0.4, 1.0.5, 1.1 Beta 3, 1.1 Beta 3 Public.

Here are some previews:
(http://img.photobucket.com/albums/v159/Gazmuyloco/gmail1.jpg)
(http://img.photobucket.com/albums/v159/Gazmuyloco/gmail2.jpg)
(http://img.photobucket.com/albums/v159/Gazmuyloco/gmail3.jpg)

Thanks goes to [Unknown] for his tutorial. :)

I've only tested it on the default theme. So it currently does not work with the others. You're more than welcome to post for advice on how to get it working on the others.



Version 1.1

I have re-writen a small part of the mod to allow the user NOT to have to enter "@gmail.com" as part of their Gmail Username, as that is now entered automtically. The mod is in "gmail11.zip"

Previews:
(http://img.photobucket.com/albums/v159/Gazmuyloco/1.jpg)
(http://img.photobucket.com/albums/v159/Gazmuyloco/11gmail2.jpg)
(http://img.photobucket.com/albums/v159/Gazmuyloco/11gmail3.jpg)

Special Thanks:
Mike Frith & Joe Leslie - Testing in SMF 1.0.4
ivo2296 - Installing on SMF 1.0.5 and posting of the results
me - for writing it and testing it in SMF 1.0.3, SMF 1.1 Beta 3, SMF 1.1 Beta 3 Public ;)
[Unknown] - For his awsome tutorial
Title: Re: Gmail Field
Post by: dtm.exe on June 24, 2005, 12:34:02 PM
Nice mod :).

-Dan The Man
Title: Re: Gmail Field
Post by: Gary on June 24, 2005, 12:55:36 PM
Thanks. It took a bit of time to get it working, but I got there. I've purposly left it off on pages so I can work on new versions. ;)

And the previews come with a free shameless plug of my website.  :P
Title: Re: Gmail Field
Post by: ivo2296 on June 24, 2005, 01:50:41 PM
The mod works with 1.0.5 on the default theme only.
Title: Re: Gmail Field
Post by: dtm.exe on June 24, 2005, 01:51:45 PM
Quote from: ivo2296 on June 24, 2005, 01:50:41 PM
The mod works with 1.0.5 on the default theme only.

As do most mods.

How to make mods work with themes (http://www.simplemachines.org/community/index.php?topic=34526.0).

-Dan The Man
Title: Re: Gmail Field
Post by: codenaught on June 24, 2005, 01:52:14 PM
Nice mod. I do very much like gmail.  ;)
Title: Re: Gmail Field
Post by: Gary on June 24, 2005, 01:58:53 PM
Quote from: ivo2296 on June 24, 2005, 01:50:41 PM
The mod works with 1.0.5 on the default theme only.

Like I've said, It only works on the default theme. To make it work in other themes is quite simple.
Title: Re: Gmail Field
Post by: Mike Frith on June 24, 2005, 04:42:32 PM
great mod Gary... nice work
Title: Re: Gmail Field
Post by: Gary on June 25, 2005, 07:44:01 AM
I will try to add this to pages such as the who's online page, and a couple of others where MSN etc is called for.
Title: Re: Gmail Field
Post by: Gary on June 27, 2005, 12:01:56 PM
I have re-writen a small part of the mod to allow the user NOT to have to enter "@gmail.com" as part of their Gmail Username, as that is now entered automtically. The mod is in "gmail11.zip"

Previews:
(http://img.photobucket.com/albums/v159/Gazmuyloco/1.jpg)
(http://img.photobucket.com/albums/v159/Gazmuyloco/11gmail2.jpg)
(http://img.photobucket.com/albums/v159/Gazmuyloco/11gmail3.jpg)

Remember to Uninstall 1.0 if you're gonna use 1.1.
Title: Re: Gmail Field
Post by: Luciano-Biló on July 04, 2005, 10:09:05 PM
Don't you believe gary that is better than the option Gmail, this between Msn and Yim? If the 3 are mail because this totally an opinion is not been separated.

Greetings and very good mod happiness
Title: Re: Gmail Field
Post by: Gary on July 08, 2005, 06:05:49 AM
Soooo... you're saying that I should place it between the MSN icons and the YIM icons?
Title: Re: Gmail Field
Post by: d3v on July 09, 2005, 01:52:09 AM
Just a simple question. Is there something drastically different between Gmail and other mail providers ( besides the space offered) that triggered you to code such a mod that pays special attention to this mail provider. Thank you, this is not mean to offend in any way.
Title: Re: Gmail Field
Post by: Gary on July 09, 2005, 05:26:20 AM
No. There really isnt much difference, I just thought that since Gmail is growing in popularity, I thought that it'd be worth having something like this for it.
Title: Re: Gmail Field
Post by: Luciano-Biló on July 09, 2005, 08:15:22 PM
Quote from: Gary G. on July 08, 2005, 06:05:49 AM
Soooo... you're saying that I should place it between the MSN icons and the YIM icons?

Yes men ;)

Title: Re: Gmail Field
Post by: Gary on July 10, 2005, 06:47:25 AM
Currently, I'm in Greece, I tried to do something like that and it turned out futile, I'll have another go in a couple of weeks.
Title: Re: Gmail Field
Post by: perplexed on July 28, 2005, 12:52:01 PM
Hi

i installed this mod, there were no error messages BUT I cant see it anywhere?

ie it doesnt appear in profile or anywhere else that I can see.

what could be the problem?
Title: Re: Gmail Field
Post by: dtm.exe on July 28, 2005, 01:47:25 PM
Quote from: elliel on July 28, 2005, 12:52:01 PM
Hi

i installed this mod, there were no error messages BUT I cant see it anywhere?

ie it doesnt appear in profile or anywhere else that I can see.

what could be the problem?


Are you using a custom theme?

-Dan The Man
Title: Re: Gmail Field
Post by: perplexed on July 30, 2005, 09:48:01 PM
um yes :D

do I need to put it in the custom theme or does it not work with custom themes at all? :(
Title: Re: Gmail Field
Post by: dtm.exe on July 31, 2005, 12:22:51 AM
Quote from: elliel on July 30, 2005, 09:48:01 PM
um yes :D

do I need to put it in the custom theme or does it not work with custom themes at all? :(

It will work with cutom themes depending on if he custom themes contain Display.template.php and Profile.template.php.  Not to mention that the image will need to be manually added to the images folder of that sutom theme.

-Dan The Man
Title: Re: Gmail Field
Post by: perplexed on July 31, 2005, 06:21:51 AM
ah ha - ok, thanks I will try that :D  I know profile is there but I don't think display is.
Title: Re: Gmail Field
Post by: perplexed on July 31, 2005, 06:31:53 AM
Nope still nothing. LOL

I have a display.template.php and a profile.template.php in the custom theme and I added the gmail.gif to the images folder of the custom theme but I looked in my profile and it doesn't show up.

I have some extra fields in profile, just some extra info for people to put in free text, like favourite this or favourite that etc, that wouldn't be a problem would it?

Title: Re: Gmail Field
Post by: Louis on August 07, 2005, 02:40:30 AM
Might be a silly question, but anyway:
Do your customized profile and display.template contain all the modifications this mod made to the default ones?

Dan already mentioned it on the first page: How to make mods work with themes (http://www.simplemachines.org/community/index.php?topic=34526.0)

8)
Title: Re: Gmail Field
Post by: Anakin_holland on August 19, 2005, 03:10:37 PM
Hello Gary,

Installed the mod a couple of weeks back, and enjoyed it so far! One note though. I just noticed that the icon is visible and thus active for guests, unlike all the other icons, which are not displayed?

Cheers!

Anakin
Title: Re: Gmail Field
Post by: eXtreme on August 25, 2005, 12:15:27 PM
By default it doesnt show up on profile summary like other fields (i.e it doesnt show an empty space with the field name"Gmail username:" unlike others)

ICQ:      
AIM:       
MSN:       
YIM:

"Gmail username:" field is visible in profile summary only after adding the gmail username in "forum profile information".This is on my default theme.

It doesnt show the gmail icon(besides yim,msn) in the posts.

what could be the problem?do i need to change anything?

Title: Re: Gmail Field
Post by: Gary on September 19, 2005, 09:54:11 AM
Yes, Yes, There are problems, I've not configured it fully yet, and I'm learning PHP as it is. It'll take time while I work on it using MT2.
Title: Re: Gmail Field
Post by: damacguy on December 28, 2005, 05:41:33 PM
How can I add the gmail icon to the profile info in the private message screen?

I've looked in personalmessage.template.php, but i'm not quite sure what to put where. I looked in profile.template.php and display.template.php, but can't seem to find the right code.  :-\
Title: Re: Gmail Field
Post by: RoarinRow on December 28, 2005, 09:09:15 PM
Very cool mod, thanks!
Title: Re: Gmail Field
Post by: Hawkes on January 03, 2006, 04:45:46 PM
RC2 compatibility?
Title: Re: Gmail Field
Post by: Gary on January 04, 2006, 04:16:51 AM
It should be compatible with RC2 unless the code for the default theme for it has changed.
Title: Re: Gmail Field
Post by: perplexed on February 08, 2006, 03:37:28 PM
Quote from: Louis on August 07, 2005, 02:40:30 AM
Might be a silly question, but anyway:
Do your customized profile and display.template contain all the modifications this mod made to the default ones?

Dan already mentioned it on the first page: How to make mods work with themes (http://www.simplemachines.org/community/index.php?topic=34526.0)

8)

lol probably not since I dont know how to do that.

The funny thing is that I added my gmail email address when using the default theme and the gmail icon now shows up with the yahoo, aol etc ones in the other themes yet there is no field for it to be entered lol

*goes to lie down*
Title: Re: Gmail Field
Post by: damacguy on February 10, 2006, 05:37:49 PM
Suggested revision for this mod...

Move the Gmail field from under website info to the IM section (under ICQ, AIM, MSN, YIM).

I can do this manually by hacking the file, but this might be better as a default location unless there's a reason for putting it in the webaddress section.
Title: Re: Gmail Field
Post by: Dexy on February 25, 2006, 12:50:50 PM
I use theme named 'defaultxt', but this mod is just for 'default'...
can i change this? tnx
Title: Re: Gmail Field
Post by: Gary on February 25, 2006, 01:18:59 PM
You can put it into any theme you want.

How to make mods work in custom themes. (http://www.simplemachines.org/community/index.php?topic=34526.0)

-AwwLilMaggie
Title: Re: Gmail Field
Post by: Dexy on February 25, 2006, 01:36:08 PM
It doesnt help  >:( i cant find anything from tutorial in my gmail mod  >:(
Title: Re: Gmail Field
Post by: Dexy on February 25, 2006, 01:37:50 PM
for example there is no file ending with .mod, and when i open modification.xml i cant find  <edit file>...</edit file>
Title: Re: Gmail Field
Post by: Gary on February 25, 2006, 01:56:22 PM
Thats coz its <file name="$themedir/Profile.template.php"> and <file name="$themedir/Display.template.php">

-AwwLilMaggie
Title: Re: Gmail Field
Post by: Dexy on February 26, 2006, 06:58:07 AM
can u write complite code fro path "themes/defaultxt/...." ?
Title: Re: Gmail Field
Post by: Gary on February 28, 2006, 10:26:42 AM
I guess it could be possible, but its not really hard to modify the files yourself.

Just do thisl;

In Profile.template.php

Find
<td><input type="text" name="websiteUrl" size="50" value="', $context['member']['website']['url'], '" /></td>

Add after
</tr><tr>
<td><b>Gmail Username: </b></td> <td><input type="text" name="default_options[gmail]" size="50" value="', @$context['member']['options']['gmail'], '" /></td>


Find
<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>


Add after:
</tr><tr>
', !empty($context['member']['options']['gmail']) ? '</tr><tr> <td><b>Gmail Username: </b></td> <td>' . $context['member']['options']['gmail'] . '</td>' : '', '



In Display.template.php
find
// Show their personal text?
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '
', $message['member']['blurb'], '<br /> <br />';


Add after;
if (!empty($message['member']['options']['gmail'])) echo '<a href="mailto:', $message['member']['options']['gmail'], '@gmail.com"><img border="0" src="' . $settings['images_url'] . '/gmail.gif"></a>';


I'm yet to make do all the stuff I want it to do though, and I'll making more releases for it when I get more time. I've got alot of college assignments to do.

-AwwLilMaggie
Title: Re: Gmail Field
Post by: tinatoth on March 06, 2006, 03:40:14 PM
so .. im supposed to just upload the zip file through the "packages" section in the admin panel, and then click to install it? and then it says it sucessfully installed, and that's it yeah?

well... nothing happened. It "sucessfully installed", but i get no gmail icon, and no field in the profile to enter gmail into. Im on 1.0.6 on a theme that was based on default... is that the problem perhaps?
Title: Re: Gmail Field
Post by: Gary on March 06, 2006, 07:17:40 PM
You need to upload gmail.gif to your themes images folder.
Title: Re: Gmail Field
Post by: tinatoth on March 06, 2006, 07:22:53 PM
no, that's not the thing, I don't even get an option to enter a gmail address in the profile edit page, and if there was supposed to be a gif image next to my posts, which hadnt been uploaded, there would be a red cross in its place, and there is not.
Title: Re: Gmail Field
Post by: Gary on March 06, 2006, 08:29:12 PM
well, then follow my instructions above to add the required code to your theme. Since seems that your theme has its own profile.template.php
Title: Re: Gmail Field
Post by: Prasad007 on March 14, 2006, 07:45:58 AM
When will this mod be SMF 1.1 RC 2 compatible ?
Title: Re: Gmail Field
Post by: Gary on March 14, 2006, 11:49:38 AM
When I get time.

I've got like a month to do six college assignments. My education comes before anything web-based. :P

But since the mod is something simple, I'll do it now. I'll be able to use my friends test board. ;)
Title: Re: Gmail Field
Post by: Prasad007 on March 14, 2006, 11:51:27 AM
Okay. :)
And its just the reverse for me :P
Can you believe it i have an exam in the next few hours, and im here in forums posting...
Title: Re: Gmail Field
Post by: TechnoDragon on March 14, 2006, 01:31:47 PM
I was able to get this integrated just like my skype and vetrilo icons at my forum using RC2 and TPv0.8.6
Title: Re: Gmail Field
Post by: Gary on March 14, 2006, 03:50:03 PM
Can you PM me the code you did to integrate it? that or mail it to me on [email protected]

Quote from: Prasad007 on March 14, 2006, 11:51:27 AM
Can you believe it i have an exam in the next few hours, and im here in forums posting...

I went onto message boards IN the actual exam. Beat that! ;)
Title: Re: Gmail Field
Post by: Prasad007 on March 15, 2006, 09:22:45 AM
Quote from: Gary G. on March 14, 2006, 03:50:03 PM


I went onto message boards IN the actual exam. Beat that! ;)
i dare not :P
Title: Re: Gmail Field
Post by: Aravot on September 28, 2006, 01:15:18 PM
Does this mod work with SMF 1.1 RC3
Title: Re: Gmail Field
Post by: Gary on September 28, 2006, 03:36:13 PM
Sorry, but it doesnt at the moment, I never even updated it for RC2. :P I've been pretty busy these days.
Title: Re: Gmail Field
Post by: Aravot on October 08, 2006, 04:05:48 AM
Do you plan on updating this mod in near future (couple of weeks).
Title: Re: Gmail Field
Post by: Gary on October 08, 2006, 08:37:05 AM
Maybe once Final has been released.

-AwwLilMaggie
Title: Re: Gmail Field
Post by: Geezer on October 09, 2006, 12:37:00 PM
Quote from: Aravot on September 28, 2006, 01:15:18 PM
Does this mod work with SMF 1.1 RC3

We're running rc3 and it works great

Just wondered what code I could add so that where field is filled in in profile, can only be edited by admin? or mods? It may sound silly but were using it for something else.
Thanks
Title: Re: Gmail Field
Post by: Aravot on October 09, 2006, 12:48:11 PM
Quote from: AwwLilMaggie on October 08, 2006, 08:37:05 AM
Maybe once Final has been released.

-AwwLilMaggie

I just intalled it on RC3 and it works fine.
Title: Re: Gmail Field
Post by: Gary on October 09, 2006, 01:10:31 PM
Sweeeet. Less work for me. :P ;)

-AwwLilMaggie
Title: Re: Gmail Field
Post by: Matthew Schenker on March 09, 2007, 10:10:12 AM
I really like this, as a lot of my members have GMail accounts.
I tried this out on 1.1.2, and it does not show up.  I see the other e-mail options here:
Profile > Modify profile > Forum Profile Information

Is this where the Gmail field should be?

Maybe this is not functional in 1.1.2?
Title: Re: Gmail Field
Post by: Gary on March 09, 2007, 10:20:29 AM
It should be in The Forum Profile Information below the Website field.

I seriously need to get this thing updated. :P

-AwwLilMaggie
Title: Re: Gmail Field
Post by: Matthew Schenker on March 09, 2007, 10:34:28 AM
AwwLilMaggie,
Thanks for the reply.  I just checked again, and there it is, right where you said it should be!

I know it's being nit-picky, but is there a way to put this together with the other contact addresses?
It would make more logical sense, at least to me, if it was in the same section as ICQ, AIM, MSN, and YIM.  Again, I know I'm being nit-picky.

Thanks for a great modification.
Title: Re: Gmail Field
Post by: Gary on March 09, 2007, 10:48:29 AM
Quote from: MatthewSchenker on March 09, 2007, 10:34:28 AM
AwwLilMaggie,
I know it's being nit-picky, but is there a way to put this together with the other contact addresses?
It would make more logical sense, at least to me, if it was in the same section as ICQ, AIM, MSN, and YIM.  Again, I know I'm being nit-picky.

Yeah, I know, thats something I've been meaning to do. But I just really never had time to sort it. :P

-AwwLilMaggie
Title: Re: Gmail Field
Post by: DJ_Kukky on August 24, 2007, 05:57:03 PM
I have Gmail Field 1.1 , i just want to say that after installing i lost XHTML validation... ( http://validator.w3.org/ )

what you need to edit is:


modification.xml  Line: 55

<![CDATA[if (!empty($message['member']['options']['gmail'])) echo '<a href="mailto:', $message['member']['options']['gmail'], '@gmail.com"><img border="0" src="' . $settings['images_url'] . '/gmail.gif" alt="Gmail" /></a>';

changes:
missing alt attribute in img tag
img tag is not closed


sry on my english

by DJ_Kukky
Title: Re: Gmail Field
Post by: sChen on January 07, 2008, 07:57:00 AM
have i understand it right ? this mod don't work with SMF 1.1.4 ?
Title: Re: Gmail Field
Post by: Gary on January 07, 2008, 08:10:18 AM
No. I have long dropped support for this mod since 1.1 RC1 as I have moved from an "one for all" philosophy I had back in 2005 to the Theme specific area I have now. If anyone wants to update it for me, then they can do so and let me know.
Title: Re: Gmail Field
Post by: sChen on January 07, 2008, 08:31:07 AM
ok thanx
Title: Re: Gmail Field
Post by: TheListener on June 17, 2009, 01:17:07 PM
Being a big fan of gmail is this available for RC1-1?

(Looks for the whip)

Title: Re: Gmail Field
Post by: Gary on June 17, 2009, 01:36:06 PM
I've long since stopped supporting the Gmail field mod, as I have moved from the jack of all trades philosophy I was going for back in 2005 to the now, theme specific approach. So there wont be a 2.0 compatible version by me.

Someone can contact me to take over the mod if they wish, or you could use the Custom Profile Fields feature in 2.0 as a workaround.
Title: Re: Gmail Field
Post by: TheListener on June 17, 2009, 01:37:30 PM
 :(

Consider yourself whipped.