Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Thema gestartet von: rea in Oktober 02, 2005, 12:33:04 NACHMITTAGS

Titel: notify unnotify.
Beitrag von: rea in Oktober 02, 2005, 12:33:04 NACHMITTAGS
I was trying to search, but
ZitatDue to high stress on the server, the search function has been automatically and temporarily disabled. Please try again in a short while.

Tought yesterdar I search for this (the topic) and only find one coincidence if Im not wrong.



I have sended the following to a board that use this software, but the guy there say that he will not change the source, because he dont know if in next realeases, this same change can be applied

Zitat
Post this at the SMF development site as a suggestion. For now, I am not doing any modifications to this forum software that is simply going to be erased with the next release.


Here is my post:

<======================================================================>




I normally like to add notify button, but sometimes I do hit the button a second time doing a unnotify action, I normally dont read the text and I miss sometimes that say "you whant to disable notification..." that is bad, then I have taked a look there for see how to handle this and that the button reflect the state of the actual notification.

This is how I get over...

if SMF is where the board software is, then:


in directory:
SMF\Themes\default\
search for:
Display.template.php


In that file search for

if ($context['can_mark_notify'])
$buttonArray[] = '<a href="' . $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/notify.gif" alt="' . $txt[131] . '" border="0" />' : $txt[131]) . '</a>';



or more simple for:
if ($context['can_mark_notify'])

The end of the next line ("$buttonArray[] = ... $context['user']['language'] . '/notify.gif" alt="' . $txt[131] . '" border="0" />' : $txt[131]) . '</a>';")
will be the one that will be changed for the next code

$context['user']['language'] . ($context['is_marked_notify']?'/unnotify.gif" alt="':'/notify.gif" alt="') . $txt[131] . '" border="0" />' : $txt[131]) . '</a>';


I also attach a little modification of "notify.gif" resulting in "unnotify.gif" see that Im not good at draw in computer...

By the way, "unnotify.gif" should be saved inside the folder "SMF\Themes\default\images\english\"


Hope you can check it and do this little change (for the guys that like to follow what the button say and bypass time to time the message boxes).

<======================================================================>


That was, and here Im.


Here I cant attach unnotify.gif :S, but I only draw a "un" in front of notify (in white) and with the color blue of the gif (that is used in that board... default skin) I do a cross in the antenna :).



Dont know if this is the correct way to do this, I mean, for be used in this and future realeases of the software, by the way, I have tested it with "Powered by SMF 1.0.5.".
Titel: Re: notify unnotify.
Beitrag von: xenovanis in Oktober 02, 2005, 04:02:24 NACHMITTAGS
Can you mail me the button so I can attach it to your post? For now, I will move this to the Tips and Tricks board.
Titel: Re: notify unnotify.
Beitrag von: pctwo in Oktober 01, 2006, 11:54:47 VORMITTAG
for 1.1RC3, the code is slightly different.

In both Display.template.php and MessageIndex.template.php change this


'notify' => array('test' => 'can_mark_notify', 'text' => 125, 'image' => 'notify.gif',


to


'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 125, 'image' => $context['is_marked_notify'] ? 'unnotify.gif' : 'notify.gif',


Note: the rest of the line stays the same

Grab the unnotify.gif in the first post and put it as instructed in the first post.  Then add this to your Themes/theme-name/languages/index.english.php

$txt['unnotify'] = 'UnNotify';
Titel: Re: notify unnotify.
Beitrag von: nitins60 in Dezember 17, 2006, 12:22:29 NACHMITTAGS
Hope it will be fixed in next SMF version
Titel: Re: notify unnotify.
Beitrag von: videoman57 in Dezember 02, 2008, 05:03:45 NACHMITTAGS
Is there a feature in a gallery for smf that allows you to be notified when someone adds a comment to your photos.
Titel: Re: notify unnotify.
Beitrag von: Oldiesmann in Februar 02, 2009, 11:04:06 NACHMITTAGS
I'm fairly certain that SMF Media Gallery includes this option. Not sure about Coppermine or SMF Gallery.
Titel: Re: notify unnotify.
Beitrag von: Piper in April 17, 2009, 07:02:41 NACHMITTAGS
I wonder id someone could write a Mod for this.  This is the biggest problem I have with SMF.  My users don't remember to click notify or double-click. 
Titel: Re: notify unnotify.
Beitrag von: Sarge in Mai 08, 2009, 02:06:32 VORMITTAG
videoman57, Piper, have you managed to find a solution?
Titel: Re: notify unnotify.
Beitrag von: videoman57 in September 20, 2009, 10:35:19 NACHMITTAGS
no, i have never heard any response regarding this!
Thanks for asking!
Titel: Re: notify unnotify.
Beitrag von: Arantor in Oktober 11, 2009, 05:46:25 VORMITTAG
Did you ask in the support topic for the gallery mod?
Titel: Re: notify unnotify.
Beitrag von: videoman57 in Oktober 24, 2009, 05:07:36 NACHMITTAGS
I presented this idea to smf media gallery and they will consider it as a mod called foxy in the future?
I did not know if the gallery lite mod had this option or not. Thanks again for the response!
Jim