MyBB Community Forums

Full Version: View video and update
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi guys,

Can I know how to fix this issue?
[Image: Wyq0rqq.png]

Also, I would like a PHP file with a SQL query for updating users DISPLAY usergroup matching their primary usergroup, as there are people purchasing subscriptions from me and ask for their color everyday which is troublesome to do individually.

Thanks.
you can run below SQL queries one by one (see also SQL queries guidance if required)
ALTER TABLE `mybb_users` CHANGE `showvideos` `showvideos` TINYINT(1) NOT NULL DEFAULT '1';
UPDATE `mybb_users` SET `showvideos`= '1' WHERE `showvideos`= '0';
ALTER TABLE `mybb_users` CHANGE `displaygroup` `displaygroup` smallint(5) NOT NULL DEFAULT '0';
UPDATE `mybb_users` SET `displaygroup` = '0';
Hi, thanks for the great help, m!

Received this error tho:
Parse error: syntax error, unexpected T_STRING in /home/zeroxxx/public_html/fixvid.php on line 5

When all it does is echo something.

EDIT: The video SQL did not work even after running it in phpmyadmin.
^ suggestion is to use SQL queries once directly through the database manager (eg. phpMyAdmin) [NOT given php code]
Aight gonna try that. Also, is there a way to specify a usergroup to have their display usergroup updated to their primary? Sorry for being troublesome lol but ye.

Tried: ALTER TABLE mybb_users CHANGE displaygroup displaygroup smallint(5) NOT NULL DEFAULT '0';
It changes all the usergroups, I just want one usergroup to be changed, sorry for not being clear in my first post.

EDIT: Yes I actually did SQL query it thru PHPmyadmin with the SQL code before you suggested it.
UPDATE `mybb_users` SET `displaygroup` = '0' WHERE `displaygroup` = 'X'; 
replace X with the group ID of the required group

showing videos query should also work
No sorry, it didn't :/
Also, getting this error again for fixgroup
Parse error: syntax error, unexpected T_STRING in /home/zeroxxx/public_html/fixvid.php on line 5
^ can you post the code you have used for fixvid.php file
Fixvid.php
<?php
define('IN_MYBB', 1);
require_once "global.php";
       $db->write_query("UPDATE `mybb_users` SET `showvideos`= '1' WHERE `showvideos`= '0'); 
       echo ("Fixed");
?>

fixgroup.php
<?php
define('IN_MYBB', 1);
require_once "global.php";
        $db->write_query("UPDATE `mybb_users` SET `displaygroup` = '0' WHERE `displaygroup` = '11'); 
        echo ("Done.");
?>

Posted both in case, check pm too.
^ there is a mistake. query begins with a double quote mark and it should end with a double quote mark
$db->write_query("UPDATE `mybb_users` SET `showvideos`= '1' WHERE `showvideos`= '0'");
$db->write_query("UPDATE `mybb_users` SET `displaygroup` = '0' WHERE `displaygroup` = '11'"); 
Pages: 1 2