lmenaria
  •  lmenaria
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
2012-01-07T02:30:02Z
Hello,

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

<YAF:Forum runat="server" ID="forum" BoardID="1">

Please let me know.

Thanks,
Laxmilal
Sponsor
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2012-01-07T17:20:43Z
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
2012-07-16T11:58:39Z
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
2012-07-16T12:58:24Z
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

<YAF:Forum runat="server" ID="forum" BoardID="1"></YAF:Forum>



UserPostedImage
ngtrian
2012-07-16T14:21:29Z
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

<YAF:Forum runat="server" ID="forum" BoardID="1"></YAF:Forum>




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
2012-07-16T15:24:14Z
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.
UserPostedImage
ngtrian
2012-07-16T16:17:05Z
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
2012-07-16T23:13:15Z
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)


UserPostedImage
ngtrian
2012-07-17T00:17:20Z
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
2012-07-17T13:23:28Z
Sorry you need to change the Flags Value in the yaf_user table to 99
UserPostedImage
ngtrian
2012-07-17T14:04:09Z
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!

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

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved