tanckom
Forum Replies Created
-
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Add custom field in ads displayThanks!
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Validator Doc not working (FORMS API)Okay thanks, worked.
My final question about this one is, how can i use random number?
I found out if I give minimun a random number between 1-10 and max 11-20 it wont work always because for example:
Current randoms are: min:1 ; max 20 and you insert 4 and hit preview.
Page is going to reload randoms and the new randoms are:
min: 9 ; max:13
The input from before didnt work because it was compared to the new randoms. How can i check the input with current randoms instead with the next (because they are not always true).
Example:add_filter( “adverts_form_load”, “my_adverts_form_load” );
function my_adverts_form_load( $form ) {
if( $form[“name”] != “advert” ) {
return $form;
}
$form[“field”][] = array(
“name” => “check”,
“type” => “adverts_field_text”,
“order” => 25,
“label” => “Input a number between 10 and 100”,
“is_required” => true,
“validator” => array(
array(
“name” => “in_between”,
“params” => array(“min” => rand ( 1 , 10 ), “max” => rand ( 11 , 20 )),
),
array(
“name” => “is_required”
),
));
return $form;
}function in_between( $data, $params = null ) {
if( isset( $params[“min”] ) && $data < $params[“min”] ) {
return “to_small”;
}if( isset( $params[“max”] ) && $data > $params[“max”] ) {
return “to_big”;
}return true;
}
adverts_form_add_validator(“in_between”, array(
“callback” => “in_between”,
“label” => “In Between”,
“default_error” => __( “Incorrect value.”, “adverts” ),
“message” => array(
“to_small” => “Value has to be greater than %min%.”,
“to_big” => “Value has to be smaller than %max%.”
),
“validate_empty” => false
));Forum: Fixing WordPress
In reply to: Manually add reCaptcha to a plugin formBecaus this plugin is not a contact form. Its some kind of marketplace plugin where in this case the form the item details are
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] No comments form on the page adsNot sure how to do this but I can imagine that you need to edit: wpadverts/templates/single.php
And add the comment php/html of WordPress inside here.Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Display ads and image size limitationMessage deleted
- This reply was modified 8 years, 6 months ago by tanckom.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Add advertise Form (change texts)Oh, found it bymyself:
Open this file:
wpadverts/includes/defaults.phpAnd there you can find after line 24 all the post titles, Item information etc. which you can change in the text you want.
To add the “field required”, simply add this code:
"validator" => array( array( "name"=> "is_required" ) )
To every array block, that doesnt have one. Make sure that there’s a “,” before each validator…
Forum: Themes and Templates
In reply to: Simple CSS. Change menu colorTried that, and it works, but I need it for that ONE menu only. Not for all
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Add advertise Form (change texts)This wont change the text, but its more to create new custom fields :/
https://wpadverts.com/documentation/custom-fields/Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Add advertise Form (change texts)Thanks, ill try ??
Forum: Themes and Templates
In reply to: Simple CSS. Change menu colorI used the Browsers-build-in troubleshooters and couldnt find anything on how to do this.
Forum: Plugins
In reply to: [Max Mega Menu] Top Level Menu’s moving aroundYeah, I unfortunately removed the plugin, because it interfered with a second used Theme Menu that was achieved by “Multiple Themes”
However thanks
Forum: Fixing WordPress
In reply to: Is there a plugin for guest sales/posts?Thanks @kjodle, but I would add google captchas…
Is there maybe a plugin where registered users are able to do so?
Forum: Themes and Templates
In reply to: Simple CSS. Change menu colorI am already using a custom CSS plugin. And I’m trying to edit it via that plugin but it wont work
Forum: Themes and Templates
In reply to: Simple CSS. Customizing menu not workingBut I want to use the CSS class: .sub-menu-columns
as the one who defines which submenus shall be displayed in columns and which one normalForum: Plugins
In reply to: [Max Mega Menu] Top Level Menu’s moving aroundMoreover can you also notice, there’s some kind of delay when trying to open second level Menu at Contact/Support. This should also be disabled?
Thanks for taking time!