게시판 별로 placeholder

게시판 별로 placeholder

QA

게시판 별로 placeholder

답변 2

본문

 


// www/plugin/editor/smarteditor2/editor.lib
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$smarteditor_class\" maxlength=\"65536\" style=\"width:100%;\" placeholder=\"내용을 입력해주세요.\">$content</textarea>";

 

placeholder는 넣은 상태입니다.

각각 게시판 별로 다르게 사용하고싶습니다
방법을 알려주세요!

이 질문에 댓글 쓰기 :

답변 2

1. /extend/user.config.php 에 추가

if ($bo_table == "aa")

  $placeholder = "내용1";

else if ($bo_table == "bb")

  $placeholder = "내용2";

...

 

2. /plugin/editor/smarteditor2/editor.lib.php 



$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$smarteditor_class\" maxlength=\"65536\" style=\"width:100%;\" placeholder=\"{$placeholder}\">$content</textarea>";

if ($bo_table= "basic") {

    $html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$smarteditor_class\"  maxlength=\"65536\" style=\"width:100%;\" placeholder=\"내용을 작성해주세요.\">$content</textarea>";

}

이게 안됐었는데! 안되는이유는... 뭔지 모르겠지만 밑에 방법으로 바꿨습니다 ~!


/plugin/editor/smarteditor2/editor.lib.php


if (stripos($_SERVER["REQUEST_URI"],"bbs/write.php?bo_table=basic") !== false) {

    $html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$smarteditor_class\"  maxlength=\"65536\" style=\"width:100%;\" placeholder=\"내용을 작성해주세요.\">$content</textarea>";

} else if (stripos($_SERVER["PHP_URI"],"index.php") !== false) {

    $html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$smarteditor_class\"  maxlength=\"65536\" style=\"width:100%;\" placeholder=\"글 내용을 작성해주세요.\">$content</textarea>";

}

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 123,725
© SIRSOFT
현재 페이지 제일 처음으로