alias AltInfo dialog $iif($dialog(AltInfo),-v,-m) AltInfo AltInfo dialog -l AltInfo { title "Altscripts info dialog" size -1 -1 150 160 option dbu tab "Recent Posts", 1, 0 0 149 139 text "Currently viewing post:", 2, 4 19 59 8, tab 1 text "", 3, 64 19 25 8, tab 1 text "", 4, 4 27 142 4, tab 1 text "Id:", 5, 4 34 35 8, tab 1 edit "", 6, 40 33 105 10, tab 1 readonly autohs text "Time:", 7, 4 44 35 8, tab 1 edit "", 8, 40 43 105 10, tab 1 readonly autohs text "Subject:", 9, 4 54 35 8, tab 1 edit "", 10, 40 53 105 10, tab 1 readonly autohs text "Link:", 11, 4 64 35 8, tab 1 edit "", 12, 40 63 105 10, tab 1 readonly autohs text "Poster:", 13, 4 74 35 8, tab 1 edit "", 14, 40 73 105 10, tab 1 readonly autohs text "Topic:", 15, 4 84 35 8, tab 1 edit "", 16, 40 83 105 10, tab 1 readonly autohs text "Topic Starter:", 17, 4 94 35 8, tab 1 edit "", 18, 40 93 105 10, tab 1 readonly autohs text "Board:", 19, 4 104 35 8, tab 1 edit "", 20, 40 103 105 10, tab 1 readonly autohs link "View Body of post", 21, 45 114 47 8, tab 1 button "Previous", 22, 3 125 37 12, tab 1 button "Go To...", 23, 57 125 37 12, tab 1 button "Next", 24, 109 125 37 12, tab 1 button "Refresh", 36, 4 143 37 15 button "Close", 37, 110 143 37 15, ok } on *:dialog:AltInfo:init:*: { did -a $dname 4 $str(-,75) } on *:dialog:AltInfo:sclick:*: { ; echo -a $did if ($did == 1) SetVars Recent limit $iif($did(3) isnum 5-255,$did(3),5) elseif ($did == 5) SetVars News limit $iif($did(7) isnum 1-,$did(3),5) elseif ($did == 9) SetVars Members limit $iif($did(7) isnum 1-,$did(3),5) elseif ($did == 13) SetVars Profile u $iif($did(7) isnum 1-,$did(3),1) elseif ($did == 36) sockopen AltInfo altscripts.trap17.com 80 elseif ($did == 22) { var %current = $gettok($did(3),1,47), %total = $gettok($did(3),2,47) if (%current == 1) ViewPost %total else ViewPost $calc(%current - 1) } elseif ($did == 23) { var %post = $$?="What number post do you want to view?" if (%post > 0) && (%post <= %total) Viewpost %post else var %x = $input(Error: Invalid post number,oh,Error) } elseif ($did == 24) { var %current = $gettok($did(3),1,47), %total = $gettok($did(3),2,47) if (%current == %total) ViewPost 1 else ViewPost $calc(%current + 1) } } alias -l ViewPost { var -s %data = $hget(Posts,$1), %dname = AltInfo, %post = $1 tokenize 164 %data did -ra %dname 3 $+(%post,/,$hget(Posts,0).item) did -ra %dname 6 $2 did -ra %dname 8 $1 did -ra %dname 10 $3 did -ra %dname 12 / $+ $gettok($8,4-,47) did -ra %dname 14 $5 did -ra %dname 16 $6 did -ra %dname 18 $4 did -ra %dname 20 $7 } alias SetVars { set %AltInfo.action $1 set %AltInfo.extraParam $2 set %AltInfo.extraData $3 } on *:dialog:AltInfo:edit:*: { } on *:sockopen:AltInfo: { if ($hget(Posts)) hfree Posts var %sa = %AltInfo.action, %ex = %AltInfo.extraParam, %exData = %AltInfo.extraData sockwrite -nt $sockname GET $+(/forum/index.php?action=.xml;sa=,%sa,;,%ex,=,%exData) HTTP/1.0 sockwrite -nt $sockname HOST: altscripts.trap17.com sockwrite -nt $sockname $crlf } on *:sockread:Altinfo: { var %read sockread %read echo -a %read if (%AltInfo.action == recent) { if ($regex(%read,/