The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to get the javascript edit for profile field on another page?
I want to set up a vB powered page and have the ability for the user to edit a field in their ABOUT ME section, from this new page. Ive got the following code all done (see below) and attached screenshot. The edit pencil links to the edit your details page which is a temp work around. What I want is to do the javascript instant inline editing like it does in their profile about me section. Can you have a look at my coding and let me know where (and what) to place in so that when I click on the pencil, you can instantly edit the profile field?
Thanks!! Code:
<!-- ########## WHATS ON YOUR MIND ######### --> <tr><td class="alt1" nowrap align="left"> <fieldset> <a href="/profile.php?do=editprofile"><img src="/image.php?u=$bbuserinfo[userid]" alt="Some avatar" border="0" /></a> <b>What's On Your Mind?:</b><br> $bbuserinfo[field15]<a class="smallfont" href="profile.php?$session[sessionurl]do=editprofile"> <img class="inlineimg" border="0" src="/board/images/misc/userfield_edit.gif"/></a> </fieldset></td> </tr> <!-- ########## /WHATS ON YOUR MIND ######### --> |
#3
|
||||
|
||||
yep, read it, tried the code you placed but nothing showed up.
Im not as advanced with this as I look, looking for someone with experience to help me get past the final loop and post the solution (code) to get it to work. Anyone know the code to use? |
#4
|
||||
|
||||
She's saying you should be doing this:
Code:
<!-- ########## WHATS ON YOUR MIND ######### --> <tr><td class="alt1" nowrap align="left"> <fieldset> <a href="/profile.php?do=editprofile"><img src="/image.php?u=$bbuserinfo[userid]" alt="Some avatar" border="0" /></a> <dt class="shade" id="profilefield_title_15">What's On Your Mind?:</dt> <dd id="profilefield_value_15"> $bbuserinfo[field15] <script type="text/javascript"> <!-- vBulletin.register_control("vB_ProfilefieldEditor", "15"); //--> </script> </dd> </fieldset> </td></tr> <!-- ########## /WHATS ON YOUR MIND ######### --> |
#5
|
||||
|
||||
actually that disabled the pencil I had there...and the javascript one isnt there either...
--------------- Added [DATE]1237872370[/DATE] at [TIME]1237872370[/TIME] --------------- also this in your code vBulletin.register_control("vB_ProfilefieldEditor" , "1"); I changed to vBulletin.register_control("vB_ProfilefieldEditor" , "12"); and still no edit pencil... |
#6
|
||||
|
||||
You should be sure to add in the .js includes... I thought you had done that already.
Code:
<script type="text/javascript" src="clientscript/vbulletin_profilefield_edit.js?v=$vboptions[simpleversion]"></script> <!-- ########## WHATS ON YOUR MIND ######### --> <tr><td class="alt1" nowrap align="left"> <fieldset> <a href="/profile.php?do=editprofile"><img src="/image.php?u=$bbuserinfo[userid]" alt="Some avatar" border="0" /></a> <dt class="shade" id="profilefield_title_15">What's On Your Mind?:</dt> <dd id="profilefield_value_15"> $bbuserinfo[field15] <script type="text/javascript"> <!-- vBulletin.register_control("vB_ProfilefieldEditor", "15"); //--> </script> </dd> </fieldset> </td></tr> <!-- ########## /WHATS ON YOUR MIND ######### --> |
#7
|
||||
|
||||
wow, that worked you rock !!!!
|
#8
|
||||
|
||||
Use the variable $vboptions[simpleversion] instead of 381. You can put it anywhere above where you call it, the head is fine.
|
#9
|
||||
|
||||
Thanks Tiger and Lynne!
Solution reached! |
#10
|
||||
|
||||
Actually, 1 more question...
The layout is taking up to much space by putting the text UNDER the avatar... How can I put the text to the right of the avatar? I've tried putting the avatar in the left cell of a table, and the text on the right, but the table structure breaks up the tables bad on the page Im using... Is there another way to do it without tables? (Ive attached a screenshot of the way it looks now, and how I want the layout to look... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|