关于首页去除新闻和公告说明

by 张刚 2014.12.9 09:25

注:脚本执行有风险,对于客户正式环境请在研发指导下执行。

一些客户有调整首页显示内容的想法。由于主页的模块都是写死的,因此其目前主页显示的内容行数、连接等是无法修改的。如果是想调整部分显示位置、或显示为其他模板内容,通过脚本调整是可以达到目的。如:

1.新闻模板替换为其他页面的一个webpart

2.去除新闻等模板等。

   

主要原则就是修改主要的webpart装配信息。以去除新闻、公告等模板显例,对想关调整过程说明如下,其他调整可参考。(由于涉及脚本修改,不建议非dba人员调整理!!!)

   

如果是去除新闻和公告,则修改方式如下,如果客开还要加其他页面,则可以选择将一个公告或者新闻模块的位置,将其form引用换成新做的页面即可。这块要客开写sql 脚本修改,请他参考下面的相关脚本。

   

修改方法:

   

  • Sql脚本
  •    

    --脚本备份:备份页面装配表.sql

    select * into UBF_Assemble_ColumnPartback from UBF_Assemble_ColumnPart

    select * into ubf_assemble_partback from ubf_assemble_part

       

    --脚本:删除新闻日历公告

    declare @part1 bigint

    declare @part2 bigint

    declare @part3 bigint

    declare @part4 bigint

    declare @part5 bigint

    declare @part6 bigint

       

    declare @column1 bigint

    declare @column2 bigint

    declare @column6 bigint

    --协同常用功能

    select @part1=ID from ubf_assemble_part where component ='d7648dd6-e628-40f9-9410-8e91a3b0db68' and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40'

    --我的任务

    select @part2=ID from ubf_assemble_part where component ='942e9ea2-385e-4de9-b36e-d596de5ac8c7' and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40'

    --日历

    select @part3=ID from ubf_assemble_part where  component ='eb5818cc-f712-4fdb-a12e-f2a8de6cef4d' and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40'

    --新闻

    select @part4=ID from ubf_assemble_part where  component ='b4b1b49f-c59c-4387-ae69-f14db5977550' and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40'

    --公告

    select @part5=ID from ubf_assemble_part where  component ='9d492159-12ad-4a8f-8527-f76d2ad3eaff' and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40'

    --我的消息

    select @part6=ID from ubf_assemble_part where  component ='cfa86f29-694e-4073-84db-a8a39541c240' and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40'

       

    select @column1=PageColumn from UBF_Assemble_ColumnPart where part=@part1

    select @column2=PageColumn from UBF_Assemble_ColumnPart where part=@part2

    update UBF_Assemble_ColumnPart set PageColumn=@column2 where part=@part1 --协同所在列改为我的任务所在列

       

    select @column6=PageColumn from UBF_Assemble_ColumnPart where part=@part6

       

    --select * from UBF_Assemble_ColumnPart where part=1001312160662030--消息 

    --select * from UBF_Assemble_ColumnPart where part=1001312160662031--任务

    --select * from UBF_Assemble_ColumnPart where part=1001312160662034--协同

    --select * from UBF_Assemble_PageColumn where ID =1001312160662035 --消息

    --select * from UBF_Assemble_PageColumn where ID =1001312160662038 --任务,协同

       

    update UBF_Assemble_PageColumn set WidthProportion=40 where ID =@column6

    update UBF_Assemble_PageColumn set WidthProportion=40 where ID =@column1

       

    --select * from UBF_Assemble_PageColumn where Page =1001101159165358

    --select * from UBF_Assemble_Page where Code ='53e12476-a12c-43d7-8a10-571c4e4a6b4e'

    --update UBF_Assemble_ColumnPart set PageColumn=@column1 where part=@part5

    --update UBF_Assemble_ColumnPart set PageColumn=@column2 where part=@part3

       

    ----删除协同常用功能

    --delete from UBF_Assemble_ColumnPart where part in (select ID from ubf_assemble_part where (component ='d7648dd6-e628-40f9-9410-8e91a3b0db68') and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40')

    --delete from ubf_assemble_part where (component ='d7648dd6-e628-40f9-9410-8e91a3b0db68') and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40'

    --删除日历

    delete from UBF_Assemble_ColumnPart where part in (select ID from ubf_assemble_part where (component ='eb5818cc-f712-4fdb-a12e-f2a8de6cef4d') and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40')

    delete from ubf_assemble_part where (component ='eb5818cc-f712-4fdb-a12e-f2a8de6cef4d') and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40'

    --删除新闻

    delete from UBF_Assemble_ColumnPart where part in (select ID from ubf_assemble_part where (component ='b4b1b49f-c59c-4387-ae69-f14db5977550') and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40')

    delete from ubf_assemble_part where (component ='b4b1b49f-c59c-4387-ae69-f14db5977550') and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40'

    --删除公告

    delete from UBF_Assemble_ColumnPart where part in (select ID from ubf_assemble_part where (component ='9d492159-12ad-4a8f-8527-f76d2ad3eaff') and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40')

    delete from ubf_assemble_part where (component ='9d492159-12ad-4a8f-8527-f76d2ad3eaff') and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40'

    --update ubf_assemble_part set Component='54240624-496E-4E1D-9159-775DF974F1F4' where component ='eb5818cc-f712-4fdb-a12e-f2a8de6cef4d' and pagecode = 'e443426c-37c7-479c-bc5d-ccf760492f40'

       

       

    2.修改文件:

    X:\UFIDA\Portal\CS\Templates\Portal\PortalMsg.ascx中的样式部分,添加黄色内容部分。

       

    <style type="text/css">

       

        #cs_portalMsg .paginator{border:solid 1px #fff;text-align:right;}

             #cs_portalMsg .paginator span{float:left;font-weight:bold;}

             #cs_portalMsg .paginator select{float:left;}

             #cs_portalMsg .paginator ul{padding:0;margin:0;font-size:8pt;}

             #cs_portalMsg .paginator li {display:inline;padding-left:1px;padding-right:1px;margin:0;}

              

             #cs_portalMsg .cs_title{ cursor:pointer; text-decoration:underline; overflow:hidden; width:90%;float:left; font-size:12px; white-space:nowrap;}

             #cs_portalMsg .delImg{ display:none;float:right;cursor:pointer;}

             #cs_portalMsg .cs_sendMsg{  text-align:right; width:80px;  cursor:pointer; font-size:12px;}

             #cs_portalMsg .cs_new{ float:left;}

             #cs_portalMsg .cs_downloadClient{ cursor:pointer; float:right;font-size:12px; padding-top:2px;}

             #cs_portalMsg .cs_hidden{ display:none;}

             #cs_portalMsg .cs_top { width:100%}

             #cs_portalMsg .cs_bottom { width:100%}

        #cs_portalMsg .cs_Msgsendtime{ float:right; text-align:right; font-size:12px; color:#7f7f7f;overflow:hidden;white-space:nowrap;}

             #cs_portalMsg .cs_senderName{float:left;font-size:12px; color:#7f7f7f;width:30%;overflow:hidden;white-space:nowrap;}

             #cs_portalMsg .cs_item{ margin-bottom:2px;}

       

    .u_BodyContentRegion_ContentLayout_1001312160662035_0 {height:100% !important}

       

    #u_M_p2_UnifyPortalMsgUIForm {height:100% !important;}

    #u_M_p2_UnifyPortalMsgUIForm .GLT{height:100% !important}

    #u_M_p2_Card0 {height:100% !important}

    #u_M_p2_Card0 .GLT{height:100% !important}

              

    #u_M_p2_ctl00 {height:100% !important}

       

    #cs_table .cs_top{line-height:21px;}

    #cs_table .cs_bottom{padding-bottom:1px;}

             /*

             #cs_table td{ border:1px solid #ccf}

             */

    </style>

       

       

       

    ----------------------------------

    姓 名: 张刚

    部门:U9平台技术部

       

       

Tags:

添加评论



biuquote
微笑得意调皮害羞酷大笑惊讶发呆喜欢可怜尴尬闭嘴噘嘴皱眉伤心抓狂呕吐坏笑漫骂发怒
Loading


RecentComments

评论 RSS

Statistics

989 篇文章
0 个单页
653558 条评论
11 次评分
233877 次访问
访问统计开始于 2019年12月15日
平均日访问 5439 次
当前 103 人在线