The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hello Everyone,
I'm trying to get text from the WYSIWYG and place it in a database field. I have got all the other information to store like username and userid but I cant get the message to store. Code:
$message = $vbulletin->input->clean_gpc('WYSIWYG_HTML', 'message', TYPE_STR); if (isset($WYSIWYG_HTML)) { require_once('./includes/functions_wysiwyg.php'); $message = convert_wysiwyg_html_to_bbcode($WYSIWYG_HTML, $vboptions['allowhtml']); } else { $message = trim($message); } $vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX ."helpcenter_ticket(title, departmentid, postusername, postuserid, lastposter, lastupdate, dateline) VALUES ('" . addslashes(htmlspecialchars_uni($_REQUEST['title'])) . "', '" . intval($_REQUEST['departmentid']) . "','" . addslashes($vbulletin->userinfo['username']) . "', '" . intval($vbulletin->userinfo['userid']) . "','" . addslashes($vbulletin->userinfo['username']) . "'," . TIMENOW . ", " . TIMENOW . ")"); $ticketid = $vbulletin->db->insert_id(); $vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "helpcenter_ticketreply(ticketid, username, userid, dateline, pagetext, ipaddress) VALUES (" . intval($ticketid) . ",'" . addslashes($vbulletin->userinfo['username']) . "', " . intval($vbulletin->userinfo[userid]) . "," . TIMENOW . ",'" . addslashes($message) . "', '" . addslashes(IPADDRESS) . "' )"); Thanks, Paul. |
#2
|
||||
|
||||
![]()
You are using the clean_gpc() function wrong.
mixed &clean_gpc (array $source, string $varname, [integer $vartype = TYPE_NOCLEAN]) |
#3
|
|||
|
|||
![]()
Still not working, and I dont know what i'm doing wrong. All the other information goes into the DB but not the contents of the message box.
Code:
if ($_REQUEST['do'] == 'submitnewticket'){ $vbulletin->input->clean_array_gpc('r', array('message' => TYPE_STR)); $message = $vbulletin->GPC['message']; if (isset($WYSIWYG_HTML)) { require_once('./includes/functions_wysiwyg.php'); $message = convert_wysiwyg_html_to_bbcode($WYSIWYG_HTML, $vboptions['allowhtml']); } else { $message = trim($message); } $vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX ."helpcenter_ticket(title, departmentid, postusername, postuserid, lastposter, lastupdate, dateline) VALUES ('" . addslashes(htmlspecialchars_uni($_REQUEST['title'])) . "', '" . intval($_REQUEST['departmentid']) . "','" . addslashes($vbulletin->userinfo['username']) . "', '" . intval($vbulletin->userinfo['userid']) . "','" . addslashes($vbulletin->userinfo['username']) . "'," . TIMENOW . ", " . TIMENOW . ")"); $ticketid = $vbulletin->db->insert_id(); $vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "helpcenter_ticketreply(ticketid, username, userid, dateline, pagetext, ipaddress) VALUES (" . intval($ticketid) . ",'" . addslashes($vbulletin->userinfo['username']) . "', " . intval($vbulletin->userinfo['userid']) . "," . TIMENOW . ",'" . addslashes($message) . "', '" . addslashes(IPADDRESS) . "' )"); //Insert AutoResponse Mail Here $vbulletin->url = "helpcenter.php?$session[sessionurl]do=ticket&tid=".$ticketid; eval(print_standard_redirect('redirect_postthanks')); } |
#4
|
|||
|
|||
![]() PHP Code:
PHP Code:
|
#5
|
|||
|
|||
![]()
Nope still not storing in the database. Starting to drive me insane lol.
Thanks, Paul. |
#6
|
||||
|
||||
![]()
Check that the variable actually has something in it...
|
#7
|
|||
|
|||
![]() Quote:
Thanks, Paul. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|