Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Not sure how to categorize this post-
I wanted my audio images to show in the teasers along with the node, so I added the variable '!imageo'
to the teaser function in audio_theme.inc beneath '!download_count'
$params ['!imageo']= theme('audio_images', $node->audio_images);
Then on admin/settings/audio I included my variable !imageo after !player for the 'Node teaser format'
Result is here: http://radio.trishturliuk.ca/podcast
Trish
Comment | File | Size | Author |
---|---|---|---|
#14 | audio.module.113073.patch | 1.36 KB | Frank Ralf |
#9 | audio_0.patch | 2.3 KB | brst t |
#7 | audio.module_5.patch | 985 bytes | brst t |
#6 | audio_theme.inc_.patch | 713 bytes | brst t |
Comments
Comment #1
brst t CreditAttribution: brst t commentedHere's the entire function with my one line insertion:
Comment #2
drewish CreditAttribution: drewish commentedTake a look at http://drupal.org/patch it describes how to submit a proper patch. It makes reviewing the changes your proposing much easier.
Comment #3
brst t CreditAttribution: brst t commentedYes. Thanks.
Should be easy enough for one line..
Comment #4
drewish CreditAttribution: drewish commentedwell the thing about patches is that it makes it very clear that you're only changing on line. looking at a block like that it's hard to know what's new, what's changed and what's been removed.
Comment #5
brst t CreditAttribution: brst t commentedYep. Especially if there's more than one line changed.
I've used them. I just haven't submitted any, yet.
Comment #6
brst t CreditAttribution: brst t commentedHere's the first - the change to the theme, adding image as a variable to the teaser format
Comment #7
brst t CreditAttribution: brst t commentedAnd the second - to show in audio admin settings that this variable is available, but not set in the default.
First submitted patches, here. One liners w/o the humour.
Comment #8
drewish CreditAttribution: drewish commentedI'm not sure what program you're using to generate the patch files but you can probably combine changes to multiple files in one patch.
The one problem with the patches you've provided is that there's no check that the audio_image module is enabled. I don't think the the $node->audio_images array will be defined if it's not. That'll cause errors/warnings. You can check if it's enabled using
module_exists('audio')
.Comment #9
brst t CreditAttribution: brst t commented'Combine changes to multiple files in one patch'
Got it. Ok. Thanks. (Missed that part somewhere.)
Also included in this attachment are the changes I made to the css file - the image div setting a border and float:right
I tested my changes by removing the audio_images module and didn't get any errors/warnings. The images simply didn't show.
The changes I made are similar to the full node 'theme_audio_display' function just below. I don't see a check if the module is enabled there, either.
Or maybe you mean for the module? If so, I think that could be changed w/ a little note in the description.
Comment #10
Carlos Miranda Levy CreditAttribution: Carlos Miranda Levy commentedThere is another alternative which may not break as easily when you upgrade the module to a new version.
Look at the template.php approach at: http://drupal.org/node/84162
Basically, all you do is create a template.php with a replacement for the function affected and put that template.php in your current theme´s directory.
Comment #11
drewish CreditAttribution: drewish commentedNow that the 5.x-2.x code use the token module for building teasers and titles the way to do this is by adding token support to audio_image.module.
Comment #12
CinemaSaville CreditAttribution: CinemaSaville commentedDid this ever get done? Trying to use it for 6?
Comment #13
riskyfuel CreditAttribution: riskyfuel commentedFor the 6.x version, just add a line for the image token in the formatted file info section near line 1353 of audio.module.
Then add the [audio-image] token into the Teaser settings in the Audio Settings admin section.
Rock!
Comment #14
Frank Ralf CreditAttribution: Frank Ralf commentedI created a proper patch from the modification suggested in #13. Just added another line for hook_token_values() so the new token also shows up in the list of available tokens.
Frank