First steps (of many more)

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
12/1/2005 5:30:37 AM
Gravatar
Total Posts 146

First steps (of many more)

Hello !

I wish to see a set of step, very basic to show how to create a new web page inherit from mojoportal.Web.SiteModule. I come from the world windows in c++ builder, so, these are my first step in web development, but olways I to learn fast. May be a 3 to 5 lines to say the step in the right order.

Thanks
12/1/2005 5:32:36 AM
Gravatar
Total Posts 146

Re: First steps (of many more)

I have a VS 2003 Entr.
12/1/2005 2:23:08 PM
Gravatar
Total Posts 18439

Re: First steps (of many more)

Right click the modules folder and choose Add > Add New Item, then choose Web User Control and name it Whatever.ascx

If you don't see the option for Web User Control you need to follow the instructions here: http://pluralsight.com/wiki/default.aspx/Fritz.AspNetWithoutWebProjects

Open the code behind file Whatever.ascx.cs and where you see your class declared like this:

public class Whatever: System.Web.UI.UserControl

changes it to this:

public class Whatever: mojoPortal.Web.SiteModuleControl

put in something simple like some text for a start then Build it

now open the site in a browser and go to Admin > Feature Modules and add a new feature
put in the Control Source: Modules/Whatever.ascx and give it a Feature Name.

add your new module to a page and you should see your text

now go back to your new module and develop the custom logic you need.

If you need your module to link to some other pages for editing, create new pages in the root of the web by right clicking the folder Add> Add New Item > Web Form

you can link to your pages from within the module passing any paramters as needed.

Study the Links module Links.ascx and its relation to LinksEdit.aspx for more info. Notice that the ModuleTitleControl in the modules usually links to an edit page.

Hope that helps, I really don't have time to write a good tutorial any time soon.

Joe
12/4/2005 3:41:35 AM
Gravatar
Total Posts 146

Re: First steps (of many more)

Hello Joe.

Thanks, your notes really help me. I think that I'm in another stage, in a best stage. But in this work, I think I made something wrong...: when I to put the page (new page) that I made in WinXP with VS2003 into directory Suse Linux (/usr/local/web/mojoportal/Modules) and I done: Feature Modules, Add Page and put the content module into the page an error appear, when I try to show the site: Something like a the class 'Whatever' is not into mojoportal.web.dll; then I done to copy my mojoportal.web.dll from winxp into Suse, and all bad !!!. Now nothing work. What I have to do? reinstall mojoportal? or I can to do other thing?.

The current message is :

Objekt nenalezen!

....
...
Error 404.

Thanks in advance...
12/4/2005 4:12:33 AM
Gravatar
Total Posts 18439

Re: First steps (of many more)

If you are working with the version of mojoportal from svn on WinXP it is has a lot of changes from the last release. you would need to run the newest upgrade script to get the db changes.

If I were you I would revert the changes you made on your linux server and setup a new web app on linux for testing your build from XP that way your existing site is ok until you are sure your changes will work.

The trick to building on XP and deploy on linux is use Release mode, then choose Rebuild Solution from the Build menu in VS. If you do a normal Build in VS it is an incremental build and that won't work on mono. Of couurse after you add new pages and build you must replace the dlls and the pages on linux. See the link on the download page for Unleash It a great tool for deploying VS web projects. It will deploy just the files that have changed including the dlls and it will not deploy .cs files which you don't want to deploy on production.

Hope it helps,

Joe
12/5/2005 4:47:49 AM
Gravatar
Total Posts 146

Re: First steps (of many more)

Thanks, I'm walking...

Now, I want to know is : How to tune the code downloaded with svn, with the db that I downloaded of the site with 'Files for using PostgreSQL' ?

I have the following error:

Field name not found
Parameter name: fieldName
Actual value was AllowUserFullNameChange.

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.ArgumentOutOfRangeException: Field name not found
Parameter name: fieldName
Actual value was AllowUserFullNameChange.

Source Error:

Line 79: 				else
Line 80: {
Line 81: throw ex;
Line 82: }
Line 83: }

Source File: E:\SysDevNET\mojoportal\Web\Global.asax.cs    Line: 81

Stack Trace:

[ArgumentOutOfRangeException: Field name not found
Parameter name: fieldName
Actual value was AllowUserFullNameChange.]
mojoPortal.Web.Global.GetSiteSettings() in E:\SysDevNET\mojoportal\Web\Global.asax.cs:81
mojoPortal.Web.Global.Application_BeginRequest(Object sender, EventArgs e) in E:\SysDevNET\mojoportal\Web\Global.asax.cs:111
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

I will be waiting....
12/5/2005 5:14:12 AM
Gravatar
Total Posts 18439

Re: First steps (of many more)

I think I committed the newest upgrade script 20050912tonext with some errors in it and this would prevent re-running the create stored procedures script which will be needed. I will try and fix that tonight after work.
12/5/2005 2:38:22 PM
Gravatar
Total Posts 18439

Re: First steps (of many more)

OK I just took a copy of the db from 20050912 and upgraded it with the scripts from svn and until I ran the scripts I had the same error as you are getting.

here is what you need to do

on your XP machine right click the folder where you got mojoportal using TortoiseSVN and choose SVN Update
this will give you my latest changes.

now look in the PostgreSQLData folder and copy the scripts to your linux machine
postgre-upgradefrom20050912toNext.sql
and
3CreateStoredProcedures.sql

run those scripts on your db to get it synchronized with the svn code, first the upgrade script then the stored procedure script

Let me know how it goes.

Cheers,

Joe
12/5/2005 4:56:17 PM
Gravatar
Total Posts 146

Re: First steps (of many more)

You are really my mentor.  Brilliant, sensational.  Everything begins to take form and works.  I will continue working to obtain the results that desire.  Thanks.  I assure that each thing I learn, after, I will use to help any other.  I will be in contact..., because this just begins!!!!!  jejejeje.

Thanks, and that you are very well.
1/28/2010 7:03:52 AM
Gravatar
Total Posts 4

First steps (of many more)

hello,

i m a new user to mojoportal in your above 2nd post i did the same things but

 

===============================================

Right click the modules folder and choose Add > Add New Item, then choose Web User Control and name it Whatever.ascx

If you don't see the option for Web User Control you need to follow the instructions here: http://pluralsight.com/wiki/default.aspx/Fritz.AspNetWithoutWebProjects

Open the code behind file Whatever.ascx.cs and where you see your class declared like this:

public class Whatever: System.Web.UI.UserControl

changes it to this:

public class Whatever: mojoPortal.Web.SiteModuleControl

put in something simple like some text for a start then Build it

now open the site in a browser and go to Admin > Feature Modules and add a new feature
put in the Control Source: Modules/Whatever.ascx and give it a Feature Name.

=======================================

till this it worked fine but after this it gave debugging error in js file as:

htmlfile:unknown runtime error

 

what must be the error?

plz help.

thanks.

You must sign in to post in the forums. This thread is closed to new posts.