YAFLogo

lmenaria
  • lmenaria
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
12 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
12 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
11 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: 3.0.3
11 years ago
Originally Posted by: ngtrian 

I can't find this code
Please help me
I had delete board id 1, and now i can't access admin host



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
11 years ago
Originally Posted by: tha_watcha 

Originally Posted by: ngtrian 

I can't find this code
Please help me
I had delete board id 1, and now i can't access admin host



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






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: 3.0.3
11 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
11 years ago
Originally Posted by: tha_watcha 

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.



"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: 3.0.3
11 years ago
Originally Posted by: ngtrian 

Originally Posted by: tha_watcha 

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.



"set the flag ishostuser to true" ?
you can guide more detailed
Thanks to support



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
11 years ago
Originally Posted by: tha_watcha 

Originally Posted by: ngtrian 

Originally Posted by: tha_watcha 

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.



"set the flag ishostuser to true" ?
you can guide more detailed
Thanks to support



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)



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: 3.0.3
11 years ago
Sorry you need to change the Flags Value in the yaf_user table to 99
ngtrian
  • ngtrian
  • 50.2% (Neutral)
  • YAF Camper
11 years ago
Originally Posted by: tha_watcha 

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



It done. :cheesy:
Thanks you!
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button