moaiamorfo wrote:

then, after the (1) line, put this:

var max=<?php echo $max; ?>;
var randomValue1=Math.floor(Math.random()*max);
var randomValue2=Math.floor(Math.random()*max);
var theSum=randomValue1+randomValue2;
max*=2;

function upAndDown(the_form, sign){
    var theValue=the_form.elements["mathValue"].value;
    if(sign=="+" && theValue<max) theValue++;
    else if(sign=="-" && theValue>0) theValue--;
    the_form.elements["mathValue"].value=theValue;
}

you might want to clarify the insertion of that above data.. there is no "(1)" in the header.php code anywhere.

27

(3 replies, posted in Feature requests)

you might wanna inform the fine punFolk here that this function is within include/functions.php smile

guardian34 wrote:

I didn't test it, but something like this should work:

$result = $db->query('SELECT t.last_post FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL ORDER BY t.last_post DESC LIMIT 1') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
$last_post = format_time($db->result($result));

is it really necessary to join 3 tables whereas to get the same results, this simple query command outputs the exact same thing?

$result = $db->query('SELECT MAX(last_post) FROM '.$db->prefix.'topics WHERE moved_to IS NULL') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
$last_post = format_time($db->result($result));
deadram wrote:

That mod already exists, doesn't it? It's called 50 moderators from different time zones big_smile

lol nice. but a curious question for the dude who runs this place... (or has mysql access):

run this sql query command:

mysql> SELECT username, num_posts, timezone FROM users WHERE timezone < -11 ORDER BY num_posts DESC;
Empty set (0.00 sec)

how many users you have? any with posts? chances are, they are 99.9999999% spammer/spambot. here's why:

link: http://www.worldtimezone.com/utc/utc-1200.html

The International Date Line is between time zones M(Mike) and Y(Yankee) as imaginary line on the Earth that separates two consecutive calendar days.

Date in the Eastern hemisphere, to the left of the line- time zone M (Mike)- is always one day ahead of the date in the Western hemisphere, to the right of the International Date Line- time zone Y (Yankee).

It has been recognized as a matter of convenience and has no force in international law.

30

(11 replies, posted in Feature requests)

As it should remain so. Giving users the ability to delete their own accounts is not in the best interest at heart.

31

(18 replies, posted in PunBB 1.2 troubleshooting)

F.M wrote:

Does this server require a username and password?

of COURSE it does!

F.M wrote:

Also how do i ensure that my php install supports ssl?

you can create a phpinfo.php file that contains:

<?
        phpinfo();
?>

and browse to phpinfo.php in your browser and discover:

http://www.thinkgleek.com/images/phpinfo-ssl.jpg

or go to your Administrative Menu, and click on the "Show info" link in the Environment Statistics area.
(ie: http://www.yourdomain.com/admin_index.p … on=phpinfo )

elbekko wrote:

What kind of mod?

i'm interested in a mod that will do my discrete mathematics for me... you know logic tables, venn diagrams, intersects, unions, set theory, eulerian paths, pascal's triangle and more! haha all this just to verify if it's a human upon registering and not a spambot! tongue

33

(2 replies, posted in PunBB 1.2 troubleshooting)

thats cuz you'd have to edit the .css file within each theme in the /styles/ dir

Dr.Jeckyl wrote:

hehe... i thought that was how it was supposed to thegleek. i've only visited your site in ff so i never noticed the difference.

yar.. i have more users on my site using FF than MSIE.. so i gotta please the masses! smile have u signed up on my punbb???

Paul wrote:

Its background-attachement: fixed which is the problem. It causes the image to be fixed with regard to the viewport not the div. If you scroll your page slightly so that the top of the header is touching the top of the viewport you will see it aligns perfectly.

The short answer is get rid of it.

wow!!!! that was purely beautiful of ya! fixed!

one of these days i'll have to shut myself deep in a basement and force all this css knowledge upon me... it'll take some months once i come back up into the real world again... tongue

36

(27 replies, posted in PunBB 1.2 troubleshooting)

reviewum.com wrote:
Paul wrote:
elbekko wrote:

Because over 60% of the world's internet users use IE6/7?

Make that more like 85%.

More like 90%.   I have quite a bit of diversity in all the sites I host.  Tech sites tend to have more of a 80 / 20% split while non tech sites can be up to 95 / 5% split.

you wanna shoot out stats? show me your google analytics if u wanna get technical. here's an example of my website from oct 2006 to today, by browser:

http://www.thinkgleek.com/images/browser_versions-all.jpg

and even a breakdown of % of what version of MSIE was being used:

http://www.thinkgleek.com/images/browser_versions-MSIE.jpg

37

(30 replies, posted in PunBB 1.2 discussion)

Smartys wrote:

thegleek: Why do you always seem to be so combative? tongue

sorry. bad online persona? i dunno. i just took you the wrong way when you said it couldnt be done. and i was just saying it could be done.

Smartys wrote:

Nobody is stopping anyone from creating a mod, nobody has said that it isn't a possibility for 1.3, and PunBB is not phpBB (and it wasn't a feature in phpBB for a while as well)

smile

hey - i have an issue too. but it's between MSIE -vs- FireFox... probably CSS related.

my site (with header graphic) as seen thru MSIE [v6.0.xxxx.xxxx] eyes:

http://www.thinkgleek.com/images/tg-header-msie.jpg

and same site (with header graphic) as seen thru Firefox [v2.0.0.1] eyes:

http://www.thinkgleek.com/images/tg-header-firefox.jpg

can anyone here help me fix my css code for this?

Smartys wrote:

That's not related to the mod being complicated, that's simply having too many false positives wink
It depends on what your users post. I know, for example, forums that allow lots of cussing seem to have more false positives.

hence it absolutely has no value for me or my community. yet, we dont enjoy the spambots either.

Smartys wrote:

The Akismet mod isn't complicated at all: in fact, it's much less complex than changing groups based on post count tongue
1.3 will make dealing with spam much easier, both with tools in the core and with spam fighting extensions.

i had nothing but trouble with mine when i installed it. anytime any one posted anything. since my forum is not of serious tone or nature, askimet pretty much automatically banned that user. i've long given up on it, unless you can tell me otherwise why it failed to work on my system.

argh! of all the 7+ years i've been coding in php, i have always used an ending ?>

i really can't come up with one single reason why it's beneficial to not end a <?php with one. /me sighs.

42

(30 replies, posted in PunBB 1.2 discussion)

Smartys wrote:

You can't ban a whole TLD by default. To do so, you would need to edit the is_banned_email function in include/email.php at least (and admin_bans.php if you don't want to insert/edit bans involving entire TLDs via the command line)

you can ban entire tld's in phpBB with ease. just input *@*.tld where tld = {ru, biz, etc...) and it wont allow those emails to be used for registration.

i dont see why this cant be an easy mod for 1.2.x series and not considered for the 1.3.x project.

both the timezone 'none' mod and the math mod are ingenious solutions to these spam bots signing up! askimet is far too complicated and has too many false negatives to be dealt with. askimet and captcha are not the best solution to your spam problems. i've seen 1000s of spambots get past those with ease.

elbekko wrote:

You must've added that yourself then (or some silly auto-completing IDE).

k so you got me on that one... according to the install.php:

        /// Display config.php and give further instructions
        $config = '<?php'."\n\n".'$db_type = \''.$db_type."';\n".'$db_host = \''.$db_host."';\n"
.'$db_name = \''.$db_name."';\n".'$db_username = \''.$db_username."';\n".'$db_password = \''
.$db_password."';\n".'$db_prefix = \''.$db_prefix."';\n".'$p_connect = false;'."\n\n"
.'$cookie_name = '."'punbb_cookie';\n".'$cookie_domain = '."'';\n".'$cookie_path = '."'/';\n"
.'$cookie_secure = 0;'."\n".'$cookie_seed = \''.substr(md5(time()), -8)."';\n\ndefine('PUN', 1);";

still makes no sense to not END something when you start it... its proper syntax ettiquette!

its like not ending an XML tag.. or not ending a print "statement

or not ending a sql query delete from users where id=1 (that is inside mysq cli (not outside), you always need a ; to end it

so many examples! what about not closing a <a href=""> link without a </a> ??

i think something similar to how the repuation system mod works... u can rep a user until u have over 5 posts (or whatever u want to set it to)... same should go for posting links and/or pics... if a new user signs up, no auth to submit posts that contain links, pix, etc... UNTIL they have earned the RIGHT to do so... ie: 5 or more posts.

i say this mod needs to be added asap. it'd solve a lot of the forums spam probs. i see it all the time on both punbb.org and punres.org where new people sign up and post their spam crap. sure, the mods get to them and deal with it. but im quite sure it'd be 100x easier if punbb itself took care of that. and that askimet mod is way too complicated and advanced for such a small need.

Smartys wrote:

No, Bekko is right.
At the end of a PHP file there's no need to have a closing PHP tag. It's optional. The reason for not having it is that if you accidentally put a space outside of the PHP tag, it can cause issues if you haven't sent headers, cookies, etc yet.
config.php doesn't use a closing tag for that reason wink

i must have some crystal-methafied version of punbb then.. cuz my config shows:

<?php
        $db_type = 'mysql';
        $db_host = 'xxx';
        $db_name = 'xxx';
        $db_username = 'xxx';
        $db_password = 'xxx';
        $db_prefix = 'xxx';
        $p_connect = false;

        $cookie_name = 'xxx';
        $cookie_domain = 'xxx';
        $cookie_path = 'xxx';
        $cookie_secure = 0;
        $cookie_seed = 'xxx';

        define('PUN', 1);
?>

take special note on the very -last- line of that...

awesome little thing to add! smile

yes... the spam with http:// links in it are highly annoying

Smartys wrote:

http://dev.mysql.com/doc/refman/5.0/en/ … erver.html
Just because he's not familiar with MySQL doesn't mean he found a random address on the internet and is trying to use it

i didnt state he was.. that address may be legit, but it can ONLY be used within an INTERNAL network.. aka: LAN/intranet.

elbekko wrote:

No need for that, normally smile

seriously? since when? the 5,000 php files i got from every project you name out here has the ?> ending to it.. it closes off a php code section. it's a proper way to code... its SYNTAX dude...