Results 1 to 10 of 10

Thread: More "New Videos" on Startpage

  1. #1

    Default More "New Videos" on Startpage

    Hi,

    i just upgraded from 2.5 to 2.6, before the upgrade i had 3 line of new videos on the startpage (index.tpl). It seems like the old code i used in 2.5 is not working anymore. Have somebody of you any idea?

    This is my old code from 2.5

    Code:
    <table width="100%" class="bg2">
    	<tr valign="top">
       {section name=i loop=$new_video start=0 max=4}
       <td width="25%" align="center" onmouseout="this.style.backgroundColor='#e1e4f2';" onmouseover="this.style.backgroundColor='#d0e8f3';"><a href="{$baseurl}/view/{$new_video[i].VID}/{$new_video[i].title|lower|regex_replace:"/[^a-z0-9]+/":"-"}/">[img]{$tmburl}/1_{$new_video[i].VID}.jpg[/img]
    
         {$new_video[i].title}</a></td>
       {/section}
       </tr>
    
       <tr valign="top">
       {section name=i loop=$new_video start=4 max=4}
       <td width="25%" align="center" onmouseout="this.style.backgroundColor='#e1e4f2';" onmouseover="this.style.backgroundColor='#d0e8f3';"><a href="{$baseurl}/view/{$new_video[i].VID}/{$new_video[i].title|lower|regex_replace:"/[^a-z0-9]+/":"-"}/">[img]{$tmburl}/1_{$new_video[i].VID}.jpg[/img]
    {$new_video[i].title}</a></td>
       {/section}
       </tr>
       
       <tr valign="top">
       {section name=i loop=$new_video start=8 max=4}
       <td width="25%" align="center" onmouseout="this.style.backgroundColor='#e1e4f2';" onmouseover="this.style.backgroundColor='#d0e8f3';"><a href="{$baseurl}/view/{$new_video[i].VID}/{$new_video[i].title|lower|regex_replace:"/[^a-z0-9]+/":"-"}/">[img]{$tmburl}/1_{$new_video[i].VID}.jpg[/img]
    {$new_video[i].title}</a></td>
       {/section}
       </tr>
    	</table>
    VioTV.net - Broadcasting Democracy

  2. #2
    Join Date
    Dec 2007
    Posts
    8

    Default Re: More "New Videos" on Startpage

    yeah I need this too.. when I try to show 20 videos in new it ruins the template.. Help please.. anyone

  3. #3

    Default Re: More "New Videos" on Startpage

    admin can you help us?? i mean, you wrote the code^^ :wink:
    VioTV.net - Broadcasting Democracy

  4. #4
    Join Date
    Feb 2008
    Posts
    3

    Default Re: More "New Videos" on Startpage

    i need it to, 5 thumb in 1 line is to much i need 4 thumb in 1 line and this 3 times.
    if i use the old code it dosent work.
    thx
    http://www.xxx-hub.com

  5. #5

    Default Re: More "New Videos" on Startpage

    Admin, can you help us???
    VioTV.net - Broadcasting Democracy

  6. #6
    Join Date
    Feb 2008
    Posts
    3

    Default Re: More "New Videos" on Startpage

    Hallo Admin,

    you have progamming this script, do you now how to make. Or its imposibile to make.
    please a answer!!!

  7. #7

    Default

    if you are using latest version of Vshare(2.6) You can add more new videos on home page through admin area

    In admin area = > Site Configuration = > Site Settings = > Home Page Settings = > Number of New Videos

  8. #8
    Join Date
    Feb 2008
    Posts
    3

    Default Re: More "New Videos" on Startpage

    yes this i know, but how i can make only 4 Videos in 1 line? now i have 5 in 1 line and this 3 times. i nees 4 in 1 line.
    thx

  9. #9
    Join Date
    Mar 2008
    Posts
    2

    Default Re: More "New Videos" on Startpage

    Here's how you do it:

    You go to the "new videos" section of the index.tpl in your templates directory. Look for this code:
    Code:
    	<table width="100%" class="bg2">
    	<tr valign="top">
    	{section name=i loop=$new_video start=0 max=4}
    	<td width="25%" align="center" onmouseout="this.style.backgroundColor='#e1e4f2';" onmouseover="this.style.backgroundColor='#ffff99';"><a href="{$baseurl}/view/{$new_video[i].VID}/{$new_video[i].title|lower|regex_replace:"/[^a-z0-9]+/":"-"}/">[img]{$tmburl}/1_{$new_video[i].VID}.jpg[/img]
    {$new_video[i].title}</a></td>
    	{/section}
    	</tr>
    	</table>
    To make two rows of four, instead of just stacking up the videos in the table, use this code:

    Code:
    	<table width="100%" class="bg2">
    	<tr valign="top">
    	{section name=i loop=$new_video start=0 max=4}
    	<td width="25%" align="center" onmouseout="this.style.backgroundColor='#e1e4f2';" onmouseover="this.style.backgroundColor='#ffff99';"><a href="{$baseurl}/view/{$new_video[i].VID}/{$new_video[i].title|lower|regex_replace:"/[^a-z0-9]+/":"-"}/">[img]{$tmburl}/1_{$new_video[i].VID}.jpg[/img]
    {$new_video[i].title}</a></td>
    	{/section}
    	</tr><tr>
    	{section name=i loop=$new_video start=4 max=4}
    	<td width="25%" align="center" onmouseout="this.style.backgroundColor='#e1e4f2';" onmouseover="this.style.backgroundColor='#ffff99';"><a href="{$baseurl}/view/{$new_video[i].VID}/{$new_video[i].title|lower|regex_replace:"/[^a-z0-9]+/":"-"}/">[img]{$tmburl}/1_{$new_video[i].VID}.jpg[/img]
    {$new_video[i].title}</a></td>
    	{/section}
                    </tr>
    	</table>
    This creates a second row in the table and tells it to pull four more videos beginning with number 4 (0 through 3 appear in the first row). You can apply this same code to the other sections of the index page, adding rows. If you haven't edited the code in this section, you can simply copy the code above to the place in the file where the first example is and you will have two rows.

    Hope this helps.
    Kid Toob - Embarrass Your Kids Globally!
    Grandma safe, All Content Reviewed.
    http://www.kidtoob.com

  10. #10

    Default Re: More "New Videos" on Startpage

    Quote Originally Posted by dakint
    Here's how you do it:

    You go to the "new videos" section of the index.tpl in your templates directory. Look for this code:
    Code:
    	<table width="100%" class="bg2">
    	<tr valign="top">
    	{section name=i loop=$new_video start=0 max=4}
    	<td width="25%" align="center" onmouseout="this.style.backgroundColor='#e1e4f2';" onmouseover="this.style.backgroundColor='#ffff99';"><a href="{$baseurl}/view/{$new_video[i].VID}/{$new_video[i].title|lower|regex_replace:"/[^a-z0-9]+/":"-"}/">[img]{$tmburl}/1_{$new_video[i].VID}.jpg[/img]
    {$new_video[i].title}</a></td>
    	{/section}
    	</tr>
    	</table>
    To make two rows of four, instead of just stacking up the videos in the table, use this code:

    Code:
    	<table width="100%" class="bg2">
    	<tr valign="top">
    	{section name=i loop=$new_video start=0 max=4}
    	<td width="25%" align="center" onmouseout="this.style.backgroundColor='#e1e4f2';" onmouseover="this.style.backgroundColor='#ffff99';"><a href="{$baseurl}/view/{$new_video[i].VID}/{$new_video[i].title|lower|regex_replace:"/[^a-z0-9]+/":"-"}/">[img]{$tmburl}/1_{$new_video[i].VID}.jpg[/img]
    {$new_video[i].title}</a></td>
    	{/section}
    	</tr><tr>
    	{section name=i loop=$new_video start=4 max=4}
    	<td width="25%" align="center" onmouseout="this.style.backgroundColor='#e1e4f2';" onmouseover="this.style.backgroundColor='#ffff99';"><a href="{$baseurl}/view/{$new_video[i].VID}/{$new_video[i].title|lower|regex_replace:"/[^a-z0-9]+/":"-"}/">[img]{$tmburl}/1_{$new_video[i].VID}.jpg[/img]
    {$new_video[i].title}</a></td>
    	{/section}
                    </tr>
    	</table>
    This creates a second row in the table and tells it to pull four more videos beginning with number 4 (0 through 3 appear in the first row). You can apply this same code to the other sections of the index page, adding rows. If you haven't edited the code in this section, you can simply copy the code above to the place in the file where the first example is and you will have two rows.

    Hope this helps.
    It is possible to do something similar for the "recent video" page?

    i mean change the number of video for page and the number in each row?

    thanks.

Similar Threads

  1. Problems with users uploading videos getting "Invalid URL"
    By bouncdchk in forum Installation Support
    Replies: 5
    Last Post: 12-28-2008, 06:29 AM
  2. Relocating "Related Videos" similar to youporn.com
    By james739 in forum Template Modifications
    Replies: 2
    Last Post: 06-07-2008, 01:34 PM
  3. view the "recent videos" on another page
    By witchdoctor in forum Template Modifications
    Replies: 1
    Last Post: 02-26-2008, 05:03 AM
  4. Feature Request: Auto-add "Featured Videos"
    By grynmoors in forum Feature Requests
    Replies: 2
    Last Post: 09-03-2007, 10:12 PM
  5. "Classified " Site, and "Image Hosting"
    By chiefody in forum Sales Questions
    Replies: 1
    Last Post: 07-04-2007, 08:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •