3 posts
  • Has been part of the Envato Community for over 3 years
  • Has collected 10+ items on Envato Market
judalonsmyth says

Help with the image upload function…

I followed the instructions but the Browse button is no calling the js script (at least that is what I think.)

The only thing I did outside of the instructions is this:

I created at new ‘type’ tag for the upload function like this:
array( "name" => "Business Logo",
    "desc" => "",
    "id" => $shortname."_footer_business_logo",
    "type" => "upload",
    "std" => ""),
Also within the functions.php file I setup the upload tag like this:
<?php break;

case "upload":

?>
Business logo

The upload function displays fine within my settings page, the browse button has a hover affect but when you click on it nothing happens.

I added the backend scripts as the first function within the functions.php file and created a new folder called backend and placed the jc scripts in that directory.

It just dawned on me that I might be a pathing problem. I am using a child theme so the get_bloginfo(‘template_directory’) may not be correct. I am going to echo out the path.

Do you have any thoughts?

Yep that was the problem.

get_bloginfo(‘template_directory’) points to the parent theme and added the code to the child. I pointed it to the child them and thickbox came right up.

381 posts
  • Has referred 500+ members
  • Has sold $250,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+6 more
redfactory says

Yep that was the problem. get_bloginfo(‘template_directory’) points to the parent theme and added the code to the child. I pointed it to the child them and thickbox came right up.

Ok nice :) So everything is working now? Just out of curiousity, is this going to be a theme for themeforest or for a client of yours?

701 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Located in Canada
  • Has collected more than 1000 items on Envato Market
chrismccoy says



Or you can use the WP Uploader ? http://www.webmaster-source.com/2010/01/08/using-the-wordpress-uploader-in-your-plugin-or-theme/

Somehow I haven’t been able to set that up. I have done exactly what they say. Maybe that tutorial is somewhat outdated?

Chris ;)

Nope, it’s not outdated, I am using it :D

I can send you the code if you like

mind sending it to me?

chris@lod.com

thx

3 posts
  • Has been part of the Envato Community for over 3 years
  • Has collected 10+ items on Envato Market
judalonsmyth says


Yep that was the problem. get_bloginfo(‘template_directory’) points to the parent theme and added the code to the child. I pointed it to the child them and thickbox came right up.
Ok nice :) So everything is working now? Just out of curiousity, is this going to be a theme for themeforest or for a client of yours?

I am a hack programer at best, I could not even come close to writing an entire theme or one to resell. I purchased a parent/child basic theme and hacking it up so I can use it to start some Internet marketing sites.

I got tired to using different themes so I added a settings page and made most to the theme configurable from that page and now All I have to do is change the css, images and some other stuff and I have a new site and don’t have to keep learning how to change up someone else’s programing style for each new theme I use.

BTW the WPMU Wordpress Multi Site option is assume to run more than one WP site and with domain mapping it even better.

Thanks again for the contribution. The only problem I am having is getting the image path to display in the input box when the settings page is reloaded. It comes up blank and if I save the settings after that is saves as null and the image disappears.

If yo want I can comment the code and give you credit. Just tell me what website or email you want added.

381 posts
  • Has referred 500+ members
  • Has sold $250,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+6 more
redfactory says



Yep that was the problem. get_bloginfo(‘template_directory’) points to the parent theme and added the code to the child. I pointed it to the child them and thickbox came right up.
Ok nice :) So everything is working now? Just out of curiousity, is this going to be a theme for themeforest or for a client of yours?

I am a hack programer at best, I could not even come close to writing an entire theme or one to resell. I purchased a parent/child basic theme and hacking it up so I can use it to start some Internet marketing sites.

I got tired to using different themes so I added a settings page and made most to the theme configurable from that page and now All I have to do is change the css, images and some other stuff and I have a new site and don’t have to keep learning how to change up someone else’s programing style for each new theme I use.

BTW the WPMU Wordpress Multi Site option is assume to run more than one WP site and with domain mapping it even better.

Thanks again for the contribution. The only problem I am having is getting the image path to display in the input box when the settings page is reloaded. It comes up blank and if I save the settings after that is saves as null and the image disappears.

If yo want I can comment the code and give you credit. Just tell me what website or email you want added.

Hi,

The piece of code I mentioned worked for me and a few others, and the saving part is up to you I’m afraid. This differs from theme to theme, depending on your solution. There are a few good tutorials mentioned a few pages back on how to do this. I would start there :)

You don’t have to credit me, I’m just trying to give back to the community :)

Good luck on your website!

by
by
by
by
by
by