Another Member Notepad [Updated for 2.0 Final]

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

Previous topic - Next topic

crustybum

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

Kays

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

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

KensonPlays

Will this ever be made for 2.0RC2?

Owner of Mesozoic Haven

Matthew K.


crustybum

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

Kays

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

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

Kays

@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:

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

crustybum

You are very kind, i will have a go later and let you know how i got on ;)

Crhis

crustybum

All done....many thanks!

Chris

Kays

Good, glad that worked out for you.

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

LisaNY

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!

Kays

What sort of problems are you having? Is it adding the menu link?

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

akbora

Very very lovely mod and I like it very much.. I use it every tiime...   I record all my info I need..
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

LisaNY

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!

Kays

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

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

LisaNY

#35
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!

LisaNY

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!

Matthew K.

I have had some problems with DilberMC and getting a button to stay active as well.

Kays

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.

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

akbora

How many pages can we add maximum? Thanks
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

Advertisement: