예제 #1
0
        private void bindDetail(int id, ContentPost post)
        {
            String content;

            String pageSeparator = getPageSeparator(post.Content);

            if (pageSeparator == null)
            {
                content = post.Content;
            }
            else
            {
                content = getPagedContent(post, pageSeparator);
            }

            if (post.HasImg())
            {
                String imgUrl = post.GetImgMedium();
                if (content.IndexOf(imgUrl) < 0)
                {
                    content = string.Format("<div class=\"post-detail-content-pic\"><img src=\"{0}\" /></div>", imgUrl)
                              + content;
                }
            }

            set("post.Content", content);
        }
예제 #2
0
        private void bindDetail( int id, ContentPost post )
        {
            String content;

            String pageSeparator = getPageSeparator( post.Content );
            if (pageSeparator == null) {
                content = post.Content;
            }
            else {
                content = getPagedContent( post, pageSeparator );
            }

            if (post.HasImg()) {
                content = string.Format( "<div style=\"text-align:center;\"><img src=\"{0}\" />", post.GetImgMedium() ) + "</div>" + content;
            }

            set( "post.Content", content );
        }
예제 #3
0
        private void bindDetail( int id, ContentPost post )
        {
            String content;

            String pageSeparator = getPageSeparator( post.Content );
            if (pageSeparator == null) {
                content = post.Content;
            }
            else {
                content = getPagedContent( post, pageSeparator );
            }

            if (post.HasImg()) {

                String imgUrl = post.GetImgMedium();
                if (content.IndexOf( imgUrl ) < 0) {

                    content = string.Format( "<div class=\"post-detail-content-pic\"><img src=\"{0}\" /></div>", imgUrl )
                        + content;
                }
            }

            set( "post.Content", content );
        }
예제 #4
0
        private void bindDetail(int id, ContentPost post)
        {
            String content;

            String pageSeparator = getPageSeparator(post.Content);

            if (pageSeparator == null)
            {
                content = post.Content;
            }
            else
            {
                content = getPagedContent(post, pageSeparator);
            }

            if (post.HasImg())
            {
                content = string.Format("<div style=\"text-align:center;\"><img src=\"{0}\" />", post.GetImgMedium()) + "</div>" + content;
            }

            set("post.Content", content);
        }
예제 #5
0
        private void bindDetail(int id, ContentPost post)
        {
            set("post.Title", post.GetTitle());
            set("post.Author", post.Author);
            set("post.Created", post.Created);

            String tag     = post.Tag.List.Count > 0 ? tag = "tag: " + post.Tag.HtmlString : "";
            String src     = getSrc(post);
            String replies = getReplies(post);

            set("post.Tag", tag);
            set("post.Replies", replies);
            set("post.Hits", post.Hits);
            set("post.Source", src);

            if (post.Creator != null)
            {
                set("post.Submitter", string.Format("<a href=\"{0}\" target=\"_blank\">{1}</a>", Link.ToMember(post.Creator), post.Creator.Name));
            }
            else
            {
                set("post.Submitter", "ÎÞ");
            }

            bindSummary(post);

            String content;

            String pageSeparator = getPageSeparator(post.Content);

            if (pageSeparator == null)
            {
                content = post.Content;
            }
            else
            {
                content = getPagedContent(post, pageSeparator);
            }

            if (post.HasImg())
            {
                content = string.Format("<div style=\"text-align:center;\"><img src=\"{0}\" />", post.GetImgMedium()) + "</div>" + content;
            }

            if (post.IsAttachmentLogin == 1 && ctx.viewer.IsLogin == false)
            {
                content += "<div class=\"downloadWarning\"><div>" + alang("downloadNeedLogin") + "</div></div>";
            }
            else
            {
                content = addAttachment(post, content);
            }

            set("post.Content", content);
        }
예제 #6
0
        private void bindDetail( int id, ContentPost post )
        {
            set( "post.Title", post.GetTitle() );
            set( "post.Author", post.Author );
            set( "post.Created", post.Created );

            String tag = post.Tag.List.Count > 0 ? tag = "tag: " + post.Tag.HtmlString : "";
            String src = getSrc( post );
            String replies = getReplies( post );

            set( "post.Tag", tag );
            set( "post.Replies", replies );
            set( "post.Hits", post.Hits );
            set( "post.Source", src );

            if (post.Creator != null) {
                set( "post.Submitter", string.Format( "<a href=\"{0}\" target=\"_blank\">{1}</a>", Link.ToMember( post.Creator ), post.Creator.Name ) );
            }
            else {
                set( "post.Submitter", "ÎÞ" );
            }

            bindSummary( post );

            String content;

            String pageSeparator = getPageSeparator( post.Content );
            if (pageSeparator == null) {
                content = post.Content;
            }
            else {
                content = getPagedContent( post, pageSeparator );
            }

            if (post.HasImg()) {
                content = string.Format( "<div style=\"text-align:center;\"><img src=\"{0}\" />", post.GetImgMedium() ) + "</div>" + content;
            }

            if (post.IsAttachmentLogin == 1 && ctx.viewer.IsLogin == false) {
                content += "<div class=\"downloadWarning\"><div>" + alang( "downloadNeedLogin" ) + "</div></div>";
            }
            else {
                content = addAttachment( post, content );
            }

            set( "post.Content", content );
        }