1 (edited by zaher 2006-11-24 08:51)

Topic: PunBB 1.3 Discusses

I have some quastions for Punbb 1.3 , I like to prepare my self for MODs it (special for RTL)

1 - There is a folder for every style and that was good, but i not notice any "base.css" in css files is that true?
that good for me because i can make to layout.css (one for RTL one for LTR) and imported it in the header.php.

2 - Did you have plan to support FirebirdSQL database, because there is a some changes to Database field name (2 field).
I have already make DBLayer for FirebirdSQL 2.0 for PunBB 1.2.14

Thanks

If your people come crazy, you will not need to your mind any more.

2

Re: PunBB 1.3 Discusses

1. There is no longer any base.css file. Each style is self contained and in its own folder. You can use custom versions of the templates for each style by putting them in the style folder.

Re: PunBB 1.3 Discusses

I'm not sure we'll see FirebirdSQL in 1.3. Apart from writing another DB layer, there's often specific queries that needs extra love. But what do I know, any of the other devs might be up to it smile

Re: PunBB 1.3 Discusses

The problem with supporting additional databases is not so much adding the initial support. It's the continued support that's hard. And we can't just drop support for a database down the road.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5 (edited by zaher 2006-11-24 17:40)

Re: PunBB 1.3 Discusses

1 - For Css that good news for me.

2 - What if i asked to change 2 of column field and i will write all code needed (as MOD).
the real problem i stick in it those "password" and "message" field name are reserved in firebird and, i give a time to try use preg_* functions to hack it at run time, but that very bad idea.
Hacking the code it easy than hacking the Database.

Check my old topic about that
http://punbb.org/forums/viewtopic.php?id=13330

EDIT:

that needs extra love.

Yes, but Firebird SQL is my love  wink .

If your people come crazy, you will not need to your mind any more.

6 (edited by zaher 2006-11-27 07:26)

Re: PunBB 1.3 Discusses

2 - About (2) i will make alter to database with my MOD

3 - About languages, in file common.php there is some code must writen to define the locale, code in language file make my translator take care about it, mean make the language not be appendable for new words.

Could you extract the code outside language files seprated to file not have any language array for example "config.php" in language folder.

If your people come crazy, you will not need to your mind any more.

Re: PunBB 1.3 Discusses

Even if the field names "password" and "message" are reserved, it must be possible to somehow escape them. For example, in MySQL, you can use reserved names as long as you enclose them in ´backticks´. I believe Microsoft SQL Server does something similar but with [square brackets].

"Programming is like sex: one mistake and you have to support it for the rest of your life."

8 (edited by zaher 2006-11-27 13:32)

Re: PunBB 1.3 Discusses

2 - When i test firebird i already escaped it to "MESSAGE" using the double quote char (firebird escape field name by " ) as i write, convert it from `message` by regex function preg_replace, but the real problem what if i use the escape character inside the message post

insert into ..... "MESSAGE" = 'i write escaped `message`'

(as like this message), that mean i have more work with regex and more bugs.
That after i mod the code to make all this words are escaped by ` char, but SQLight not take this as escape field.
It is so hard and make pain to my fingers, but BY changing the name of this field in the offical version not released to public yet (i mean 1.3), it will be dream instead of be nightmare. (i hope my english is readable smile )

If your people come crazy, you will not need to your mind any more.

Re: PunBB 1.3 Discusses

#`(.+?)` \=#i

replace with

"$1" =

No idea if it'll work tho tongue

10

Re: PunBB 1.3 Discusses

elbekko: for real example i used

Z<?php
  $sql = 'SELECT id, `username` FROM users where username=\'`zaher`\' and userpassword=\'`dirkey`\'';
  
  $a[] = '#\`(.*)\`#seU';
  $b[] = '\'"\' . strtoupper(\'$1\').\'"\'';

  $sql = preg_replace($a, $b, $sql);

  echo $sql. "\n";

?>

Printed

SELECT id, "USERNAME" FROM users where username='"ZAHER"' and userpassword='"DIRKEY"'

but must be

SELECT id, "USERNAME" FROM users where username='`ZAHER`' and userpassword='`DIRKEY`'

but that not the only problem, SQLite is will stop at the 'usernamae', that mean i must hack sqlite DBLayer too.

If your people come crazy, you will not need to your mind any more.