Osclass Support Forums

Osclass theme support => Beta Osclass Theme => Topic started by: Jesus on October 09, 2019, 04:45:58 PM

Title: item description should not be required
Post by: Jesus on October 09, 2019, 04:45:58 PM
Make the description form not required

(In item post)
Title: Re: item description should not be required
Post by: MB Themes on October 09, 2019, 06:17:57 PM
Osclass require description.
Title: Re: item description should not be required
Post by: Jesus on October 09, 2019, 07:26:45 PM
Osclass require description.


But there must be a way that is not required right?
Title: Re: item description should not be required
Post by: MB Themes on October 10, 2019, 09:53:02 AM
Maybe yes, try find min description length in item settings
Title: Re: item description should not be required
Post by: Jesus on October 19, 2019, 11:11:26 AM
Maybe yes, try find min description length in item settings

I still haven't got the solution, but I am moving forward on something

oc-includes/osclass/frm/Item.form.class.php

we have to modify there
Title: Re: item description should not be required
Post by: MB Themes on October 19, 2019, 06:53:40 PM
Do not quite think so, there is somewhere controller checking if description is filled, I would check item-actions.php
Title: Re: item description should not be required
Post by: Jesus on October 21, 2019, 12:15:15 PM
Do not quite think so, there is somewhere controller checking if description is filled, I would check item-actions.php

I think I found the solution, let me try! I still do not work 100%
Title: Re: item description should not be required
Post by: siken on October 21, 2019, 09:26:20 PM
Make the description form not required

(In item post)


To change in oc-includes/osclass/frm/Form.form.class.php.php

       static protected function generic_textarea($name, $value) {
            $name = osc_esc_html($name);
      if($value=='') echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">PUT HERE THE TEXT YOU WANT TO APPEAR ALWAYS IN THE DESCRIPTION. FOR EXAMPLE: YOURWEB.COM</textarea>';
             else echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">' . $value . '</textarea>';
        }

    }
Title: Re: item description should not be required
Post by: Jesus on October 22, 2019, 11:31:39 AM
Make the description form not required

(In item post)


To change in oc-includes/osclass/frm/Form.form.class.php.php

       static protected function generic_textarea($name, $value) {
            $name = osc_esc_html($name);
      if($value=='') echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">PUT HERE THE TEXT YOU WANT TO APPEAR ALWAYS IN THE DESCRIPTION. FOR EXAMPLE: YOURWEB.COM</textarea>';
             else echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">' . $value . '</textarea>';
        }

    }

It works, but now this comes out:
Error "Description: enter at least 10 characters"
Title: Re: item description should not be required
Post by: siken on October 22, 2019, 11:44:49 AM
Make the description form not required

(In item post)


To change in oc-includes/osclass/frm/Form.form.class.php.php

       static protected function generic_textarea($name, $value) {
            $name = osc_esc_html($name);
      if($value=='') echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">PUT HERE THE TEXT YOU WANT TO APPEAR ALWAYS IN THE DESCRIPTION. FOR EXAMPLE: YOURWEB.COM</textarea>';
             else echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">' . $value . '</textarea>';
        }

    }

It works, but now this comes out:
Error "Description: enter at least 10 characters"


They are things of osclass. You can try adding something like: post for free on myweb.com

Or try modifying the number 10 that appears on "rows", or looking at itempost.php in your theme
Title: Re: item description should not be required
Post by: Jesus on October 22, 2019, 12:02:35 PM
Make the description form not required

(In item post)


To change in oc-includes/osclass/frm/Form.form.class.php.php

       static protected function generic_textarea($name, $value) {
            $name = osc_esc_html($name);
      if($value=='') echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">PUT HERE THE TEXT YOU WANT TO APPEAR ALWAYS IN THE DESCRIPTION. FOR EXAMPLE: YOURWEB.COM</textarea>';
             else echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">' . $value . '</textarea>';
        }

    }

It works, but now this comes out:
Error "Description: enter at least 10 characters"


They are things of osclass. You can try adding something like: post for free on myweb.com

Or try modifying the number 10 that appears on "rows", or looking at itempost.php in your theme

I know, I know

I was thinking of "Delete" the description field and make a new one in extras, so I don't have to suffer anymore  ;D
Title: Re: item description should not be required
Post by: siken on October 22, 2019, 12:09:28 PM
Make the description form not required

(In item post)


To change in oc-includes/osclass/frm/Form.form.class.php.php

       static protected function generic_textarea($name, $value) {
            $name = osc_esc_html($name);
      if($value=='') echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">PUT HERE THE TEXT YOU WANT TO APPEAR ALWAYS IN THE DESCRIPTION. FOR EXAMPLE: YOURWEB.COM</textarea>';
             else echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">' . $value . '</textarea>';
        }

    }

It works, but now this comes out:
Error "Description: enter at least 10 characters"


They are things of osclass. You can try adding something like: post for free on myweb.com

Or try modifying the number 10 that appears on "rows", or looking at itempost.php in your theme

I know, I know

I was thinking of "Delete" the description field and make a new one in extras, so I don't have to suffer anymore  ;D


Take advantage of what I have told you so that your website appears in the description, in case someone shares it on their social networks. If Osclass asks you for 10 characters, put a phrase like: post for free on myweb.com

The description field is something that Osclass asks for, if you don't want the user to touch it, search Google for something like hide or hidden, for example: <input type = "hidden">

Or to hide an element in div, use:

display: none;
visibility: hidden;

In <div style = "display: none"> here description field </div>
Title: Re: item description should not be required
Post by: Jesus on October 22, 2019, 12:12:08 PM
Make the description form not required

(In item post)


To change in oc-includes/osclass/frm/Form.form.class.php.php

       static protected function generic_textarea($name, $value) {
            $name = osc_esc_html($name);
      if($value=='') echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">PUT HERE THE TEXT YOU WANT TO APPEAR ALWAYS IN THE DESCRIPTION. FOR EXAMPLE: YOURWEB.COM</textarea>';
             else echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">' . $value . '</textarea>';
        }

    }

It works, but now this comes out:
Error "Description: enter at least 10 characters"


They are things of osclass. You can try adding something like: post for free on myweb.com

Or try modifying the number 10 that appears on "rows", or looking at itempost.php in your theme

I know, I know

I was thinking of "Delete" the description field and make a new one in extras, so I don't have to suffer anymore  ;D


Take advantage of what I have told you so that your website appears in the description, in case someone shares it on their social networks. If Osclass asks you for 10 characters, put a phrase like: post for free on myweb.com

The description field is something that Osclass asks for, if you don't want the user to touch it, search Google for something like hide or hidden, for example: <input type = "hidden">

Or to hide an element in div, use:

display: none;
visibility: hidden;

In <div style = "display: none"> here description field </div>

I am trying to make it work, what I need is when users want to place the description do it, and when not, no !, I do not want to hide it, just be a field where they want to fill or not
Title: Re: item description should not be required
Post by: siken on October 22, 2019, 12:16:44 PM
Make the description form not required

(In item post)


To change in oc-includes/osclass/frm/Form.form.class.php.php

       static protected function generic_textarea($name, $value) {
            $name = osc_esc_html($name);
      if($value=='') echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">PUT HERE THE TEXT YOU WANT TO APPEAR ALWAYS IN THE DESCRIPTION. FOR EXAMPLE: YOURWEB.COM</textarea>';
             else echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">' . $value . '</textarea>';
        }

    }

It works, but now this comes out:
Error "Description: enter at least 10 characters"


They are things of osclass. You can try adding something like: post for free on myweb.com

Or try modifying the number 10 that appears on "rows", or looking at itempost.php in your theme

I know, I know

I was thinking of "Delete" the description field and make a new one in extras, so I don't have to suffer anymore  ;D


Take advantage of what I have told you so that your website appears in the description, in case someone shares it on their social networks. If Osclass asks you for 10 characters, put a phrase like: post for free on myweb.com

The description field is something that Osclass asks for, if you don't want the user to touch it, search Google for something like hide or hidden, for example: <input type = "hidden">

Or to hide an element in div, use:

display: none;
visibility: hidden;

In <div style = "display: none"> here description field </div>

I am trying to make it work, what I need is when users want to place the description do it, and when not, no !, I do not want to hide it, just be a field where they want to fill or not


To change in oc-includes/osclass/frm/Form.form.class.php.php

       static protected function generic_textarea($name, $value) {
            $name = osc_esc_html($name);
      if($value=='') echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">PUT HERE THE TEXT YOU WANT TO APPEAR ALWAYS IN THE DESCRIPTION. FOR EXAMPLE: YOURWEB.COM</textarea>';
             else echo '<textarea id="' . preg_replace('|([^_a-zA-Z0-9-]+)|', '', $name) . '" name="' . $name . '" rows="10">' . $value . '</textarea>';
        }

    }




The description field must have text to be published. Add a phrase there so that the same phrase is always published, if you want to leave a space for them to add their text, add <br/> <br/> before your text.

So when someone wants to add something in description, they can do it and if they don't want to add anything in description, your sentence will come out.

But it cannot be blank, because Osclass forces the text to exist.

Try to see if putting 10 spaces, Osclass allows you to publish: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;