3534 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Had an item that was trending
  • Located in United States
+13 more
sevenspark
Moderator
says

BUT …

Images do not show up, just a url: http:xxlocalhost/wordpress/wp-content/uploads/2011/03/yahoo-logo1.jpg

Using:

<?php if ( function_exists( ‘get_option_tree’) ) { echo get_option_tree( ‘upload’ ); } ?>

Then you’re retrieving the image source. You need to build the img tag in the PHP .

<?php if ( function_exists( 'get_option_tree') ): ?>
  <img src="<?php echo get_option_tree( 'upload' ); ?>" />
<?php endif; ?>
212 posts
  • Has been part of the Envato Community for over 5 years
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in Portugal
shaki
says

Thanks Henry! Working as expected!!! Great!

Is there a Thank You button in TF?

:)

EDIT :

Thanks Sevenspark!

751 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
CyberShot
says

I have a question about the importing the option tree file. I am working on a theme and I am going to use the option tree framework on this theme. I figure it would be nice to test it out. So I have been able to get it integrate it using the instructions in this thread just fine. But when it comes time to auto import the file. there are instructions that say to put in the code to delete the tables.

delete_option(‘option_tree’);

does that stay in the file? why exactly does it need to be there for an auto import?

119 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Had an item featured in an Envato Bundle
+10 more
valendesigns
Envato team
says

Hey Guys,

take a look at version 1.1.6 it has the ability to hide the docs and settings and import the options from within the theme. I plan on expanding on this, but it works now. Also, you’re making it harder on yourself by turning it into a framework where it can’t be updated via the WP directory. Then it’s on you to keep it working.

I understand why you’re wanting to do this, it’s just making it harder on you to keep it working and updated for your clients. If you really wanted to help, submit your upgraded code to me so it can be included in the plugin and make it better for everyone.

Cheers!
Derek Herman

1 post
  • Has been part of the Envato Community for over 5 years
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
BeyondDesigns
says

Hey Derek the latest update is awesome! I couldn’t believe my eyes when I saw the option to include the default data in a theme! I mostly use option tree for my client sites but its really a bother to go and load all the options for them. With the latest update it will take care of all this!

PS: If you can also just create an option to change the logo and title of the page (from optiontree to something else) then that would be awesome! Of course you should keep some kind of copyright info if you want in the footer etc.

Cheers man!

PS: wodPess :P

1743 posts Building the Web.
  • Became a Top 20 Author of the Month
  • Had an item that was trending
  • Had an item that became a weekly top seller
  • Has been a beta tester for an Envato feature
+10 more
ZoomIt
says

Just one question – is there anyway to store / get default option values on theme activation ?

1743 posts Building the Web.
  • Became a Top 20 Author of the Month
  • Had an item that was trending
  • Had an item that became a weekly top seller
  • Has been a beta tester for an Envato feature
+10 more
ZoomIt
says

Nevermind – it’s the Theme Options Data field

Awesome plugin by the way – so easy to work with.

1743 posts Building the Web.
  • Became a Top 20 Author of the Month
  • Had an item that was trending
  • Had an item that became a weekly top seller
  • Has been a beta tester for an Envato feature
+10 more
ZoomIt
says

Hey man

I got 2 cases of this error on buyers installs

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/quetal/public_html/site/wp-content/themes/abrax/option-tree/classes/class.admin.php on line 360

Warning: file_get_contents(http://site.qtalcomunicacao.com.br/wp-content/themes/abrax/option-data/theme-options.xml) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/quetal/public_html/site/wp-content/themes/abrax/option-tree/classes/class.admin.php on line 360

Fatal error: Uncaught exception ‘Exception’ with message ‘String could not be parsed as XML ’ in /home/quetal/public_html/site/wp-content/themes/abrax/option-tree/classes/class.admin.php:361 Stack trace: #0 /home/quetal/public_html/site/wp-content/themes/abrax/option-tree/classes/class.admin.php(361): SimpleXMLElement->__construct(’’) #1 /home/quetal/public_html/site/wp-content/themes/abrax/option-tree/index.php(39): OT_Admin->option_tree_default_data(‘off’) #2 /home/quetal/public_html/site/wp-content/themes/abrax/functions.php(56): require(’/home/quetal/pu…’) #3 /home/quetal/public_html/site/wp-settings.php(279): include(’/home/quetal/pu…’) #4 /home/quetal/public_html/site/wp-config.php(90): require_once(’/home/quetal/pu…’) #5 /home/quetal/public_html/site/wp-load.php(30): require_once(’/home/quetal/pu…’) #6 /home/quetal/public_html/site/wp-admin/admin.php(30): require_once(’/home/quetal/pu…’) #7 /home/quetal/public_html/site/wp-admin/themes.php(10): require_once(’/home/quetal/pu…’) #8 {main} thrown in /home/quetal/public_html/site/wp-content/themes/abrax/option-tree/classes/class.admin.php on line 361

which reffers to this line here –


    $ot_xml_file = get_bloginfo('template_url') . "/option-data/theme-options.xml";  
    $rawdata = file_get_contents(  $ot_xml_file );

Any idea ?

Thanks!

2627 posts Put a Donk On It
  • Had an item that became a weekly top seller
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
+11 more
ThemeProvince
says

URL file-access is disabled

That’s probably their server not allowing access to that file. Get them to contact their host.

Also try replacing get_bloginfo(‘template_url’); with TEMPLATEPATH

1149 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+3 more
fillerspace
says

@zoomit

That’s a server config that is blocking file_get_contents from fetching files using url paths (e.g. http://www.domain.com/file.txt). You can enable this, or change the code to fetch using a file path (e.g. /var/usr/content/www/file.txt). get_bloginfo should have a template_path option for this.

by
by
by
by
by
by