Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-25-2005, 06:44 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default wysiwyg troubles in 3.0.x

ok the content of the entry disappears when i submit it>_<
here is the code:
PHP Code:
if($_POST['do'] == "insertentry")
        {
            
globalize($_POST, array(
                
'journalid'        => INT,
                
'title'            => STR_NOHTML,
                
'message'        => STR,
                
'private'        => INT,
                
'wcv'            => STR_NOHTML,
                
'mood'            => INT,
                
'allowbudds'    => INT
            
));
            
            
$vbjverify= new verify();
            if(
$vbjverify->verify_journal('journalist_compare'$journalid) AND $bbuserinfo['userid']!=0)
            {
                if(
$_POST['preview'] == "Preview Entry")
                {
                    
$show['entrypreview']= true;
                    
$preview= array();
                    if(isset(
$_POST['WYSIWYG_HTML']))
                    {
                        echo 
"This is WYSIWYG!";
                        require_once(
'./includes/functions_wysiwyg.php');
                        
$message trim(convert_wysiwyg_html_to_bbcode($_POST['WYSIWYG_HTML'], 0));
                    }
                    require_once(
'./includes/functions_newpost.php');
                    
$preview['message_parsed']= convert_url_to_bbcode($message);
                    require_once(
'./includes/functions_bbcodeparse.php');
                    
$preview['message_parsed']= parse_bbcode2($preview['message_parsed'], 0$setting['allow_imgcode'], $setting['allow_smilies'], $setting['allow_bbcode']);
                    
$preview['message']= htmlspecialchars_uni($message);
                    
$preview['title']= $title;
                    
$preview['private']= $private;
                    
$preview['allowbuddies']= $allowbudds;
                    
$preview['whocanview']= $wcv;
                    if(
$mood != 0)
                    {
                        
$getmood$DB_site->query_first("SELECT mood_name, mood_image FROM " TABLE_PREFIX "journal_moods WHERE mood_id=" $mood "");
                        
$preview['moodname']= $getmood['mood_name'];
                        
$preview['moodimg']= $getmood['mood_image'];
                        
$preview['mood']= $mood;
                        
$preview['showmood']= true;
                    }
                    eval(
'$entrypreview = "' fetch_template('journal_entrypreview')."\";");
                    
$_REQUEST['do']= "addentry";
                }
                else
                {
                    
$journal= array();
                    
$journal['journal_id']= $journalid;
                    
                    
$entry= array();
                    
$entry['title']= $title;
                    if (isset(
$_POST['WYSIWYG_HTML']))
                    {
                        require_once(
'./includes/functions_wysiwyg.php');
                        
$entry['message'] = trim(convert_wysiwyg_html_to_bbcode($_POST['WYSIWYG_HTML'], 0));
                    }
                    else
                    {
                        
$entry['message'] = trim($message);
                    }
                    
$entry['private']= $private;
                    
$entry['whocanview']= trim($wcv);
                    
$entry['mood']= $mood;
                    
$entry['allowbuddies']= $allowbudds;
                    
                    
$vbjcreate= new create();
                    
$vbjcreate->build_new_entry($entry$journaltrue);
                    
                    
$url="journal.php?do=showjournal&j=".$journal['journal_id']."";
                    eval(
print_standard_redirect('redirect_journalentryinserted'));
                }
            }
            else
            {
                
print_no_permission();
            }
        } 
Reply With Quote
  #2  
Old 10-26-2005, 03:04 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the same problem happens to me, I can neither get the value in WYSIWYG in 3.0 nor 3.5.

thinking of someone have experiences and share.
Reply With Quote
  #3  
Old 10-26-2005, 06:34 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone know of a solution???
Reply With Quote
  #4  
Old 10-29-2005, 01:07 AM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

please someone help!!!!
Reply With Quote
  #5  
Old 10-31-2005, 07:18 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i still seek an answer>_>
Reply With Quote
  #6  
Old 11-02-2005, 11:13 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i beg that someone please answer my question!!!!
Reply With Quote
  #7  
Old 11-04-2005, 11:06 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

someone answer my question PLEASE!
Reply With Quote
  #8  
Old 11-07-2005, 01:11 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please I Need Help!!
edit: here is the template:
HTML Code:
$stylevar[htmldoctype]
	<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
	<head>
		<title>$vboptions[bbtitle] - vB Journal: Add New Entry</title>
	<script type="text/javascript">
	function validate()
	{
	 form=document.vbform
	 entrytitle=form.title.value
	 entrytext=form.message.value
	 submitOK="true"
	 if(entrytitle.length<5)
	 {
	  alert("Your title for this entry must be at least 5 characters.")
	  submitOK="false"
	 }
	 if(entrytext.length<10)
	 {
	  alert("Your message for your journal entry must be at least 10 characters.")
	  submitOK="false"
	 }
	 if(submitOK=="false")
	 {
	  return false
	 }
	}
	</script>
$headinclude
	</head>
	<body$onload>
	$header
	$navbar
	<br />
	<if condition="$show[entrypreview]">
	$entrypreview
	<br />
	</if>
	<form action="journal.php" method="post" name="vbform" onsubmit="return validate()">
	<input type="hidden" name="journalid" value="$j" />
	<input type="hidden" name="do" value="insertentry" />
	<table class="tborder" width="100%" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0" align="center">
	<tr>
	<td class="tcat">Add Entry:</td>
	</tr>
	<tr>
	<td class="thead">General Journal Entry Information(Required):</td>
	</tr>
	<tr>
	<td class="alt1">Entry Title: <input type="text" name="title" value="$preview[title]" maxlength="80" size="65" /></td>
	</tr>
	<tr>
	<td class="alt2"><fieldset><legend>Entry Message:</legend>$messagearea</fieldset></td>
	</tr>
	<tr>
	<td class="alt1">Mood:  <select name="mood"><optgroup label="Moods">
	<option value="0">None</option>
	$moodbits</optgroup>
	</select>
	</td>
	</tr>
	<tr>
	<td class="thead">Journal Entry Privacy(Optional):</td>
	</tr>
	<tr>
	<td class="alt1">Would you like this entry to be private?<input type="checkbox" name="private" value="1" <if condition="$preview['private']==1">checked="checked" </if>/><br />
	Allow Your Journal Buddies to View This Entry?<input type="checkbox" name="allowbudds" value="1" <if condition="$preview[allowbuddies]==1">checked="checked" </if>/><br />
	If so, who can view?<input type="text" name="wcv" value="$preview[whocanview]" maxlength="150" size="100" /><div class="smallfont">(Type in the userids of the people who you wish to view this entry;remember to put a comma(,) inbetween each userid)</div></td>
	</tr>
	<tr>
	<td class="thead" align="center"><input type="submit" name="submit" value="Submit Entry" class="button" />&nbsp;<input type="submit" name="preview" value="Preview Entry" class="button" /></td>
	</tr>
	</table>
	</form>
	<br />
	<div align="center" class="smallfont">$setting[copyright]</div>
	<br />
	$footer
	</body>
	</html>
Reply With Quote
  #9  
Old 11-08-2005, 01:17 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In order for the WYSIWYG editor to function properly you must have

HTML Code:
onsubmit="return validatePost(this, this.subject.value, $vboptions[postminchars], $vboptions[postmaxchars]);"
in the form tag so that $_POST['WYSIWYG_HTML'] is filled.

This is only for 3.0.x though
Reply With Quote
  #10  
Old 02-16-2006, 04:55 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks An-net, this is really helpful.
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 10:54 PM.


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.03958 seconds
  • Memory Usage 2,306KB
  • Queries Executed 13 (?)
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
  • (2)bbcode_html
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete