增加ah,ch,gh作者名字添加链接

master
黄文强@HWQ-PC 12 months ago
parent 6fd63be9f8
commit 427158c92c

@ -1747,6 +1747,7 @@ class Information extends CI_Controller
if (!empty($author)) {
$data_H1['author'] = $author->OPI_FirstName;
$data['OPI_Code'] = $author->OPI_Code;
} else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
if (!empty($author_web)) {
@ -2110,6 +2111,7 @@ class Information extends CI_Controller
$author = $this->Operator_model->get_author_nikename($information->ic_author);
if (!empty($author)) {
$data['author'] = $author->OPI_FirstName;
$data['OPI_Code'] = $author->OPI_Code;
} else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
if (!empty($author_web)) {

@ -12,9 +12,36 @@
</div>
<div class="infotoptitle">
<h1 class="whitefont"><?php echo !empty($information->ic_title)?$information->ic_title:'H1 title asiahighlights mobile first template'; ?></h1>
<?php if (!empty($meta_news_createdate)) {?>
<div class="authorupdate">By <strong><?php echo !empty($author)?$author:''; ?></strong>Updated <?php echo date("M. j, Y",strtotime($meta_news_createdate)); ?></div>
<?php } ?>
<?php
$OPI_CodeUrls = [
'zzy' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
'2' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
'HWT' => 'https://www.globalhighlights.com/aboutus/team/mike-he',
'CA' => 'https://www.globalhighlights.com/aboutus/team/carol-wang',
'SI' => 'https://www.globalhighlights.com/aboutus/team/simon-huang',
'TJQ' => 'https://www.globalhighlights.com/aboutus/team/cindy-tang',
'CLA' => 'https://www.globalhighlights.com/aboutus/team/claire-wang',
'Albee' => 'https://www.globalhighlights.com/aboutus/team/albee-ning',
'KM' => 'https://www.globalhighlights.com/aboutus/team/kimi-huang',
'RY' => 'https://www.globalhighlights.com/aboutus/team/rita-yu',
'QMY' => 'https://www.globalhighlights.com/aboutus/team/chris-quan',
'CY' => 'https://www.globalhighlights.com/aboutus/team/cynthia-li',
'Vicky' => 'https://www.globalhighlights.com/aboutus/team/vicky-leng',
'LXW' => 'https://www.globalhighlights.com/aboutus/team/carper-li',
'zzyGH' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
];
if (!empty($meta_news_createdate)) {?>
<div class="authorupdate">
Written by
<?php if (array_key_exists($OPI_Code, $OPI_CodeUrls)) {?>
<strong><a href="<?php echo $OPI_CodeUrls[$OPI_Code]; ?>" target="_blank"><?php echo $author; ?></a></strong>
<?php } else { ?>
<strong><?php echo $author; ?></strong>
<?php }?>
Updated <?php echo date("M. j, Y", strtotime($meta_news_createdate)); ?>
</div>
<?php } ?>
</div>
</div>
</div>

@ -11,40 +11,22 @@
<h1><?php echo !empty($ic_title)?$ic_title:'H1 title Chinahighlights mobile first template'; ?></h1>
<!--<p class="subheadline">to do</p> -->
<?php
$authorUrls = [
'周珍燕' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
'Ruru Zhou' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
'周珍燕(GH)' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
'何万堂' => 'https://www.globalhighlights.com/aboutus/team/mike-he',
'Mike Ho' => 'https://www.globalhighlights.com/aboutus/team/mike-he',
'王雅琴' => 'https://www.globalhighlights.com/aboutus/team/carol-wang',
'Carol Wang' => 'https://www.globalhighlights.com/aboutus/team/carol-wang',
'黄荔军' => 'https://www.globalhighlights.com/aboutus/team/simon-huang',
'Simon Huang' => 'https://www.globalhighlights.com/aboutus/team/simon-huang',
'杨新玲' => 'https://www.globalhighlights.com/aboutus/team/coco-yang',
'Coco Yang' => 'https://www.globalhighlights.com/aboutus/team/coco-yang',
'唐基秋' => 'https://www.globalhighlights.com/aboutus/team/cindy-tang',
'Cindy Tang' => 'https://www.globalhighlights.com/aboutus/team/cindy-tang',
'汪靖' => 'https://www.globalhighlights.com/aboutus/team/claire-wang',
'Claire Wang' => 'https://www.globalhighlights.com/aboutus/team/claire-wang',
'宁艳(AH)' => 'https://www.globalhighlights.com/aboutus/team/albee-ning',
'Albee Ning' => 'https://www.globalhighlights.com/aboutus/team/albee-ning',
'黄新捷' => 'https://www.globalhighlights.com/aboutus/team/kimi-huang',
'Kimi Huang' => 'https://www.globalhighlights.com/aboutus/team/kimi-huang',
'喻鹏鲜' => 'https://www.globalhighlights.com/aboutus/team/rita-yu',
'Rita Yu' => 'https://www.globalhighlights.com/aboutus/team/rita-yu',
'全梦媛' => 'https://www.globalhighlights.com/aboutus/team/chris-quan',
'Chris Quan' => 'https://www.globalhighlights.com/aboutus/team/chris-quan',
'李欣' => 'https://www.globalhighlights.com/aboutus/team/cynthia-li',
'Cynthia Li' => 'https://www.globalhighlights.com/aboutus/team/cynthia-li',
'冷静' => 'https://www.globalhighlights.com/aboutus/team/vicky-leng',
'Vicky Leng' => 'https://www.globalhighlights.com/aboutus/team/vicky-leng',
'李晓伟' => 'https://www.globalhighlights.com/aboutus/team/carper-li',
'Carper Li' => 'https://www.globalhighlights.com/aboutus/team/carper-li',
];
$OPI_CodeUrls = [
$OPI_CodeUrls = [
'zzy' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
'2' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou'
'2' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
'HWT' => 'https://www.globalhighlights.com/aboutus/team/mike-he',
'CA' => 'https://www.globalhighlights.com/aboutus/team/carol-wang',
'SI' => 'https://www.globalhighlights.com/aboutus/team/simon-huang',
'TJQ' => 'https://www.globalhighlights.com/aboutus/team/cindy-tang',
'CLA' => 'https://www.globalhighlights.com/aboutus/team/claire-wang',
'Albee' => 'https://www.globalhighlights.com/aboutus/team/albee-ning',
'KM' => 'https://www.globalhighlights.com/aboutus/team/kimi-huang',
'RY' => 'https://www.globalhighlights.com/aboutus/team/rita-yu',
'QMY' => 'https://www.globalhighlights.com/aboutus/team/chris-quan',
'CY' => 'https://www.globalhighlights.com/aboutus/team/cynthia-li',
'Vicky' => 'https://www.globalhighlights.com/aboutus/team/vicky-leng',
'LXW' => 'https://www.globalhighlights.com/aboutus/team/carper-li',
'zzyGH' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
];
if (!empty($meta_news_createdate)) {?>
<div class="authorupdate">

@ -9,9 +9,37 @@
</div>
<div class="topinfo">
<h1><?php echo !empty($ic_title)?$ic_title:'H1 title Chinahighlights mobile first template'; ?></h1>
<?php if (!empty($meta_news_createdate)) {?>
<div class="author_info">By <em><?php echo !empty($author)?$author:''; ?></em> | Updated <?php echo date("M. j, Y",strtotime($meta_news_createdate)); ?></div>
<?php } ?>
<<?php
$OPI_CodeUrls = [
'zzy' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
'2' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
'HWT' => 'https://www.globalhighlights.com/aboutus/team/mike-he',
'CA' => 'https://www.globalhighlights.com/aboutus/team/carol-wang',
'SI' => 'https://www.globalhighlights.com/aboutus/team/simon-huang',
'TJQ' => 'https://www.globalhighlights.com/aboutus/team/cindy-tang',
'CLA' => 'https://www.globalhighlights.com/aboutus/team/claire-wang',
'Albee' => 'https://www.globalhighlights.com/aboutus/team/albee-ning',
'KM' => 'https://www.globalhighlights.com/aboutus/team/kimi-huang',
'RY' => 'https://www.globalhighlights.com/aboutus/team/rita-yu',
'QMY' => 'https://www.globalhighlights.com/aboutus/team/chris-quan',
'CY' => 'https://www.globalhighlights.com/aboutus/team/cynthia-li',
'Vicky' => 'https://www.globalhighlights.com/aboutus/team/vicky-leng',
'LXW' => 'https://www.globalhighlights.com/aboutus/team/carper-li',
'zzyGH' => 'https://www.globalhighlights.com/aboutus/team/ruru-zhou',
];
if (!empty($meta_news_createdate)) {?>
<div class="authorupdate">
Written by
<?php if (array_key_exists($OPI_Code, $OPI_CodeUrls)) {?>
<strong><a href="<?php echo $OPI_CodeUrls[$OPI_Code]; ?>" target="_blank"><?php echo $author; ?></a></strong>
<?php } else { ?>
<strong><?php echo $author; ?></strong>
<?php }?>
Updated <?php echo date("M. j, Y", strtotime($meta_news_createdate)); ?>
</div>
<?php } ?>
</div>
</div>
</div>

Loading…
Cancel
Save