[PHPBB] Tạo alt hình ảnh cho bài viết phpbb - Tối ưu hóa SEO

Hình đại diện của thành viên
#1 08/07/2013 21:39
Open /viewtopic.php and find:

Mã:
// If we've got a hightlight set pass it on to pagination.
$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($highlight_match) ? "&hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start);


After, add:
Mã:
/*** 2012-03-19 BEGIN AmigoJack
Use topic title as IMG ALT attribute value ***/
$sImageLang= $user-> lang['IMAGE'];  // Store original value
$user-> lang['IMAGE']= htmlentities( $topic_data['topic_title'], ENT_COMPAT, 'UTF-8' );  // Set new
/*** 2012-03-19 END ***/


Find:
Mã:
unset($rowset, $user_cache);


After, add:
Mã:
/*** 2012-03-19 BEGIN AmigoJack
Use topic title as IMG ALT attribute value ***/
$user-> lang['IMAGE']= $sImageLang;  // Restore
/*** 2012-03-19 END ***/
(Firefox 22.0)
PM|Trích|Like|Sửa|Xóa|Báo cáo|Cảnh cáo
_______________
Diễn đàn chia sẻ kiến thức máy tính:
KETNOI123.COM

Ấn hiện ra để xem chữ ký của mình:

Trả lời nhanh

Chủ đề tương tự
Ai đang trực tuyến?