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


All times are GMT. The time now is 02:17 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.01486 seconds
  • Memory Usage 1,745KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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