Search found 4 matches

by battlethem
Mon Jan 07, 2019 5:09 pm
Forum: Plugins
Topic: Save checkbox values in plugins
Replies: 3
Views: 2179

Re: Save checkbox values in plugins

My bad, that's a typo, it should look like this: // Cars - text $html .= '<div>'; $html .= '<input name="cars" type="text" value="'.$this->getValue('cars').'">'; $html .= '</div>'.PHP_EOL; // Bikes - checkbox $html .= '<div>'; $html .= '<input name="bikes" typ...
by battlethem
Sun Jan 06, 2019 4:05 pm
Forum: Plugins
Topic: Save checkbox values in plugins
Replies: 3
Views: 2179

Save checkbox values in plugins

Hello! In the plugin settings, whenever I add input type="text", I can save any values in an array just fine. I save the settings and the values stay there. But checkboxes always reset because I can't seem to save checkbox values in arrays like text values. Here's the array where I save th...
by battlethem
Sun Dec 23, 2018 1:05 pm
Forum: Themes
Topic: file_exists can't find the file on a webserver
Replies: 3
Views: 2418

Re: file_exists can't find the file on a webserver

Alright this was clearly a mistake I made, it does actually work the way I described it in the first post, have no idea why it didn't work at that moment.
But I agree, using THEME_DIR. is much safer for that reason.
Thanks for the help anyway!
by battlethem
Thu Dec 13, 2018 7:10 pm
Forum: Themes
Topic: file_exists can't find the file on a webserver
Replies: 3
Views: 2418

file_exists can't find the file on a webserver

Hey! I'm making a theme and want to insert a simple 'if' statement for the image. Basically, if there's a file "image.jpg" in "my_theme/img/", it'll echo 'Apples', otherwise - 'Oranges': <!--IMAGE EXISTS--> <?php if (file_exists('bl-themes/my_theme/img/image.jpg')): ?> <?php echo...