Log in

View Full Version : Premium Styles and Allow Somebody to use Non-selectable styles put together?


Alchemist
02-13-2005, 06:27 PM
Styles for Premium Members (https://vborg.vbsupport.ru/showthread.php?s=&threadid=48953)

Allow Somebody to use Non-selectable styles (https://vborg.vbsupport.ru/showthread.php?t=50574&page=1&pp=15)

Hey, these are two hacks both created by Amykhar, yet she is not supporting the hacks anymore so I need someones help.

In both, you need to edit member.php.

Premium Styles
Next, Open global.php (not the admin one, the forum one)

Find:

if ($style=$DB_site->query_first("SELECT templatesetid,replacementsetid,userselect FROM style WHERE styleid='$styleid'")) {
if (!$style['userselect']) {

Replace With:
if ($style=$DB_site->query_first("SELECT templatesetid,replacementsetid,userselect FROM style WHERE styleid='$styleid'")) {
if (($style['userselect']==0)or(($style['userselect']==2)and($bbuserinfo['premium']!=1))) {


Next, Open member.php
Find:

$stylesetlist = "";
if ($allowchangestyles==1) {
$stylesets=$DB_site->query("SELECT * FROM style WHERE userselect=1 ORDER BY title");
if ( !isset($bbuserinfo['realstyleid']) ) {

Replace with:

$stylesetlist = "";
if ($allowchangestyles==1) {
if ($bbuserinfo[premium]==1) {
$stylesets=$DB_site->query("SELECT * FROM style WHERE userselect != 0 ORDER BY title");
}
else
$stylesets=$DB_site->query("SELECT * FROM style WHERE userselect = 1 ORDER BY title");

if ( !isset($bbuserinfo['realstyleid']) ) {

Allow Somebody to use Non-selectable styles
In member.php:

Find:

$stylesetlist = "";
if ($allowchangestyles==1) {
$stylesets=$DB_site->query("SELECT * FROM style WHERE userselect=1 ORDER BY title");
if ( !isset($bbuserinfo['realstyleid']) ) {


Replace With:

$stylesetlist = "";
if ($allowchangestyles==1) {
if ($bbuserinfo[usergroupid]==6) {
$stylesets=$DB_site->query("SELECT * FROM style ORDER BY title");
}
else
$stylesets=$DB_site->query("SELECT * FROM style WHERE userselect = 1 ORDER BY title");

if ( !isset($bbuserinfo['realstyleid']) ) {



In global.php

Find:
if ($style=$DB_site->query_first("SELECT templatesetid,replacementsetid,userselect FROM style WHERE styleid='$styleid'")) {
if (!$style['userselect']) {


Replace With:
if ($style=$DB_site->query_first("SELECT templatesetid,replacementsetid,userselect FROM style WHERE styleid='$styleid'")) {
if (!$style['userselect'] and $bbuserinfo[usergroupid]!=6) {

As you can see, both hacks need to edit both global and member.php, yet they clash with different codes. Does anyone think they can solve this? I need this desperately because members have found the secret forum for the schemes, and it's less surprising if they already know what it is.

If you can help, thanks!