Support » Plugin: Restrict Anonymous Access » infotext Support html code ?

  • Resolved duolanka

    (@duolanka)


    Very good plugin!
    infotext Support html code?
    I want to prompt more informative, but these attempts fail, it will display the default message!
    infotext like :
    [member infotext=" <span style="color: #993300;">受限内容,仅限登陆用户查看!</span>已有账号,<a href="/login/" target="_blank">点此登陆 </a>  <a href="/register/" target="_blank">还没有账号点击注册一个!</a>"] test [/member]
    Is there any solution?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The problem is solved! Modified plug-in related prompt code

    Plugin Author Christian Leuenberg

    (@cleuenberg)

    Hi there @duolanka! HTML within infotext parameter is currently not supported but you could set a custom CSS class instead for changing the layout:

    [member class="my-custom-class"]Test[/member]

    Would you like to share your plug-in modification? I could implement this with the next update. Thank you!

    This is not a successful change, but it can be used for me.

    if ($showinfo=='1') {
    		//Hide content but show info text
    		return '<div class="raa-box-info ' . $class . '"><span style="color: #993300;">此内容受保护,仅限登陆用户查看!</span>已有账号,<a href="/login/" target="_blank">点此登陆 </a>  <a href="/register/" target="_blank"> 还没有账号点击注册一个!</a></div>';
    	}
    Plugin Author Christian Leuenberg

    (@cleuenberg)

    Ok, thank you. This is indeed a very custom solution. 🙂 I will implement a more generic solution that simply allows HTML within the infotext parameter.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘infotext Support html code ?’ is closed to new replies.