Jump to content

AVS Featured Videos Mod

   (0 reviews)

Description

Dieser Mod für Adult Video Script zeigt eure Featured Videos auf der Indexseite an

Das funktioniert natürlich auch in anderen Stellen im Template, unter den kürzlich hinzugefügten Videos gefällt es mir nur am besten. Je nachdem wieviele Boxen usw müsst ihr das col-sm-12 und die Einstellung darunter entsprechend anpassen!

Öffne index.php und füge über $smarty->assign('errors',$errors); folgenden Code ein:

$sql            = "SELECT * FROM video WHERE featured = 'yes' ORDER BY addtime DESC ";
$rs             = $conn->execute($sql);
$featured_videos  = $rs->getrows();
$smarty->assign('featured_videos', $featured_videos);

Im Index Template über dem letzten <div class="well ad-body"> nun noch folgendes einfügen:

<!-- Featured Videos by Mental-Vortex.com -->

<div class="well well-filters">
        <div class="pull-left">
            <h4>Featured Videos</h4>
        </div>
        <div class="pull-right">
            <a class="btn btn-primary" href="{$relative}/videos?o=bw"><span class="hidden-xs"><i class="fa fa-plus"></i> More featured Videos</span><span class="visible-xs"><i class="fa fa-plus"></i></span></a>
        </div>     
        <div class="clearfix"></div>
</div>

<div class="row">
    <div class="col-sm-12">
    {if $featured_videos}
        <div class="row">
        {section name=i loop=$featured_videos}

            <div class="col-sm-4 col-md-3 col-lg-3">
                <div class="well well-sm">

                <a href="{$relative}/video/{$featured_videos[i].VID}/{$featured_videos[i].title|clean}">
                    <div class="thumb-overlay">
                        <img src="{$relative}/media/videos/tmb/{$featured_videos[i].VID}/{$featured_videos[i].thumb}.jpg" title="{$featured_videos[i].title|escape:'html'}" alt="{$featured_videos[i].title|escape:'html'}" class="img-responsive id="rotate_{$featured_videos[i].VID}_{$featured_videos[i].thumbs}_viewed" />
                        {if $viewed_videos[i].type == 'private'}<div class="label-private">{t c='global.PRIVATE'}</div>{/if}
                        {if $viewed_videos[i].hd==1}<div class="hd-text-icon">HD</div>{/if}
                        <div class="duration">
                        {insert name=duration assign=duration duration=$featured_videos[i].duration}
                        {$duration}
                        </div>
                    </div>
                    <span class="video-title title-truncate m-t-5">{$featured_videos[i].title|escape:'html'}</span>
                </a>

                    <div class="video-added">
                    {insert name=time_range assign=addtime time=$featured_videos[i].addtime}
                    {$addtime}
                    </div>
                    <div class="video-views pull-left">
                    {$viewed_videos[i].viewnumber} {if $viewed_videos[i].viewnumber == '1'}{t c='global.view'}{else}{t c='global.views'}{/if}
                    </div>
                    <div class="video-rating pull-right {if $viewed_videos[i].rate == 0 && $viewed_videos[i].dislikes == 0}no-rating{/if}">
                    <i class="fa fa-heart video-rating-heart {if $viewed_videos[i].rate == 0 && $viewed_videos[i].dislikes == 0}no-rating{/if}"></i> <b>{if $viewed_videos[i].rate == 0 && $viewed_videos[i].dislikes == 0}-{else}{$viewed_videos[i].rate}%{/if}</b>
                    </div> 
                    <div class="clearfix"></div>

            </div> 
        </div> 
        {/section}
    {else}
    <div class="well well-sm">
        <span class="text-danger">{t c='videos.no_videos_found'}.</span>
    </div>
    {/if}
</div>

<!-- Featured Videos by Mental-Vortex.com -->

Geschrieben für AVS 3.3



Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
×
×
  • Create New...

Important Information

This website uses cookies and shit. Deal with it or GTFO!