bbobb
  • Posts: 1558
  • Joined: 21/10/2008
Jaben wrote:

Interestingly, I haven't applied the conversion code yet. So I'll just hold off for now. I did apply the data layer centralization changes.


No problem!
The code like this works fine. So the class will be universal for mssql & mysql,
but it will be different from postgresql one. I wanted it to work a bit more fast.

public static class SqlDataLayerConverter
+ {
+ public static int VerifyInt32(object o)
+ {
+ return Convert.ToInt32(o);
+ }
+ public static bool VeryfyBool(object o)
+ {
+ return Convert.ToBoolean(o);
+ }
+ }
It's safe and the above variant needs testing anyway.

File Attachment(s):

Jaben
  • Posts: 2544
  • Joined: 09/10/2004
bbobb... patched and committed. I did change the name of the function to "VerifyBool"
bbobb
  • Posts: 1558
  • Joined: 21/10/2008
Thanks, Jaben:)
The bulk of the job is done.
The last 2 peaces are SqlInfoMessage delegates in runsql.ascx.cs and reindex.ascx.cs files, because they give out errors(matching methods in DBAccess.cs are misssing). I'll make a small patches for every data layer and publish that all because the problem is tricky for me.
If you find a way in future to move data specific functionality to YAF.Classes.Data from the above places the data layers can be fully compatable without compiling.


bbobb
  • Posts: 1558
  • Joined: 21/10/2008
A very small patch to a missing conversion for data layers compatability.
lionelhutz added patch No3. It doesn't affect my data layer, but can affect others.
The last files introduce 3 new assemblies and detailed instructions to add. They separate data layer even more almost as far as possible. Of cause, it's not a time to make such a change when new release coming soon. But may be...:roll:
This being done and the terrific SqlInfoMessage delegates problem solved, YAF 1.9.3 will be a completely other data layers friendly product and any other data layer maintanance will be very easy.
That's all :-d .
File Attachment(s):
YAF_DataLayer_DeepSeparation.zip (325kb) downloaded 113 time(s).

Jaben
  • Posts: 2544
  • Joined: 09/10/2004
Thanks for your all your work guys!
Jacobson
  • Posts: 12
  • Joined: 14/03/2009
bbobb
  • Posts: 1558
  • Joined: 21/10/2008
Other data layers patch.

This simply contains some extra commented extra strings for db.config and app.config.
These allow to keep all config settings in 2 common config files for all data layers with an option to uncomment respective ones.
File Attachment(s):
controls_names_for_all_data_layers.patch.zip (2kb) downloaded 107 time(s).

bbobb
  • Posts: 1558
  • Joined: 21/10/2008
Patches for other data layers for new things in recent v.23xx changes.
bbobb
  • Posts: 1558
  • Joined: 21/10/2008
Patches (other data layers) for new things in recent SVN v.23xx.
File Attachment(s):
extra_dls_23xxfixes.patch.zip (2kb) downloaded 109 time(s).

hanachacha
  • Posts: 11
  • Joined: 22/10/2008
Image Auto resize [1.9.1.8]

.autoheader a:link,.autoheader a:active,.autoheader a:visited
{
    background-color:#ECFCB8;
    border:solid 1px #B2E60A;
    padding:2px;
    width:394px;
    height:auto;
    text-decoration:none;
    display:block;
}
.autoheader a:hover{color:#B2E60A;}

// JScript File

function getElementsByClass(searchClass,node,tag) {

	var classElements = new Array();
	if (node == null)
		node = document;
	if (tag == null)
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	var j = 0;
	for (i = 0; i < elsLen; i++) {
		if (pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}
function AutoResizeImage()
{
    var arr=new Array();
    arr=getElementsByClass("autoresize",document,"img");
    for(var i=0;i<arr.length;i++)
    {
        if(arr[i].width>400)
        {
            var w=arr[i].width;
            var h=arr[i].height;
            arr[i].style.width=400;
            arr[i].parentNode.innerHTML="<a href=\"" + arr[i].src + "\" targer=\"_blank\">Hình gốc có kích thước là W=" + w + "px x H=" + h + "px. Click vào đây để xem hình gốc.</a>" +arr[i].parentNode.innerHTML
        }
    }
    
}


modify BBCode.cs. Find at static public string MakeHtml( yaf.pages.ForumPage basePage, string bbcode, bool DoFormatting ) and replace
NestedReplace(ref bbcode, r_img, "<img class=\"autoresize\" src=\"${http}${inner}\"/>", new string[] { "http" }, new string[] { "http://" });

NestedReplace(ref bbcode, r_img, "<span class=\"autoheader\"><img class=\"autoresize\" src=\"${http}${inner}\"/></span>", new string[] { "http" }, new string[] { "http://" });


modify Default.aspx :


<body onload="AutoResizeImage();">



View demo at : Quận Đoàn 5 
VICTOR
  • Posts: 28
  • Joined: 14/09/2009
Omg i post this before reading this forum
Theme Red & Black 

:shock:
Thank YAF.Net
this is my forum: www.thewhitechess.com 
this is my minor forum: LaughingGazForum 
halflife
  • Posts: 5
  • Joined: 19/11/2009
language vietnam for YAF v 1.9.4 RC1
http://www.mediafire.com/?mdnkn3zq5jo 
File Attachment(s):
vietnam.rar (15kb) downloaded 104 time(s).
bbobb
  • Posts: 1558
  • Joined: 21/10/2008
Updated in r.3021
kambiri
  • Posts: 2
  • Joined: 29/01/2010
Danish Language.

Languagefile has been viewed in YAF 1.9.4 to avoid bad translation.

File Attachment(s):
danish.xml (69kb) downloaded 118 time(s).
herman_herman
  • Posts: 535
  • Joined: 19/05/2007
kambiri wrote:

Danish Language.

Languagefile has been viewed in YAF 1.9.4 to avoid bad translation.



Hi.Thanks
Do you mind updating the language file based on latest revision?
I have attached it.


File Attachment(s):
danish.xml (81kb) downloaded 119 time(s).
Users browsing this topic
    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.

    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

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved