Forum Replies Created
-
In reply to: plugin: Markdown
Had a bit of a rewrite and now blockquotes are also possible, to infinite depth. Currently this is one blockquote:
> block
> quote
because I figured if you were writing something and you had two paragraphs that’d be more likely. But I would *love* advice on the syntax or feedback from you tisme. New source is http://www.loinhead.net/files/felise and to check out how it works you can still use http://www.loinhead.net/files/felise.php (same basic code, just modified without bb).
In reply to: bbSyncCertainly there’s no code that does that in bbSync, nor in bbPress I think. Bizarre.
post_title
? Have you maybe got a plugin that adds titles to posts?If only errors included where in the PHP code it was
In reply to: let’s build a poll plugin!The rush is that the project is “out there” and people are looking at it and coming to conclusions. Bad conclusions.
One of these days you’re going to have to show us the crystal ball that tells you everything about the users and potential users of bb.
What I find interesting is the belief around here that wordpress integration is not a major desire by most people evaluating it. How would we ever know the sheer number of people that have looked and been turned off?
I think that tidbit (or at least, in my case) is based on a hand-me-down from Trent who’s pretty close to the folk at automattic and they’d be the ones to know.
How would we ever know the sheer number of people that spontaneously combust when they use bb?! You make it sound like the entire internet trooped over and looked at bbPress yesterday, saw that there was no plugin for this or for that and decided that they would stick to phpBB.
I think that the implied opposite of ‘overly sophisticated’ (is that a polite ‘bloated’?) can equally be ‘lean and mean’ rather than ‘underly sophisticated’.
I think that bb just isn’t ready in a lot of ways for what you’re trying here. At 0.8.2.1 it doesn’t _need_ to have a full gallery of plugins yet just like it doesn’t yet have a full feature set. Sure more plugins are a good thing but it’s not urgent in the sort of firetruck way.
In reply to: front page takes 50 mysql queriesBut your workaround no longer gives you the display names, right? … So you cut out the penalty, but also lost out on any gain?
Can’t you do what you said earlier and use a hook to get all the display names at once?
Hehe, actually I thought calling him mdawaffle was pretty good ^^ Just when you kept doing it I was confused.
In reply to: Number of users errorI think – if I remember this right – that it’s a known issue caused by the pagination using the total number of accounts ever created instead of the number existing now and that it’s fixed in the latest.
If you have phpMyAdmin, can you check the ID of the latest member? If that ID is 309, bingo.
In reply to: bbSyncYup. Add
global $bb_cache;
to bbpress’ config.php.In reply to: bbSyncNo error messages you can see? Have you checked your error logs?
In reply to: front page takes 50 mysql queries5 forums, 30 threads, something like 10 dudes? But like you said it doesn’t really matter.
I think Use Display Name just wasn’t written in the days of efficient usermeta caching, before “mdawaffle” (a dig?) implemented it. Obviously not kept up to date, of course. You can report it on the plugins trac.
In reply to: front page takes 50 mysql queriesI’ve applied this plugin and I’ve only got 11 queries on the front page in kakumei, 13 in my theme (with an onlinelist and latest blog post). Are you running the latest? If not, that’s the likely cause.
In reply to: Noobish CSS QuestionThere’s no direct solution. You can do one of these:
- Change
<?php tag_heat_map(); ?>
to<?php tag_heat_map('limit=30'); ?>
. The default limit is 40 I think, if you set it to 30 or any appropriate number they won’t go so far down. But you’d want to change that again later. - Put the
footer
inside thewrapper
. I’m not sure how your templates are arranged, but in kakumei you’d just have to openfooter.php
and move the codeblock that produces the divfooter
up a few lines, just above the previous</div>
. Permanent change, now the footer is on the white, but the white will always stretch down sufficiently. - Wait it out – eventually there’ll be enough topics to stretch the page
I think there are a few other things you could do, but that second point is probably the best if you need it changed now.
In reply to: Custom fieldsYou can use a hook to add an input field. Your code would look something like this:
add_action('post_form', 'addmyinputfield');
function addmyinputfield() {
echo '<input type="text" name="mine" id="mine" />';
}You would need another hook to then get the value when it’s been posted. I’m not sure about this one, but I think the hook would be
pre_post
. Again you use it in the same way as above:add_action('hook_name', 'function_name');
There’s a list of hooks here, http://bbpulp.org/wiki/API/actions if that wasn’t the one you wanted. Maybepost_form_pre_post
?In reply to: Help with an if/then statementIt’s in front-page.php at the very bottom. You can see at the start it checks if $forums is set, and if it isn’t (line 75, where it says
else : $forums
) it delivers the page to make a new topic (and in the background $forums isn’t set if the url has ?new=1). That’s where the post_form() is too. Finding that one out took a whileI don’t know. Where is the you must log in to post text?
In reply to: let’s build a poll plugin!I’m not making one yet and I’m not rubbishing your idea. Originally I thought _you_ were making one which would have been interesting. But you porting one isn’t interesting to me. That’s not to say it’s a bad idea … it’s just not interesting to me. That is all there was to it.
In reply to: plugin idea: wiki post (group editable post)But you’ve already got all the data you need right there in the date created. Post_position just makes things more awkward to move and is just not normal form. At least I’ve never seen an advantage to it, what are you thinking of?
In reply to: plugin idea: wiki post (group editable post)If you have to add it to the topic, messing with the post order could get ugly. Probably easier to just leave it as an option when creating the topic. You can then add an entry to topicmeta, and use a hook to check if the topic being called is such a wikitopic and add to the roles available to the current user (giving him the edit_topic or rather edit_post capability). That should let him and therefore anyone edit it.
In reply to: let’s build a poll plugin!If I want to try to make one from scratch, there’s no need for you to do it. Because, you see, I’d want to make it. But thanks.
In reply to: Help with an if/then statementYou do the same thing, but in different templates. If you look at the code, if $h2 is empty (ie. you didn’t tell it what to set) then it checks where it is – in a topic, in a forum, on a tag page or on the front page. But you can always tell it what to put instead. So if you want something else on a tag page, open the tag pages (tags.php, tag-single.php I think) in your template, look for
<?php post_form(); ?>
and change it to<?php post_form('No pizza for you!'); ?>
. That’s a change that will happen only on the pages whose template you modified.To add line breaks in HTML you use
<br />
. But I’m not sure you can have that inside an <h2> element. You can probably just put that right above the<?php post_form(); ?>
, like so:<br />
<br />
<?php post_form('Macaroni Cheese'); ?>In reply to: Bug in register-success.php?yes, I’m not giong to modify a core
buh – do I misunderstand you? You just modified a core file. template-tags.php is as core as anything else.
But yes, submitting this as a feature request on trac I think is a good idea.
In reply to: User name not show on registration successful page.Log In with the account you use here, then click New Ticket and describe the problem.
In reply to: Help with an if/then statementCool. You’ll find it is an improvement.
That’s really simple. Just change
post_form()
topost_form('Take some Pizza')
or whatever else you want in there.(The only reason I know this is I looked into template-functions.php and searched for post_form, then saw this:
function post_form( $h2 = '' ) {
which tells me it wants $h2 as an argument. $h2 is the <h2>text here</h2> as you can imagine.)
In reply to: Help with an if/then statementThe newest version is ALWAYS an improvement. A BIG improvement. There is NEVER a situation where you shouldn’t upgrade.
You have a problem and you’re not running the latest version. What do you do? Go upgrade.
You don’t have a problem. You’re not running the latest version. What do you do? GO UPGRADE.
Upgrading might not even fix this problem, it’s not sure. But it does fix several security exploits and adds a bunch of featurs. Go upgrade!
What’s worst is that you’re on a support forum asking for help and you’re not even on the latest version.
If I wasn’t clear … GO UPGRADE
The difference between actions and filters is unclear. In principle, filters are supposed to let you modify data and actions give you a chance to respond to events. This is reflected most in the fact that with a filter, you have to return some data which will be used instead of the data given to you in the first place. For actions, you don’t.
The syntax is this:
do_action('action_name', [$argument1, [$argument 2 [...]]]);
apply_filters('filter_name', [$argument1, [$argument 2 [...]]]);I don’t recommend making changes to the core, of course. But if you have to, you would change the last line of topic_time() from this:
echo _bb_time_function_return( $time, $args );
to this:
echo apply_filters('template_time', _bb_time_function_return( $time, $args ));
and then change the line in the plugin further up to this:
add_filter('template_time', 'freshness_latestlink', 101);
taking out the
//
that comment it out. Also, I’m not sure what topic_class*() is?But yeah, don’t modify the core. Much better to stick to the template change from above.
In reply to: Help with an if/then statementDon’t worry about it
I’m sorry I wasn’t clearer, that was raw PHP code. So that PHP code runs, you have to put
<?php
and?>
tags around it.<?php
global $page, $topic;
$add = topic_pages_add();
$last_page = get_page_number( $topic->topic_posts + $add );
if( $page == $last_page ) {
print( '<h2 class="post-form">POST A REPLY</h2>' );
}
?>This just worked for me in my template’s topic.php.
In reply to: Help with an if/then statementIt’s a very bad idea to edit template-functions.php or any other core files. What will you do when the next version comes? You should always put custom code in your template or plugin. Did my code not work in your template?
- Change