Search Results for 'code'
-
AuthorSearch Results
-
August 27, 2007 at 4:53 pm #60339
In reply to: Posts go to subforum instead of parent
_ck_
ParticipantFound my fix after some digging.
edit forum.php
see where this part is near the top
</table>
<?php endif; ?>
<?php if ( $topics || $stickies ) : ?>change it to this:
</table>
<? global $forum; $forum = get_forum( $forum_id ); // fix for 0.8.2.1 sub-forum bug ?>
<?php endif; ?>
<?php if ( $topics || $stickies ) : ?>it’s related to this bug which is fixed in the trunk (supposedly)
August 27, 2007 at 3:25 pm #60331In reply to: new bbPress Theme: FutureKind
_ck_
ParticipantNotepad.exe
But more seriously some people like TopStyle.
There is also one or two Firefox plugins that let you change CSS dynamically – as you edit it, the page updates so you can see it in realtime. Very handy.
August 27, 2007 at 1:55 pm #60320In reply to: changing rss url (redirecting to feedburner)
chrishajer
ParticipantHmm, searching brought me to this:
https://bbpress.org/forums/topic/using-rss-feeds?replies=5
Sounds like you’d be happy with a hack, which is really a bad idea, and this is really better suited to a plugin, but I am still looking for where you’d make the exact change in the core.
In looking at this, I realized the RSS feeds for my forum are broken, so I’m not much help. Searching the code at trac.bbress.org for things like
get_recent_rss_link
(which is where the URL for the Recent Posts RSS feed comes from I think doesn’t give me any results. It seems the search there does not search the code, just the tickets? I read the help but it wasn’t telling me what I wanted to hearMaybe I’ll check out a new copy and grep through it to see where to hack. Sorry I can’t be of more help. I don’t know the answer but I’ll try to help.
August 27, 2007 at 1:29 pm #60281In reply to: My installation does not launch …
chrishajer
ParticipantI use a similar setup with the root folder of my domain as wordpress, then a subfolder for bbpress. So I have:
In my WordPress Control panel under options, both URLs are set to http://www.domain.com with no trailing slash. I noticed in your config this URL has a trailing slash:
$bb->wp_home = 'http://www.subventions.fr/';
Maybe that is causing a problem?
August 27, 2007 at 5:32 am #60279In reply to: My installation does not launch …
chrishajer
ParticipantIn fact, in the source of your WordPress site, there are a bunch of links that result in a 404, and they all have
wordpress
in the URL.404 Page Not Found:
http://subventions.fr/wordpress/
So, in your WordPress control panel, I suppose this could be wrong:
Options->General: WordPress address (URL)
I think your problems exist with the WordPress setup, and they are showing up now with bbPress integration.
August 27, 2007 at 5:26 am #60278In reply to: My installation does not launch …
chrishajer
ParticipantThis does not appear to be correct:
$bb->wp_siteurl = 'http://www.subventions.fr/wordpress';
Your wordpress site comes up at
http://www.subventions.fr/
so the wordpress part is superfluous. I think you’ve got a path problem somewhere. Normally you install bbPress like this:/var/www/subventions/wordpress/
maps to http://www.subventions.fr/
/var/www/subventions/wordpress/forum/
maps to http://www.subventions.fr/forum/
forum
is a subdirectory of wordpress in a typical integrated setup. Is that your setup? If so, then your config is wrong.August 27, 2007 at 12:38 am #60306In reply to: Rewriting up one level
Sam Bauers
ParticipantAdd this to your sites root directory .htaccess file.
This assumes that your bbPress install is in a subdirectory of your sites root called “forums”.
These rules need to be added before any WordPress rules.
The rewrite will work, but bb_repermalink() will change the URL so that it appears as it normally would.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^users/([^/]+)/page/([0-9]+)/?$ /forums/profile.php?id=$1&page=$2 [L,QSA]
RewriteRule ^users/([^/]+)/([^/]+)/?$ /forums/profile.php?id=$1&tab=$2 [L,QSA]
RewriteRule ^users/([^/]+)/([^/]+)/page/([0-9]+)/?$ /forums/profile.php?id=$1&tab=$2&page=$3 [L,QSA]
RewriteRule ^users/([^/]+)/?$ /forums/profile.php?id=$1 [L,QSA]
</IfModule>August 26, 2007 at 2:06 pm #2310Topic: Using the add_role function
in forum Pluginsmr_cynical
MemberI want to create a new user role on my forum, as a basis for fiddling with the private forums plugin. Essentially I want to be able to give some users on my forum a specific role (in addition to ‘member’) that will allow them to access specific forums without giving them mod/admin powers. I’ll need more than one new role (it’s for a Guild Wars alliance forum, and each guild needs to have its own private section).
I’m fairly confident as to how to modify the private forums plugin to enable what I want – all I need to know is how to create the new user roles to enable this.
I’ve managed to establish that add_role is the bbPress function I want, but (knowing absolutely no php) I have no idea how to use it. Can anyone help me out? Thanks
August 26, 2007 at 6:59 am #60220In reply to: rate user / karma voting plugin?
benbeltran
MemberNot that I know of, I was looking for one and was planning one as my first plugin before we decided not to use the system on my forums
.
I say go for it
, my current bbpress motto is: “If _ck_ did it, it’s good”… So I trust you more than I trust myself.
August 26, 2007 at 1:38 am #60067In reply to: top 100 bbPress sites
mciarlo
MemberHow about mine
.
August 25, 2007 at 3:03 am #60299In reply to: Some general questions!
chrishajer
ParticipantI guess after re-reading, you are not sure what files to modify. Each of the php files in the template folder are used to display SOMETHING. When I first started out, I had no idea what file was used to display each page, or view, or whatever. So, I usually found a page I didn’t like the look of, just by looking at it in the browser, then I found a word on that page that seemed distinct enough that I could grep through all the template files for that word. In a lot of cases, I would find one file or maybe 3 files where that word occurred. That’s how I knew what page to modify. I’m sure someone with more knowledge could tell you that forum.php is used to display a single forum, or that topic.php is used to display a single topic.
One thing I did right off the bat to see which php pages were actually displayed and not called from other php files was to look in the template folder for something called header.php. There’s always a header.php and a footer.php, it seems. So, there is indeed a header.php. Now, since that is the header for each page, that has to be called from any page that is displayed in the browser. So, I grepped through all the php files in the template folder for
header.php
and found there are no files called header.php. I know they have to call header.php somehow, maybe it’s a function. So, I grepped through all the files forheader
without the php, and it returned a ton of files withheader
in them.shell:~/forum/my-templates/mytheme > grep -i header *php
edit-post.php:<?php bb_get_header(); ?>
favorites.php:<?php bb_get_header(); ?>
forum.php:<?php bb_get_header(); ?>
front-page.php:<?php bb_get_header(); ?>
header.php: <div id="header">
login.php:<?php bb_get_header(); ?>
memberlist.php:<?php bb_get_header(); ?>
password-reset.php:<?php bb_get_header(); ?>
profile-base.php:<?php bb_get_header(); ?>
profile-edit.php:<?php bb_get_header(); ?>
profile.php:<?php bb_get_header(); ?>
register-success.php:<?php bb_get_header(); ?>
register.php:<?php bb_get_header(); ?>
rss2.php:<?php header('Content-type: text/xml'); ?>
search-stock.php:<?php bb_get_header(); ?>
search.php:<?php bb_get_header(); ?>
stats.php:<?php bb_get_header(); ?>
tag-single.php:<?php bb_get_header(); ?>
tags.php:<?php bb_get_header(); ?>
topic.php:<?php bb_get_header(); ?>
view.php:<?php bb_get_header(); ?>OK, so they call the header with a function called
bb_get_header
. I grepped again for that, to eliminate the other places the word header appears (div id=”header” for example.)Now, I have a list of every page, I think, that’s used to display some content to the user in a browser. If you are trying to change the structure of a certain page, it’s going to be one of those php files listed there.
If you’re just trying to modify the look (not the actual structure) you might just be able to make a change to the style.css. Find the id or class of the element you want to change (view source in your browser to see what’s being used currently) then change that element in the style.css.
One thing I did right off the bat was styled the blockquote. By default (when I installed a year ago) there were no styling rules for blockquote. No indent, no different font, no border, no color change, nothing. So, I added a definition to the style.css for blockquote.
In some cases you’ll be modifying existing rules, in others you’ll be created new ones for things that might be unstyled.
I find Chris Pederick’s Web Developer Toolbar add on for Firefox invaluable for modifying CSS.
https://addons.mozilla.org/en-US/firefox/addon/60
You can make a change while viewing the page and see the effect right away. Then, you can make the change permanent by modifying the style.css. The changes made in with the web developer toolbar are local only, they’re not saved. Play all you want there, you won’t break anything. Make a change you like, then make it permanent in the style.css.
August 25, 2007 at 2:45 am #60298In reply to: Some general questions!
chrishajer
Participant> A few silly questions:
> Changing or adding hot tags. Whats the procedure?
When a topic is added, the user can add tags upon creation. I think each user can also delete tags they have added themselves. As admin, you can add or delete tags on any topic when viewing the topic. So, you can delete or add a tag. Was there something else you needed to do?
> Looked through dashboard and can’t seem to find how
> to change or add new topics. Forums can be added but
> don’t know about topics.
To create a new topic, just create one as a user or as the admin user. There’s no specific place in the admin panel to do it. It’s just done in the forum.
> Last query: Again I ask about the changes made to
> structure in the html. I looked through all files and found
> nothing. Many scripts I have used in the past have one
> file called index or something that can be access to the
> html. Just creating or changing the style sheet does not
> allow for the changes I want to make. I like the default
> but some changes to reflect my website is key.
I guess it depends what you are looking to do. I know from other posts you have seen what other people have done to change the look of their forum. So, anything is possible. You want to avoid changing core bbPress files so that when you upgrade those changes aren’t lost.
You start by changing the template files. Default template files are found in bb-templates/kakumei/. To create your own template, create a directory called /my-templates/ (on the same level in the filesystem as bb-templates). Then, in there, create a folder which will be the name for your template, so maybe something like ronjroy. Your directory structure would look like /my-templates/ronjroy/ .
In that folder, put a copy of whatever file you want to modify, or put a copy of all the files from the default theme. I think at a minimum you need to have a style.css in this folder. IMPORTANT: modify the name of the theme by changing it at the top of the style.css file. Maybe you want to call it “Ron J Roy”. Change this line (at least) at the top of style.css:
Theme Name: Ron J Roy
(I copied all the files over from the default theme, but I know now that’s redundant. If you are not making a change to a file, you don’t need a copy of it. You need style.css and then any file you want to modified. The file present in my-templates/{whatever} override the stock files. If a file is not present in your theme, the stock one is used.)
Now, select your new theme in your admin panel (Presentation > Themes, or navigate to bb-admin/themes.php). If it’s not showing up in the admin panel, then something is wrong in the files you copied over. Maybe you made a mistake in editing the style.css.
Now, you should see your new theme there by name anyway. Select it. Now, because your theme is just a copy of the stock theme with a new name, the screenshot is identical (you just copied over screenshot.png), and when you use your new theme, the forum will look exactly the same as the stock theme. That’s OK. The files in the my-templates/ronjroy/ are being used to display the template, but they’re unchanged from stock, so they look the same. At least you’re using your new theme. Now the fun begins.
Pick a file, any file, in my-template/ronjroy. Make a change to the HTML in a PHP file or to the CSS in style.css. Save it. Now refresh your forum. It should look different. If you broke something, fix it in your theme, or just change the theme back to stock and go back to stock, then figure out what you broke.
These are not official docs by any means. It’s stuff I figured out from using the software in the past year. Some of it may have changed in new versions since I started. One thing I have learned about installing forum software though: if you find that you can’t understand the software enough to modify it, move on to another project. I don’t mean that in a bad way. I mean, if you’re not able to do the things you want, the way you want them, then why bang your head against the wall? Just install something else. It’s not worth the hassle. The hassles I was having with other software is why I ended up with bbPress. I grok it, I like it, and we get along fine.
(haha – longer reply to a long question)
August 24, 2007 at 2:49 pm #58879In reply to: bbpress doesn’t auto-close tags?
benbeltran
Memberworks wonderfully … now to see if I can make it work for the bb-signatures plugin
.
August 24, 2007 at 7:37 am #60247In reply to: Post replies bring you to the second page
_ck_
ParticipantLet’s start with are you using front-page-topics?
If so, deactivate/delete it and then download this:
http://ckon.wordpress.com/files/2007/08/change_topics_per_page.txt
edit the limits per page near the top as desired
rename .txt to .php
install and activate it
August 24, 2007 at 6:24 am #58448In reply to: fantastic looking bbpress forum
mciarlo
MemberWebsite Updated!
Comments welcome.
August 24, 2007 at 3:57 am #60265In reply to: UTF-8 / ISO-8859-1
_ck_
ParticipantIn your .htaccess file put
AddDefaultCharset iso-8859-1
Actually, I’m seeing in the header.php template
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Which would have to be edited directly.
August 24, 2007 at 1:57 am #60289In reply to: Akismet key id
Sam Bauers
ParticipantDid you not see this?
From config.php:
// Your Akismet Key. You do not need a key to run bbPress, but if you want to take advantage
// of Akismet's powerful spam blocking, you'll need one. You can get an Akismet key at
// http://wordpress.com/api-keys/
$bb->akismet_key = ''; // Example: '0123456789ab'August 23, 2007 at 5:39 pm #60285In reply to: How to filter posts by Forum AND Tags?
_ck_
ParticipantThe key is to edit the topic template so tags are shown as the ?tag=example&forum=123 (where 123 is the actual forum number)
Then you have to make a plugin that hooks
$topics = get_tagged_topics($tag->tag_id, $page);
do_action( 'bb_tag-single.php', $tag->tag_id );add_action(‘bb_tag-single.php’,’tag_forum_filter’)
where the function tag_forum_filter would manipulate (or regenerate) $topics based on whatever forum number $_GET is set to.
August 23, 2007 at 3:56 pm #56051In reply to: Latest WordPress & bbPress in another language!
ganzua
Member“hi, I have the same problem. Has anyone found a way to integrate and change the language without errors?”
I managed to translate a wp-bb integration but I don’t know if you are going to like my workaround;
1. edit bbpress config.php and in define language section point to your wp language file with this code; ‘ define(‘BBLANGDIR’, ‘wp-includes/languages/es_ES.mo’); ‘ (change es_ES.mo for the name of your language .mo file)
2. edit wp language .po file and insert there your bbpress .po file. In other words, copy/paste all bbpress entries at the end of wp .mo file
3. Open with poedit and try to save this modifed file. You’re going to have +-100 duplicated entries in an error log. Delete all duplicated entries, one by one, so you can save.
4. When you save with poedit you produce 2 files; .po file and a .mo file. This .mo file is the one you want. Now you have translated both; wp and bbpress with just one .mo file.
I do know that this workaround implies a lot of future problems and I don’t like it at all but I didn’t find any other way.
I hope someday bbpress will appear as a plugin for wordpress.
August 23, 2007 at 3:22 pm #60275_ck_
ParticipantAh nevermind, this is the “allow images” bug:
https://bbpress.org/forums/topic/cant-put-code-between-backticks-after-upgrade?replies=4
August 23, 2007 at 2:31 pm #2300Topic: what code preservation plugin is used on bbpress.org?
in forum Plugins_ck_
ParticipantI’ve tried hacking a couple wp plugins to bbpress to get better code preservation. But it’s not working.
What is used here? It seems to actually work somehow and that’s not the default technique in the core…
August 23, 2007 at 2:21 pm #58593In reply to: dodeca.org.uy
rosebud
MemberI have wordpress and bbpress integrated (in terms of users and logins) but they do not share all the functions. BBPress is translated and working fine, however, I don’t have the wordpress code translated, just a po for the theme.
August 23, 2007 at 1:39 pm #60232In reply to: Gravatar Plugin
amethystdragon
MemberThe myavatar plugin supports Gravatar but I need to do some more work to update it to the latest code – Give me a few days
August 23, 2007 at 1:28 pm #59507_ck_
ParticipantAll these problem are both cookie path
and forbidden character problems.
Both are poorly documented (or not mentioned at all)
but the good news is that fixes exist for both issues.
I have to find my previous instructions on this but
because bbpress search is so poor, this may take awhile.
Could someone please get this into a wiki or faq at some point:
Steps required for more complete and problem-free bbPress+WordPress integration:
1. cookies paths need to be changed to the same path in both WordPress and bbPress (change to domain root recommended)
https://bbpress.org/forums/topic/wordpressbbpress-single-sign-on?replies=22#post-9010
2. the integration plugin should be installed
https://bbpress.org/plugins/topic/4?replies=26&more=1
3. the allow spaces in usernames plugin should be installed (also add my underscore hack for characters bbPress by default forbids but WordPress allows – see my message later in same thread)
https://bbpress.org/forums/topic/usernames-with-spaces-do-not-work?replies=28#post-7904
4. add the ” set default role when registering new user though forum” mini plugin should be installed:
5. search your bbpress templates and force all registrations/logins through wordpress from the several places they are buried on the forum (the WP login interfaces are far more developed) – unfortunately at least one bbPress login location is hard coded in the core which will require a direct hack everytime you upgrade. ie:
<?php $request_uri=$GLOBALS["HTTP_SERVER_VARS"]["REQUEST_URI"]; ?>
<a href="/wordpress/wp-login.php?redirect_to=<?php echo $request_uri; ?>"><?php _e('Login'); ?></a>
<a href="/wordpress/wp-register.php?redirect_to=<?php echo $request_uri; ?>"><?php _e('Register'); ?></a>6. optional but highly recommended, install the “use display name” plugin for mods+admin:
August 23, 2007 at 7:06 am #58591In reply to: dodeca.org.uy
benbeltran
MemberUruguay is such a lovely country, It’s good to impulse the arts, specially film. BBPress is everywhere
open to embrace from gaming to arts, from code to random discussion. Code, indeed, is poetry.
-
AuthorSearch Results