Hli Archives: Nqeg 2007

Kuv tus tub Hacked Gamespot

Li ntawd, thaum sawv ntxov no, Kuv tus tub yog txiav txim tau seb ib hnub nyoog-thirteen txwv Halo 3 kev yees duab rau Gamespot. Kuv nyob sab nraum shoveling daus, li ntawd, kuv tsis muaj pab los sis kev tabkaum. Seb yuav yog leej niam uas invention thiab cov uas … nws muaj ib tug eureka! caij. Nws realizes uas txawm Gamespot xav kom nws tso nws tiag tiag hnub yug, nws yuav tau sau yam hnub yug Yes Xus. Thaum nws pom tau hais tias, nws ua nws tus kheej lawm yawg saib lub yees duab.

I’m not quite sure how I feel about this 🙂

Sunday Funny: “Nws yog cov khib nyiab Printing”

Nyob rau kuv thawj cov hauj lwm tawm ntawm kev kawm ntawv nyob rau qib siab 1991, Yog kuv muaj hmoo yuav mus ua hauj lwm rau lub tuam txhab raug nrog 13 qhov chaw, tsis nrog nws cov neeg HQ hauv New Jersey. Kuv nkaus xwb thaum lub tuam txhab ntawd dov tawm ERP zog. Peb muaj ib me me nws ua hauj lwm muaj li kaum tawm huv tibsi, ob tug neeg uas ua tsis taug. Ib feem ntawm qhov kev tsim koom qhov IBM System 36 thawv HP radon thiab HPUX. Txhua leej txhua tus siv hlab ntsuab rau hauv tsev, lawv.

Peb tes num rolls raws thiab kuv kuv xa rau Baltimore cov nqi nyiaj tshiab, Jeff. Peb txoj hauj lwm yog rau cov hwj huam tuaj rau ntawm lub box Unix, xyuas kom tseeb tias cov O/S khiav, nruab ib lub qhov system ERP, configure lub ERP, tsheb nqaj hlau nyob hauv cov ERP thiab ua kev cai ua hauj lwm rau folks rau ntawm qhov chaw. (Qhov no yog ib txoj hauj lwm uas tsis yog npau suav, pheej los ncaj nraim mus kawm ntawv qib siab). Ua ntej peb yuav yeej tau tawm hauv av, peb yuav tsum tau mus unpack tag nrho cov ntsuab hlab, muab cia rau hauv desks thiab wire lawv. Thiab ib sab zoo tshaj yog tias peb yuav tsum tau muab tso rau RJ11 connectors ntawm tus kheej.

Vim tias tsis txhob to taub thiab yeej ib txwm tsis xav mus kom txog thaum lub sij hawm, peb twb muaj ib co contracting lag tuaj thiab khiav cable thoob plaws rau tsob nroj, tab sis peb tsis muaj cia rau cov connectors. Li ntawd, muaj ib tus "thaj kem" nrog dozens txog unlabeled cables nyob rau hauv lub "computer hoob" thiab cov snaked nyob hauv lub tsev mus rau ntau qhov chaw hauv lub tsev.

Peb ua haujlwm peb txoj kev los ntawm nws dua ib lis xaus kawm kom, soj ntsuam txhua hlau, muab rau ib connector (Yog koj paub tseeb tias nws ncaj vs. hla), txav lub ntsis nqis rau hauv cov hlab ntsuab thiab printers los yog, labeling nyob ntawm tej, ua zoo saib kom "getty ntawd" yog khiav kom haum rau txhua qhov chaw nres nkoj thiab tej zaum ib txhiab lwm yam uas kuv twb suppressed txij thaum ntawd los. Txhua yam nws tuaj ua ke heev nicely.

Tab sis npog, yog ib qho tseem ceeb cable uas peb tsis tau paub tseeb. Nroj tsuag hauv Baltimore muaj ib cov kev sib raug zoo nrog rau ib qhov chaw warehousing hauv New Jersey. Ib txhia muab tso rau hauv Baltimore shipped tawm ntawm qhov chaw ntawd. Muaj ob tug nyob ntawm tej uas peb yuav tsum tau xa mus rau ntawm lub box HPUX: lub raj ntsuab thiab ib lub tshuab luam ntawv. Cov raj ntsuab yog yooj yim, tab sis lub tshuab luam ntawv txia ntshis ua ib tug npau suav phem peb lub lis piam.

Yog hais tias koj tsis paub nws, los yog suppressed nws, soj ntsuam txog kev mob hlab ntsuab thiab printers li no, muaj ntau ntau yam kev xaiv uas koj tsis los teev ntau pins. 8-ntsis, 7-ntsis, parity (Txawm/khib/All), tej zaum luag. Yog hais tias koj tau txais ib qhov ntawm cov chaw no tsis ncaj ncees lawm, cov raj lossis luam ntawv tseem pom tias yog khoom, tab sis nws yuav ua tau tag nrho gibberish, nws yuav tau gibberish nrog khoom coj los ntau ib nrab. tau mas, cov pins no tsis pom thiab yuav tsum muab teev cia siv tus me ntsia hlau pav ca-ntug tsav. Thiab nws yeej ib txwm tsis txheem.

Peb teev ib ntawm ntau ceev hu nrog tus txiv leej tub NJ (lub grizzled computer hater uas tej zaum hais Ius dev. peb mus no ib hnub). Peb tau txais ntsuab raj ua hauj lwm zoo nkauj sai sai, tab sis peb tsis tau txais txoj kev luam ntawv mus ua hauj lwm. Nws cia "khib luam ntawv". Peb yuav ua RJ11 connector, switching tso thiab ncaj. Peb yuav rho tawm qhov chaw nres nkoj thiab rov tsim nyob rau hauv Unix. Peb mus txog arduous ua hauj lwm ntau rau nws piav rau peb lub koob configuration ntawm lub tshuab luam ntawv, yeej tsis yeej paub hais tias yog nws tug ua nws thwj.

Nws yog hais txog lub sij hawm mus nyob, txhua yam nyob rau hauv Baltimore no humming, tab sis peb tsis tau txoj kev luam ntawv cursed NJ ua hauj lwm! Peb twb sab lim tag nrho possibilities tsuas yog tsav ze NJ rov qab mus ua hauj lwm rau lub tshuab luam ntawv nyob hauv cov neeg. Yuav tsum tsis txhob tsav tsheb tas li, peb thaum kawg nug nws fax rau peb li cas nws yuav txais thaum nws "khib", hoping uas tej zaum yuav muaj ib co clue nyob ntawd tej khoom uas yuav hais rau peb paub peb nyob nraum ua dab tsi lawm.

Thaum peb tau txais tus fax mus, peb tam sim ntawd paub zoo. Saib, peb txoj kev tshuaj ntsuam seb peb muaj configured ib lub tshuab luam ntawv thwj kom txog "lp ib tug" hais kom ua li no:

lp/yam/passwd

Yeej, peb sau seb cov ntawv lo lus zais unix. Nws yog ib txwm tam sim no thiab ntawm lub thawv, Nco ntsoov cia ib sab. Koj txheem Unix lo lus zais cia zoo li tej yam zoo li no:

Smith:*:100:100:8A-74(chaw):/tsev/smith:/usr/rau hauv/sh qhua:*:200:0::/tsev/qhua:/usr/rau hauv/sh  

Peb yuav tsum tau luam ntawv seb cov ntawv lo lus zais tsiv rau ob peb vasthiv thiab nws tau luam ntawv kom raug. Txawm li cas los, rau cov neeg siv tag, yog "khib luam ntawv".

</kawg>

Tau lwm Network peev xwm sib tw rau tej qhov teeb meem thiab kua

Kuv cov neeg nyuam qhuav ntsia ib tug dais los magic Juniper tias thaj hloov cov qub Cisco network load balancer (NLB). Saib txog tib lub sijhawm, peb ntsia ib hotfix nyob rau ib qhov teeb meem workflow.

Ib hnub los yog ob tug tom qab, peb pom ib qho teeb meem thaum peb accessed tus kws kho mob sib pab (SSP). Peb yuav tau mus, tab sis peb yuav muab coj los sib tw rau ib tug neeg tus ID thiab lo lus zais ntau zaus nyob ib sab. Qhov no tsis tshwm sim muaj lub ntsiab portal app, tsis coj hab txhawb. Lawm, Peb tsis paub tias ntawm ob (Juniper los yog hotfix) yuav muab qhov no, ho kuv xav paub tias qhov hotfix, koj khom lub tsheb peb twb tsis ntsia nws kuj yog.

Nws muab tias Juniper muaj tej yam qhov compression. Yog ib tus robed cov nuj nqis nyob hauv lub network pab muab ntawd teev. Solved peb qho teeb meem uas.

Qhov no yuav tsis tau tus thawj thawj zaug compression lawm hauv paus ua kom muaj ib qho teeb meem SharePoint rau kuv. IIS compression adversely cuam tshuam ib tug koob thib 3 yog tus neeg uas los ntawm cov neeg zoo thaum teev koom xwm nqa rau IE 6 browsers (IE 7 browsers ua haujlwm tsis nyuaj).

Li ntawd, ntxiv "compression" yuav tsis muaj daim ntawv.

</kawg>

Rov los: http://www.elfwood.com/art/s/h/sherry/death_colour.jpg.html

Ntawv cim npe Technorati: ,

Xav txog kev hloov Blogging Platform

Kuv pib kuv "blogging haujlwm" siv Microsoft lub platform thiab nws twb tau kuv zoo. Nws yog ib qho yooj yim uas tswg, muaj cov kev xaiv uas zoo thiab widgets rau koj tswj koj "txaus", cov kua dlej cov qhov web thiab li ntawd.

Txawm li cas los, Kuv yeej cia li poob rau hauv cov kua MS uas tsis npaj. Ntawd ib leeg hais lus rau kuv ntsuam xyuas kuv nyob qhov twg thiab qhov twg kuv yuav, saib raws ib lub platform blogging. Tseem muaj ob qho tseem ceeb cov kev txwv uas looj koov kuv yog tam sim no vis-à-vis qhov rais nyob tej qhov chaw.

Ua ntej, Kuv tsis tau txheeb cais zoo heev. Muaj cov stats, tiam sis qhov kev nthuav dav yog feem ntau truncated thiab tsis nyob rau hauv ib txoj kev uas ua rau kev tsom xam seb. Muaj cov muaj peev xwm ua tsis muaj sorting los yog export. Kuv muab ntau blog tswv yim raws li hom lus neeg nrhiav (los tseem tsis paub) thaum lawv mus nrhiav kuv blog. Koj yuav tsis siv tej lub neej rau cov uas.

Thib ob, muaj tsis kom zoo yuav muaj mechanism rau "monetize" ib lub tsev chaw nyob blog. qhov tseeb, yuav kom nroj MS tawm (uas kuv neeg tsis muaj nyiaj), Kuv yuav tsum tau them Microsoft. (Tsawg, yog li kuv nkag siab hais tias; Kuv kuj teb hais los no thiab nug ib yam li nws tsis tau mus).

Tam sim no uas twb tau txais ib qho qauv tsim thiab txheej blogging tsis tau, Kuv xav ntsuam xyuas lwm txoj kev thiab. Kuv tau ua tej kev tshawb fawb thiab muaj ntau ntau txoj hau kev, tab sis, kuv yuav ua li cas lwm tus neeg mas, yog raug lwm tus hauv zos SharePoint (bloggers los nyeem), nyiam siv.

Yog hais tias cov ntawv no nyiaj koj thiab tus neeg uas koj tau ib lub tswvyim los yeej tsis kam qhia koj kev, thov cia ib tug saib los email kuv ncaj qha mus.

Tsaug!

<kawg />

Ntawv cim npe Technorati:

SharePoint Designer Email xa ???? nyob rau hauv ib lub Email

Rooj sab laj cov neeg puav nug: SharePoint Designer tso vim li cas ???? hauv kuv lub email siv ib daim teb nqi?

Ib vim zoo li no yog vim tus kuj sib txawv thiab uas koj hu thov.

Qhov no yuav tshwm sim vim hais tias koj tseem tabtom reference ib thaj teb los ntawm lub "tam sim no yam" tab sis, cov neeg siv yeej tsis nkag muaj nqis rau hauv qhov kev teb daim ntawv.

<kawg />

Ntawv cim npe Technorati:

Sib piv / Kuaj seb puas muaj hnub tim dawb paug hauv SharePoint Designer Workflow

Scenario: Nyob rau hauv ib lub workflow SharePoint Designer, koj yuav tau xyuas seb ib hnub teb puas yuav dawb paug.

Teeb meem: SPD yuav tsis muaj ib txoj kev ncaj rau muab piv rau hnub rau tej yam uas tsis yog ib hnub. Koj sau tsis tau ib yam mob li no: "Yog hais tias [DateField] siab sib npaug dawb paug".

Kua: Siv lub hnub los ib txoj hlua. Siv hlua sib piv seb puas yog hnub yog dawb paug.

Tshuaj ntsuam kev txhaj tshuaj:

Txhaj tshuaj ntsuam hauv qab no qhia seb yuav ua li cas. Hauv no scenario, teb rau ib yam khoom, Ntawv tso "tej cai:Ua ntej hnub uas ceeb toom cia", yog xa thiab cov workflow fires nyob hauv lub teb.

duab

duab

Sau ntawv:

Thaum kuv sim no, Kuv ceeb tag pleasantly kom paub tias nws ua haujlwm. Kuv muaj kev txhawj xeeb tias SharePoint Designer yuav disallow ALJ hlua (Kuj sib txawv thiab:StringReminderDateDate) tab sis nws tsis pub nws.

Kuv kuj nyob ntawd tas concerned, tus nqi yuav null thiab yog tshuab tuaj rau lub WF ntawm runtime los tsa lub ntiaj teb no kub nyaj 1/2 ib cov degree, tab sis muaj kev txhawj xeeb txog cov unfounded.

</kawg>

Ntawv cim npe Technorati:

Bar yog tseem zoo nkauj siab mus cuag NTXHUAB

Hnub no, Kuv tau nrog ib tug neeg ua hauj lwm thiab piav txog tej khoom yuav hloov tau cov lus nug ib sab web thiab tso saib cov ntaub ntawv los ntawm ib yam txheej ntxiv khoom.

"Ua ntej., configure tus CQWP mus txuas rau cov kev pab cov ntaub ntawv koj, ces koj export nws rau koj workstation, hloov <CommonViewFields>, upload, Tshem daim tseem cia nrog thiab tam sim no nws yog ' luam’ mus tso saib lwm cov txhua. Tom ntej, qhib pem SharePoint designer, next rau lub hauv paus kawm ntawv sau thiab nrhiav ItemStyle.xsl. Luam ib cov templates ua ib pab starting taw tes. Rov qab mus los thiab hloov cov CQWP kom siv cov no tshiab template. Thaum kawg, hloov cov template yuav kav koj thaj teb tshiab! (Tsis txhob hnov qab nws rov qab ua luaj li lwm cov neeg yuav saib tau soj ntsuam xyuas)."

Nws yog qhov tseeb tas heev rau kuv (thiab feem ntau peb tsim tawm txoj kev SharePoint) dab tsi yog yuav mus thiab ua cas nws tseem zoo heev, tiag tiag, tias cov ntaub ntawv nqi sib nrauj tus CQWP no ces zoo-cais los ntawm cov ntaub ntawv sib nrauj kev nthuav qhia. Tab sis npog, nws yuav tsis yooj yim li piav, yog nws?

<kawg />

Ntawv cim npe Technorati: ,

Teeb rooj txheej Query Web site qhov ntsiab hauv ib ib daim phiaj / Lub rooj

Txheej txheem cej luam thiab lub hom phiaj

Mus rau ntawm lub box, NTXHUAB’ Cov lus nug qhov Web Tshooj (CQWP) nws tau qhia nyob rau hauv ib daim ntawv teev hom, zoo li mus nrhiav tau. Nws tseem tau los tso saib qhov txheeb xyuas tau ib daim phiaj hom ntawv (i.e. Hom ntawv rooj HTML). Yog tawm tswv yim daim phiaj rau tej yam zoo. Kuv piav li cas after ntawd nyhuv hauv no Tshooj.

Lag luam Scenario

Kuv tau ua hauj lwm nrog ib tug neeg rau ib tug thoob plaws enterprise NTXHUAB rollout. Peb muaj tsim lawv taxonomy xws tias tej yaam num yog thawj class pej xeem nyob hauv lub hierarchy thiab muaj nyias qhov chaw saum theem. Yog ib qhov tswj khaws ib daim ntawv teev singleton uas yog ib qhov kev qhia, xws li lub npe, nyiaj txiag, cov kev tsim tiav tas hnub, nyiaj ntxiv thiab lwm yam kev teb. Yog "singleton" Kuv yog ib tug kev cai SharePoint sau guaranteed tau muaj cov yam khoom no tsuas muaj ib. Simplistically, nws zoo li no:

duab

Txoj kev mus kom ze yog npaum li cas tau tib yam li koj piav ntawm no (http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!447.entry). Cov CQWP siv ib XSL transform kom emit HTML rau qhov browser mus kav.

Ib txwm kuv envision hom kab mob qhov tshwm sim ua ntej nyiab loj mus rau lub XSL vim XSL yog ib tug npau suav phem. Ntawm no yog kuv yam tshwm sim:

duab

HTML li no generates uas raug:

<html>
 <lub cev>
 <chaw>
 <cov lus ciam teb= 1>

<!-- Hmong-->
 <tr bgcolor= xiav>
 <Td><Font xim= dawb><b>Qhov project Name</b></Font></Td>
 <Td dlhos= txoj cai><Font xim= dawb><b>Sau rau hnub tim</b></Font></Td>
 <Td dlhos= txoj cai><Font xim= dawb><b>Nyiaj txiag</b></Font></Td>
 <Td dlhos= txoj cai><Font xim= dawb><b>Cov nqi</b></Font></Td>
 <Td><Font xim= dawb><b>Zuag qhia tag nrho cov txheej xwm</b></Font></Td>
 </tr>

<tr>
 <Td>Rov wire computer chav.</Td>
 <Td dlhos= txoj cai>02/01/08</Td>
 <Td dlhos= txoj cai>22,500.00</Td>
 <Td dlhos= txoj cai>19,000.00</Td>
 <Td>Dauv</Td>
 </tr>

<tr>
 <Td>Ntaub ntawv servers rau SQL Upgrade</Td>
 <Td dlhos= txoj cai>04/01/08</Td>
 <Td dlhos= txoj cai>7,500.00</Td>
 <Td dlhos= txoj cai>0.00</Td>
 <Td>Los</Td>
 </tr>

</cov lus>
 </chaw>
 </lub cev>
</html>

Mus kom ze

Ua raws li cov kauj ruam yuav tsim tau rau daim phiaj:

  1. Taw rau Cheebtsam ntawm hauv daim phiaj (natwm/txhua).
  2. Txhais kom meej thiab tsim nyog kawm ntawv txhua.
  3. Tsim cov chaw sub rau qhov tej yaam num thiab singleton npe.
  4. Ntxiv ntawm CQWP mus rau ib qhov web page thiab configure mus nrhiav koj lub npe.
  5. Hloov cov CQWP XML sau mus rau txhua yam.
  6. Hloov tus XSL yuav ua tau kom muaj ib lub rooj.

Kuv yuav mloog zoo hauv tus xovtooj rau. Ib ntawm plaub numbers ncaj nraim thiab tej yam uas muaj neeg siv CQWP twb tau. Naj npawb 5 lawm documented zoo los ntawm lwm tus xws li no exhaustive txhaj tshuaj ntsuam laden Tshooj ntawm MSDN ntawm no (http://msdn2.microsoft.com/en-us/library/bb897399.aspx) thiab Heather tus Xatau-ntoos lub blog ntawm no (http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx).

Ceev And Bolts

Pib thiab kev nrhiav ib tug los ntawm as per rau cov ntaub ntawv MSDN thiab Heather tus Xatau-ntoos lub Tshooj tsib.

Thaum no tus taw tes, koj twb ua ntxiv koj CQWP mus rau sab thiab koj muaj koj <CommonViewFields> configured li tsim nyog.

Raws li cov kauj ruam li ib txwm, Kuv txais tau kev kuaj intermediate:

1. Tsim ib cov hom, templatized kev cai sau ntawd cov hom thiab ob qhov chaw. Ntawm no yog cov hom:

duab

Ntawm no yog qhov chaw qauv:

duab

2. Ntxiv rau qhov CQWP tom qab tsim kuv ib qhov subsites thiab singleton yog ib qhov kev npe:

duab

3. Ntxiv tag nrho cov ntxiv kuv xav tau ntawm cov <CommonViewFields>:

        <khoom lub npe="CommonViewFields" hom="hlua">Project_x0020_Name;Project_x0020_Expenses;Project_x0020_Status;Project_x0020_Start_x0020_Date;Project_x0020_End_x0020_Date;Project_x0020_Budget</khoom>

Ceeb toom tias kuv tau ua kom tag nrho cov cuab yeej teb ntawm ib tug kab los nws yuav tsis ua hauj lwm (CQWP xav qhia kuv tias cov lus nug rov qab tsis khoom).

4. Thaum no tus taw tes, mov kom dhau MSDN tsab xov xwm thiab flip ntawm nyob rau tshooj Heather tus Xatau-ntoos lub. Ua raws li nws cov kauj ruam pib ze rau ruam #5 los ua ib customized / unghosted version of ItemStyle.xsl. Kuv ua raws li cov lus qhia txog tus Heather, saum ntawm cov kauj ruam 11 thiab tau kuaj intermediate:

4.1: Kuv tus XSL template npe raws li nram no:

<xsl:Template npe = "daim phiaj" phim = "tshais[@Style = 'Daim phiaj']" hom = "itemstyle">

Kuv yuav ib nyuag kuj hloov nws pom tias <xsl:rau-ib …> yog muab ib <br /> lossis mus muab tov:

    <xsl:rau-ib xaiv="@*">
      P:<xsl:tus nqi-ntawm xaiv="lub npe()" /><br/>
    </xsl:rau-ib>

4.2: Kuv hloov hauv cov qhov Web site, mus zoo li thiab xaiv daim kuv "phiaj" style:

duab

Ntawm no yog cov siv qhov kev hloov thiab kev pab:

duab

Peb pom tau ntawm qhov saum no uas teb peb xav (Peb tes num lub npe, nqi, xwm txheej, yam) yog muaj nyob rau peb siv thaum peb emit cov HTML. Tsis tas li ntawd, peb pom cov npe uas peb yuav tsum reference cov txhua hauv lub XSL. Piv txwv, peb reference Project txheej xwm li "Project_x005F_x0020_Name".

Thaum no tus taw tes, peb ncaim ntawm Heather tus blog thiab ntawm lub lub xub pwg nyom ntawm no giants, Kuv tus kheej lub ntsis ntxiv kuv.

ContentQueryMain.xsl

CEEB TOOM: Thaum muaj kev hloov rau ob ContentQueryMain.xsl li no ItemStyle.xsl, koj yuav tau xyuas cov ntaub ntawv qaum rau ua ntej koj mus ntsib cov nyhuv koj hloov.

Mus rau daim phiaj vaj, NTXHUAB siv ob yam XSL ntaub ntawv los ua cov ntsiab peb pom los ntawm ib tug CQWP. Meskas tus me ntsis dhau los tso zis ntau lawm, peb hloov ItemStyle.xsl. NTXHUAB yeej siv lwm daim ntawv XSL, ContentQueryMain.xsl yuav nyob tau nrog ItemStyle.xsl Meskas cov HTML. Raws li implies lub npe, ContentQueryMain.xsl yog "loj lub" XSL controls qhov txaus zuag qhia tag nrho cov neeg txhais lus. Nws iterates kev los ntawm tag nrho cov kabmob khoom thiab kis tau ib tug los ntawm ib tug mus templates hauv ItemStyle.xsl. Peb mam li hloov ItemStyle.xsl Meskas tus qhib <cov lus> lossis ua ntej emitting rau thawj kab ntawv thiab kaw <cov lus> lossis tom qab emitting rau kab kawg. Yuav ua kom tiav no, ContentQueryMain.xsl hloov mus rau kis ob tug tsis tau rau daim peb "phiaj" Template hauv ItemStyle.xsl, "lub xeem leej" thiab "leej tam sim no". ItemStyle.xsl siv no rau conditionally emit tus cim npe tsim nyog.

Siv cov txheej txheem Heather tus Xatau-ntoos lub, Peb nrhiav ContentQueryMain.xsl. Nws nyob hauv qhov chaw qub li ItemStyle.xsl. Qhov tshuaj ntsuam txhaj yuav pab:

duab

Peb yuav tau ua cov nram qab no hloov:

  • Hloov ib tus xsl template, "CallItemTemplate" uas tau invokes peb daim phiaj template hauv ItemStyle.xsl. Peb yuav kis tau ob tsis mus rau daim phiaj template kom nws yuav muaj cov ntaub ntawv uas nws xav kom neeg conditionally qhib thiab kaw <cov lus> cim npe.
  • Hloov dua me ntsis uas hu ua "CallItemTemplate lub ContentQueryMain.xsl" yuav kis tau "LastRow ib" parameter kom cov LastRow uas tau kis rau peb cov template daim phiaj.

Nrhiav tus template npe hu ua "OuterTemplate.CallItemTemplate" qhia los ntawm cov hlua:

  <xsl:Template lub npe="OuterTemplate.CallItemTemplate">

Tag nrho cov template hloov raws li nram no:

  <xsl:Template lub npe="OuterTemplate.CallItemTemplate">
    <xsl:param lub npe="CurPosition" />

    <!--
      Ntxiv "LastRow cov" parameter.
      Peb tsuas siv cov khoom style pass hauv yog "Daim phiaj".
    -->
    <xsl:param lub npe="LastRow" />

    <xsl:xaiv>
      <xsl:Thauj tw ntsuam xyuas="@Style = 'NewsRollUpItem'">
        <xsl:thov templates xaiv="." hom="itemstyle">
          <xsl:nrog param lub npe="EditMode" xaiv="$cbq_iseditmode" />
        </xsl:thov templates>
      </xsl:Thauj tw>
      <xsl:Thauj tw ntsuam xyuas="@Style = 'NewsBigItem'">
        <xsl:thov templates xaiv="." hom="itemstyle">
          <xsl:nrog param lub npe="CurPos" xaiv="$CurPosition" />
        </xsl:thov templates>
      </xsl:Thauj tw>
      <xsl:Thauj tw ntsuam xyuas="@Style = 'NewsCategoryItem'">
        <xsl:thov templates xaiv="." hom="itemstyle">
          <xsl:nrog param lub npe="CurPos" xaiv="$CurPosition" />
        </xsl:thov templates>
      </xsl:Thauj tw>

      <!--
              Tshaj xav tam sim no thiab cov lastrow rau ntawm daim phiaj itemstyle.xsl template.
              ItemStyle.xsl yuav siv uas emit rau txoj kev qhib thiab kaw <cov lus> cim npe.
      -->
      <xsl:Thauj tw ntsuam xyuas="@Style = 'Daim phiaj'">
        <xsl:thov templates xaiv="." hom="itemstyle">
          <xsl:nrog param lub npe="CurPos" xaiv="$CurPosition" />
          <xsl:nrog param lub npe="Kav" xaiv="$LastRow" />
        </xsl:thov templates>
      </xsl:Thauj tw>

      <xsl:txwv tsis pub>
        <xsl:thov templates xaiv="." hom="itemstyle">
        </xsl:thov templates>
      </xsl:txwv tsis pub>
    </xsl:xaiv>
  </xsl:Template>

Cov lus qhia txog lub hom phiaj ntawm qhov kev hloov.

tau mas, "OuterTemplate.CallItemTemplate cov" nws tus kheej yog hu los ntawm lwm template. Nrhiav tus template ntawm searching rau qhov ntawv txoj hlua:

<xsl:Template lub npe="OuterTemplate.Body">

Scroll los ntawm cov lus qhia nyob rau hauv OuterTemplate.Body thiab cov LastRow parameter ntxig raws li nram no (qhia raws li ib tug saib nyob rau hauv italics):

<xsl:hu-template lub npe="OuterTemplate.CallItemTemplate">
  <xsl:nrog param lub npe="CurPosition" xaiv="$CurPosition" />
  <!-- Ntxig rau LastRow parameter. -->
  <xsl:nrog param lub npe="LastRow" xaiv="$LastRow"/>
</xsl:hu-template>

Tom qab nov tag nrho, peb thaum kawg muaj yam teeb zoo zoo kom peb cov ItemStyle.xsl muaj emit <cov lus> cim npe rau qhov chaw uas koj txoj kev.

ItemStyle.Xsl

CEEB TOOM: Dua, nyob ItemStyle.xsl kos tom qab hloov yam koj pom cov nyhuv uas cov kev pauv.

Peb muaj tus ob tug paub tab ntawm no:

  • Hloov hauv koj daim phiaj template. Koj tau daim ntawv/muab tshuaj txhuam hauv qab no txij.
  • Ntxiv ib co mumbo jumbo sab nraud lub ntsiab template txhais tias enables "formatcurrency" Template mus ua hauj lwm. (Koj yuav qhia tau tias kuv muaj ib cov neeg kov tenuous XSL).

Ua ntej, ze rau saum ItemStyle.xsl, ntxiv cov kab no:

  <!-- Tej mumbo jumbo uas peb tso saib tuaj enables. txiaj. -->
  <xsl:hom zauv lub npe="cov neeg ua haujlwm" ntiv="D" />

  <xsl:Template lub npe="Neej ntawd" phim="*" hom="itemstyle">

Faj seeb txog tias kuv ntxiv tias yuav ua ntej mus ncaj rau <xsl:Template npe = "Default" …> txhais.

Tom ntej, rov qab mus saib peb daim phiaj template. Menyuam mos liab cov daim phiaj template sim cov cai nram qab no. Nws yog muab commented, tab sis tsis txhob yig email rau kuv los sis tawm lus rau kuv blog yog hais tias koj muaj lus nug.

  <xsl:Template lub npe="Daim phiaj" phim="Tshais[@Style = 'Daim phiaj']" hom="itemstyle">

    <!--
      ContentMain.xsl kis tau CurPos thiab xeem.
      Peb siv cov no los conditionally emit rau txoj kev qhib thiab kaw <cov lus> cim npe.
    -->
    <xsl:param lub npe="CurPos" />
    <xsl:param lub npe="Kav" />

    <!-- Cov tsiaj ntawv nram qab no yog los ntawm tus txheem ItemStyle.xsl unmodified -->
    <xsl:kuj sib txawv thiab lub npe="SafeImageUrl">
      <xsl:hu-template lub npe="OuterTemplate.GetSafeStaticUrl">
        <xsl:nrog param lub npe="UrlColumnName" xaiv="'ImageUrl'"/>
      </xsl:hu-template>
    </xsl:kuj sib txawv thiab>
    <xsl:kuj sib txawv thiab lub npe="SafeLinkUrl">
      <xsl:hu-template lub npe="OuterTemplate.GetSafeLink">
        <xsl:nrog param lub npe="UrlColumnName" xaiv="'LinkUrl'"/>
      </xsl:hu-template>
    </xsl:kuj sib txawv thiab>
    <xsl:kuj sib txawv thiab lub npe="DisplayTitle">
      <xsl:hu-template lub npe="OuterTemplate.GetTitle">
        <xsl:nrog param lub npe="Npe" xaiv="@Title"/>
        <xsl:nrog param lub npe="UrlColumnName" xaiv="'LinkUrl'"/>
      </xsl:hu-template>
    </xsl:kuj sib txawv thiab>
    <xsl:kuj sib txawv thiab lub npe="LinkTarget">
      <xsl:Yog hais tias ntsuam xyuas="@OpenInNewWindow = 'Tseeb'" >_blank</xsl:Yog hais tias>
    </xsl:kuj sib txawv thiab>

    <!--
      Ntawm no peb txhais ib kuj sib txawv thiab, "tableStart".  Qhov no muaj cov HTML uas peb siv txhais cov lus qhib cov qhov rooj li no rau cov ntawv qhia kiag.  Nco ntsoov tias CurPos = 1, nws nrog cov HTML rau ib CDATA lossis.
      Txwv tsis pub, nws yuav tau npliag.

      Cov nqi no tableStart no emited txhua zaus ItemStyle hu ua ntawm ContentQueryMain.xsl.
    -->
    <xsl:kuj sib txawv thiab lub npe="tableStart">
      <xsl:Yog hais tias ntsuam xyuas="$CurPos = 1">
        <![CDATA[
        <ciam teb lus = 1>
          <tr bgcolor = "ntsuab">
            <Td><xim Font = "dawb"><b>Qhov project Name</b></Font></Td>
            <Td dlhos = "txoj cai"><xim Font = "dawb"><b>Sau rau hnub tim</b></Font></Td>
            <Td dlhos = "txoj cai"><xim Font = "dawb"><b>Nyiaj txiag</b></Font></Td>
            <Td dlhos = "txoj cai"><xim Font = "dawb"><b>Cov nqi</b></Font></Td>
            <Td><xim Font = "dawb"><b>Zuag qhia tag nrho cov txheej xwm</b></Font></Td>
          </tr>
        ]]>
      </xsl:Yog hais tias>
    </xsl:kuj sib txawv thiab>

    <!--
      Kuj sib txawv thiab lwm, tableEnd cias nyiaj thiab lub sij lub kaw lus lossis.

      Raws li nrog tableStart, Nws yog emited.  Qhov no yog vim li cas nws tus nqi yog raug conditionally based raws li qhov seb peb twb tau mus rau kab kawg ntawm ContentQueryMain.xsl.
    -->
    <xsl:kuj sib txawv thiab lub npe="tableEnd">
      <xsl:Yog hais tias ntsuam xyuas="$CurPos = $Last">
        <![CDATA[ </cov lus> ]]>
      </xsl:Yog hais tias>
    </xsl:kuj sib txawv thiab>

    <!--
      Nco ntsoov emit tus txheem ntawm tableStart.  Yog hais tias qhov no yuav tsis tau rau thawj kab dhau rau peb ntawm ContentQueryMain.xsl, ces peb paub nws tus nqi yuav dawb paug.

      Lov tes taw tso zis ntau escaping vim hais tias thaum twg tableStart nws tsis dawb paug, nws muaj xws li cov HTML uas peb xav tau nws los ntawm qhov browser.  Yog peb tsis txhob hais XSL parser los lov tes taw rau cov zis escaping, nws yuav ua kom muaj khoom xws li"&LT;cov lus&gt;" hloov ntawm"<cov lus>".
    -->
    <xsl:tus nqi-ntawm xaiv="$tableStart" lov tes taw-zis-escaping="yog"/>


    <tr>
      <!--
      P:Project_x005F_x0020_Name P:Project_x005F_x0020_End_x005F_x0020_Date P:Project_x005F_x0020_Budget P:Project_x005F_x0020_Expenses P:Project_x005F_x0020_Status
      -->
      <Td>
        <xsl:tus nqi-ntawm xaiv="@Project_x005F_x0020_Name"/>
      </Td>

      <Td dlhos="txoj cai">
        <xsl:tus nqi-ntawm xaiv="@Project_x005F_x0020_End_x005F_x0020_Date"/>
      </Td>

      <Td dlhos="txoj cai">
        <xsl:hu-template lub npe="formatcurrency">
          <xsl:nrog param lub npe="tus nqi" 
xaiv="@Project_x005F_x0020_Budget"></xsl:nrog param> </xsl:hu-template> </Td> <Td dlhos="txoj cai"> <xsl:hu-template lub npe="formatcurrency"> <xsl:nrog param lub npe="tus nqi" xaiv="@Project_x005F_x0020_Expenses">
</xsl:nrog param> </xsl:hu-template> </Td> <Td> <xsl:tus nqi-ntawm xaiv="@Project_x005F_x0020_Status"/> </Td> <!-- Tag nrho cov nram no yog commented tawm hais yam. Txawm li cas los, coj nws rov qab thiab stuff nws mus ua ib tug <Td> saib cov nyhuv. --> <!-- <div daim id = "linkitem" hoob = "item"> <xsl:Yog tias kuaj = "hlua-ntev($SafeImageUrl) != 0 "> <div hoob = "duab-tsam-laug"> <ib tug href = "{$SafeLinkUrl}" TARGET = "{$LinkTarget}"> <img hoob = "duab-tas-dav" src = "{$SafeImageUrl}"
xwm = "{@ImageUrlAltText}"/> </ib tug> </div> </xsl:Yog hais tias> <chav kawm ntawv div = "txuas yam"> <xsl:hu-template
name="OuterTemplate.CallPresenceStatusIconTemplate"/> <ib tug href = "{$SafeLinkUrl}"
TARGET = "{$LinkTarget}" Title = "{@LinkToolTip}"> <xsl:tus nqi-kev xaiv = "$DisxslyTitle" /> </ib tug> <div hoob = "hauj lwm"> <xsl:tus nqi-cov select="@Description" /> </div> </div> </div>
--> </tr> <!-- Emit kaw table lossis. Yog tias peb tsis nyob rau hnub kab, qhov no yuav ua dawb paug. --> <xsl:tus nqi-ntawm xaiv="$tableEnd" lov tes taw-zis-escaping="yog"/> </xsl:Template> <xsl:Template lub npe="formatcurrency"> <xsl:param lub npe="tus nqi" xaiv="0" /> <xsl:tus nqi-ntawm xaiv='hom ntawv xov tooj($tus nqi, "$DDD,DDD,DDD.HNUB", "ua hauj lwm")' /> </xsl:Template>

Txheem WSS/NTXHUAB ntaub ntawv nkag teb chaws tshaus tsis txhawb Cascading nco-downs (los yog lwm yam tso-los ntawm kev sib txuas lus)

HLOOV TSHIAB (04/2008): No cov poj blog tuaj txog qhia tau hais tias ib tug zoo javascript raws mus kom ze rau qhov teeb meem no: http://webborg.blogspot.com/2008/04/add-functions-and-events-to-sharepoint.html

HLOOV II: (04/2008): Qhov kev nkag blog tig pheej zoo li: http://www.cleverworkarounds.com/2008/03/13/free-mosswss-2007-web-part-hide-controls-via-javascript/

Ob peb zaug ib lub lim tiam, yog tsis yog txhua hnub, cov neeg siv rooj sab laj hais txog tus yuav tsum tau yuav nquag muab yus ntawm cascading nco-downs. Piv txwv, Kuv muaj ntawm lwm yam uas ob tug nco-down:

  • Daim ntawv teev kev tuaj. kas
  • Daim ntawv teev kev tuaj. lub zos.

Raws li cov neeg zov me nyuam lub luag hauj lwm povhwm poob haujlwm, Peb xav kom nws khiav lag luam yog zoo li no:

  • Pov ntawv twg xaiv ib tug tuaj. xeev los ntawm tus nco-down.
  • Qhov no ua rau lub zos nco-down los lim xwb cov zos uas muaj rau xaiv lub xeev.
  • Paul twg xaiv ib lub zos los ntawm daim ntawv uas.

Yog tsis muaj nyiaj them yug tawm-ntawm-tus-lub thawv rau no feature. qhov tseeb, yog tsis muaj nyiaj them yug OOB rau txhua yam kev sib txuas lus ncaj intra-daim ntawv. Qhov no muaj xws li programmatically qho/enabling/disabling teb rau lo lus teb rau daim teb hloov rau hauv daim ntawv sim lwm qhov.

Lub hom phiaj tiag tiag ntawm no Tshooj mus los piav tau lub ntsiab thiab cov no yog cov kev xaiv uas raws li kuv paub xwb:

  1. Tsim ib lub hom kev cai qhia kiag. Raws li tus nchuav-sab-tsim tawm, koj muaj cov tswj lub ntiaj teb "no" Cov ntawd qhia kiag kev cai. Koj yuav siv ib cascading nco-down li ntawd mas.
  2. Xav txog kev siv cov workflow. Tej zaum, koj xav yuav cob muaj nqis mus teb raws li tus nqi lwm teb. Qhov no, koj yuav nquag sim siv tus ncej tag twb, tab sis tej lub sij hawm, nws cia li yuav tsis tau hauj lwm ua. SharePoint Designer workflow yog ib tug kuj khiav hauv lwm txoj rau xa me nyuam rov rau hauv code thiab siv qhov muag saib lub studio. Yog koj mus no lawv, tsum paub txog ntawm qhov teeb meem hais los ntwm cov tshooj no (http://paulgalvin.spaces.live.com/blog/cns!CC1EDB3DAA9B8AA!405.entry).
  3. Tej handlers: Zoo li workflow, qhov no yog ib cov tshuaj tom qab-tus-Disease fact. Koj hem handler yog ib tug los ua ke .NET (C#, VB.NET) rau qhov twg SharePoint kis tswj. Tus kwv koj tsim tau mus saib tau cov ntaub ntawv ntawm lub npe (thiab lub nruas tseem qauv) thiab yuav ua tau tej yam muab xam uas xav kom tau.
  4. Siv SharePoint Designer los ua kev cai nkag teb chaws tuaj. Kuv tsis tau muaj tib neeg kev paub no mus kom ze, but I hear they are doing good things with NewForm.aspx these days 🙂
  5. Dov rau koj tus kheej ASP.NET tej ntaub ntawv nkag teb chaws ua (ua ib stand-alone web page los yog ib cov qhov Web site) thiab siv ntawd xwb.

Yog leej twg paub txog lwm yam thiab zoo xaiv, thov logged thiab kuv mam hloov lub cev no ncej.

<kawg />

Ntawv cim npe Technorati:

Muaj los tsis muaj (kos rau ntawm lub box) filtering rau cov lus nug qhov Web Tshooj

Los lim ib cov lus nug rau tus yog/tsis muaj cov kos lub thawv muaj cai "PG Milestone", configure CQWP li no:

duab

Qhov no yog lwm tus ntawm cov nqe lus nug cuab kev-ib zaug-koj-paub-nws tiamsis hard-to-find-an-answer-to: Yuav ua li cas rau cov lim ntawm tus muaj/tsis muaj kem uas siv rau cov lus nug qhov web qhov kos.

Thawj nrhiav tshwm sim Kuv nrhiav tau siv lub sij hawm nrhiav "lim muaj los tsis muaj cov lus nug qhov web Tshooj" yog lawm ncaj nraim., ces kuv xav tias kuv yuav muab qhov no tso pem thiab pom tau tias nws yuav hloov tau tshwm sim tsis muaj tseeb rau cov raug kev nrhiav tau.

Nws yog ib qho yooj yim heev: Nws muaj tseeb qhov tseem ceeb = "1" thiab tsis muaj tseeb ntawm qhov tseem ceeb tsis tib "1" (zoo nkauj retro, ua tau).

Nyob rau hauv qhov piv txwv li hais saum toj no, Kuv tsim qhov kem ntawm hom ua muaj/tsis" (checkbox)" raug teev hais "PG Milestone". Kuv ntxiv nws rau lub tsev qiv ntawv doc, uploaded ob peb cov ntaub ntawv, laij cov nqi rau ob peb thiab kuaj nws.

<kawg />

Ntawv cim npe Technorati: , ,