3497 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Located in United States
  • Helps us moderate the forums
+10 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 4 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
+8 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 4 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

1693 posts Building the Web.
  • Has been a beta tester for an Envato feature
  • Sells items exclusively on Envato Market
  • Has sold $250,000+ on Envato Market
  • Had an item featured on Envato Market
+7 more
ZoomIt says

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

1693 posts Building the Web.
  • Has been a beta tester for an Envato feature
  • Sells items exclusively on Envato Market
  • Has sold $250,000+ on Envato Market
  • Had an item featured on Envato Market
+7 more
ZoomIt says

Nevermind – it’s the Theme Options Data field

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

1693 posts Building the Web.
  • Has been a beta tester for an Envato feature
  • Sells items exclusively on Envato Market
  • Has sold $250,000+ on Envato Market
  • Had an item featured on Envato Market
+7 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!

2588 posts Put a Donk On It
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has sold $250,000+ on Envato Market
+10 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

1148 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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by