quaker wrote:
Ref: PBL114749
68.32.0.0/11 is listed on the Policy Block List (PBL)


Outbound Email Policy of Comcast for this IP range:

Email sent by Comcast subscribers using a mail program such as Outlook Express are required to send the email through Comcast. To insure your mail program is properly configured, please visit http://www.comcast.net/help/faq/index.jsp?faq=Email117481. If you are a Comcast Commercial Services customer and need support, please contact support_biz@cable.comcast.com

i used the sbl-xbl.spamhaus.org and now it works on my site.

Think I'll stay away from the pbl blocklist for checks such as this (and just use the PBL and XBL), as I suspect it wouldn't help much on a website anyway. Besides, blocking all Comcast subscribers would most definetely be a very bad idea as I understand they're quite big...right? wink

quaker wrote:

this what i get when i try ur site...


Unfortunately, it would appear that your current IP address is listed in one of the spam databases we queried.
            Because of this, you will not be able to register a new account at this point in time. If you believe this to
            be a mistake, we urge you to read the FAQ over at The Spamhaus Project
            for more details, including actions you can take to resolve this issue.

Ok, then your IP really is listed in one of the blacklists. Do as I said, and get your IP checked directly at the spamhaus website, then report back here. I suspect you'll find that it's either listed in the XBL or PBL lists. If so, use the sbl.spamhaus.org address instead of the one I originally posted.

Ninjaedit: Nice to see that it solved it for you. I'll edit my original post and the script on my website so I don't block to many legitimate users accidentally smile

quaker wrote:

codexp i added the code to my site and now it says my ip is listed when i try to register..lol.
Q
http://modelcrowd.com/register.php

Strange...though, if I were you I'd go to this page on the Spamhaus website and type in your IP address in the "lookup IP address" field. The reason for this is that while you're probably not listed as a spammer, it may be that you're behind some form of blacklisted proxy on your ISP's side. If so, there's one thing you can do; change the "$checkspam['blocklist']" variable from "zen.spamhaus.org" over to one of the following:

- sbl.spamhaus.org (this is just the spammer blocklist)
- sbl-xbl.spamhaus.org (this includes open proxies, trojans and other exploits as well).

The one I used is the most restrictive one, so I suppose it could cause problem. I did not have problem reaching your registration page though, so it's not a problem with the DNS lookup itself...thankfully smile

If you'd like, you can try opening the registration page on one of my websites and see if you're getting blocked there as well.

quaker wrote:

codexp, is that the only thing that required to add to the register.php?




Q

Yes, it's all you'll need for it to work.. It's really quite simple, it just does a reverse dns lookup of a users address, so as long as you don't need any logging functions or the ability to override the check for certain IPs, it doesn't have to be more complicated than this smile

shieldwolf wrote:

Thank you for the info.  I currently have a MOD that requires the user to enter what they see visually.  It appears to not do the thing.  I will keep your MOD under advisement.

Also, thank you for the hdiff file.  It seems the long way, but the sure way.

Here's what I'm using to protect myself against a lot of the spammers out there. It's a very simplified version of one of my first PunBB mods, and it works well for me smile I've tried to comment the code as best I can to explain what it does...

Open register.php, and find on line 27:

require PUN_ROOT.'include/common.php';

Add after:

/***************************
   START SPAM PROTECTION
***************************/

// Address of the blocklist server
$checkspam['blocklist'] = 'sbl-xbl.spamhaus.org';

// Build the url to check (reverse DNS query). If you want to test if it works on
// your server, replace the "get_remote_address()" part with the following: '127.0.0.2'
$checkspam['Reverse DNS'] = implode( '.', array_reverse( explode( '.', get_remote_address() ) ) ) . '.' . $checkspam['blocklist'];

// Do the actual lookup. If the users IP is listed in the blocklist, we will be given just an IP back from the queried server.
// If the user is *not* listed as a spammer, the result we get back from the server will be the same string as we sent.
if( $checkspam['Reverse DNS'] != gethostbyname($checkspam['Reverse DNS']) ) {
    
    message('Unfortunately, it would appear that your current IP address is listed in one of the anti-spam databases we queried.
            Because of this, you will not be able to register a new account at this point in time. If you believe this to
            be a mistake, we urge you to read the FAQ over at <a href="http://www.spamhaus.org/faq/index.lasso">The Spamhaus Project</a>
            for more details, including actions you can take to resolve this issue.',true);
}

/****************************
   END OF SPAM PROTECTION
****************************/

Save & upload.

If you allow anonymous posts on your forum, if would be a good idea to do the same with post.php (line numbers should be the same).


EDIT: Changed blocklist to a slightly less strict one as it would appear some legitimate users, like quaker, encountered problems with the original one...and we don't want that, now do we wink

31

(9 replies, posted in General discussion)

pevone wrote:
CodeXP wrote:

Sure, just create a PHP script with something like this:

Uff, I am a PHP noob.

Is there keyword for that "mechanism", that you could give me?
So I could google something more about it.

Not sure I understand what you're asking, but I if by mechanism you're asking how the code I posted works, you could take a look at this PHP manual page about the "header" function.

Jérémie wrote:

e seems nice. It's beta status quite shows, but the project is very interesting.

Just thought I'd let you know that E is no longer a beta product smile A lot of improvements have been done over these last few builds, and I'm really happy with it so far...

33

(26 replies, posted in General discussion)

Didn't have the time to look to closely at your code, but the error is caused by exessive use of   causing the validator to break. I just ran the following regex on your code

(?: ){2,}

(deleted the matches) and it solved all of the errors

guardian34 wrote:

I'd also change the shortcut for the language array tooltip to something else (Ctrl+H is already used by the PHP bundle for documentation lookup).

ALT+H you mean? Yes, I am aware of that, and it's actually part of why I used it. The lang array tooltip shortcut is only available within the source.php string.quoted, string.quoted.single.php, string.quoted.double.php scopes, so I don't really think it will conflict (well, I suppose in theory it could in the string.quoted.double.php scope). It could possibly cause some confusion though, so I'll change it if you think it'll help smile

guardian34 wrote:
CodeXP wrote:

As I was reading trough the "What editor do you use for PHP?" thread here at the PunBB forums, I encountered a very basic Textmate bundle by guardian34. This got me thinking, why not start working on a more expansive bundle, with most of the commonly used functions, variables and things like database queries.

Good idea. smile


CodeXP wrote:

As I do not own a Mac, I have not been able to test this with Textmate. E-Texteditor bundles is compatible with Textmate though, so it should work just fine. If not, please let me know.

It does work fine with TextMate once it's loaded. However, before I loaded it, I changed the uuid of your bundle to something else because it was the same as mine (I think it would've merged the two bundles together, which I didn't want).

FWIW, I just made a new (temporary) bundle and copied the uuid from that (9345B070-717F-44A9-A4B9-6D58DD28C394).

Thanks for reporting. I'll update the SVN repo right away, in case anyone have both bundles installed. It does have the same UUID, as first installed yours, then removed the snippets and made my own ones. The problem is that the E bundle editor doesn't let you chance that, so I forgot to manually edit the xml file smile

So you did not have any problem with it on textmate? Great to hear, as I was slightly worried as a few of the commands contains both a Mac and Windows specific version, because Cygwin and Windows native installations of PHP did not work perfectly together all the time.

Jérémie wrote:

Neh... when I say “it shows”... well, it shows. I just installed the trial, I created a new file and try to save it. I got an error, the file is created with the name at the location but is empty.

Strange...I've experienced many different minor and major problems over the various releases since I started using it, but that's one I've never encountered (thankfully). Have you reported it to Alexander over at the E forums?

Jérémie wrote:

e seems nice. It's beta status quite shows, but the project is very interesting.

Yes, it does show that it's a beta product but I find that I'm a lot more productive when using it compared to most other editors. I do think some of the problems one might attribute to the beta status of E is actually limitations of Cygwin that it uses for bundle compatibility. Cygwin needs unicode builds fast, as that is what have been causing the most problems for me (well, aside from the damned milestones feature messing things up at times, if you use it).

As I was reading trough the "What editor do you use for PHP?" thread here at the PunBB forums, I encountered a very basic Textmate bundle by guardian34. This got me thinking, why not start working on a more expansive bundle, with most of the commonly used functions, variables and things like database queries. As I was on vacation and got sick, I started getting tired of not having a internet connection and figured that I'd start working on this. While there still is things that could be expanded upon and added to it, it contains a lot of what I use the most (and some I don't ever use).

http://www.getyeflask.com/uploads/menus.png

Most of the functions available in this bundle should be pretty obvious to figure out, but I took a few screenshots of two things that you might not notice: Array key tooltips for all the default $lang_whatever variables + $pun_config. I just thought it would be nice to do this, as I frequently forget the key name I need if I don't have the lang file open already.

Just press [ALT]+[H] when in the [''] part of the variable ($lang_common['<cursor here>']).
http://www.getyeflask.com/uploads/lang_tooltip.png

http://www.getyeflask.com/uploads/pun_config_tooltip.png

REQUIREMENTS:
* E-Texteditor or Textmate.
* A working PHP installation (php must be available in the PATH). This only applies for commands like the var tooltips etc.

NOTE:
As I do not own a Mac, I have not been able to test this with Textmate. E-Texteditor bundles is compatible with Textmate though, so it should work just fine. If not, please let me know.

DOWNLOAD:
Zipped archive (On windows, extract to %APPDATA%\e\Bundles\): PunBB bundle 1.0.0 (36 KB).
SVN access (folder goes to the same place as the zip archive above: http://www.getyeflask.com/svn/punbb_tmbundle/

39

(9 replies, posted in General discussion)

pevone wrote:
Smartys wrote:

You wouldn't be able to see any data about the referring page necessarily, other than the URL

Yeah. But, if I would change to user friendly url (with punbb3), the admin of the linked page could read the category or the threadtitle of my forum. And that's something, I don't want him to -.- And on the other hand I dont want to miss user friendly urls.


abclf wrote:

You may try a redirection using google, so that I suppose Google will appear as the referer.
(http://www.google.com/url?q=http://www.punbb.org)

Ah, cool.
Would it be possible, that I host such a service by myself?
eg:

my forum: example.org/forum/

And I want to use "example.org/url?q=http://www.punbb.org" for extern links in my forum,
so that the refer(r)er is "example.org" and not "example.org/forum/"

Sure, just create a PHP script with something like this:

<?php
$url = isset($_GET['q']) ? htmlspecialchars($_GET['q']) : false;

if( $url != false )
    header('Location: '.$url);

?>

40

(8 replies, posted in Programming)

In general, you would be best served to use in on *all* user-submited data before displaying the page(s).

Well, your code is rather broken but you can do it easier by just replacing that code with:

.pun a:link, .pun a:visited, .pun a:hover {
    text-decoration: underline
}

42

(4 replies, posted in PunBB 1.2 troubleshooting)

Just the footer? If so:

    .pun div#brdfooter a:link, .pun div#brdfooter a:visited { text-decoration: underline }

43

(4 replies, posted in PunBB 1.2 troubleshooting)

Just add this to your stylesheet:

    .pun div.tclcon a:link, .pun div.tclcon a:visited { text-decoration: underline }

44

(5 replies, posted in PunBB 1.2 discussion)

Just played around with the functions file and here's what you can do to be able to use BBCode in the ban messages.

1. Open ./include/functions.php and find on line 191

    $bans_altered = false;

2. Add after:

    require PUN_ROOT.'include/parser.php';

3. Find on line 206

            message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'<br /><br /><strong>'.pun_htmlspecialchars($cur_ban['message']).'</strong><br /><br />' : '<br /><br />').$lang_common['Ban message 4'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', true);

4. Replace with

            message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'</p>'.parse_message($cur_ban['message'], false).'<p>' : '<br /><br />').$lang_common['Ban message 4'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', true);

5. Find on line 220

                    message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'<br /><br /><strong>'.pun_htmlspecialchars($cur_ban['message']).'</strong><br /><br />' : '<br /><br />').$lang_common['Ban message 4'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', true);

6. Replace with

                    message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'</p>'.parse_message($cur_ban['message'], false).'<p>' : '<br /><br />').$lang_common['Ban message 4'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', true);

7. Save & upload


Hope this helps smile

EDIT: Almost forgot, if you want to use HTML instead of BBCode, just replace pun_htmlspecialchars($cur_ban['message']) with $cur_ban['message'] on line 206 & 220 instead of following the steps listed above.

While I don't have time to make a full mod/admin plugin for this right now, I just wrote the following for you. Just add ranges to the $pun_allow_ip_ranges array (the first 3 blocks of the IP's you want to allow). The drawback by not having a admin plugin is that you'll have to manually add IP's directly to the register.php file when you want to add/remove allowed addresses, but I hope it helps you out a little smile

Just open ./register.php and find on line 41:

require PUN_ROOT.'lang/'.$pun_user['language'].'/prof_reg.php';

Add after:

/**
 * - Limit allowed IP ranges during registration -
 *
 * Step 1:
 *
 * Array of allowed IP ranges. I'm using only the first 3 blocks here, so if you
 * need to be more specific you'll have to change the regex in step #2. Just add
 * addresses in the same way as I've written the example IP's.
 */

$pun_allow_ip_ranges = array(
    '127.0.0',
    '192.168.1'
);

/**
 * Step 2:
 *
 * Get the first 3 blocks from the users IP address, and capture it into the
 * $user_ip variable, then check if it is within the allowed range. If we can't
 * get the users IP address for whatever reason, we will also exit with a
 * "bad request" message.
 */

if( preg_match('#(\d{1,3}\.\d{1,3}\.\d{1,3})\.\d{1,3}#', get_remote_address(), $user_ip) ) {
    if( !in_array($user_ip[1], $pun_allow_ip_ranges) )
        message($lang_common['No permission']);
} else {
    message($lang_common['Bad request']);
}

46

(19 replies, posted in PunBB 1.2 show off)

A few observations and suggestions:
- The blue colours used for the links, and the green used for usernames are quite hard on the eyes. Just not enough contrast.
- You should consider increasing the height of the background image used in the table headers, as if you increase the text size in your browser it doesn't cover the entire block.
- Adding a slight background texture to the body might make it look better, as the "glass" effects used for the headers stands out a bit much in comparison to the more minimalist look you seem to be aiming for with the rest of the page.
- As already mentioned, a logo might be a good idea, but just adding your sites name in a larger font there would make it look a bit less empty.

Other than that, I kinda like it smile

Should be very easy to do, as I already did that once with another block list. I haven't done anything with my mod in a year or two, but it should work without issues on all .2 versions seeing as it doesn't really modify PunBB's code in any way other that adding one include statement. If I remember correctly, I also left in an option in the admin plugin to add a new blocklist provider, so I would think you could get started using that thing right away.

Here's the link if you're interested.

48

(25 replies, posted in General discussion)

I've seen many amazing sites done with Expression Engine. It comes in both free and paid versions, so it couldn't hurt checking it out.

quaker wrote:

dr J can some html tools be added sometype of editor with stuff...lol.

Well, it wouldn't be that difficult to add (there's plenty of javascripts that could be adapted for it) but it would be dangerous to use something like that if editing PHP files etc...

50

(66 replies, posted in General discussion)

Lighttpd is actually not that hard to configure at all, though XAMPP would certainly be easier. The main thing to keep in mind when trying to setup lighttpd with PHP on Windows, is that it will not work properly (or at all) running with FastCGI.
The MySQL part though is about as painless as can be smile