Because $pun_user is not available inside a function, you have to declare it global first.

Or add it to the function:

class test{
function __construct($pun_user) {
    echo pun_htmlspecialchars($pun_user['username']);
    print_r($pun_user);
    echo "hello world";   
    }
}

$tester = new test($pun_user);

Something like this.

77

(7 replies, posted in General discussion)

ad 1)
There is a mod for that, just download it at http://www.punres.org and install it according to the instrauctions.

ad 2)
That is a bit tricky.
- Make an sql dump of all your present punbb tables, save them on your machine.
(mysqldump -uUSERNAME -p --add-drop-tables DATABASENAME > /path/to/dumpfile)
- Edit all the prefixes to match your new setup
- Remove the dump for the <YOURPREFIX>config table and all non-punbb tables from the dump file
- Make a backup of the new setup
- copy the dump on the server and install it with mysql -u USERNAME -p  DATABASENAME < path/to/dumpfile
That should work

ad 3) Go ahead smile There is a lot to read about styles at http://www.punres.org as well that will direct you.

78

(6 replies, posted in Programming)

It's a waste of bytes though ( endif; ...) and IMO you should stick to the good old curly brackets. most people do and thus it would make your code better readable for the majority.
But that's the good and the bad thing about php: There are always two million ways to do the same thing, so you can do what you please ... smile

79

(7 replies, posted in General discussion)

Normally a host would give you one or several databases and he will tell you the database names, username and password.
This is the information that you enter.

If you have no mysql database so far or you don't know about it ask your host to create one for you and give you the details

80

(20 replies, posted in General discussion)

snapsolutions wrote:
Tobi wrote:

Like most every other service in the net this thing is way too US biased.

No it's not, check this out

http://tinypic.com/fkzfab.jpg

Yeah, found it. Thanks a heap.
Why the hell did I get these errors before?
My apologies go out to the Frappr folks wink

(Oh, and I signed)

81

(20 replies, posted in General discussion)

I wasn't able to enter my real nor my general location at all.
I started with the small town that's closest to me, I went up to the island where this town is (and it's not a very small island) and I ended up desperately trying "Greece" as a location  - no success.

Like most every other service in the net this thing is way too US biased.

Maybe we better set up something for ourselves?
i mean, the punBB exists, so what's the problem?

Edit: I can imagine that rickard does not want to spoil this board with mods so I'd be willing to give the space, have 3 punBB boards running anyway.

82

(11 replies, posted in PunBB 1.2 discussion)

Paul wrote:

What I do wonder is why, if popularity is the key attraction for hackers, doesn't vBulletin get hacked as often as phpBB.

Because it's closed source.
You have to either know somebody who would give you a copy or buy it to read the sources. This, of course, makes it less attrctive for hackers.
It should be mentioned though that it also makes it much less attractive for people to have alook at the sources to fix vulnerabilities = The old IE vs. FF story tongue

Rickard wrote:

I believe that even though more people use PunBB and thus, it becomes a more tempting target for "hackers", the frequency is going down

It probably does at the moment, don't know what's happening once we have as many people here as in the phpBB board smile
But don't get me wrong: It is not a bad thing to expose the sources to as many people as possible to find *all* them holes.
It was just a very personal view of one who likes his good sleep smile

83

(7 replies, posted in General discussion)

I think you should first read the documentation, that's always a good start.
It will explain you in detail how to set up PunBB on the web server.
If you have trouble on the way - then just ask wink

84

(11 replies, posted in PunBB 1.2 discussion)

Although of course it is a good feeling for us being amongst the PunBB pioneers wink I am not sure if I want to see it going down the mainstream.
The more people adopt it the more it will be a valuable target for hackers.
This might be still interesting from a developer point of view smile but if you just want to maintain 3-4 boards all you want is a good sleep.
I think that f.e. phpBB is not more or less buggy than a lot of other software out there but they get a lot of atention from the wrong people because they are so big...

Looks like you have several problems in here.

<img border="0" src="img/noNewPosts.gif">                        <div class="tclcon">
                                <h3><a href="viewforum.php?id=19">????? ?????? ??? - ??? ??? ????? ??????</a></h3>

First of all, the <div class="tclcon"> is nowhere closed
Second, a <h3> is a block tag that will cause a linebreak if you con't define otherwise.
I suggest to close that div tag and place the lightbulb image inside the <h3> tags.

Have a look at the new version, it includes the ability to edit forum/category titles and forum descriptions.
Yeah!

Deletion still not implemented. It's a bit tricky with the confirm_referer() but I don't want to do without it smile

Oh: It's still HERE wink
in the admin section -> Plugins -> Forum Drag'n'drop

OH, btw: Before you start complaining about it - I spent *hours* trying to integrate the edit fields into the appropriate divs but that was a bit much. I gave up on it, too much code, too unstable....

Connorhd wrote:

As for making it obvious it is to move, how about making the cursor the move cursor when you hover them?

Now, that's one great idea.
I'll do that, currently I am heavily struggeling with the editing...

Rod wrote:

About your 3 points Tobi > it would be perfect, simply ... double click on the forum area (index.php) > text becomes text areas and you can change the name + descr' of the forum.

This is way too much programming.
This function you only want to have if the user who clicks there is an admin, right?
So, you have to have the full functionality available any time but only access it for certain users.
This is 1st a huge overhead in JavaScript and html that is sent to the users which for 99% cannot use it and
2nd it will take me days again to just make the changes I mentioned. What you are thinking of is nice in theory but - in my opinion - impossible/not good to do.
But, hey - go ahead & prove me wrong wink

OK, fixed a bug that prevented the page to load properly in IE and Opera.
Now it's OK.
Please understand that I only have a limited number of browsers at hand, so it works on
IE6, FF and Opera 8.5, al others you will have to test smile

Next tasks

1. Make the forum/cat names ineditable and introduce an "Edit"-Button that will open a floating edit area for the forum/mod
2. Add a delete option there
3. Think about ways to make it more obvious that the whole thing is draggable.

Forgot something?

Rickard wrote:

Very nicely done. The only thing I can think of that I don't like about it is the usability aspect. There really isn't anything that makes you think you can drag&drop things. Maybe it's the renaming textboxes that disrupt it.

It says on top of the page that you can drag and drop... but I know what you mean. t's more that people are not used (yet) to drag & drop in the browser.
I'll think of adding handles to the items so they *look* draggable smile

Rod wrote:

so the question si simple : WHY going under ADMIn ? it would be more practice to do it directly on the index

You cannot change the order without being an admin. At least it wouldn't be persistent.

Rickard wrote:

The username/password you entered above doesn't work.

Test/Test. Sorry. Been a long day...

rod wrote:

What error? What does ist say?

And - which Browser?
Ans - what exactly are you trying to do when yo get the error?

flx wrote:

cant see ajax though

The goood thing about ajax is that you do not see it tongue

Connorhd wrote:

That is awesome good work.

Are you well?
tongue

Connorhd wrote:

how about the form name is not editable, but there is a edit button, you click the edit botton and the box for the forum expands and gives you all the options you normally get for the forum, it has a save button which closes this box and a delete button to delete the forum

Sounds like a very good plan! Solves several problems at once....
All the time I was looking for a way to have people enter the description text as well.
Since these are <li> tags with divs inside it may be a bit difficult to implement but it's worth a try.
Not today though....
smile

This was a lot more work than I thought it would be.
It is still far from being perfect and i think I will need some input from you folks to improve it.

To  get an impression I set up a dummy board that you might abuse (but not too heavily, please wink )
http://www.tobi.gr/testboard/
User:Test, Password: Test
Go to the admin and click on "forums dragndrop" in the Plugins section.
Should work with IE6 and of course Firefox

If you create test forums/categories please be so kind & go to the respective "regular" admin to delee it afterwards. Thanks.

This thing will immediately update the database when moving a forum/category. No warning, no dummy submit button, plain ajax in the background.

Issues/Bugs:
- The selection of the text fields of the forums/categories is really ugly.
This is because I have to steal the onmousedown handler from the drag script. I'd appreciate a solution for that smile
- If a forum is moved above all categories there is an alert because it is illegal.
However, the forum does not "snap back" afterwards because I was too stupid to find out how this could be done.
Again, if anybody has a clue...
- Deletion is not possible. Would be easy to do but I was wondering if this is not too dangerous in this pointy-clicky environment. What do you think?

General:
- There is extra stylesheet for the divs and form fields. it is in the plugins/mod_forum_dragndrop folder.
Although this breaks with the general rules I prefer to have all mod/plugin  files concentrated somewhere. Am I wrong?

For those who'd liek to help (and my, I would love some help) the source fles and readm are here:
mod_forums_dragndrop

Whoever is interested in this matter, please join in.

94

(69 replies, posted in News)

I don't know your recipien lists.
If they are random you should definitely consider sorting the addresses by domains.
This will make things a lot easier for your mailer as it has to open only one connection for X mails.
Otherwise the mailer has to open a new connection for every mail -> slow.
If you do that, however, you will have to give the prog a break every X mails so they're not considered spam.

I did it that way for a client, they have a mailing list with 350.000 recipients and it works like a charm.
(Well, of course it takes some hours... smile )

Edit: I know no .net , not too interested in proprietary scripting so I would not know how to do that sorting... smile

You won't need a plugin for that. plugins are admin stuff.
You are asking for a mod.
But where do you want the images to go?
Instead of the bullets that indicate unread posts?
Wouldn't be a good idea...

96

(11 replies, posted in PunBB 1.2 troubleshooting)

Well, no username that is already taken will be available.
So the easiest way is to create dummy users for all names that you don't want people to take.

The trick is basically if you ban users you don't delete their accounts.
You do one of those two but not both.
It makes always more sense to keep the user account anyway so they cannot re-register with that same name (see above)
And since you banned them they cannot log in as well.

Interesting. I'll have to take a closer look tomorrow...  smile

I need your opinion on this:

I am working on a mix between the toolman functions, some xajax and of course the category/forum admin.
Now I ran in to the following issue:

When I allow to move all elements freely then this can happen:
User drags the first category somewhere down and leaves the forums of this category on top.
Now, if xajax immediately saves this state then we have orphaned forums. This is illegal I think.
So, while moving categories without their forums across can be good if you want to assign other forums to it but it can not be a valid state.
This means I will have to introduce a submit button.

The other option:
I group the categories with their forums and only allow to move the forums inside their categories, and the categories as a whole, including their forums, between each other.
This way it would be assured that we always have a valid state and we could use xajax - but it would disable the possibility to move forums to other categories.

So, which one do you think makes more sense?
Or does anybody have a really clever ideas how to solve this?

No way, if I do that then the form will be sent although javaScript is enabled.
But don't worry - nobody is perfect after all.... tongue
This here is the only way:

      $quote_link = '<a id="p'.$cur_post['id'].'" href="post.php?tid='.$id.'&qid='.$cur_post['id'].'" onClick="this.href=\'#req_message\';xajax_quote('.$cur_post['id'].');document.getElementById(\'req_message\').focus()">';

You just can't stop complaining... wink

In fact it would be best if it would receive your email in the morning, sort out the spam, then open your favourite 5 news sites, filter the news that are relavant for you, print them out, then cook the coffee, press some orange juice, prepare toast, bring the breakfast and the news to your bed, wish you a pleasant morning and read the emails to you.

unfortunately, this is not part of the current DOM smile

As for the focus: Sure, why not, just the third function to call.