• Welcome to Simple Machines Community Forum. Please login or sign up.
November 28, 2021, 06:28:46 AM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


EmailFlash

Started by snork13, February 03, 2006, 12:37:27 AM

Previous topic - Next topic

snork13

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
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

delayed_1

Works great, Thank you for this handy MOD

Vinspire

Does it work on SMF 1.1.1 ?

Simplemachines Cowboy

My SMF forum: The Open Range

Vinspire


buhaychat.com

easy install on my 1.1.1.. thanks!

JustSimpsons

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.

snork13

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...
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

JustSimpsons

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.

JustSimpsons

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.

snork13

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
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Matthew Schenker

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

LGLDSR

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

LGLDSR

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

TrueSatan

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?

dork313

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.

dork313

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.

RiderRaghav

Will it work on smf v1.1.3 ... ???


Thanks in advance ;)

TrueSatan

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.

RiderRaghav

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 ... ;)

Advertisement: