Support » Plugins » [Plugin: Random / Rotating Ads V2] Image upload option Datafeedr ads

Viewing 15 replies - 1 through 15 (of 20 total)
  • Support forum @ seems impossible to find. Maybe they only offer commercial services. Anyone?

    Found forum, but seems to be for commercial users:

    what about the plug-in kadom ads management? i’m liking that. i place an ad by uploading the image

    you can look at to see what mine looks like. i haven’t got them to rotate yet, but then, i’m pretty new at this

    Thanks news reporter. Will have a look asap.

    Removed this post as it was mentioned twice..

    Added this code for an image upload field, but it does not work yet:

    	function my_admin_scripts() { // load necessary script including new script
    	wp_register_script('my-upload', WP_PLUGIN_URL .'/my-script.js', array('jquery','media-upload','thickbox'));
    	function my_admin_styles() {
    	if (isset($_GET['page']) && $_GET['page'] == 'datafeedr-ads') {
    	add_action('admin_print_scripts', 'my_admin_scripts'); // run javascripts in html header
    	add_action('admin_print_styles', 'my_admin_styles'); // add your own css styles
    				<tr valign="top">
    				<th scope="row">Upload Image</th>
    				<td><label for="upload_image">
    				<input id="upload_image" type="text" size="36" name="upload_image" value="" />
    				<input id="upload_image_button" type="button" value="Upload Image" />
    				<br />Enter an URL or upload an image for the banner.

    Maybe the script has to be adjusted as it is part of another plugin now with its own form. Here is the custo script that should be loaded:

    jQuery(document).ready(function() {
    jQuery('#upload_image_button').click(function() {
     formfield = jQuery('#upload_image').attr('name');
     tb_show('', 'media-upload.php?type=image&TB_iframe=true');
     return false;
    window.send_to_editor = function(html) {
     imgurl = jQuery('img',html).attr('src');

    Complete plugin code here:

    Added script to top which did load thickbox and I did get a pop-up thanks to mordot at #wordpress (IRC) . Now I see the added my-script.js is not loaded so I think:

    wp_register_script('my-upload', WP_PLUGIN_URL.'/my-script.js', array('jquery','media-upload','thickbox'));

    is not loaded. Any ideas why?
    The media-upload does not load either. The latter I suspect to be a js conflict..


    Well wp_register path was off. This path:

    wp_register_script('my-upload', WP_PLUGIN_URL.'/datafeedr-ads/my-script.js', array('jquery','media-upload','thickbox'));

    works better. Only now it shows two thickboxes under each other. One empty and the other with the media uploader..

    Hmmm TB_Title is loaded twice and TB_ajaxContent is there for no reason. How can I get rid of those?

    Well I removed class=”thickbox” in added upload field which apparently loaded styled thickboxes twice. Looking better yet again 🙂 Updated code:

    Next q, how do I get the the link to the uploaded url to be added to the add box?


    Well I do get the url, but I would like the javascript to wrap the url in an <img src=”” /> tag as well. How would I do that?

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘[Plugin: Random / Rotating Ads V2] Image upload option Datafeedr ads’ is closed to new replies.