101

(7 replies, posted in PunBB 1.2 discussion)

Which one is prefered? I have huge problems getting 4.1 to work. 4.0 finaly works again. Should I continue struggling to get 4.1 up and working (using debian) or could I settle with 4.0? Im running a quite large/busy site with it...

Nevermind, I think I understand how it works now. Did not even need the mysql_escape_string(), it was escaped anyway on insert.

Thanks for you help...

Thats wierd. I use mysql_escape_string($string);

insert it in the database (say it looks something like \"\" in the database)

then I get it in php, and it still is \"\", only if I use stripslashes it becomes "" like I want it.

I have set_magic_quotes_runtime(0);

I've read a little  about it (apparently not enough :) and from what I understanit should be unescaped automaticly? what am I missing here?

Another question in the same area.

After inserting a row in mysql (and after had run mysql_escape_string..)

To fetch that string and display it safely (like in a text-form i.e.)

is this the "right" way to do it.


$row = mysql_fetch_assoc(....

$row[search_string] = htmlspecialchars(stripslashes($row[search_string)); ?

I dont want anything to be messed up if user typed any kind of quotation mark.

thats it?

i've used other function before but this one sounds more simple smile

thanks anyway.

If i've got something like this:

// a search string from URL
$search_string $_GET['search'];

//
// Some processing of the string here...
//

// a possible query with full text search
$query = "SELECT * FROM table WHERE MATCH (content) AGAINST ('$search_string')";

// another possible query
// $query = "INSERT INTO table (asdf) VALUES ('$search_string')";

mysql_query($query);

How is the best way to proccess that string so it's not posible to do something harmful in the database. Like SQL-injections, or similar...

107

(4 replies, posted in General discussion)

Connorhd: i've tried that allready hmm'

Dosent work at all. Apache seems to just drop everything of that request if LimitRequestBody condition is confirmed.

108

(4 replies, posted in General discussion)

Do you have any other suggestion then? I dont want the file to be uploaded first and then perform a size check. If that is possible in anyway else than with LimitRequestBody

109

(4 replies, posted in General discussion)

Hi. I want to use LimitRequestBody 1048576 in a .htaccess, if an uploaded file is larger than that, I want the user to be redirected to /asdf.html or something. Is this possible? I have searched on google alot and I haven't found anything of use yet.

110

(43 replies, posted in PunBB 1.2 discussion)

Presonally I think PM is allmost necessary in a forum today. At least there could be an option to enable or disable the PM-function. Polls is not that important I think, but it's a nice feature.

I think you could use (with permission of course) the modules Chacmool wrote för 1.1.5, or at least consider creating something compatible to those (at least the PM-module) ... smile

Come on, where is the PM-module for 1.2? tongue wink

112

(2 replies, posted in Feature requests)

ah, my mistake wink

When will the PM-module and poll-module be converted to 1.2? If ever that is...

I look forward to it anyway. I wont be able to upgrade my forum unless there is a compatible PM-module (with 1.1.5) on 1.2, so start working Chacmool wink

Rickard: 1.2 Looks great btw, congrats!

/C

Edit: changed "Connorhd" to "Chacmool" wink

114

(21 replies, posted in General discussion)

lengfeng wrote:

PunBB is too simple!we need more!

To simple for what?

115

(99 replies, posted in Programming)

I use Crimson Editior
Very nice with php/mysql and such. Freeware also.

www.crimsoneditor.com

oh, Jop already suggested it. oh well wink

Is there a way to cut a subject string to fit a certain table width?

I use Verdana alt Arial as fonts.

I want this:

"A long subject that will be cut becouse its to long to fit"
=> "A long subject that wi ..."

That is no big deal to do, BUT I think this is:
Since this forum uses Verdana also you notice the diffrence in these chars (both rows have 10 chars each):

aaaaaaaaaa
mmmmmmmmmm

This means I cant set a max width that fills the whole available table width i have (about 160px) and still avoid the table being streched if someone creates a thread containing "mmmmmmmmmmmmmmm" for example.

This is how it could look like if I cut after 17 chars. The table width is OK, but only the "mmmmmmm..." uses the entire space available:

http://garaget.org/temp/prob.jpg

Is there some way to fix this?

117

(6 replies, posted in Programming)

I try to understand your question, but I can't smile .. You could either wait and hope someone else understand or you could try to explain better what you want smile

118

(254 replies, posted in PunBB 1.2 discussion)

oh. Nice scrollbar. In my current version (1.1.1) the whole forum gets expanded by the image.

Just forget what I said then wink

119

(254 replies, posted in PunBB 1.2 discussion)

Rickard wrote:
chrizz wrote:

2004-11-24
""""""""""
*  Replaced the new admin option "Image max width" with "Image max height".
   Instead of limiting the maximum width of images, which is taken care of by
   scrollbars anyway, the new setting limits the height of images.

Rickard: This is actually a problem for those (Im one of them) who implemented the forum in a existing site structure with constant width. In 1.1.1 I had to edit the forum myself. Now since I see you've implemented a function for this I actually dont see why there should not be an option to set max width AND height, or just one of them.

/C

But if an image is too wide, it will get scrollbars anyway, so I can't really see what the problem is.

Are we talking about the same images? Im not talking about avatars, but the [img]url_to_image[/img].

The page gets scrollbars, yes, but I dont want them. Thats the problem smile ... I want the image to fit in something like 500x500.

edit: and then a link to the fullsize-version

120

(254 replies, posted in PunBB 1.2 discussion)

2004-11-24
""""""""""
*  Replaced the new admin option "Image max width" with "Image max height".
   Instead of limiting the maximum width of images, which is taken care of by
   scrollbars anyway, the new setting limits the height of images.

Rickard: This is actually a problem for those (Im one of them) who implemented the forum in a existing site structure with constant width. In 1.1.1 I had to edit the forum myself. Now since I see you've implemented a function for this I actually dont see why there should not be an option to set max width AND height, or just one of them.

/C

121

(2 replies, posted in Programming)

thanks / tack smile

122

(2 replies, posted in Programming)

Hi!

I have this query:

SELECT a.*, i.filename AS first_image FROM ads AS a INNER JOIN ads_images AS i ON i.adid = a.adid WHERE ... GROUP BY adid ORDER BY a.timestamp DESC, i.filename ASC LIMIT 10;

As you can se there are two tables. An ad could have one image (or more than one) or no image at all. The ads_images contains only images, and no null-value-rows for the ads who dont have images (rows with the adid and null for the rest of the columns that is).

The query above results only rows containing ads with images, the ones without are not selected since there is no adid in ads_images for that ad. Is there another solution to this than to insert "null-rows" to the ads_images but only containing the adid?

123

(68 replies, posted in PunBB 1.2 discussion)

A couple of years ago I would have probably removed the copyright notice. Lately i've been programming alot my self and I know how much time goes into something like this. I would be mad if someone basicly took credit for my work so I would never do it to anyone else. Give the guy some credit, keep the copyright and link. Thats not much to ask, is it?

124

(13 replies, posted in Feature requests)

Rickar: Ok, great smile

125

(6 replies, posted in PunBB 1.2 bug reports)

When I think of it Smartys explanation makes sense...