At least I think it's pane.header.
My client has asked if they can add a line or two of text between the title and the tree/directory panes. Something like "Use the online resource area to blah blah diddly doo".
I'm a complete newbie to Drupal so I'm guessing that this is a simple thing to acheive. Any help massively appreciated.
Ta
Paul
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | webfm.zip | 28.94 KB | paul.dambra |
Comments
Comment #1
paul.dambra commentedComment #2
paul.dambra commentedHave achieved this using a "before"tag in the css.
Not sure that's a great solution since it feels like a hack.
Any better ideas?
Comment #3
ballerjones commentedIf it worked, no worries. Could you post the code? thanks
Also: does it work in IE?
Comment #4
paul.dambra commentedCode used in CSS...
#webfm::before
{
font:italic 700 12px arial;
font-size:110%;
content: "This text appears below the title and above the folder and file display area";
}
/*
* This floats an image below the unexpanded tree display.
* The expanded tree hides the image.
*/
#webfm {
background: url("../some_image") no-repeat center left;
}
/*
* The client wanted colour. This repeats a tall thin gradient image across the page.
* Our implementation has an image that fades in from white to a light blue bottom
*/
#squeeze{
background-image: url("../some_tall_thin_image");
background-repeat: repeat-x;
background-position:bottom;
}
I've tested this in IE7 and 8, Chrome and Firefox.
Comment #5
ballerjones commentedThanks for the post. Strange that it works for your in IE7 (doesn't for me). According to this: https://developer.mozilla.org/en/CSS/:before
It only works in IE8 and according to another source, not even IE8 supports images in :before elements.
You may have already tried this but do you know if there's a way to modify the module so that there can be a div in the location of our newly added text? This way, HTML can be added instead of simply text. Also, this would solve the browser compatibility issue.
Comment #6
paul.dambra commentedJust checked again and you're right IE7 doesn't display the text... was all done rather speedily so I probably checked on IE8 twice by accident. I'm not too concerned since it fails gracefully rather than messing the page up *and* because I recognise this as an imperfect hack and not a solution.
I imagine it is possible to alter the module I wouldn't even know where to begin though. Any pointers would be appreciated...
Comment #7
ballerjones commentedI've asked all around but to no avail. I think it has something to do with the lack of a template file for the main view. However, an oft spoken about views integration could do the trick. That is, if they decide to have one for V6.
Comment #8
paul.dambra commentedSo the baby went to bed earlier than expected yesterday and I grabbed some time to think.
I removed my before hack from the CSS and added #toptext{margin-left:20%;}
Then I added at line 460 in webfm.js
That puts it above the line webfmUploadAutoAttach(); in Webfm.commonInterface = function(parent) {}
That's using JQuery and the webfm create element helper so should be consistent between browsers. I've got firefox 3.something, Chrome 2 and IE8 on this machine. and it works on all three.
This seems less hacky to me. If I get time I'll look at how the admin menu is created and try to add a way to set the text with that but while I can write java, vb and c# I'm a fish out of water with php...
P
Comment #9
ballerjones commentedWould you mind posting your webfm module (as a zip file or something), or maybe as a patch? I tried applying your fix but, for some reason, it creates this: http://internal.lomira.k12.wi.us/screener2.bmp
Somehow, the left window is gone, and the files are too. I placed the js before that line you mentioned just as you had instructed.
If you can post it as a patch (especially with the admin screen feature), that would help the community a lot I'm sure. This seems to be the way experts post their helpful contributions.
Comment #10
paul.dambra commentedHey, here are my two edits. The rest of the module is exactly as v5.x-2.15 is downloaded so if you've got a different version or other edits then you'll need to amend my code to take that into account.
This is live at http://www.afsl.org.uk/webfm so you could take a look at that page source to see what is different to your site?? If anything obviously.
I'd be happy to submit as a patch if I knew how :-)
Comment #11
paul.dambra commentedThere are definitely different CSS files applied to your site than to mine so...
Comment #12
paul.dambra commentedHmmm, would this help you?
http://drupal.org/node/311991
Comment #13
ballerjones commentedYour fix didn't work, but I just realized we are using different versions of the module. I'm using Drupal 6.
Anyway, your link was extremely helpful. After a few minutes and some CSS workarounds, I finally was able to get webfm looking like I want it: http://internal.lomira.k12.wi.us/screener.jpg
Thanks again.
Comment #14
paul.dambra commentedDidn't realise this was still open. I've marked as won't fix since I found a workaround