Search Results for 'code'
-
AuthorSearch Results
-
February 8, 2008 at 4:59 pm #62791
In reply to: add a link
chrishajer
ParticipantJust put what ever sort of link you want (button, image, text link) in whatever page template you want the link to appear in. Just edit the proper template (maybe header.php) and put something like this in it where you want the link to appear (maybe near the login form around line 36 in the 0.8.3.1 release):
<a href="http://www.server.com/blog/" title="return to blog">Return to Blog</a>
February 7, 2008 at 9:15 am #60325In reply to: changing rss url (redirecting to feedburner)
Bob Jones
MemberOk, so I changed the code to this:
Options +MultiViews
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} !FeedBurner
RewriteRule ^/rss/$ http://feeds.feedburner.com/PinkOnBrownBB [R,L]And…nothing. Here’s the link to the forum:
Rewrites seem to be working in every other sense. Redirecting to feedburner works fine in WP – but then, I’m using the plugin.
February 7, 2008 at 8:26 am #62485In reply to: Proposed method for file attachments and uploads
_ck_
ParticipantAgain, essentially the avatar upload plugin does all this (filename scrubbing, etc) the code would just need to be hacked to make it attach to posts instead of users and the interface would have to be on the create/edit post form (which if I remember from my signatures plugin has no action hook unfortunately and templates will need to be edited). “Avatar Upload” even checks filenames and the php code checks dimensions which ensures it’s really an image. Other filetypes like zips or pdf would be more tricky but just an extension of the process – first start with images and work from there once you have it running.
I’d like to see this happen, but don’t look at me for coding, I hope someone else steps up to the plate. Got my hands full right now with “Super Search” which is quite difficult on all sorts of issues. I won’t be done with it for a week or two at earliest, more realistically the rest of February.
February 6, 2008 at 9:07 pm #62777In reply to: who to Change Tags splitter ?
howtogeek
MemberYou can find this function in bb-includes/functions.php
function bb_add_topic_tags( $topic_id, $tags ) {
global $bbdb;
$tags = trim( $tags );
$words = explode(',', $tags);
if ( !is_array( $words ) )
return false;
$tag_ids = array();
foreach ( $words as $tag )
if ( $_tag = bb_add_topic_tag( $topic_id, $tag ) )
$tag_ids[] = $_tag;
return $tag_ids;
}The explode() function is where the logic is happening… you’ll have to test to see if it screws up anything else, cause I’ve not tried it.
February 6, 2008 at 10:06 am #60323In reply to: changing rss url (redirecting to feedburner)
Bob Jones
MemberHowToGeek – I’ve put that code in the .htaccess and it still doesn’t seem to work.
Here are the contents of my .htaccess file:
Options +MultiViews
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} !FeedBurner
RewriteRule ^/rss/$ http://feeds.feedburner.com/PinkOnBrownBB [R,L]Is there anything noticeable that might be causing the problem?
February 4, 2008 at 2:13 pm #62714_ck_
ParticipantAll my knowledge is usually from trial and error (and lots and lots of benchmarking).
MySQL penalties are biggest when there’s no index for what you are searching for and how cacheable the result is. If there’s only one user online, you’ll never notice poor mysql performance. If there’s 500 users online, each making 20-30 queries, you better have decently written code.
Loading a regular topic page is very low penalty as long as other plugins are properly using the bbcache. Many of them don’t and hammer away at mysql for every new user/post encountered.
Ajax topic loading would be no worse than regular page loading as long as the queries are nearly identical for users, therefore the result can be cached in mysql. As long as you use OFFSET in the query, you can keep going forever down the page without preloading the entire result – the hard part is not the db code, but the ajax code. I have no clue how to do it, I’d have to do it in pseudo ajax (simple innerhtml writes) which is probably some kind of security risk.
The bad idea about all of this is bookmarking results. If you want to send a friend a link to the 50th post which is technically on the 4nd page but you seem to be on the first page because of ajax – you’ll never be able to bookmark the 4th page. Some ajax routines dynamically change the URL to solve this by adding a cruft like #page2 after they pass that mark, which will not re-load the page in the brower but alter the bookmark if saved.
Getting back ajax posting is probably a bigger priority than ajax reading for now. And a bit more difficult.
_ck_
ParticipantAs I was reverse integrating the WP trunk with the bbPress trunk this weekend I was thinking a lot more about this – and the more I think about it, the more I am getting confused about what is being planned.
If WP and bbPress are being coded to use to a unified function library that would definitely break wordpress hooks. But Matt would never do that as it would break 1000’s of plugins and themes for the far more popular WordPress.
In some ways, bbPress’s db/load process and hooks are slightly more thought out/evolved than WordPress because they came later and WordPress has to maintain some backward compatibility.
So then it occurred to me that to leave the WP hooks alone, I hope you are not trying to replace the core of bbPress only with WP-like functions? I don’t see how that could be done without breaking every single plugin and theme for bbPress? Will the next (non minor) release of bbPress have a nearly-unified WP core?
In trac I see BB functions being renamed to their WP counterparts. But no wrapper functions for backward compatibility are being written. I see the backend of bbPress being hammered into backPress and I imagine the next bbPress as simply a front-end being re-written to only use the backPress, ie. wordpress, hooks.
So I guess the final question is: is there a plan to write wrapper functions or is the general attitude just to abandon all third party work to date for the next bbPress release and just hope we go along for the ride?
February 3, 2008 at 9:11 pm #62713howtogeek
MemberTypically the cost of doing a query at all is the biggest performance concern, unless the query returns many thousands of records, then the size becomes a concern. It’s really all about profiling your code to see where the performance problems lie.
The problem here is that ajax doesn’t load large amounts of data very quickly… it’s best for small requests, not loading a giant page. There are many sites that use this technique, however, including sites like Digg.
Pre-fetching everything and hiding them has other concerns, because it would make every page load huge, and potentially without reason.
Finally, there would be concerns for google indexing if you are hiding half the posts, or also if the user doesn’t have javascript enabled.
February 3, 2008 at 5:25 pm #62754In reply to: Installation problem..please help fast
chrishajer
ParticipantOr, just turn off permalinks in your config.php:
$bb->mod_rewrite = false;
At least at that point, things would work for you.
February 3, 2008 at 1:17 pm #62752In reply to: Installation problem..please help fast
salman1485
Memberproblem solved..
instead of localhost i had to enter the other thing which dreamhost told me …
but now another problem
the forum is working fine http://test.nofullstop.com/bbpress/
but the slugs arnt??
what went wrong now??
February 3, 2008 at 12:53 pm #62720In reply to: can“t acces the admin panel!?
John Conners
ParticipantHave a look in your mysql database with phpmyadmin at the bb_usersmeta table for your user (whatever ID that is, which you can get from the bb_users table). If you find the row that has the meta_key column of bb_capabilities, you’ll probably find the meta_value is:
a:1:{s:6:"member";b:1;}
If you change that to:
a:1:{s:9:"keymaster";b:1;}
You’ll find you’re an admin and can see the admin panel.
February 3, 2008 at 9:54 am #62751In reply to: Installation problem..please help fast
chrishajer
ParticipantIt is most certainly a problem with the details you have entered for the database. One of the four items is incorrect: that is precisely what the
Cannot select DB
error is telling you.I can help you off list of you would like to contact me (check my profile for a website where you will find contact information.) I will need access to the config.php and your Dreamhost control panel to see the database details.
February 3, 2008 at 8:20 am #62750In reply to: Installation problem..please help fast
salman1485
Memberi use different database for my wordpress blogs and i created new database for my test forum
database name: testforum
user: testforum
password is also correct
I doubt what I need to enter in host..currently it is localhost and i am using dreamhost to host my account… but i am sure i do not need to enter that in place of localhost..!!
so what could be the problem?
and in that BBLANG i have written en even though i dont have any MO file..
confused …please help me
February 2, 2008 at 6:26 pm #62712fel64
MemberChris: http://www.messandnoise.com/discussions/1346861 only above 40 posts or somesuch.
From what I’ve heard, *press will probably end up with jQuery.
_ck_, is the cost of fetching a fairly unlimited and variable number of posts significantly greater than the cost of fetching just 40 once? I always thought the cost of doing a query at all was the significant thing, not the amount of data you get back – but I’ve not systematically learned SQL and I don’t really know where or how to look for this information
Is there any place you can recommend?
February 2, 2008 at 6:23 pm #62767In reply to: integrated cookies failing on trunk
_ck_
Participantokay I found the cause but not the reason or solution.
this produces entirely different results in WP trunk vs BB trunk:
echo wp_hash("abc". "123")." - ". hash_hmac('md5', "abc" . "123", wp_hash("abc". "123"));
So each program cannot evaluate the other’s hash/key/hmac
Still researching. The salt is identical. This is perplexing.
February 2, 2008 at 4:41 pm #62762In reply to: Announcement Board
chrishajer
Participant“Put in a plugin” means:
1. create a new file with a text editor.
2. give it a name like “bb-restrict-new-topic.php”
3. create a header in the file that tells bbPress this file is a plugin, like this:
<?php
/*
Plugin Name: Restrict New Topic
Description: Restrict new topic creation by members
Version: 0.1
*/4. put the text from that other page into the rest of the file.
5. be sure to close the file with a
?>
6. put that new file in your bb-plugins folder.
7. activate the plugin in your admin panel
8. test test test
I think the plugin file will look like this when you’re done.
February 2, 2008 at 1:56 pm #54654In reply to: Restrict New Topic
Null
MemberPut this code in a Plugin. The group "Member" will be affected.
function restrict_bb_got_roles() {
global $bb_roles;
unset($bb_roles->roles['member']['capabilities']['edit_topics']);
unset($bb_roles->roles['member']['capabilities']['write_topics']);
unset($bb_roles->role_objects['member']->capabilities['edit_topics']);
unset($bb_roles->role_objects['member']->capabilities['write_topics']);
}
add_action('bb_got_roles', 'restrict_bb_got_roles');What happens If you use this? Do only members + higher be able to post here and all can reply and read?
February 2, 2008 at 6:25 am #60343In reply to: [New Plugin] BBpress Syntax Highlighter
_ck_
ParticipantNice work.
Looks like there is “only” a 6k penalty on the browser side for the extra javascript and under 1k for the extra css. Bit of work on the server side but it may be worth it for a forum that deal with a lot of code being posted.
Be sure to submit it to the bbpress plugin browser
https://bbpress.org/plugins/add/
so it gets much more exposure.
February 2, 2008 at 3:48 am #62709fel64
Member> I would have no chance in coding it myself
Not if you’re thinking like that. Starting to code in PHP really isn’t so hard and there’s no genuinely nasty bits in this plugin.
But even if you really don’t want to try doing it yourself, bumping it does no good at all. The forum isn’t active enough for this to disappear off the front page immediately and plenty of people will see. There’s also far more people with ideas than people who want to write plugins but have no ideas (and that’s the way I suspect it will always be), so plugin requests are a rather long shot.
February 2, 2008 at 12:55 am #2317Topic: [New Plugin] BBpress Syntax Highlighter
in forum Pluginstmeister
MemberHi there,
Well, code highlighter its here. i love iG:Syntax Hiliter plugin for WP so i modified it to work in BBPress.
you can find it here
http://klr20mg.com/bbpress-syntax-highlighter-en/
Is the 0.1 Beta version.
Enjoy.
Cheers.
February 2, 2008 at 12:06 am #62747In reply to: Installation problem..please help fast
chrishajer
Participant1. Looks like this is the correct URL:
http://test.nofullstop.com/bbpress/bb-admin/install.php
2. Looks like the database connection details in config.php are incorrect:
Cannot select DB.
February 2, 2008 at 12:06 am #62746In reply to: Installation problem..please help fast
tmeister
MemberFebruary 1, 2008 at 11:39 pm #60321In reply to: changing rss url (redirecting to feedburner)
Bob Jones
MemberI would also love to be able to do this without hacking too much code. I’m using the current plugin for WP, but it would be even more useful with something high-traffic like a message board.
Would be even better if it played nice with the private forums plugin. I saw mention earlier in this thread about _ck_ – Feel up to the task?
February 1, 2008 at 6:44 pm #2860Topic: show me all your mini-plugin functions
in forum Plugins_ck_
ParticipantThere are a number of little mini-plugins in simple code form that have never been published in the plugin browser, floating around the forum.
I’ve written several myself and already use a single file called “bb-tweaks.php” to keep track of them.
Let’s publish a collective bb-tweaks.php plugin that has them all, with all the actions hooks or direct calls disabled but documented so others can take advantage of the features.
Post your code, or link to other’s code found buried on the forum, here?
February 1, 2008 at 4:45 pm #62243In reply to: bbPress 0.8.3.1 released
chrishajer
ParticipantThis stylesheet is referenced in your html, but it’s not actually there:
http://www.wp-portal.de/my-templates/bbpress-forum/style2.css?v=8
404 Not Found
Not Found
The requested URL /my-templates/bbpress-forum/style2.css was not found on this server. -
AuthorSearch Results