134 Posts
root
10 years ago
Topic

Hi seblod warriors,

I'm trying with different methods to get the download link of a "Upload file" field through HTML typography (plugin cck_field_typo)

According to this post and this other, getting the direct value of the download is so easy as this:

$cck->getValue('my_upload_field');

But is it possible to get the download url (not directly), the filesize or the download count by using HTML typography?

Thanks for reading me.
Best regards.

Get a VIP membership
134 Posts
root
10 years ago
0
Level 1

Thank me very much:

<a href="/*link*">*label*</a>

Also will work:

$cck->getLink('upload_file_field');

Is there any place explaining how many variables and what are, of type:

*value*, *label*, *link*, *text*, *description*, *thumb1*, *thumb2*, *name*, *file* ....

Definitely, HTML typography is one of the most useful things of seblod.

Getting hits and file size is possible then?

Thanks for your work, seblod team.

4229 Posts
Kadministrator
10 years ago
2
Level 1

Hi,

unfortunately this a part of missing Seblod documentation we are woriking on to improve, good that you found a solution

134 Posts
root
10 years ago
0
Level 2

Hi Klas! Thanks for your answer.

My problem still is not solved. I need to get the ID, the filesize and the hits from the table #__cck_core_downloads and I don't know how can I do it and if it is possible to do from HTML typography.

Is there any variable passed with an upload_file field where I can retrieve this values, associated with the current content?

If this is possible I will do a perfect imitation/improvement of akeeba release system 100 % with seblod and visually improved with uikit xDD

I'm starting to think that maybe it is possible, with a select dynamic field... I will break my head during some more hours and, maybe, I get a workaround.

:-\

Regards.

134 Posts
root
10 years ago
0
Level 2

I'm so sad... But happy at the same time!

Being a pretty girl, the things go easier in this hard life.

Finally, seems I forgot to try with *file_size*

Solved now, not before.

Here for more info

134 Posts
root
10 years ago
1
Level 1

Final conclusion about this (if someone needs it someday)

For getting link to download from html typography, do:

$cck->getLink('upload_field');

Also will work this if it's called from the same upload field html typography:

*link*

For getting hits of the download, I still don't know if there is a way to do it with something as $cck->getHits('upload_field'); but from the html typography of the upload file field, just do:

*hits*

That's all.

134 Posts
root
10 years ago
0
Level 2

Confirmed, from other field works perfectly:

$cck->getHits('my_field');

Nice!

Get a VIP membership