Skip to content

Coding Discuz Together?

andrzejekandrzejek Polska
edited August 2015 in New Engines/Platforms
So here is what its done for now with @sven help. Would be great again to see people coding again, maybe it would be good idea to close this section of forum only for registered members? What do you think @sven and @users?

Current issues mostly with register and login steps due cuz discuz is heavy javascript site, 
posting step is not best. take a look, maybe someone is passionate about this just as i am :D


[setup]
enabled=1
default checked=0

engine type=Forum_Debug
description=discuz
dofollow=1
anchor text=1
creates own page=1
uses pages=0
posted domain check=1

[Login]
type=login
must be filled=1
hint=The login. Use numbers and letters only.
min length=7
max length=15
static=1

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

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

[reglink]
type=extract
find url=*member.php?mod=register|*member.php?mod=*register|*member.php?mod=reg*|*member.php?mod=*register*|*member.php?mod=*reg*|/register.php|*register.php
find link=立即注册|Register
default=./member.php?mod=register
must have=!log|!*log*

[captchahash]
type=extract
front1=<span id="seccode_
back="
default=%captchahash1%

[captchahash1]
type=extract
front1=seccode_
back="

[captchaquestionhash1]
type=extract
front1=secqaa_
back="

[formhash1]
type=extract
front1=name="formhash|name='formhash
front2=value="|value='
back="|'
url=%reglink%&inajax=1

[captcha_url]
type=extract
default=./misc.php?mod=seccode&update=%random-40000-900000%&idhash=%captchahash%

[textcaptcha1]
type=extract
front1=sectplcode[2] + '
back='
url=./misc.php?mod=secqaa&action=update&idhash=%captchaquestionhash1%

[secanswer_id]
type=extract
front1=<input name="secanswer" id="
back="

[varname_user]
type=extract
front=<input type="text" id="
back="

[varname_mail]
type=extract
front1=<input type="text" id="
front2=<input type="text" id=" 
back="

[varname_pw1]
type=extract
front1=<input type="password" id=" 
back="
must have=!ls_password

[varname_pw2]
type=extract
front1=<input type="password" id=" 
front2=<input type="password" id=" 
back="
must have=!ls_password

[profile_url]
url=%profile_edit1%
type=extract
find url=space-uid*|space.php?uid=*|home.php?mod=space&uid=*|*space-uid*|*space.php?uid=*|*home.php?mod=space&uid=*|*home.php?mod=space*uid*|*space.php*uid=|*-uid*|*id=*
find link=%login%
must have=!log|*log*
remove=&amp;do=.*

[profile_edit1]
type=extract
find url=./home.php?mod=spacecp|home.php?mod=spacecp|*home.php?mod=spacecp|*home.php?mod=spacecp*
default=./memcp.php
must have=!&|*&*|?|*?*

[login_do_step1]
type=extract
front1=showWindow('login', '
back='
default=%targeturl%


[Article]
type=memo
allow html=1
must be filled=1
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
html to bbs=1
bbs supports=url,b,i,u,img
html to custom link format=1
custom link format=[url=%url%]%anchor_text%[/url]


[postlink]
type=extract
find url=*action=newthread*|*newthread*
must have=!special


;mystery_question=%question%
;nospam=%capquest%

;;;;;CAPTCHE GOOD OR NOT


;<![CDATA[ succeed ]]>
;<![CDATA[ invalid ]]>

;failed = <div class="pc_inner">


;[captcha_url]
;type=extract
;url=
;front1=src="misc.php?mod=seccode&update=
;back="

referrer=%reglink%

[REGISTER_STEP1]
modify url=%reglink%&inajax=1
submit success=<script type="text/javascript" reload="1">if($('succeedmessage'))
submit failed retry=>Discuz! Database Error<
;submit success skip verify=*member.php?mod=logging&action=logout*|*action=logout*
;page cant have math captcha for now
;secanswer=%question%
page must have1=!secqaa_

verify submission=1
verify interval=30
verify timeout=90000
first verify=5
verify by=email
verify on unknown status=1
try to continue without verification=1

form name=register -*
form id=*registerform*

add fixed data=seccodeverify=%captcha% fixed:%captcha_url%;%varname_user%=%login%;%varname_pw1%=%password%;%varname_pw2%=%password%;%varname_mail%=%Your E-mail%;seccodehash=%captchahash%;seccodemodid=member::register;regmessage=my reason
add fixed data condition=<span id="seccode_;<input type="text;<input type="password;<input type="password;<input type="text;<span id="seccode_;member::register;regmessage

;add fixed data=okok=%question% fixed:./misc.php?mod=secqaa&action=update&idhash=%captchaquestionhash1% sectplcode[2] + ';'
;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;

[LOGIN_STEP1]
modify url=%reglink%
submit failed retry=>Discuz! Database Error<
submit success=<script type="text/javascript" reload="1">if($('succeedmessage'))|*%login%*

form url=*action=login&loginsubmit=yes&infloat=yes&lssubmit=yes|action=login&loginsubmit=yes&infloat=yes&lssubmit=yes*|*action=login&loginsubmit=yes&infloat=yes&lssubmit=yes*
form id=*lsfor*

username=%login%
password=%password%
seccodeverify=%captcha% fixed:%captcha_url%
questionid=%leave%
answer=%leave%

verify on unknown status=1

[LOGIN_STEP2]
modify url=./%login_do_step1%

modify step=3
modify step condition==<script type="text/javascript" reload="1">if($('succeedmessage'))|*%login%*


add fixed data=seccodemodid=member::logging;seccodehash=%captchahash%;seccodeverify=%captcha% fixed:%captcha_url%
add fixed data condition=member::logging;<span id="seccode_;<span id="seccode_

form name=*login*
form id=*loginform*
form url=member.php?mod=logging&action=login&loginsubmit=yes&loginhash=*|*member.php?mod=logging&action=login&loginsubmit=yes&loginhash=*|*member.php?mod=logging&action=login&loginsubmit=yes&loginhash=*

[LOGIN_STEP3]
just download=1

[STEP1]
modify url=./forum.php
just download=1

verify submission=1
verify by=url
first verify=0
verify interval=0
verify timeout=0
verify on unknown status=1
verify search detail url=0


[STEP2]
find url=forum.php?mod=forumdisplay&fid=*|/forum-*.html|/forum-*|*mod=forumdisplay&fid=*
just download=1

[STEP3]
modify url=%postlink%
variable must be used=article_title

form url=*action=newthread&fid=*|*topicsubmit=yes*

subject=%article_title%
message=%article%

add fixed data=seccodemodid=forum::post;seccodehash=%captchahash%;seccodeverify=%captcha% fixed:%captcha_url%
add fixed data condition=forum::post;<span id="seccode_;<span id="seccode_</sp

Comments

  • Post is too long


    [EXTRA_STEP1]
    link type=Profile-Url
    modify url=%profile_edit1%
    just download=1

    submit success=*parent.show_success*

    verify submission=1
    verify by=url
    verify url=%profile_url%
    verify url replace=&amp;do=.*;
    verify url remove=&amp;do=.*
    first verify=0
    verify interval=0
    verify timeout=0
    verify on unknown status=1
    verify search detail url=1


    [EXTRA_STEP2]
    find url=./home.php?mod=spacecp*op=info|home.php?mod=spacecp*op=info|*home.php?mod=spacecp*op=info*|*op=info|*op=info*|./memcp.php?action=profile*typeid=2|./memcp.php?action=profile*typeid=2*|*memcp.php?action=profile**typeid=2
    alternative url=./home.php?mod=spacecp&ac=profile&op=info

    variable must be used=url

    set unknown variable=%leave%
    site=%url%
    *=%leave%

  • andrzejekandrzejek Polska
    edited August 2015
    There is nice trick to check if captcha is failed, with their javascript.
    Maybe @sven can implement things like that to be used ?

    =./misc.php?mod=seccode&action=check&inajax=1&modid=member::register&idhash=%captchahash%&secverify=%captcha%

    ;<![CDATA[ succeed ]]> = captcha good
    ;<![CDATA[ invalid ]]> = captcha bad
Sign In or Register to comment.