Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cd4609d

Browse files
committed
网址块弹窗提示可设置为简介
1 parent af63bc7 commit cd4609d

3 files changed

Lines changed: 74 additions & 46 deletions

File tree

‎inc/frame/config/framework.config.php‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,19 @@
8888
'default' => false,
8989
),
9090
array(
91-
'id' => 'is_qr',
92-
'type' => 'switcher',
93-
'title' => '显示二维码',
94-
'after' => '<br><p>网址块弹窗提示替换为二维码</p>',
95-
'default' => false,
91+
'id' => 'po_prompt',
92+
'type' => 'radio',
93+
'title' => '网址块弹窗提示',
94+
'desc' => '网址块默认的弹窗提示内容',
95+
'default' => 'url',
96+
'class' => 'horizontal',
97+
'options' => array(
98+
'null' => '',
99+
'url' => '链接',
100+
'summary' => '简介',
101+
'qr' => '二维码'
102+
),
103+
'after' => '如果网址添加了自定义二维码,此设置无效',
96104
),
97105
array(
98106
'id' => 'columns',

‎style.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Theme Name:WebStack
33
Theme URI:https://www.iowen.cn
44
Description:by 一为!官方网站:<a href="https://www.iowen.cn">一为忆</a>
5-
Version:1.1227
5+
Version:1.1231
66
Author:iowen
77
Author URI: https://www.iowen.cn/
88
*/

‎templates/site-card.php‎

Lines changed: 60 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,68 @@
11
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
22

3-
<?php
4-
$qrurl = $link_url;
5-
$is_html = '';
6-
if(get_post_meta($post->ID, '_wechat_qr', true)){
7-
$qrurl="<img src='" . get_post_meta(get_the_ID(), '_wechat_qr', true) . "' width='128'>";
8-
$is_html = 'true';
9-
} else if($link_url=="") {
10-
$qrurl = '地址错误!';
11-
} else if(io_get_option('is_qr')) {
12-
$qrurl = "<img src='https://my.tv.sohu.com/user/a/wvideo/getQRCode.do?width=128&height=128&text=" . $link_url . "' width='128'>";
13-
$is_html = 'true';
14-
}
15-
16-
$url = '';
17-
$blank = '_blank';
18-
if(io_get_option('details_page')){
19-
$url=get_permalink();
20-
}else{
3+
<?php
4+
$title = $link_url;
5+
$is_html = '';
6+
$tooltip = 'data-toggle="tooltip" data-placement="bottom"';
7+
if(get_post_meta($post->ID, '_wechat_qr', true)){
8+
$title="<img src='" . get_post_meta(get_the_ID(), '_wechat_qr', true) . "' width='128'>";
9+
$is_html = 'data-html="true"';
10+
} else {
11+
switch(io_get_option('po_prompt')) {
12+
case 'null':
13+
$title = get_the_title();
14+
$tooltip = '';
15+
break;
16+
case 'url':
17+
if($link_url=="")
18+
$title = '地址错误!';
19+
break;
20+
case 'summary':
21+
$title = get_post_meta($post->ID, '_sites_sescribe', true);
22+
break;
23+
case 'qr':
24+
if($link_url=="")
25+
$title = '地址错误!';
26+
else{
27+
$title = "<img src='https://my.tv.sohu.com/user/a/wvideo/getQRCode.do?width=128&height=128&text=" . $link_url . "' width='128'>";
28+
$is_html = 'data-html="true"';
29+
}
30+
break;
31+
default:
32+
}
33+
}
34+
$url = '';
35+
$blank = '_blank';
36+
if(io_get_option('details_page')){
37+
$url=get_permalink();
38+
}else{
2139
if($link_url==""){
22-
$url = 'javascript:';
23-
$blank = '';
40+
$url = 'javascript:';
41+
$blank = '';
2442
}else{
25-
if(io_get_option('is_go'))
26-
$url = '/go/?url='.base64_encode($link_url) ;
27-
else
28-
$url = $link_url;
43+
if(io_get_option('is_go'))
44+
$url = '/go/?url='.base64_encode($link_url) ;
45+
else
46+
$url = $link_url;
2947
}
30-
}
31-
?>
32-
<a href="<?php echo $url ?>" target="<?php echo $blank ?>" class="xe-widget xe-conversations box2 label-info" data-toggle="tooltip" data-placement="bottom" title="" data-html="<?php echo $is_html ?>" data-original-title="<?php echo $qrurl ?>">
48+
}
49+
50+
?>
51+
<a href="<?php echo $url ?>" target="<?php echo $blank ?>" class="xe-widget xe-conversations box2 label-info" <?php echo $tooltip . '' . $is_html ?> title="<?php echo $title ?>">
3352
<div class="xe-comment-entry">
34-
<div class="xe-user-img">
35-
<?php if(io_get_option('lazyload')): ?>
36-
<img class="img-circle lazy" src="<?php echo $default_ico; ?>" data-src="<?php echo get_post_meta($post->ID, '_thumbnail', true)? get_post_meta($post->ID, '_thumbnail', true): (io_get_option('ico_url') .format_url($link_url) . io_get_option('ico_png')) ?>" onerror="javascript:this.src='<?php echo $default_ico; ?>'" width="40">
37-
<?php else: ?>
38-
<img class="img-circle lazy" src="<?php echo get_post_meta($post->ID, '_thumbnail', true)? get_post_meta($post->ID, '_thumbnail', true): (io_get_option('ico_url') .format_url($link_url) . io_get_option('ico_png')) ?>" onerror="javascript:this.src='<?php echo $default_ico; ?>'" width="40">
39-
<?php endif ?>
40-
</div>
41-
<div class="xe-comment">
42-
<div class="xe-user-name overflowClip_1">
43-
<strong><?php the_title() ?></strong>
53+
<div class="xe-user-img">
54+
<?php if(io_get_option('lazyload')): ?>
55+
<img class="img-circle lazy" src="<?php echo $default_ico; ?>" data-src="<?php echo get_post_meta($post->ID, '_thumbnail', true)? get_post_meta($post->ID, '_thumbnail', true): (io_get_option('ico_url') .format_url($link_url) . io_get_option('ico_png')) ?>" onerror="javascript:this.src='<?php echo $default_ico; ?>'" width="40">
56+
<?php else: ?>
57+
<img class="img-circle lazy" src="<?php echo get_post_meta($post->ID, '_thumbnail', true)? get_post_meta($post->ID, '_thumbnail', true): (io_get_option('ico_url') .format_url($link_url) . io_get_option('ico_png')) ?>" onerror="javascript:this.src='<?php echo $default_ico; ?>'" width="40">
58+
<?php endif ?>
59+
</div>
60+
<div class="xe-comment">
61+
<div class="xe-user-name overflowClip_1">
62+
<strong><?php the_title() ?></strong>
63+
</div>
64+
<p class="overflowClip_2"><?php echo get_post_meta($post->ID, '_sites_sescribe', true) ?></p>
4465
</div>
45-
<p class="overflowClip_2"><?php echo get_post_meta($post->ID, '_sites_sescribe', true) ?></p>
46-
</div>
4766
</div>
48-
</a>
67+
</a>
68+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /