Active
Project:
jQuery Media
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Dec 2008 at 15:31 UTC
Updated:
21 Oct 2010 at 12:42 UTC
I have got videos showing up so that's a good start! But the video file icon and title still show.
I can remove the fileicon through css. Is there anyway of getting rid of the filename below the video?
Comments
Comment #1
-Anti- commented> I can remove the fileicon through css. Is there anyway of getting rid of the filename below the video?
I'm also interested in this.
At the moment my links in the content are in the form:
<a href='/path/to/file.swf>[use this as descriptive label]</a>which is totally acceptable, especially since the label wraps to the width of the video width.
But it would also be nice to be able to hide it too.
If I find a solution I'll post back.
Comment #2
Miteto commentedThere is a workaround posted here - http://drupal.org/node/300853#comment-1111733 but not explained.
Here are the steps - this requires thinkering your template.php file. I don't know much JS nor PHP so if someone can show more elegant solution please feel free to post it.
1. Open your theme's template.php file. Find "function yourthemename_preprocess_node(&$vars, $hook)".
If there is no such function let's make one. Here's mine for example:
Comment #3
mimhakkuh commentedThank you, Miteto - that solved my issues :)
Comment #4
Stan.Ezersky commentedGreat thanks, Miteto!
Comment #5
8bitplateau commentedfor drupal 5x
Comment #6
nk_ commentedHere is the other solution, IMHO it is kind of raw but I still find it better than above JS. This is because any ajax/ahah callbacks, for instance if you load your file in ajax_content thickbox above js from template.php won't work but you would need to put same js in thickbox.js file which is not very good practice.
This override removes icon and file name only from display, not on node editing pages.
Comment #7
dkane commentedThat did the trick perfectly! Thanks nk_
Comment #8
bredi commentedHi,
I tried using contemplate without success. (#6)
I get a blank page and this code hides everything.
can this code (#6) be used with contemplate?
thanks
bredi
Comment #9
rhimes commentedwhere does snippet go?... and is it for 5.x or 6.x?
I'm on Drup5.7, FileField 2.4 & jQuery Media 1.3 - tried in template.php - didn't work
Thanks in advance for response
Comment #10
nk_ commented@bredi: this file goes to your
template.phpfile. if you already don't have one create it in your theme directory. don't forget to clear your theme registry, best clearing your cache.@rhimes: this snippet is for D6, sorry if I forgot to mention. Looking at the fileField 2.4 version quickly I found that following might be solution for you.
I don't have D5 version handy ... Let me know if that works.
cheers, Nenad
Comment #11
rhimes commented@ nk_ - dunno - did this instead - D5 (and I thought this was a D5 ver issue) FF2.4, jQM1.3:
in filefield.module @ ln#799 under function theme_filefield..... changed this:
return '<div class="filefield-item">'. $icon . l($desc, $url) .'</div>';to this:
works great
Comment #12
nk_ commentedrhimes,
one of the best things concerning drupal is theme overrides. Means it is not necessary to edit core files, it's even bad practice for many reasons,
maybe first of all each time you update this module you will need to go in the core and re-edit it again ...
Function I posted will do exactly the same for you and is safer, it is override on the theme level and if you put this function in your
template.phpit will precede (override) function in module. Besides, your hack will hide filename and icon on node editing form as well, not only in display,
which is not good idea as it's usable for editor to see it ...
Have a look on drupal documentation and book pages about theme overrides.
Best, Nenad
Comment #13
zigx commentedis there a way to conditionally NOT remove the image icon?
Comment #14
Mike Serafin commentednk_, thanks for the fix.
Comment #15
BetaTheta commentedI'm trying to figure this out. nk, I tried your code, it doesn't seem to work anymore. Also, how do we do this if we're NOT using filefield, but a class on a link?
If I create a link to a video and I add the appropriate class, I get the video, but I also still get the link text.