Homepage video gallery box

The default  video gallery on the home page is set to "latest" is there a way to set it to random?

Quote · 15 Jul 2009

Frown

Quote · 16 Jul 2009

Edit the file inc\classes\BxDolSharedMedia.php


At about line 704 look for the following code.

function getBlockCode_SharedMedia($iUser = 0) {
$iUser   = (int)$iUser;

$aManage = array('medID','medExt','medTitle','medUri');

$max_num = (int)getParam("top_photos_max_num");
$mode     = process_db_input( getParam("top_photos_mode") );


$mode = $_GET['sh_'.$this->sType.'Mode'];
if( $mode != 'rand' && $mode != 'top' && $mode != 'last')
$mode = 'last';

$aCond['sqlWhere'] = " WHERE `{$this->aTableFields['Approved']}`='true'";

----------------------------------------------------------------------------------------------------------

Make it look like this by adding the line in red.

function getBlockCode_SharedMedia($iUser = 0) {
$iUser   = (int)$iUser;

$aManage = array('medID','medExt','medTitle','medUri');

$max_num = (int)getParam("top_photos_max_num");
$mode     = process_db_input( getParam("top_photos_mode") );


if ($_GET['sh_videoMode'] == '') $_GET['sh_videoMode']='rand';
$mode = $_GET['sh_'.$this->sType.'Mode'];
if( $mode != 'rand' && $mode != 'top' && $mode != 'last')
$mode = 'last';

$aCond['sqlWhere'] = " WHERE `{$this->aTableFields['Approved']}`='true'";



Save.

Video section should now default to random.

https://www.deanbassett.com
Quote · 16 Jul 2009

Thanks brother.

Edit the file inc\classes\BxDolSharedMedia.php


At about line 704 look for the following code.

function getBlockCode_SharedMedia($iUser = 0) {
$iUser   = (int)$iUser;

$aManage = array('medID','medExt','medTitle','medUri');

$max_num = (int)getParam("top_photos_max_num");
$mode     = process_db_input( getParam("top_photos_mode") );


$mode = $_GET['sh_'.$this->sType.'Mode'];
if( $mode != 'rand' && $mode != 'top' && $mode != 'last')
$mode = 'last';

$aCond['sqlWhere'] = " WHERE `{$this->aTableFields['Approved']}`='true'";

----------------------------------------------------------------------------------------------------------

Make it look like this by adding the line in red.

function getBlockCode_SharedMedia($iUser = 0) {
$iUser   = (int)$iUser;

$aManage = array('medID','medExt','medTitle','medUri');

$max_num = (int)getParam("top_photos_max_num");
$mode     = process_db_input( getParam("top_photos_mode") );


if ($_GET['sh_videoMode'] == '') $_GET['sh_videoMode']='rand';
$mode = $_GET['sh_'.$this->sType.'Mode'];
if( $mode != 'rand' && $mode != 'top' && $mode != 'last')
$mode = 'last';

$aCond['sqlWhere'] = " WHERE `{$this->aTableFields['Approved']}`='true'";



Save.

Video section should now default

Quote · 16 Jul 2009

Ok that line in red. has a spot thats hard to read. if ($_GET['sh_videoMode'] == '') $_GET['sh_videoMode']='rand';

== ''

the '' is two single quotes not one double quote. I thought i should point that out in case your not good with php.


https://www.deanbassett.com
Quote · 16 Jul 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.