*/
if(!isset($this->page['htmlhead']))
$this->page['htmlhead'] = '';
- $tpl = get_markup_template('head.tpl');
// If we're using Smarty, then doing replace_macros() will replace
// any unrecognized variables with a blank string. Since we delay
else
$stylesheet = '$stylesheet';
+ $tpl = get_markup_template('head.tpl');
$this->page['htmlhead'] = replace_macros($tpl,array(
'$baseurl' => $this->get_baseurl(), // FIXME for z_path!!!!
'$local_user' => local_user(),
}
- $tpl = get_markup_template('profile_vcard.tpl');
-
$p = array();
foreach($profile as $k => $v) {
$k = str_replace('-','_',$k);
if($a->theme['template_engine'] === 'internal')
$location = template_escape($location);
+ $tpl = get_markup_template('profile_vcard.tpl');
$o .= replace_macros($tpl, array(
'$profile' => $p,
'$connect' => $connect,
if($root !== '' && $root[strlen($root)-1] !== '/')
$root = $root . '/';
- if(file_exists($root . "view/theme/$theme/$filename"))
- $template_file = $root . "view/theme/$theme/$filename";
- elseif (x($a->theme_info,"extends") && file_exists($root . "view/theme/".$a->theme_info["extends"]."/$filename"))
- $template_file = $root . "view/theme/".$a->theme_info["extends"]."/$filename";
+ if(file_exists("{$root}view/theme/$theme/$filename"))
+ $template_file = "{$root}view/theme/$theme/$filename";
+ elseif (x($a->theme_info,"extends") && file_exists("{$root}view/theme/{$a->theme_info["extends"]}/$filename"))
+ $template_file = "{$root}view/theme/{$a->theme_info["extends"]}/$filename";
else
- $template_file = $root . "view/$filename";
+ $template_file = "{$root}view/$filename";
return $template_file;
}}
function display_init(&$a) {
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
- notice( t('Public access denied.') . EOL);
- killme();
return;
}
function display_content(&$a, $update = 0) {
+ if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
+ notice( t('Public access denied.') . EOL);
+ return;
+ }
+
require_once("include/bbcode.php");
require_once('include/security.php');
require_once('include/conversation.php');
}
}
+ $context['$groupeditor'] = $groupeditor;
$context['$desc'] = t('Click on a contact to add or remove.');
if($change) {
- $context['$groupeditor'] = $groupeditor;
$tpl = get_markup_template('groupeditor.tpl');
echo replace_macros($tpl, $context);
killme();
}
- $context['$groupedit_info'] = $groupeditor;
return replace_macros($tpl, $context);
}
'$to' => t('To:'),
'$showinputs' => '',
'$subject' => t('Subject:'),
- '$subjtxt' => template_escape($message['title']),
+ '$subjtxt' => $subjtxt_e,
'$readonly' => ' readonly="readonly" style="background: #BBBBBB;" ',
'$yourmessage' => t('Your message:'),
'$text' => '',
nav_set_selected('profiles');
if(! local_user()) {
- notice( t('Permission denied.') . EOL);
- killme();
return;
}
function profiles_content(&$a) {
+ if(! local_user()) {
+ notice( t('Permission denied.') . EOL);
+ return;
+ }
+
$o = '';
if(($a->argc > 1) && (intval($a->argv[1]))) {
return false;
}
- if($a->theme['template_engine'] === 'smarty3') {
- $template_file = get_template_file($a, 'smarty3/' . $this->available_templates[$name]);
- }
- else {
- $template_file = $this->available_templates[$name];
- }
- $this->template = $template_file;
+ $this->template = $this->available_templates[$name];
}
/**
$tabs
-{{ for $contacts as $c }}
- {{ inc contact_template.tpl with $contact=$c }}{{ endinc }}
+{{ for $contacts as $contact }}
+ {{ inc contact_template.tpl }}{{ endinc }}
{{ endfor }}
<div id="contact-edit-end"></div>
</div>
-{{ if $groupedit_info }}
+{{ if $groupeditor }}
<div id="group-update-wrapper">
- {{ inc groupeditor.tpl with $groupeditor=$groupedit_info }}{{ endinc }}
+ {{ inc groupeditor.tpl }}{{ endinc }}
</div>
{{ endif }}
{{ if $desc }}<div id="group-edit-desc">$desc</div>{{ endif }}
-{{ for $mails as $mail_item }}
- {{ inc mail_conv.tpl with $mail=$mail_item }}{{endinc}}
+{{ for $mails as $mail }}
+ {{ inc mail_conv.tpl }}{{endinc}}
{{ endfor }}
{{ if $canreply }}
<h1>$header</h1>
-{{ for $contacts as $c }}
- {{ inc contact_template.tpl with $contact=$c }}{{ endinc }}
+{{ for $contacts as $contact }}
+ {{ inc contact_template.tpl }}{{ endinc }}
{{ endfor }}
<div id="contact-edit-end"></div>
{{ endif }}
<div class="photos">
-{{ for $photos as $ph }}
- {{ inc photo_top.tpl with $photo=$ph }}{{ endinc }}
+{{ for $photos as $photo }}
+ {{ inc photo_top.tpl }}{{ endinc }}
{{ endfor }}
</div>
<div class="photos-end"></div>
{{ if $response.totalResults }}
-{{ for $response.entry as $ent }}
-{{ inc poco_entry_xml.tpl with $entry=$ent }}{{ endinc }}
+{{ for $response.entry as $entry }}
+{{ inc poco_entry_xml.tpl }}{{ endinc }}
{{ endfor }}
{{ else }}
<entry></entry>
{{$tabs}}
-{{foreach $contacts as $c}}
- {{include file="contact_template.tpl" contact=$c}}
+{{foreach $contacts as $contact}}
+ {{include file="contact_template.tpl"}}
{{/foreach}}
<div id="contact-edit-end"></div>
</div>
-{{if $groupedit_info}}
+{{if $groupeditor}}
<div id="group-update-wrapper">
- {{include file="groupeditor.tpl" groupeditor=$groupedit_info}}
+ {{include file="groupeditor.tpl"}}
</div>
{{/if}}
{{if $desc}}<div id="group-edit-desc">{{$desc}}</div>{{/if}}
*
*}}
-{{foreach $mails as $mail_item}}
- {{include file="mail_conv.tpl" mail=$mail_item}}
+{{foreach $mails as $mail}}
+ {{include file="mail_conv.tpl"}}
{{/foreach}}
{{if $canreply}}
*}}
<h1>{{$header}}</h1>
-{{foreach $contacts as $c}}
- {{include file="contact_template.tpl" contact=$c}}
+{{foreach $contacts as $contact}}
+ {{include file="contact_template.tpl"}}
{{/foreach}}
<div id="contact-edit-end"></div>
{{/if}}
<div class="photos">
-{{foreach $photos as $ph}}
- {{include file="photo_top.tpl" photo=$ph}}
+{{foreach $photos as $photo}}
+ {{include file="photo_top.tpl"}}
{{/foreach}}
</div>
<div class="photos-end"></div>
{{if $response.totalResults}}
-{{foreach $response.entry as $ent}}
-{{include file="poco_entry_xml.tpl" entry=$ent}}
+{{foreach $response.entry as $entry}}
+{{include file="poco_entry_xml.tpl"}}
{{/foreach}}
{{else}}
<entry></entry>
*}}
<h3>{{$title}}</h3>
-{{foreach $contacts as $c}}
- {{include file="contact_template.tpl" contact=$c}}
+{{foreach $contacts as $contact}}
+ {{include file="contact_template.tpl"}}
{{/foreach}}
<div id="view-contact-end"></div>
<a href="message/dropconv/$thread_id" onclick="return confirmDelete();" title="$delete" class="mail-delete icon s22 delete"></a>
</div>
-{{ for $mails as $mail_item }}
+{{ for $mails as $mail }}
<div id="tread-wrapper-$mail_item.id" class="tread-wrapper">
- {{ inc mail_conv.tpl with $mail=$mail_item }}{{endinc}}
+ {{ inc mail_conv.tpl }}{{endinc}}
</div>
{{ endfor }}
<a href="message/dropconv/{{$thread_id}}" onclick="return confirmDelete();" title="{{$delete}}" class="mail-delete icon s22 delete"></a>
</div>
-{{foreach $mails as $mail_item}}
+{{foreach $mails as $mail}}
<div id="tread-wrapper-{{$mail_item.id}}" class="tread-wrapper">
- {{include file="mail_conv.tpl" mail=$mail_item}}
+ {{include file="mail_conv.tpl"}}
</div>
{{/foreach}}
<div id="contacts-display-wrapper">
-{{ for $contacts as $c }}
- {{ inc contact_template.tpl with $contact=$c }}{{ endinc }}
+{{ for $contacts as $contact }}
+ {{ inc contact_template.tpl }}{{ endinc }}
{{ endfor }}
</div>
<div id="contact-edit-end"></div>
<div id="contacts-display-wrapper">
-{{foreach $contacts as $c}}
- {{include file="contact_template.tpl" contact=$c}}
+{{foreach $contacts as $contact}}
+ {{include file="contact_template.tpl"}}
{{/foreach}}
</div>
<div id="contact-edit-end"></div>
<div id="contacts-display-wrapper">
-{{ for $contacts as $c }}
- {{ inc contact_template.tpl with $contact=$c }}{{ endinc }}
+{{ for $contacts as $contact }}
+ {{ inc contact_template.tpl }}{{ endinc }}
{{ endfor }}
</div>
<div id="contact-edit-end"></div>
<div id="contacts-display-wrapper">
-{{foreach $contacts as $c}}
- {{include file="contact_template.tpl" contact=$c}}
+{{foreach $contacts as $contact}}
+ {{include file="contact_template.tpl"}}
{{/foreach}}
</div>
<div id="contact-edit-end"></div>
<a href="message/dropconv/$thread_id" onclick="return confirmDelete();" title="$delete" class="mail-delete icon s22 delete"></a>
</div>
-{{ for $mails as $mail_item }}
+{{ for $mails as $mail }}
<div id="tread-wrapper-$mail_item.id" class="tread-wrapper">
- {{ inc mail_conv.tpl with $mail=$mail_item }}{{endinc}}
+ {{ inc mail_conv.tpl }}{{endinc}}
</div>
{{ endfor }}
<a href="message/dropconv/{{$thread_id}}" onclick="return confirmDelete();" title="{{$delete}}" class="mail-delete icon s22 delete"></a>
</div>
-{{foreach $mails as $mail_item}}
+{{foreach $mails as $mail}}
<div id="tread-wrapper-{{$mail_item.id}}" class="tread-wrapper">
- {{include file="mail_conv.tpl" mail=$mail_item}}
+ {{include file="mail_conv.tpl"}}
</div>
{{/foreach}}
<h3>$title</h3>
-{{ for $contacts as $c }}
- {{ inc contact_template.tpl with $contact=$c }}{{ endinc }}
+{{ for $contacts as $contact }}
+ {{ inc contact_template.tpl }}{{ endinc }}
{{ endfor }}
<div id="view-contact-end"></div>