|
Post by hansschmucker on Jun 19, 2007 23:17:59 GMT 1
Hi everybody, working at the page made me think about the forums too... I mean proboards44 isn't exactly a perfect hoster in my oppinion... the fact alone that we can't create a backup is enough... add 100kb for attachments (TOTAL, not per post) and well, you see what I mean... also I'm not terribly excited by the fact that there is a banner up there that is by my estimates worth about $1000 per year and nobody is seeing even a penny, so my question is, should we move the forum? I'm pretty good with scripts so I guess I would be able to port the forum in a day or two, including all user accounts that have been posted from, including their PUBLIC settings... Add another three days or so to send notifications via PM to all users with a new randomy created password and we're done (I don't think it will be possible any faster without hitting a spam-protection wall).
What do you think?
|
|
|
Post by hansschmucker on Jun 19, 2007 23:57:13 GMT 1
Just calculated again... it's actually closer to $500 but my point remains valid!
|
|
|
Post by Tinnus on Jun 20, 2007 1:07:20 GMT 1
I don't think anyone has the right to move the forums since they're yoyo's. At least unless he says it's OK...
|
|
|
Post by tgwaste on Jun 20, 2007 1:14:37 GMT 1
would be a good opportunity to clean up all the garbage posts/topics..
|
|
|
Post by tgwaste on Jun 20, 2007 1:14:53 GMT 1
Also an email option would be nice.
|
|
|
Post by hansschmucker on Jun 20, 2007 2:40:27 GMT 1
I've just sent yoyo a mail, let's see if he answers
|
|
|
Post by vilmos on Jun 20, 2007 4:06:50 GMT 1
Anyone can start an LJP forum. The difficulty is getting the people to check it and post there.
|
|
|
Post by hansschmucker on Jun 20, 2007 4:10:30 GMT 1
That's why I said "moving" Best would be an automatic forwarding, but I doubt this is possible (see, another thing we can't do). So the alternatve would be either deleting or locking all threads and creating a big, fat "THE FORUM HAS MOVED" thread.
|
|
|
Post by hansschmucker on Jun 20, 2007 7:49:44 GMT 1
Got an answer from yoyofr: So now we can officially consider it
|
|
|
Post by metaview on Jun 20, 2007 10:21:38 GMT 1
Email notification would be very cool. I always wonder what the "bookmark thread" is all about? And not to forget a jump to last unread post button.
|
|
pickme
Junior Member
Posts: 59
|
Post by pickme on Jun 20, 2007 14:04:42 GMT 1
If you need some help, let me know hansschmucker.
programmerbygrace @ hot mail.com
|
|
|
Post by countbuggula on Jun 20, 2007 16:33:02 GMT 1
I always thought it was funny that a forum that in large part is dedicated to PalmOS software doesn't play nice with Palm's Blazer Browser. Last time I tried I couldn't even log in (don't know if that's been fixed, as it's been awhile since I even tried). Anyways, this would give us an opportunity to do whatever we want and add some additional functionality. I'm all for it.
|
|
|
Post by hansschmucker on Jun 21, 2007 3:19:07 GMT 1
Tinnus, your vote and it will be done by Monday...
|
|
semi
Junior Member
Posts: 97
|
Post by semi on Jun 21, 2007 7:28:08 GMT 1
Yeah Tinnus! give us the magic word so we can have a new, better looking, more function, superb forum!
|
|
|
Post by Tinnus on Jun 21, 2007 12:39:59 GMT 1
Hm, that's though now, even if I didn't like the idea there would be no way to say no to you guys ;D What a d**n strong community this is... Now, if yoyofr says it's OK, I'm all OK as well. I've never liked the ADs or anything... If you can move all the posts then it will be great (no, no deliberate "deleting old useless posts". IMO all posts are useful for future reference, even the dumbest ones. Afterall, someone could always ask the same dumb question again, and if there's already one copy of it... maybe, just maybe, the person will hit "search" Oh, I'll also be sure to add a nice BIG sticky here saying the forum moved ;D (it would be good also if you made me an admin of the new board, since I'm just a mod here )
|
|
|
Post by hansschmucker on Jun 22, 2007 1:17:17 GMT 1
Then we're set... I've started working on the forumdump script... It already dumps the threadlist correctly, but I'm still strugling with the regular expression needed to extract the posts. Then we need the user data and finally I will have to recreate the SQL query and we'll be done.
|
|
|
Post by hansschmucker on Jun 22, 2007 1:41:30 GMT 1
BTW feel free to help me with the RegExp. And if somebody could tel me what this forum is based on, then we should clearly avoid that software. The HTML is broken beyond repair. It's so bloated that I think they could save at least 60% on their bandwidth cost if they just used even the most basic CSS.
|
|
|
Post by hansschmucker on Jun 22, 2007 1:58:46 GMT 1
d**n THIS ROTTEN NEWLINE CHARACTER!!!!!!! AND THANKS FOR NOT INCLUDING /s IN JSREGEXP!!!!!!!!!
(sorry, sometimes you just have to let it out)
|
|
|
Post by Tinnus on Jun 22, 2007 17:14:52 GMT 1
I don't know anything about Perl or whatever regular expression scripting language you're using, sorry for not being able to help there.
That whole regular expression thing is too much for my head. Emulators are easier ;D
|
|
|
Post by hansschmucker on Jun 22, 2007 17:19:46 GMT 1
I'm actually using Javascript.... most comfortable language for me, for example this is the code to get the threads:
<html> <head> <title>forum.get();</title> <script> function methodize(methodize_func,methodize_scope){ var methodize_args=new Array(); for(var i=2;i<arguments.length;i++) methodize_args.push(arguments[i]); return (function(evt){methodize_func.call(methodize_scope,evt,this,methodize_args);}); }
function selectFolder(){ var nsIFilePicker = Components.interfaces.nsIFilePicker; var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); fp.init(window, "Select the download folder for these images.", nsIFilePicker.modeGetFolder); var res=null; do{ res = fp.show(); }while(res != nsIFilePicker.returnOK); return (fp.file.path); }
function writeFile(str_Buffer,str_Filename){ try{ var obj_File = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); obj_File.initWithPath(str_Filename); if(!obj_File.exists()) obj_File.create(0x00,0644); } catch (e) { alert(e); } try { var obj_Transport = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream); obj_Transport.init( obj_File, 0x04 | 0x08 | 0x10, 064, 0 ); obj_Transport.write(str_Buffer,str_Buffer.length); obj_Transport.close(); } catch (e) { alert(e); } }
function httpGet(url,targetfnc){ this.url=url; this.handler=targetfnc; if (window.XMLHttpRequest) this.request = new XMLHttpRequest(); else if (window.ActiveXObject) this.request = new ActiveXObject("Microsoft.XMLHTTP");
this.request.onreadystatechange = methodize(this.handleResponse,this); if(this.request!=null){ this.request.open("GET", url); this.request.send(null); } }
httpGet.prototype.handleResponse=function(){ if(this.request.target!=undefined) this.request=this.request.target; if((this.request.readyState == 4) && (this.request.status == 200)) this.handler(this.request.responseText); }
var basepath="C:\\DATA\\"; var data={}; data.threads=[]; data.users=[]; data.posts=[]; var pagesNum=1; var pagesLoaded=0;
var regExps={}; regExps.findNextIndexPage=/<a href=".*?(\&page=[0-9]*?)"><b>\&\#187\;<\/b><\/a\>/; regExps.findThreadOnIndex=/<a href=".*?thread=([0-9]*?)" onclick="pb_bubble=1">(.*?)<\/a><\/b><\/font><!-- google_ad_section_end -->.*?<\/td><td class="windowbg2".*?><font size="1"><a href=".*?">.*?<\/a><\/font><\/td><td class="windowbg".*?><font size="2"><a href=".*?">.*?<\/a><\/font><\/td><td class="windowbg".*?><font size="2">(.*?)<\/font><\/td>/gi;
function init(){ try {netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserAccess");} catch (e) { alert(e); } try {netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");} catch (e) { alert(e); } try {netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");} catch (e) { alert(e); } new httpGet(document.getElementById("indexpage1").value,processIndexPage);
}
function processIndexPage(text){ try {netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserAccess");} catch (e) { alert(e); } try {netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");} catch (e) { alert(e); } try {netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");} catch (e) { alert(e); } var res; var np; pagesLoaded++; while(res=regExps.findThreadOnIndex.exec(text))data.threads.push(res); if((np=regExps.findNextIndexPage.exec(text))!=null){ pagesNum++; new httpGet(document.getElementById("indexpage1").value+np[1],processIndexPage); } if(pagesLoaded==pagesNum) writeArray(data.threads,basepath+"threads.txt"); }
function displayArray(a){ var out=""; for(var j=0;j<a.length;j++){ for(var i=1;i<a[j].length;i++){ out+=" "+a[j][i]; } out+="\n"; } alert(out); }
function writeArray(a,f){ var out=""; for(var j=0;j<a.length;j++){ for(var i=1;i<a[j].length;i++){ out+=" "+a[j][i]; } out+="\n"; } writeFile(out,f); }
writeFile(str_Buffer,str_Filename)
</script> </head> <body> <h1>forum.get();</h1> <form name="imgget" action=""> First index page:<input type="text" size="128" id="indexpage1" value="http://yoyofr.proboards44.com/index.cgi?board=general" /><br /> <input type="button" id="getforum" value="Get Forum" onclick="init();" /><br /> <input type="button" id="globalselectdestfolder" value="Select Target Folder" onclick="basepath=selectFolder();" /> </form> <div id="results"></div> </body> </html>
|
|
|
Post by hansschmucker on Jun 22, 2007 18:57:49 GMT 1
Just so you know, I have a deadline on monday, so I probably won't be finishshed before wednesday next week.
|
|
|
Post by _Em on Jun 22, 2007 19:35:02 GMT 1
I'd suggest using Perl instead of ECMAScript... or Python (but Perl is better for this task). There are scripts on CPAN that do almost exactly what you're trying to do... you'd just have to tweak them slightly.
|
|
|
Post by algurgazan on Jun 22, 2007 21:40:59 GMT 1
doesn't this board have an export function in the admin part? by the looks of it i think its based on yabbse or something, which does have an export to sql function.. you should ask yoyofr, could save you a lot of work..
|
|
|
Post by hansschmucker on Jun 23, 2007 10:48:51 GMT 1
_Em, Don't worry, I'm not reinventing the wheel either. This is based on an old version of a image downloader for yahoo and google that I wrote a few years back. About PERL and Python.... well, no way. The problem is that these languages give me a headache, it's just like programming in VisualBasic: You know there is some kind of logic in there, but you just can't find it. (and quiet about CPAN until you've set up your own Bugzilla installation )
|
|
|
Post by hansschmucker on Jun 23, 2007 10:50:25 GMT 1
algurgazan, no it doesn't seem to have one... I've registered a board for testing and well, I couldn't find anything.
|
|
|
Post by _Em on Jun 23, 2007 17:24:30 GMT 1
The problem is that these languages give me a headache, it's just like programming in VisualBasic: You know there is some kind of logic in there, but you just can't find it. Heh... I generally compare ECMAScript to VB myself... Python, being pure OO, is a breeze for me. Perl, being an advanced regexp reader, was an easy progression from sed and grep (and quiet about CPAN until you've set up your own Bugzilla installation ) I guess I can talk all I want about CPAN then... I run a Bugzilla install on our compile farm Anyway, if you've got it working, that's what counts -- always better to go with what you know, unless it's obvious that your hammer won't get those screws in properly
|
|
|
Post by hansschmucker on Jun 23, 2007 19:35:10 GMT 1
Actually, Javascript is pure OOP, if you want it to be This script is a bit hacked so it doesn't have a real structure, but it can be done. About Bugzilla. I've installed it wants and it wanted all sorts of outdated scripts... real nightmare. That was my closest encounter with PERL, aside from a few build scripts and well, I didn't like it.... so, yes... I am a little biased
|
|
|
Post by hansschmucker on Jun 23, 2007 19:37:15 GMT 1
About RegExp... for the most part JS follows PERL conventions, but a few switches are missing, like /s , so you have to use [\s\S] for . if you want newlines to count
|
|
|
Post by tgwaste on Jun 26, 2007 18:46:18 GMT 1
hey what forum software will you be using? You should use the same one that treo-central uses. I wrote a perl script that scans my items on this forum every hour and emails me the new posts... im not sure if that would help or not?
|
|
|
Post by _Em on Jun 27, 2007 14:48:48 GMT 1
Wouldn't RSS feeds be a better way to go?
|
|