Quote:
Originally Posted by fly
Is there any way to make the description show up on SHOWTHREAD?
edit: And when editing a thread?
|
About how to make the description show on SHOWTHREAD, I've answer.
About how to display the description editing when you edit a thread, it's a bit complicated, so until now, I have the answer for it.
@ tieuquynhi: Update th?m phần chỉnh Description khi Edit Thread cho tiện nh?
===================================
In "threadadmin_editthread", find:
Code:
<img id="display_posticon" class="inlineimg" src="{vb:raw selectedicon.src}" alt="{vb:raw selectedicon.alt}" />
</div>
Add Below:
Code:
{vb:raw editthreaddesc}
And now creat some new plugins (AdminCP -> Add New Plugin). Choose "Product" of All Plugins: EWT - Thread Description
1. Thread Description - Edit Thread [Template Alteration]
Hook Location: threadmanage_start
Code:
$templater = vB_Template::create('ewt_editpost_threaddesc');
$templater->register('threaddesc', $threaddesc);
$editthreaddesc .= $templater->render();
vB_Template::preRegister('threadadmin_editthread',array('editthreaddesc' => $editthreaddesc));
2. Thread Description: Edit Thread Description Update
Hook Location: threadmanage_update
Code:
$threadman->set('threaddesc', $edit['threaddesc']);
3. Thread Description: Edit Thread Variable Prep
Hook Location: threadmanage_update
Execution Order: 4 (Only needed if you cannot update your description)
Code:
$vbulletin->input->clean_gpc('p', 'threaddesc', TYPE_STR);
$edit['threaddesc'] =& $vbulletin->GPC['threaddesc'];
$edit['threaddesc'] = unhtmlspecialchars($edit['threaddesc']);
4. Thread Description: Variable For Edit Thread
Hook Location: threadmanage_start
Execution Order: 4 (Recommended. To make sure your existing description will be displayed in Text Box)
Code:
$threaddesc = $threadinfo['threaddesc'];
Done.
Finally, please do carefully before asking questions