Welcome Guest Search | Active Topics | Members | Log In | Register

2 Pages12>
YAF and masterpages
jeffwow Offline
#1 Posted : Friday, September 07, 2007 8:21:02 AM(UTC)
Rank: YAF Forumling

Joined: 9/7/2007(UTC)
Posts: 1

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hi

Here's the issue.

I need to include YAF in an existing website using masterpages. Is there any way for me to includes a masterpage in the YAF project? I tried but got some weird errors.. Anyone did it yet?

Regards
eddr666 Offline
#2 Posted : Saturday, September 15, 2007 7:16:36 PM(UTC)
Rank: Advanced Member

Joined: 8/10/2007(UTC)
Posts: 56
Location: Israel

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Well, I did manage to master YAF somehow, but it's not natural.

Jaben[1...13], is there an easy way to integrate all the pages inside a master page?

See, It IS a very attractive solution in case you want to build an entire site with YAF integrated within. It'll reduce the necessity of portals like DNN & Rainbow for building a whole site - sometimes you want a not-big site with YAF in it & to build it alone.

Is it a dreadful feature?

I find it hard.... it's hard to find...
yea, well, whatever.. nevermind..
cardy_web Offline
#3 Posted : Sunday, September 16, 2007 7:51:00 AM(UTC)
Rank: YAF Forumling

Joined: 9/9/2007(UTC)
Posts: 1

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I've done a simple test by editing the default.aspx page and I've incapsulated it in a masterpage container. it work fine without problems. Where have you found troubles?
mjhufford Offline
#4 Posted : Sunday, September 16, 2007 9:25:04 AM(UTC)


Rank: YAF Developer

Medals: Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.

Joined: 7/15/2007(UTC)
Posts: 88
Location: Lowell, AR

Thanks: 0 times
Was thanked: 2 time(s) in 2 post(s)
I've also just added a MasterPageFile="NameOfMasterPage.Master" tag to the page directive, then wrapped the source code inside of asp:Content tags and it worked fine.
Jaben Offline
#5 Posted : Sunday, September 16, 2007 7:46:52 PM(UTC)

Rank: YAF Head Dude

Medals: Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.Medal of Honor for the Support King: Given to a community member who tirelessly answers tons of support questions.

Joined: 10/9/2004(UTC)
Posts: 4,152
Location: Raleigh, NC

Thanks: 35 times
Was thanked: 94 time(s) in 49 post(s)
Just to be clearer... here are the modified Default.aspx and MasterPage.Master files to start with. Just unzip (and overwrite) in your YAF root directory.

They are very bare. Unfortunately, the "PageTitle" doesn't change in this version. If you have v1.9.1 Final, there is a way to get the page title to update on master pages. (There's a OnPageTitle event in the YAF control -- hook it and update the title.)
File Attachment(s):
MasterPageKit.zip (1kb) downloaded 151 time(s).
"I have a simple philosophy: Fill what's empty. Empty what's full. Scratch where it itches.”.

eddr666 Offline
#6 Posted : Sunday, September 16, 2007 9:50:32 PM(UTC)
Rank: Advanced Member

Joined: 8/10/2007(UTC)
Posts: 56
Location: Israel

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hi & thanks,

I'm still not familiar enough with with YAF so I don't know whether I have to change only the Default.aspx or more pages?

I chenged my files similar to the files you added. Is that all I need?

Thanks.
I find it hard.... it's hard to find...
yea, well, whatever.. nevermind..
rosskr00 Offline
#7 Posted : Monday, September 17, 2007 8:09:21 AM(UTC)
Rank: Member

Joined: 2/8/2007(UTC)
Posts: 9
Location: Minnesota

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I can verify that it works in 1.9.3

I just had to make a few changes to fourmpage.cs to handle the head and title elements located in the master
Jaben Offline
#8 Posted : Monday, September 17, 2007 8:39:19 AM(UTC)

Rank: YAF Head Dude

Medals: Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.Medal of Honor for the Support King: Given to a community member who tirelessly answers tons of support questions.

Joined: 10/9/2004(UTC)
Posts: 4,152
Location: Raleigh, NC

Thanks: 35 times
Was thanked: 94 time(s) in 49 post(s)
eddr666 wrote:
Hi & thanks,

I'm still not familiar enough with with YAF so I don't know whether I have to change only the Default.aspx or more pages?

I chenged my files similar to the files you added. Is that all I need?

Thanks.

Just overwrite the default.aspx with the one supplied. It's extremely simple -- that's all there is to do here.
"I have a simple philosophy: Fill what's empty. Empty what's full. Scratch where it itches.”.

sridhar Offline
#9 Posted : Tuesday, May 19, 2009 10:19:49 PM(UTC)
Rank: Member

Joined: 5/13/2009(UTC)
Posts: 10
Location: Bangalore

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hi jaben,

i am using YAF v1.9.3..i downloaded the zip file u provided for master page inclusion.


but when i run it is giving errors as...


Error 1 Element 'forum' is not a known element. This can occur if there is a compilation error in the Web site. D:\A-new pros\yet another forum\YAf-BIN-NET20\default.aspx 15 6 D:\...\YAf-BIN-NET20\

Error 2 Could not load file or assembly 'yaf' or one of its dependencies. The system cannot find the file specified. D:\A-new pros\yet another forum\YAf-BIN-NET20\default.aspx 2

Error 3 Could not load file or assembly 'yaf' or one of its dependencies. The system cannot find the file specified. D:\A-new pros\yet another forum\YAf-BIN-NET20\default.aspx 3


Pleace help me...


Thanks in advance
sridhar Offline
#10 Posted : Tuesday, May 19, 2009 10:23:38 PM(UTC)
Rank: Member

Joined: 5/13/2009(UTC)
Posts: 10
Location: Bangalore

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Jaben wrote:
eddr666 wrote:
Hi & thanks,

I'm still not familiar enough with with YAF so I don't know whether I have to change only the Default.aspx or more pages?

I chenged my files similar to the files you added. Is that all I need?

Thanks.

Just overwrite the default.aspx with the one supplied. It's extremely simple -- that's all there is to do here.



i am using YAF v1.9.3. it is working fine...when i downloaded and copied the file(zip file) that u provide for master page inclusion it is giving following errors

Error 1 Element 'forum' is not a known element. This can occur if there is a compilation error in the Web site. D:\A-new pros\yet another forum\YAf-BIN-NET20\default.aspx 15 6 D:\...\YAf-BIN-NET20\

Error 2 Could not load file or assembly 'yaf' or one of its dependencies. The system cannot find the file specified. D:\A-new pros\yet another forum\YAf-BIN-NET20\default.aspx 2

Error 3 Could not load file or assembly 'yaf' or one of its dependencies. The system cannot find the file specified. D:\A-new pros\yet another forum\YAf-BIN-NET20\default.aspx 3



Thanks in advance....
OwainW Offline
#11 Posted : Friday, July 03, 2009 12:11:39 AM(UTC)
Rank: YAF Forumling

Joined: 7/3/2009(UTC)
Posts: 3
Location: Scotland

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I am trying to get YAF to sit inside a masterpage I have created and I am using throughout my site.

My default YAF page looks like this

Code:

<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false"  MasterPageFile="~/MasterPage.master"%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script runat="server">
    public void Page_Error( object sender, System.EventArgs e )
    {
        Exception x = Server.GetLastError();
        YAF.Classes.Data.DB.eventlog_create( YafContext.Current.PageUserID, this, x );
        YAF.Classes.Utils.CreateMail.CreateLogEmail( x );
    }        
</script>




    <form id="form1" runat="server" enctype="multipart/form-data">
        <YAF:Forum runat="server" ID="forum"></YAF:Forum>
    </form>

</asp:Content>




And when I go to view my forum I get the following error message:

Quote:

There has been a serious error loading the forum. No further information is available.

Please contact the administrator if this message persists.


Can someone help please.
Thanks,
Mek Offline
#12 Posted : Friday, July 03, 2009 12:57:38 AM(UTC)


Rank: YAF Developer

Medals: Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.Medal of Honor for the Support King: Given to a community member who tirelessly answers tons of support questions.

Joined: 7/12/2005(UTC)
Posts: 1,899
Location: on Dock Street

Thanks: 2 times
Was thanked: 9 time(s) in 9 post(s)
Edit your web.config , turn off CustomErrors and the real error message will magically appear.


"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon Smile )
OwainW Offline
#13 Posted : Friday, July 03, 2009 1:10:27 AM(UTC)
Rank: YAF Forumling

Joined: 7/3/2009(UTC)
Posts: 3
Location: Scotland

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Cheers for that, Im being told that The file '/forum/MasterPage.master' does not exist.

This is true but I thought putting ~/ before the name would direct it to the root folder so it should pick up the MasterPage.master from the root directory.

jshepler Offline
#14 Posted : Friday, July 03, 2009 2:50:17 AM(UTC)


Rank: YAF MVP

Joined: 8/9/2008(UTC)
Posts: 194
Location: Milliways

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
OwainW wrote:
Cheers for that, Im being told that The file '/forum/MasterPage.master' does not exist.

This is true but I thought putting ~/ before the name would direct it to the root folder so it should pick up the MasterPage.master from the root directory.



~ is the application root, not necessarily the same as site root. If you have the yaf folder configured as an application, then ~/ would be the root of yaf.
not jsheLPer
OwainW Offline
#15 Posted : Friday, July 03, 2009 3:15:00 AM(UTC)
Rank: YAF Forumling

Joined: 7/3/2009(UTC)
Posts: 3
Location: Scotland

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
OK, thanks for clearing that up for me. Do I have to run YAF as an App or can I somehow point the Default to the site root for the master page.
Users browsing this topic
Guest
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 RC4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.347 seconds.