save
This commit is contained in:
parent
488ccd06f3
commit
866f21d4e8
11 changed files with 1079 additions and 2366 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -574,4 +574,28 @@ else:
|
|||
|
||||
file_xml_triple2 = open(directory_to_process + file_xml_triple2_out_content, 'w')
|
||||
file_xml_triple2.write( content_data)
|
||||
file_xml_triple2.close()
|
||||
file_xml_triple2.close()
|
||||
|
||||
if "multi_promotion1" in param:
|
||||
recommend_multi_pro = open(directory_to_process + "/page_catgalog_group_recommend_multi_pro.xml", "r")
|
||||
recommend_multi_pro_buff = recommend_multi_pro.read()
|
||||
|
||||
#read config
|
||||
multi_pro_config_file = open(directory_to_process + "/event/multi_promotion_config1.json")
|
||||
multi_pro_config = json.load(multi_pro_config_file)
|
||||
|
||||
for index, promotion_config in enumerate(multi_pro_config):
|
||||
#load template
|
||||
template_file = open(dictionary_to_process + promotion_config["template"])
|
||||
template = template_file.read()
|
||||
|
||||
for key, value in promotion_config["config"].items():
|
||||
template = template.replace("###"+key, '"' + key_val[1].strip() + '"')
|
||||
|
||||
start_block_index = recommend_multi_pro_buff.find(";block"+(index+1))
|
||||
end_block_index = recommend_multi_pro_buff.find(";endblock"+(index+1))
|
||||
|
||||
promotion_block_str = '\t<Block>\r\n\t\t<State> ### </State> \r\n\t\t<MarginTop> 22 </MarginTop>\r\n\t\t<Width> 484 </Width>\r\n\t\t<Height> 602 </Height>\r\n'
|
||||
|
||||
recommend_multi_pro_buff = recommend_multi_pro_buff[start_block_index+len(";block"+(index+1)):end_block_index+";endblock"+(index+1)]
|
||||
|
||||
30
xml/event/multi_promotion_config1.json
Normal file
30
xml/event/multi_promotion_config1.json
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
[
|
||||
{
|
||||
"name": "lipit",
|
||||
"template": "/event/promotion_video_template.inc",
|
||||
"config": {
|
||||
"normal_eng": "ROOT/taobin_project/image/event/lipit/lipit_en.png",
|
||||
"normal_thai": "ROOT/taobin_project/image/event/lipit/lipit_th.png",
|
||||
"press_eng": "ROOT/taobin_project/image/event/lipit/lipit_en.png",
|
||||
"press_thai": "ROOT/taobin_project/image/event/lipit/lipit_th.png",
|
||||
"disable_eng": "ROOT/taobin_project/image/event/lipit/lipit_en.png",
|
||||
"disable_thai": "ROOT/taobin_project/image/event/lipit/lipit_th.png",
|
||||
"video_eng": "ROOT/taobin_project/image/event/lipit/pro_lipit_en.mp4",
|
||||
"video_thai": "ROOT/taobin_project/image/event/lipit/pro_lipit_th.mp4",
|
||||
"event_on_click": "ROOT/taobin_project/xml/page_catalog_group_pro_lipit.xml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "free_energy_drink",
|
||||
"template": "/event/promotion_template.inc",
|
||||
"config": {
|
||||
"normal_eng": "ROOT/taobin_project/image/event/powerup_free_1/powerup_en.png",
|
||||
"normal_thai": "ROOT/taobin_project/image/event/powerup_free_1/powerup.png",
|
||||
"press_eng": "ROOT/taobin_project/image/event/powerup_free_1/powerup_en.png",
|
||||
"press_thai": "ROOT/taobin_project/image/event/powerup_free_1/powerup.png",
|
||||
"disable_eng": "ROOT/taobin_project/image/event/powerup_free_1/powerup_en.png",
|
||||
"disable_thai": "ROOT/taobin_project/image/event/powerup_free_1/powerup.png",
|
||||
"event_on_click": "ROOT/taobin_project/xml/event/powerup_free_1/page_powerup_bridge.xml"
|
||||
}
|
||||
}
|
||||
]
|
||||
48
xml/event/multi_promotion_template.inc
Normal file
48
xml/event/multi_promotion_template.inc
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<Block>
|
||||
<MarginLeft> 33 </MarginLeft>
|
||||
<MarginTop> 22 </MarginTop>
|
||||
<Width> 484 </Width>
|
||||
<Height> 602 </Height>
|
||||
<State> </State>
|
||||
|
||||
<Button>
|
||||
<State> BigButtonEnable </State>
|
||||
<Filename>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###normal_eng
|
||||
Else
|
||||
Var return = ###normal_th
|
||||
EndIf
|
||||
)
|
||||
</Filename>
|
||||
<FilenamePress>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###normal_eng
|
||||
Else
|
||||
Var return = ###normal_th
|
||||
EndIf
|
||||
)
|
||||
</FilenamePress>
|
||||
<FilenameDisable>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###normal_eng
|
||||
Else
|
||||
Var return = ###normal_th
|
||||
EndIf
|
||||
)
|
||||
</FilenameDisable>
|
||||
<EventOnClick>
|
||||
|
||||
###event_click1
|
||||
|
||||
</EventOnClick>
|
||||
|
||||
|
||||
###video_layout
|
||||
|
||||
</Button>
|
||||
|
||||
</Block>
|
||||
40
xml/event/promotion_template.inc
Normal file
40
xml/event/promotion_template.inc
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
<Button>
|
||||
<X> 42 </X>
|
||||
<Y> 518 </Y>
|
||||
|
||||
<State> BigButtonEnable </State>
|
||||
<Filename>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###normal_eng
|
||||
Else
|
||||
Var return = ###normal_thai
|
||||
EndIf
|
||||
)
|
||||
</Filename>
|
||||
<FilenamePress>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###press_eng
|
||||
Else
|
||||
Var return = ###press_thai
|
||||
EndIf
|
||||
)
|
||||
</FilenamePress>
|
||||
<FilenameDisable>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###disable_eng
|
||||
Else
|
||||
Var return = ###disable_thai
|
||||
EndIf
|
||||
)
|
||||
</FilenameDisable>
|
||||
<EventOnClick>
|
||||
|
||||
Open ###event_on_click
|
||||
|
||||
</EventOnClick>
|
||||
|
||||
</Button>
|
||||
77
xml/event/promotion_video_template.inc
Normal file
77
xml/event/promotion_video_template.inc
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
|
||||
<Button>
|
||||
<X> 42 </X>
|
||||
<Y> 518 </Y>
|
||||
|
||||
<State> BigButtonEnable </State>
|
||||
<Filename>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###normal_eng
|
||||
Else
|
||||
Var return = ###normal_thai
|
||||
EndIf
|
||||
)
|
||||
</Filename>
|
||||
<FilenamePress>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###press_eng
|
||||
Else
|
||||
Var return = ###press_thai
|
||||
EndIf
|
||||
)
|
||||
</FilenamePress>
|
||||
<FilenameDisable>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = ###disable_eng
|
||||
Else
|
||||
Var return = ###disable_thai
|
||||
EndIf
|
||||
)
|
||||
</FilenameDisable>
|
||||
<EventOnClick>
|
||||
|
||||
###event_on_click
|
||||
|
||||
</EventOnClick>
|
||||
|
||||
|
||||
<Video>
|
||||
<X> 42 </X>
|
||||
<Y> 518 </Y>
|
||||
<Width> 484 </Width>
|
||||
<Height> 616 </Height>
|
||||
<Loop> "true" </Loop>
|
||||
<State>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = "Invisible"
|
||||
Else
|
||||
Var return = "Enable"
|
||||
EndIf
|
||||
)
|
||||
</State>
|
||||
<Filename> ###video_th </Filename>
|
||||
</Video>
|
||||
|
||||
<Video>
|
||||
<X> 42 </X>
|
||||
<Y> 518 </Y>
|
||||
<Width> 484 </Width>
|
||||
<Height> 616 </Height>
|
||||
<State>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = "Enable"
|
||||
Else
|
||||
Var return = "Invisible"
|
||||
EndIf
|
||||
)
|
||||
</State>
|
||||
<Loop> "true" </Loop>
|
||||
<Filename> ###video_eng </Filename>
|
||||
</Video>
|
||||
|
||||
</Button>
|
||||
|
|
@ -24,8 +24,8 @@ Else
|
|||
|
||||
|
||||
DEBUGVAR FreeEnergyDrink
|
||||
|
||||
;Var EnableFreeEnergyDrink = "true"
|
||||
Var FreeEnergyDrink = 1
|
||||
Var EnableFreeEnergyDrink = "true"
|
||||
DEBUGVAR EnableFreeEnergyDrink
|
||||
; zone promote
|
||||
If OpenFromPageBoard = 1 Then
|
||||
|
|
|
|||
31
xml/event/video_layout.inc
Normal file
31
xml/event/video_layout.inc
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<Video>
|
||||
<Width> 484 </Width>
|
||||
<Height> 616 </Height>
|
||||
<Loop> "true" </Loop>
|
||||
<State>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = "Enable"
|
||||
Else
|
||||
Var return = "Invisible
|
||||
EndIf
|
||||
)
|
||||
</State>
|
||||
<Filename> ###video_en </Filename>
|
||||
</Video>
|
||||
|
||||
<Video>
|
||||
<Width> 484 </Width>
|
||||
<Height> 616 </Height>
|
||||
<State>
|
||||
eval(
|
||||
If show_eng = "true" Then
|
||||
Var return = "Invisible"
|
||||
Else
|
||||
Var return = "Enable"
|
||||
EndIf
|
||||
)
|
||||
</State>
|
||||
<Loop> "true" </Loop>
|
||||
<Filename> ###video_th </Filename>
|
||||
</Video>
|
||||
Loading…
Add table
Add a link
Reference in a new issue