|
Friday, February 24, 2006(UTC)
|
|
Wednesday, July 26, 2006 9:15:40 PM(UTC)
|
9 [0.02% of all post / 0.01 posts per day] |
|
0
(View Thanks)
|
|
0
|
|
0
|
View All Posts by User
|
congratulations,good job!
|
|
user will see a link or button in the topic which allow he/she to add attachments. that means you must first post a topic then attach something,i.e two steps.
|
I fixed this minor bug by adding a line to pages\lastposts.ascx.cs about at the bottom of the file,you can find: Code: protected string FormatBody(object o) { DataRowView row = (DataRowView) o; string html = FormatMsg.FormatMessage(this, row["Message"].ToString(), new MessageFlags(Convert.ToInt32(row["Flags"]))); html = html.Replace("<a href=","<a target=_blank href="); //I added this line,see? string messageSignature = row["Signature"].ToString(); if (messageSignature != string.Empty) { MessageFlags flags = new MessageFlags(); flags.IsHTML = false; messageSignature = FormatMsg.FormatMessage(this, messageSignature, flags); html += "<br/><hr noshade/>" + messageSignature; }
return html; }
hope this help. rgds!
|
|
I am looking into yaf1.0.1 sourcecode these days,but coundn't figure out what ForumControl.LockedForum stands for,can anybody be so kind to explain it? thanks~:d
|
Nice,you are a work hard guy 
|
|
well,really cool!
|
This hack will add url rewrite mechanism to yaf,thus yaf will be search engine Optimized,like www.googlecommunity.com,the posts in your forum will be indexed by search engine easier. 1.Modify GetLink(Pages page,string format,params object[] args) function in pages\Forum.cs Code: static public string GetLink(Pages page,string format,params object[] args) { //Modified by Harmy 2006-02-21 //对论坛列表及帖子等页面使用便于搜索引擎抓取的路径形式。 string strResult; switch(page) { case Pages.forum: strResult = string.Format("http://{0}/category{1}.aspx",HttpContext.Current.Request.ServerVariables["SERVER_NAME"],args[0]); break; case Pages.topics: strResult = string.Format("http://{0}/forum{1}.aspx",HttpContext.Current.Request.ServerVariables["SERVER_NAME"],args[0]); break; case Pages.posts: if (format.IndexOf("t=") >=0) strResult = string.Format("http://{0}/topic{1}.aspx",HttpContext.Current.Request.ServerVariables["SERVER_NAME"],args[0]); else strResult = Config.UrlBuilder.BuildUrl(string.Format("g={0}&{1}",page,string.Format(format,args))); break; default: strResult = Config.UrlBuilder.BuildUrl(string.Format("g={0}&{1}",page,string.Format(format,args))); break; } return strResult; }
2.Add a Global.asax file to the root of your forum. Code: <%@ Import Namespace="System.IO" %>
<Script Language="C#" Runat="Server">
void Application_BeginRequest(object sender, EventArgs e) { string strPageOwner; string strCurrentPath; string strCustomPath; int iPos; strCurrentPath = Request.Path.ToLower(); if (strCurrentPath.IndexOf( "category" ) >=0){ iPos = strCurrentPath.IndexOf( "category" ) + 8; strCustomPath = String.Format("~/Default.aspx?g=forum&c={0}",Request.Path.Substring(iPos,strCurrentPath.IndexOf(".") - iPos)); Context.RewritePath( strCustomPath ); } if (strCurrentPath.IndexOf( "forum" ) >=0){ iPos = strCurrentPath.IndexOf( "forum" ) + 5; strCustomPath = String.Format("~/Default.aspx?g=topics&f={0}",Request.Path.Substring(iPos,strCurrentPath.IndexOf(".") - iPos)); Context.RewritePath( strCustomPath ); } if (strCurrentPath.IndexOf( "topic" ) >=0){ iPos = strCurrentPath.IndexOf( "topic" ) + 5; strCustomPath = String.Format("~/Default.aspx?g=posts&t={0}",Request.Path.Substring(iPos,strCurrentPath.IndexOf(".") - iPos)); Context.RewritePath( strCustomPath ); } }
</Script>
so,is it simple?
|
Dr-Hack wrote:upgrade from RC3 to V 1 .. (my upgrade on test machin from RC4 to V1 went fine ) gave a error . uploaded all the files and replaced the bin .. this is the error thats while doing the force upgrade .. > ..  but then i went to the admin CP n did the "Install" and now this error is coming A critical error has occurred.Column 'PreviousVisit' does not belong to table Table. DNN Detailed Error Log : FileName: FileLineNumber: 0 FileColumnNumber: 0 Method: System.Data.DataRow.get_Item DatabaseVersion: 2.1.2 AssemblyVersion: 2.1.2.30398 PortalID: 0 PortalName: .::Hackology::. UserID: 511 UserName: hashkool ActiveTabID: 27 ActiveTabName: Forum AbsoluteURL: /dot/Default.aspx AbsoluteURLReferrer: http://drhack.net/dot/De...7&g=topics&f=28
ExceptionGUID: 7c2520f3-c399-421a-9dbc-1e4017c8cf71 DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider Message: Column 'PreviousVisit' does not belong to table Table. InnerException: System.ArgumentException: Column 'PreviousVisit' does not belong to table Table. at System.Data.DataRow.get_Item(String columnName) at yaf.pages.ForumPage.ForumPage_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain() TargetSite: StackTrace: HelpLink: Source: its my main site ..  I have met this problem too. but finally I find that run the sql script twice in isqlw.exe will solve this problem,I really don'nt know why,but it works  Hope this help.
|
well done!thank you very much!!
|
|