• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] homepage block for 'recent' is wrong

Started by dtiberio,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dtiberioTopic starter

why is it that the RECENT link shows the recent videos, but the homepage block for 'recent' doesn't?

when I use 'recent' as a home page block, with no channel or with a channel, it doesn't show recent videos, and it shows videos that are a week old, even though I have thousands more recent videos.

how do I fix this?

shouldn't the select be the same code for the RECENT link and the RECENT homepage block?

thanks
  •  

dtiberioTopic starter

does anyone know if the RECENT option works on the home page, or where I can find the code?
  •  

PHPVibe A.

I can't confirm this issue...

tpl/main/home.php holds the queries. Recent query is the default one:

else:
$vq = "select ".$options.", ".DB_PREFIX."users.name as owner FROM ".DB_PREFIX."videos LEFT JOIN ".DB_PREFIX."users ON ".DB_PREFIX."videos.user_id = ".DB_PREFIX."users.id WHERE ".DB_PREFIX."videos.views >= 0 and pub > 0 $c_add ORDER BY ".DB_PREFIX."videos.id DESC ".this_offset($limit);
endif;


Same query...

ORDER BY ".DB_PREFIX."videos.id DESC

dtiberioTopic starter

it is not the same query

in the one you showed me for the home page block, views must be > 0. this is not in the other query for RECENT.

I did get it to work but it is unrealiable. something weird is going on.
  •  

dtiberioTopic starter

it isn't working.

I create a home page block and call it Recent. I also called it Recent 12 with the 12 most recent in both cases, when I go to the home page, it says "Recent" or "Recent 12". however the videos shown next are the Most Viewed videos, not Recent videos. it is calling the wrong query.

When I reload the page, it showed the Recent query correct 1 time, but the other times it did not.

It was supposed to show the Recent 24 and then the Most Viewed 24, but it just showed the Recent and it kept adding more recent videos infinitely and never showed the Most Viewed.

I have been clearing the caches and restarting the database

I will keep trying, but there is definitely something wrong.
  •  

dtiberioTopic starter

when I change the sort order, it definitely changes the home page, but it is still always wrong.

I have tried ordering by title, id, date, source, etc. everything I try just gives me everything in a seemingly random fashion.

when I tried to order by the title, it was just random.

the only thing that works is ordering by views.

it makes no sense.
  •  

dtiberioTopic starter

okay I figured out what was wrong.

the media=1 is not in the other query for RECENT, and in my database most of the videos have media=0. when I set all listings to have media = 1, it worked.

I will check the crons to see why it sets media=0
  •  

PHPVibe A.

media=1 should be set as default by the field declaration in sql.

Similar topics (7)