Hello!
we are having problems when listing Private FileField using a view or a panel. The URL that cames out when you link to the file is wrong.

This is an example in our web (I´m sorry it´s in spanish):

Anyone knows what can we do to fix it?
Thanks!

CommentFileSizeAuthor
#1 filefield_private.module.zip4.14 KBdejan.maric.max

Comments

dejan.maric.max’s picture

Status: Active » Needs review
StatusFileSize
new4.14 KB

Hi,
here is the modified version of module, that has slightly different approach,
path formatting overrides does in theme functions and not in _nodeapi.

By using this approach, file display, can be changed in `Display Fields Tab`, or in Views. (Generic files, path, url)

I've added a image formater too, but no imagecache support, but you `get the picture`, just override the theme that you need.

Celita’s picture

Thank you so much for the answer... I´ve just seen it....(sorry, I´ve been out my office)
We´ll try it.

alan d.’s picture

Any followup on this?

alan d.’s picture

Status: Needs review » Needs work

We can not use this approach on the module as it will interfere with the other normal files theming functions.

It is a very handy piece of code for custom sites, so thanks for sharing.

Celita’s picture

Hello,
I´m sorry but I am very new in all of this, and I don´t know much about Drupal and even any other program. Sometimes I don´t get the language (besides, as you can see, english is not my mother language)
What am I suppose to do?
If I run the file you gave me I will have no problem?

Thank you very much!

dagmar’s picture

Assigned: Unassigned » dagmar
Status: Needs work » Postponed (maintainer needs more info)

Ok, let me see what is wrong here.

Please, attach how did you configured filefield_private in the file system settings.

abaddon’s picture

We can not use this approach on the module as it will interfere with the other normal files theming functions.

It is a very handy piece of code for custom sites, so thanks for sharing.

@Alan D.
i just wonder, is your comment relating to the use of phptemplate_ functions? because if it is, you can actually override those functions in a better, more compliant, way too.. and i think the theme_ approach is actually better, it covers more cases
for eg. right now you get a broken path on the node editing form, on the preview widget.. and views..

hefox’s picture

I've also semi reworked the module that should fix this, patch attached #1153448: A reworking of filefield private to simplify and support views better (not specific to views support, but more a general re-working to make it work smoother, so didn't use this issue).

hefox’s picture

Status: Postponed (maintainer needs more info) » Fixed

#1153448: A reworking of filefield private to simplify and support views better has been commited to 2.x branch that should fix this, re-open if original maintainers want to fix this in 1.x also

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.