Member Board
[1/6] from: nick1:musiclessonz at: 26-Feb-2008 22:40
I wrote a little member board recently. Feel free to use it if you
like - it could easily be altered (has been) to create a useful
message board:
http://guitarz.org/tester/member_board.zip
A live demo is here:
http://guitarz.org/tester
Users can edit their own password protected entries, and upload/change
their own images (and other files), as desired. A default image
appears until the user uploads one. http:// addresses are
automatically linked. Every time a user makes an edit, the database
is automatically backed up - just in case. There's a built admin
editor to manually edit and restore the database. There are a few
other features contained in the (very hacked up) code. Perhaps
someone will find it useful :)
- Nick
[2/6] from: compkarori:g:mail at: 27-Feb-2008 8:57
Nick
Some way to obfuscate the email addresses from bots would be good.
On Wed, Feb 27, 2008 at 7:40 PM, Nick Antonaccio <nick1-musiclessonz.com> wrote:
> I wrote a little member board recently. Feel free to use it if you
> like - it could easily be altered (has been) to create a useful
<<quoted lines omitted: 14>>
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
--
Graham Chiu
http://www.synapsedirect.com
Synapse - the use from anywhere EMR.
[3/6] from: nick1:musiclessonz at: 26-Feb-2008 23:08
Will do :)
Quoting Graham Chiu <compkarori-gmail.com>:
[4/6] from: Tom::Conlin::gmail::com at: 27-Feb-2008 1:02
Graham Chiu wrote:
> Nick
> Some way to obfuscate the email addresses from bots would be good.
<<quoted lines omitted: 24>>
>>
>>
rebol[]
obfuscate: func [email [email! string!] /local here][
email: trim to string! email
here: find/last email "."
change/part next here rejoin["(" select TLD-dict here ")"] tail email
replace email "-" " (at) "
replace/all email "." " (dot) "
email: enbase/base email 16
email: trim/lines email
email: skip email 2
forskip email 3 [insert email ";"]
insert tail email ";"
email: head email
forskip email 6 [insert email "&#x"]
email
]
TLD-dict: [
.com
"commercial"
.edu
"educational"
.gov
"governmental"
.net
"network"
.org
"organization"
.aero
"air-transport industry"
.asia
"Asia-Pacific region"
.biz
"business"
.cat
"Catalan"
.coop
"cooperatives"
.info
"information"
.int
"international organizations"
.jobs
"companies"
.mil
"United States Military"
.mobi
"mobile devices"
.museum
"museums"
.name
"individuals, by name"
.pro
"professions"
.travel
"travel and travel-agency related sites"
.ac
"Ascension Island"
.ad
"Andorra"
.ae
"United Arab Emirates"
.af
"Afghanistan"
.ag
"Antigua and Barbuda"
.ai
"Anguilla"
.al
"Albania"
.am
"Armenia"
.an
"Netherlands Antilles"
.ao
"Angola"
.aq
"Antarctica"
.ar
"Argentina"
.as
"American Samoa"
.at
"Austria"
.au
"Australia"
.aw
"Aruba"
.ax
"=C5land"
.az
"Azerbaijan"
.ba
"Bosnia and Herzegovina"
.bb
"Barbados"
.bd
"Bangladesh"
.be
"Belgium"
.bf
"Burkina Faso"
.bg
"Bulgaria"
.bh
"Bahrain"
.bi
"Burundi"
.bj
"Benin"
.bm
"Bermuda"
.bn
"Brunei Darussalam"
.bo
"Bolivia"
.br
"Brazil"
.bs
"Bahamas"
.bt
"Bhutan"
.bv
"Bouvet Island"
.bw
"Botswana"
.by
"Belarus"
.bz
"Belize"
.ca
"Canada"
.cc
"Cocos (Keeling) Islands"
.cd
"Democratic Republic of the Congo"
.cf
"Central African Republic"
.cg
"Republic of the Congo"
.ch
"Switzerland (Confoederatio Helvetica)"
.ci
"C=F4te d'Ivoire"
.ck
"Cook Islands"
.cl
"Chile"
.cm
"Cameroon"
.cn
"China, mainland"
.co
"Colombia"
.cr
"Costa Rica"
.cu
"Cuba"
.cv
"Cape Verde"
.cx
"Christmas Island"
.cy
"Cyprus"
.cz
"Czech Republic"
.de
"Germany (Deutschland)"
.dj
"Djibouti"
.dk
"Denmark"
.dm
"Dominica"
.do
"Dominican Republic"
.dz
"Algeria (Dzayer)"
.ec
"Ecuador"
.ee
"Estonia"
.eg
"Egypt"
.er
"Eritrea"
.es
"Spain (Espa=F1a)"
.et
"Ethiopia"
.eu
"European Union"
.fi
"Finland"
.fj
"Fiji"
.fk
"Falkland Islands"
.fm
"Federated States of Micronesia"
.fo
"Faroe Islands"
.fr
"France"
.ga
"Gabon"
.gb
"Great Britain"
.gd
"Grenada"
.ge
"Georgia"
.gf
"French Guiana"
.gg
"Guernsey"
.gh
"Ghana"
.gi
"Gibraltar"
.gl
"Greenland"
.gm
"The Gambia"
.gn
"Guinea"
.gp
"Guadeloupe"
.gq
"Equatorial Guinea"
.gr
"Greece"
.gs
"South Georgia and the South Sandwich Islands"
.gt
"Guatemala"
.gu
"Guam"
.gw
"Guinea-Bissau"
.gy
"Guyana"
.hk
"Hong Kong"
.hm
"Heard Island and McDonald Islands"
.hn
"Honduras"
.hr
"Croatia (Hrvatska)"
.ht
"Haiti"
.hu
"Hungary"
.id
"Indonesia"
.ie
"Ireland (=C9ire)"
.il
"Israel"
.im
"Isle of Man"
.in
"India"
.io
"British Indian Ocean Territory"
.iq
"Iraq"
.ir
"Iran"
.is
"Iceland (=CDsland)"
.it
"Italy (Italia)"
.je
"Jersey"
.jm
"Jamaica"
.jo
"Jordan"
.jp
"Japan"
.ke
"Kenya"
.kg
"Kyrgyzstan"
.kh
"Cambodia (Khmer)"
.ki
"Kiribati"
.km
"Comoros"
.kn
"Saint Kitts and Nevis"
.kr
"South Korea"
.kw
"Kuwait"
.ky
"Cayman Islands"
.kz
"Kazakhstan"
.la
"Laos"
.lb
"Lebanon"
.lc
"Saint Lucia"
.li
"Liechtenstein"
.lk
"Sri Lanka"
.lr
"Liberia"
.ls
"Lesotho"
.lt
"Lithuania"
.lu
"Luxembourg"
.lv
"Latvia"
.ly
"Libya"
.ma
"Morocco"
.mc
"Monaco"
.md
"Moldova"
.mg
"Madagascar"
.mh
"Marshall Islands"
.mk
"Republic of Macedonia"
.ml
"Mali"
.mm
"Myanmar"
.mn
"Mongolia"
.mo
"Macau"
.mp
"Northern Mariana Islands"
.mq
"Martinique"
.mr
"Mauritania"
.ms
"Montserrat"
.mt
"Malta"
.mu
"Mauritius"
.mv
"Maldives"
.mw
"Malawi"
.mx
"Mexico"
.my
"Malaysia"
.mz
"Mozambique"
.na
"Namibia"
.nc
"New Caledonia"
.ne
"Niger"
.nf
"Norfolk Island"
.ng
"Nigeria"
.ni
"Nicaragua"
.nl
"Netherlands"
.no
"Norway"
.np
"Nepal"
.nr
"Nauru"
.nu
"Niue"
.nz
"New Zealand"
.om
"Oman"
.pa
"Panama"
.pe
"Peru"
.pf
"French Polynesia"
.pg
"Papua New Guinea"
.ph
"Philippines"
.pk
"Pakistan"
.pl
"Poland"
.pm
"Saint-Pierre and Miquelon"
.pn
"Pitcairn Islands"
.pr
"Puerto Rico"
.ps
"Palestinian territories"
.pt
"Portugal"
.pw
"Palau"
.py
"Paraguay"
.qa
"Qatar"
.re
"R=E9union"
.ro
"Romania"
.ru
"Russia"
.rw
"Rwanda"
.sa
"Saudi Arabia"
.sb
"Solomon Islands"
.sc
"Seychelles"
.sd
"Sudan"
.se
"Sweden"
.sg
"Singapore"
.sh
"Saint Helena"
.si
"Slovenia"
.sj
"Svalbard and Jan Mayen Islands"
.sk
"Slovakia"
.sl
"Sierra Leone"
.sm
"San Marino"
.sn
"Senegal"
.so
"Somalia"
.sr
"Suriname"
.st
"S=E3o Tom=E9 and Pr=EDncipe"
.su
"former Soviet Union"
.sv
"El Salvador"
.sy
"Syria"
.sz
"Swaziland"
.tc
"Turks and Caicos Islands"
.td
"Chad"
.tf
"French Southern and Antarctic Lands"
.tg
"Togo"
.th
"Thailand"
.tj
"Tajikistan"
.tk
"Tokelau"
.tl
"East Timor"
.tm
"Turkmenistan"
.tn
"Tunisia"
.to
"Tonga"
.tp
"East Timor"
.tr
"Turkey"
.tt
"Trinidad and Tobago"
.tv
"Tuvalu"
.tw
"Taiwan, Republic of China"
.tz
"Tanzania"
.ua
"Ukraine"
.ug
"Uganda"
.uk
"United Kingdom"
.um
"United States Minor Outlying Islands"
.us
"United States of America"
.uy
"Uruguay"
.uz
"Uzbekistan"
.va
"Vatican City State"
.vc
"Saint Vincent and the Grenadines"
.ve
"Venezuela"
.vg
"British Virgin Islands"
.vi
"U.S. Virgin Islands"
.vn
"Vietnam"
.vu
"Vanuatu"
.wf
"Wallis and Futuna"
.ws
"Samoa"
.ye
"Yemen"
.yt
"Mayotte"
.yu
"Yugoslavia"
.za
"South Africa Zuid-Afrika"
.zm
"Zambia"
.zw
"Zimbabwe"
]
[5/6] from: nick1:musiclessonz at: 27-Feb-2008 7:23
Thanks Tom! Lol, I did:
(replace (replace bb/5 "-" " at ") "." " dot ")
Graham Chiu wrote:
> Nick
>
> Some way to obfuscate the email addresses from bots would be good.
>
> On Wed, Feb 27, 2008 at 7:40 PM, Nick Antonaccio <nick1-musiclessonz.com> wrote:
[Hide Quoted Text]
>> I wrote a little member board recently. Feel free to use it if you
>> like - it could easily be altered (has been) to create a useful
<<quoted lines omitted: 7>>
>>
>> Users can edit their own password protected entries, and upload/change
[Hide Quoted Text]
>> their own images (and other files), as desired. A default image
>> appears until the user uploads one. http:// addresses are
<<quoted lines omitted: 10>>
>>
>>
rebol[]
obfuscate: func [email [email! string!] /local here][
email: trim to string! email
here: find/last email "."
change/part next here rejoin["(" select TLD-dict here ")"] tail email
replace email "-" " (at) "
replace/all email "." " (dot) "
email: enbase/base email 16
email: trim/lines email
email: skip email 2
forskip email 3 [insert email ";"]
insert tail email ";"
email: head email
forskip email 6 [insert email "&#x"]
email
]
TLD-dict: [
.com
"commercial"
.edu
"educational"
.gov
"governmental"
.net
"network"
.org
"organization"
.aero
"air-transport industry"
.asia
"Asia-Pacific region"
.biz
"business"
.cat
"Catalan"
.coop
"cooperatives"
.info
"information"
.int
"international organizations"
.jobs
"companies"
.mil
"United States Military"
.mobi
"mobile devices"
.museum
"museums"
.name
"individuals, by name"
.pro
"professions"
.travel
"travel and travel-agency related sites"
.ac
"Ascension Island"
.ad
"Andorra"
.ae
"United Arab Emirates"
.af
"Afghanistan"
.ag
"Antigua and Barbuda"
.ai
"Anguilla"
.al
"Albania"
.am
"Armenia"
.an
"Netherlands Antilles"
.ao
"Angola"
.aq
"Antarctica"
.ar
"Argentina"
.as
"American Samoa"
.at
"Austria"
.au
"Australia"
.aw
"Aruba"
.ax
"=C5land"
.az
"Azerbaijan"
.ba
"Bosnia and Herzegovina"
.bb
"Barbados"
.bd
"Bangladesh"
.be
"Belgium"
.bf
"Burkina Faso"
.bg
"Bulgaria"
.bh
"Bahrain"
.bi
"Burundi"
.bj
"Benin"
.bm
"Bermuda"
.bn
"Brunei Darussalam"
.bo
"Bolivia"
.br
"Brazil"
.bs
"Bahamas"
.bt
"Bhutan"
.bv
"Bouvet Island"
.bw
"Botswana"
.by
"Belarus"
.bz
"Belize"
.ca
"Canada"
.cc
"Cocos (Keeling) Islands"
.cd
"Democratic Republic of the Congo"
.cf
"Central African Republic"
.cg
"Republic of the Congo"
.ch
"Switzerland (Confoederatio Helvetica)"
.ci
"C=F4te d'Ivoire"
.ck
"Cook Islands"
.cl
"Chile"
.cm
"Cameroon"
.cn
"China, mainland"
.co
"Colombia"
.cr
"Costa Rica"
.cu
"Cuba"
.cv
"Cape Verde"
.cx
"Christmas Island"
.cy
"Cyprus"
.cz
"Czech Republic"
.de
"Germany (Deutschland)"
.dj
"Djibouti"
.dk
"Denmark"
.dm
"Dominica"
.do
"Dominican Republic"
.dz
"Algeria (Dzayer)"
.ec
"Ecuador"
.ee
"Estonia"
.eg
"Egypt"
.er
"Eritrea"
.es
"Spain (Espa=F1a)"
.et
"Ethiopia"
.eu
"European Union"
.fi
"Finland"
.fj
"Fiji"
.fk
"Falkland Islands"
.fm
"Federated States of Micronesia"
.fo
"Faroe Islands"
.fr
"France"
.ga
"Gabon"
.gb
"Great Britain"
.gd
"Grenada"
.ge
"Georgia"
.gf
"French Guiana"
.gg
"Guernsey"
.gh
"Ghana"
.gi
"Gibraltar"
.gl
"Greenland"
.gm
"The Gambia"
.gn
"Guinea"
.gp
"Guadeloupe"
.gq
"Equatorial Guinea"
.gr
"Greece"
.gs
"South Georgia and the South Sandwich Islands"
.gt
"Guatemala"
.gu
"Guam"
.gw
"Guinea-Bissau"
.gy
"Guyana"
.hk
"Hong Kong"
.hm
"Heard Island and McDonald Islands"
.hn
"Honduras"
.hr
"Croatia (Hrvatska)"
.ht
"Haiti"
.hu
"Hungary"
.id
"Indonesia"
.ie
"Ireland (=C9ire)"
.il
"Israel"
.im
"Isle of Man"
.in
"India"
.io
"British Indian Ocean Territory"
.iq
"Iraq"
.ir
"Iran"
.is
"Iceland (=CDsland)"
.it
"Italy (Italia)"
.je
"Jersey"
.jm
"Jamaica"
.jo
"Jordan"
.jp
"Japan"
.ke
"Kenya"
.kg
"Kyrgyzstan"
.kh
"Cambodia (Khmer)"
.ki
"Kiribati"
.km
"Comoros"
.kn
"Saint Kitts and Nevis"
.kr
"South Korea"
.kw
"Kuwait"
.ky
"Cayman Islands"
.kz
"Kazakhstan"
.la
"Laos"
.lb
"Lebanon"
.lc
"Saint Lucia"
.li
"Liechtenstein"
.lk
"Sri Lanka"
.lr
"Liberia"
.ls
"Lesotho"
.lt
"Lithuania"
.lu
"Luxembourg"
.lv
"Latvia"
.ly
"Libya"
.ma
"Morocco"
.mc
"Monaco"
.md
"Moldova"
.mg
"Madagascar"
.mh
"Marshall Islands"
.mk
"Republic of Macedonia"
.ml
"Mali"
.mm
"Myanmar"
.mn
"Mongolia"
.mo
"Macau"
.mp
"Northern Mariana Islands"
.mq
"Martinique"
.mr
"Mauritania"
.ms
"Montserrat"
.mt
"Malta"
.mu
"Mauritius"
.mv
"Maldives"
.mw
"Malawi"
.mx
"Mexico"
.my
"Malaysia"
.mz
"Mozambique"
.na
"Namibia"
.nc
"New Caledonia"
.ne
"Niger"
.nf
"Norfolk Island"
.ng
"Nigeria"
.ni
"Nicaragua"
.nl
"Netherlands"
.no
"Norway"
.np
"Nepal"
.nr
"Nauru"
.nu
"Niue"
.nz
"New Zealand"
.om
"Oman"
.pa
"Panama"
.pe
"Peru"
.pf
"French Polynesia"
.pg
"Papua New Guinea"
.ph
"Philippines"
.pk
"Pakistan"
.pl
"Poland"
.pm
"Saint-Pierre and Miquelon"
.pn
"Pitcairn Islands"
.pr
"Puerto Rico"
.ps
"Palestinian territories"
.pt
"Portugal"
.pw
"Palau"
.py
"Paraguay"
.qa
"Qatar"
.re
"R=E9union"
.ro
"Romania"
.ru
"Russia"
.rw
"Rwanda"
.sa
"Saudi Arabia"
.sb
"Solomon Islands"
.sc
"Seychelles"
.sd
"Sudan"
.se
"Sweden"
.sg
"Singapore"
.sh
"Saint Helena"
.si
"Slovenia"
.sj
"Svalbard and Jan Mayen Islands"
.sk
"Slovakia"
.sl
"Sierra Leone"
.sm
"San Marino"
.sn
"Senegal"
.so
"Somalia"
.sr
"Suriname"
.st
"S=E3o Tom=E9 and Pr=EDncipe"
.su
"former Soviet Union"
.sv
"El Salvador"
.sy
"Syria"
.sz
"Swaziland"
.tc
"Turks and Caicos Islands"
.td
"Chad"
.tf
"French Southern and Antarctic Lands"
.tg
"Togo"
.th
"Thailand"
.tj
"Tajikistan"
.tk
"Tokelau"
.tl
"East Timor"
.tm
"Turkmenistan"
.tn
"Tunisia"
.to
"Tonga"
.tp
"East Timor"
.tr
"Turkey"
.tt
"Trinidad and Tobago"
.tv
"Tuvalu"
.tw
"Taiwan, Republic of China"
.tz
"Tanzania"
.ua
"Ukraine"
.ug
"Uganda"
.uk
"United Kingdom"
.um
"United States Minor Outlying Islands"
.us
"United States of America"
.uy
"Uruguay"
.uz
"Uzbekistan"
.va
"Vatican City State"
.vc
"Saint Vincent and the Grenadines"
.ve
"Venezuela"
.vg
"British Virgin Islands"
.vi
"U.S. Virgin Islands"
.vn
"Vietnam"
.vu
"Vanuatu"
.wf
"Wallis and Futuna"
.ws
"Samoa"
.ye
"Yemen"
.yt
"Mayotte"
.yu
"Yugoslavia"
.za
"South Africa Zuid-Afrika"
.zm
"Zambia"
.zw
"Zimbabwe"
]
[6/6] from: Paavo::Nevalainen::saunalahti::fi at: 27-Feb-2008 17:43
At 08:57 AM 2/27/2008, Graham Chiu wrote:
>Some way to obfuscate the email addresses from bots would be good.
My favorite obfuscator is this one:
; ---------------------------------- yes this is code from now on
----------------------------
init-email2pngs: func [
char [string!]
][
return view/new/options layout [
origin 4x2
text rejoin [char ""] ; old View versions, use [char " "]
] [resize no-border]
]
if not exists? %pngs/ [
make-dir %pngs/
for i 0 255 1 [
save/png to-file rejoin ["pngs/" i ".png"] to-image
init-email2pngs to-string to-char i
]
]
email2pngs: function [
email [email!]
][ out char
][
out: make string! ""
foreach char to-string email [
append out rejoin [
{<img src="} html-address {pngs/} to-integer char {.png"></a>}
]
]
return out
]
test: does [
html-address: http://your.favorite.com/
email-address: charlie.brown-ubiquituous.com
print rejoin ["<tr><td>contact info: </td><td>" email2pngs
email-address "</td></tr>"]
]
; --------------------------------- the code is not all, the world
begins here -------------
This might be originally one of the classic REBOL examples, I use it
so that I add the above code
to my CGI folder , and after the first "compile" I copy the %pngs/
directory to the html folder.
The code uses the limited part of the classic 255 chars ASCII, I
think nowadays some more
chars are supported (e.g. ä) but still no UNICODE I think, so
it is quite valid piece of code.
I use this function especially where the normal obfuscation is
enough, e.g. when there are names
of persons and such things. Of course the formatting can vary and
spacing made more intelligent.
-- Attached file included as plaintext by Ecartis --
REBOL []
change-dir %/c/documents and settings/tapani/työpöytä/uusi kansio/
init-email2pngs: func [
char [string!]
][
return view/new/options layout [
origin 4x2
text rejoin [char ""] ; old View versions, use [char " "]
] [resize no-border]
]
if not exists? %pngs/ [
make-dir %pngs/
for i 0 255 1 [
save/png to-file rejoin ["pngs/" i ".png"] to-image init-email2pngs to-string to-char
i
]
]
email2pngs: function [
email [email!]
][ out char
][
out: make string! ""
foreach char to-string email [
append out rejoin [
{<img src="} html-address {pngs/} to-integer char {.png"></a>}
]
]
return out
]
email2chars: function [
email [email!]
][ out char
][
out: make string! ""
foreach char to-string email [append out rejoin ["&#" to-integer char ";"]]
return out
]
test: does [
html-address: http://your.favorite.com/
print rejoin ["<tr><td>contact info: </td><td>" email2pngs charlie.brown-ubiquituous.com
"</td></tr>"]
]
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted