Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Kays on January 10, 2010, 12:10:26 PM

Title: Another Member Notepad [Updated for 2.0 Final]
Post by: Kays on January 10, 2010, 12:10:26 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2351)

This mod adds a notepad like feature which can be used by members as a place to keep notes, links and other such items. It is able to keep and display multiple notes. The member is also able to edit and delete any note.

Admin features:
- A global setting to enable/disable Notepad. Set as enabled by default.
- The ability to set a maximum number of notes by member group. Off by default.
- Member group permissions to use Notepad. All set to allow use.

V1.0.0 Initial release
V1.1.0 Updated for 2.0 RC3
V1.2.0 Fixed an install conflict with Signature Settings mod (SMF 1.1.x).
           Added a highlight text button
V1.2.1 Added Russian-utf8 Thanks to vladok
V1.3.1 Corrected a problem with deleting a note if mod_security is enabled.
           Also fixed a number of minor bugs.
V2.0.2 Updated for 2.0 Final by using as many integration hooks as possible.
          Added an option to position the menu button on the menu bar. Or to place
             it as a sub-menu of an existing button.
          Added Dutch translation. Thanks to Dr. Deejay.
          Changed the method of error handling.
Title: Re: Another Member Notepad
Post by: JBlaze on January 10, 2010, 12:10:58 PM
Congrats on your approved mod!
Title: Re: Another Member Notepad
Post by: Garry1953 on January 10, 2010, 05:09:19 PM
Added it to my forum.

Works well
Thanks :)
Title: Re: Another Member Notepad
Post by: Kays on January 10, 2010, 05:11:19 PM
Great, thanks. :)
Title: Re: Another Member Notepad
Post by: Sevgiformu.com on January 12, 2010, 06:07:19 AM
very nice mod
Title: Re: Another Member Notepad
Post by: Tanks on January 13, 2010, 08:16:14 AM
Pretty useful mod - thanks
Title: Re: Another Member Notepad
Post by: Kays on January 13, 2010, 08:54:49 AM
Thanks, I'm glad you like it. :)

For those using 2.0. I am looking into updating the template to a curve styling. I'll post that whenever I'm finished with it.
Title: Re: Another Member Notepad
Post by: Tanks on January 13, 2010, 09:32:24 AM
Curve would be nice :)
Title: Re: Another Member Notepad
Post by: ExSpirit on January 13, 2010, 02:43:56 PM
Is it just me or is there a bug with permissions? I removed permission for regular members to have NotePad but they still see it?
Title: Re: Another Member Notepad
Post by: Kays on January 13, 2010, 03:39:58 PM
For which version? 1.1 or 2.0?
Title: Re: Another Member Notepad
Post by: ExSpirit on January 13, 2010, 04:41:28 PM
1.1
Title: Re: Another Member Notepad
Post by: Kays on January 13, 2010, 04:43:08 PM
I'll look into it.

I think the tab remains but they can't get access.
Title: Re: Another Member Notepad
Post by: ExSpirit on January 13, 2010, 05:19:27 PM
There has to be something with user rights, sonce "if ($context['allow_notepad']) " doesn't have the right effect - however it is not shown to guest...


Title: Re: Another Member Notepad
Post by: curlin on January 13, 2010, 05:38:52 PM
    Works fine on smf default and a custom theme i'm using. However, another theme - anecdota alt, it opens fine but will not close. Just doesn't do anything.
Title: Re: Another Member Notepad
Post by: Kays on January 13, 2010, 05:52:15 PM
1.1 or 2.0?
Is this in a new window, new tab, or popup window?
Not even by clicking the red X in the corner?

It could have something to do with the javascript in that theme. I'll add it to my list of things to look at.
Title: Re: Another Member Notepad
Post by: curlin on January 13, 2010, 06:01:14 PM
    Okay - weird. smf opens it in another tab while the theme in question opens it in the same tab which is why it's not closing.  Just using the back button takes care of it..
Title: Re: Another Member Notepad
Post by: Kays on January 13, 2010, 06:21:39 PM
Any particular browser?

I have noticed some funky problems/weirdness with IE on occassion.
Title: Re: Another Member Notepad
Post by: curlin on January 13, 2010, 06:34:44 PM
  2.0 RC2 and latest version of firefox
Title: Re: Another Member Notepad
Post by: Matthew K. on January 13, 2010, 06:36:11 PM
VERY good job! Congratulations Kays!
Title: Re: Another Member Notepad
Post by: Kays on January 13, 2010, 07:08:53 PM
Thanks. It looks like I've got a few things to look into though.

Quote from: curlin on January 13, 2010, 06:34:44 PM
  2.0 RC2 and latest version of firefox

Just out of curiousity, disable JavaScript and see how it works. Also do you have the same problem if it's open in a popup window? JavaScript needs to be enabled for this.
Title: Re: Another Member Notepad
Post by: crustybum on January 15, 2010, 06:35:15 AM
Hi great mod, just a couple of problems, in firefox the "close notepad" link wont work, and in I.E. it closes the page altogether (dosnt go back to forum)

Chris
Title: Re: Another Member Notepad
Post by: Kays on January 15, 2010, 08:40:16 AM
Which version SMF and FireFox?

The page opens in a new window or tab. So closing it will close the window or tab. That's the way it's designed.

@ curlin

I wonder if your problem is the same as above.

@ ExSpirit

Sorry about the delay. It looks like it's due to the way permissions work for regular members. You need to Deny that permission for the member group
Title: Re: Another Member Notepad
Post by: KensonPlays on January 15, 2010, 09:38:16 AM
Will this ever be made for 2.0RC2?
Title: Re: Another Member Notepad
Post by: Matthew K. on January 15, 2010, 09:46:35 AM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi47.tinypic.com%2F1zeyzi9.jpg&hash=dd08cb3689fa5152beb242b89ad04d5e2c268657)
Already is Kcmartz.
Quote from: Kcmartz on January 15, 2010, 09:38:16 AM
Will this ever be made for 2.0RC2?
Title: Re: Another Member Notepad
Post by: crustybum on January 15, 2010, 10:07:03 AM
It must be a theme issue, i have installed it fine on a default theme on another forum, but this is the issue i have with the classic theme, I have tried editing it using the parsar but it dosnt work for some unknown reason, I need it to open and close it in  another window like it does using the default theme.

Many thanks

Chris
Title: Re: Another Member Notepad
Post by: Kays on January 15, 2010, 10:14:19 AM
The 2.0 version will work fine on both themes. But I must admit that  I've never checked it with the other two themes for 1.1.

I'll take a look at it.

Thanks Labradoodle-360. :)
Title: Re: Another Member Notepad
Post by: Kays on January 15, 2010, 11:14:35 PM
@crustybum

The problem with the window not closing is that FireFox doesn't like closing windows which weren't open by script (check the Error Console). At least IE is polite enough to give you the option.

I'm assuming that you just added a link to the notepad in index temple similar to the other ones. Use this instead. It will open it in a popup window.


// Member Notepad
if ($context['allow_notepad'])
echo '
<a href="javascript:void(0)" onclick="window.open(\'', $scripturl, '?action=notepad\',\'PopupWindow\',\'height=600,width=750,scrollbars=1,resizable=1\');return false;">', ($settings['use_image_buttons'] ? '
<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/notepad.gif" alt="' . $txt['notepad'] . '" style="margin: 2px 0;" border="0" />' : $txt['notepad']), '</a>
<noscript><a href="', $scripturl, '?action=notepad;nojs" title="', $txt['notes_nojs_click'], '" target="_new">[*]</a></noscript>', $context['menu_separator'];


And just incase you are still using the default buttons, See attached:
Title: Re: Another Member Notepad
Post by: crustybum on January 16, 2010, 05:11:46 AM
You are very kind, i will have a go later and let you know how i got on ;)

Crhis
Title: Re: Another Member Notepad
Post by: crustybum on January 16, 2010, 09:39:58 AM
All done....many thanks!

Chris
Title: Re: Another Member Notepad
Post by: Kays on January 16, 2010, 09:56:48 AM
Good, glad that worked out for you.
Title: Re: Another Member Notepad
Post by: LisaNY on January 31, 2010, 01:29:31 PM
Hi,

I installed notepad, and it works fine on the SMF default theme.  I am trying to get it to work on a custom theme, CS Classic.  I looked at the parser, but I see none of those files in the theme files.

I am using 1.1.11

Help?

Thanks!
Title: Re: Another Member Notepad
Post by: Kays on January 31, 2010, 01:43:57 PM
What sort of problems are you having? Is it adding the menu link?
Title: Re: Another Member Notepad
Post by: akbora on January 31, 2010, 02:37:30 PM
Very very lovely mod and I like it very much.. I use it every tiime...   I record all my info I need..
Title: Re: Another Member Notepad
Post by: LisaNY on January 31, 2010, 02:57:15 PM
Quote from: Kays on January 31, 2010, 01:43:57 PM
What sort of problems are you having? Is it adding the menu link?

Hi,

Sorry I was not more specific.  I do not see a menu link.

Thanks!
Title: Re: Another Member Notepad
Post by: Kays on February 01, 2010, 12:09:36 AM
You will need to add that manually and it'is slightly different for your theme. The file to look in is index.template.php. Towards the bottom look for:


// The [calendar]!


And add either of the following before it. There's two flavours. The first will open it in a new tab (or window depending on browser). The second opens it in a popup window.


// Show the [Notepad] button.
echo '<a href="', $scripturl, '?action=notepad" target="_new">' , $txt['notepad'] , '</a>';



// Show the [Notepad] button.
echo '<a href="javascript:void(0)" onclick="window.open(\'', $scripturl, '?action=notepad\',\'PopupWindow\',\'height=600,width=750,scrollbars=1,resizable=1\');return false;">', $txt['notepad'], '</a>
<noscript><a href="', $scripturl, '?action=notepad;nojs" title="', $txt['notes_nojs_click'], '" target="_new">[*]</a></noscript>';


Thanks akbora. I'm glad you're finding it to be useful. :)
Title: Re: Another Member Notepad
Post by: LisaNY on February 01, 2010, 08:06:42 AM
Quote from: Kays on February 01, 2010, 12:09:36 AM
You will need to add that manually and it'is slightly different for your theme. The file to look in is index.template.php. Towards the bottom look for:


// The [calendar]!



And add either of the following before it. There's two flavours. The first will open it in a new tab (or window depending on browser). The second opens it in a popup window.


// Show the [Notepad] button.
echo '<a href="', $scripturl, '?action=notepad" target="_new">' , $txt['notepad'] , '</a>';



// Show the [Notepad] button.
echo '<a href="javascript:void(0)" onclick="window.open(\'', $scripturl, '?action=notepad\',\'PopupWindow\',\'height=600,width=750,scrollbars=1,resizable=1\');return false;">', $txt['notepad'], '</a>
<noscript><a href="', $scripturl, '?action=notepad;nojs" title="', $txt['notes_nojs_click'], '" target="_new">[*]</a></noscript>';


Thanks akbora. I'm glad you're finding it to be useful. :)

Yay!  It worked!  Thank you so much!
Title: Re: Another Member Notepad
Post by: LisaNY on February 02, 2010, 10:13:09 AM
Kays - again, thank you for your help.

I have the notepad feature working fine on all  of my custom themes, but I can't get the button to show correctly on DilberMC.  I added it after calendar, just as I did w/the others, but it is showing on the bar above the "Home" button on the toolbar.

Any ideas as to why?  thanks!
Title: Re: Another Member Notepad
Post by: Matthew K. on February 02, 2010, 10:19:48 AM
I have had some problems with DilberMC and getting a button to stay active as well.
Title: Re: Another Member Notepad
Post by: Kays on February 02, 2010, 10:30:11 AM
I'll take a look at what's required for the Dilbert MC theme.

The button won't show as being active because it opens on a separate page and doesn't use the standard SMF header with the button strip.
Title: Re: Another Member Notepad
Post by: akbora on February 02, 2010, 11:22:19 AM
How many pages can we add maximum? Thanks
Title: Re: Another Member Notepad
Post by: Kays on February 02, 2010, 11:29:18 AM
You can add as many pages as you like. But there is the option to limit the number of pages in the admin CP.
Title: Re: Another Member Notepad
Post by: akbora on February 02, 2010, 11:31:57 AM
Thank you Kays.

Is it possible, admin can add unlimited the others limited?
Title: Re: Another Member Notepad
Post by: Kays on February 02, 2010, 07:48:35 PM
Hmm, kinda figured you'd request that. ::)

I'll add it to my list.
Title: Re: Another Member Notepad
Post by: akbora on February 03, 2010, 11:08:48 AM
Anyway, everybody must add pages as per membergroups ... I think this will be better than only admin. Thanks
Title: Re: Another Member Notepad
Post by: Kays on February 03, 2010, 05:26:30 PM
Member group permissions are either on or off. There's no (easy) way to assign a number.

So, it's either restrict the number or have it as unlimited.
Title: Re: Another Member Notepad
Post by: Kimmie on February 07, 2010, 06:27:49 PM
Where is the notepad located? Is it a tab on the top menu, a section in their profile, what? Also, can anyone see anyone elses notes?
Title: Re: Another Member Notepad
Post by: Kays on February 07, 2010, 06:34:45 PM
The notes are private.

It adds a tab to the top menu. If you're using 1.1.x and a custom theme you will need to add it manually
Title: Re: Another Member Notepad
Post by: Neverhurry on February 12, 2010, 04:53:52 PM
Kays, this is a very nice mod. Thank you!

Will you consider to change it a little bit to become another mod, something like what is inside this thread:
http://www.simplemachines.org/community/index.php?topic=365448

Title: Re: Another Member Notepad
Post by: Kays on February 12, 2010, 05:13:31 PM
Thanks, this mod might do that. But what I think Nao is doing there is posting his "Thoughts" to a board and displaying them using one of the SSI functions. A lot easier to do.
Title: Re: Another Member Notepad
Post by: Neverhurry on February 12, 2010, 05:24:32 PM
Quote from: Kays on February 12, 2010, 05:13:31 PM
Thanks, this mod might do that. But what I think Nao is doing there is posting his "Thoughts" to a board and displaying them using one of the SSI functions. A lot easier to do.

WOW!!!!!!!!
You probably read Nao mind....
It is not difficult to use SSI function to drag posts (messages) out to display, but how to post thoughts to a board?.... Can you help?
Title: Re: Another Member Notepad
Post by: Buschiq on February 15, 2010, 07:20:30 AM
Hi, I'm wondering if you or anyone else could help me. I'm using the theme PortalBlack and I just can't get the pop up window right. Php isn't really my thing yet. Still, I got this far:

// Show the [notepad] button.
   global $modSettings;
   if (empty($context['disable_sp']) && in_array($modSettings['sp_portal_mode'], array(1, 3)))
      echo '<li><a' , $current_action=='notepad' ? ' class="current"' : '' , ' href="', $scripturl . ($modSettings['sp_portal_mode'] == 1 ? '?action=notepad' : ''), '"><span>', empty($txt['notepad']) ? 'Notepad' : $txt['notepad'], '</span></a></li>';   


The button is in place and working, but I would prefere a pop up window.  ;)
Thanks!
Title: Re: Another Member Notepad
Post by: Kays on February 15, 2010, 01:38:28 PM
Try using this instead then.


// Show the [notepad] button.
   global $modSettings;
   if (empty($context['disable_sp']) && in_array($modSettings['sp_portal_mode'], array(1, 3)))
      echo '<li><a href="javascript:void(0)" onclick="window.open(\'', $scripturl, '?action=notepad\',\'PopupWindow\',\'height=600,width=750,scrollbars=1,resizable=1\');return false;"><span>', empty($txt['notepad']) ? 'Notepad' : $txt['notepad'], '</span></a>
<noscript><a href="', $scripturl, '?action=notepad;nojs" title="', $txt['notes_nojs_click'], '" target="_new">[*]</a></noscript></li>';   


@  neverhurry.
It looks like Nao noticed your interest in it and is working on it.
Title: Re: Another Member Notepad
Post by: Buschiq on February 15, 2010, 02:16:49 PM
Thank you!!! It's working great  ;D
Title: Re: Another Member Notepad
Post by: Neverhurry on February 15, 2010, 06:11:20 PM
Quote from: Kays on February 15, 2010, 01:38:28 PM
@  neverhurry.
It looks like Nao noticed your interest in it and is working on it.

That will be great!  :)

Kays, can other folks see someone's notepad?
Title: Re: Another Member Notepad
Post by: Kays on February 15, 2010, 07:36:48 PM
Well, I shouldn't say working on it but rather that he'd look into it.

No, the notes are private.
Title: Re: Another Member Notepad
Post by: lgldsr73 on February 24, 2010, 08:57:57 PM
How is this installed? I.e., where should Install.Php reside?

Thanks,

Lyman
Title: Re: Another Member Notepad
Post by: Kays on February 24, 2010, 09:26:05 PM
This gets installed the same as any mod. Upload the zipped package using the package manager and install it.
Title: Re: Another Member Notepad
Post by: lgldsr73 on February 24, 2010, 09:28:42 PM
Thanks! Already installed it, love it!

Lyman
Title: Re: Another Member Notepad
Post by: david090366 on February 28, 2010, 04:15:54 AM
Just one question, and it may sound like a noob one, but it's just a concern. This doesn't allow for the "embedding" of html or php or anything like that does it?
Title: Re: Another Member Notepad
Post by: Kays on February 28, 2010, 08:45:09 AM
No it doesn't. It will display what you input as it is. It doesn't even parse BBC and smileys. Except in the subject line.

Thanks  lgldsr73. :)
Title: Re: Another Member Notepad
Post by: david090366 on March 04, 2010, 05:46:44 AM
I run an RPG play by post forum. If there was a way to set the individual notes so that other people could read them this would be a great way to host character sheets on the forum.
Title: Re: Another Member Notepad
Post by: Kays on March 04, 2010, 08:38:01 PM
Yes, maybe. How would this work?
Title: Re: Another Member Notepad
Post by: Plantsman on March 17, 2010, 12:03:48 PM
Can someone please help - my host recently had problems with their CGI platform and when it was reinstated they also upgraded PHP4 to PHP5.  At that point I had problems with 'Another Member Notepad'.

I then removed  it to reinstall but it left the link in the navigation tree and many references in Index.php.

My question is  how can I completely remove 'Another Member Notepad' before making a clean reinstalling.  It is a great addition and I would  like it back with help. I don't want to risk messing up my forum.

Thanks, Plantsman
Title: Re: Another Member Notepad
Post by: Kays on March 17, 2010, 06:05:58 PM
Hi, go to the mod page and parse the mod for your version SMF. See what the changes are and undo them. It's only one line in index.php. One block of code in index.template.php. and a couple of lines in each of the other files.
Title: Re: Another Member Notepad
Post by: Plantsman on March 17, 2010, 07:03:47 PM
Thank you Kays, l have reverse installed manually as you suggested. It has worked well and I have learned a lot in the process. Many thanks friend.

Plantsman
Title: Re: Another Member Notepad
Post by: Kays on March 22, 2010, 02:41:22 AM
I just updated this to 2.0 RC3.

I've added the ability to restrict the number of notes by member group.
The 2.0 template has also been updated to look a bit more curvey.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.kayssplace.com%2Fstuff%2Fnotepad2.png&hash=91ad392872eae891a530682909629f01cf48f7ee)
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Cal O'Shaw on March 22, 2010, 09:43:09 PM
Hi,

Very interesting MOD, but I was wondering... who can see the notes?  Is it just the member or any group that is allowed to use notes?  Can individual notes be made visible to other members (not Guests)?

If the notes can be kept private to the member, would the Admins be able to see them?  Or are they like PMs?

Grazie,

Cal
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on March 22, 2010, 10:00:00 PM
Basically, the notes are private. Only the member can see their notes.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Cal O'Shaw on March 22, 2010, 10:23:59 PM
Super.

And we are on SMF 1.1.11, so when we move to SMF 2.0.0 they will migrate safely?  Sorry if the questions seem thick, but just wanted to be sure before moving forward with it.

Grazie
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on March 22, 2010, 10:48:40 PM
There shouldn't be a problem upgrading to 2.0 as the table structure is the same.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: vladok on March 23, 2010, 04:00:57 AM
Problems in the modification of the Russian language (encoding windows-1251). All the letters of the title notes and the text appear as symbols "?"
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on March 23, 2010, 05:18:53 PM
I don't quite know what could cause that as it should pick up the encoding automatically.

What the collation set at in the database for the member_notes table?
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Cal O'Shaw on March 27, 2010, 01:43:13 AM
Hello,

I was doing some testing before rolling this out to our membership and noticed that no matter what the permissions setting for a membergroup, everyone sees the "Notepad" button.  In fact, everyone can create notes, even if the Permission is set off.

Running SMF 1.1.11 and MOD v1.1.0 and wondering if anyone else has encountered this.  We do plan to make it available to everyone, but wanted to run some initial tests first, and were surprised when it appeared.  We're concerned the Note Limit permission may also be ineffective (we intend to limit members to 10 notes, Global Moderators to be unlimited, assuming Admins are unlimited).

Also noted that if one has the "Signature Settings" MOD installed, one needs to remove that MOD before this MOD can be installed.  After this MOD is installed, Signature Settings MOD can be reinstalled.  (Can't find target in ModSettings.php)

Cal
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on March 27, 2010, 04:51:17 AM
Check the permission settings. Especially for "Regular Members" Since all member permissions are based on it.

I'll take a look at that conflict with the Signature Settings mod.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Cal O'Shaw on March 27, 2010, 08:33:38 PM
Hello,

I checked the Regular Members setting and it was set to 'X'. 
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Eclipse16V on March 30, 2010, 05:21:08 AM
Thanks for this Mod
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: jdvarner on April 01, 2010, 10:29:17 AM
Kays, this is an awesome mod! Good Job.

if you ever think of expanding on it... some ideas.
1. add a little print button or similar so they could print their note without doing the highlight print selection.
2. make it where notes could be shared? perhaps where you could email or "pm" it to another member. say the wife is making a note with the grocery list. Then she pms it to me after she's done figuring out her list.

just ideas. great mod!!!!
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on April 03, 2010, 11:50:31 AM
Quote from: Cal O'Shaw on March 27, 2010, 08:33:38 PM
Hello,

I checked the Regular Members setting and it was set to 'X'. 

sorry, I can't seem to replicate it. Permissions seem to work as they should. Does it do it with the default theme?

I have fixed the conflict with the Signature Settings mod. It was deleting a line which I was using as a search position.

Quote from: jdvarner on April 01, 2010, 10:29:17 AM
Kays, this is an awesome mod! Good Job.

if you ever think of expanding on it... some ideas.
1. add a little print button or similar so they could print their note without doing the highlight print selection.
2. make it where notes could be shared? perhaps where you could email or "pm" it to another member. say the wife is making a note with the grocery list. Then she pms it to me after she's done figuring out her list.

just ideas. great mod!!!!

Thanks for the suggestions. I have thought about means of sharing note. But most methods sorta duplicate current functions and could be complex (ie, beyond my capabilities) to implement.

What I have done though is to add a button on the bottom which will highlight the text in the box and should make copying it a bit easier.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.kayssplace.com%2Fstuff%2Fnotepad4.png&hash=0ebe7221a261f7043149f539c225bc578515cabc)
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: vladok on April 06, 2010, 03:42:27 PM
Quote from: Kays on March 23, 2010, 05:18:53 PM
I don't quite know what could cause that as it should pick up the encoding automatically.

What the collation set at in the database for the member_notes table?
Ups :)
All OK, Thank you!
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: vladok on April 06, 2010, 04:03:24 PM
Russian. UTF-8

<file name="$themedir/languages/Modifications.russian-utf8.php" error="skip">

<operation>
<search position="end" />
<add><![CDATA[
// Added for member notepad mod.
$txt['notepad'] = 'Блокнот';
$txt['mem_notepad'] = 'Блокнот Пользователя';
$txt['delete_note'] = 'Удалить эту запись';
$txt['add_note'] = 'Добавить запись';
$txt['note_edit'] = 'Редактировать';
$txt['note_submit'] = 'Добавить запись';
$txt['notes_close'] = 'Закрыть Блокнот';
$txt['notes_no_subject'] = 'Введите тему записи';
$txt['notes_no_subject_display'] = '<span class="error"><i>Введите тему записи</i></span>';
$txt['notes_add_new_title'] = 'Введите заголовок записи в этом поле';
$txt['notes_add_new_text'] = 'Добавьте текст записи в этом поле.';
$txt['notes_delete_confirm'] = 'Вы уверены, что хотите удалить эту запись?';
$txt['mem_total_notes'] = 'У Вас всего ';
$txt['mem_total_notes1'] = ' запись.';
$txt['mem_total_notes2'] = ' записей.';
$txt['mem_total_notes_allowed'] = ' Разрешенный максимум ';
$txt['notes_nojs'] = 'У Вас не включена поддержка Javascript';
$txt['notes_nojs_click'] = 'Открыть Блокнот';
$txt['notes_popup'] = 'Открыть в отдельном окне';
$txt['note_highlight'] = 'Подсветка записи';

$txt['notepad_enable_use'] = 'Включить Блокнот Пользователя';
$txt['notepad_max_notes'] = 'Разрешенный максимум записей. (0 для откл. лимита)';
$txt['notepad_select_groups'] = 'Разрешение для групп пользователей ';
$txt['notepad_max_select_groups'] = 'Группы, не имеющие ограничения в кол-ве записей.';

$txt['cannot_use_notepad'] = 'Извините, Вы не можете использовать Блокнот';
$txt['notes_error1'] = 'Текст записи не введен.';
$txt['notes_error2'] = 'Текст записи не изменен';
$txt['notes_error3'] = 'Измените заголовок записи';
$txt['notes_error4'] = 'Заголовок не может быть пустым.';
]]></add>
</operation>
</file>

<file name="$themedir/languages/Help.russian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Added for member notepad mod.
$helptxt['notepad_enable_use'] = 'Вкл -выкл Блокнота пользователя. <br /><br />Вы можете задать собственные права отдельным группам';
$helptxt['notepad_max_notes'] = 'Установите максимальное кол-во записей, разрешенное пользователю. Для откл. функции введите 0.';
$helptxt['notepad_ignore_max_notes'] = 'Выберите группы, игнорирующие установленное ограничение (администраторы и т.д.).';
]]></add>
</operation>
</file>

<file name="$themedir/languages/ManagePermissions.russian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Added for member notepad mod.
$txt['permissionname_use_notepad'] = 'Использовать Блокнот Пользователя';
$txt['permissionhelp_use_notepad'] = 'Разрешить данной группе использовать Блокнот Пользователя.';
$txt['permissionname_ignore_max_notes'] = 'Игнорировать ограничения Блокнота';
$txt['permissionhelp_ignore_max_notes'] = 'Разрешить данной группе игнорировать ограничения Блокнота.';
]]></add>
</operation>
</file>
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Cal O'Shaw on April 11, 2010, 04:48:08 AM
Hello,

Only have time for a quick update (0145 here), but version 1.2.0 is still having a conflict with ModSettings.php.  I will try in the next day to isolate the conflict to see what you are looking for that can't be found.  I appreciate your efforts to avoid MOD conflicts.

Cal
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Cal O'Shaw on April 11, 2010, 09:26:09 PM
Found the problem.  Something moved the string you search for:
"         // Stats, compression, cookies.... server type stuff."

and removed the leading spaces.  So in my case, I had:
"// Stats, compression, cookies.... server type stuff."

At least it was easy to find and fix (I inserted what you search for ;) ).
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on April 12, 2010, 12:32:04 AM
Thanks for that I couldn't replicate it.

That leading space is there because the code is added before it and it needs the the white space and line break. I have tried changing it so that whitespace will be ignored. but that didn't work and I prefer to leave the code as it is. In you file, was there any white space before that comment. There should be three tabs.

Thanks for the translation vladok. I've just updated it.

Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Cal O'Shaw on April 12, 2010, 01:14:12 AM
Yes, with the leading white space everything is aligned and easier for us humans to follow.  Since our code started way back around 1.1.1 (or earlier, before my time) and been updated all the way to 1.1.11, I have no way of knowing if the leading white space in my file was added in a later fresh version of 1.1.x or some other MOD removed it, or a previous Admin deleted it.

I'm just glad it was so easy to fix.  And I'm guessing the update parser is line-oriented.  It's a pity when an update fails, SMF can't give any more information than what file failed.  Even showing the string that failed to match would make problem isolation so much easier.  Any chance you can suggest that to the coding team?  Displaying the string that failed to find a match would take so little extra code and make life for us (and Support Specialists!) a lot easier, don't you think?

Cal
(who did code and support for over 25 years, albeit in other languages)
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Cal O'Shaw on April 12, 2010, 03:16:02 AM
I just installed it and again found that setting the "Use member Notepad" to "X" had no impact on displaying the "Notepad" button for Regular Members.

However, if I set it to "D", the button does not appear.

So that is what I have done for now, but I suspect that is not the preferred approach.

Cal

PS: Would you consider adding listing the maximum number of Notes the user can have.  That is, if the limit is not set, the line at the top of the Note says: "You have x notes out of a possible y".  (Bold added to show change)

Update: I had set the max notes to 10 and noticed after I added the 5th note, it mentions the maximum number of notes.

And would you consider adding to the Member's Profile Summary, visible to the specific member and Admins, a line showing how many notes the member has, i.e. "Notepad Entries (X maximum):  Y Notes.

If a member is deleted, are his notes purged or orphaned?

Grazie
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Ncen on April 14, 2010, 03:50:50 PM
I wonder if it's possible to integrate this with the forum itself, the design i mean. my members are somewhat anti popup-windows. If given the proper code i could perhaps make the changes to the files myself, assuming that you (the mod author) would be fine with that. For personal use only, of course.

Thanks for a great mod!
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on April 16, 2010, 12:01:52 PM
Sorry for the slow response.

Quote
Yes, with the leading white space everything is aligned and easier for us humans to follow.  Since our code started way back around 1.1.1 (or earlier, before my time) and been updated all the way to 1.1.11, I have no way of knowing if the leading white space in my file was added in a later fresh version of 1.1.x or some other MOD removed it, or a previous Admin deleted it.

I checked the file back to RC3 and there's been no change made there. So possibly that was done by another mod. I had to leave that white space there. Since removing it shifts that line which would break any mods also using that line as a search position. Activity mod being one. When there's a conflict in 2.0. The actual code will be shown now making it easier to find conflicts. Also for 2.0 the mod gets added to the Modifications area so this shouldn't be a problem then.

On the permissions problem. There could be a permission from another member group taking precedence. Deny will override that. Do you have post count groups enabled? Usually if the regular member group has a permission enabled it will override a post group permission if it is set at "x"

Quote
And would you consider adding to the Member's Profile Summary, visible to the specific member and Admins, a line showing how many notes the member has, i.e. "Notepad Entries (X maximum):  Y Notes.

Maybe. :)

It will require another query. But there have been requests that selected notes be made public. So maybe I can work the two ideas together.

When a member gets deleted, so do all the notes.

Quote from: Innocenzia on April 14, 2010, 03:50:50 PM
I wonder if it's possible to integrate this with the forum itself, the design i mean. my members are somewhat anti popup-windows. If given the proper code i could perhaps make the changes to the files myself, assuming that you (the mod author) would be fine with that. For personal use only, of course.

Thanks for a great mod!

Thanks. This mod is integrated with the forums. To keep it clean and simple looking the standard header and footer have been omitted. If you do wish it to open in a new window I can provide the code to do so. For 2.0 there's the option to do it either way.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Ncen on April 16, 2010, 02:46:02 PM
I meant the standard header and footer :) For my site (1.1.11) it would be better suited if it opened in the same window and kept the standard header and footer, seeing as my members are somewhat anti popup's (and new window to, unfortunately). I can see why most people would like it the way it is now though.
Is there a simple code you could provide so i could change that? :) I guess there's something that needs to be added in the template file?
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on April 16, 2010, 03:28:03 PM
It's not that easy. A standard SMF page consists of three separate functions (header, body, footer). Notepad only uses one, with al three combined. The main reason for doing so is that especially for the header only some basic info is needed and this avoids the loading of extra stuff which isn't needed. Same goes for the footer. Though it shouldn't be that difficult to add the SMF copyright.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Bugo on July 17, 2010, 11:57:22 AM
Please update russian translation because you're mistake when saving files.
Use both (!) files.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on July 19, 2010, 11:06:27 AM
Thanks, I've corrected that. What I did was to split the language file into two so the encoding for UTF8 is proper.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: blazinchuck on July 22, 2010, 07:40:14 PM
hey Kay...i found another code you posted for a custom theme...however mine still looks funky. im running smf 1.1.11 w/blackrain1111 theme. thanks,Chuck
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on July 22, 2010, 09:29:59 PM
Try this:


// Member NotePad.
if ($context['allow_notepad'])
    echo '<li><a href="javascript:void(0)" onclick="window.open(\'', $scripturl, '?action=notepad\',\'PopupWindow\',\'height=600,width=750,scrollbars=1,resizable=1\');return false;"><span>', $txt['notepad'], '</span></a>
<noscript><a href="', $scripturl, '?action=notepad;nojs" title="', $txt['notes_nojs_click'], '" target="_new">[*]</a></noscript></li>';
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: blazinchuck on July 22, 2010, 11:02:49 PM
Quote from: Kays on July 22, 2010, 09:29:59 PM
Try this:


// Member NotePad.
if ($context['allow_notepad'])
    echo '<li><a href="javascript:void(0)" onclick="window.open(\'', $scripturl, '?action=notepad\',\'PopupWindow\',\'height=600,width=750,scrollbars=1,resizable=1\');return false;"><span>', $txt['notepad'], '</span></a>
<noscript><a href="', $scripturl, '?action=notepad;nojs" title="', $txt['notes_nojs_click'], '" target="_new">[*]</a></noscript></li>';

awesome Kay...Worked like a CHAMP! Thank you very much for your help on this matter! Chuck
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: KensonPlays on July 30, 2010, 06:24:39 PM
Great mod! I installed and will make a post about it for members! I hope to use this FOR A WHILE!
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Crystaltears83 on August 26, 2010, 05:43:09 PM
Not sure if anyone else has had this problem or not but when I try to use this mod with 2.0 RC3, Whenever I try to delete a note, I get this error:


QuoteNot Acceptable

An appropriate representation of the requested resource /smf/index.php could not be found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: FightToTheDeath on August 28, 2010, 03:34:55 AM
I really like this mod. :) But I've got a problem. When I am trying to install it it says:

4.   Execute Modification   ./Sources/ModSettings.php   Test failed
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: LHW on August 28, 2010, 07:31:10 AM
Just installed under RC3, and thought I'd leave some feedback...


Overall, it's a nice mod.  Good job! :D
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: MaryLouW on August 30, 2010, 01:11:21 AM
I did so want to have this mod on my forum as I know it would come in very handy.   However, when I attempted to install it, I got an error message:

/Sources/ManagePermissions.php     Test failed

The alert box recommend NOT to install it, so I didn't.  Can anyone help??
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Cal O'Shaw on August 30, 2010, 01:33:11 AM
What that is telling you is that when testing if the MOD can install properly, it found that it could not make an EXACT MATCH when looking for specific code.  The problem could be as simple as a missing blank line, or rather severe.

If you are comfortable do this, what you can do is go to the MOD page, and in the upper right corner, under "Download this mod", click on the radio button for the file you wish to download.  Right below that is "Manual Install Instructions for SMF".  On the pulldown list below that, select your version of SMF and then click on the Parse button. 

Scroll down to ./Sources/ManagePermissions.php.  You'll see pairs of boxes of code.  The first box is the text that Install looks for.  The second, what will either replace, be placed before or after the text in the first box (in this case, under SMF 1.1.11, each of the pairs of code are looking to add code after the code in the first box).

In one or more cases, Install could not find the code in the first box.  Remember, it has to be an EXACT MATCH.  If someone edited your file and added a space to a line Install is looking for, Install will fail.

If I were to guess, it failed on the last pair, as that contains two lines.  And, if you go to your site and edit your ./Sources/ManagePermissions.php, you will find one or more lines added to your file between the first line and the second line of the code Install is looking for.  If that's the case, all you have to do is move the second line to be under the first line, save it, and try again.

Now, if you're not comfortable doing that, and you have someone that you trust at your site willing to check the file as I've described above, then have them do it.  Do NOT allow anyone you don't know (including me) access to your files, even if you get the offer of help from someone on this board.  Giving someone access to your site files is giving them the keys to the kingdom.  Be sure before you share!

Cal
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: MaryLouW on August 30, 2010, 04:00:45 AM
Thanks for all the specific information.  I will give this a try and hope it works.  I have never yet given anyone accesses to my files - I'm a bit "chicken".  It's not that I worry about someone doing something mischievous,  I worry that it might be a 10 year old who says he knows to fix it but is just learning his way around.  I think, if my forum is going to really get messed up, I'd rather it be me than someone else that messes it up.  :)
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: theKyra on September 11, 2010, 10:16:33 PM
I'm running SMF 1.1.11, and had to manually add the nav button. However, it's appearing above my nav bar, not as a link within it. Aaaand that's going to drive me nuts.

Here's the code I added to the index.template, above the Calendar section.
   // Show the [Notepad] button.
   echo '<a href="javascript:void(0)" onclick="window.open(\'', $scripturl, '?action=notepad\',\'PopupWindow\',\'height=600,width=750,scrollbars=1,resizable=1\');return false;">', $txt['notepad'], '</a>
      <noscript><a href="', $scripturl, '?action=notepad;nojs" title="', $txt['notes_nojs_click'], '" target="_new">[*]</a></noscript>';


Any chance I can get a fix so that the link is actually in the nav bar instead of on top of it?

If needed, I'm running the latest version of Firefox.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: supercarp on November 06, 2010, 12:38:22 AM
Any idea what it will take to get this to work with 2.0RC4?
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: MrMike on November 21, 2010, 07:16:49 PM
I installed this on SMF 1.1.12 with the Musiconica theme, and although it *seems* to have installed without any errors, I can't seem to find a way to access it through any of the menus or screens. The Admin options are there but I don't see how to actually use it. Is this compatible with 1.1.12, or...? 

(I looked through this thread and didn't see any reference to it; I apologize if I missed it somehow.)
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: treehugger on April 02, 2011, 06:48:39 PM
Love this mod Kays and use it successfully on my other SMF forums but am having problems on a new install of SMF 2.0 RC5.

When I try deleting notes (no matter which theme I use) I get a message saying:
GET to /club/index.php not supported.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Also the Notepad closes on all my installed themes except DS-Natural, which is the one I'm hoping to set as our default.

Any advice much appreciated. :)
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Arantor on April 02, 2011, 07:05:59 PM
The reason you get that error is because your current setup is on a system with mod_security and one of the default rules in mod_security is to block anything that uses ;id= in any parameter anywhere in the URL, which this mod does.

The choices are getting your host to turn off mod_security (good luck with that) or hoping that Kays is able to modify the mod to not use ;id= in the URL and instead something like ;note= which won't trip up mod_security.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: treehugger on April 03, 2011, 06:44:46 AM
Thanks for that Arantor. :)

Is the 'turn off mod_security' as scary as it sounds and what else would it effect - assuming our host would do it?

Kays is there any chance of you doing what Arantor suggested re the ;id?
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on April 03, 2011, 10:24:00 AM
Yes, thanks for that Arantor. :)

I've made the change and upload the mod corrected for both versions of SMF. Also noticed a number of little problems which I corrected.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: treehugger on April 03, 2011, 06:12:14 PM
That's brilliant Kays, thank you. Notes are deleting on all themes now. :D

Still having the problem with DS-Natural not closing - any advice on that please?
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on April 03, 2011, 07:29:46 PM
That's a standard bit of JavaScript. There could be a conflict with some of the JavaScript used in that theme.

Not that I know how to fix it, but is it happening on all browsers?
Is there anything in the error console?
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Cal O'Shaw on April 03, 2011, 11:22:19 PM
Using ver 1.2 on my 1.1.13 system.  Should I uninstall and install latest?

If I uninstall, will notepads and AdminCP settings be retained?  Asking because some MODs clean everything out and we've set some restrictions on certain groups.  That and my members (including site owner) would lynch me if their Notepads vanished ;)

Cal
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on April 03, 2011, 11:56:55 PM
There shouldn't be a need to upgrade. The bugs were minor and I made a few tweaks to the template.

If you do uninstall, all data will remain. There is a script included to remove the data. But it's not run on uninstall.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: treehugger on April 04, 2011, 02:49:33 AM
In FF4, IE7 and Chrome the default theme opens a new window then closes fine.
With DS-Natural, FF4 and Chrome open in same window and don't close - in IE it closes the whole site.


Nothing in the error log.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on April 05, 2011, 09:13:37 AM
It looks like it's the theme which is doing that. It's not putting the menu together properly. It ignores the target attribute and does not display the sub menus.

In Sub.php find:


'href' => $scripturl . '?action=notepad',


and replace it with:


'href' => $scripturl . '?action=notepad" target="_blank',


Then, a few lines down. Remove this:


'target' => $context['browser']['is_firefox'] ? '_new' : '_blank',


Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: treehugger on April 05, 2011, 12:25:33 PM
That works brilliantly - thank you! :D
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: CapadY on May 09, 2011, 02:21:48 PM
It's a great MOD but since installing it I have a lot of errors in the errorlog:


  http://localhost/midlife/index.php?action=admin;area=logs;sa=errorlog;desc;start=08: Undefined index: active_button
Bestand: C:/XAMPP/xampp/htdocs/Midlife/Themes/default/index.template.php
Regel: 469


After removing the next codepart from subs,php there are no more errors:



                        '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'] OR $context['allow_admin']),
                            ),
                        ),


I suppose it have something to do with the javascript but I am not sure about it.

Running on SMF2 RC3

Any idea about a solution for it ?

Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on May 14, 2011, 08:07:35 PM
Hi, sorry for the slow response.

Can't quite see why that would be happening. Did you add the OR $context['allow_admin']) to the main button also?
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: CapadY on May 15, 2011, 06:02:48 AM
Here the complete menu-item:


'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
'notepad' => array(
'title' => $txt['notepad'],
'href' => $scripturl . '?action=notepad',
'show' => ($context['allow_notepad'] OR $context['allow_admin']),
'target' => $context['browser']['is_firefox'] ? '_new' : '_blank',
),
),
),
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: CapadY on May 15, 2011, 06:06:09 AM
With posting the code I remembered there is a limitation in the number of levels that can be used in the menubar. I've seen this before when I was makin a MOD myself :)

Do you know if there is a solution to be able to have one more level ?
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Kays on May 15, 2011, 08:33:53 AM
Ah, so that's what you did. :)

I think only one level is allowed. I'll take a look into it later on when I have time.
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Jessica. on July 02, 2011, 10:58:18 AM
really really good Member notepad!
Title: Re: Another Member Notepad [Updated for 2.0 RC3]
Post by: Robert. on July 02, 2011, 11:36:19 AM
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.';
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Kays on July 29, 2011, 12:37:44 PM
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.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: phoenixphyre on August 11, 2011, 05:18:25 PM
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.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: 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']);
.

Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: phoenixphyre on August 22, 2011, 02:12:39 PM
works beautifully! Thanks Kays!
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: cloksin on October 15, 2011, 11:10:54 PM
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?
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Kays on October 16, 2011, 08:41:31 AM
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.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: cloksin on October 16, 2011, 08:50:46 AM
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?
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Kays on October 16, 2011, 09:22:19 AM
There is another notepad mod where it is viewable by admins also. Have you looked at that one?
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: cloksin on October 16, 2011, 09:37:21 AM
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.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: 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?
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: cloksin on October 23, 2011, 10:54:47 AM
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.

Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: mariusfv on November 09, 2011, 09:28:08 AM
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  ?
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Brother Bill on January 11, 2012, 10:01:16 PM

Just added the mod to our board (ver. 2.0.2), installed without a hitch. Very pleased with the new feature. Excellent work Kays.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Zagdul on May 02, 2012, 04:56:15 PM
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.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: phoenixphyre on December 26, 2012, 08:46:40 AM
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']);
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Kays on December 27, 2012, 11:33:29 AM
I think that should go wherever you are adding the additional buttons. Probably Subs.php.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Arantor on May 16, 2013, 01:43:14 PM
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.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Kays on May 17, 2013, 07:57:04 PM
Done and updated. Thanks for that. :)
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Draffi on May 22, 2013, 08:13:02 PM
When i check the popup-window (site-information, right-click in Firefox, look for Media...), i see this:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAADT0lEQVR42u2WyS+rYRjFtWpoUa2hxqg5QmlLLYwxJSJE+A/6J3Qj9hL/BGsJG7FiUREWEkFKQ83S1nA7medQ/e4vbFvXd2/k3pt4V2+/4ZznOec871eJz+eL+sol/VL0b4J/gkD28e3Hx8fX11dBEB4eHn68rWAwaNDr5QqFRqP5DIHEFyGmXq/37OwsEAjk5ubGxMSwSUlJKS4uTkxMhHVpaQnK5ubm3yRwu93Hx8c6nQ64tbW1/f19tVotkUgODw9lMpnRaGxsbNzY2Dg5OWlvbxftwcXFBeU3NTVptVoQkSUrK+v+/n56enpra+vm5mZlZWVxcbGioiI6Onpubk40wdXVFWrExcVdXl6OjY2Njo46HA65XN7S0kIT19fX720dHR2ZTCaPx0NB4gh4Mz4+fmdnh6p5+fb2livPz88o1tXVhXRcRDEeSEhIwOqFhQVxBHhrtVqHhobQp76+nlYoHHsrKyuRvrS0lJ81NTVwuFyusrIyRBNH8PT0dHd3R6VEpbe312w2t7a2ZmdnE4fU1FT2JJW2MOb09DQ5ORnRVldXRRAQfHKiVCrRfXt7OxQKUe/4+LjFYpmdnYXp5eUFlaChDqRTKBTUJIKAolB2YGAAV0kLfaDJ5ubmwcHBxMQEiiGO0+lEH7ok0IQNShEEjNX5+TkdEKfq6mpswO3CwkKgAeVWfn4+uWIIcnJySBGPCUJIBEFBQQGIMzMzIyMj7Ds7OxGhra0Nk3GYBCMaZDSal5fHns4EQYzJKpXK7/e/W0cESf3y8jIDjAeDg4PgIhEjglWgYwk24IcIAt4nLRkZGahETnByamqKcUNxEBEES/GfNJMlJgZ05i7SuIUh4OWioqLMzEx87uvro3Zq3Nvbs9lswbfFQQIH8ccSRj0pKSktLW14eDgsQfjjuqSkBDNxW6/Xg15bWzs5OcmBSjdSqRR7EZBziT0S0S5tNTQ0fLaD90VUQOQ8QIT+/n6DwYC9lA86lmAAe2qHY3d3lzh1d/eExYn4PWARQXzGCc4J1ODsRJb5+Xm73R4bGwsB3FVVVXV1dR0dHZFAPiJg+QMBt8u5vm6nG0CRqLy8nDmPihL40EmlEk16ukqt/gDhFwR/vv7/fxXfBH+f4CffSQsw1WtjCgAAAABJRU5ErkJggg==

What meaning this?
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Kays on May 23, 2013, 01:32:55 PM
Hi, that's not added by the mod. Not deliberately at any rate. ???

Which theme are you using? And do you see the same on a normal forum page?
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: NekoJonez on August 03, 2013, 08:22:15 AM
Dear mod author.

I got extremely confused with your last update. Since on this page it's saying that the latest version is 2.1.2 while in your XML you gave in a totally different number, 2.0.3

Please pay attention to that next time. 
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Shambles on October 11, 2013, 06:12:25 PM
I'd like the "highlight" button to copy to the clipboard if possible, rather than just focusing on and selecting the data block.

<input class="button_submit" type="button" value="', $txt['note_highlight'], '" onClick="javascript:this.form.body.focus();this.form.body.select();" />

The net gives me confusing ideas, like window.clipboardData.setData(...) and javascript:copyToClipboard() but I've had no joy with these, nor with guessing variants of this.form.body.xxx

Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: leftezi on April 26, 2014, 12:34:04 PM
Thanks for this mod, Kays. :)
I don't know how difficult is to include BBC code into the mod, but maybe is easier to make links clickable in the text window. This would be very useful.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: JamesWC on August 10, 2014, 06:36:01 AM
Not sure if the mod author's still checking this topic, but I'm using the version for SMF 2.0.4 and it won't allow certain characters in users' notes:

If a note contains a backslash (\) this character will be removed when saving, unless there are two consecutively (\\) in which case it will only remove one of them.

Also, if a note contains the currency symbol for the British pound (£) then the entire note is wiped blank when saving!

I'd rather not have to warn users to avoid using these characters, as it makes my site look half-baked, so is there any way around this please?
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Arantor on August 10, 2014, 08:12:39 AM
Are you using UTF-8 in your forum?
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: JamesWC on August 10, 2014, 11:39:05 AM
No, I'm not.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Arantor on August 10, 2014, 11:41:21 AM
There's your first problem then. Pound signs don't usually behave in non UTF-8. Backup (using phpMyAdmin) and convert to UTF-8 using the admin panel.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: JamesWC on August 10, 2014, 01:04:59 PM
From what I can tell they work everywhere else on the forum, so there must be some code I can add to the notepad mod to make them work here as well, without altering my whole database to a new character set. Know what I mean?
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Arantor on August 10, 2014, 01:27:10 PM
*shrug* I'm sure you know best.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: JamesWC on August 10, 2014, 02:53:48 PM
If I did I wouldn't be here asking for help, so I'm sorry if I caused any offense by trying to explore the matter further. It just doesn't make sense to me (as a non-expert) that posts and private messages can contain the £ symbol but there's no way of just tweaking this mod's code to handle them in the same way. I wasn't saying that your UTF-8 method was wrong, I just wanted to ascertain if that's the only solution and, if it is, perhaps understand why so that I can learn and get by with less help in future.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Biology Forums on January 22, 2015, 06:49:04 PM
Excellent modification, I incorporated it into highslide.
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: leftezi on April 30, 2016, 12:05:24 PM
Very good mod! Thank you Kays  :)
This would be better if we can use BBCode in the notes, or at last clickable links.  ;)
Title: Re: Another Member Notepad [Updated for 2.0 Final]
Post by: Ilkharnos on December 18, 2017, 05:30:42 AM
Hello,

I use this mod and I like it very much. It suits to my forum well. However, it doesn't look very well in my theme. In order to make it nicer, I would like to use a background image for the notepad screen, but I don't know how to add one. Can you help?

Thank you very much.

EDIT: The forum's body itself would also be enough. I see a blank darkness in the background.