PluginProbe
Topic SEO Content Optimization Tool / 1.0.8
Topic SEO Content Optimization Tool v1.0.8
1.0.43 1.0.42 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 1.0.25 1.0.3 1.0.31 1.0.32 All 40 releases
topic / templates / briefs.php

briefs.php in Topic SEO Content Optimization Tool 1.0.8, at templates/briefs.php

78 lines 4.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if( ! defined( 'ABSPATH') ) {
3 exit;
4 }
5 /**
6 * Briefs View
7 */
8
9 if($allBriefs){}else{ $allBriefs = $UseTopicApi->getBriefsbyTopicToken($preloginToken); }
10 $allBriefs = json_decode($allBriefs);
11 $utUserMail = get_option('usetopicapi_email');
12
13 ?>
14 <div class="usetopicbriefs hidebig">
15 <div class="sign-in"><p><?php echo __( 'Signed in as', 'usetopic-plugin' ); ?> <?php echo $utUserMail; ?></p>
16 <div class="usetopic_logout">
17 <button class="usetopic_logout_btn">
18 <svg class="MuiSvgIcon-root MuiSvgIcon-colorPrimary" focusable="false" viewBox="0 0 24 24" aria-hidden="true" style="color: rgb(133, 159, 189);"><path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path></svg>
19 <p class="usetopic-tooltip">Logout</p>
20 </button>
21
22 </div>
23 </div>
24 <h3>Search Briefs</h3>
25 <div class="search-usetopic">
26 <svg class="MuiSvgIcon-root MuiSvgIcon-colorPrimary" focusable="false" viewBox="0 0 24 24" aria-hidden="true" style="position: relative; top: 3px; opacity: 0.6;"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></svg>
27 <input type="text" name="search-usetopic" id="search-usetopic" value="" placeholder="Search briefs by keywords" />
28 </div>
29 <h3 class="usetopic_ycb"><?php echo __( 'Your Content Briefs', 'usetopic-plugin' ); ?></h3>
30 <table class="kyword-create">
31 <thead><tr><th><?php echo __( 'Keyword', 'usetopic-plugin' ); ?> </th><th class="create"><?php echo __( 'Created', 'usetopic-plugin' ); ?></th></tr></thead>
32 <tbody id="kyword-create-body">
33 <?php if(!empty($allBriefs->reports)){
34 $reports = $allBriefs->reports;
35 foreach($reports as $singleTopic){
36 /* $now = time(); // or your date as well
37 $your_date = strtotime($singleTopic->created_at);
38 $datediff = $now - $your_date;
39
40 $daysAgo = round($datediff / (60 * 60 * 24)); */
41
42 $topicCdate = date_create(date('Y-m-d H:i:s', strtotime($singleTopic->created_at)));
43 $todayDate = date_create(date('Y-m-d H:i:s', time()));
44 $difference = date_diff($topicCdate,$todayDate);
45 if(!empty($difference)){
46 $diffDate = '';
47 if(!empty( $difference->y ) ){
48 if($difference->y == 1){ $diffDate = $difference->y. ' year ago'; }else{ $diffDate = $difference->y. ' years ago'; }
49 }elseif($difference->m){
50 if($difference->m == 1){ $diffDate = $difference->m. ' month ago'; }else{ $diffDate = $difference->m. ' months ago'; }
51
52 }elseif($difference->d){
53 if($difference->d == 1){ $diffDate = $difference->d. ' day ago'; }else{ $diffDate = $difference->d. ' days ago'; }
54
55 }elseif($difference->h){
56 if($difference->h == 1){ $diffDate = $difference->h. ' hour ago'; }else{ $diffDate = $difference->h. ' hours ago'; }
57
58 }elseif($difference->i){
59 if($difference->i == 1){ $diffDate = $difference->i. ' minute ago'; }else{ $diffDate = $difference->i. ' minutes ago'; }
60
61 }elseif($difference->s){
62 if($difference->s == 1){ $diffDate = $difference->s. ' seconds ago'; }else{ $diffDate = $difference->s. ' seconds ago'; }
63
64 }else{
65 $diffDate = '0 seconds ago';
66 }
67 }else{
68 $diffDate = '0 seconds ago';
69 }
70
71 ?>
72 <tr class="usetopic-brief-tr" data-id="<?php echo $singleTopic->id; ?>" > <td><?php echo $singleTopic->name; ?></td><td><?php echo $diffDate; //if($daysAgo == 0){ echo "Today"; }elseif($daysAgo == 1){ echo $daysAgo.' day ago'; }else{ echo $daysAgo.' days ago'; } ?></td></tr>
73 <?php } } ?>
74 </tbody>
75 </table>
76 <div class="use-topic-top-bar bottom-briefs-bar"><p><a href="https://www.usetopic.com/" target="_blank"><svg width="20" height="20" role="img" aria-hidden="true" focusable="false"><g transform="translate(3.000000,21.000000) scale(0.013,-0.013)"><path d="M904 1621 c-138 -54 -368 -232 -491 -380 -61 -72 -69 -107 -59 -245 l6 -90 -24 33 c-13 18 -30 46 -36 62 -18 43 -28 36 -36 -28 -7 -57 9 -190 24 -205 4 -4 53 59 109 140 93 134 223 303 302 392 17 19 -24 -39 -92 -130 -224 -300 -398 -580 -543 -874 -61 -122 -64 -132 -64 -200 0 -79 11 -111 28 -80 5 11 49 109 97 219 48 110 123 266 168 348 66 121 84 147 103 147 40 0 150 39 190 68 49 36 81 80 62 86 -7 3 -48 8 -92 11 -43 4 -74 11 -70 15 5 5 65 26 134 47 l125 39 63 94 c133 201 212 392 212 512 0 43 -2 48 -22 48 -13 -1 -55 -13 -94 -29z"></path></g></svg><?php echo __( 'Topic', 'usetopic-plugin' ); ?></a><a target="_blank" href="https://wordpress.org/plugins/topic/#developers" style="font-size: 0.6rem;text-decoration: underline;">v1.0.8</a></p><span><a href="https://usetopic.zendesk.com/hc/en-us" target="_blank"><?php echo __( 'HELP', 'usetopic-plugin' ); ?></a></span></div>
77 </div>
78 <div class="smallScreenContent">The Topic plugin only supports browser dimensions of 950px or wider. Please make the browser window wider to continue using plugin.</div>