YAFLogo

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
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.

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer Topic Starter
14 years ago
bbobb... patched and committed. I did change the name of the function to "VerifyBool"
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
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
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
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 .
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer Topic Starter
14 years ago
Thanks for your all your work guys!
Jacobson
  • Jacobson
  • 57.2% (Neutral)
  • YAF Forumling
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
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.
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
Patches for other data layers for new things in recent v.23xx changes.
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
Patches (other data layers) for new things in recent SVN v.23xx.
hanachacha
14 years ago
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, "", 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
  • VICTOR
  • 66.8% (Friendly)
  • YAF Forumling
14 years ago
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
13 years ago
language vietnam for YAF v 1.9.4 RC1
http://www.mediafire.com/?mdnkn3zq5jo 
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
13 years ago
Updated in r.3021
kambiri
  • kambiri
  • 51.2% (Neutral)
  • YAF Forumling
13 years ago
Danish Language.

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

herman_herman
13 years ago
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.


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