Extra Form
CMS Rhymix 2.0

?act=dispMemberLoginForm

이런 페이지 라던지

?act=dispSocialxeInputAddInfo

 

이런 페이지라던지 광고 노출된다고 

정책센터에 알림이 왔습니다.

 

결론적으로 콘텐츠가 없는 페이지 광고 노출은 결고가 뜨네요 

해당 act 들에서 페이지만 구글광고를 제거 할 수 있는 방법이 있을까요?

  • profile
    구글 광고를 어디서 불러오나요?
    결국 해당 광고를 불러오는 곳에서 필요없는 act를 if문같은 것으로 배제시켜서 불러오지 않게 하면 되는 것인데요.
  • profile profile
    레이아웃과 게시판 상하단에서 불러오고 있습니다!!
  • profile

    레이아웃이라면 $act값을 비교해서 적용할수 있습니다.

     

    https://github.com/rhymix/rhymix/blob/master/layouts/xedition/layout.html#L61-L88
    예를들어 xedition 레이아웃은 특정 act에서 강제로 콘텐츠 폭을 고정하고 있는데, 비슷하게 응용할수 있습니다.

     

    {@ $_no_adsense_act = array(
        '광고제거할act1',
        '광고제거할act2',
        '광고제거할act3'
    )}
    
    <block cond="isset($act) && !in_array($act, $_no_adsense_act)">
    광고표시 스크립트 삽입(예.<script src="~~~">
    <block>

     

  • profile profile
    아 !! 이방법으로 광고 넣어봐야겠네요.
    감사합니다.
  • profile profile

    근데 레이아웃에 이걸 넣으니 바로 에러가 발생하네요.
    {@ $_no_adsense_act = array(
    '광고제거할act1',
    '광고제거할act2',
    '광고제거할act3'
    )}

     

    ParseError #0 "syntax error, unexpected '$__Context' (T_VARIABLE)" in files/faceOff/851/099/001/layout.html on line 2

    common/framework/debug.php:681

  • profile profile
    어느 부분에 넣느냐에 따라 오류가 발생할수도 있습니다. 삽입하는 위치 등을 변경해보시거나 해보세요.
  • profile profile
    레이아웃 최상단에 넣었는데 위치를 바꿔봐야겠네요.
  • profile profile
    {@ $_is_indexmodule = ($site_module_info->module_srl === $current_module_info->module_srl)}
    {@ $_body_class = array()}
    {@ $_container_class = array()}
    {@ $_visual_class = array()}
    {@ $_selected_menu = null}
    {@ $_magazine_header = false}
    {@ $_onepage_header = false}
    {@ $sub_header_title = $module_info->browser_title ?? ''}

    근데 주신링크의 이소스를 넣어보니 에러가 안뜨는 걸로 봐서 코드상에 에러가 있나봐요.
  • profile profile

    레이아웃 전체 코드를 알 수 없으므로 해결해 드리기 힘듭니다.

    p.s.) 그렇다고 전체 코드를 올려달라 부탁드리는건 아닙니다. 확실한 해결을 바라신다면 제작의뢰하시면 됩니다.

  • profile profile
    진짜 신기하게 동일 한코드인데 또 작동이 됩니다.

    https://github.com/rhymix/rhymix/blob/master/layouts/xedition/layout.html#L61-L88
    여기서 노란부분 드래그래서
    {@ $_fixed_width_act = array(
    _fixed_width_act 만 _no_adsense_act 로변경했더니 오류가 안나네요 ㅎㅎ
    띄어쓰기나 따옴표 등등 뭔가 오타가 하나 있나봅니다 감사합니다.