Another Member Notepad [Updated for 2.0 Final]

Started by Kays, January 10, 2010, 12:10:26 PM

Previous topic - Next topic

Jessica.

Testing Zone - SMF 2.0.7, default Curve
School & Chat - phpBB3, over 170 mods installed, official live forum

I use the latest version of Chrome

phpBB: Forum = a section; Board = whole site
SMF: Forum = whole site; Board = a section

Robert.

Very nice mod :) Dutch translation:

Modifications.dutch.php:
// Added for member notepad mod.
$txt['notepad'] = 'Kladbok';
$txt['mem_notepad'] = 'Gebruikers-kladblok';
$txt['delete_note'] = 'Verwijder notitie';
$txt['add_note'] = 'Nieuwe notitie';
$txt['note_edit'] = 'Bewerk notitie';
$txt['note_submit'] = 'Toevoegen';
$txt['notes_close'] = 'Sluit kladblok';
$txt['notes_no_subject'] = 'Voer een onderwerp in';
$txt['notes_no_subject_display'] = '<span class="error"><i>Vul alsjeblieft een onderwerp in!</i></span>';
$txt['notes_add_new_title'] = 'Vul het nieuwe onderwerp hier in';
$txt['notes_add_new_text'] = 'Voeg je nieuwe notitie hier toe.';
$txt['notes_delete_confirm'] = 'Weet je zeker dat je deze notitie wil verwijderen?';
$txt['mem_total_notes'] = 'Je hebt momenteel ';
$txt['mem_total_notes1'] = ' notitie.';
$txt['mem_total_notes2'] = ' notities.';
$txt['mem_total_notes_allowed'] = ' Het maximum aantal notities is ';
$txt['notes_nojs'] = 'Je hebt geen Javascript ingeschakeld!';
$txt['notes_nojs_click'] = 'Klik hier voor het kladblock';
$txt['notes_popup'] = 'Open in nieuw venster';
$txt['note_highlight'] = 'Highlight notitie';

$txt['notepad_enable_use'] = 'Schakel gebruikers-kladblok in';
$txt['notepad_max_notes'] = 'Maximum aantal notities. (0 voor geen maximum)';
$txt['notepad_select_groups'] = 'Groepen die zijn toegestaan het kladblok te gebruiken ';
$txt['notepad_max_select_groups'] = 'Ledengroepen die geen betrekking hebben op het maximum aantal notities.';

$txt['cannot_use_notepad'] = 'Sorry. Je hebt helaas de permissies niet om het kladblok te gebruiken';
$txt['notes_error1'] = 'Je bent vergeten de inhoud van je notitie in te vullen!';
$txt['notes_error2'] = 'De inhoud is niet veranderd';
$txt['notes_error3'] = 'Verander alsjeblieft het onderwerp van deze notitie';
$txt['notes_error4'] = 'Het onderwerp kan niet leeg gelaten worden!';


Help.dutch.php:
// Added for member notepad mod.
$helptxt['notepad_enable_use'] = 'Schakel het gebruik van het kladblok in of uit.<br /><br />Je kunt ook gebruik maken van permissies!';
$helptxt['notepad_max_notes'] = 'Het aantal notities dat gebruikers maximaal mogen hebben. Stel op 0 in om uit te schakelen.';
$helptxt['notepad_ignore_max_notes'] = 'Ledengroepen die niets merken van de notities-limiet.';


ManagePermissions.dutch.php:
// Added for member notepad mod.
$txt['permissionname_use_notepad'] = 'Gebruik gebruikers-kladblok';
$txt['permissionhelp_use_notepad'] = 'Sta deze groepen toe het kladblok te gebruiken.';
$txt['permissionname_ignore_max_notes'] = 'Negeer notitie-limiet';
$txt['permissionhelp_ignore_max_notes'] = 'Selecteer dit als je wilt dat deze ledengroep zich niets aan hoeft te trekken van het notitie-limiet.';

Kays

Sorry for the long disappearance.  :-[

Thanks for the translation Dr. Deejay. And for the compliment Jessica. :)

I've just updated the mod for 2.0 final incorporating as many hooks as possible. In doing so it was also possible to add the option to place the menu button where you wish on the menu bar. The button can also be placed as a sub-button of an existing menu button.

@ CapadY, If you have finally updated to 2.0 final. This should work properly for you now. There doesn't seem to be a problem with sub-buttons in a sub-menu in my testing.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

phoenixphyre

Is there a way to add options for other menus? I have split the main menu into two different parts and I would prefer to have the notepad button on the other one like I had been able to with an older version, but can't figure out how to add that option in this version.

Kays

Dang, I thought that I had covered all possibilities. ::)

Open Subs-Notepad.php and find the following:


function NotepadButton(&$menu_buttons)
{


After that add:


    return;


This will disable that function so the buttons won't show.

Then add the button manually to your menu as you did previously.


'notepad' => array(
'title' => $txt['notepad'],
'href' => $scripturl . '?action=notepad',
'show' => $context['allow_notepad'],
'target' => $context['browser']['is_firefox'] ? '_new' : '_blank',
'sub_buttons' => array(
'notes_popup' => array(
'title' => $txt['notes_popup'],
'href' => 'javascript:void(0)" onclick="window.open(\'' . $scripturl . '?action=notepad\',\'PopupWindow\',\'height=625,width=750,scrollbars=1,resizable=1\');return false;',
'show' => $context['allow_notepad'],
),
),
),


Don't forget to add the following to where the permissions are defined.


$context['allow_notepad'] = allowedTo('use_notepad') && !empty($modSettings['notepad_enable_use']);
.


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

phoenixphyre


cloksin

Is it possible to have a link for the notepad displayed in the member's profile?

Also, would it be possible to assign other membergroups to have the ability to both view and edit any other member's notepad?
SMF 2.0.1
SimplePortal 2.3.3

Kays

Hi, the latest version will allow you to place the button just about anywhere on the menu.

Quote
Also, would it be possible to assign other membergroups to have the ability to both view and edit any other member's notepad?

Since the notes are private and not public viewable. I have no intention to do this.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

cloksin

Quote from: Kays on October 16, 2011, 08:41:31 AM
Quote
Also, would it be possible to assign other membergroups to have the ability to both view and edit any other member's notepad?

Since the notes are private and not public viewable. I have no intention to do this.

Maybe on your forum they are private, but what I want to do on my forum, which is a RP site where characters take classes, is use this to list the classes that characters have passed.  The member would be able to see their own list, but my staff members would have the ability to add passed classes to each member's list, as well as check this list to ensure a character has met the requirements for level advancement.

If you don't plan on adding this functionality to this mod, could you create a new mod that satisfies these requirements?
SMF 2.0.1
SimplePortal 2.3.3

Kays

There is another notepad mod where it is viewable by admins also. Have you looked at that one?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

cloksin

I looked at the other ones, they don't suit my fancy.  I like the look of yours better.  Plus, the other ones only allow admins to view members notepads, I need to be able to select which member groups have that permission.
SMF 2.0.1
SimplePortal 2.3.3

Kays

Sorry about the delay, I had to give this some thought. It is an interesting idea and I'm a bit intrigued. But I don't have the time at present to get into it.

My thought is to add an option to make a note public. If public, then there will be a need for moderation. But only for public notes. The easiest way to access a public note would be through a link in the member's profile on the left menu. I can make it so the title there is configurable. When notes are viewed by the public the page will remain the same except with no edit buttons and with the textarea disabled.

Would something like this need your requirements?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

cloksin

Sorry for MY delay, its been a very hectic week.

QuoteThe easiest way to access a public note would be through a link in the member's profile on the left menu. I can make it so the title there is configurable.

Perfect

As for the public view of the notes, I'd like to be able to assign which membergroups can see the public notes, instead of just everyone (only staff members should be able to see notes other than their own).  Also, to prevent people from adding completions to try to attain higher levels without actually completing the tasks, I'd like to be able to assign certain membergroups the permission to edit other people's notes, with a tag below the entry indicating who it was that made the entry, that way a staff member could edit a player's notes when completing a class, and other staff members can confirm its legit by seeing the staff member's screen name next to the note.

SMF 2.0.1
SimplePortal 2.3.3

mariusfv

On mod page if u parse : ERROR!! This mod will not install on your version of SMF (both versions).

I try to install on 2.0 rc5(on mod page in description appear that is compatible)...when I try to install the same error: ERROR!! This mod will not install on your version of SMF.

Solution's  ?

Brother Bill


Just added the mod to our board (ver. 2.0.2), installed without a hitch. Very pleased with the new feature. Excellent work Kays.

Zagdul

Quote from: Kays on October 18, 2011, 03:50:55 PM
Sorry about the delay, I had to give this some thought. It is an interesting idea and I'm a bit intrigued. But I don't have the time at present to get into it.

My thought is to add an option to make a note public. If public, then there will be a need for moderation. But only for public notes. The easiest way to access a public note would be through a link in the member's profile on the left menu. I can make it so the title there is configurable. When notes are viewed by the public the page will remain the same except with no edit buttons and with the textarea disabled.

Would something like this need your requirements?

If possible, adding in the ability to hide the notes from the member.

The ability to give user groups permissions (such as moderators) to add notes and view on 'problem members' in order to track and find patterns of behavior.

phoenixphyre

Quote from: Kays on August 12, 2011, 10:32:30 AM
Dang, I thought that I had covered all possibilities. ::)

Open Subs-Notepad.php and find the following:


function NotepadButton(&$menu_buttons)
{


After that add:


    return;


This will disable that function so the buttons won't show.

Then add the button manually to your menu as you did previously.


'notepad' => array(
'title' => $txt['notepad'],
'href' => $scripturl . '?action=notepad',
'show' => $context['allow_notepad'],
'target' => $context['browser']['is_firefox'] ? '_new' : '_blank',
'sub_buttons' => array(
'notes_popup' => array(
'title' => $txt['notes_popup'],
'href' => 'javascript:void(0)" onclick="window.open(\'' . $scripturl . '?action=notepad\',\'PopupWindow\',\'height=625,width=750,scrollbars=1,resizable=1\');return false;',
'show' => $context['allow_notepad'],
),
),
),


Don't forget to add the following to where the permissions are defined.


$context['allow_notepad'] = allowedTo('use_notepad') && !empty($modSettings['notepad_enable_use']);
.

Hey again Kays. So I'm of course changing things around again and I can't seem to remember exactly where I put the allow_notepad code last time to get it to work without an error message...


$context['allow_notepad'] = allowedTo('use_notepad') && !empty($modSettings['notepad_enable_use']);

Kays

I think that should go wherever you are adding the additional buttons. Probably Subs.php.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Arantor

In the template that this mod uses, please add support for it checking $context['theme_variant'] in the CSS call to index.css.

A la
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css" />';

This will add compatibility for themes like DzinerStudio's newBalance theme which comes with multiple variants.

Kays


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Advertisement: