תבנית:QueryGamesTemplate: הבדלים בין גרסאות בדף
מתוך מכביפדיה
(ביטול גרסה 99009 של Kosh (שיחה))
תגית: ביטול
(ביטול גרסה 99008 של Kosh (שיחה))
תגית: ביטול
שורה 5: שורה 5:
</noinclude><includeonly><!--
</noinclude><includeonly><!--
Define local parameters:
Define local parameters:
                         -->{{#vardefine: SameCompetitions|{{תבנית: המרות/מפעל לרשימת מפעלים מקושרים|מפעל={{{מפעל|}}} }} }}<!--
                         -->{{#vardefine: SameCompetitions|{{המרות/המרות מפעל/מפעל לרשימת מפעלים מקושרים| מפעל={{{Competition|}}} }} }}<!--
                         -->{{#vardefine: SameStadiums|{{תבנית: המרות/מתקן לרשימת מתקנים מקושרים|מתקן={{{מתקן|}}} }} }}<!--
                         -->{{#vardefine: SameStadiums|{{המרות/המרות אצטדיון/אצטדיון לרשימת אצטדיונים מקושרים| אצטדיון={{{Stadium|}}} }} }}<!--
                         -->{{#vardefine: SameOpponents|{{תבנית: המרות/יריבה לרשימת יריבות מקושרות|יריבה={{{יריבה|}}} }} }}<!--
                         -->{{#vardefine: SameOpponents|{{המרות/המרות יריבה/יריבה לרשימת יריבות מקושרות| יריבה={{{Opponent|}}} }} }}<!--
                         -->{{#vardefine: GoalsForMaccabiOperator|{{#בחר:{{{גולים למכבי פעולה|}}}|מתחת ל=<|בדיוק==|מעל ל=> }} }}<!--
                         -->{{#vardefine: GoalsForMaccabiOperator| {{#בחר:{{{MaccabiGoalsAction|}}}|מתחת ל=<|בדיוק==|מעל ל=> }} }}<!--
                         -->{{#vardefine: GoalsForOpponentOperator|{{#בחר:{{{גולים ליריבה פעולה|}}}|מתחת ל=<|בדיוק==|מעל ל=> }} }}<!--
                         -->{{#vardefine: GoalsForOpponentOperator| {{#בחר:{{{OpponentGoalsAction|}}}|מתחת ל=<|בדיוק==|מעל ל=> }} }}<!--
                         -->{{#vardefine: GoalsDiffForMaccabiOperator|{{#בחר:{{{הפרש גולים למכבי פעולה|}}}|מתחת ל=<|בדיוק==|מעל ל=> }} }}<!--
                         -->{{#vardefine: GoalsDiffForMaccabiOperator| {{#בחר:{{{MaccabiGoalsDifferentAction|}}}|מתחת ל=<|בדיוק==|מעל ל=> }} }}<!--
                         -->{{#vardefine: PlayerEvent|{{תבנית: המרות/תיאור אירוע למספר אירוע| אירוע={{{שחקן פעולה|}}} }} }}<!--
                         -->{{#vardefine: PlayerEvent|{{המרות/תיאור אירוע לשליפת משחקים למספר אירוע| אירוע={{{PlayerAction|}}} }} }}<!--
                        -->{{#vardefine: PlayerSubEvent|{{תבנית: המרות/תיאור תת אירוע למספר תת אירוע| תת אירוע={{{PlayerSubAction|}}} }} }}<!--
                        -->{{#vardefine: PlayerEvent2|{{המרות/תיאור אירוע לשליפת משחקים למספר אירוע| אירוע={{{PlayerAction2|}}} }} }}<!--
                        -->{{#vardefine: PlayerSubEvent2|{{תבנית: המרות/תיאור תת אירוע למספר תת אירוע| תת אירוע={{{PlayerSubAction2|}}} }} }}<!--
 
 
We use the hacky way of concating all player related params in order to "turn on" the check for Team=1,
There are some games without any maccabi players, we don't want to avoid querying them if we can avoid it (means we search for the game data and not players data).
-->{{#cargo_query:
-->{{#cargo_query:
tables=Games_Catalog, Opponents_Catalog, Competitions_Catalog, Stadiums_Catalog, Games_Results_Catalog, Game_Events_Catalog
tables=Games_Catalog, Competitions_Catalog, Games_Results, Games_Events, Games_Events=Events2, Days_In_Week, Games_Videos, Football_Games_Uniforms, Opponents, Profiles, Players_Positions
|join on=Games_Catalog.Opponent = Opponents_Catalog.OpponentID
|join on=Games_Catalog.Competition = Competitions_Catalog.CompID
         ,Games_Catalog.Competition = Competitions_Catalog.CompID
        ,Games_Catalog.ResultOpt = Games_Results.ResultType
         ,Games_Catalog.Stadium = Stadiums_Catalog.StadiumID
        ,Games_Catalog._pageID = Games_Events._pageID
         ,Games_Catalog.ResultOpt = Games_Results_Catalog.ResultType
         ,Games_Catalog.MatchDay = Days_In_Week.DayNumber
         ,Games_Catalog.Date=Game_Events_Catalog.Date
         ,Games_Catalog._pageID = Games_Videos._pageID
        ,Games_Events._pageID = Events2._pageID
         ,Games_Catalog._pageID = Football_Games_Uniforms._pageID
         ,Games_Catalog.Opponent = Opponents.OriginalName
        ,Games_Events.PlayerName = Profiles._pageName
        ,Players_Positions.PositionType = Profiles.Position
|where=1=1
|where=1=1
And Game_Events_Catalog.Team = 1
{{#if: {{{Player|}}}{{{PlayerNumber|}}}{{{PlayerAction|}}}{{{PlayerActionMinute|}}}{{{PlayerSubAction|}}}{{{PlayerSubActionMinute|}}}{{{PlayerPosition|}}}| And Games_Events.Team = 1}}
{{#if: {{{מפעל|}}} |  AND Games_Catalog.Competition IN ({{#var: SameCompetitions}}) }}<!-- the "()" around the SameCompetition required for "IN" operator -->
{{#if: {{{Player2|}}}{{{PlayerNumber2|}}}{{{PlayerAction2|}}}{{{PlayerActionMinute2|}}}{{{PlayerSubAction2|}}}{{{PlayerSubActionMinute2|}}}{{{PlayerPosition2|}}}| And Events2.Team = 1}}
{{#if: {{{מתקן|}}} |  AND Games_Catalog.Stadium IN ({{#var: SameStadiums}}) }}<!-- the "()" around the SameStadiums required for "IN" operator -->
 
{{#if: {{{יריבה|}}} |  AND Games_Catalog.Opponent IN ({{#var: SameOpponents}}) }}<!-- the "()" around the SameOpponents required for "IN" operator -->
{{#if: {{{Competition|}}} |  AND Games_Catalog.Competition IN ({{#var: SameCompetitions}}) }}<!-- the "()" around the SameCompetition required for "IN" operator -->
{{#if: {{{מאמן|}}} |  AND Games_Catalog.CoachMaccabi="{{{מאמן}}}" }}
{{#if: {{{Stadium|}}} |  AND Games_Catalog.Stadium IN ({{#var: SameStadiums}}) }}<!-- the "()" around the SameStadiums required for "IN" operator -->
{{#if: {{{מאמן יריבה|}}} |  AND Games_Catalog.CoachOpponent="{{{מאמן יריבה}}}" }}
{{#if: {{{Opponent|}}} |  AND Games_Catalog.Opponent IN ({{#var: SameOpponents}}) }}<!-- the "()" around the SameOpponents required for "IN" operator -->
{{#if: {{{עונה|}}} |  AND Games_Catalog.Season = "{{{עונה}}}" }}
{{#if: {{{OpponentCountry|}}} |  AND Opponents.Country ="{{{OpponentCountry}}}" }}
{{#if: {{{ביתיות|}}} |  AND Games_Catalog.HomeAway = "{{{ביתיות}}}" }}
{{#if: {{{Coach|}}} |  AND Games_Catalog.CoachMaccabi="{{{Coach}}}" }}
{{#if: {{{שופט|}}} |  AND Games_Catalog.Refs = "{{{שופט}}}" }}
{{#if: {{{CoachOpponent|}}} |  AND Games_Catalog.CoachOpponent="{{{CoachOpponent}}}" }}
{{#if: {{{גולים למכבי|}}} |  AND Games_Catalog.ResultMaccabi {{#var: GoalsForMaccabiOperator}} {{{גולים למכבי}}} }}
{{#if: {{{Season|}}} |  AND Games_Catalog.Season = "{{{Season}}}" }}
{{#if: {{{הפרש גולים למכבי|}}} |  AND Games_Catalog.ResultMaccabi - Games_Catalog.ResultOpponent {{#var: GoalsDiffForMaccabiOperator}} {{{הפרש גולים למכבי}}} }}
{{#if: {{{HomeAway|}}} |  AND Games_Catalog.HomeAway = "{{{HomeAway}}}" }}
{{#if: {{{גולים ליריבה|}}} |  AND Games_Catalog.ResultOpponent {{#var: GoalsForOpponentOperator}} {{{גולים ליריבה}}} }}
{{#if: {{{Leg|}}} | {{#ifeq: {{{SimilarLegs|}}}| כן| AND Games_Catalog.Leg LIKE "{{{Leg}}}%" | AND Games_Catalog.Leg = "{{{Leg}}}" }} }}
{{#if: {{{תוצאת משחק|}}} |  AND Games_Results_Catalog.ResultString = "{{{תוצאת משחק}}}" }}
{{#if: {{{Referee|}}} |  AND Games_Catalog.Refs = "{{{Referee}}}" }}
{{#if: {{{שחקן|}}} |  AND Game_Events_Catalog.PlayerName= "{{{שחקן}}}" }}
{{#if: {{{MaccabiGoals|}}} |  AND Games_Catalog.ResultMaccabi {{#var: GoalsForMaccabiOperator}} {{{MaccabiGoals}}} }}
{{#if: {{{שחקן פעולה|}}} | AND Game_Events_Catalog.EventType IN ({{#var: PlayerEvent}}) }}<!--  
{{#if: {{{MaccabiGoalsDifferent|}}} |  AND Games_Catalog.ResultMaccabi - Games_Catalog.ResultOpponent {{#var: GoalsDiffForMaccabiOperator}} {{{MaccabiGoalsDifferent}}} }}
{{#if: {{{OpponentGoals|}}} |  AND Games_Catalog.ResultOpponent {{#var: GoalsForOpponentOperator}} {{{OpponentGoals}}} }}
{{#if: {{{GameResult|}}} |  AND Games_Results.ResultString = "{{{GameResult}}}" }}
{{#if: {{{Uniforms|}}} |  AND Football_Games_Uniforms.KitName = "{{{Uniforms}}}" }}
{{#if: {{{GameDayInWeek|}}} | AND DATE_FORMAT(Games_Catalog.Date, '%w') + 1 = {{{GameDayInWeek}}} }}
 
 
{{#if: {{{Player|}}} |  AND Games_Events.PlayerName= "{{{Player}}}" }}
{{#if: {{{PlayerNumber|}}} |  AND Games_Events.PlayerNumber= {{{PlayerNumber}}} }}
{{#if: {{{PlayerAction|}}} | AND Games_Events.EventType IN ({{#var: PlayerEvent}}) }}
{{#if: {{{PlayerActionMinute|}}} | AND Games_Events.Minute = {{{PlayerActionMinute}}} }}
{{#if: {{{PlayerSubAction|}}} | AND Games_Events.SubType IN ({{#var: PlayerSubEvent}}) }}
{{#if: {{{PlayerSubActionMinute|}}} | AND Games_Events.Minute = {{{PlayerSubActionMinute}}} }}
{{#if: {{{PlayerPosition|}}} | AND Players_Positions.PositionString = {{{PlayerPosition}}} }}
 
{{#if: {{{Player2|}}} |  AND Events2.PlayerName= "{{{Player2}}}" }}
{{#if: {{{PlayerNumber2|}}} |  AND Events2.PlayerNumber= {{{PlayerNumber2}}} }}
{{#if: {{{PlayerAction2|}}} | AND Events2.EventType IN ({{#var: PlayerEvent2}}) }}
{{#if: {{{PlayerActionMinute2|}}} | AND Events2.Minute = {{{PlayerActionMinute2}}} }}
{{#if: {{{PlayerSubAction2|}}} | AND Events2.SubType IN ({{#var: PlayerSubEvent2}}) }}
{{#if: {{{PlayerSubActionMinute2|}}} | AND Events2.Minute = {{{PlayerSubActionMinute2}}} }}
{{#if: {{{PlayerPosition2|}}} | AND Players_Positions.PositionString = {{{PlayerPosition2}}} }}
 
{{#ifeq: {{{PlayersEventsInSameMinute|}}}| כן| AND Events2.Minute = Games_Events.Minute }}
 
 
 
{{#ifeq: {{{FullGame|}}}| רק משחקים עם משחק מלא| AND Games_Videos.FullGame IS NOT NULL}}
{{#ifeq: {{{Highlights|}}}| רק משחקים עם תקציר| AND Games_Videos.Highlights IS NOT NULL}}
 
{{#ifeq: {{{OfficialGames|}}}| רק משחקים רשמיים| AND Games_Catalog.Competition NOT IN (19, 21)}}
{{#ifeq: {{{OfficialGames|}}}| רק משחקים לא רשמיים| AND Games_Catalog.Competition IN (19, 21)}}
 
{{#ifeq: {{{UniformsTag|}}}| משחקים עם תיוג מדים| AND Football_Games_Uniforms.KitName IS NOT NULL}}
{{#ifeq: {{{UniformsTag|}}}| משחקים ללא תיוג מדים| AND Football_Games_Uniforms.KitName IS NULL}}
<!--


Fields to display:
Fields to display:
שורה 40: שורה 87:
           ,Games_Catalog.Date=תאריך
           ,Games_Catalog.Date=תאריך
           ,CONCAT('[[עונת ', Games_Catalog.Season, ']]')=עונה
           ,CONCAT('[[עונת ', Games_Catalog.Season, ']]')=עונה
           ,Competitions_Catalog.Name=מפעל <!-- Cast number to name from Competitions Table -->
           ,CONCAT('[[', Competitions_Catalog.Name, ']]')=מפעל <!-- Cast number to name from Competitions Table -->
           ,Games_Catalog.Leg=שלב במפעל
           ,Games_Catalog.Leg=שלב במפעל
           ,CONCAT('[[', Opponents_Catalog.Name, ']]')=יריבה <!-- Cast number to name from Opponents Table -->
           ,CONCAT('[[', Games_Catalog.Opponent, ']]')=יריבה
           ,Games_Catalog.HomeAway=בית או חוץ
           ,Games_Catalog.HomeAway=בית או חוץ
           ,CONCAT('[[', Stadiums_Catalog.Name, ']]')=מתקן <!-- Cast number to name from Stadiums Table -->
           ,CONCAT('[[', Games_Catalog.Stadium, ']]')=אצטדיון
           ,Games_Catalog.ResultMaccabi=תוצאה למכבי
           ,Games_Catalog.ResultMaccabi=תוצאה למכבי
           ,Games_Catalog.ResultOpponent=תוצאה ליריבה
           ,Games_Catalog.ResultOpponent=תוצאה ליריבה
           ,Games_Results_Catalog.ResultString=תוצאת משחק <!-- Cast number to string from games results table -->
           ,Games_Results.ResultString=תוצאת משחק <!-- Cast number to string from games results table -->
           ,CONCAT('[[', Games_Catalog.CoachMaccabi, ']]')=מאמן מכבי
           ,CONCAT('[[', Games_Catalog.CoachMaccabi, ']]')=מאמן מכבי
           ,CONCAT('[[', Games_Catalog.CoachOpponent, ']]')=מאמן יריבה
           ,Games_Catalog.CoachOpponent=מאמן יריבה
           ,CONCAT('[[', Games_Catalog.Refs, ']]')=שופט
           ,CONCAT('[[שופט:', Games_Catalog.Refs, '|', Games_Catalog.Refs, ']]')=שופט
           ,Crowd=קהל
           ,Crowd=קהל
          ,Days_In_Week.DayString=יום המשחק בשבוע
          ,CONCAT('[', Games_Videos.FullGame,  ' לינק]')=משחק מלא
          ,CONCAT('[', Games_Videos.Highlights, ' לינק]')=תקציר
          ,CONCAT('[[', 'מדי עונת ', Football_Games_Uniforms.Season, '|', Football_Games_Uniforms.KitName, ']]' )=מדים,
|limit=5000
|limit=5000
|format= dynamic table
|format= dynamic table
|rows per page = 100
|rows per page = 100
|group by = Games_Catalog._pageName, Games_Catalog.Date <!-- all fields from "fields=" should be here -->
|group by = Games_Catalog._pageName, Games_Catalog.Date <!-- all fields from "fields=" should be here -->
|order by=Games_Catalog.Date
|order by=Games_Catalog.Date DESC
}}<!--
}}<!--



גרסה מ־18:00, 8 באפריל 2022

לינק לעמוד לחיפוש משחקים

ערכו את הדף כדי לצפות בטקסט התבנית.