76

(6 replies, posted in PunBB 1.2 troubleshooting)

If you had your forum send a PM to everyone subsribed to a topic, wouldn't the PM table fill up pretty fast? Considering if 10 people subscribe to a topic, and there are ten replies, that means 100 rows in the PMS table. A few days and a busy forum and your database would be bloated.

http://punres.org/viewtopic.php?id=226 for the PM mod if you wish. smile

77

(3 replies, posted in PunBB 1.2 discussion)

It would essentially prevent the same user from being logged in on two different computers or browsers at the same time. I think it would keep security tight, especially if someone doesn't log out from a public computer.

78

(3 replies, posted in PunBB 1.2 discussion)

(Moved into apropriate forum)

Is there any method I should try which would only allow one browser to be logged into punbb at a time? For example, logging in at one location would cause the cookie in another browser to expire. The result would be only one user logged in under a single username at one time.

EDIT: this would apply only to one particular usename. Logging into Punbb with the username 'beta' and logging into a second browser with the name 'beta2' would not effect 'beta1'. Logging into the second browser with 'beta' would log out browser 1.

Could this be done by storing the session in the database?

Thanks so much for answering. smile

I've noticed that both the username and userid is entered with posts. What happens if an admin edits a username? Does Punbb update the textual username of all the posts?

Would it be better if an 'inner join' was used to extract the username from the 'users' table instead?

81

(6 replies, posted in PunBB 1.2 discussion)

Nice, I'll take it! *yoink*

82

(0 replies, posted in Programming)

Is there any method I should try which would only allow one browser to be logged into punbb at a time? For example, logging in at one location would cause the cookie in another browser to expire. The result would be only one user logged in under a single username at one time.

EDIT: this would apply only to one particular usename. Logging into Punbb with the username 'beta' and logging into a second browser with the name 'beta2' would not effect 'beta1'. Logging into the second browser with 'beta' would log out browser 1.

Could this be done by storing the session in the database?

83

(6 replies, posted in Programming)

I meant to say fetch_assoc. Sorry about that.

84

(6 replies, posted in Programming)

Connorhd wrote:

it must be 10, but why would you ever want to do that?

PunBB does that to spit out the posts in viewtopic, silly! tongue

The query was not a functional one but rather an example.

85

(6 replies, posted in Programming)

Does a query in a while loop count as one query or several?

Example:

$sql=$db->query("SELECT blah FROM blah WHERE blah='blah' DESC LIMIT 10");

while ($db->query($sql)){
//do something
}

echo $db->get_num_queries();

Would that return 10, or 1?

86

(71 replies, posted in News)

Hey Rickard!

It's great that I can patch now with shell access, otherwise it would be a pain to update.

87

(34 replies, posted in General discussion)

Rickard wrote:

I'm not trying to make a political or racial statement here, but is it just me or are most "crackers" from the east? Either from the former Soviet Union or from china/korea?

The one who hacked mine was German. tongue

88

(1 replies, posted in Programming)

Nevermind, I found a solution to this.

$noob=array_keys($val);

//to get the key if you have the value
$skey=key('Digital Art',$noob);

//to return the value if you have the key
$svalue=$noob["$value"];

This can be repeated continuously in multidimensional arrays.

89

(1 replies, posted in Programming)

Here is a code example of a multidimensional array:

array(
    'Foo'=>array(
            'foo1',
            'foo2',=>array(
                     'foo1',
                     'foo2',
                     'foo3'),
            'foo3' ),

    'Foo'=>array(
            'foo1',
            'foo2',
            'foo' ),
);

Is it possible to remove the text keys and replace them with descending numbers like below?

array(
    0=>array(
            'foo1',
            'foo2',=>array(
                     'foo1',
                     'foo2',
                     'foo3'),
            'foo3' ),

    1=>array(
            'foo1',
            'foo2',
            'foo' ),
);

The reason for this is I want to input only the number in the database and then later match it up to the original array and retrieve the keys. This way I can use less space in the database.

I'm also thinking that the database size wouldn't increase much with using text instead of numbers. Any opinions?

90

(4 replies, posted in General discussion)

Looking backwards and keeping things compatible is hindering the design and development community. If someone out there is still using IE5 it's about time to upgrade.

91

(4 replies, posted in General discussion)

The pro of Div tags opposed to tables seems to be that less code is required to achieve the same effect. Up until a while ago I didn't realize that punBB used tables for the category/forum cascading.

Tables are still used in a wide array of websites out there, and one of the pros is the compatibility. I couldn't find a browser that had issues showing phpBB layouts with tables, all the way back to Netscape Communicator. Yet punBB didn't display properly at all in some ancient ones.

92

(49 replies, posted in General discussion)

Punbb
+ease of use
+scalability
+customization
+simplicity and cleanliness
-fewer features

phpBB
+powerful
+compatibility with old browsers
+large selection of skins
-bloated code
-very complex
-harder to customize

93

(3 replies, posted in PunBB 1.2 troubleshooting)

Could I just use <br> instead? Is there anything potentially wrong with doing this?

http://cash4posts.com/layout.php

It stretches funny in Firefox and Explorer, and removing clearer or setting the css to none removes this behavior.

94

(3 replies, posted in PunBB 1.2 troubleshooting)

<div class="clearer"></div>

Does this actually do anything?

95

(20 replies, posted in PunBB 1.2 troubleshooting)

Actually, it's because I'm an idiot and didn't add the exit clause.

Version Changer

97

(20 replies, posted in PunBB 1.2 troubleshooting)

$tpl_main=eval(" ?>".$tpl_main."<?php ");
exit($tpl_main);

That fixed it. From now on, anyone wanting to eval code in templates must use this.

98

(20 replies, posted in PunBB 1.2 troubleshooting)

Any form of searching gives the error in 1.2.5 when eval()'ing code.

http://creaturecorp.com/forumold/

1.2 has no problems whatsoever; search and everything is perfectly functional. Wtf.

99

(20 replies, posted in PunBB 1.2 troubleshooting)

The error occurs when:

Seeing if there is a new version
Searching
Logging in with an invalid password
etc.

100

(20 replies, posted in PunBB 1.2 troubleshooting)

I tried Smartys suggestion, but there was still the same error. I have no idea what could be causing this, since it's been working in 1.2. Any more ideas?