Add video link if attached extension if flv

tevart

Avatar: tevart

2010-08-31 13:02

Is it possible to add some html code to link if you upload flv video instead of doc,pdf,..?

I need to add class="video_link" to flv videos. it would show as any other document attached on the page, but with this class it would load flowplayer instead of download video.

tnx

» Quick.Cms v2.x

pxl666

Avatar: pxl666

2010-08-31 13:38

maybe try embedding flash player...?as an iframe?

tevart

Avatar: tevart

2010-08-31 14:33

I have embeded flowplayer and it works fine if you manually add link to flv video. What i wan't to do is add video the same way you can add documents, but instead when you click on the video it loads embeded flash player. For that to work i need to add class video_link on this links.

So cms should look at the extension and if it's flv then add class="video_link" to it

beholder

Avatar: beholder

2010-09-02 23:42

are you still having this problem? I can help on the forum but I am not going to write to a dead thread.

pxl666

Avatar: pxl666

2010-09-03 07:38

hm it may be useful for someone anyway

qwerious

Avatar: qwerious

2010-09-03 23:23

Me too :-)

beholder

Avatar: beholder

2010-09-04 21:23

ok, here you go:
The theory here is that you can't easily discern content in QC like Tevard wants but you can choose a page that will display its files in a certain way. So..

1. You create a special template, like for example pages_videos.tpl (from pages_default.tpl) and modify block FILES_LIST to have those files URLs displayed like you want. This is for example the block for FlowPlayer 3.0.7 (newest flowplayer didn't work well at all, it's fucked up):


<!-- BEGIN FILES_LIST -->
<
li class="l$aData[sStyle]" style="padding-bottom:25px;text-align:center;"><a  href="$config[dir_files]$aData[sFileName]"  style="display:block;width:352px;height:288px;margin-left:auto;margin-right:auto;"  id="player$aData[iElement]"> </a><p>$aData[sDescriptionContent]</p>
            <
script>
                
flowplayer("player$aData[iElement]""plugins/flowplayer-3.0.7.swf", {
                   
clip: {  
                        
autoPlayfalse,
                        
onLoad : function() {
                          
this.unmute(); 
                        } 
                    }
                } );
            
</script>
</li>
<!-- END FILES_LIST -->



2. You may notice above the variable $aData[iElement] which is used as a list id number for videos on the page. Add it in core/files.php, to function listFiles(), after line:


$aData 
$this->aFilesImages[$iLinkType][$this->aFiles[$iLinkType][$iLink][$i]];


add:


$aData
['iElement'] = $i;



3. Then just make a page with videos, upload your flv videos to it in administration and choose the template pages_videos.tpl for that page. And you're done.

PLEASE NOTE: this is NOT a QuickCart-flowplayer installation instruction. This flv player has been deprecated because the latest version I tried just wouldn't work no matter what I tried. Please use older flowplayer and follow its specific installation instructions if you want to make it work with QuickCart.

alicem

Avatar: alicem

2011-04-04 21:11

I'm sorry not add video to flv. empty file name

Back to top
about us | contact