Search Results for 'code'
-
AuthorSearch Results
-
July 31, 2014 at 9:41 am #149991
In reply to: Full Width Forum Help
Robin W
Moderatorsorry, sorry – missed that bit 🙂
Ok will start typing again !
in your bbpress.php
change the lines that say
<div class=”content-wrap”> <div id=”content”>to
<div class=”bbpress-wrap”> <div id=”bbpress-content”>Then go into
wp-content/themes/oxygen/style.css
and at the end of this file put
.bbpress-wrap {
width : 100% ;
}
#bbpress-content {
float: left;
margin: 0 0 30px;
width : 100% ;
}.bbpress #sidebar-secondary {
display:none ;}
What this does is get bbpress to use the bbpress-wrap with a width of 100% instead of content-wrap, as content-wrap is used by the other pages and need to be 67%.
Then .bbpress #sidebar-secondary is set to display none, so that this disappears
Now if that all works, it is possible that an upgrade of oxygen will take out these changes, so you really need to create a child theme and put both the bbpress.php and the style.css changes in there. See
Do come back if that deosn’t all work, without the theme I can’t test here !
July 31, 2014 at 9:13 am #149990Topic: Password protecting forums?
in forum Troubleshootingssplwork
ParticipantDo I password protect the page that the forum short code is on, or what? Password protecting the page does nothing. I’m running the Enfold theme by Kriesi.
I need to make a set of users have access to the forums, and password protect everything inside of them, and certain people be able to edit, and all be able to post.
July 31, 2014 at 9:12 am #149989In reply to: Random Topic Link
Robkk
Moderatori found the code to create a random post link that you can use as a reference , when creating a random topic link
got it from http://cazue.com/articles/wordpress-create-a-random-post-button-2013
add_action('init','random_post'); function random_post() { global $wp; $wp->add_query_var('random'); add_rewrite_rule('random/?$', 'index.php?random=1', 'top'); } add_action('template_redirect','random_template'); function random_template() { if (get_query_var('random') == 1) { $posts = get_posts('post_type=post&orderby=rand&numberposts=1'); foreach($posts as $post) { $link = get_permalink($post); } wp_redirect($link,307); exit; } }link to show
<a href="/?random=1">Random Post</a>creating a menu link , idk how to bring that link up in the menu
July 31, 2014 at 8:30 am #149987In reply to: Full Width Forum Help
aussiestar14
ParticipantHey, I didn’t fix anything! The normal page http://www.curlyhorse.info/forum is working because I inserted a short code and choosed full width. The actual forum is still not working: http://www.curlyhorse.info/forum/ausbildung/
We still need help!July 31, 2014 at 2:05 am #149975Topic: Profile user's page not found
in forum ThemesGreedyMan
ParticipantI created link to user’s profile by code:
<?php global $current_user; get_currentuserinfo(); //echo '<pre>'; //print_r($current_user); ?> <ul class="hd-account"> <?php $first_name = $current_user->user_firstname; $last_name = $current_user->user_lastname;?> <li><a href="<?php echo home_url().'/forums/profile/'.$current_user->user_login.'/'; ?>">Xin chĂ o, <?php if ($first_name == '' || $last_name == '' ) echo $current_user->display_name; else echo $first_name.' '.$last_name; ?></a></li> <li><a href="<?php echo wp_logout_url(home_url()); ?>">Thoát</a></li> </ul>I create this in theme’s header.php (not TwentyEleven …). Example, I have a link like that http://localhost/cars/forums/profile/namnguyen/. I click it and get an error “404 not found”, I don’t know why. Can someone help me?
July 31, 2014 at 12:19 am #149973In reply to: Using SSL on login – redirect loop
Stephen Edgar
KeymasterI have just had a quick look at this and with a fresh WordPress 3.9.1 install and bbPress 2.5.4 with
define('FORCE_SSL_ADMIN', true);I cannot see an issue, everything works as expected using both WordPress’ ‘Lost Password’ (https://example.com/wp-login.php?action=lostpassword) or using the bbPress shortcode[bbp-lost-pass]on a page.I also went through using the bbPress login widget with custom pages for ‘lost-password’ and ‘register’ using both
http://andhttps://as the URL’s in the Widget and again everything worked as expected.I’d any other plugins you may be using that change any of WordPress’ login/authentication to narrow down the issue.
July 30, 2014 at 10:57 pm #149970In reply to: Customizing "Reply To Topic" Area
Robkk
ModeratorHowever, even after enabling threaded replies, I’m still unable to achieve the same result with the nested reply. When I click “reply” in the top corner of the 4th post down, for example, it just scrolls to the initial reply form beneath the first post, instead of opening up a new reply form beneath the 4th post.
i dont really know then it might be edited threaded replies to bring up the reply form, i checked there code and on the reply link has
<a href="/topic/to-go-to-college-or-to-move-to-la-and-act/?bbp_reply_to=335515&_wpnonce=62ed053836#new-post" class="bbp-reply-to-link" onclick="return addReply.moveForm('post-335515','335515','new-reply-335513','335513');">Reply</a>most of this code is normal except i think
onclick="return addReply.moveForm('post-335515','335515','new-reply-335513','335513');the 335515 is most likey the post id
other than that i have no idea how to do this , but i mean if i find out in the future i will update this topic.
If you figure it out in the future before me i would like you to update this topic.
July 30, 2014 at 10:04 pm #149969In reply to: Customizing "Reply To Topic" Area
MarximusMG
Participant@robkk You rule, thanks for the help! Here’s a site I’m just using to mess around with these customizations on: http://revyved.com/forums/topic/just-stumbled-on-this/
I was able to successfully move the reply form to beneath the first post in each topic, thanks to your suggestion to enable show lead topic, as well as moving the line of code in content-single-topic.
However, even after enabling threaded replies, I’m still unable to achieve the same result with the nested reply. When I click “reply” in the top corner of the 4th post down, for example, it just scrolls to the initial reply form beneath the first post, instead of opening up a new reply form beneath the 4th post.
July 30, 2014 at 8:47 pm #149965In reply to: Forums index vs custom page shorturl
kopperwoman
ParticipantI’m having a similar problem to dustinarmstrong. But its not exactly the same.
I’m trying to fix a broken forum set up for a client. I did not do the forum installation (he did it himself) AND the forum is installed on a live site that gets lots of web traffic so I don’t want to do anything that might impact the website overall.
Here’s my situation:
1) BBPress was installed (I don’t have details about when and how),
2) a page was created with the[bbp-forum-index]shortcode on it
3) the forum didn’t work, so my client contacted me to fix it
4) I went into settings > forums and changed the forum root slug from the default “forum” to “travel-forums” (the name of the page where the shortcode lives. The error message “Possible bbPress conflict: Forum slug” showed up next to the slug field after saving the settings.
5) I also changed the single forum slug from the default “forum” to “travel-forums”. The error message “Possible bbPress conflict: Forums base” showed up next to the slug field after saving.In my case, the forum page DOES show up at http://foobar.com/travel-forums but it is empty except for the welcome text that I had entered into the forum main window. (So it just says “Welcome to our forum” without any of the discussion topics showing up.
Also, I have the “Recent Topics” widget enabled on my sidebar and my three test discussion topics DO show up there. When I click on any of them they take me to the correct URL but the pages are blank. So, for example, when I click on “test topic” in the widget I land on http://foobar.com/travel-forums/topic/test-topic/ and the page displays the topic header “Test topic” and the topic question “what do you think about travel?” but it doesn’t display any of the posts.
I’m not sure if this behavior is related to the slug conflict error messages or if something else is wrong.
I’m trying to follow the advice that Stephen Edgar gave.
First up, I think this is probably true in my case:
most likely you have something else either titled or using the slug discuss and this includes any items in trash as even though they are in the trash they still reserve that slug and it is not released until the item is removed from the trash.
This is probably a stupid question but How do I empty the trash to make sure that the old slug is removed?
Second, I’d like to try this:
To fix this try resetting your permalinks. In your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.
but since my website is live and has been for a long time (and has lots of blog posts using the custom structure already) I’m concerned that this could permanently break the existing links. Any thoughts on this?
July 30, 2014 at 8:09 pm #149962In reply to: Import to bbPress from custom forum
Stephen Edgar
KeymasterAwesome…
(The
———–issue is typically login credentials expiring in WordPress between WordPress and MySQL)July 30, 2014 at 2:25 pm #149949In reply to: Unable to view forum root
Robin W
Moderatorwhich page from my theme does bbpress display using?
your theme is a paid one, so I can’t just download and have a quick look.
July 30, 2014 at 12:26 pm #149942In reply to: Importing favorites from bbPress 1.x
Doug Smith
ParticipantThanks, Stephen. I was just about to update this conversation with the same thing now that I’ve had a chance to look through the code.
I talked with @jjj about this at WordCamp Milwaukee and he suggested creating a Trac ticket for it, which I have done. https://bbpress.trac.wordpress.org/ticket/2668
July 30, 2014 at 11:08 am #149937Robkk
ModeratorDo you know how I would go about hiding the “Create New Topic” form at the bottom of the page, now that I’ve made the link at the top to go to the “New Topic” standalone page?
copy content-single-forum.php into your bbpress folder
and delete any instance that say<?php bbp_get_template_part( 'form', 'topic' ); ?>that should do it
July 30, 2014 at 10:59 am #149936In reply to: Customizing "Reply To Topic" Area
Robkk
Moderator@marximusmg yeah this is pretty easy
copy content-single-topic into your bbpress folder in your child theme.
then just move
<?php bbp_get_template_part( 'form', 'reply' ); ?>just below
<?php bbp_get_template_part( 'content', 'single-topic-lead' ); ?>July 30, 2014 at 7:20 am #149927In reply to: Show enhanced info in user's profile
Stephen Edgar
KeymasterYou can also use WordPress’ custom profile fields:
https://codex.wordpress.org/Plugin_API/Filter_Reference/user_contactmethods
And an example plugin here using the above method:
July 30, 2014 at 7:02 am #149922In reply to: small problem with my forum
Stephen Edgar
KeymasterWhy not change the code back to what it was then?
You should look up some CSS resources and use your browsers ‘inspector’ to look at how to make CSS changes to your theme, use your favourite search engine to find these.
July 30, 2014 at 6:59 am #149921In reply to: Content not showing on using custom template
Stephen Edgar
KeymasterbbPress will use that
forum.phpfile as a wrapper template for all of bbPress pages and that is most likely what the issue is.I’d suggest if you need a wrapper template to work with your theme you copy the contents of your themes
page.phpto a file namedbbpress.php.Then copy any bbPress templates you want to customize to your themes folder.
See these for more info on copying bbPress templates and child themes:
July 30, 2014 at 6:55 am #149920In reply to: moderating bbpress
Stephen Edgar
KeymasterSee https://codex.bbpress.org/moderation-and-blacklisting/
And if you are looking for either registration or topic/reply captch check out the plugins available as there are a few that do registration and at least one for captcha topics/replies:
July 30, 2014 at 6:51 am #149918Stephen Edgar
KeymasterMuch of what happens when the ‘moderation’ is triggered from comment moderation has not been added to bbPress until the code I’ve added recently.
If your comfortable with PHP you could take a look at what I have thus far in the following tickets:
This first one handles post of what is coming for moderation:
https://bbpress.trac.wordpress.org/ticket/2645This second one is for the template to notify the user that there topic/reply is pending moderation, I haven’t started on this due to needing to implement everything in the above #2645 first, now that I got most of the code finished for that yesterday I plan on looking at this in the next few days.
https://bbpress.trac.wordpress.org/ticket/2589
Keep an eye on those tickets and that should give some hints of what is happening.
July 30, 2014 at 6:44 am #149917In reply to: Forum slug troubleshooting
Stephen Edgar
KeymasterYou cannot have both the ‘forum root’ and ‘forum slug’ the same as you have seen in that you get a ‘slug conflict’ warning, I’d suggest you leave the ‘forum root’ slug as
travel-forumsbut change yourforum slugback toforum.To check the ‘trash’ visit your ‘posts’, ‘pages’, and ‘forums’ sections in WordPress and you should see if you have any posts, pages, or forums in the ‘trash’ (or bin if your using English UK WordPress language packs).
Have a look at those and let me know how it goes.
July 30, 2014 at 6:38 am #149915In reply to: Forum subscriptions
Stephen Edgar
KeymasterEmails previous to bbPress 2.5.4 were sent out out to each recipient email individually (one email per user), since bbPress 2.5.4 we now only send a single email with all the recipients as BCC (Blind Carbon Copy) and all emails are sent using as you state a default email address of
noreply@domain.tld.bbPress also works fine to send emails with many of the WordPress mail plugins and should work as we are using WordPress’
wpmailfunction to send them.July 30, 2014 at 6:16 am #149910Stephen Edgar
KeymasterSee https://codex.bbpress.org/moderation-and-blacklisting/
The above document outlines the different behaviours between adding the ‘bad word’ to the ‘blacklist’ or ‘comment moderation’ sections and what the users see, in the next release of bbPress there will be a notice if the ‘bad word’ was added in ‘comment moderation’ and the user will know that there submission is pending moderation, the blacklist behaviour will not be changing.
July 30, 2014 at 6:12 am #149909In reply to: Import forums from localhost
Stephen Edgar
KeymasterOpen up your punBB
config.phpfile, it should be located in the root folder of your punBB install and should contain something similar to this:$db_host = 'localhost'; $db_name = 'import_punbb'; $db_username = 'root'; $db_password = 'root'; $db_prefix = 'punbb_';That table prefix
punbb_is what I suspect is incorrect.July 30, 2014 at 6:10 am #149908In reply to: Import from phpBB comes back empty
Stephen Edgar
KeymasterI see you do not have a database table prefix in your settings?
Check your phpBB database tables, most likely they have a prefix of
phpbb_Here is a snip from my phpBB database, as you can see the database is named
ntwb_phpbbv3and all my tables have a prefix ofphpbb_, check what your database prefix is and try adding that to your settings.
July 30, 2014 at 5:46 am #149904In reply to: My impressions so far
Stephen Edgar
KeymasterThat ‘warning system’ will remain plugin territory for a while even though I have a specific use case that this is important for it, it will still remain that way for a while, just because the functionality CAN be performed does not explicitly mean that it should be included with bbPress core.
As I mentioned above ‘Featured Plugins’ will most likely evolve to become a more refined list and the power and flexibility of bbPress allows us to do this without forcing/giving every user the ‘kitchen sink’ just because we can.
“bbPress is forum software, made the WordPress way.” and just like WordPress’ philosophy we are making “Decisions, Not Options”. And for example this decision extends to user profile custom fields, if you want these for post authors in WordPress, you look to a custom function or plugin, bbPress is the same, a custom function or a plugin.
bbPress utilizes WordPress Template Hierarchy to allow sites, theme authors and plugin developers to make amazing forum sites powered by bbPress and simply creating a set of pages that work with all the themes out there is not a one size fits all, some themes use tables, some divs, some unordered lists, responsive, non responsive, the combinations are endless and as said we try our best to ensure template compatability but removing the flexability just to limit designers and developers to no longer have these options available to them is something I doubt we will change for quite a while. We would like to include an additional set of default templates in bbPress, but that’s another project we just have not got to yet, bbPress already fully supports numerous templates though currently it only ships with one set.
I come from a phpBB background and have spend many weeks in ‘other’ forums databases whilst supporting the ~25 importers included with bbPress, the current way the WordPress database schema is structured is partially a limitation on what options we have available to us and still keep bbPress light and compact without adding new tables to the database.
-
AuthorSearch Results