Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryupload files and embed videosupload files and embed videos
Previous
 
Next
New Post
3/13/2008 7:10 AM
 

Can I have those two possibility in the same form?

By now, if I use the default template I can upload ONLY files, if I use the youtube template, I can add links to videos

The fact is that I'd like to upload small files to the server that contains the DNN installation, not accept video format uploads, and get the upload from links of videos uploaded on youtube or soapbox

 

Can I do This?

 

even modifying the module...

 

thanks 

 
New Post
3/13/2008 8:33 AM
 

there are 2 file upload 'slots', one is FILE the other is IMAGE. In the form.html file, which formats the upload page, there are 2 tokens for each one, [FILE] and [URL] for the file slot, and [IMAGE] and [IMAGEURL] for the image slot. the URL versions allow you to enter a URL while the other ones allow you to browse and upload a file into that slot.

In the current YouTube template, form.html has a [URL] token, so when the user enters the URL to the video it is stored in the file slot. In the template which displays each item, there is the object tag which displays the player and it uses the [FILEURL] token to display the contents of the file slot without any special formatting or spans around the value, just the raw data value which is the URL.

So, if you want both a file upload and the video URL, you need to make some changes to those 2 template files.

1. modify the form.html file to use the image slot instead. so, change the [URL] token to [IMAGEURL] so that the URL entered by the user will be stored in the image slot instead, then change the template.html file to use the [IMAGEURL] in the object tag instead of the [FILEURL] so that the player will look in the image slot for the video URL.

2. now, you are using the image slot for the video, so you can now add a new [FILE] token to the form.html file to allow the user to also upload a file, and add a [DOWNLOAD] token on the template.html file to render a download link to enable users to download the file.

that should do it. if you have any questions or problems, let me know.

 
New Post
3/13/2008 9:49 AM
 

Thanks for the reply

But I'd like to have the possibility to let the user choose what to upload;

only one of the 2 choices should be mandatory; instead if I put a video also a file is mandatory

 

what can I do?

 
New Post
3/13/2008 10:44 AM
 

there is no 'conditional' validation available in the current release. You can make fields either required or not required by adding a "Required" setting to the object token in the form.xml file, but there's no way to make one field required based on the value of another field without either ..

1. enhancing Form.ascx.vb to provide relational validators

OR

2. add some client side javascript to the form.html file to do the valiadation client-side

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryupload files and embed videosupload files and embed videos


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out