Phoca Upload form amendable?

Phoca Download - download manager
sven10101979
Phoca Member
Phoca Member
Posts: 23
Joined: 17 Mar 2018, 21:50

Phoca Upload form amendable?

Post by sven10101979 »

Hi There,

I am using the standard phoca upload site on frontend and I wonder if it is possible to amend the form by hiding some fields I actually don't need (Description, Author, Author E-Mail, Author Website, License and Version I actially don't need).

Is there any chance to hide these fields?

Many thanks in advance for your support!

Cheers

Sven

Tags:
christine
Phoca Hero
Phoca Hero
Posts: 2710
Joined: 28 Nov 2010, 17:20

Re: Phoca Upload form amendable?

Post by christine »

Hi Sven,

try following:

a) put at the end of e.g. template.css:

Code: Select all

#phocadownload-upload-author, #phocadownload-upload-email, #phocadownload-upload-website, #phocadownload-upload-license, #phocadownload-upload-version {
display:none;
}
b) removing the text via: Language Override.
see: https://www.ostraining.com/blog/joomla/languge-manager/

c) or with complete template override e.g. components/com_phocadownload/site/views/file/tmpl/default.php or maybe other.

Kind regards
Christine
sven10101979
Phoca Member
Phoca Member
Posts: 23
Joined: 17 Mar 2018, 21:50

Re: Phoca Upload form amendable?

Post by sven10101979 »

Many Thanks / vielen Dank Christine!
christine
Phoca Hero
Phoca Hero
Posts: 2710
Joined: 28 Nov 2010, 17:20

Re: Phoca Upload form amendable?

Post by christine »

Hallo Sven,
Danke für Deine Rückmeldung. Würde jetzt aber gerne wissen, welche(n) Weg(e) Du eingeschlagen bzw. wie Du es gelöst hast :-)
Gäbe da noch eine (theoretische) Variante, die ich nicht ausprobiert habe.

Liebe Grüße
Christine
sven10101979
Phoca Member
Phoca Member
Posts: 23
Joined: 17 Mar 2018, 21:50

Re: Phoca Upload form amendable?

Post by sven10101979 »

Hallo Christine,

also dein Vorschlag a) hat ja zunächst einmal nur die formular felder ausgeblendet. Das hat natürlich problemlos funktioniert.

Vorschlag b) zum Ausblenden der Texte mittels overwrites habe ich auch angewendet. Das Problem hierbei war, dass die Doppelpunkte der Feldbeschreibungen stehen geblieben waren. Ich war mir auch nicht sicher, ob diese Doppelpunkte so ohne weiteres ausblendbar sind, da ich nicht wusste, wo und wie diese gesetzt sind. Mittels overwrite wahrscheinlich eher nicht.

Vorschlag c) ich habe mir das Script für ein Template overwrite mal angeschaut und dann relativ schnell entschieden, dass ich mir das am Wochenende mal genauer anschauen muss, da ich in der Woche nicht soviele zeitliche Resourcen habe, um mir ein solches Script zu Gemüte zu führen. Werde ich aber noch tun und dann gebe ich dir auch gerne Rückmeldung zu diesem Vorschlag.

Insofern ist das ganze noch ein Stück weit ergebnisoffen. Ich wollte mich aber dennoch schon für die Hilfe bedanken, damit du nicht denkst, ich wäre nicht dankbar ;-)

Final gelöst ist das ganze NOCH nicht. Das ist aber auch kein Problem das nun extremst brennt. Es wäre ein "nice to have", wenn man das Formular entsprechend den eigenen Bedürfnissen anpassen könnte. Wenn es nicht geht, könnte ich aber auch damit leben.

Interessieren würde mich aber noch deine Theoretische Variente.

Beste Grüße

Sven
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Upload form amendable?

Post by Jan »

Hi, make a backup of this file:
components\com_phocadownload\views\user\tmpl\default_files.php
Open the one on your server and remove everything
FROM line 282 (beginning with <tr>)
TO line 326 (ending with </tr>) and save the file. (if you want this modification will be not overwritten when updating, copy this file to your template: templates/your_template/html/layouts/com_phocadownload/user/ folder )

Jan
If you find Phoca extensions useful, please support the project
christine
Phoca Hero
Phoca Hero
Posts: 2710
Joined: 28 Nov 2010, 17:20

Re: Phoca Upload form amendable?

Post by christine »

Hallo Sven,

na ja, meine d) Variante wäre gewesen: PD > Layout > File View Layout die betreffenden Variablen zu löschen. War damit bei einem Test eh nicht erfolgreich. Wobei es ja dann bei einem Update wieder da gewesen wäre. Deswegen hatte ich ja die

Variante c) ein Template Override vorgeschlagen.
Danke Jan für die richtige Datei :-)
Bei mir wären es aber die Zeilen 292 (beginnend) mit <tr> bis 326 (endend) mit </tr>

Liebe Grüße
Christine
sven10101979
Phoca Member
Phoca Member
Posts: 23
Joined: 17 Mar 2018, 21:50

Re: Phoca Upload form amendable?

Post by sven10101979 »

Jan wrote: 22 Mar 2018, 20:01 Hi, make a backup of this file:
components\com_phocadownload\views\user\tmpl\default_files.php
Open the one on your server and remove everything
FROM line 282 (beginning with <tr>)
TO line 326 (ending with </tr>) and save the file. (if you want this modification will be not overwritten when updating, copy this file to your template: templates/your_template/html/layouts/com_phocadownload/user/ folder )

Jan
Hi Jan,

That's it!!! Many thanks for telling me the exact lines to be removed. I would be able to find the lines on myself, but it was of course a lot easier that way. The only strange was that your path was different to mine. I do not have the folder "views" or "tmpl"...??? However, it worked as well.

By the way, I just wanted to say a very warm "Thank you!!!" for providing this great software and also providing this excellent support within this forum. I really appreciate that. Of course this should not exclude other people who support the forum like Christine!!! Thank You!

I will keep a look into this forum to check if I can help anyone else as well to suuport the forum.

Cheers

Sven
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Upload form amendable?

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply