Search Results for 'code'
-
AuthorSearch Results
-
August 1, 2007 at 3:28 pm #59634
In reply to: Good model plugin for newbie plugin author to study?
fel64
MemberYeah, really avoid doing anything to the tables and use topicmeta instead. By far easiest for you and nicest for the users, too, plus the additional overhead is minimal.
The metadata is returned when you call get_topic() like Sam said.
$topic = get_topic();
echo $topic->topic_geolocation; //echoes whateverAugust 1, 2007 at 3:23 pm #59616In reply to: AdityaNaik.com
fel64
MemberLoading bb when you load wp, coolio. That’s what I wanted to know.
August 1, 2007 at 3:05 pm #59358In reply to: mysql_query() OR $bbdb->get_results() ?
fel64
MemberDid you try downloading from the plugin browser? https://bbpress.org/plugins/topic/56
Trent if you see this could you take out the rapidshare link from the first post and replace it please?
August 1, 2007 at 8:07 am #59633In reply to: Good model plugin for newbie plugin author to study?
Sam Bauers
ParticipantIt might be a bit confusing, because it is a complex plugin, but the Support Forum plugin uses the topic meta table to store topic support status. This data used to be in a column in the topic table but was moved to the meta table a few versions ago.
The basic usage is (with some guessing as to what you would call your data):
// To add
bb_update_topicmeta($topic_id, 'topic_geolocation', $latlong);
// To delete
bb_delete_topicmeta($topic_id, 'topic_geolocation');The topic metadata is automatically included in the results when you call
get_topic().No table manipulation should be necessary.
August 1, 2007 at 2:54 am #51583In reply to: Full Content of Most Recent Post on Front-Page?
outchy
Memberhow does one filter the output for time in this example?
<?php echo $latestpost->post_time; ?>i’d like it to be in the format of
( 'g:i A' )ps, my good, good people

how would i turn this link into a link to the latest reply itself instead of just the topic:
<a href="<?php echo get_topic_link($latestpost->topic_id); ?>"><?php echo get_topic_title($latestpost->topic_id); ?></a>July 31, 2007 at 10:58 pm #59629In reply to: Good model plugin for newbie plugin author to study?
fel64
MemberdbDelta is in bb-admin/upgrade-functions.php, same as it is in WP.

You are of course sure that you have to create a new table?
July 31, 2007 at 10:34 pm #59628In reply to: Good model plugin for newbie plugin author to study?
riddle
MemberMore specifically: does bbPress have mechanisms for automatic table creation and updating like the ones described in the WordPress docs?
See: https://codex.wordpress.org/Creating_Tables_with_Plugins
Should I start my Foo plugin by creating a function foo_install()? And can that function call dbDelta()? (I don’t see dbDelta in my bbPress anywhere.) If not, what’s the recommended alternative model for creating tables to be used in plugins?
fel64
MemberCrowspeaker, would you mind editing a core file? If you can edit line 257 of bb-includes/capabilities.php to this:
$this->cap_key = 'foo_capabilities';Then save/publish a post as you always do and see if the entry
foo_capabilitiesis created?That would bizarrely mean that the BB_User has an ID but no capabilities.
fel64
MemberGuess these forums are seperate from the plugins after all – subscribed here but not there
.Thanks for looking at that more closely, that’s helpful.
July 31, 2007 at 6:26 pm #59034In reply to: Plugin: Private Forums v4.0
_ck_
ParticipantOh this is driving me crazy.
Every so often, the private forum settings reset back to open to all and expose the moderator forum to everyone. Not good.
Until this bug is found I need to know how to hardwire a forum by number via code to always be moderator’s only.
update: I hardwired private_forums_custom_get_options, adding
if (!bb_current_user_can("moderate")) {$private_forums_for_user[8] = "MODERATOR";}This should make sure no matter what, #8 stays private
Hopefully you can find the bug soon… it might even be a bbpress core bug which is scary… then again, your settings are the only ones that seem to reset?
July 31, 2007 at 6:09 pm #59585In reply to: How to evaluate server speed?
riddle
MemberThanks for all your help, CK! I’ll look into eaccelerator — although I think I’ll finish building the site first.
July 31, 2007 at 5:47 pm #56420In reply to: Freshness Linked
citizenkeith
ParticipantI think bb-admin is broken because I had to edit some template files… I honestly haven’t taken the time to find out yet. It’s on the list for tonight though.
July 31, 2007 at 4:40 pm #52669In reply to: Plugin: [REL] Signature
_ck_
ParticipantWell why wait for tomorrow when you can put off other work and do it today

I now have per-post signature disable ability on v0.07 though sadly you must edit two templates to get that ability, there is no way to hook the form from the plugin, at least none that I can find in the API.
What’s really ironic is that I will most likely never use this plugin on my own forums, ha!
July 31, 2007 at 1:41 pm #56745In reply to: Plugin: Avatar Upload
howtogeek
MemberThanks… I’ll wait for the update then
July 31, 2007 at 1:21 pm #59627In reply to: post permalink
so1o
Participanttry..
post_anchor_link();July 31, 2007 at 1:19 pm #59611In reply to: AdityaNaik.com
July 31, 2007 at 12:28 pm #59609In reply to: AdityaNaik.com
fel64
MemberI like it
How’d you achieve this level of bb integration? Are you includeing bbP or have you written a bunch of functions to emulate all that?July 31, 2007 at 11:05 am #59603In reply to: Is bb_enqueue_script really needed?
Null
MemberWell eeuuhh, first I would have to know which part uses prototype and where that code is.
And then I would have to learn to code properly

Any1 know if it is even planned to switch interly to jQuery? It would save some useless script loading
(and I would have to rewrite my bbMenu plugin, but I was planning to do that anyway)
July 31, 2007 at 10:42 am #59602In reply to: Is bb_enqueue_script really needed?
fel64
MemberjQuery is there but not everything uses jQuery yet. You could speed things along by rewriting the prototype code for jQuery if you like.
July 31, 2007 at 8:56 am #59356In reply to: mysql_query() OR $bbdb->get_results() ?
Null
Member@ MaryJane download and use phpMyAdmin. It gives you acces to you database. You still need to know how to make/use SQL queries though

@Box, dude had any time to help me out with the bbMenu plugin thingy? I want to fix this issue before I start with the next version (using jquery and fixing alot of bugs)
Thx
July 31, 2007 at 8:51 am #59607In reply to: AdityaNaik.com
Null
MemberLooks horribly in ie6
(only have ie6 at work
)
July 31, 2007 at 7:35 am #59593In reply to: Limit long words
beaver6813
MemberAhhh that auto worked a treat
I’ve used the break-word as well for IE so it doesn’t even need to scroll when words are too long, in FF it just scrolls. Although a plugin to shorten long url’s words etc might be quite cool, like:http://www.ilovebbpress.com/bla/blab/blalblba/indexnop/123
to
http://www.ilovebbpress.com/bla…/123
If I get time next week I might make one… but don’t quote me on that

Thanks guys for the help!
July 31, 2007 at 6:50 am #59598In reply to: Is bb_enqueue_script really needed?
_ck_
ParticipantIt adds the (half-dozen) ajax scripts to topic pages.
Doesn’t affect other pages from what I can see.
In theory it’s very necessary, can’t delete topics without it since there is no non-ajax fallback from what I can see. Also things like adding/removing favorites within a topic.
You can reduce mysql queries by pre-loading all options in one fetch at startup. Try this un-documented option in config.php
$bb->load_options = true;personally I can’t wait ’til they stop using prototype.js since it’s HUGE for the few functions they access
then there is add-load-event which is 200 or so bytes but not combined with any other script so it forces yet another external file load
July 31, 2007 at 6:24 am #59581In reply to: How to evaluate server speed?
_ck_
ParticipantLooks like they are really trying to hide “load” from you.
I know of only two ways to grab it from php (there might be more?)
echo "method 1: ".file_get_contents('/proc/loadavg');
echo "method 2: ".shell_exec("uptime");Really though, should not be this hard.
It’s possible to get better getting hosting for $150/year.
-
AuthorSearch Results