Пример #1
0
    protected void Page_Init(object sender, System.EventArgs e)
    {
        m_containerPage = (Community_PersonalTags) Page;
            permissionData = m_containerPage.RefContentApi.LoadPermissions(0, "content", 0);
            m_tagApi = new Ektron.Cms.Community.TagsAPI();
            isAdmin = permissionData.IsAdmin;
            imagePath = m_tagApi.AppPath + "images/ui/icons/";

            // FireFox literally relies on the url object for the query string parse.
            if (Request.QueryString["objectType"] != null)
            {
                defaultTagObjectType = (EkEnumeration.CMSObjectTypes)int.Parse(Request.QueryString["objectType"]);
            }
            else
            {
                defaultTagObjectType = (EkEnumeration.CMSObjectTypes)int.Parse(Request.QueryString["amp;objectType"]);
            }

            bool isLanguageSiteEnabled = false;
            for (int i = 0; i <= LanguageDataArray.Length - 1; i++)
            {
                if (LanguageDataArray[i].Id == m_containerPage.ContentLanguage && LanguageDataArray[i].SiteEnabled)
                {
                    isLanguageSiteEnabled = true;
                    break;
                }
            }

            //the default tags page does not support all language - set to default.
            if (m_containerPage.ContentLanguage == Ektron.Cms.Common.EkConstants.ALL_CONTENT_LANGUAGES || isLanguageSiteEnabled == false)
            {
                m_containerPage.ContentLanguage = m_containerPage.RefCommonAPI.DefaultContentLanguage;
                m_containerPage.RefCommonAPI.SetCookieValue("LastValidLanguageID", m_containerPage.RefCommonAPI.DefaultContentLanguage.ToString());
            }

            error_InvalidChars.Text = m_containerPage.RefMsg.GetMessage("msg error tag invalid chars");
            error_EmptyTag.Text = m_containerPage.RefMsg.GetMessage("msg error tag empty");

            if (IsPostBack)
            {
                SaveDefaults();
                Response.ClearContent();
                Response.Redirect("PersonalTags.aspx?action=viewall", false);
            }
            else
            {
                LoadToolBar();
                RenderTags();
            }
    }
Пример #2
0
 public controls_Community_PersonalTags_EditTag()
 {
     m_tagApi = new Ektron.Cms.Community.TagsAPI();
 }
Пример #3
0
 public controls_Community_PersonalTags_ViewAllTags()
 {
     m_tagApi = new Ektron.Cms.Community.TagsAPI();
 }