Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 11-19-2010, 03:07 PM
Cadellin's Avatar
Cadellin Cadellin is offline
 
Join Date: Jan 2009
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a custom template called "edittask" in which I got the WYSIWYG editor using this article.

Using that method the editor is inserted using {vb:raw messagearea} which I have to register in my php file as well as including functions_editor.php

I have created a variable called $edittask_desc which contains the old message which has been created previously using a different form (which also has a WYSIWYG editor).

What I can't work out is how to set the textarea value.

My template is below:

Code:
{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <head>
    <title>{vb:raw pagetitle}</title>
    {vb:raw headinclude}
    {vb:raw headinclude_bottom}
 
    <script type="text/javascript" src="clientscript/vbulletin-editor.js?v={vb:raw vboptions.simpleversion}"></script>
    <link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}vbulletin-formcontrols.css" />
    <link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}editor.css" />
    <link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}bbcode.css" />
  </head>
  <body>
    
    {vb:raw header}
    
    {vb:raw navbar}
    
    <div id="pagetitle">
      <h1>{vb:raw pagetitle}</h1>
    </div>
<div class="task_controls"><div class="task_control_left"><h2>User Panel</h2></div><div class="task_control_right"></div></div>
<h2 class="blockhead">Create New Task</h2>
<div class="blockbody">
            <div class="wysiwyg_block">
<div class="blockbody formcontrols">
<div class="blockrow">
        <form class="vbform block" action="edittask.php" method="post" name="vbform" onsubmit="return vB_Editor['{vb:raw editorid}'].prepare_submit(0,0)"  ><br />
            Name: <br /><input type="text" name="taskname" class="primary textbox full" value="{vb:raw edittask_name}" /><br /><br />
            Type: <br /><select class="primary" name="tasktype"><option value="0">Select Type</option>{vb:raw type_tasks_options}</select><br /><br />
            Description:<br />
{vb:raw messagearea}
<br />

<fieldset><legend>Assign Task: (optional)</legend>
Assign to User: <br />
<select name="taskuser" class="primary" cols="100"><option>none</option>{vb:raw task_user_options}                </select><br /><br />
            Due Date: <br /><input id="datepicker" class="primary textbox full" type="text" name="taskduedate" size="20" READONLY value="{vb:raw edittask_duedate}"/></fieldset>
</div>
</div>
</div>
            <input type='hidden' name='taskid' value='{vb:raw edittask_id}'>
            <input type='hidden' name='s' value='{vb:raw session.sessionhash}' />
            <input type='hidden' name='securitytoken' value='{vb:raw bbuserinfo.securitytoken}' />    
<div class="blockfoot actionbuttons">
<div class="group">
<input class="button" type="submit" value="Submit" />
</div></div>
</form>
</div>

<div style="width:100%;text-align:center;padding:10px;"><span class="copyright">Traction Wars Task Manager {vb:raw taskmanagerversion}</span></div>
    {vb:raw footer}
  </body>
</html>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:00 AM.


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.11081 seconds
  • Memory Usage 2,170KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete