View Full Version : V3 Pad
Aesma Deva
04-12-2006, 10:00 PM
Credit for the idea goes to Chen and his VBPad for VB 2.2 (https://vborg.vbsupport.ru/showthread.php?t=29760).
Basically, this hack does the same. You can save a certain number of notes, with a certain number of characters each. HTML, BB code, the IMG tag and smilies can be used, everything set in the Admin CP.
The only feature missing (comparing to Chen's hack) that I know of is the date when the notes were last updated, which I'll probably be adding soon.
Installation:
1. Update the product-vbpad.xml from your admin CP
2. In the USERCP template find:
<!-- ############## END NEW REPUTATION ############## -->
</if>
Add below:
<if condition="$padactivated">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="5">
My VB Pad Notes
</td>
</tr>
</thead>
<tbody>
$padoutput
</tbody>
</table>
</if>
3. In the USERCP_SHELL template find:
<tr>
<td class="$navclass[options]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td>
</tr>
Add below:
<tr>
<td class="$navclass[v3pad]" nowrap="nowrap"><a class="smallfont" href="profile.php?do=editpad">Edit VB Pad</a></td>
</tr>
4. Make any changes you want in the VBPad options, in VBulletin options, and you're over
Screenshots:
rareclownfish
04-13-2006, 03:23 PM
Screen shot
dsotmoon
04-13-2006, 03:37 PM
sounds good, can you make it usergroup based?
Stangsta
04-13-2006, 03:39 PM
sounds good, can you make it usergroup based?Just add a usergroup based conditional to the template edit.
Use this for reference: https://vborg.vbsupport.ru/showthread.php?t=109279
Aesma Deva
04-13-2006, 03:45 PM
Screenshot added (you can of course change the text field's width/height by changing the cols/rows attributes of the textarea tag).
The Chief
04-13-2006, 03:50 PM
looks interesting...
trainer
04-13-2006, 04:03 PM
can you save more than i message? do you have a screen shot of mltiple messages?
Aesma Deva
04-13-2006, 04:08 PM
You can save anything that you write in there, in as many lines as you want, if that's what you mean.
Edit ~ New screenshot attached to this post.
I'm open to suggestions by the way.
Oblivion Knight
04-13-2006, 04:48 PM
Suggestion:
Try to use vB's editor rather than a textarea. Not that it would offer many improvements, but at least user's would be able to Increase/Decrease the editor size as they please, and if they use the WYSIWIG editor they could have quite a nicely formatted Notepad area.
apdcanari
04-13-2006, 04:49 PM
My code :
<!-- ############## BLOC NOTES ############## -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="7">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('usercp_blocnotes')"><img id="collapseimg_usercp_blocnotes" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_usercp_blocnotes].gif" alt="" border="0" /></a>
Notepad
</td>
</tr>
</thead>
<tbody id="collapseobj_usercp_blocnotes" style="$vbcollapse[collapseobj_usercp_blocnotes]">
<tr class="thead">
<td class="alt1">
<form action="profile.php" method="POST">
<input type="hidden" name="userid" value="$bbuserinfo[userid]" />
<input type="hidden" name="do" value="pnotes" />
<p align="center">
<textarea name="pnotes" rows="7" style="font-family:'courier new'" cols="80">$persnotes</textarea><br />
<input type="submit" value="Save" />
</p>
</form>
</td>
</tr>
</tbody>
</table>
<br />
<!-- ############## END BLOC NOTES ############## -->
Aesma Deva
04-13-2006, 05:19 PM
My first bug is now fixed <3
@Oblivion: Thanks, I'll try that. I'll also try making it parse BB code/use smilies, if I have time.
And yes, you can modify the template code as you want, as long as you keep the basic stuff which is:
<form action="profile.php" method="POST">
<input type="hidden" name="userid" value="$bbuserinfo[userid]" />
<input type="hidden" name="do" value="pnotes" />
<textarea name="pnotes">$persnotes</textarea>
<input type="submit" />
trainer
04-13-2006, 06:04 PM
s this similar to this hack for vb2
https://vborg.vbsupport.ru/showthread.php?t=29760&highlight=vbpad
Aesma Deva
04-13-2006, 06:15 PM
With some work, I could turn it to something similar. Where was the result of the formatting displayed though? I don't own VB2 to try.
Edit ~ Or were they just saved and the code stayed unparsed? This way though I don't see the point of allowing/disallowing BB codes/html etc..
tipoboy
04-13-2006, 08:35 PM
followed the instructions exactly imported the product then done the usercp edit, but not working, usercp has no notes box any idea's??
edit: hen the product is installed i get this error at the top of my page
Parse error: parse error, unexpected '}' in /mounted-storage/home7/sub004/sc14626-UZRO/scottishwheelnut.co.uk/forum/profile.php(154) : eval()'d code on line 64
Stangsta
04-13-2006, 09:18 PM
hmmm, it works just fine EXCEPT, it takes every page in the userCP (edit profile, edit signature, etc.) and replaces that page with the notes box. :(
followed the instructions exactly imported the product then done the usercp edit, but not working, usercp has no notes box any idea's??
edit: hen the product is installed i get this error at the top of my page
Same error when submitting the note.
apdcanari
04-13-2006, 09:44 PM
The bug is : header("Location:usercp.php")
lordofgun
04-14-2006, 02:40 AM
yep...now none of my usercp links work.
uninstalling until a fix.
SuperFly
04-14-2006, 02:45 AM
Very nice Asema
Now i know why your the master coder at my site :D
BoYagoob
04-14-2006, 04:29 AM
installed :)
But there is a bug here:
followed the instructions exactly imported the product then done the usercp edit, but not working, usercp has no notes box any idea's??
edit: hen the product is installed i get this error at the top of my page
Parse error: parse error, unexpected '}' in /mounted-storage/home7/sub004/sc14626-UZRO/scottishwheelnut.co.uk/forum/profile.php(154) : eval()'d code on line 64
to fix that bug, just edit the xml file you download:
Find:
====
header("Location:usercp.php")
};]]
Replace it by:
===========
header("Location:usercp.php")
;}]]
( What I did is just reversing the }; to ;} ;) )
Then, reimport it again. Remember to overwrite the old one.
Deagle Man
04-14-2006, 08:12 AM
I would use this if I didn't have to edit templates, it's my most dreaded part of vBulletin...It really get's annoying in the end.
Aesma Deva
04-14-2006, 11:45 AM
ksheetsorry, I'll change it.
@Stangsta: That was what I fixed. Or what I was supposed to fix.
I have 17 or so days off school now, so I'll try to make it similar to the VBPad. I don't really know how to add the options for it at the CP, anyone can help with this?
Now i know why your the master coder at my site
Why, you didn't know before? :cry:
What is it about the templates? I've hacked the heck out of them at Fly's forum.
By the way, I'm a codah!
tipoboy
04-14-2006, 12:20 PM
ok did what you suggested and tried uploading the product again but now i get this error when i hit the import button
XML Error: mismatched tag at Line 27
also will this fix the problem of the notes box not showing up at all??
i uploaded the original product then edited the USERCP and nothing showed, except that error at the top of thhe page. any help appreciated
Aesma Deva
04-14-2006, 03:11 PM
The textbox will appear whether you have uploaded the product or not, and I uninstalled and installed the product again, and it seems to work fine.
I'll try to install it for you, if you make me an account on your forums with templates and plugins access in the admin CP.
eNforce
04-14-2006, 04:01 PM
Cool little mod :D
Aesma Deva
04-14-2006, 04:52 PM
Thanks.
Does it work for you? So that I know if the problem is with the mod itself, or only in tipoboy's forums.
eNforce
04-14-2006, 05:08 PM
Yeah it works with your code, but currenty using
https://vborg.vbsupport.ru/showpost.php?p=948802&postcount=10
Either way I think the product file is fine :)
tipoboy
04-14-2006, 06:07 PM
pm sent Aesma Deva
dsotmoon
04-14-2006, 07:18 PM
Just add a usergroup based conditional to the template edit.
Use this for reference: https://vborg.vbsupport.ru/showthread.php?t=109279
so would it look something like this?
<if condition="is_member_of($bbuserinfo, X, Y, Z)">
<form action="profile.php" method="post">
<input type="hidden" name="userid" value="$bbuserinfo[userid]" />
<input type="hidden" name="do" value="pnotes" />
<textarea name="pnotes" cols="50" rows="7" style="font-family:'courier new'">$persnotes</textarea><br />
<input type="submit" value="Update" />
</form>
<else /></if>
or is that putting it in the wrong spot?
Aesma Deva
04-14-2006, 08:42 PM
It is the right spot, though I'm unsure of that function.
@tipoboy: PM sent to you, on your forum.
Aesma Deva
04-19-2006, 03:27 PM
~ Update ~
Most of this has been recoded. And yes, it now is like the VB Pad for VB 2.0.
Allan
04-19-2006, 03:59 PM
I like this hack, thanks ;)
Click Install :)
Aesma Deva
04-19-2006, 04:25 PM
Thanks, though I forgot the textareas' cols and rows attributes, so you'll have to edit the VB Pad plugin at profile_start and change
$notetextfields.='<textarea name="padfield' . $pad_l . '" onblur="this.value=this.value.substring(0,' . $charsnum . ')">' . $txtfieldscont[$pad_l-1] . '</textarea><br />'
To
$notetextfields.='<textarea name="padfield' . $pad_l . '" rows="8" cols="60" onblur="this.value=this.value.substring(0,' . $charsnum . ')">' . $txtfieldscont[$pad_l-1] . '</textarea><br />'
Or download the product again and reinstall it, I've fixed it now.
Throtex
04-19-2006, 05:29 PM
This is very useful! However, a few problems:
Your install code doesn't test to see if the field already exists ... it gives a database error if you try to create the field and it already exists (upgrading)
Something is fubared with using bbcode (user can't select the option, even if allowed by the admin)
The CP menu doesn't follow the format of the other links
That's all I have for now ... thanks.
Alien
04-27-2006, 02:10 AM
This is awesome and will be quite useful..
Once the 3 above problems are fixed I'd love to re-install this..
I look forward to it! Nice job!
Aesma Deva
04-27-2006, 10:40 AM
The BB code issue has been fixed.
Edit ~ The user CP nav must be also fixed now, though I can't find a solution to the database errors, unless if I make a seperate product for updating and a seperate one for installation.
Bubble #5
05-06-2006, 12:05 AM
I can't find a solution to the database errors
Oh darn, database error eh? And I was so looking forward to install this too :surprised: Oh well, guess I'll hold off for now until everything works correctly...
Aesma Deva
05-06-2006, 07:51 AM
The only database error happens when updating from a previous version of this to the current one, so if you haven't installed the previous one, you won't get any errors.
Bubble #5
05-06-2006, 04:49 PM
OK great! In that case we'll install it later today :bunny:
Bubble #5
05-11-2006, 12:59 AM
I'm not sure who wrote the HTML for this but it's incredibly sloppy :(
As a general rule <tr>'s need to be closed at the end of each row. <td>'s also need to be closed and fieldsets need to be inside a table, not outside of a table... ;)
yinyang
05-11-2006, 02:20 AM
is it possible to have the vbPad open on a seperate page? if so, please tell me how. thanks!
i'd like to be able to add the NotePad to the navbar.
reismarktq2
05-18-2006, 04:17 PM
Good hack. Two things of note though...
You need to check the v3pad_shell template for missing tags. I found a bunch that needed to be closed.
Also, that template needs to be cached. (It will result in a slight performance hit if it isn't, since a query will be necessary to get the template.)
One pet peeve of mine: Can you change it so there's only one blank notefield on the page instead of showing a notefield for each available note, regardless of whether it's filled in or not? That's how the vb2 version of the hack did it.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.