Browse Source

use Python 2.4 compatible script; update Smarty templates

pull/578/head
Zach Prezkuta 9 years ago
parent
commit
cd017282e4
19 changed files with 29 additions and 26 deletions
  1. +10
    -6
      mods/friendica-to-smarty-tpl.py
  2. +1
    -1
      view/theme/dispy/smarty3/conversation.tpl
  3. +1
    -1
      view/theme/dispy/smarty3/threaded_conversation.tpl
  4. +1
    -1
      view/theme/dispy/smarty3/wall_thread.tpl
  5. +1
    -1
      view/theme/frost-mobile/smarty3/conversation.tpl
  6. +2
    -2
      view/theme/frost-mobile/smarty3/register.tpl
  7. +1
    -1
      view/theme/frost-mobile/smarty3/threaded_conversation.tpl
  8. +1
    -1
      view/theme/frost-mobile/smarty3/wall_thread.tpl
  9. +0
    -1
      view/theme/frost/smarty3/acl_selector.tpl
  10. +2
    -2
      view/theme/frost/smarty3/register.tpl
  11. +1
    -1
      view/theme/frost/smarty3/threaded_conversation.tpl
  12. +1
    -1
      view/theme/frost/smarty3/wall_thread.tpl
  13. +1
    -1
      view/theme/quattro/smarty3/conversation.tpl
  14. +1
    -1
      view/theme/quattro/smarty3/threaded_conversation.tpl
  15. +1
    -1
      view/theme/quattro/smarty3/wall_thread.tpl
  16. +1
    -1
      view/theme/smoothly/smarty3/wall_thread.tpl
  17. +1
    -1
      view/theme/testbubble/smarty3/wall_thread.tpl
  18. +1
    -1
      view/theme/vier/smarty3/threaded_conversation.tpl
  19. +1
    -1
      view/theme/vier/smarty3/wall_thread.tpl

+ 10
- 6
mods/friendica-to-smarty-tpl.py View File

@ -77,7 +77,7 @@ def fix_element(element):
if parts[first+1][0] == '$':
# This takes care of elements where the filename is a variable, e.g. {{ inc $file }}
element += 'file:' + ldelim + parts[first+1].rstrip('}') + rdelim
element += ldelim + parts[first+1].rstrip('}') + rdelim
else:
# This takes care of elements where the filename is a path, e.g. {{ inc file.tpl }}
element += parts[first+1].rstrip('}')
@ -189,10 +189,14 @@ for a_file in files:
filename = os.path.join(path,a_file)
ext = a_file.split('.')[-1]
if os.path.isfile(filename) and ext == 'tpl':
with open(filename, 'r') as f:
newfilename = os.path.join(outpath,a_file)
with open(newfilename, 'w') as outf:
print "Converting " + filename + " to " + newfilename
convert(f, outf, php_tpl)
f = open(filename, 'r')
newfilename = os.path.join(outpath,a_file)
outf = open(newfilename, 'w')
print "Converting " + filename + " to " + newfilename
convert(f, outf, php_tpl)
outf.close()
f.close()

+ 1
- 1
view/theme/dispy/smarty3/conversation.tpl View File

@ -11,7 +11,7 @@
{{/if}}
{{if $item.comment_lastcollapsed}}</div>{{/if}}
{{include file="file:{{$item.template}}"}}
{{include file="{{$item.template}}"}}
{{/foreach}}


+ 1
- 1
view/theme/dispy/smarty3/threaded_conversation.tpl View File

@ -1,7 +1,7 @@
{{$live_update}}
{{foreach $threads as $thread}}
{{include file="file:{{$thread.template}}" item=$thread}}
{{include file="{{$thread.template}}" item=$thread}}
{{/foreach}}
<div id="conversation-end"></div>


+ 1
- 1
view/theme/dispy/smarty3/wall_thread.tpl View File

@ -132,7 +132,7 @@ class="icon recycle wall-item-share-buttons" title="{{$item.vote.share.0}}" onc
<div class="wall-item-outside-wrapper-end {{$item.indent}} {{$item.shiny}}" ></div>
</div>
{{foreach $item.children as $child}}
{{include file="file:{{$child.template}}" item=$child}}
{{include file="{{$child.template}}" item=$child}}
{{/foreach}}
</div>


+ 1
- 1
view/theme/frost-mobile/smarty3/conversation.tpl View File

@ -11,7 +11,7 @@
{{/if}}
{{if $item.comment_lastcollapsed}}</div>{{/if}}
{{include file="file:{{$item.template}}"}}
{{include file="{{$item.template}}"}}
{{/foreach}}


+ 2
- 2
view/theme/frost-mobile/smarty3/register.tpl View File

@ -11,9 +11,9 @@
<p id="register-realpeople">{{$realpeople}}</p>
<br />
{{if $oidlabel }}
{{if $oidlabel}}
<div id="register-openid-wrapper" >
<label for="register-openid" id="label-register-openid" >{{$oidlabel}}</label><input type="text" maxlength="60" size="32" name="openid_url" class="openid" id="register-openid" value="{{$openid}}" >
<label for="register-openid" id="label-register-openid" >{{$oidlabel}}</label><input type="text" maxlength="60" size="32" name="openid_url" class="openid" id="register-openid" value="{{$openid}}" >
</div>
<div id="register-openid-end" ></div>
{{/if}}


+ 1
- 1
view/theme/frost-mobile/smarty3/threaded_conversation.tpl View File

@ -1,7 +1,7 @@
{{$live_update}}
{{foreach $threads as $thread}}
{{include file="file:{{$thread.template}}" item=$thread}}
{{include file="{{$thread.template}}" item=$thread}}
{{/foreach}}
<div id="conversation-end"></div>


+ 1
- 1
view/theme/frost-mobile/smarty3/wall_thread.tpl View File

@ -113,7 +113,7 @@
<!--<div class="wall-item-outside-wrapper-end {{$item.indent}}" ></div>-->
<!--</div>-->
{{foreach $item.children as $child}}
{{include file="file:{{$child.template}}" item=$child}}
{{include file="{{$child.template}}" item=$child}}
{{/foreach}}
{{if $item.flatten}}


+ 0
- 1
view/theme/frost/smarty3/acl_selector.tpl View File

@ -9,7 +9,6 @@
</div>
<div class="acl-list-item" rel="acl-template" style="display:none">
<img data-src="{0}"><p>{1}</p>
<a href="#" class='acl-button-show'>{{$show}}</a>
<a href="#" class='acl-button-hide'>{{$hide}}</a>
</div>


+ 2
- 2
view/theme/frost/smarty3/register.tpl View File

@ -11,9 +11,9 @@
<p id="register-realpeople">{{$realpeople}}</p>
<br />
{{if $oidlabel }}
{{if $oidlabel}}
<div id="register-openid-wrapper" >
<label for="register-openid" id="label-register-openid" >{{$oidlabel}}</label><input type="text" maxlength="60" size="32" name="openid_url" class="openid" id="register-openid" value="{{$openid}}" >
<label for="register-openid" id="label-register-openid" >{{$oidlabel}}</label><input type="text" maxlength="60" size="32" name="openid_url" class="openid" id="register-openid" value="{{$openid}}" >
</div>
<div id="register-openid-end" ></div>
{{/if}}


+ 1
- 1
view/theme/frost/smarty3/threaded_conversation.tpl View File

@ -13,7 +13,7 @@
{{$live_update}}
{{foreach $threads as $thread}}
{{include file="file:{{$thread.template}}" item=$thread}}
{{include file="{{$thread.template}}" item=$thread}}
{{/foreach}}
<div id="conversation-end"></div>


+ 1
- 1
view/theme/frost/smarty3/wall_thread.tpl View File

@ -112,7 +112,7 @@
<!--<div class="wall-item-outside-wrapper-end {{$item.indent}}" ></div>-->
<!--</div>-->
{{foreach $item.children as $child}}
{{include file="file:{{$child.template}}" item=$child}}
{{include file="{{$child.template}}" item=$child}}
{{/foreach}}
{{if $item.flatten}}


+ 1
- 1
view/theme/quattro/smarty3/conversation.tpl View File

@ -17,7 +17,7 @@
{{if $item.type == tag}}
{{include file="wall_item_tag.tpl"}}
{{else}}
{{include file="file:{{$item.template}}"}}
{{include file="{{$item.template}}"}}
{{/if}}
{{/foreach}}


+ 1
- 1
view/theme/quattro/smarty3/threaded_conversation.tpl View File

@ -8,7 +8,7 @@
{{if $thread.type == tag}}
{{include file="wall_item_tag.tpl" item=$thread}}
{{else}}
{{include file="file:{{$thread.template}}" item=$thread}}
{{include file="{{$thread.template}}" item=$thread}}
{{/if}}
</div>


+ 1
- 1
view/theme/quattro/smarty3/wall_thread.tpl View File

@ -149,7 +149,7 @@
{{if $child.type == tag}}
{{include file="wall_item_tag.tpl" item=$child}}
{{else}}
{{include file="file:{{$item.template}}" item=$child}}
{{include file="{{$item.template}}" item=$child}}
{{/if}}
{{/foreach}}


+ 1
- 1
view/theme/smoothly/smarty3/wall_thread.tpl View File

@ -148,7 +148,7 @@
<div class="wall-item-outside-wrapper-end {{$item.indent}} {{$item.shiny}}" ></div>
{{foreach $item.children as $child}}
{{include file="file:{{$child.template}}" item=$child}}
{{include file="{{$child.template}}" item=$child}}
{{/foreach}}
{{if $item.flatten}}


+ 1
- 1
view/theme/testbubble/smarty3/wall_thread.tpl View File

@ -95,7 +95,7 @@
<div class="wall-item-outside-wrapper-end {{$item.indent}} {{$item.shiny}}" ></div>
{{foreach $item.children as $child}}
{{include file="file:{{$child.template}}" item=$child}}
{{include file="{{$child.template}}" item=$child}}
{{/foreach}}
{{if $item.flatten}}


+ 1
- 1
view/theme/vier/smarty3/threaded_conversation.tpl View File

@ -8,7 +8,7 @@
{{if $thread.type == tag}}
{{include file="wall_item_tag.tpl" item=$thread}}
{{else}}
{{include file="file:{{$thread.template}}" item=$thread}}
{{include file="{{$thread.template}}" item=$thread}}
{{/if}}
</div>


+ 1
- 1
view/theme/vier/smarty3/wall_thread.tpl View File

@ -150,7 +150,7 @@
{{if $item.type == tag}}
{{include file="wall_item_tag.tpl" item=$child}}
{{else}}
{{include file="file:{{$item.template}}" item=$child}}
{{include file="{{$item.template}}" item=$child}}
{{/if}}
{{/foreach}}


Loading…
Cancel
Save