Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adding some html to single image display

  • Avatar of kmhanser
    kmhanser
    Participant

    @kmhanser

    Hello,
    I’m working on a site that’s using buddypress and bp-album, and I need to add some html to the single image display. From the comments in the code:
    `You can define a custom load template filter for your component. This will allow
    you to store and load template files from your plugin directory.`
    it seems like there may be a way to do this with a filter (or custom template?), but I haven’t been able to figure out which filter and/or what parameters to pass to it. I know I can just edit the single image template directly, but I’m trying to avoid modifying the bp-album files directly, I would rather hook into it w/my code. I just need to know what filter to use to modify the page that’s displayed when you view an image… (if such a filter exists?)

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of foxly
    foxly
    Participant

    @foxly

    @kmhanser

    Do not edit the template files directly, they will be overwritten on every upgrade.

    1) Create an /album/ folder inside your template’s main folder
    2) Copy BP-Album’s template files into the /album/ folder
    3) Edit the copied template files as much as you want

    ^F^

    Avatar of kmhanser
    kmhanser
    Participant

    @kmhanser

    Thanks for the tip! Is there a way to do this using a hook of some sort, so that I could implement my code as a plugin? I suppose I could have my plugin copy the templates and modify them when it’s activated…(?)

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

You must be logged in to reply to this topic.