Skip to:
Content
Pages
Categories
Search
Top
Bottom

javascript images


  • Erwin Gerrits
    Participant

    @egerrits

    One of my calendar javascripts needs to access some images in the image base directory (mu-plugins/bp-events/images). How do I reference $bp->events->image_base in javascript? I can’t seem to make ANY relative path work, such as “wp-content/mu-plugins/bp-events/images” or “mu-plugins/bp-events/images”.

Viewing 2 replies - 1 through 2 (of 2 total)

  • Burt Adsit
    Participant

    @burtadsit

    bp doesn’t really have a blog id in the member theme. So the problem is relative to what? bp references locations relative to the root blog, blog id 1 when it has to. This is to locate bp resources.

    From bp-core.php

    /* The domain for the root of the site where the main blog resides */

    $bp->root_domain = bp_core_get_root_domain();

    Whenever I refer to anything in bp I use absolute references. Relative references are just asking for trouble. IMHO.

    I can’t give you any help with javascript yet. I’m just moving into that area as I begin learning ajax.


    fishbowl81
    Participant

    @fishbowl81

    you can always pass in values when you call the javascript.

    Or your js file could be a php file which would just print your js?

    Brad

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘javascript images’ is closed to new replies.
Skip to toolbar