]> git.mxchange.org Git - friendica.git/commitdiff
use Python 2.4 compatible script; update Smarty templates
authorZach Prezkuta <fermion@gmx.com>
Fri, 11 Jan 2013 05:34:23 +0000 (22:34 -0700)
committerZach Prezkuta <fermion@gmx.com>
Fri, 11 Jan 2013 05:34:23 +0000 (22:34 -0700)
19 files changed:
mods/friendica-to-smarty-tpl.py
view/theme/dispy/smarty3/conversation.tpl
view/theme/dispy/smarty3/threaded_conversation.tpl
view/theme/dispy/smarty3/wall_thread.tpl
view/theme/frost-mobile/smarty3/conversation.tpl
view/theme/frost-mobile/smarty3/register.tpl
view/theme/frost-mobile/smarty3/threaded_conversation.tpl
view/theme/frost-mobile/smarty3/wall_thread.tpl
view/theme/frost/smarty3/acl_selector.tpl
view/theme/frost/smarty3/register.tpl
view/theme/frost/smarty3/threaded_conversation.tpl
view/theme/frost/smarty3/wall_thread.tpl
view/theme/quattro/smarty3/conversation.tpl
view/theme/quattro/smarty3/threaded_conversation.tpl
view/theme/quattro/smarty3/wall_thread.tpl
view/theme/smoothly/smarty3/wall_thread.tpl
view/theme/testbubble/smarty3/wall_thread.tpl
view/theme/vier/smarty3/threaded_conversation.tpl
view/theme/vier/smarty3/wall_thread.tpl

index 6037d04ea21cd3d2ea9ea9f646772a4258b735f4..ff1a102a44de894bde28b5c914df19b602d340c2 100755 (executable)
@@ -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()
 
index 302f7172b59b9e1328c261373362094c70d56ca9..6461955e74fba37efcac730614b7f4263f332653 100644 (file)
@@ -11,7 +11,7 @@
                {{/if}}
                {{if $item.comment_lastcollapsed}}</div>{{/if}}
                
-               {{include file="file:{{$item.template}}"}}
+               {{include file="{{$item.template}}"}}
                
                
        {{/foreach}}
index 367698beeb96df337143df3a69b7302ac2072e0f..fdca3e557464c1494628aa386ecac59999a8523f 100644 (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>
index b0de88e34a15a7ccc70d3e864eceb871d22998c9..a0b818d07085ed791825d3a577e306355bbf12d6 100644 (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>
index aa6bee0ea5a9f7a6b400172c3972298b844d9688..844d9489177738cd3e24d6edd297755f141545b9 100644 (file)
@@ -11,7 +11,7 @@
                {{/if}}
                {{if $item.comment_lastcollapsed}}</div>{{/if}}
                
-               {{include file="file:{{$item.template}}"}}
+               {{include file="{{$item.template}}"}}
                
                
        {{/foreach}}
index bc0ce4cc9c1ae33c11834fa6fff7848ead0fd498..a224721dd1b3d21edea052fe044f51ad7548d52c 100644 (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}}
index 0c96b30e3ebef81563cb9c00b9d9c0c335f20aa1..d5bbf06a6b4b91ef44f9f49bf047a151e90d4e9b 100644 (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>
index e1a0aa868e4bccd68a88e1d2039ce65f212054ef..63597688374653c86320708fb4948500be986e87 100644 (file)
 <!--<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}}
index f3b1abea7ccfb3e9283d454b10ec48aad4128c49..361bf8843a68cf1e76f17790cd94c7c005b3568b 100644 (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>
index 72b628f39d26f86d9fc753e1ca9f234edcdd5416..0f9765063e03b7f0d58a4c080dc2a92a644529cc 100644 (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}}
index 680a201eefd7f3f6fb41071f4d44c53b6804d059..c61de4f53a106ec0f62d52d97d46dcf4b53b0db9 100644 (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>
index a0c576b18bac9cc6ca6f8d04fdecf361cc4eae3b..4b28c218feb203d0cc81e76c71044df243677377 100644 (file)
 <!--<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}}
index f22b11a751f662ad9768465ca1c99ef82ce80ae6..b812d533a3b0f8e49095f19d7ce3ab44edf31d3c 100644 (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}}
index a7516a8a31bc76f7d5434c4b64f12812d69c5260..158c30d6bd086a4d0a506c7ff1747dfdd951b56b 100644 (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>
index 68e6d5d1027f91876b4b0f05f66499c810292539..f6068d330a8bd6ba4cf704d750ca3789603d6c05 100644 (file)
        {{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}}
 
index b0538b9791b027d1539b42924656fa397db418db..2d329e712e5f9ca508f2b910aa6fefaa6e576fc6 100644 (file)
 <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}}
index 8a0150e5b0782f1b6595c3aea45e044d83059f15..82ceb23b985580a01d7b24b1e0f3b95f03cb2ed9 100644 (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}}
index a7516a8a31bc76f7d5434c4b64f12812d69c5260..158c30d6bd086a4d0a506c7ff1747dfdd951b56b 100644 (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>
index 386164f18c3ee5341d58ab2e5d387b27ecee82a7..e2d55113dc026e6046de5a628a936dd71b92b378 100644 (file)
        {{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}}