YAFLogo

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
Can we make this the new standard for YAF?
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
10 years ago
Originally Posted by: Zero2Cool 

Can we make this the new standard for YAF?



Its now turned on by default, but it can be changed back to the old url format via the app.config (AppSettings)



or for the new rewriter



The UrlRewriter.config can now handle both links, to make sure old links will work it someone switches the format.

I also updated the urlrewriter.config if the forum is in a subfolder (like the sample Application) which can be found here:
https://github.com/YAFNET/YAF.SampleWebApplication/blob/master/C%23/YAF.SampleWebApplication/UrlRewriter.config 

the urls will look like this..

Main Links like search

http://mydomain.com/forum/search

Forum Category

http://mydomain.com/forum/category/1-forum-category-name

Forum Forums

http://mydomain.com/forum/topics/1-forum-name

Topic

http://mydomain.com/forum/posts/t1-topic-name

Admin Pages

http://mydomain.com/forum/admin/hostsettings

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
I'm so excited to try this I keep messing it up lol ... its not helping that the github download isn't creating the upgrade packages for me either haha. Like a damn kid in the candy store.


http://packerpeople.com/ 

My custom pages (e.g. Chat.aspx, Blog.aspx, etc) redirect to the forum.

Active Users links don't work, unless you remove /forum from the URL.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
10 years ago
Originally Posted by: Zero2Cool 

I'm so excited to try this I keep messing it up lol ... its not helping that the github download isn't creating the upgrade packages for me either haha. Like a damn kid in the candy store.


http://packerpeople.com/ 

My custom pages (e.g. Chat.aspx, Blog.aspx, etc) redirect to the forum.

Active Users links don't work, unless you remove /forum from the URL.



Looks like almost all of your links do not work. In my sample application the same urls do work. Are you sure you are using the right urlrewriter.config from the yaf.sampleapplication repository and not the one from yaf?

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
I just put this UrlRewriter.config in there and now there's no url rewriting being done.
https://github.com/YAFNET/YAF.SampleWebApplication/blob/master/C%23/YAF.SampleWebApplication/UrlRewriter.config 


I toyed around with it for a little bit, can't get all thinks to rewrite properly. That file above, the only toolbar links that I got working are admin and host. Posts, categories, sections and topics aren't working now.

The key for advanced or standard doesn't seem relevant in any testing I've done. Meaning, whether I have it set to standard or advanced or dont' even have it, no change.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
10 years ago
The key for advanced or standard doesn't seem relevant in any testing I've done. Meaning, whether I have it set to standard or advanced or dont' even have it, no change.

Did you restart the application? When you modify the app.config you need to restart.
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
Originally Posted by: tha_watcha 

Did you restart the application? When you modify the app.config you need to restart.



No, I did not restart because sometimes changes happened with different configurations to the urlwriter file. Oops. I'll start the testing over.
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
I just uploaded the files for the last build that has the build script fix.

I can't get to /install no matter what. I tried using the new url writer on standard and advanced.

Here's my app.config, minus the single login stuff and password. Any ideas what I'm not seeing?

<appSettings>
  <add key="YAF.BoardID" value="1" />

  <add key="YAF.EnableURLRewriting" value="false" />
  <add key="YAF.UrlRewritingFormat" value="standard" />
  <add key="YAF.FileRoot" value="~/forum"/>
  <add key="YAF.AppRoot" value="~/forum" />
  <add key="YAF.BaseUrlMask" value="http://packerpeople.com" />
  <add key="YAF.BaseScriptFile" value="forum.aspx" />
  <add key="YAF.ForceScriptName" value="forum.aspx" />


  <add key="YAF.URLRewritingMode" value="Unicode" />
  <add key="YAF.UseSMTPSSL" value="false" />  
  <add key="YAF.DatabaseObjectQualifier" value="yaf_" />
  <add key="YAF.DatabaseOwner" value="dbo" />
  <add key="YAF.ConnectionStringName" value="yafnet" />
  <add key="YAF.ProviderExceptionXML" value="ProviderExceptions.xml" />
  <add key="YAF.ProviderKeyType" value="System.Guid" />
  <add key="YAF.MobileUserAgents" value="iphone,ipad,midp,windows ce, blah blah"/>



  <!-- RadEditor configuration settings-->
  <add key="YAF.RadEditorSkin" value="Black"/>
  <add key="YAF.UseRadEditorToolsFile" value="true"/>
  <add key="YAF.RadEditorToolsFile" value="~/editors/radEditor/toolsFile.xml" />
  <!-- RadEditor configuration settings-->

 

</appSettings>
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
10 years ago
Originally Posted by: Zero2Cool 

oops ... if the forum is in a subfolder then below I think would make more sense and looks cleaner (just my opinion) than having the TopicId or MessageId appended to the end of the link.

http://forum.yetanotherforum.net/forum/topic/15525/Bug-in-URLrewriter-config


Originally Posted by: Zero2Cool 


This is just my two cents, but I think having /forum/topic/#### is more efficient and beneficial because if someone links to a topic and the description/title changes, what's that do to your link? Does it kill it or does YAF to have to know that the last - separator is the Id?



It only looks for the id numbers in the string

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
10 years ago
Quote:

I can't get to /install no matter what. I tried using the new url writer on standard and advanced.



You need to update the urlrewriter.config. i didnt update the one for the Sample Application. Doing it right now....
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
Originally Posted by: tha_watcha 

Updated version is online..

https://github.com/YAFNET/YAF.SampleWebApplication/blob/master/C%23/YAF.SampleWebApplication/UrlRewriter.config 



Success!!!

http://packerpeople.com/ 

Works beautifully! My custom pages work as does YAF. I did a quick click through on a bunch of links. I'll keep playing around with it and if I find anything goofy, I'll report back.
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
NEW- http://packerpeople.com/forum/topics/4-Let-s-Talk-Green-Bay-Packers
OLD- http://packerpeople.com/forum/yaf_topics4_Let-s-Talk-Green-Bay-Packers.aspx


NEW- http://packerpeople.com/forum/posts/t19962-49ers--Alex-Boone-would-like-to-punch-Clay-Matthews-in-the-face
OLD- http://packerpeople.com/forum/yaf_postst19962_49ers--Alex-Boone-would-like-to-punch-Clay-Matthews-in-the-face.aspx
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
10 years ago
Can someone who's using the advanced url writer please try clicking the Admin User button?

I get this...

Invalid
You've passed an invalid value to the forum.
Continue...
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 仍 YAF Version: 3.0.3
10 years ago
Originally Posted by: Zero2Cool 

Can someone who's using the advanced url writer please try clicking the Admin User button?

I get this...

Invalid
You've passed an invalid value to the forum.
Continue...



fixed updated config is online

YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
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