Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: snork13 on February 03, 2006, 12:37:27 AM

Title: EmailFlash
Post by: snork13 on February 03, 2006, 12:37:27 AM
Link to Mod (http://mods.simplemachines.org/index.php?mod=260)

I just packaged up this "tip and trick"  for use on the default 1.1RC2 theme, and thought I would share.

example below:
(http://img365.imageshack.us/img365/8859/emailflash8qa.gif)

http://www.simplemachines.org/community/index.php?topic=65565.0 (http://www.simplemachines.org/community/index.php?topic=65565.0)

and from here:

http://www.simplemachines.org/community/index.php?topic=9017.0 (http://www.simplemachines.org/community/index.php?topic=9017.0)
Title: Re: EmailFlash
Post by: damacguy on February 03, 2006, 03:12:18 PM
Works like a charm!

You might want to look at adding an option to the Personal Messages section of the Profile giving users an option of using this or the popup message (or both).

Thanks for a nifty mod.
Title: Re: EmailFlash
Post by: TwinsX2Dad on February 23, 2006, 03:50:33 AM
Maybe it is the hour. Maybe I am blind. Maybe I am simply stupid. But I am using TP Helios Multi and tried to extract the code from the default index.template.php and three times I caused a parse error.

What should I be adding to it, knowing I also have SMF Arcade hacked into that file?
Title: Re: EmailFlash
Post by: K_4_kelly on May 05, 2006, 08:03:45 PM
i love to install this mod, but unfortunately, it failed and show the message below, could anyone can tell me how to solve it?

thanks!

1. Execute Modification ./Themes/default/index.template.php Test failed
Title: Re: EmailFlash
Post by: K_4_kelly on May 07, 2006, 07:11:45 AM
please...
Title: Re: EmailFlash
Post by: snork13 on May 07, 2006, 09:51:43 AM
you could look at the modification.xml file, and make the code change by hand!
Title: Re: EmailFlash
Post by: K_4_kelly on May 07, 2006, 11:03:21 AM
hi, thanks for your reply,

could you please tell me the code that need to change?

thanks thanks
Title: Re: EmailFlash
Post by: K_4_kelly on May 09, 2006, 10:54:25 AM
thanks

i've managed to edit it by referring to the above two links.

thanks
Title: Re: EmailFlash
Post by: Vinspire on May 31, 2006, 01:04:14 PM
Nice mod  ;) ;) ;)
Title: Re: EmailFlash
Post by: trenchteam on June 01, 2006, 03:04:30 AM
I like it alot!!! ;D ;D ;D
Title: Re: EmailFlash
Post by: S1L1C0N on September 05, 2006, 12:48:31 AM
Im not very good at decyphering the .xml file to do this by hand, can someone do the typical find/replace post in here to make it easier for us n00bs?

Thanks guys!
Title: Re: EmailFlash
Post by: SusanTN on September 05, 2006, 01:16:58 AM
Quote from: S1L1C0N on September 05, 2006, 12:48:31 AM
Im not very good at decyphering the .xml file to do this by hand, can someone do the typical find/replace post in here to make it easier for us n00bs?

Thanks guys!

Why do it by hand? Can you not use the package manager?
Title: Re: EmailFlash
Post by: S1L1C0N on September 05, 2006, 01:22:14 AM
Not for custom theme.
Title: Re: EmailFlash
Post by: URPG on September 10, 2006, 08:16:49 AM
Yeah, only works for default theme, would like it in all themes... can't you add something to the package installing it into all themes? Then you would just have to replace the small mail icon graphic in each theme folder...
Title: Re: EmailFlash
Post by: marinelife on September 13, 2006, 12:04:57 AM
get these errors in my log


http://www.masohio.com/index.php?action=packages;sa=install2;package=EmailFlash10.zip 
2: fopen(D:\web\masohio\Themes\default/images/Thumbs.db) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied
File: D:\web\masohio\Sources\Subs-Package.php
Line: 1930

http://www.masohio.com/index.php?action=packages;sa=install2;package=EmailFlash10.zip 
2: fwrite(): supplied argument is not a valid stream resource
File: D:\web\masohio\Sources\Subs-Package.php
Line: 1931

http://www.masohio.com/index.php?action=packages;sa=install2;package=EmailFlash10.zip 
2: fclose(): supplied argument is not a valid stream resource
File: D:\web\masohio\Sources\Subs-Package.php
Line: 1932

It seems to work but I got these as soon as I installed it

Title: Re: EmailFlash
Post by: URPG on November 01, 2006, 05:22:13 AM
*still waiting patiently for a 'multiple themes' version*
Title: Re: EmailFlash
Post by: Vinspire on November 02, 2006, 03:58:10 AM
Quote from: URPG on November 01, 2006, 05:22:13 AM
*still waiting patiently for a 'multiple themes' version*

I don't think there will be any version that will work in all the themes / multiple themes by just installing it through the package.

The solution to ur problem is look into the .xml file attached in the .zip file and make a manual installation on the theme that you want to install this mod.
Title: Re: EmailFlash
Post by: URPG on November 02, 2006, 06:21:18 AM
How does the line of code look that produces the "My message" text and where is it found? Guess i just got to copy+paste your code in there?
Title: Re: EmailFlash
Post by: Vinspire on November 02, 2006, 07:49:44 AM
Quote from: URPG on November 02, 2006, 06:21:18 AM
How does the line of code look that produces the "My message" text and where is it found? Guess i just got to copy+paste your code in there?

Can you paste the codes you are talking about ? You are trying to get this to work with other theme right ?
Title: Re: EmailFlash
Post by: URPG on November 02, 2006, 11:11:18 AM
I'd like to know in what file I would have to post what code so I can make it work. I guess I have to edit it in behind the code that generates the "My Messages" link and copy the pictures into each theme folder. But i would need to copy what, where into which file :)
Title: Re: EmailFlash
Post by: snork13 on November 02, 2006, 01:29:07 PM
Quote from: URPG on November 02, 2006, 11:11:18 AM
I'd like to know in what file I would have to post what code so I can make it work. I guess I have to edit it in behind the code that generates the "My Messages" link and copy the pictures into each theme folder. But i would need to copy what, where into which file :)
just open up the modification .xml file. within the zip. There you will see what files are edited, and what code needs to be added. You will also need to place the image in your custom theme's image folder.

-Snork13
Title: Re: EmailFlash
Post by: delayed_1 on December 09, 2006, 10:52:19 AM
Works great, Thank you for this handy MOD
Title: Re: EmailFlash
Post by: Vinspire on December 25, 2006, 12:00:36 PM
Does it work on SMF 1.1.1 ?
Title: Re: EmailFlash
Post by: Simplemachines Cowboy on December 25, 2006, 01:13:31 PM
Yes it does.
Title: Re: EmailFlash
Post by: Vinspire on December 26, 2006, 11:08:45 AM
Quote from: Simplemachines Cowboy on December 25, 2006, 01:13:31 PM
Yes it does.

I c. Thanks for the reply :)
Title: Re: EmailFlash
Post by: buhaychat.com on January 14, 2007, 03:43:07 AM
easy install on my 1.1.1.. thanks!
Title: Re: EmailFlash
Post by: JustSimpsons on February 06, 2007, 11:15:56 PM
This mod doesn't work. I have SMF version 1.1.1 with a custom theme and I opened the xml file and tried to install it as this thread suggests but it will not work. I keep getting parse errors. If anyone knows how to make this mod work on v.1.1.1 with a custom theme, please reply here. Thank you.
Title: Re: EmailFlash
Post by: snork13 on February 06, 2007, 11:21:58 PM
Quote from: JustSimpsons on February 06, 2007, 11:15:56 PM
This mod doesn't work. I have SMF version 1.1.1 with a custom theme and I opened the xml file and tried to install it as this thread suggests but it will not work. I keep getting parse errors. If anyone knows how to make this mod work on v.1.1.1 with a custom theme, please reply here. Thank you.

OK, where did you put the code, can you post the lines edited...
Title: Re: EmailFlash
Post by: JustSimpsons on February 06, 2007, 11:31:54 PM
The code I currently have in my theme's index.template.php file:
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
</td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


The code I am replacing that entire blurb above with:

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]&nbsp;&nbsp;<img src="' . $settings['images_url'] . '/msg.gif" border="0" />' : '' , '</a>


Maybe I'm doing something wrong, I don't know.
Title: Re: EmailFlash
Post by: JustSimpsons on February 07, 2007, 01:44:11 PM
I got it to work! I had to change this:

</strong>]&nbsp;&nbsp;<img src="' . $settings['images_url'] . '/msg.gif" border="0" />' : '' , '</a>

to this:

</strong>]&nbsp;&nbsp;<img src="http://www.mywebsite.com/forum/Themes/mytheme/images/msg.gif" border="0" />' : '' , '</a>

I guess the way it was put in there originally was preventing it from accessing the image. All fixed now though.
Title: Re: EmailFlash
Post by: snork13 on February 07, 2007, 03:49:54 PM
Quote from: JustSimpsons on February 07, 2007, 01:44:11 PM
I got it to work! I had to change this:

</strong>]&nbsp;&nbsp;<img src="' . $settings['images_url'] . '/msg.gif" border="0" />' : '' , '</a>

to this:

</strong>]&nbsp;&nbsp;<img src="http://www.mywebsite.com/forum/Themes/mytheme/images/msg.gif" border="0" />' : '' , '</a>

I guess the way it was put in there originally was preventing it from accessing the image. All fixed now though.

You can change it back, you just need to have the image in your custom them. The mod only installs for the default theme.

-Snork13
Title: Re: EmailFlash
Post by: Matthew Schenker on February 26, 2007, 07:45:15 AM
I had this modification running fine, but then I upgraded to 1.1.2, and it stopped working.  Can you tell me how to get it working again?
Thanks,
Matthew
Title: Re: EmailFlash
Post by: LGLDSR on March 08, 2007, 09:24:08 AM
I am using the Default Theme, 1.1.2, and this mod isn't working. Installation was a breeze, no issues...but nada.

Any thoughts?

Thanks,

Lyman
Title: Re: EmailFlash
Post by: LGLDSR on March 08, 2007, 09:30:12 AM
Quote from: snork13 on February 07, 2007, 03:49:54 PM
Quote from: JustSimpsons on February 07, 2007, 01:44:11 PM
I got it to work! I had to change this:

</strong>]&nbsp;&nbsp;<img src="' . $settings['images_url'] . '/msg.gif" border="0" />' : '' , '</a>

Thanks! I'll try that and let you know how it goes.

to this:

</strong>]&nbsp;&nbsp;<img src="http://www.mywebsite.com/forum/Themes/mytheme/images/msg.gif" border="0" />' : '' , '</a>

I guess the way it was put in there originally was preventing it from accessing the image. All fixed now though.

You can change it back, you just need to have the image in your custom them. The mod only installs for the default theme.

-Snork13
Title: Re: EmailFlash
Post by: TrueSatan on March 08, 2007, 09:41:12 AM
Hmmm I'm running it in SMF 1.1.2 with no issues whatever.

If it won't work in the default theme:

Have you checked to see that the images are in place?

<forum root>/themes/<themename>/images/

You should find msg.gif and EmailFlash.gif

N.B. Snork...you've left some horrible, festering thumbs.db file in your images directory in the mod. It won't stop the mod from working (obviously) but it's still a cancerous Microsoft infestation.

Those who've upgraded a forum and can't get the mod to work might first try uninstalling it then installing it again. Other than that how about letting us see your <forum root>/themes/<themename>/index.template.php file...that is the only file this mod changes so you can be sure that any problem with it will be there or with the images not being where they need to be.

You might also like to go delete any thumbs.db files off of a Linux server...OK I'll stop having a dig about that after one last comment.

Thanks for the mod Snork...would you like a certain file back?
Title: Re: EmailFlash
Post by: dork313 on June 20, 2007, 03:48:45 PM
I use the Cerberus theme and I messed around for awhile trying to get this mod to work on it. In the end it turned out to be quite simple.

First off, the Cerberus theme doesn't have:
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>


So find this instead:
                        echo $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];

Then replace it with:
                        echo '<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]&nbsp;&nbsp;<img src="' . $settings['images_url'] . '/msg.gif" border="0" />' : '' , '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];

Now I'm not a php expert or anything but this works great for me.
Title: Re: EmailFlash
Post by: dork313 on June 25, 2007, 09:05:13 PM
I actually adjusted my coding again. This time I removed
', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']; from the replace with line because that code was apart of the original theme. Now it just says My Messages and only shows when there is a new one along with the flashing email icon.

This mod was exactly what my members wanted btw, thank you.
Title: Re: EmailFlash
Post by: RiderRaghav on June 29, 2007, 10:55:26 PM
Will it work on smf v1.1.3 ... ???


Thanks in advance ;)
Title: Re: EmailFlash
Post by: TrueSatan on June 30, 2007, 04:59:50 AM
Yes it will work in SMF 1.1.3 ...however you have to accomodate the version number change by editing the package or using version emulate...to save others effort I'll upload (below) a version with the editing for SMF 1.1.3 already done.
Title: Re: EmailFlash
Post by: RiderRaghav on June 30, 2007, 02:15:42 PM
Quote from: TrueSatan on June 30, 2007, 04:59:50 AM
Yes it will work in SMF 1.1.3 ...however you have to accomodate the version number change by editing the package or using version emulate...to save others effort I'll upload (below) a version with the editing for SMF 1.1.3 already done.

Thanks allot mate ... ;)
Title: Re: EmailFlash
Post by: TrueSatan on June 30, 2007, 02:26:33 PM
My pleasure.
Title: Re: EmailFlash
Post by: Matthew Schenker on July 17, 2007, 12:12:07 PM
TrueSatan,
Excellent work!  Thank you for the update.
I've said it before, but maybe you should change your name to TrueAngel!!
Title: Re: EmailFlash
Post by: TrueSatan on July 17, 2007, 12:30:50 PM
Thanks Matthew.
Title: Re: EmailFlash
Post by: bassbass on October 15, 2007, 09:48:32 PM
I installed it on 1.1.3 and it worked fine, them i upgraded to 1.1.4 and it seems to work fine however the UN-INSTALL link has disappeared, but it still works fine.  my problem is that i can't install it at all on 1.1.4.  it says that the file is corrupt, is there a way to work around this problem?  Thanks
Title: Re: EmailFlash
Post by: Simplemachines Cowboy on October 15, 2007, 10:29:25 PM
I can affirm what bassbass said - my uninstall link has gone missing on my 1.1.4 upgrade as well.
Title: Re: EmailFlash
Post by: Dermot on December 11, 2007, 05:50:41 AM

You need to open the package-info xml file inside the mod zip and amend support for 1.1.4

Then reupload the zip to your server manually and the uninstall link will reappear.

Title: Re: EmailFlash
Post by: Dermot on December 11, 2007, 05:55:44 AM

Just on another note heres the updated file for 1.1.4

:)



Title: Re: EmailFlash
Post by: 58tbird on March 22, 2008, 05:43:54 PM
I just downloaded and installed - sweet! ;)

I used snork13's gif (http://www.simplemachines.org/community/index.php?topic=65565.msg452454#msg452454)

But, now I read your latest post - do I need to uninstall and install your 1.1.4 update? (I have 1.1.4)  It seems to work just fine, and I have an "uninstall" option.
Title: Re: EmailFlash
Post by: gemigene on June 26, 2008, 10:12:59 PM
Wonderful Mod but why won't it install in 1.1.5?

Cheers,
Gene
Title: Re: EmailFlash
Post by: Jumpmasterrt on June 26, 2008, 10:31:30 PM
GemiGene, to steal a (slightly edited) quote from Dermot....

Quote from: Dermot on December 11, 2007, 05:50:41 AM

You need to open the package-info xml file inside the mod zip and amend support for 1.1.5

Then reupload the zip to your server manually and the uninstall link will reappear.

Make sure you do it for the Install and Uninstall sections.
Title: Re: EmailFlash
Post by: gemigene on June 26, 2008, 11:41:02 PM
Got it. Done and working well...

Thanks
Gene
Title: Re: EmailFlash
Post by: Rocks-HD on July 21, 2008, 08:06:54 PM
how to do it in smf 2.0

I try but is very hard modify this comands for smf 2.0

anybody can help me?
Title: Re: EmailFlash
Post by: snork13 on July 24, 2008, 09:09:39 PM
Quote from: Rocks-HD on July 21, 2008, 08:06:54 PM
how to do it in smf 2.0

I try but is very hard modify this comands for smf 2.0

anybody can help me?

I will update this once smf 2.0 is final
Title: Re: EmailFlash
Post by: Rocks-HD on November 25, 2008, 10:17:03 PM
now, can you make this package for the smf 2.0?
Title: Re: EmailFlash
Post by: imrich on November 09, 2009, 03:01:19 PM
Will you update this for SMF 2 RC2? Since the previous version worked for RC 1.2, it would be nice to have it for RC2 since it won't install with RC2
Title: Re: EmailFlash
Post by: snork13 on November 10, 2009, 11:49:03 AM
Quote from: imrich on November 09, 2009, 03:01:19 PM
Will you update this for SMF 2 RC2? Since the previous version worked for RC 1.2, it would be nice to have it for RC2 since it won't install with RC2

when time permits
Title: Re: EmailFlash
Post by: imrich on November 21, 2009, 08:07:58 AM
Thanks for updating this for SMF 2 RC2.

Next revision you may want to consider removing the file images/Thumbs.db from your package, thats a windows remnant. ;)
Title: Re: EmailFlash
Post by: sattninja on January 04, 2010, 08:48:42 PM
hi i am on rc2 and everything works fine except when i get a new message i get this in my portal block

(http://img684.imageshack.us/img684/9595/capturetp.jpg)
Title: Re: EmailFlash
Post by: okae on March 11, 2010, 07:39:41 AM
this mod will be updated for 2.0rc3?
Title: Re: EmailFlash
Post by: Nimnix on March 11, 2010, 07:40:58 AM
Is there any likely for 2.x?
Title: Re: EmailFlash
Post by: Eclipse16V on March 15, 2010, 02:23:20 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks
Title: Re: EmailFlash
Post by: imrich on March 28, 2010, 05:20:33 PM
I tweaked this to allow it to install on my 2.0 RC3 forum.

If anyone wants it here you go! If it's not ok to upload this, please delete it.

I changed the version to show 2.0.0.1 so as to know the difference from 2.0 that won't install on RC2.
Title: Re: EmailFlash
Post by: 7s-1k on March 29, 2010, 05:32:46 AM
Quote from: imrich on March 28, 2010, 05:20:33 PM
I tweaked this to allow it to install on my 2.0 RC3 forum.

If anyone wants it here you go! If it's not ok to upload this, please delete it.

I changed the version to show 2.0.0.1 so as to know the difference from 2.0 that won't install on RC2.

Thanks! :)
Title: Re: EmailFlash
Post by: Plutuss on May 17, 2010, 11:47:03 AM
Quote from: imrich on March 28, 2010, 05:20:33 PM
I tweaked this to allow it to install on my 2.0 RC3 forum.

If anyone wants it here you go! If it's not ok to upload this, please delete it.

I changed the version to show 2.0.0.1 so as to know the difference from 2.0 that won't install on RC2.

Thank you, it worked perfectly! :D