community project - Jforum Engine

sashiloversashilover China
edited October 2017 in New Engines/Platforms
;===============
;JForum Engine v1.3 - Release Datea: 2017/8/1
;说明: JForum允许在Profile的Biography中放入文章, 并且加入一个Do Follow的链接
;需要注意的点: 
; 1). Biography不支持HTML的variation, 所以需要在Article选项卡里关闭HMTL variation
; 2). Profile页面的标题是固定的格式: "All about" +[UserID], 为了让标题中出现关键字, 必须使用自定义的注册名(包含关键字)
;     UserID的格式[a-z][0-9][-][_]都支持, 用户名最大长度是 = 25
; 3). Jforum 2.1.8版本中, Biography正文中无法插入HTML标签<a href, etc. 所以启用了Website字段插入URL, 并且在
;     文章底部插入相应的URL, 这样即便<a href被截断也不会影响到正文的内容
; 4). 有些站点会限制Bio的长度, 所以把文章剪切到500-600字比较安全
; 5). 最后生成的链接需要把"editDone"修改成"Profile", 这样才能被Google index
;==============
[setup]
enabled=1
default checked=0

engine type=CS POST
description=Submits an article in the bio of Profile page
dofollow=1
anchor text=1
creates own page=1
uses pages=0

page must have1=jforum|forums/list.page

search term=jforum


add keyword to search=2
use blog search=0
extract keywords=0

posted domain check=1

skip ext links on=0
skip content on=0
skip url content on=0

multiple posts per account=0

;===
;extract from email=login=email_login,password=email_pw
;---------------------------------------------------------------

[URL]
type=url 

[Article_Title]
type=text
allow html=0
must be filled=1
hint=The title for your article. 
capitalize words=1

[Article]
type=memo
allow html=1
must be filled=1
html line break=1
html line break format=<br>
hint=The full article comes here.
auto modify=0
auto add anchor url=2
auto add anchor url content=%file-auto_anchor-article.dat%
custom mode=1


[Anchor_Text]
type=text
alternate data=%spinfile-generic_anchor_text.dat%

;==注册用户名需要包括关键字,所以从文件中自定义
;==最大长度不能超过25
[Login]
type=extract
input=%spinfile-c:\names_withkeywords.dat%
upcase=0
static=1

[Password]
type=password
must be filled=1
hint=A password used for websites that need an account. Use numbers and letters only.
static=1

[Your E-Mail]
type=email
static=1

;==从Email解析处理的Password
[email_pw]
type=extract
front1=赏?邢特谙琢耘萄:|username:|usuario:|Username:|meno:|ytkownika:|Benutzername:|utilisateur :|k鋣tt鋔鋞unnus:瀨k鋣tt鋔鋞unnus:|Brukernavn:|felhaszn醠骾 n関:|nome utente:|jm閚o:|konta:|Pseudo:|identifiant :|gebruikersnaam:|: |: %login% 
front2=辛蚁特:|Your password is:|password:|Password:|Contrase馻:|heslo:|mot de passe :|Mot de passe:|Passwort:|salasana:瀨salasana:|heslo:|jelsz?|ifre:|wachtwoord:|: 
back=\n

;===从Email中解析处理的UserName
[email_login]
type=extract
front1=赏?邢特谙琢耘萄:|username:|usuario:|Username:|meno:|ytkownika:|Benutzername:|utilisateur :|k鋣tt鋔鋞unnus:瀨k鋣tt鋔鋞unnus:|Brukernavn:|felhaszn醠骾 n関:|nome utente:|jm閚o:|konta:|Pseudo:|identifiant :
back=\n
;默认为设置的Email地址
default=%Your E-Mail%


[Profile_Image]
type=file
must be filled=0
hint=Choose an image for your profile (also called avatar). It does not (and also should not) have to show you on the picture but something that represents you.
default=general_profile.png
allow html=0
filter=Image files|*.jpg;*.jpeg;*.png;*.gif|PNG|*.png|GIF|*.gif|Jpeg|*.jpg;*.jpeg


[get_article_image]
type=extract
input=%article%
front1=<img
front2=src="|src='|src=
back="|'| |>
default=%Profile_Image%

;==把recentTopics/list.page前的JForum的安装路径找出来
[jforum_folder]
type=extract
url=%original_targeturl%
front1=<a id="latest"
front2=href="
back=recentTopics/list.page



;===I agree to these terms之后的注册页面
[register_url]
type=extract
front1=name="submit"
front1=document.location = '
back=';

[REGISTER_STEP1]
;==主要页面被关闭
page must have1=!Registration of new users is disabled.
page must have2=!Registrierung neuer Benutzer ist deaktiviert.

find link=Register|Registrieren|注册|会员注册
find url=*insert.page*|*/users/register
;==如果在当前页面找不到注册页面的URL, 则使用默认的注册页面URL
alternative url=%jforum_folder%user/insert.page

just download=1
;注册成功
submit success=Congratulations!|You have completed your registration.|Thank you for the registration

;do not use generic error box as it would avoid trying alternive urls
submit failed=<h1>404

;在多语言环境下, captcha检测失败匹配 --> <font color="#ff0000">
submit failed retry=Captcha response does not match the challenge.|already in use|Username is too long|<font color="#ff0000">

captcha failed=You failed the spam check|The CAPTCHA solution was incorrect.|ReCAPTCHA Text Error.|The words you typed did not match the ones displayed.|La respuesta de CAPTCHA ha sido incorrecta.

;注册需要verify
verify submission=1
;logs into your email account and tries to find a link that is coming from the same webpage domain.
;同时使用两种Verify的方式, 有些站点会需要Email的确认, 有些站点密码需要从邮件中提取
verify by=email
first verify=5
verify interval=20
verify timeout=60
;1 = if a submission is not detected as successful or failed it will still be taken as successful (appearing in log with “unknown submission status”)
verify on unknown status=1
;After a successful registration we would normally wait till an verification email arrives to continue with login and submission. However some platforms might allow you to login without this or log you in already. In that case it would be a waste of time to wait for a email from them so we continue to login and submit the content.
submit success skip verify=> My Profile<|/user/edit/

;When used in a REGISTER_STEP1 section, this would skip e.g. the email verification and try to login and submit your link. In case this goes wrong there is still the normal way to go on (wait verification + login + submit). If the result of a registration is unknown as well as login, then it doesnt continue for now but wait till registration is verified.
try to continue without verification=1

;Username字段
;username=%Login%
;====注册名中包含关键字
username=%Login%
;Email字段
email=%Your E-Mail%
;password字段
password=%Password%
;confirm password字段
password_confirm=%Password%
;captcha字段
captchaResponse=%captcha%
;firstName字段
firstName=%spinfile-names.dat%
;lastName字段
lastName=%spinfile-lnames.dat%
;nickname字段
nickname=%spinfile-names.dat% %spinfile-lnames.dat%

;某些站点注册流程中,会出现一个Registration agreement terms,
;需要点击"I agree to these terms"按钮才能进入真正的页面
[REGISTER_STEP2]
modify step=3
;找到可用的Form就调整到提交步骤Step4
modify step condition=id="formregister"|name="formregister"
;修改当前URL的地址到实际的注册页面 
modify url=%register_url%
just download=1

;提交流程
[REGISTER_STEP3]
;Form name
form name=formregister
form class=registration*
;Form ID
form id=formregister

;等待一个随机的时间进行提交
seconds to wait before submission=%random-5-10%

set unknown variable=%leave%
;必须使用的变量名
variable must be used=Your E-Mail

[LOGIN_STEP1]
find link=Login|Вход
find url=*/login.page*
;===找不到登录页面就是默认的页面
alternative url=%jforum_folder%user/login.page
just download=1

;登录成功的页面特征字符串
submit success=> My Profile<|/user/edit/
submit failed=Your account has either been blocked or you have not activated it yet.|Username and password do not match or you do not have an account yet.|Invalid Token|<div class="alert alert-warning">|<h4 class="alert-heading">Warning</h4>|data-dismiss="alert">׼/a>

verify on unknown status=1

;User Name字段
username=%Login%
;Password 字段
password=%Password%
;AudoLogin 字段
autologin=%leave%
;login 字段
login=Login



[LOGIN_STEP2]
;Form名称
form name=loginform|formlogin
;Form action的URL
form url=*jforum.page
;Form ID
form id=loginform

seconds to wait before submission=%random-5-10%
;未知字段设置默认值
set unknown variable=%leave%

[STEP1]
link type=Article

;尝试查找Profile页面的链接
find link=My Profile
find url=*/user/edit/*
;回到原始的页面,如果Profile页面找不到的话
;有些站点登录成功后会调整到默认首页
alternative url=%original_targeturl%

just download=1

submit success=Profile successfully saved|Information updated
submit failed=Benutzername und Passwort falsch oder das Benutzerkonto existiert noch nicht!|Login denied!|Your account has either been blocked or you have not activated it yet.|<div class="alert alert-warning">|<h4 class="alert-heading">Warning</h4>|data-dismiss="alert">׼/a>



verify submission=1
verify by=url
;最终生成的URL中把"editDone"修改成"Profile", 这样容易被Google Index
verify url replace=/editDone/;/profile/
;===verifiy的URL
verify url=%formurl%
;===测试,写入文件
;write file="d:\jforum_verified.txt" %formurl%\n"

first verify=0
verify interval=20
verify timeout=30
verify on unknown status=1
verify search detail url=0


;variable must be used=url
;==个人简历字段为文章%article%
biography=%article%
;Avatar字段的值是文件
avatar=%Profile_Image%
;Signature字段设置为空
signature=%leave%
;website字段
;JForum 2.1.8版本中Biography无法使用<a href标签, 所以统一设置URL在website字段
;正文内容中只在底部插入一个链接, 因为即便链接内容不显示也不会影响正文的内容
website=%URL%
;interests字段
interests=%leave%
;occupation字段
occupation=%leave%
;allowhtml字段, 设置为启用HTML
allowhtml=1

[STEP2]
modify step=3
;找到可用的Form就调整到提交步骤Step3
modify step condition=id="post"|name="post"
;从原始的页面中查找Profile页面
find link=My Profile
find url=*/user/edit/*
just download=1


;实际提交的Form
[STEP3]
seconds to wait before submission=%random-5-10%

form name=post
form id=post
form url=*/jforum.page

set unknown variable=%leave%

Sign In or Register to comment.