Skip to content

Commit 2bfaab1

Browse files
committed
CodeIgniter-Blog v2.3.0 The title of the article is optimized to facilitate SEO
1 parent 4a53ef8 commit 2bfaab1

9 files changed

Lines changed: 14 additions & 10 deletions

File tree

application/controllers/admin/Admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,4 +391,4 @@ public function update_tweets($id)
391391
redirect('admin/admin/login');
392392
}
393393
}
394-
}
394+
}

application/models/Admin_model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,4 +258,4 @@ public function update_tweets($id)
258258
return $this->db->update('tweets', $data);
259259
}
260260
}
261-
}
261+
}

application/models/Home_model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ function search($keyword)
7777
$data = $this->db->from('article')->like('title', $keyword)->or_like('content', $keyword)->get();
7878
return $data->result();
7979
}
80-
}
80+
}

application/views/admin/register.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<input type="submit" name="submit" value="Sign up"/>
2323

2424
<label class="redirect">
25-
<a href="<?php echo base_url('admin/admin/login');?>">Already have an account? Click to log in!</a>
25+
<a href="<?php echo base_url('admin/admin/login');?>">Already have an account? Click to login!</a>
2626
</label>
2727

2828
<p class="change_link" style="text-align: center"></p>
@@ -43,4 +43,4 @@
4343
</ul>
4444
</div>
4545
</body>
46-
</html>
46+
</html>

application/views/admin/reply.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@
4242
</ul>
4343
</div>
4444
</body>
45-
</html>
45+
</html>

application/views/admin/success.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
<?php endforeach;}?>
1212
</div>
1313
</div><!-- .row -->
14-
</div><!-- .container -->
14+
</div><!-- .container -->

application/views/home.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@
7474
<span class="left author">Nova</span>
7575
<span class="left sj">时间:<?php echo $row->date;?></span>
7676
<span class="left fl">分类:<?php echo $row->type;?></span>
77-
<span class="left yd"><?php echo anchor('home/article/'.$row->id,'阅读原文','class="ReadMore"')?></span>
77+
<span class="left yd">
78+
<?php echo anchor('home/article/' . $row->id .'-'. str_replace(' ', '-', $row->title),'阅读原文','class="ReadMore"')?>
79+
</span>
7880
<div class="clear"></div>
7981
</p>
8082
</dd>

application/views/learn.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@
5757
<span class="left author">Nova</span>
5858
<span class="left sj">时间:<?php echo $row['date'];?></span>
5959
<span class="left fl">分类:<?php echo $row['type'];?></span>
60-
<span class="left yd"><?php echo anchor('home/article/'.$row['id'],'阅读全文','class="ReadMore"')?></span>
60+
<span class="left yd">
61+
<?php echo anchor('home/article/' . $row['id'] .'-'. str_replace(' ', '-', $row['title']),'阅读全文','class="ReadMore"')?>
62+
</span>
6163
<div class="clear"></div>
6264
</p>
6365
</dd>

application/views/message.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@
4242
</ul>
4343
</div>
4444
</body>
45-
</html>
45+
</html>

0 commit comments

Comments
 (0)