1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ///////////////////// 설정부분 ///////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// $site_name = "치즈의 사이트" ; // 사이트 이름을 적어주세요 (예 : 치즈의 사이트) $site_hellow = "치즈의 사이트에 방문해주셔셔 감사합니다." ; // 페이지 재목을 알 수 없을때 타이틀에 표시할 내용을 적어주세요 (예 : 치즈의 사이트에 방문해주셔셔 감사합니다.) $deport_key = "치즈,도치즈,프로그래머,일상" ; // 이곳에 사이트의 키워드를 적어주세요. (예 : 치즈, 도치즈, 프로그래머 등등) $capy_right = "Copyright © Dochis. All rights reserved." ; // 이사이트의 카피라이트를 적어주세요. $capy_rghter = "DOCHIS" ; // 이사이트의 소유자를 적어주세요. $site_description = "도치즈의 개인홈페이지입니다. 안녕하세요^^" ; // 이사이트의 내용, 소개글같은거 적어주시면됩니다. ///// sns 관련 $facebook_appid = "" ; // 페이스북 앱 아이디가 있으시면 적어주세요 $sns_icon_img = "" ; // 트위터, 페이스북에 공유할떄 사용할 이미지의 주소를 적습니다. 없으면 적지않으셔도됩니다. $metoday_tags = "도치즈넷,도치즈,공지사항" ; // 미투데이로 보내기하실때 사용하실 sns 태그입니다. //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// |
첨부파일을 그누보드의 plugin 폴더에 넣으신 뒤 head.sub.php 파일의 <title> 태그 위에 incluede 해주시면될듯합니다 ㅎㅎㅎ
첨부파일에 설정하는부분이 있는데
4번째줄부터
<title><?php echo $g5_head_title; ?></title>
코드 위에
1 | include_once G5_PLUGIN_URL . "/meta_seo_plugin.php" ; |
첨부파일 전채코드
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | <?php <?php if ( $wr_id && $bo_table ) { $meta_post_cottent = sql_fetch( "select wr_subject, wr_content, wr_name, wr_datetime from g5_write_{$bo_table} where wr_id = '$wr_id' limit 1" ); } ///////////////////// 설정부분 ///////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// $site_name = "치즈의 사이트" ; // 사이트 이름을 적어주세요 (예 : 치즈의 사이트) $site_hellow = "치즈의 사이트에 방문해주셔셔 감사합니다." ; // 페이지 재목을 알 수 없을때 타이틀에 표시할 내용을 적어주세요 (예 : 치즈의 사이트에 방문해주셔셔 감사합니다.) $deport_key = "치즈,도치즈,프로그래머,일상" ; // 이곳에 사이트의 키워드를 적어주세요. (예 : 치즈, 도치즈, 프로그래머 등등) $capy_right = "Copyright © Dochis. All rights reserved." ; // 이사이트의 카피라이트를 적어주세요. $capy_rghter = "DOCHIS" ; // 이사이트의 소유자를 적어주세요. $site_description = "도치즈의 개인홈페이지입니다. 안녕하세요^^" ; // 이사이트의 내용, 소개글같은거 적어주시면됩니다. ///// sns 관련 $facebook_appid = "" ; // 페이스북 앱 아이디가 있으시면 적어주세요 $sns_icon_img = "" ; // 트위터, 페이스북에 공유할떄 사용할 이미지의 주소를 적습니다. 없으면 적지않으셔도됩니다. $metoday_tags = "도치즈넷,도치즈,공지사항" ; // 미투데이로 보내기하실때 사용하실 sns 태그입니다. //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// if ( $meta_post_cottent ) { $view [ 'wr_name' ] = "이 게시물에 대한 모든 저작권은 작성자에게 있습니다. ( 작성자: " . $meta_post_cottent [ 'wr_name' ]. " )" ; // 이곳은 게시물의 카피라이트를 적어주세요. $view [ 'author' ] = $meta_post_cottent [ 'wr_name' ]; // 글쓴이 (게시물의 저작자) $post_key = conv_subject( strip_tags ( $meta_post_cottent [ 'wr_subject' ]. $meta_post_cottent [ 'wr_content' ]),500); $is_meta_author_data = $meta_post_cottent [ 'wr_datetime' ]; } if ( $board [ 'bo_subject' ] || $meta_post_cottent [ 'wr_content' ]) { if (! $meta_post_cottent ) { $view [ 'meta_description' ] = str_replace ( "\r\n" , " " ,conv_subject( $site_name . " > 게시판 > " . $board [ 'bo_subject' ]. " (" . $page . "페이지)" )); } else { $view [ 'meta_description' ] = str_replace ( "\r\n" , " " ,conv_subject( $site_name . " > " . $board [ 'bo_subject' ]. " | " . strip_tags ( $meta_post_cottent [ 'wr_content' ]), 500)); } if ( $wr_id == "0" ) { unset( $wr_id ); } $view [ 'meta_canonical' ] = $site_url . "tb.php/$bo_table/$wr_id" ; // 게시물의 짧은주소 (트래백주소) } $keywords = str_replace ( array ( "\r\n" , "!" , "@" , "#" , "$" , " " ), "," , $deport_key . "," . $post_key ); // 게시물 내용에 특수문자나 개행문자가있으면 콤마로 바꿔 키워드로 인식되게함 $keywords = str_replace ( array ( " " ), "" , $keywords ); // 게시물 내용에 공백있으면 콤마로 바꿔 키워드로 인식되게함 $keywords = array_unique ( explode ( "," , $keywords )); // 모든키워드를 배열화하여 키워드에 중복을 재거함 $keywords = array_filter ( array_map ( 'trim' , $keywords )); // 중복제거 $keywords = implode( "," , $keywords ); // 배열화했던 키워드들을 평문화한다. (문자열화) $g5_head_title = (! $g5_head_title ) ? $site_hellow : $g5_head_title ; $meta_subject = (! $g5_head_title ) ? $site_hellow : $g5_head_title ; $meta_title = (! $g5_head_title ) ? $site_hellow : $g5_head_title ; $meta_copyright = (! $view [ 'wr_name' ]) ? $capy_right : $view [ 'wr_name' ]; $meta_author = (! $view [ 'wr_name' ]) ? $capy_rghter : $view [ 'author' ]; $meta_keywords = $keywords ; $meta_description = (! $view [ 'meta_description' ]) ? $site_description . $deport_key : str_replace ( array ( " " , "\r\n" ), "" , $view [ 'meta_description' ]); $meta_distribution = "Global" ; $meta_canonical = (! $view [ 'meta_canonical' ]) ? 'http://' . $_SERVER [ 'HTTP_HOST' ]. $_SERVER [ 'REQUEST_URI' ] : $view [ 'meta_canonical' ]; ?> <meta http-equiv= "X-UA-Compatible" content= "IE=edge" /> <!-- 검색로봇 --> <meta name= "Location" content= "KR" > <meta name= "subject" content= "<?php echo $meta_subject // 페이지 주재 ?>" /> <meta name= "title" content= "<?php echo $meta_title // 페이지 재목 ?>" /> <meta name= "copyright" content= "<?php echo $meta_copyright // 저작권 ?>" /> <meta name= "author" content= "<?php echo $meta_author // 작성자 ?>" > <meta name= "keywords" content= "<?php echo $meta_keywords // 페이지 키워드 ?>" /> <meta name= "description" content= "<?php echo $meta_description // 페이지 요약설명 ?>" /> <meta name= "distribution" content= "<?php echo $meta_distribution // 배포자 ?>" /> <meta name= "publisher" content= "<?php echo $capy_rghter // 페이지의 공급자 ?>" /> <meta name= "robots" content= "index,follow" /> <link rel= "canonical" href= "<?php echo $meta_canonical ?>" > <?php if ( $is_meta_author_data ) { // 작성일 echo "<meta name='author-date(date)' content='$is_meta_author_data'/>" ; } ?> <!-- 트위터 --> <meta name= "twitter:card" content= "summary" > <meta name= "twitter:title" content= "<?php echo $meta_title // 페이지 재목 ?>" > <meta name= "twitter:site" content= "<?php echo $site_name // 사이트 이름 ?>" > <meta name= "twitter:creator" content= "<?php echo $meta_author // 작성자 ?>" > <meta name= "twitter:image" content= "<?php echo $sns_icon_img // 섬네일 이미지 ?>" > <meta name= "twitter:description" content= "<?php echo $meta_title // 페이지 재목 ?>" > <!-- 페이스북 --> <meta property= "og:title" content= "<?php echo $meta_title // 페이지 재목 ?>" /> <meta property= "og:type" content= "website" /> <meta property= "og:site_name" content= "<?php echo $site_name // 사이트 이름 ?>" /> <meta property= "fb:app_id" content= "<?php echo $facebook_appid // 페이스북 앱 아이디 ?>" /> <meta property= "og:image" content= "<?php echo $sns_icon_img // 섬네일 이미지 ?>" /> <meta property= "og:url" content= "<?php echo $meta_canonical // 페이지 주소 ?>" /> <meta property= "og:description" content= "<?php echo $meta_title // 페이지 재목 ?>" /> <!-- 미투데이 --> <meta property= "me2:post_body" content= "<?php echo $meta_title // 페이지 재목 ?>" /> <meta property= "me2:post_tag" content= "<?php echo $metoday_tags." , ".$meta_canonical ?>" /> <meta property= "me2:image" content= "<?php echo $sns_icon_img // 섬네일 이미지 ?>" /> <!-- Google --> <meta itemprop= "name" content= "<?php echo $meta_title // 페이지 재목 ?>" > <meta itemprop= "description" content= "<?php echo $meta_description // 페이지 요약설명 ?>" > <meta itemprop= "image" content= "<?php echo $sns_icon_img // 섬네일 이미지 ?>" > |