Reply New Topic
2015/3/28 5:50:40
#1
Guest_

Edit mytube viewcat

Bonjour,

I want to display two Video on the same line in mytube
as block mytube_block_new_h.html that displays 5 video in the same line with smarty template

Quote:

<{assign var='cats_per_col' value=5}>


<table width="700px" cellspacing="1" cellpadding="0">

<{foreach name=i item=videoload from=$block.videos}>
<{if $smarty.foreach.i.iteration mod $cats_per_col eq 1}><tr><{/if}>
<td align="center" style="padding: 2px; vertical-align: middle;"><div align="center"><a href="<{$videoload.url}>" ><{$videoload.videothumb}></a><br />
<a href="<{$videoload.url}>" ><font color="#0066CC"><{$videoload.title}></font></a><br />
</div></td>
<{if $smarty.foreach.i.iteration mod $cats_per_col eq 0}></tr><{/if}>
<{/foreach}>
</table>



Kindly help me to convert the code to use on mytube_viewcat et mytube_inderx

Et merci


2015/3/30 2:18:54
#2
Offline
Webmaster

Re: Edit mytube viewcat

Hi galdiator,

let me have a look at those templates. Are you using a specific theme (bootstrap, other)?

_________________

Me on OpenHub


2015/3/30 9:35:10
#3
Guest_

Re: Edit mytube viewcat

i'm using yikes themes

and for my template

In mytube_videoload.html

Quote:

<div class="even" style="display: table; width: 99%;">


</div>
<div style="width: 99%;" class="affiche">
<div style="float: left; padding: 0 4px 4px 0;">

<{if $video.screen_shot}>

<a href="<{$video.url}>" target=""><{$video.videothumb}></a>

<{/if}><br>

&nbsp;

</div>

<div>

<span class="video2"><a href="<{$video.url}>" title=" <{$video.title}>" class="videot"><{$video.title}></a></span>
<br />
<small><{$video.hits|wordwrap:50:"\n":true}></small><br />
<b>Langue: </b><span> <{$video.publisher}><br /></span>
<b><{$smarty.const._MD_MYTUBE_DESCRIPTIONC}></b><br>
<br>
<{$video.description}>&nbsp;<a href="<{$video.url}>" title="<{$video.title}>"><{$video.title}></a><br>


</div> </div>




I want to display two Video on the same line in mytube

like Random video Block for example



Quote:

<div style="overflow: auto;">
<{foreach item=videorandomh from=$block.random}>

<div style="float: left; margin: 1px; padding: 2px; background-color: #d9d9d9; font-size: smaller; text-align: center;">
<span>
<a href="<{$video.url}>"><{$video.videothumb}></a>
<br />
<a href="<{$video.url}>"><{$video.title}></a>
<br /></a>
</span>
</div>
<{/foreach}>
</div>



2015/3/31 8:51:13
#4
Offline
Home away from home

Re: Edit mytube viewcat

What MyTube release are you using? Final is 1.06 and the code for mytube_block_new_h.html template does not match with you has related.
Example
In MyTube viewcat template look for this line
<div style="clear: both;"> <!-- Start link loop --> <{section name=i loop=$video}> <{include file="db:mytube_videoload.html" video=$video[i]}> <{/section}> <!-- End link loop --> </div>

You can see the array values adding

<pre><{$video|@print_r}></pre>

It seems if you play with HTML and CSS (width box) you can get it.
Can you provide a live example?


Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.