176 (edited by zaher 2004-10-08 13:17)

Re: PunBB 1.2 development source

Paul wrote:

I have used the words left and right for class names such as .vtleft etc and will change those to something else.

not need to change any of code or css, just few thing like "code tag" that not accept RightToLeft, i uploaded my PunTranslator it will patch the css files and Mirror it.

this part (just part not all) of mirroring    pascal/delphi

  if SameText(CssProperty.Name, 'BORDER-RIGHT') then
    CssProperty.Name:='BORDER-LEFT'
  else if SameText(CssProperty.Name, 'MARGIN-RIGHT') then
    CssProperty.Name:='MARGIN-LEFT'
  else if SameText(CssProperty.Name, 'MARGIN') and (CssProperty.Count = 4) then // if it has 4 value i exchange the 2 and 4 values
    CssProperty.Exchange(1, 3)//based on 0
  else if SameText(CssProperty.Name, 'MARGIN-LEFT') then
    CssProperty.Name:='MARGIN-RIGHT'
  else 
    ........

http://www.parmaja.com/downloads/PunTra … -1.1.2.zip

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

177

Re: PunBB 1.2 development source

I'm a little concerned about switching the borders like that. With tables the fact that only the right hand border is set is critical. I would be interested to see the results.

EDIT: I think I solved that problem so don't worry.

178

Re: PunBB 1.2 development source

Rickard wrote:

zaher: As I pointed out in my previous post. I would REALLY prefer if we can fix this without being forced to release a "special" version for RTL support. It should work out of the box! smile

The only problem is tables. You are never going to get a perfect RTL solution becuase that means reversing the order the content appears in the table e.g. the icon would be in the last column not the first and last post would be in the first column. However, it should still be usable the way it is. There is no way around this without making the placement of content in the cells conditional which is probably going over the top.

179

Re: PunBB 1.2 development source

Paul wrote:

the icon would be in the last column not the first and last post would be in the first column

RTL is like looking in a mirror of your project evrey thing must flipped not just the containt of cells.

or i am not understand the problem smile

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

180

Re: PunBB 1.2 development source

thats what hes saying i think that the content would be flipped but not the order of the cells e.g. the ! column would still be on the left not the right...

181

Re: PunBB 1.2 development source

Yes that what I meant. The only way to flip table cells is with a manual edit. All the css will do is change the direction and alignment of the content within the cells not the position of the cell e.g. the last post column will still be on the far right but with the text pointing the other way.

To get a true mirror the index table order in the markup would have to become

last post
posts
topics
subject
icon

182 (edited by zaher 2004-10-08 22:42)

Re: PunBB 1.2 development source

smile i like this discuss,
in current  RTL i play with positions of classes
if x is Float: right, i will make it Float left
if x is Margin-Right: nn, i make it Margin-Left:nn
and worked good for now (i hope sad )

there is no order of cells in CSS, the order must be in a code and that not be useful at all.

you can downloads the style_rtl and compare it
http://www.dirkey.com/downloads/style_rtl.zip

there is i semicolon before }

  ;}
like in
UL, OL, LI, DL, DT, DD {LIST-STYLE: none; MARGIN: 0px; PADDING: 0px;} 

removed automatically by patcher, and all property name will be uppercase.

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

183 (edited by zaher 2004-10-08 22:58)

Re: PunBB 1.2 development source

let see with Excel sheet

Left To Right

[ A ][ B ][ C ]
[ 1 ][ _ ][ _ ]
[ 1 ][ 2 ][ _ ]
[ 1 ][ 2 ][ 3 ]

Right To Left

[ C ][ B ][ A ]
[ _ ][ _ ][ 1 ]
[ _ ][ 2 ][ 1 ]
[ 3 ][ 2 ][ 1 ]

Right To Left but wrong way

[ A ][ B ][ C ]
[ _ ][ _ ][ 1 ]
[ _ ][ 2 ][ 1 ]
[ 3 ][ 2 ][ 1 ]
If your people come crazy, you will not need to your mind any more.

184

Re: PunBB 1.2 development source

zaher wrote:

there is no order of cells in CSS, the order must be in a code and that not be useful at all.

Exactly my point. That requires editing of the code.

Everything else looks good. If there are any problems with the CSS I'm sure we can sort them out.

Re: PunBB 1.2 development source

Is there any way to shut off maintenance mode without the script?  It isn't working for me.

186

Re: PunBB 1.2 development source

Run this query: UPDATE config SET conf_value='0' WHERE conf_name='o_maintenance'

Might I ask what goes wrong with the script that turns it off?

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

Re: PunBB 1.2 development source

It was saying it worked successfully, but the maintenance mode was still "on" when trying to load any of the forum pages.

188

Re: PunBB 1.2 development source

when i save as a topic in Firefox 0.9.2 it will save as name "viewtopic.php.htm" but IE use html title, i try to resovle the problem to add in header.php with headers

   header('Content-Disposition: inline; filename="'.$page_title.'"');

and it worked, but there is a slash /  converted to underscore _ may be must use another char like dash -
e.g.

domain.com / my test topic

domain.com _ my test topic.html

i am not convinced with this way.
____________________________

Add title to css link in header.php

<link rel="stylesheet" type="text/css" href="<?php echo $style.'.css' ?>" />

to

<link rel="stylesheet" title="<?php echo $style ?>" type="text/css" href="<?php echo $style.'.css' ?>" media="screen" />

that will show small icon in bottom left of Fireforx browser for define the theme smile
this idea taked from site http://www.theregister.co.uk/2004/10/12 … _coaching/

test my site http://www.dirkey.com/forum

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

189

Re: PunBB 1.2 development source

very impressed with punbb ...  I am playing around with it here:
http://voxigen.com/forum/upload

congrats.

190

Re: PunBB 1.2 development source

indyjon wrote:

very impressed with punbb ...  I am playing around with it here:
http://voxigen.com/forum/upload

Keep in mind that you can take what's in upload and place it all into the forum directory.

So your URL would be http://vozigen.com/forum/

191 (edited by indyjon 2004-10-22 23:44)

Re: PunBB 1.2 development source

I'll run it from domain root sooner rather than later.  I want to convert a couple dead forums ... http://enjoyindy.com/ and http://lindensquare.com/

I have also used the blogcms version for testing too: http://voxigen.com/

Anyway, you guys that have contributed your time and effort should feel good about your accomplishments so far...

192

Re: PunBB 1.2 development source

Ok, folks. I just put together a new dev release. Sorry it took so long. Here's what has changed since last time:

2004-10-31
""""""""""
*  Moved the commonly accessed links "Show new posts since last visit" and
   "Mark all topics as read" from the footer to the header.
*  Added search link "Show your subscribed topics" to the footer. The search
   shows all topics to which the currently logged in user is subscribed to.
*  Fixed redirect page being sent to the client unnessecarily when the
   redirect delay, for some reason, is set to 0 seconds.

2004-10-30
""""""""""
*  Implemented a user group system that replaces the old static
   guest/user/moderator/admin system. PunBB now comes with four preset user
   groups: Administrators, Moderators, Guests and Members. These four groups
   can be edited, but not removed. On top of the four preset groups,
   administrators can add any number of their own user groups. The user
   groups have a set of global permissions and options such as whether
   members of a group are allowed to post new topics and if they are allowed
   to use the search feature. Some of these global permission settings can
   then be overridden by forum specific settings. As a result of the new user
   group system, basically all scripts have been updated and two new tables
   have been introduced into the database. A new admin page, "Groups", has
   been added and the admin page "Forums" has been restructured to allow
   editing of forum specific group permissions. A number of user and forum
   properties are obsolete and have been removed. The user property "status"
   has been replaced by a group ID and in forums, the properties
   "admin/moderator only" and "closed" have been removed. A bunch of the old
   options and permission settings in the admin interface have also been
   removed.
*  Added global moderator permission settings to admin/permissions. It is now
   possible to allow/disallow moderators from editing user profiles, renaming
   users, changing user passwords and using the ban system.
*  Moderators can no longer edit the profiles of other moderators and
   administrators.
*  Removed the function is_admmod() from functions.php as it is no longer
   useful.
*  Added setting "Image max width" to admin/options. The setting controls the
   maximum width of images in posts and signatures. If set to anything but 0
   (the default), images will take up, at most, that much horizontal space.

2004-10-27
""""""""""
*  Fixed (hopefully) cookies being rejected by IE6 in forums that reside in
   "domain redirect frames". Thanks to rewozz for helping me test it.

2004-10-23
""""""""""
*  Fixed search not stripping out short keywords (<3) and therefore always
   resulting in "Your search returned no hits." when used with AND. Reported
   by Frank H.

2004-10-18
""""""""""
*  Reworded board statistics and put them all in lists. /Paul
*  Removed permissions from the board index. They won't make much sense when
   the user groups system is in place. /Paul

2004-10-17
""""""""""
*  Fixed Internet protocol names containing digits (e.g. ed2k) being
   prepended with http://.

2004-10-11
""""""""""
*  Added menu navigation to profile similar to the admin interface. The
   profile is no longer one very long page, but instead devided into sub-
   pages.

The biggest change this time is the new user group system. Feel free to mess around with it as much as you can. If you run into any problems, post them in this topic or drop me an e-mail.

I've tested the 11_to_12_update script and it appears to work for at least MySQL. It probably doesn't work for PostgreSQL yet though. I would also like to stress that this is still development code and more changes are coming (i.e. don't upgrade your production boards yet). We're a lot closer to the finish line now though :)

Now I'm going to take a few days off from PunBB and hand things over to Paul so he can fine-tune the markup and CSS. Once that is done, I have a few "left-overs" that need to be dealt with, but it should only be a matter of days. I think I'll release a beta before the official 1.2 though. The beta will be feature complete, but it might have some bugs.

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

193 (edited by Smartys 2004-11-01 00:43)

Re: PunBB 1.2 development source

Time to test user groups big_smile
And the script

Script:

Warning: Missing argument 2 for error() in c:\apache\apache\htdocs\forums\include\functions.php on line 868

Warning: Missing argument 3 for error() in c:\apache\apache\htdocs\forums\include\functions.php on line 868
An error was encountered
File:
Line:

PunBB reported: Unable to create table forum_perms. Please check MySQL permissions and try again. 

The not creating isn't important (my fault there).
The missing arguments would be the important part tongue
Oh, and it should be noted that people with the User Group mod installed can't upgrade, since it uses a groups table too

194 (edited by Smartys 2004-11-01 02:33)

Re: PunBB 1.2 development source

File: c:\apache\apache\htdocs\forum\11_to_12_update.php
Line: 117

PunBB reported: Unable to alter DB structure.

Database reported: MySQL server has gone away (Errno: 2006)

The script basically crashes my SQL server tongue

And the query which causes it:
$db->query('ALTER TABLE '.$db->prefix.'posts DROP INDEX '.$db_prefix.'posts_posterid_idx');
But it seems the issue is with putting those 2 DROP INDEX in a row: when I run it outside of the script my SQL service dies too
Edit: I found the bug, although I use an earlier version of mySQL then what they list:
http://bugs.mysql.com/bug.php?id=3535

---

Userlist search  Notice: Undefined index: o_search_users in c:\apache\apache\htdocs\punbb\admin_options.php on line 525
/> Yes    Notice: Undefined index: o_search_users in c:\apache\apache\htdocs\punbb\admin_options.php on line 525
/> No
Allow searching in user list.

195 (edited by Smartys 2004-11-01 02:13)

Re: PunBB 1.2 development source

Oh, and the problem I have with the current user group method: no way to belong to multiple groups.
And, there's no way to create a new group with moderation powers

196

Re: PunBB 1.2 development source

Smartys wrote:

The not creating isn't important (my fault there).
The missing arguments would be the important part :P

Thanks. I'll have a look at it tonight.

Smartys wrote:

PunBB reported: Unable to alter DB structure.

Database reported: MySQL server has gone away (Errno: 2006)

The script basically crashes my SQL server :P

And the query which causes it:
$db->query('ALTER TABLE '.$db->prefix.'posts DROP INDEX '.$db_prefix.'posts_posterid_idx');
But it seems the issue is with putting those 2 DROP INDEX in a row: when I run it outside of the script my SQL service dies too

There's not a lot I can do about that, I'm afraid. What version of MySQL are you using?

Smartys wrote:

Edit: I found the bug, although I use an earlier version of mySQL then what they list:
http://bugs.mysql.com/bug.php?id=3535

Did you link to the right bug? That bug has to do with user-defined functions in MySQL 5.

Smartys wrote:

Userlist search  Notice: Undefined index: o_search_users in c:\apache\apache\htdocs\punbb\admin_options.php on line 525
/> Yes    Notice: Undefined index: o_search_users in c:\apache\apache\htdocs\punbb\admin_options.php on line 525
/> No
Allow searching in user list.

Ah, I forgot. You can safely delete that whole row in the <table>.

Smartys wrote:

Oh, and the problem I have with the current user group method: no way to belong to multiple groups.
And, there's no way to create a new group with moderation powers

Allowing users to belong to more than one group is out of the question. It complicates the group system _a lot_. Firstly, you need yet another table (since it's then a many-to-many relationship between users and groups) and secondly, you need to sort out how permissions are to be inherited when a user is a member of groups of conflicting permissions.

Regarding multiple moderator groups, I hadn't really considered it. I will have a look at it, but I'm not making any promises.  It will also complicate things and even now I feel that I've overdone the groups a bit. This is PunBB you know, not IPB :)

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

197

Re: PunBB 1.2 development source

Rickard wrote:

Allowing users to belong to more than one group is out of the question. It complicates the group system _a lot_. Firstly, you need yet another table (since it's then a many-to-many relationship between users and groups) and secondly, you need to sort out how permissions are to be inherited when a user is a member of groups of conflicting permissions.

Yep, that's really increasing load on server to let the user belong to more than one group. I did an ACL thingie for my little project (non PunBB related, but I needed an advanced ACL securitycheck...)...and even for a very simple check it still needs to do some computing(still can do some optimizing, but I save that for when I'm closer to finished), and for what I'm going to do, making 100-200 ACL checks to show one page isn't totally out of the question, perhaps even more, and then it starts to crawl into a couple of tenths, who knows, for big lists perhaps even into seconds, only for the ACL checks! ...

So, if the mod+admin is possible to assign separate/per group, making a few groups more should be alot smoother than a "complete ACL system" (that's probably needed for multiple group belongings)...

haven't had time to look at this group system yet, but, after thursday I guess I will perhaps have a tiny bit spare time big_smile
(sigh, and start to make the plans for the complete rewrite of the attachment system, groups was what I waited for wink big_smile)

198

Re: PunBB 1.2 development source

Rickard wrote:

There's not a lot I can do about that, I'm afraid. What version of MySQL are you using?

MySQL 4.1.2-alpha-nt, to copy from PunBB wink

Rickard wrote:

Did you link to the right bug? That bug has to do with user-defined functions in MySQL 5.

Replace UDF with ALTER TABLE and MySQL 5 with MySQL 4.1.2-alpha-nt and you have exactly what I've got: that was the closest I could find, since the site kept crashing my browser tongue

199

Re: PunBB 1.2 development source

4.1.2 wasn't even beta quality. I definately recommend that you upgrade to 4.1.7 or even downgrade to 4.0.* if you don't need the features added in 4.1.

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

200 (edited by jacobswell 2004-11-01 14:56)

Re: PunBB 1.2 development source

I've installed punbb 1.2 dev on windows xp apache with sqlite database. everything is ok but when I click "edit" for editing forum php notice message is shown.

Notice: Undefined index: read_forum in c:\web\htdocs\punbb12\admin_forums.php on line 297

Notice: Undefined index: post_replies in c:\web\htdocs\punbb12\admin_forums.php on line 298

Notice: Undefined index: post_topics in c:\web\htdocs\punbb12\admin_forums.php on line 299

Notice: Undefined index: read_forum in c:\web\htdocs\punbb12\admin_forums.php on line 302
 Moderators          

Notice: Undefined index: read_forum in c:\web\htdocs\punbb12\admin_forums.php on line 297

Notice: Undefined index: post_replies in c:\web\htdocs\punbb12\admin_forums.php on line 298

Notice: Undefined index: post_topics in c:\web\htdocs\punbb12\admin_forums.php on line 299

Notice: Undefined index: read_forum in c:\web\htdocs\punbb12\admin_forums.php on line 302
 Guest          

Notice: Undefined index: read_forum in c:\web\htdocs\punbb12\admin_forums.php on line 297

Notice: Undefined index: post_replies in c:\web\htdocs\punbb12\admin_forums.php on line 298

Notice: Undefined index: post_topics in c:\web\htdocs\punbb12\admin_forums.php on line 299

Notice: Undefined index: read_forum in c:\web\htdocs\punbb12\admin_forums.php on line 302
 

and I tried to find the why and I think I found though I haven't tested yet. the following code is the cause. it is in the admin_forums.php 293 line.

    $result = $db->query('SELECT g.g_id, g.g_title, g.g_post_replies, g.g_post_topics, fp.read_forum, fp.post_replies, fp.post_topics FROM '.$db->prefix.'groups AS g LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (g.g_id=fp.group_id AND fp.forum_id='.$forum_id.') WHERE g.g_id!='.PUN_ADMIN.' ORDER BY g.g_id') or error('Unable to fetch group forum permission list', __FILE__, __LINE__, $db->error());

it uses fp for forum_perms table but sqlite database class cannot deal "fp.blahblah" column because it is coded that before period only one word should come. in sqlite.php we can find the following code.

    function fetch_assoc($query_id = 0)
    {
        if (!$query_id)
            $query_id = $this->query_result;

        if ($query_id)
        {
            $this->row = @sqlite_fetch_array($query_id, SQLITE_ASSOC);

            if ($this->row)
            {
                // Horrible hack to get rid of table names and table aliases from the array keys
                while (list($key, $value) = @each($this->row))
                {
                    if ($key{1} == '.')
                    {
                        unset($this->row[$key]);
                        $key = substr($key, 2);
                        $this->row[$key] = $value;
                    }
                }

                ++$this->row_num[$query_id];
            }

            return $this->row;
        }
        else
            return false;
    }

and we can say there may be similiar errors because of that problem. anyway mysql is fine. and thaks for greate job.