]> git.mxchange.org Git - friendica.git/commitdiff
remove more dashes in templates
authorZach Prezkuta <fermion@gmx.com>
Thu, 27 Dec 2012 16:38:42 +0000 (09:38 -0700)
committerZach Prezkuta <fermion@gmx.com>
Thu, 27 Dec 2012 16:38:42 +0000 (09:38 -0700)
mod/admin.php
mod/events.php
view/admin_users.tpl
view/event.tpl
view/events.tpl
view/smarty3/admin_users.tpl
view/smarty3/event.tpl
view/smarty3/events.tpl
view/theme/diabook/admin_users.tpl
view/theme/diabook/smarty3/admin_users.tpl

index 0381fcf4cc136d53e9509abd2261fb84023678e0..89363541ca8154a2c8223f32d1e0ea2dc9542378 100644 (file)
@@ -710,6 +710,16 @@ function admin_page_users(&$a){
        $users = array_map("_setup_users", $users);
        
        
+       // Get rid of dashes in key names, Smarty3 can't handle them
+       foreach($users as $key => $user) {
+               $new_user = array();
+               foreach($user as $k => $v) {
+                       $k = str_replace('-','_',$k);
+                       $new_user[$k] = $v;
+               }
+               $users[$key] = $new_user;
+       }
+
        $t = get_markup_template("admin_users.tpl");
        $o = replace_macros($t, array(
                // strings //
index 527e1ec3fdec8e71ff268e07e63539e7543d9f1e..61f16b50fc75dcd1ea9381f0f731bdeb3b76f3d2 100755 (executable)
@@ -341,6 +341,17 @@ function events_content(&$a) {
 //                             $tpl = get_markup_template("events.tpl");
 //                     }
                }
+
+               // Get rid of dashes in key names, Smarty3 can't handle them
+               foreach($events as $key => $event) {
+                       $event_item = array();
+                       foreach($event['item'] as $k => $v) {
+                               $k = str_replace('-','_',$k);
+                               $event_item[$k] = $v;
+                       }
+                       $events[$key]['item'] = $event_item;
+               }
+
                $o = replace_macros($tpl, array(
                        '$baseurl'      => $a->get_baseurl(),
                        '$tabs'         => $tabs,
index c9ab0e3f73d19f4fbd55d71431c1569cd8710649..781d538bb7caad688048921b1b0d45f2cab5b89c 100644 (file)
@@ -70,7 +70,7 @@
                                                <td class='register_date'>$u.register_date</td>
                                                <td class='login_date'>$u.login_date</td>
                                                <td class='lastitem_date'>$u.lastitem_date</td>
-                                               <td class='login_date'>$u.page-flags {{ if $u.is_admin }}($siteadmin){{ endif }}</td>
+                                               <td class='login_date'>$u.page_flags {{ if $u.is_admin }}($siteadmin){{ endif }}</td>
                                                <td class="checkbox"> 
                                     {{ if $u.is_admin }}
                                         &nbsp;
index ac9f889ecf9cd2b6f8d487e526fb96e859efcde9..1f71289b3a3583cd2f9a0e746ef845afe68e0772 100644 (file)
@@ -1,7 +1,7 @@
 {{ for $events as $event }}
        <div class="event">
        
-       {{ if $event.item.author-name }}<a href="$event.item.author-link" ><img src="$event.item.author-avatar" height="32" width="32" />$event.item.author-name</a>{{ endif }}
+       {{ if $event.item.author_name }}<a href="$event.item.author_link" ><img src="$event.item.author_avatar" height="32" width="32" />$event.item.author_name</a>{{ endif }}
        $event.html
        {{ if $event.item.plink }}<a href="$event.plink.0" title="$event.plink.1" target="external-link" class="plink-event-link icon s22 remote-link"></a>{{ endif }}
        {{ if $event.edit }}<a href="$event.edit.0" title="$event.edit.1" class="edit-event-link icon s22 pencil"></a>{{ endif }}
index 5a9787de36632520b6696e9d839247d363028911..be7dc2fb2d68c4d6ae5b834dd70d2d4d8423ed1b 100644 (file)
@@ -14,7 +14,7 @@ $tabs
 {{ for $events as $event }}
        <div class="event">
        {{ if $event.is_first }}<hr /><a name="link-$event.j" ><div class="event-list-date">$event.d</div></a>{{ endif }}
-       {{ if $event.item.author-name }}<a href="$event.item.author-link" ><img src="$event.item.author-avatar" height="32" width="32" />$event.item.author-name</a>{{ endif }}
+       {{ if $event.item.author_name }}<a href="$event.item.author_link" ><img src="$event.item.author_avatar" height="32" width="32" />$event.item.author_name</a>{{ endif }}
        $event.html
        {{ if $event.item.plink }}<a href="$event.plink.0" title="$event.plink.1" target="external-link" class="plink-event-link icon s22 remote-link"></a>{{ endif }}
        {{ if $event.edit }}<a href="$event.edit.0" title="$event.edit.1" class="edit-event-link icon s22 pencil"></a>{{ endif }}
index 987ab4bccf586725c718405d3ee018674b8e46ac..5658fc7e54bb75482bc1c406337bc605196065e5 100644 (file)
@@ -70,7 +70,7 @@
                                                <td class='register_date'>{{$u.register_date}}</td>
                                                <td class='login_date'>{{$u.login_date}}</td>
                                                <td class='lastitem_date'>{{$u.lastitem_date}}</td>
-                                               <td class='login_date'>{{$u.page-flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}}</td>
+                                               <td class='login_date'>{{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}}</td>
                                                <td class="checkbox"> 
                                     {{if $u.is_admin}}
                                         &nbsp;
index c8570cef29f81dccbb84d28f794e70c21f696c84..2a0868d25ed75b81c675ef03a7718c1eebd70284 100644 (file)
@@ -1,7 +1,7 @@
 {{foreach $events as $event}}
        <div class="event">
        
-       {{if $event.item.author-name}}<a href="{{$event.item.author-link}}" ><img src="{{$event.item.author-avatar}}" height="32" width="32" />{{$event.item.author-name}}</a>{{/if}}
+       {{if $event.item.author_name}}<a href="{{$event.item.author_link}}" ><img src="{{$event.item.author_avatar}}" height="32" width="32" />{{$event.item.author_name}}</a>{{/if}}
        {{$event.html}}
        {{if $event.item.plink}}<a href="{{$event.plink.0}}" title="{{$event.plink.1}}" target="external-link" class="plink-event-link icon s22 remote-link"></a>{{/if}}
        {{if $event.edit}}<a href="{{$event.edit.0}}" title="{{$event.edit.1}}" class="edit-event-link icon s22 pencil"></a>{{/if}}
index 0d20b0a72c2eec0c14d0e18037069d0580ac25b8..50a8cf3a86600c2cc91bfd410322a4eced6143f0 100644 (file)
@@ -14,7 +14,7 @@
 {{foreach $events as $event}}
        <div class="event">
        {{if $event.is_first}}<hr /><a name="link-{{$event.j}}" ><div class="event-list-date">{{$event.d}}</div></a>{{/if}}
-       {{if $event.item.author-name}}<a href="{{$event.item.author-link}}" ><img src="{{$event.item.author-avatar}}" height="32" width="32" />{{$event.item.author-name}}</a>{{/if}}
+       {{if $event.item.author_name}}<a href="{{$event.item.author_link}}" ><img src="{{$event.item.author_avatar}}" height="32" width="32" />{{$event.item.author_name}}</a>{{/if}}
        {{$event.html}}
        {{if $event.item.plink}}<a href="{{$event.plink.0}}" title="{{$event.plink.1}}" target="external-link" class="plink-event-link icon s22 remote-link"></a>{{/if}}
        {{if $event.edit}}<a href="{{$event.edit.0}}" title="{{$event.edit.1}}" class="edit-event-link icon s22 pencil"></a>{{/if}}
index 8aabb51ec9931bc694fdaf5098e6128ee516a6e5..609fd5ad2a76a36b4ad848597d2f5ae4b3c1c20b 100644 (file)
@@ -69,7 +69,7 @@
                                                <td class='register_date'>$u.register_date</td>
                                                <td class='login_date'>$u.login_date</td>
                                                <td class='lastitem_date'>$u.lastitem_date</td>
-                                               <td class='login_date'>$u.page-flags</td>
+                                               <td class='login_date'>$u.page_flags</td>
                                                <td class="checkbox"><input type="checkbox" class="users_ckbx" id="id_user_$u.uid" name="user[]" value="$u.uid"/></td>
                                                <td class="tools" style="width:60px;">
                                                        <a href="$baseurl/admin/users/block/$u.uid?t=$form_security_token" title='{{ if $u.blocked }}$unblock{{ else }}$block{{ endif }}'><span class='icon block {{ if $u.blocked==0 }}dim{{ endif }}'></span></a>
index 67a079a08fcbc31d99b4093847a8bc69b196f933..1bc1949b8b7e7c2e8f204f90acddab0353b2f2e7 100644 (file)
@@ -69,7 +69,7 @@
                                                <td class='register_date'>{{$u.register_date}}</td>
                                                <td class='login_date'>{{$u.login_date}}</td>
                                                <td class='lastitem_date'>{{$u.lastitem_date}}</td>
-                                               <td class='login_date'>{{$u.page-flags}}</td>
+                                               <td class='login_date'>{{$u.page_flags}}</td>
                                                <td class="checkbox"><input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/></td>
                                                <td class="tools" style="width:60px;">
                                                        <a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" title='{{if $u.blocked}}{{$unblock}}{{else}}{{$block}}{{/if}}'><span class='icon block {{if $u.blocked==0}}dim{{/if}}'></span></a>