Closed (fixed)
Project:
FlashVideo
Version:
5.x-2.6-x
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Feb 2008 at 20:36 UTC
Updated:
30 Dec 2008 at 09:05 UTC
I'd like to keep things really simple for my users. Is there a way to have to body field of a content type always have the value "[video]" ?
Comments
Comment #1
travist commentedSure! You just need to set up a template for your node type using the Contemplate module.
Comment #2
jmlavarenne commentedThat works, thanks. I have tried to do it manually in the node's tpl file, but I can't seem to set $node->body = "[video]";
I'll have to read up on this.
Comment #3
scottrigbyHi, can you verify that this works using the .tpl file? I'd rather use this than contemplate (which I found more difficult to use). If so, what is the appropriate code to print the video (the code just above, or...)?
Thanks in advance!
Comment #4
travist commentedFor a TPL file, you will need to use the actual API call (which is actually better anyway). Use the following code in your TPL file to get the video for that node...
And if you wish to show the thumbnail, use....
Comment #5
scottrigbyGreat travist, thanks! Does this apply to Drupal 6 as well?
(BTW, I know this doesn't match the issue's version #... but I shouldn't change the issue Version just for this question, or post an entirely new issue just for this should I? Thanks also for this protocol advice - cheers!)
Comment #6
travist commentedThis should also work for Drupal 6. :)
Comment #7
jmlavarenne commented<?php print flashvideo_get_video($node); ?>removes the need for [video]?If so I definitely prefer that route to contemplate.
Comment #8
travist commented<?php print flashvideo_get_video($node); ?>does the exact same thing as [video]. I just put the ability to have the "[video]" tag for the users who are not savvy with PHP. I wanted to also design a solution that makes it easy for video bloggers to post their videos using a simple tag instead of opening up PHP to all users.Comment #9
jmlavarenne commentedThe more options, the best!
Comment #10
ms1 commentedI created two fields with default values and hid them. I made it in a long process
What I did was
1. Put this code in my 'template' file of the theme.
Note:- Please replace your content-type in place of videos
2. Created two fields 'ABC' and 'DEF' and gave them default values as [video] and [thumbnail].
3.then created another file in my theme folder as 'edit-videos.tpl.php' and put the code as
this will hide them in creation as well as editing.
4. Whereas to hide the labels as well as default contents in teasers and node, I configured them through 'manage fields' of the content-type.
I know its long, but I didn't knew that there were other alternatives and already I bother travist every now and then with other issues.
But this method works well.
Regards
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #12
mrgoltra commentedsubscribing
Comment #13
aznboy commentedsubscribing