最近关于DNN,又有一些值得记录的小技巧(tips),sql乱码和articles模块源码修改

最近关于DNN,又有一些值得记录的小技巧(tips),为了照顾外国用DNN的朋友们,我还是贴一些英文关键字,希望不要引起某些人的反感。

关于DNN模块中乱码的问题,只需要另存为utf-8就行了。而我以前问的SQL脚本中中文汉字变成问号的问题,这个经m2land的确认,是DNN的一个bug,它会将sql脚本转换一下,再执行,而双字节的汉字自然就成问号了。期待下次的DNN版本会改正。据land称,他已经给DNN团队报告了此bug.

再则,对于articles模块中的一些问题,我现在总结一下。(下载自http://www.efficionconsulting.com/)

我下的是3.2.6版本,首先需要解决的是comments中的评论会变成问号的问题,这个在我经历前面的乱码事件后,简直是小case。直接将sql建表脚本的varchar替换成nvarchar ( varchar replace nvarchar)。用unicode编码成功解决了。

同样,在文章标题列表中,会有“read more...”和"More articles"等字样,按理说应该在本地化资源文件(App_LocalResources中的resx文件)中进行修改就行了。可是作者也许忙忘了吧。并没有提供此功能。我们可以自己添加,也可以在ascx文件中修改text,推荐自己添加,然后使用资源文件。如果你直接改text的话,需要注意在vs中保存为utf-8编码。否则会是乱码。


然后是一个花了我1天多时间的问题。这儿有一个老外的描述,和我遇到的问题一样。
我就直接贴过来了,避免重复劳动,你就当编英文吧。


I need your help if you could give me.

I have a problem when i use your article Articles 3.2.6- Source & PA.
I′m using dotnetnuke 4x version and Visual Studio 2005.
When i install your PA i have no problem and everything is ok.
When i try to install the sources, the process i use to do that is:

1. Install Articles PA in dotnetnuke import module.
2. Copying all files ascx.vb and vb project files to directory DesktopModules/Articles overwriting the existent

ones.
3. Inside my solution, i open the existent project(vbproj file) that i have copied to DesktopModules/Articles.
4. I include and point to correct dll′s in my articles project and the project build with no errors.
5. Remove the dll bin reference to effectionconsultingarticles on my website and add a project articles

reference.

The problem is:

I got errors when i build all the solution, and the compiler saies me that controls(variables) are already

declared. If i delete the control declarations in articles project, logically, the project won′t build no matter

what.

Is this mode the right way to install sources in my dotnetnuke project?

I have also tried to copy the source files directly to desktopmodules/Articles (bellow dotnetnuke website), but i got the following error: 'namespace/ArticlesListBase.ascx.vb is not defined'. Seems that, the compiler doesn′t let me to create instance of this class because couldn′t found it in the namespace :|.

is there a problem with my visual studio?

Is the version of dotnetnuke?

I'd be very glad if you could help me in this situation

Best regards,

Ricardo Moura.
 
====
我将能正常使用的源代码版的articles模块放于bin目录下的dll给剪切到其他位置。用vs2005编译,会提示“Error 4 Could not load type 'EfficionConsulting.Articles.Settings'. C:\dnn\DesktopModules\Articles\Settings.ascx 1 
”等一大堆错误。

我在网上找资料,问人,甚至给作者发mail,基本没有得到答案。而是发现有一大堆的人遇到过类似的问题。

后来,我将所有的vb源码全放到app_code目录下的articles目录中,并将vs2005自动提示的一些已经在新版本中更新的类名之类的改成vs推荐的。
如“Services.Search.SearchItemInfoCollection”需要改为“DotNetNuke.Services.Search.SearchItemInfoCollection”,
System.Configuration.ConfigurationManager.AppSettings也要改为最新的。好像还有一个,我不记得了,反正,你注意看vs提示就行了。

OK,全部记录,就这些了。
  其实一开始就看vs的错误提示,感觉是命名空间和类这方面没有被定义或者识别出来的问题。后来的问题解决印证了这个感觉。所以,今后,还是得认真看vs提示。再考虑是自己解决还是去搜。可以省很多时间。

posted on 2008-06-11 16:28  公众号73只蚂蚁  阅读(561)  评论(0编辑  收藏  举报

导航