vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   End-User Options - Personal Notepad for 3.7 (https://vborg.vbsupport.ru/showthread.php?t=181811)

antialiasis 06-06-2008 10:00 PM

Personal Notepad for 3.7
 
Basically the Personal Notepad hack for 3.6 with a security token to make it work for 3.7 and a couple of additions.

This hack will add a personal notepad for your members - a feature you may know from for example Invision Power Board, and which existed for vBulletin 2 as vBPad. For short, members will be able to edit the content of their notepad as they want, storing in it whatever they might feel like.

1 product to install

FEATURES

- A notepad in members' main user CP area where they can type in whatever notes they may want to take down and save them
- Notepad can be resized
- Javascript for allowing users to see when they have exceeded the character limit
- Admin CP options (turn on/off, maximum input length, liquid/fixed width, width of fixed-width notepad, usergroups allowed to use notepad, notepad location)
- No manual template edits
- Fully phrased for easy translation

INSTALLATION

1. Import product-personal_notepad.xml through the Admin CP.
2. Edit the Personal Notepad options in the vBulletin options if desired. (It is automatically turned on upon installation, so if you want to start using it right away without worrying about the options, you can.)
3. If desired, edit the default message that appears for members who have not put anything into their personal notepads - search for the phrase personal_notepad_explanation in the Admin CP and edit the language of your choice.
4. There is no 4. You're done. Go inform your members of the addition.

VERSION HISTORY

4.1: Fixed a bug that caused the notepad to be resized horizontally as well as vertically, potentially stretching the page.
4.0: Added notepad location option in the Admin CP and a default message for members who have not yet edited their personal notepads. Fixed compatibility with 3.7.
3.1: Saved space in liquid-width notepad by putting character counter and textbox size changers in the same line, phrased some stuff that was forgotten and added usergroup limitations in the admin options.
3.0: Tweaks for fitting better with the look of vBulletin, cached template, Javascript counter for character limit, made notepad collapsible, added version history.
2.0: Ported to 3.6, added resizing function and admin CP options.
1.0: Initial release.

Kaleem 06-07-2008 05:38 PM

The old one is working fine do we have to update?

taxick 06-07-2008 05:57 PM

It dont work! If i try to add a note i get this error

PHP Code:

 Your submission could not be processed because a security token was missing or mismatched.

If 
this occurred unexpectedlyplease inform the administrator and describe the action you performed before you received this error

I use version 3.7.1

antialiasis 06-07-2008 06:07 PM

Oops, I made a mistake with the template and uploaded an XML file with the old one.

Download the new zip and install that one instead. Sorry about that.

Subah 06-07-2008 08:13 PM

Quote:

Can we have it as a Tab in our Userprofile and not on a own vB-Site?

Any maybe a Link at the QuickLinks.
Thanks a lot great hack :)

Boofo 06-07-2008 09:22 PM

Thanks for the update. I would like to suggest that when the box gets resized that it only gets resized vertically and not horizontally (Like IP.Board does) as it messes up the skin layout. Is there any way to fix that to do it that way?

Brandon Sheley 06-07-2008 09:48 PM

I like the idea, I'm always using a notepad to save a quick piece of code or something.
I'll keep an eye on it, maybe install later :)

crkgb 06-07-2008 11:57 PM

Categories would be nice...

Jeordie015 06-08-2008 04:01 AM

I'm getting the security token error. I have the latest file.

twitch 06-08-2008 05:25 AM

this is awesome, thanks

schlottkej 06-08-2008 07:03 AM

crkgb.. I agree :)

taxick 06-08-2008 08:50 AM

Quote:

Originally Posted by antialiasis (Post 1543368)
Oops, I made a mistake with the template and uploaded an XML file with the old one.

Download the new zip and install that one instead. Sorry about that.

It works now!

Thx - Mod Installed!

shofolofo 06-08-2008 10:06 AM

Do it have a save draft option ?
or when you close the page everything is lost ..

Good job btw
:)

BigDog56 06-08-2008 12:39 PM

Very nice! Thank You!

Amiga Harrison 06-17-2008 08:11 PM

Great Work. I just realised I was still using the very old 3.5 version and with the recent update to vB3.7 it had stopped working. Just uninstalled and upgraded to this new version and it is working perfectly again. :)

BTW, is there any way to retain notepad text between versions? None of the members of my board had much of importance stored, but I expect some others do have and wish to retain it.

marcossalazar 06-19-2008 05:04 PM

Great, simple hack! Love it and will be installing soon!

okhissabigfish 06-19-2008 06:35 PM

Bravo! Nice!! Perfect... Added!

AMcKay 06-23-2008 11:58 AM

Great hack. One thing, though. When increasing the textarea's size, it overflows beyond the width of the forum. Any chance you could make the resize link only increase/decrease the height, not the width?

Boofo 06-23-2008 07:41 PM

I think the support is pretty well gone for this hack.

https://vborg.vbsupport.ru/showpost....26&postcount=6

antialiasis 06-23-2008 07:43 PM

No, it's not gone. I'll look into that soon; at the moment I'm a bit busy with reinstalling my own forum which got wiped in a database crash.

antialiasis 06-24-2008 04:36 PM

The textarea resizing bug has been fixed. As only the template has been changed, you do not need to download the new version; you can just replace the contents of your personal_notepad template with this:

Code:

<form name="personalnotepad" method="post" action="usercp.php$session[sessionurl_q]">
<table class="tborder" width="100%" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" align="center">
<thead>
<tr>
<td class="tcat"><a style="float:$stylevar[right];" href="#top" onclick="return toggle_collapse('notepad');"><img id="collapseimg_notepad" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_notepad].gif" alt="" border="0"></a> $vbphrase[personal_notepad]</td>
</tr>
</thead>
<tbody id="collapseobj_notepad" style="$vbcollapse[collapseobj_notepad]">
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<textarea name="notepad" id="notepad" rows="7" cols="$vboptions[personal_notepad_cols]"<if condition="$vbulletin->options['personal_notepad_liquid']"> style="width:95%"</if>><if condition="$vbulletin->userinfo['notepad']">{$vbulletin->userinfo['notepad']}<else />$vbphrase[personal_notepad_explanation]</if></textarea>
<div class="smallfont" style="<if condition="$vbulletin->options['personal_notepad_liquid']">text-align:left;</if>width:95%;margin:auto"><if condition="$vbulletin->options['personal_notepad_liquid']"><span style="float:$stylevar[right]"><phrase 1="$notepadlength" 2="$vboptions[personal_notepad_maxlength]">$vbphrase[you_have_used_x_y_characters]</phrase></span></if> <a href="#" onclick="return resize_notepad(true)">$vbphrase[increase_size]</a> <a href="#" onclick="return resize_notepad(false)">$vbphrase[decrease_size]</a><if condition="!$vbulletin->options['personal_notepad_liquid']"><br /><phrase 1="$notepadlength" 2="$vboptions[personal_notepad_maxlength]">$vbphrase[you_have_used_x_y_characters]</phrase></if>
</div>
</div>
<div style="margin-top:$stylevar[cellpadding]px">
<input type="hidden" name="do" value="savenotepad" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="submit" value="$vbphrase[save_notepad]" />
</div>
</td>
</tr>
</tbody>
</table>
</form>
<script type="text/javascript">
var notepad = fetch_object('notepad');
var counter = fetch_object('notepad_charcounter');

function checklength() {
  if (notepad.value.length > {$vbulletin->options['personal_notepad_maxlength']}) {
      counter.className = "highlight";
  }
  else {
      counter.className = "";
  }
  counter.innerHTML = notepad.value.length;
}

function resize_notepad (add) {
  if (add) {
      notepad.rows += 5;
  }
  else {
      notepad.rows -= 5;
  }
  return false;
}

notepad.onkeyup = checklength;
<if condition="!$vbulletin->userinfo['notepad']">notepad.onfocus = function() { notepad.innerHTML = ""; notepad.onfocus = ""; };</if>
checklength();
</script>
<br />


BigDog56 06-25-2008 06:16 PM

Updated, works great now, thank you!

maxicep 06-26-2008 09:23 PM

where stores the datas ?

fly 06-26-2008 10:35 PM

Can you also update the download? It shows as 4.0 still.

redlabour 06-27-2008 05:23 PM

Quote:

Originally Posted by flypaper (Post 1559958)
Can you also update the download? It shows as 4.0 still.

Any News about 4.1??

@antialiasis - can you please use the Mailingfunction on vbulletin.org if you release Updates to your Hack? Thank you!

Mike-D 06-27-2008 08:18 PM

Quote:

Originally Posted by maxicep (Post 1559901)
where stores the datas ?

Datas are stored inside the Table of the current DB thru the <installcode>....</installcode> Code as below... :)
HTML Code:

<installcode><![CDATA[$db->query_write("ALTER TABLE " . TABLE_PREFIX . "usertextfield ADD notepad TEXT");]]></installcode>

The following Code removes the DB Table if you decide to remove that hack...
HTML Code:

<uninstallcode><![CDATA[$db->query_write("ALTER TABLE " . TABLE_PREFIX . "usertextfield DROP notepad");]]></uninstallcode>

maxicep 06-27-2008 09:26 PM

Thanks for info

Installed !

BeerLuver 06-27-2008 09:36 PM

Thanks for the update :) Works great now.

Subah 06-27-2008 10:07 PM

Thank you for the update :)

Quote:

Originally Posted by redlabour (Post 1560541)
Any News about 4.1??

It is 4.1 :)

Zacarias 06-28-2008 06:00 AM

I was thinking about how great this would be as a feature.. Then I find it here. Thanks!

RedGTiVR6 06-30-2008 02:33 PM

I take it that when you install this mod, it over writes the other one for 3.6, correct?

Mike-D 06-30-2008 07:51 PM

Quote:

Originally Posted by RedGTiVR6 (Post 1563079)
I take it that when you install this mod, ...

Installing Codes is easier as you think. You can do it yourself :)

Quote:

Originally Posted by RedGTiVR6 (Post 1563079)
it over writes the other one for 3.6, correct?

The Product Code is being overwritten from its old version. This means the Settings and all Plugins. The Template Code too. Unless you have changed the Template. If so you have to revert the Template "personal_notepad". That's it ;) -Mike

RedGTiVR6 06-30-2008 08:02 PM

Quote:

Originally Posted by Mike-D (Post 1563362)
Installing Codes is easier as you think. You can do it yourself :)

Not sure I understand this comment as I've been administering vBulletin forums for nearly 2 years now. I've installed well over 100 plug-ins...

Quote:

The Product Code is being overwritten from its old version. This means the Settings and all Plugins. The Template Code too. Unless you have changed the Template. If so you have to revert the Template "personal_notepad". That's it ;) -Mike
Thanks. That's the information I was looking for. I had already installed it, but I wanted to make sure it was overwriting the old code completely since it's technically a different mod from the 3.6 one.

Mike-D 07-01-2008 10:29 AM

Quote:

Originally Posted by RedGTiVR6 (Post 1563370)
Not sure I understand this comment as I've been administering vBulletin forums for nearly 2 years now. I've installed well over 100 plug-ins...

That's it what I didn't understand. Because you wrote this...

Quote:

Originally Posted by RedGTiVR6 (Post 1563079)
I take it that when you install this mod, ...

So I thought you need someone who can install this Modification for you. Probably I've messed up something, just because English isnt my first Language ;)

RedGTiVR6 07-01-2008 12:44 PM

Ahhh....

That's not meaning when you as in 'YOU', but rather when 'you' as in the person installing the modification...me, or the next person that comes along to install it on their own forum.

You as in 'someone'...

Mike-D 07-01-2008 06:47 PM

Aha. Learn something new every day. Never thought that this one is so complex. Thanks for clarifying, Jan :)

Scandal 07-02-2008 08:15 PM

Thank you very much for the updated version!!!!
Now, the members of my site will not lose the notepad's data after vbulletin upgrade :)




-petros

PoetJA-1975 07-07-2008 10:32 AM

[high]* PoetJA-1975 likes very much and clicks INSTALL
[/high]
Thanx for the sharing ;)

Jacquii.

PoetJA-1975 07-07-2008 10:38 AM

Question... Is there anyway I can get the initial greeting text to parse html?
Kinda like the simple code below... Perhaps even a fancy image of the text below...? Please say yes :D

Code:

<strong>Welcome to your Personal Notepad.  You can store whatever text you like up to the 1,000,000 allowed character limit.
<br /><br />
Inspired after reading an interesting piece?  Make a note in your Personal Notepad, perhaps it shall help develop your own writing.
<br /><br />
You are the only person who can see what's in your Personal Notepad, so go wild and enjoy!
<br /><br />
Jacquii Cooke.
<br />JPiC Administrator


PoetJA-1975 07-09-2008 11:03 AM

Ooops DUH! Can't use html in textarea.... hmm.... Is there a way? I don't think so....
OK - I stop talking to myself now. LOL

Thanx again for share.

Jacquii.


All times are GMT. The time now is 05:00 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01943 seconds
  • Memory Usage 1,831KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete