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)
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.
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?
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
please...
you could look at the modification.xml file, and make the code change by hand!
hi, thanks for your reply,
could you please tell me the code that need to change?
thanks thanks
thanks
i've managed to edit it by referring to the above two links.
thanks
Nice mod ;) ;) ;)
I like it alot!!! ;D ;D ;D
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!
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?
Not for custom theme.
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...
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
*still waiting patiently for a 'multiple themes' version*
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.
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?
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 ?
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 :)
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
Works great, Thank you for this handy MOD
Does it work on SMF 1.1.1 ?
Yes it does.
easy install on my 1.1.1.. thanks!
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.
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...
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 . '"> </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 . '"> </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 . '"> </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>] <img src="' . $settings['images_url'] . '/msg.gif" border="0" />' : '' , '</a>
Maybe I'm doing something wrong, I don't know.
I got it to work! I had to change this:
</strong>] <img src="' . $settings['images_url'] . '/msg.gif" border="0" />' : '' , '</a>
to this:
</strong>] <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.
Quote from: JustSimpsons on February 07, 2007, 01:44:11 PM
I got it to work! I had to change this:
</strong>] <img src="' . $settings['images_url'] . '/msg.gif" border="0" />' : '' , '</a>
to this:
</strong>] <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
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
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
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>] <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>] <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
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?
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 . '"> </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>] <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.
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.
Will it work on smf v1.1.3 ... ???
Thanks in advance ;)
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.
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 ... ;)
My pleasure.
TrueSatan,
Excellent work! Thank you for the update.
I've said it before, but maybe you should change your name to TrueAngel!!
Thanks Matthew.
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
I can affirm what bassbass said - my uninstall link has gone missing on my 1.1.4 upgrade as well.
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.
Just on another note heres the updated file for 1.1.4
:)
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.
Wonderful Mod but why won't it install in 1.1.5?
Cheers,
Gene
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.
Got it. Done and working well...
Thanks
Gene
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?
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
now, can you make this package for the smf 2.0?
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
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
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. ;)
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)
this mod will be updated for 2.0rc3?
Is there any likely for 2.x?
Nice Mod
Please update it for SMF 2.0RC3 ;)
Thanks
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.
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! :)
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