Forum Replies Created
-
In reply to: tuzhak !== bozo; tuzhak === link-farmer;
I’m getting all warm and fuzzy on the inside just reading this. I wasn’t trying to be officious by the way, I just don’t like that sort of pollution on this or any other forum – it decreases it’s value. Thanks for sorting it out. I didn’t mind starting a new topic by the way. It allowed me to use more comparison operators! Woot!
In reply to: PHP Fatal error in bb-settings.php on line 7Looks like a problem with gettext. Search around for hints on enabling PHP’s gettext functions. I think it’s just a matter of moving an extension DLL on windows or something, it’s long enough since I administered a windows machine that I have forgotten – and I’m not going back – so that’s all te help I can offer. I don’t know why the included php_gettext wouldn’t have kicked in though.
In reply to: tuzhak == bozoI should have been clearer…..
quoting tuzhak:
> Congrats!
… and other banal comments.
I haven’t bozoed him (I can’t) I was reporting him.
In reply to: Opensource – but wich license?It’s GPL, but there is no indication of that anywhere here officially. There is a ticket to address this issue. https://trac.bbpress.org/ticket/642
In reply to: Hooks & Filters DocuTake your pick…
pulp
[noun]: a soft, wet, shapeless mass of material
[noun]: a soft wet mass of fibers derived from rags or wood, used in papermaking.
[usu. as adj. ]: popular or sensational writing that is generally regarded as being of poor quality
… and it’s a synonym of “press”
In reply to: Hooks & Filters Docu> do you mind if i end up using it as the starting point for writing my own plugin?
It’s GPL licensed, so if your plugin is GPL licensed, then that’s fine.
In reply to: Hooks & Filters DocuI think you started with looking at the wrong plugin.
I’ve got the code here if you want it, if you want a challenge, then *don’t* read on…:
<?php
/*
Plugin Name: Disable registration
Plugin URI:
Description: Disables registration
Author: Sam Bauers
Version: 0.0.1
Author URI:
*/
add_action('bb_init', 'disable_registration');
function disable_registration() {
global $bb;
if ($_SERVER['PHP_SELF'] == $bb->path . 'register.php') {
bb_die(__('Registration is temporarily disabled for this forum.'));
}
}
?>Make a new file from this code and drop it into your plugins folder. You may need to add some values in the header part to allow it to be registered in the admin area.
In reply to: Hooks & Filters DocuThe LDAP plugin has a feature that disables the registration page, you can make a simple plugin based on that.
ALternatively you could run the restrict registration plugin and blacklist everything.
In reply to: Registration Email Not Being Sent – new issueCheck your junk email filters.
In reply to: Hooks & Filters Docu> I love it
So do I, so here it is http://bbpulp.org
Registration required to contribute.
All articles to be submitted under the GPL Free Documentation License.
In reply to: Plugin: Avatar Upload> I’m guessing those are created by various digital cameras?
I’m not sure, something microsofty I think.
In reply to: Hooks & Filters DocuWe should assume that codex.bbpress.org is out of the question for now, even though the content that we generate may end up there.
How about bbpulp.org ?
In reply to: Hooks & Filters DocuAnyone got a good domain name suggestion? I’ve got a domain name registration credit at my host which I can use.
Can you create a ticket for this here. You can login with the same user/pass you use on this forum.
In reply to: Hooks & Filters Docu@Null: perhaps not installation and WP integrating as I don’t want to duplicate existing docs on this site and I think we should stick to developer docs for now – primarily to help plugin developers. The others seem like sound start to the categories though.
In reply to: Hooks & Filters DocuYes, we could set up a wiki – but to avoid (most of) the stated problem it would have to be a technical/developers wiki for now. We should also agree to move it’s contents to any official wiki when it comes along. I assume that an official wiki would use the same software as codex.wordpress.org which appears to be mediawiki, so to be compatible when the time comes we would have to use that too. My personal thought is that it is about time for this, and as the development community grows it is becoming necessary. I could set one up in half an hour (I’d be happy to host it – ad free). And we could work out the taxonomy of it here.
To be slightly democratic, I say if ten people who we recognise as regulars/developers vote for it here, then we should go ahead. I’m also willing to hear arguments against the idea too.
Should we vote on it?
In reply to: Plugin: Avatar UploadI have found that there are many more mime-types out there. Heres a list of extension to mime-type associations that you might want to add. I have built up this list over the last few years of real world use of applications.
'png' => 'image/png'
'png' => 'image/x-png'
'png' => 'application/png'
'png' => 'application/x-png'
'jpg' => 'image/jpeg'
'jpg' => 'image/jpg'
'jpg' => 'image/jp_'
'jpg' => 'image/pjpeg'
'jpg' => 'image/pjpg'
'jpg' => 'image/pipeg'
'jpg' => 'application/jpg'
'jpg' => 'application/x-jpg'
'jpeg' => 'image/jpeg'
'jpeg' => 'image/jpg'
'jpeg' => 'image/jp_'
'jpeg' => 'image/pjpeg'
'jpeg' => 'image/pjpg'
'jpeg' => 'image/pipeg'
'jpeg' => 'application/jpg'
'jpeg' => 'application/x-jpg'
'gif' => 'image/gif'
'gif' => 'image/gi_'.
Of course, you would have to adapt your code to handle multiple mime types for each extension like so (or similar)…
Line 31:
$allowed_types = array(
'gif' => array(
'gif' => 'image/gif',
'gif' => 'image/gi_'
),
'jpg' => array(
'image/jpeg',
'image/jpg',
'image/jp_',
'image/pjpeg',
'image/pjpg',
'image/pipeg',
'application/jpg',
'application/x-jpg'
),
'png' => array(
'image/png',
'image/x-png',
'application/png',
'application/x-png'
)
);
$allowed_types['jpeg'] = $allowed_types['jpg'];.
Line 124:
if ($error == 0 && (!in_array($img_type, $allowed_types[$img_ext]) || !in_array($img_ext, $allowed_extns)) ) {
.
Then remove the next conditional block from line 130 to line 134 because that check is now covered in the previous conditional block.
In reply to: Plugin: Support forum version 2.0The 2.0 version of the plugin is now available, the plugin browser has either caught up or someone has given it a kick.
In reply to: Hooks & Filters DocuAlthough this topic is a noble idea, I can’t see it having enough structure to be really useful.
I’ve started a conversation about creating a wiki for this sort of thing on the dev list. I think that would be optimal and more easily maintained.
I’d be happy to start one, but I think it would be better coming directly out of Automattic.
In reply to: Plugin: Support forum version 2.0You could easily adapt the plugin to run under PHP4. Check out http://www.php.net/oop and http://www.php.net/oop5 for information on the differences.
Here is a copy of the changelog for 2.0
* Object-orientation
* Made admin page more serious
* Added visual feedback when changing a topic’s status
* Limited javascript addLoadEvent call to topic pages only
* Admin page feedback now uses bb_admin_notice()
* Added GPLv2 license details
* Added support for bb_admin_add_submenu()
The change to OOP is mostly to help accommodate a future feature where you will be able to specify which forums will be support forums instead of just all forums like it is now.
In reply to: Problem using a form in a pluginYou are missing the API hooks, and you have to be a bit more specific about your forms submit name to distinguish it from other plugins.
The code below is at least a step closer, notice the change to the name of the submit button and to the if conditional in the update_bbportal function. The specified action allows that function to be called when the admin header is loaded.
You will also have to pull the values you insert into the options back out again to re-populate the form on the same page.
// Add action for the admin area to process the form
add_action('bb_admin-header.php','update_bbportal');
// Show form
function bbportal_form() {
?>
<h2><?php _e('Portal Management'); ?></h2>
<h3><?php _e('Portal settings'); ?></h3>
<form action="" method="post">
<table>
<tr><th scope="row"><label for="forum_id"><?php _e('Where do you want to pull the topics from?'); ?></th>
<td><?php forum_dropdown(); ?></label></td>
</tr>
<tr><th scope="row"><?php _e('Number of topics on the portal:'); ?></th>
<td><input type="text" name="number_of_topics" id="number_of_topics" /></td>
</tr>
</table>
<p class="submit alignleft"><input name="submitPortal" type="submit" value="<?php _e('Submit'); ?>" />
</form>
<?php
}
// Update portal
function update_bbportal() {
if (isset($_POST['submitPortal'])) {
bb_update_option( 'pforum_id', $_POST['forum_id'] );
bb_update_option( 'number_of_topics', $_POST['number_of_topics'] );
}
}Well, at least that is one way to do it.
In reply to: Problem using a form in a pluginI think you are misunderstanding how PHP is used to process forms. You can’t call a PHP function using an “onclick” event.
PHP is a server side pre-processor, not a client side scripting language. The form needs to be posted, then you need to somehow trigger the php function on the recipient page. In bbPress, this is done by hooking into the API.
Read this… http://www.php.net/manual/en/tutorial.forms.php
Then I suggest you download and copy the methods used in another plugin that does this. No one will mind you copying their methods. You can feel free to adapt from any of my plugins that do this. “LDAP authentication” does it, so does “Restrict registration”. The code for handling admin pages is at the bottom of both plugins. These will also give you a clue as to how to implement the bb_*_option functions.
In reply to: Fix or remove bozo function before it kills bbPressI don’t think it’s unreasonable for pre-1.0 software to have outstanding problems like this. Personally I have had to mark users as bozos. The only thing lacking here is documentation, which is often the case with free software.
In reply to: bbpress futureI can understand the concerns about JavaScript being written into the core. The point that cool2sv and others are making is that all the javascript that is written inline into the core code could be removed and the same functionality could be provided by adding events to DOM objects in external scripts. By doing this we could abstract away the absolute need for any particular JavaScript library, even though we would almost certainly include one in the core. If this was done then people could emulate the JavaScript functionality included in the core using other JavaScript libraries that better suit them. It is a cleaner and more flexible approach. That being said, there is quite a lot of work and testing to be done to achieve this for what may generally have limited benefit. Still, I think it should be considered and maybe even ticketed as an enhancement.
In reply to: Slug based permalinksOh.