Home   Archive   Permalink



How to change Sitebuilder name and password?

I'm trying to install Sitebuilder by Nick and when I go to edit a page It says wrong name and/or password. I changed them in the head of the script but maybe I didn't do it correctly. please help Nick! I also don't get wysiwyg editor showing either, just a blank window to enter text.

posted by:   Tony     26-Nov-2011/2:44:33-8:00



Hi Tony,
    
The username and password are hard coded into that script. You can do a simple search/replace to change them. A much better option is to set the username and password to a word label (variable), like I did in this script: http://www.rebol.org/view-script.r?script=kindle-email.cgi
    
If I can find some time, I'll update the sitebuilder script with the user/pass more easily editable :)

posted by:   Nick     30-Nov-2011/10:06:10-8:00



Here's an updated version which replaces all the hardcoded links with links created by rejoining the set myusername and mypassword values. For example, this:
    
Files
    
Gets replaced with this:
    
rejoin [
     {Files}
]
    
Here's the whole script with those changes (edited quickly, so please check for errors). Now all you have to do is change the initial setting of the myusername and mypassword values at the beginning of the script. (edited: see http://www.rebol.org/view-script.r?script=sitebuilder.cgi for the updated script)

posted by:   Nick     30-Nov-2011/10:30:27-8:00



Thanks Nick,much appreciated. Do you know why I would not get the WYSIWYG editor showing?

posted by:   tony     8-Dec-2011/11:14:42-8:00



Testing replies in thread.

posted by:   Tony     8-Dec-2011/20:18:32-8:00



Hi Nick
    I tried the new version above but can't get it working, I get 500 Internal Server Error. The original one does work though. Have you tried it yourself?

posted by:   Tony     11-Jan-2012/2:32-8:00



Hi Tony,
    
As I mentioned, "(edited quickly, so please check for errors)". I just did a rough edit so that you could see the code pattern changes required, but haven't proofed or executed the code on the server. I'm working 100+ hours a week, so haven't had much time to provide community support.
    
Whenever I get an error of that sort with CGI scripts, I check my server's error log. The error returned by REBOL, for the CGI script, will be visible there. If I missed a parenthesis or forgot to close a block in the script, you'll get the required feedback from the error log. For CGI scripting, I keep a direct bookmark to my error log - it helps find and fix those problems immediately.
    
I'll try to find time to do a formal edit of the sitebuilder script and post a tested update on rebol.org.

posted by:   Nick     15-Jan-2012/12:13:23-8:00



OK, thanks, I will try to find my logs. I think I have done it before.

posted by:   tony     15-Jan-2012/13:02:42-8:00



I just updated the script on rebol.org. I proofread, but haven't tested it yet on a web server. Using that script is probably better than copying from this forum page. Remember to start the CGI script at the line that begins with #! (delete all the text and header before it).

posted by:   Nick     15-Jan-2012/13:21:31-8:00



The initial test on my Lunarpages server works fine. I did notice that I receive a "Premature end of script headers" error if I edit the script using the cPanel file manager text editor (maybe something having to do with text encoding?).
    
The way I work with CGI scripts is to edit them on my desktop PC with Metapad, and upload the edited script. That way I'm always sure the file format, encoding, etc. is always the same, plus I've always got the most recent version, and an archive of the entire history of the script revisions on my flash drive (which I sync to several backup drives daily).
    
The built in REBOL editor works nicely too for editing CGI scripts.

posted by:   Nick     15-Jan-2012/13:49:19-8:00