Jaben
  •  Jaben
  • 100% (Exalted)
  • YAF Developer Topic Starter
2006-12-21T01:32:13Z
Welcome to the Modifications and Patches Forum

This is the only forum that allows file uploading (max 5 megs).

Please enhance the YAF community by posting your:

  • Modifications
  • Bug fixes/Patches
  • Smiles Packs
  • Avatars Packs
  • Themes
  • Updated Language Files

    If you are posting a Theme please attach a screen shot of the theme. For all items explain WHICH version of YAF they are designed for.

    Thanks!

    -Jaben
  • Sponsor
    Jaben
    •  Jaben
    • 100% (Exalted)
    • YAF Developer Topic Starter
    2006-12-21T01:48:30Z
    How do you post a file?

    First, create a new topic like usual and click "Post". Then, after your new topic has been created, you click the "Attach" button on your new post. From there, you can easily upload multiple files.
    alii
    •  alii
    • 50.6% (Neutral)
    • YAF Forumling
    2008-07-23T06:10:14Z
    Where can I have file for translating from English?
    bbobb
    •  bbobb
    • 100% (Exalted)
    • YAF Developer
    2009-01-18T16:18:16Z
    Simply patch for data layer.

    bbobb
    •  bbobb
    • 100% (Exalted)
    • YAF Developer
    2009-01-18T16:20:26Z
    Simply patch for data layer.
    File Attachment(s):
    sp_report_copyover.diff.zip (1kb) downloaded 231 time(s).

    bbobb
    •  bbobb
    • 100% (Exalted)
    • YAF Developer
    2009-01-23T22:36:31Z
    A patch to begin separate data layer remnants from core code(harmless one).
    On applying, the /YetAnotherForum.Net/ folder will be completly cleared from MS SQL database code. And it's completly safe and tested.
    After this all the DB related code should be separated at last:-d .
    File Attachment(s):
    data_layer_separation4.patch.zip (7kb) downloaded 167 time(s).

    bbobb
    •  bbobb
    • 100% (Exalted)
    • YAF Developer
    2009-02-01T07:32:02Z
    Missing conversion hacks for other data layers
    File Attachment(s):
    universal_casts_for_other_datalayers_r1.txt (3kb) downloaded 219 time(s).

    RavenDev
    2009-02-12T23:14:08Z
    Lithuanian Language

    my forum at web adress www.ravendev.lt/forum 


    File Attachment(s):
    lithuanian.xml (39kb) downloaded 184 time(s).
    test2005
    2009-02-13T23:33:28Z
    RavenDev wrote:

    Lithuanian Language

    my forum at web adress www.ravendev.lt/forum 




    Thanks for the contribution! :)

    .....the man in black fled across the desert..........and the gunslinger followed.....
    RavenDev
    2009-02-15T23:17:34Z
    from my forum you can get image files with Lithuanian language
    bbobb
    •  bbobb
    • 100% (Exalted)
    • YAF Developer
    2009-02-17T07:30:56Z
    The proposed patch to make all data layers almost safe proof compatable in future.
    It's for MS SQL data layer, but the only difference is in the DBAccess.cs file and class CoolCoverter.
    For MySQL it reads for any data layer like this^
    Quote:


    public static class CoolConverter
    {
    public static int VerifyInt32(object value)
    {
    if (value == DBNull.Value) return 0;
    return Convert.ToInt32(value);
    }
    public static bool VeryfyBool(object value)
    {
    if (value == DBNull.Value || value.ToString() == "0") return false;
    if ( value.ToString() == "1") return true;
    return Convert.ToBoolean(value);
    }
    }


    For postgreSQL it's like this
    Quote:

    public static class CoolConverter
    {

    public static int VerifyInt32(object o)
    {
    //if (o == DBNull.Value || o =="f" ) o = 0;
    // if (o == "t") o = 1;
    return Convert.ToInt32(o);
    }
    public static bool VeryfyBool(object o)
    {
    if (o.ToString() == "t") { return true; }
    if (o.ToString() == "f") { return false; }
    return false;
    }
    }


    For MS SQL Server it's simply
    Quote:

    public static class CoolConverter
    + {
    + public static int VerifyInt32(object o)
    + {
    + return (int)o;
    + }
    + public static bool VeryfyBool(object o)
    + {
    + return (bool)o;
    + }
    + }



    In the last case it's much more faster than using Convert.ToInt32 or Convert.ToBool :wink:

    Jaben
    •  Jaben
    • 100% (Exalted)
    • YAF Developer Topic Starter
    2009-02-18T01:03:03Z
    On little thing... I have to change the name to "SqlDataLayerConverter".

    CoolConverter just isn't proper naming for the class.

    Thank you for all your help though, bbobb.
    bbobb
    •  bbobb
    • 100% (Exalted)
    • YAF Developer
    2009-02-18T03:33:17Z
    Jaben wrote:

    On little thing... I have to change the name to "SqlDataLayerConverter".
    CoolConverter just isn't proper naming for the class.


    No matter, it was a temporary example class name anyway. I wait while it appears and verify data layers again to avoid any possible bugs.
    Thanks that you found time for it:)
    bbobb
    •  bbobb
    • 100% (Exalted)
    • YAF Developer
    2009-02-19T13:43:16Z
    No, I was wrong.
    The class for MSSQL
    public static class SqlDataLayerConverter
    + {
    + public static int VerifyInt32(object o)
    + {
    + return (int)o;
    + }
    + public static bool VeryfyBool(object o)
    + {
    + return (bool)o;
    + }
    + }
    doesn't work, because unboxing doesn't work safe in the case though it's fast.
    Convert.To... should be used anyway:cry:
    This makes boxing of DataRow value which is already filled by a value.
    I was somehow completly sure that it should work.
    And it's impossible to make dynamic conversion class without code deep changing in many places.
    Sorry.
    Jaben
    •  Jaben
    • 100% (Exalted)
    • YAF Developer Topic Starter
    2009-02-19T15:23:42Z
    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.

    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