Forum Replies Created

Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter krama757

    (@krama757)

    Question: How do you hide the textbox for post-content so that only the visual editor is used?

    This question should be bolded in the previous post >.< I wish the forum had a front-end edit function ??

    Thread Starter krama757

    (@krama757)

    Np Inapan…I’m just thankful that you made such an awesome plugin.

    I’ll give a brief idea of what I did:
    Question: How would you resize the widget to only have a certain width?
    Solution:
    In quickpost-widget.php:
    Place: “<div class=”quick_post”>” before the line “<form autocomplete=”off” method=”post” name=quickpostwidget action=”” >”
    Then place your “</div>” after the “</form>”.
    Now in your template files, you can add custom style sheets for div.quick_post to choose your width, height, etc.

    Question: How would you validate the input in a custom field?
    Solution: Look for for ($cfn = 1; $cfn <= $qpw_custom_fields_count; $cfn++) {
    Here, if you know what your customfields are going to be then you can individually check your custom field values by using:

    if($_POST['customfield_1'] == 'Some incorrect input'){
    $error = 'yes';
    								?>
    								<script type="text/javascript">
    									document.getElementById(<?php echo '\'' . $customfield . '\''; ?>).style.border="solid 1px <?php echo $error_color; ?>";
    								</script> <?php
    							}

    This should allow you to control and check the inputs of your various custom fields assuming you know what each custom field is supposed to be.
    Question: How do you hide the textbox for post-content so that only the visual editor is used?
    Solution:
    In your widget settings, go to the style setting for post content and enter “visibility: hidden; position: absolute; top: 0; left: 0;” into the textbox.

    That should effectively hide your post-content text box so people are forced to use the visual editor.

    Happy Coding!

    Thread Starter krama757

    (@krama757)

    Hmm, figured out my own hacks to do the form validation and the widget resize. I also just hid the text area for the post content and now people are forced to use the visual editor.

    Solving problems is fun ??

    Thread Starter krama757

    (@krama757)

    Hah, found the solution myself.

    Please go to : https://www.ilovecolors.com.ar/custom-post-types-tdomf/

    Good luck!

Viewing 4 replies - 16 through 19 (of 19 total)