Ventrian Product Forums

We've moved our Product Forums!
To better assist our customers, we've moved to an integrated knowledge base and ticketing system. You can access the new forums at http://support.ventrian.com.
Subject: Related articles
Prev Next
You are not authorized to post a reply.

Author Messages
KriDomUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:79


9/29/2009 4:12 PM  

Thumbs Up! Now this is a No. 1 news module!

On my wish list are at the moment just two things - cross-site functionality for latest articles and a field for embedding a YouTube video with just placing a URL.

But - I'm very, veerryy satisfied with related articles! Good job!


Mladen Ivosevic - Ban
KriDom studio - www.kridom.hr
Ray DixonUser is Offline
Registered Users
Ventrian Master
Ventrian Master
Posts:401


9/29/2009 5:17 PM  

For the YouTube video embedding, could you create a custom field in which you store the URL to the video and then have the embedding set up in your template to use the custom field value?

KriDomUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:79


9/30/2009 1:00 AM  

God thinking, but there is a just one tiny problem with custom field - how to strip "watch" part from video URL?

Example:

Video URL; http://www.youtube.com/watch?v=something999

Embed code;

{object width="560" height="340"}{param name="movie" value="http://www.youtube.com/v/9_WpjolusyQ&hl=en&fs=1&"}{/param}{param name="allowFullScreen" value="true"}{/param> http://www.youtube.com/v/9_WpjolusyQ&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"}{/embed}{/object}

I don't now how could this be done via template...


Mladen Ivosevic - Ban
KriDom studio - www.kridom.hr
Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


9/30/2009 7:17 AM  
Which part is the watch part? You should be able to just have a custom field that accepts a url and put that in your player.

Scott McCulloch
Site Administrator
Ray DixonUser is Offline
Registered Users
Ventrian Master
Ventrian Master
Posts:401


9/30/2009 9:54 AM  

You could specify that the custom field is for the embed code and just use it directly in your template. You could also create two custom fields, one for the URL and one for the embed code and then conditionally show each/both based on whether they had values.

Another way to do it is to specify that your custom field is only for the code and then build the URL and/or embed code yourself. Let's say you named your custom field YOUTUBE_ID. The examples below show how you could build your template.

You would build the URL to look like this:
http://www.youtube.com/watch?v=[YOUTUBE_ID]

You would build the embed code to look like this:

You can see a live example similar to this in the template I'm using for database of soccer fields on our staging Web site. This is using the Property Agent module, but the templating and custom field ideas are the same. Here's one field location, for example: Lake Sammamish State Park fields 3 - 10. The Current Weather section is built using the value of a custom field in which I store the ID for the Weather Underground Personal Weather Station closest to the field.

This method is a little harder for users, but it works quite well and gives you a lot of flexibility.

KriDomUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:79


9/30/2009 9:59 AM  

Scott, I'm talking about embedding video inside an article (News articles module). For that I've have to use embed code (example in my previous post). To make submission of video as simple as possible for regular users, my idea is to let them place just a video URL.
This url (video watch URL) have structure like; http://www.youtube.com/WATCH?V=SOMETHING999.
When embedding, src url code should look like; www.youtube.com/v/SOMETHING999&hl=en&fs=1&
Because I can't use color coding here please pay attention on UPERCASE part(s).
In order to embed video on simplest possible way (talking about user's submissions) a piece of code is needed to stripe this "WATCHV" part from video url.
If this would be a separate field called "embed video" that would be grate, because than you can put another piece of code to produce a embed code with preset width and height values.

Another thing - for submissions like this, is it possible to have customized ucSubmitNews.ascx, where just wanted fields would be enabled?

I hope that i did not make this too complicated. English is not my mother tong ;-).


Mladen Ivosevic - Ban
KriDom studio - www.kridom.hr
KriDomUser is Offline
Gold Membership
Ventrian Addict
Ventrian Addict
Posts:79


9/30/2009 10:03 AM  

Ray, I understood what you mean, but I want to enable regular (registered) users to submit a video, without knowing anything about coding. In short – I would like to have this „idiot-proof“.


Mladen Ivosevic - Ban
KriDom studio - www.kridom.hr
Ray DixonUser is Offline
Registered Users
Ventrian Master
Ventrian Master
Posts:401


9/30/2009 10:07 AM  

I figured you probably are looking for something more simple.

Scott, how feasible would it be to create a way to either select only a portion of a string value (like the last XX characters, or starting at character XX take YY characters)? That would allow, in this case, the ability to select just the code from the URL and use that to build the embed code. Hopefully, somebody else has a more elegant idea, because mine sounds a little messy to implement.

Déclic VidéoUser is Offline
Gold Membership
Ventrian Master
Ventrian Master
Posts:1461


10/18/2009 1:09 AM  
Ray,

Thanks for your explanation. Can you please explain me how it behave if the [YouTubeID] custom field is EMPTY ?? How does your template render it ?? Is there any token to take this into account ?

Thanks in advance,
DV FX

Pinnacle Studio, proDAD and Boris FX tips and tricks, tutorials... Déclic Vidéo FX
Ray DixonUser is Offline
Registered Users
Ventrian Master
Ventrian Master
Posts:401


10/19/2009 3:50 PM  

For that case, wrap the embedding code in the [HASVALUE:XXX][/HASVALUE:XXX] token so it only shows up if your custom field (XXX) has a value.

You are not authorized to post a reply.
Forums > Modules > News Articles > Related articles



ActiveForums 3.7
We've moved our Product Forums!
To better assist our customers, we've moved to an integrated knowledge base and ticketing system. You can access the new forums at http://support.ventrian.com.