【为您的KickApps社区提供人造社区隐私】丈夫志四海,万里犹比邻。这篇文章主要讲述为您的KickApps社区提供人造社区隐私相关的知识,希望能为你提供帮助。
This is a basic script that will redirect a non-member to the login page with a custom message. Place the code between script tags in your Affiliate Center header.
To use:
1) replace loginPage variable with your *login URL.
2) replace accessMessage variable with your custom message.
*If you'
re current login URL does not contain a query string (?) you should change '
&
a=nonmember'
inside newLogin variable to '
?a=nonmember'
.
Note that real community privacy for KickApps is on the way and this method should be considered transitional -- it can be circumvented by simply disabling javascript before visiting your site.
--
For more tips and tricks checkout the <
a href=https://www.songbingjia.com/android/"
http://www.kickdeveloper.com/resources"
>
KickApps resources page<
/a>
.
- // place in your header
- ( function( ) {
- // Your login page
- var loginPage = " http://awesome.krunkosaurus.com/user/displayUserLoginPage.kickAction?as=5166" ;
- var registerPage = " http://awesome.krunkosaurus.com/user/displayUserRegisterPage.kickAction?as=5166& STATUS=MAIN" ;
- var accessMessage = " You must be a member to access this site." ;
- var newLogin = loginPage + '& a=nonmember';
- // if user is not logged-in and not on login page send them to login page
- if ( Ka.Info.USERID === '' & & window.location.href !== loginPage & & window.location.href !== newLogin & & window.location.href !== registerPage) {
- window.location = newLogin;
- }
- // if nonmember detected and on login page display message
- if ( window.location.href =https://www.songbingjia.com/android/== newLogin & & Ka.Util.getLocationParam('a') === 'nonmember') {
- $j( function( ) {
- $j( '#loginHeader') .after( '< p class=" ka_Alert" > ' + accessMessage + '< /p> ') ;
- } ) ;
- }
- } ) ( ) ;
推荐阅读
- 在KickApps支持的站点上移动模块
- KickApps:将类添加到“组”页上的“离开/加入”按钮。
- Nginx性能优化和安全性配置
- 使用Python,Twisted和Django通过Android手机控制笔记本电脑
- 有抱负的Google Glass开发者教程(构建你的第一个Glass应用)
- Mirror API教程(适用于Web开发人员的Google Glass)
- 开发移动Web应用程序(何时,为什么以及如何)
- iOS用户界面(故事板,NIB和自定义代码)
- iOS开发人员指南(从Objective-C到学习Swift)