Why not add hooks instead of adding tons of features?
27 2008-02-25 22:08
Re: MyBB vs Punbb both 1.2 and 1.3 (17 replies, posted in PunBB 1.2 discussion)
You wanted our opinions?
My opinion is that MyBB is the best forum there is, if it's MyBB you want. If it's PunBB you want, then why bother with MyBB, as it's clearly not made to do the same things. Apples and pears, for short.
28 2008-02-25 19:06
Re: CSRF in common.php question... (19 replies, posted in PunBB 1.3 troubleshooting)
intedinmamma wrote:One solution is to have a "proxy script", which just adds the CSRF token and sends it all along to wherever it should go.
Will this work on 100% of what PunBB 1.3 will work on? I am positive not all people/hosting lets you run proxy scripts etc.
It should be quite easy as long as you can use fsockopen(). (available in both PHP4 & 5) Doing it that way you will just have to resend the POST data along with a CSRF token, check php.net for examples on doing the harder half of it.
29 2008-02-25 13:54
Re: CSRF in common.php question... (19 replies, posted in PunBB 1.3 troubleshooting)
Any idea of a way around this?
One solution is to have a "proxy script", which just adds the CSRF token and sends it all along to wherever it should go.
30 2008-02-21 06:37
Re: Why no Ajax? (25 replies, posted in PunBB 1.3 troubleshooting)
esting link: an Ajax framework for PHP under development, that do not need Javacraps at all ^_^ (whops, forget this, I wrong. It do not need js coding )
That's not an AJAX framework (like prototype/jQuery), it's an application framework. (like CakePHP, Symphony, etc...) And very few of those requires any JavaScript coding to be able to use AJAX.
31 2008-02-19 20:03
Re: Why no Ajax? (25 replies, posted in PunBB 1.3 troubleshooting)
But I think this would be a lot better as an extension, and done with unobtrusive JS instead
It's also my opinion. But if you want to be 100% compatible you must use PHP instead of XmlHttpRequest
If you want to be 100% compatible you shouldn't use JS at all, as there are browsers that doesn't support it.
32 2008-02-19 19:16
Re: Why no Ajax? (25 replies, posted in PunBB 1.3 troubleshooting)
AJAX = Asynchronous Javascript And XML, this solution is more like AJAH. ((X)HTML instead of XML)
But I think this would be a lot better as an extension, and done with unobtrusive JS instead. *strong semi-elitistic opinion*
Edit: Dämmn, elbekko was faster.
33 2008-02-19 14:16
Re: Simple request: anti-quote behaviour (4 replies, posted in PunBB 1.3 troubleshooting)
Sounds like a pretty simple extension.
34 2008-02-17 12:18
Re: Will extensions be multilingual? (6 replies, posted in PunBB 1.3 troubleshooting)
One solution is the one I came up with for Publish Topics:
if (!isset($lang_topic['Unpublish']))
$lang_topic['Unpublish'] = 'Unpublish';
Doing it that way makes it possible to put translations in extensions. If someone makes a system for automatically keeping extensions updated then it won't be very hard to "push" translations of extensions.
35 2008-02-14 13:23
Re: CSRF in common.php question... (19 replies, posted in PunBB 1.3 troubleshooting)
One solution is to have a "proxy script", which just adds the CSRF token and sends it all along to wherever it should go.
36 2008-02-13 15:42
Re: Hook requests (151 replies, posted in PunBB 1.3 extensions)
Anyone else have an idea?
if(count(array_intersect($perms_new, $perms_old)) != count($perms_new))
{
if(count(array_intersect($perms_new, $perms_default)) == count($perms_new))
{
// Delete
}
else
{
// Insert/Update
}
}
It should be quite easy to build the queries and the form directly from $perms. If done right, you will just have to add elements to $perms and $perms_default to add permissions. Forms, validation and queries are so similar that it will work most of the time, and when it doesn't you can always use some other hook. Depending on how it's all implemented you might have to use array_intersect_assoc() instead of array_intersect(), as the latter doesn't care about indexes.
37 2008-02-12 17:43
Re: Hook requests (151 replies, posted in PunBB 1.3 extensions)
Hooks for adding permissions in admin/forums.php.
38 2008-02-12 15:50
Topic: extension_id.xml as an alternative to extension_id/manifest.xml (0 replies, posted in PunBB 1.3 troubleshooting)
Well, I think the topic kinda says it all. Most extensions won't be more than a manifest.xml, so it feels a little unneccesary (spelling) to have a folder for just one file. The only problem I can think of is that you can have two extensions with the same ID, but it must be possible to solve somehow.
39 2008-02-12 14:35
Re: [Extension release] Publish topics to frontpage (6 replies, posted in PunBB 1.3 extensions)
intedinmamma wrote:And that's beacause I thought that $db->add_field() did that automagically. Update is on the way.
I considered doing that, but decided not to so that the functions can be used with other tables as well.
I was just about to start whining about it, until I came to the same conclusion.
40 2008-02-12 06:46
Re: [Extension release] Publish topics to frontpage (6 replies, posted in PunBB 1.3 extensions)
I am not able to install because it is not detecting the table's prefix.
And that's because I thought that $db->add_field() did that automagically. Update is on the way.
41 2008-02-11 21:48
Re: [Extension release] Publish topics to frontpage (6 replies, posted in PunBB 1.3 extensions)
When I install it only shows me one forum. You can check it out at http://pundemo.org
No other mods installed that can mess with it so thought I would let you no.
Dämmn, must be related to that I haven't tested with SVN, just the Beta release.
42 2008-02-11 20:35
Topic: [Extension release] Publish topics to frontpage (6 replies, posted in PunBB 1.3 extensions)
Allows Admins and moderators to publish topics to the front page. Also adds RSS/Atom feeds for published topics. Publish by clicking the "Publish" link next to sticky/close topic after installing the extension. Install by putting manifest.xml in a folder named "publish_topics" in the extensions folder.
For 1.0:
Permission for publishing, so not every moderator can publish (if wanted)
Make the topic listing on the front page prettier (idea's welcome!)
Turn the hard coded number of topics on the frontpage (which is 3) into a setting
Maybe an archive for older published topics?
Better support for URL rewriting
Edit: Oh, forgot to mention that I'm not sure about how to handle translatable strings and the url rewriting. Is there anything decided yet?
Edit again: It now supports installations with a table prefix. The old file has been replaced, and can be found via the link above.
43 2008-02-11 19:59
Re: Auto-Check Extensions (Your input!) (23 replies, posted in PunBB 1.3 troubleshooting)
Why not do it apt-get style and allow third party repositories? There's already functions available in PunBB for reading XML files and retrieving files from other servers, so some of the work is already done.
44 2008-02-09 20:13
Re: [Extension release] Gallery (37 replies, posted in PunBB 1.3 extensions)
amazing ... but in the next release remove the stats bar ... and rename the simple_gallery.php and all the releated files to gallery.php .... and also remove the (Powered By Lytebox) etc .. and also where is upload and delete image buttons ...
Or do it yourself.
45 2008-02-09 14:14
Re: So is there an official variable-naming schema for extensions? (7 replies, posted in PunBB 1.3 troubleshooting)
That's hell to type out every time tho >=(
But you don't have to have foobar as ID even if the extension is named foobar, you can always use fb. (as long as you're the first one to use it)
46 2008-02-07 18:54
Re: Usability: cursor: pointer; for buttons and inputs (8 replies, posted in PunBB 1.3 troubleshooting)
intedinmamma wrote:That feels a little awkward to me, as I expect anything that turns the pointer into a pointing hand to be a link.
Buttons are similar to links: they are clickable and do something and/or direct you somewhere.
Anything that's clickable should IMO have the hand cursor come up...
I'm not talking about how things should be, I'm talking about what I'm used to.
47 2008-02-07 16:59
Re: Usability: cursor: pointer; for buttons and inputs (8 replies, posted in PunBB 1.3 troubleshooting)
That feels a little awkward to me, as I expect anything that turns the pointer into a pointing hand to be a link.
48 2008-02-06 23:06
Re: new pages for extensions (18 replies, posted in PunBB 1.3 troubleshooting)
If your extension needs a page, it can write a page
Or you can put the page as a php file in the extension folder and use the URL rewriting system to make it appear wherever you want it. (as long as the rewriting system is in use) Or use misc.php, it's got a hook called mi_new_action that would do the job.
49 2008-01-31 19:54
Re: Hook requests (151 replies, posted in PunBB 1.3 extensions)
array_insert() exists in functions.php, so it's there.
//
// Inserts $element into $input at $offset
//
function array_insert(&$input, $offset, $element)
{
// Out of bounds checks
if ($offset > count($input))
$offset = count($input);
else if ($offset < 0)
$offset = 0;
array_splice($input, $offset, 0, 0);
$input[$offset] = $element;
}
But unless I'm totally wrong (this time to), this won't insert an element at position 5 if there's only 3 elements in the array.
50 2008-01-31 19:36
Re: Hook requests (151 replies, posted in PunBB 1.3 extensions)
Look into the array_insert function?
Forgive me if I'm wrong, but doesn't $array[] = 'value' add an element at the very end of the array? So even if I put my "Death Ray Control Panel?" at, let's say, position 3 (which I fail to see how it would be possible, cause there's no 0, 1 or 2), then adding elements would put them in position 4, 5, and so on... Honestly, I'm far from a PHP Guru, but this is how I always have thought arrays work.