PDA

View Full Version : Use Vb Standard Editor on Custom Page


SaN-DeeP
07-06-2004, 05:12 AM
Hello there,
I want to use VB Standard Editor on some custom pages
(this will allow users to enter some data, customized with the editor and upload to a seperate table - field in vb3 database)

for example: I want to use the Standard editor with V3arcade mod, which will allow me to add the description for cars in advance way.

Please let me know.

Regards,
Sandy...

SaN-DeeP
07-07-2004, 10:26 AM
Hello there,
I want to use VB Standard Editor on some custom pages
(this will allow users to enter some data, customized with the editor and upload to a seperate table - field in vb3 database)

for example: I want to use the Standard editor with V3arcade mod, which will allow me to add the description for cars in advance way.

Please let me know.

Regards,
Sandy...
bumping again to get on top ^_^

is it soo hard :( to make it

Xenon please help

all-the-vb
07-08-2004, 07:36 AM
hello san DEEp

in php file put

<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
//all-the-vb
// get special phrase groups
$phrasegroups = array('threadmanage', 'posting');

// get special data templates from the datastore
$specialtemplates = array(
'smiliecache',
'bbcodecache',
'attachmentcache'
);
// pre-cache templates used by all actions
$globaltemplates = array(
'newpost_attachment',
'newpost_attachmentbit',
'newthread'
);

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once('./includes/functions_newpost.php');
require_once('./includes/functions_editor.php');


$textareacols = fetch_textarea_width();


$newpost['message'] = &$_POST['message'];

$bbuserinfo['showvbcode']=1;

construct_edit_toolbar($newpost['message'], 0, 0, 1,1);

eval('print_output("' . fetch_template('all_the_vb') . '");');
//all-the-vb
?>

and add a new template
template 'all_the_vb'

put in

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] - $vbphrase[post_new_thread]</title>
$headinclude
</head>
<body$onload>
$header
$navbar

<form action="newthread.php" method="post" name="vbform"<if condition="!is_browser('webtv')"> onsubmit="return validatePost(this, this.subject.value, $vboptions[postminchars], $vboptions[postmaxchars]);" onreset="vB_RESET(this);"</if>>

$postpreview

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">

<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth]" align="$stylevar[left]">

$usernamecode
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>

<!-- message area -->
<div class="smallfont">$vbphrase[message]:</div>
$messagearea
<!-- / message area -->

</td>
</tr>
</table>

</div>
</div>

<div style="margin-top:$stylevar[cellpadding]px">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="add" />
<input type="submit" class="button" name="sbutton" value="$vbphrase[submit_new_thread]" accesskey="s" tabindex="1" />
<input type="submit" class="button" name="preview" value="$vbphrase[preview_post]" accesskey="p" tabindex="1" />
</div>
</td>
</tr>
</table>

$footer

</body>
</html>

Regards,
all-the-vb

Ghostsuit
08-31-2004, 03:38 AM
handy

Rasthof
04-18-2006, 07:13 PM
Am I wrong, or does it function not the way it should?
When I use this script I get 7 uncached templates and the editor is not showing up.
By the way I noticed that the template has an missing end-tag for "form". It should be closed before the footer.
Has someone a script that is working right?
Would be helpful.
I´m creating a script which adds text and some kind of categories to a database-table and I want to edit that text. In both cases I want to use the editor included in vB for the text.

SaN-DeeP
04-18-2006, 09:35 PM
this thread is almost 22 months old, above code was suited for vbulletin 3.x versions only.

Antivirus
06-15-2006, 08:42 PM
would anyone happen to have an update of the code above for 3.5 series? I have been trying to figure it out and i have a massive headache. Oh pleeease! I would do the pee pee dance if someone can help with this