Login

Username

Password





Register   Reset password

Get Cuyahoga at SourceForge.net. Fast, secure and Free Open Source software downloads

Forum

Welcome Guest Search | Active Topics | Members

Porting module from IBuySpy Options
easfaw
Posted: Thursday, July 21, 2005 11:54:18 PM
Rank: Guest
Groups: Member

Joined: 7/21/2005
Posts: 22
Points: 0
When porting a module from IBuySpy to Cuyahoga - is it necessary to
use NHibernate - or is it possible to directly use the SqlData... classes
if we know that the module will only use SqlServer?
(I have no idea what NHibernate does - I'm assuming it is some sort of DAL)

Thanks Martin,

Elias
martijnb
Posted: Friday, July 22, 2005 12:31:06 AM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
Hi Elias

Every module in Cuyahoga can use its own data access solution. A perfect example is this forum. It uses DataReaders and SP's.

But, when developing new modules, i highly recommend NHibernate. Once you get a little bit familiar with it, it's so much more fun developing and saves you a lot of cumbersome work.
sthomas
Posted: Thursday, August 4, 2005 1:07:34 AM
Rank: Newbie
Groups: Member

Joined: 8/2/2005
Posts: 4
Points: 0
Hello Martin,

can u tell me how to modify yaf for this wunderfull cuyahoga?

thank you
Thomas
martijnb
Posted: Thursday, August 4, 2005 4:20:04 AM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
Hi Thomas

Yaf requires some very little changes (version 0.9.9). I attached the changed files. Config.cs and Data.cs belong in the /classes folder and ForumPage.cs in the /pages folder.

Besides that, there is a Cuyahoga.Modules.YetAnotherForum module in the SVN repository: http://tijnthuus.demon.nl/svn/repos/cuyahoga/trunk/Yaf/. You can obtain that with a subversion client like tortoisesvn.

- You have to build both, the changed yaf sources and the Cuyahoga module. - After building, create a Yaf folder in /Web/Modules/ and move the all the yaf files to that folder that are required to run it (aspx, ascx, images etc.).
- Also copy CuyahogaYaf.ascx to to that folder.
- Copy yaf.dll and Cuyahoga.Modules.YetAnotherForum to the /bin folder of Cuyahoga.
- Merge the web.config that comes with yaf with the Cuyahoga web.config.
- Add an entry for the forum in the cuyahoga_moduletype table.
- Add two settings to the cuyahoga_modulesetting table: BOARDID (System.Int32, required) and CATEGORYID (System.Int32, not required).

After this, you can add a new section with a forum.


Disclaimer: Yaf is GPL software, so I don't know if it's completely legal to post the modified sources here on the forum. If not, please some one let me know and I'll remove them.

File Attachment(s):
yaf-cuyahoga-changes.zip (13kb) downloaded 496 time(s).


sthomas
Posted: Friday, August 5, 2005 1:04:27 AM
Rank: Newbie
Groups: Member

Joined: 8/2/2005
Posts: 4
Points: 0
Hello Martin,

thank you for the information (and for the files). it works!

any ideas why i have a javascript error when i will click the calendar control in editarticle? (both ie6 and firefox)

Thomas
martijnb
Posted: Friday, August 5, 2005 6:18:44 AM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
sthomas wrote:

thank you for the information (and for the files). it works!


That's great. Are we going to see the result somewhere? happy

Quote:

any ideas why i have a javascript error when i will click the calendar control in editarticle? (both ie6 and firefox)


Hmmm that's strange. Maybe the path to the calendar .js files is invalid?
sthomas
Posted: Friday, August 5, 2005 7:36:35 PM
Rank: Newbie
Groups: Member

Joined: 8/2/2005
Posts: 4
Points: 0
Hi Martin,

my javascript error is now located. when i use the language file calendar-en.js in place of calendar-de.js it works fine.

i change also a line in the file RemoteContentModule.cs:

StreamReader sr = new StreamReader(receiveStream, Encoding.UTF8);

to

StreamReader sr = new StreamReader(receiveStream, Encoding.Default);

for German "Umlaute" (ä, ö,ß etc.)

i like the Cuyahoga Framework, a great concept, congratulations! :-)

for a limited time here is my test-installation:
http://test.photosource.de

Thomas
martijnb
Posted: Friday, August 5, 2005 8:06:51 PM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
sthomas wrote:

my javascript error is now located. when i use the language file calendar-en.js in place of calendar-de.js it works fine.


I'll create a JIRA issue for this that will remind me to give it a look.

Quote:

i change also a line in the file RemoteContentModule.cs:

StreamReader sr = new StreamReader(receiveStream, Encoding.UTF8);

to

StreamReader sr = new StreamReader(receiveStream, Encoding.Default);

for German "Umlaute" (ä, ö,ß etc.)


I've never really thought about that, but now you put it here, it makes more sense to use the encoding of the RSS source. Another JIRA issue happy.
i like the Cuyahoga Framework, a great concept, congratulations! :-)

Quote:

for a limited time here is my test-installation:
http://test.photosource.de


Nice!

rbfigueira
Posted: Sunday, January 8, 2006 5:22:04 PM
Rank: Member
Groups: Member

Joined: 1/6/2006
Posts: 12
Points: 0
Hi Martin,

>>I attached the changed files. Config.cs and Data.cs belong in the /classes folder and ForumPage.cs in the /pages folder.

The link is broken. I can’t download the file.
Can you put other new link your send to me that file ?

I will appreciate.

Thanks tonguestickingout

rbfigueira
Posted: Monday, January 9, 2006 4:23:14 PM
Rank: Member
Groups: Member

Joined: 1/6/2006
Posts: 12
Points: 0
Can anyone send me the files (Config.cs and Data.cs belong in the /classes folder and ForumPage.cs in the /pages folder.) ?

I want to integrate the forum in cuyahoga framework !!

Thanks ! ;-)

martijnb
Posted: Tuesday, January 10, 2006 6:00:43 AM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
Guys, the attachments work again. Last week I moved the site to a different physical directory and forgot to set the right permissions to the forum attachments directory. Sorry for the inconvenience.
pmgahan
Posted: Wednesday, October 4, 2006 8:46:46 AM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2006
Posts: 56
Points: 27
Hello Martin,

I've followed your instructions and could not get YAF to work with the latest Cuyahoga svn.

The first error I have is due to the CuyahogaYafModule.cs file, I can't geti to compile under VS2005 so I have to modify this:
public CuyahogaYafModule(Section section) : base(section)
into this:
public CuyahogaYafModule() : base()


Then I could build the module.

Now I'm having the following error after installation and when trying to acces a page with a forum section:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
yaf.pages.ForumPage.ForumPage_Load(Object sender, EventArgs e) +2558
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061


Thanks for your help!
Patrick
martijnb
Posted: Wednesday, October 4, 2006 6:18:23 PM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
At least the forum is trying to load which means that the Cuyahoga module works.
Could you try to access the forum directly and see if that works? If you just copied all Yaf files to the module directory, you should be able to run the forum via http://your-host/Modules/Yaf/default.aspx.
pmgahan
Posted: Wednesday, October 4, 2006 8:49:49 PM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2006
Posts: 56
Points: 27
I get the same error:

[NullReferenceException: Object reference not set to an instance of an object.]
yaf.pages.ForumPage.ForumPage_Load(Object sender, EventArgs e) +2558
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

when accesing directly by the yaf page: http://www.itiar.com/Modules/Yaf/default.aspx

The YAF module created the tables, but it mentioned that I may have to login as administrator before using the forum, could this be the problem? If so, how can I log in as administrator to yaf?

Thanks,
Patrick.
pmgahan
Posted: Wednesday, October 4, 2006 8:51:58 PM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2006
Posts: 56
Points: 27
Why is it that I had to modify this to compile?

public CuyahogaYafModule(Section section) : base(section)
into this:
public CuyahogaYafModule() : base()

Thanks,
Patrick.
martijnb
Posted: Thursday, October 5, 2006 6:01:14 AM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
pmgahan wrote:
I get the same error:
when accesing directly by the yaf page: http://www.itiar.com/Modules/Yaf/default.aspx


So something is wrong in the forum. Are you in a position to debug it? Do you have the correct yaf section in the web.config?

Quote:

The YAF module created the tables, but it mentioned that I may have to login as administrator before using the forum, could this be the problem? If so, how can I log in as administrator to yaf?


You must log in on Cuyahoga with an account that has the same username as the admin that was created after installing the forum. Yaf knows that it is running under Cuyahoga, so it doesn't display login or registration links, but directly logs you in with the Cuyahoga identity (and creates an account in the forum if there is no matching account).
martijnb
Posted: Thursday, October 5, 2006 6:04:34 AM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
pmgahan wrote:
Why is it that I had to modify this to compile?

public CuyahogaYafModule(Section section) : base(section)
into this:
public CuyahogaYafModule() : base()


That's because Cuyahoga 2.0 has a different way of loading modules. This removes the need to supply a section in the constructor (and to be honest, it was quite ugly).
pmgahan
Posted: Thursday, October 5, 2006 4:36:30 PM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2006
Posts: 56
Points: 27
Ok, thanks Martin, I will try to debug.

Patrick.
pmgahan
Posted: Friday, October 6, 2006 12:20:55 AM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2006
Posts: 56
Points: 27
I've found that on line 203 of Forumpage.cs

m_pageinfo = DB.pageload(
HttpContext.Current.Session.SessionID,
PageBoardID,
User.Name,
HttpContext.Current.Request.UserHostAddress,
HttpContext.Current.Request.FilePath,
browser,
platform,
categoryID,
forumID,
topicID,
messageID);


HttpContext.Current.Session.SessionID is null.

This is what is causing the problem.

Do you know how to solve this?

Thanks,
Patrick.
pmgahan
Posted: Friday, October 6, 2006 12:51:33 AM
Rank: Advanced Member
Groups: Member

Joined: 6/4/2006
Posts: 56
Points: 27
I think that the problem could come from the we.config file, root element for yafnet

What do you use here?

I use /Modules/Yaf/



Thanks,
Patrick.
Users browsing this topic
Guest


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.

Main Forum RSS : RSS

Yet Another Forum.net version 1.9.0 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.