Browse Source

remove more dashes in templates

tags/3.2
Zach Prezkuta 7 years ago
parent
commit
b6981768ee
10 changed files with 29 additions and 8 deletions
  1. +10
    -0
      mod/admin.php
  2. +11
    -0
      mod/events.php
  3. +1
    -1
      view/admin_users.tpl
  4. +1
    -1
      view/event.tpl
  5. +1
    -1
      view/events.tpl
  6. +1
    -1
      view/smarty3/admin_users.tpl
  7. +1
    -1
      view/smarty3/event.tpl
  8. +1
    -1
      view/smarty3/events.tpl
  9. +1
    -1
      view/theme/diabook/admin_users.tpl
  10. +1
    -1
      view/theme/diabook/smarty3/admin_users.tpl

+ 10
- 0
mod/admin.php View 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 //


+ 11
- 0
mod/events.php View File

@@ -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,


+ 1
- 1
view/admin_users.tpl View 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;


+ 1
- 1
view/event.tpl View 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 }}


+ 1
- 1
view/events.tpl View 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 }}


+ 1
- 1
view/smarty3/admin_users.tpl View 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;


+ 1
- 1
view/smarty3/event.tpl View 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}}


+ 1
- 1
view/smarty3/events.tpl View 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}}


+ 1
- 1
view/theme/diabook/admin_users.tpl View 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>


+ 1
- 1
view/theme/diabook/smarty3/admin_users.tpl View 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>


Loading…
Cancel
Save