YAFLogo

lmenaria
  • lmenaria
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
13 years ago
Hello,

I would like to change the BoardID="1" progrramatically, how can I achieve this and where ?

Please let me know.

Thanks,

Laxmilal

Sponsor
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
13 years ago
protected void Page_Load(object sender, EventArgs e)

{

try

{

this.forum.BoardID = XXX;

}

catch (Exception)

{

this.forum.BoardID = 0;

}

// XXX is the place from which you take the boardid in your code.

ngtrian
  • ngtrian
  • 50.2% (Neutral)
  • YAF Camper
12 years ago
I can't find this code

Please help me

I had delete board id 1, and now i can't access admin host

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
12 years ago

I can't find this code

Please help me

I had delete board id 1, and now i can't access admin host

Originally Posted by: ngtrian 

The easiest way of changing the default board id is to change it in the forum control in the default.aspx file

ngtrian
  • ngtrian
  • 50.2% (Neutral)
  • YAF Camper
12 years ago

I can't find this code

Please help me

I had delete board id 1, and now i can't access admin host

Originally Posted by: tha_watcha 

The easiest way of changing the default board id is to change it in the forum control in the default.aspx file

Originally Posted by: ngtrian 

I create 2 board, and delete board 1,

I change boardid=2 in default.aspx file and i can access admin. But I cannot enter Host Settings

If boadid=1 in default.aspx file then .. error No data for board ID: 1

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
12 years ago
This is an issue in the current version that an new board created from the admin panel doesnt have an host user, this will be fixed in 1.96.2

To solve your problem you need to set the flag ishostuser to true on your admin account.

ngtrian
  • ngtrian
  • 50.2% (Neutral)
  • YAF Camper
12 years ago

This is an issue in the current version that an new board created from the admin panel doesnt have an host user, this will be fixed in 1.96.2

To solve your problem you need to set the flag ishostuser to true on your admin account.

Originally Posted by: tha_watcha 

"set the flag ishostuser to true" ?

you can guide more detailed

Thanks to support

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
12 years ago

This is an issue in the current version that an new board created from the admin panel doesnt have an host user, this will be fixed in 1.96.2

To solve your problem you need to set the flag ishostuser to true on your admin account.

Originally Posted by: ngtrian 

"set the flag ishostuser to true" ?

you can guide more detailed

Thanks to support

Originally Posted by: tha_watcha 

Well if you can acces the db directly you could modify the user row in the yaf_user table of your account and set the IsHostAdmin to true. Or You go to Admin -> Users & Roles -> Users -> Search for your Account -> Edit your admin Account and enable the Is Host Admin Checkbox (But iam not sure if this checkbox is visible as admin)

ngtrian
  • ngtrian
  • 50.2% (Neutral)
  • YAF Camper
12 years ago

This is an issue in the current version that an new board created from the admin panel doesnt have an host user, this will be fixed in 1.96.2

To solve your problem you need to set the flag ishostuser to true on your admin account.

Originally Posted by: tha_watcha 

"set the flag ishostuser to true" ?

you can guide more detailed

Thanks to support

Originally Posted by: ngtrian 

Well if you can acces the db directly you could modify the user row in the yaf_user table of your account and set the IsHostAdmin to true. Or You go to Admin -> Users & Roles -> Users -> Search for your Account -> Edit your admin Account and enable the Is Host Admin Checkbox (But iam not sure if this checkbox is visible as admin)

Originally Posted by: tha_watcha 

Hi.

I can access MSSQL Server, but not exist IsHostAdmin,

and i cannot find Host Admin Checkbox in admin.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
12 years ago
Sorry you need to change the Flags Value in the yaf_user table to 99
ngtrian
  • ngtrian
  • 50.2% (Neutral)
  • YAF Camper
12 years ago

Sorry you need to change the Flags Value in the yaf_user table to 99

Originally Posted by: tha_watcha 

It done. :cheesy:

Thanks you!