438 posts
  • 4 Years of Membership
  • Author Level 4
  • Collector Level 3
  • Exclusive Author
Pixelous
says


valendesigns, one more question. In case of Step 1: Include the plugin & turn on theme mode, should I still wrap my code with function_exists? Thanks.
If you’re including it in your theme you do not need to use function_exists.

Ok, thanks for your answer.

119 posts
  • 8 Years of Membership
  • Affiliate Level 3
  • Author Level 7
  • Bundle Boss
+10 more
valendesigns
Envato team
says



valendesigns, sorry I am bothering u with all these questions, why not just make image width and height as a default feature in your plugin? Thanks.

It’s OK you’re asking questions I don’t mind. As far as my opinion on your feature request, you might be making assumptions that everyone needs to know the image height and width. OptionTree wasn’t created to do everything for you it’s meant to be extendable. You can always create your own custom option types if you need niche options and hook into the validation filter to keep them clean in the DB.

Quick question though, why do you need the height and width, why is that important to you?
At first these attributes speed up the rendering of the page and for the second I need my logo to be aligned center :)

You can center align it with CSS . I believe this will do the trick.

.your-image-class {
  display: block;
  margin: 0 auto;
}
438 posts
  • 4 Years of Membership
  • Author Level 4
  • Collector Level 3
  • Exclusive Author
Pixelous
says




valendesigns, sorry I am bothering u with all these questions, why not just make image width and height as a default feature in your plugin? Thanks.

It’s OK you’re asking questions I don’t mind. As far as my opinion on your feature request, you might be making assumptions that everyone needs to know the image height and width. OptionTree wasn’t created to do everything for you it’s meant to be extendable. You can always create your own custom option types if you need niche options and hook into the validation filter to keep them clean in the DB.

Quick question though, why do you need the height and width, why is that important to you?
At first these attributes speed up the rendering of the page and for the second I need my logo to be aligned center :)

You can center align it with CSS . I believe this will do the trick.

.your-image-class {
  display: block;
  margin: 0 auto;
}

I know, but in this case I need my image width, actually. Without it this will not work, really.

1085 posts
  • Trendsetter
  • Weekly Top Seller
  • Top Monthly Author
  • Elite Author
+11 more
damojo
says

I’m currently also in the process of finding a way to update my themes. I’ve been trying to use this guide http://snippi.com/s/9pa94k0 (thanks guys!) but there is a problem:

Once I upgrade to option-tree 2.0.6 on an existing theme install with all options populated, I recieve an empty theme options panel with only one option named “s”. In the export tab I get a serialized settings string, but importing that yields the same result: empty options… Also the import of my old option-tree.xml files doesn’t work for me.

Im not sure what to do, I have been testing for hours now. Any idea what might be going wrong Derek? If this fail I guess I have to integrate 1.1.8.1 into my themes so users don’t blow up their themes…

Any help is appreciated!

Moritz

438 posts
  • 4 Years of Membership
  • Author Level 4
  • Collector Level 3
  • Exclusive Author
Pixelous
says

valendesigns, I work with Option tree as a Theme Mode: Step 1. Have hiden the settings & documentation pages:

/**
 * Optional: set 'ot_show_pages' filter to false.
 * This will hide the settings & documentation pages.
 */
add_filter( 'ot_show_pages', '__return_false' );

Don’t understand now how a buyer will import my Settings, it’s possible to make it activated with a theme install? Do u understand what I mean?

3256 posts
  • Affiliate Level 4
  • Author Level 9
  • Collector Level 2
  • Top Monthly Author
+11 more
nepbits
says

SOLUTION TO AUTO PRODUCE theme-options.php

Hi guys,

paste this code http://pastie.org/4297956 at the beginning of functions.php, it will produce the theme-options.php file as for instructions in the OT documentation:

Once added the code in functions.php, save and refresh your theme home page in the browser and this code will print the formatted php code for the theme-options.php file.

Copy the output in a new file and save it in your theme folder as ‘theme-options.php’, then require this file within functions.php. If you’ve already moved the option-tree plugin in your theme folder you should be ready to go ;)

Obviously remove this: http://pastie.org/4297956 from functions.php once done :)

Parker

50 posts
  • Affiliate Level 3
  • Author Level 3
  • Collector Level 3
  • Exclusive Author
+1 more
CodeLion
says

SOLUTION TO AUTO PRODUCE theme-options.php

Hi guys,

paste this code http://pastie.org/4297956 at the beginning of functions.php, it will produce the theme-options.php file as for instructions in the OT documentation:

Once added the code in functions.php, save and refresh your theme home page in the browser and this code will print the formatted php code for the theme-options.php file.

Copy the output in a new file and save it in your theme folder as ‘theme-options.php’, then require this file within functions.php. If you’ve already moved the option-tree plugin in your theme folder you should be ready to go ;)

Obviously remove this: http://pastie.org/4297956 from functions.php once done :)

Parker

Thanks ParkerAndKent! i’ll try this solution ASAP .

922 posts
  • Top Monthly Author
  • Weekly Top Seller
  • Power Elite Author
  • Author Level 12
+15 more
MDNW
says

SOLUTION TO AUTO PRODUCE theme-options.php

Hi guys,

paste this code http://pastie.org/4297956 at the beginning of functions.php, it will produce the theme-options.php file as for instructions in the OT documentation:

Once added the code in functions.php, save and refresh your theme home page in the browser and this code will print the formatted php code for the theme-options.php file.

Copy the output in a new file and save it in your theme folder as ‘theme-options.php’, then require this file within functions.php. If you’ve already moved the option-tree plugin in your theme folder you should be ready to go ;)

Obviously remove this: http://pastie.org/4297956 from functions.php once done :)

Parker

You are a gentleman and a saint P&K ;) Well done! Brandon

119 posts
  • 8 Years of Membership
  • Affiliate Level 3
  • Author Level 7
  • Bundle Boss
+10 more
valendesigns
Envato team
says

Hey Guys,

I’m working on a way to export the theme options to a PHP file, should be available early this coming week. It’s a bit more than just a var_export() as I want it to include the add_action() and build a complete file like the demo-theme-options.php but with your saved settings so all you need to do is include it. You should test it and check it for errors before you use though just to be safe.

Cheers, Derek

3256 posts
  • Affiliate Level 4
  • Author Level 9
  • Collector Level 2
  • Top Monthly Author
+11 more
nepbits
says

Hi derek,

v2.0.7 breaks everything. There’s an error with the css and js enqueuing I guess…

Basically the scripts URL is a mix of the plugin location and the ot folder location of the theme…

Parker

by
by
by
by
by
by