Search Results for 'code'
-
AuthorSearch Results
-
July 14, 2014 at 9:23 am #149112
In reply to: How to make similar bbpress forum to QuicSprout one?
Robkk
ModeratorThanks so much. I am not an expert in this, so I will wait until Sunday.
haha im no expert , im just some guy helping out people on here the best i can
-Login/Register buttons above the forum
quicksprout has ajax login and its also in a popup window
so if you want that install wp-modal-login
after that copy your content-archive-forum.php to your child theme
and make sure that is has this code inside of it , heres a snippet
<?php do_action( 'bbp_template_before_forums_index' ); ?> <?php if ( bbp_has_forums() ) : ?> <?php if ( is_user_logged_in() ) { } else { ?> <div class="bbp-modal-login"> <?php add_modal_login_button( $login_text = 'Login', $logout_text = 'Logout', $logout_url = 'http://sitename', $show_admin = true ); ?> </div> <?php }; ?> <?php bbp_get_template_part( 'loop', 'forums' ); ?> <?php else : ?> <?php bbp_get_template_part( 'feedback', 'no-forums' ); ?> <?php endif; ?>style the link to whatever you want with custom css
here is a template.bbp-modal-login a.login.wpml-btn.login-window { float: left; padding:5px; color:#fff; background:#333; text-decoration:none; text-transform:uppercase; }and like i said you could also do the shortcode version too
nice round images of members
i saw your site , and see you already have this
images for read/unread posts
if you want the images here
the whole functionality of the unread posts on their forums is like 2 unread posts plugins from the wordpress plugin respository mixed together
https://wordpress.org/plugins/bbpress-mark-as-read/
https://wordpress.org/plugins/bbpress-unread-posts/i cant really help on this
statistics at the bottom
this should be the bottom of your content-archive-forum.php
<?php do_action( 'bbp_template_after_forums_index' ); ?> </div> <?php echo do_shortcode("[bbp-stats]"); ?>to style the bbpress statistics shortcode put content-statistics.php into your child theme
this should be your entire content-statistics.php
<?php /** * Statistics Content Part * * @package bbPress * @subpackage Theme */ // Get the statistics $stats = bbp_get_statistics(); ?> <?php do_action( 'bbp_before_statistics' ); ?> <div class="bbp-stats"> <ul class="bbp_stats"> <li> <?php _e( 'Users', 'bbpress' ); ?></dt> <strong><?php echo esc_html( $stats['user_count'] ); ?></strong></li> <li> <?php _e( 'Topics', 'bbpress' ); ?></dt> <strong><?php echo esc_html( $stats['topic_count'] ); ?></strong></li> <li> <?php _e( 'Replies', 'bbpress' ); ?></dt> <strong><?php echo esc_html( $stats['reply_count'] ); ?></strong></li> </ul> </div> <?php do_action( 'bbp_after_statistics' ); ?> </dl> <?php unset( $stats );add this for custom css
.bbp-stats .bbp_stats { list-style-type: none; display: block; text-align: center; margin-left: 0px; float: none; } .bbp-stats .bbp_stats li { margin: 0; display: inline-block; padding: 5px; }“New Thread button”
this is just a drop link , example of a drop link would be to put #new-post at the end of the url of this topic and you will see that you will end up at the new topic/reply form
copy content-archive-topic.php into your child theme right now then
ILL tell you the rest when im done , because right now im having some trouble
July 12, 2014 at 2:10 pm #149083Jerry
ParticipantHi Robin. I’m on my way to the UK to support the Farnborough airshow, so I can’t access my home computer to replicate the error for another week. What I can tell you is; when I removed the switch_to_blog id input parameter and instead assigned a variable $cat to ‘post_parent’, and set $cat = $attr[‘id’];, I received no errors. I hard-coded to the blog site, then I can adjust the id to equal the forum id. So my feeling is that shortcodes cannot accept two inputs? If I’m wrong about that, then I will re-address this upon my return to the states.
July 12, 2014 at 1:43 pm #149081In reply to: customizing bbpress admin links
Robkk
ModeratorI can’t post any code right now I’m on my cell , I’ll do it tomorrow , but its not really much though I just made a menu in HTML and put the admin links in each list .
The only problem I have is just making the specific admin links show up on their specific post type.
I can tell you other ideas I have thought to place the menu of links besides HTML but that might confuse you more.
July 12, 2014 at 1:25 pm #149080In reply to: customizing bbpress admin links
Robin W
Moderatorok, my brain is now mush, but I am still hooked.
Can you post you solution so far, then I’ll put it in my test site
So I need to know
what code you put in your functions file
what code you have in loop single reply (and starting where!)
any other code you have, and where you’ve put it
I’ll then have a play !
July 12, 2014 at 1:14 pm #149078Robin W
Moderatoryou’ll need to have some logic in here
eg
if there are replies find latest reply, and then find that replies author and insert that.
if there are no replies, then put in topic authorAt the moment you looking up the reply author for a topic, and that won’t work.
just had a play and this seems to work, but only tested quickly, so you’d need to set up a few topics with and without single and multiple replies and check that it worksin all circumstances
// Maybe get the topic author if ( ! empty( $settings['show_user'] ) ) { //see if there has been replies, and if so set to latest $replycheck = get_post_meta( $topic_id, '_bbp_last_reply_id',true); //if we have replies ie replycheck holds the latest reply number if (!empty ($replycheck)) $author_link = bbp_get_reply_author_link( array( 'post_id' => $replycheck, 'type' => 'both', 'size' => 14 ) ); else $author_link = bbp_get_topic_author_link( array( 'post_id' => $topic_id, 'type' => 'both', 'size' => 14 ) ); } ?>July 12, 2014 at 9:15 am #149074In reply to: Sumbit to email address
localmarketingus
ParticipantBecause on a ‘conatact form” you can’t enter html or code like in bbpress.. thats why i asked the question.
July 12, 2014 at 8:16 am #149069In reply to: How to make similar bbpress forum to QuicSprout one?
Robkk
ModeratorIf this confuses you wait til Sunday or if anyone knows what I ment and wants to properly describe every detail and post code
July 12, 2014 at 8:08 am #149068In reply to: How to make similar bbpress forum to QuicSprout one?
Robkk
ModeratorFor login and register you could create individual pages for login and registration , you could use the login and register form short codes by bbpress and put them in your pages or if you use theme my login or something similar that creates custom frontend membership pages use that. And put an HTML link to both pages above loop-forums.php or above the call of loop-forums.php in archive-forum.php
Round avatar images use border-radius:50%; or something like that , you could probably right click inspect element target the avatar image and get the CSS code right off of quick sprout and put that in your custom css
Unread posts you have to wait til its sunday (time I will be home to see my desktop)
Stats at bottom you could use the bbpress stats short code , if you want it in your templates use the php do shortcode function with the bbpress stats short code
I don’t know how the new thread button fuctions , but you could create a page let’s say “new topic” and link to it the same as the login/register buttons
July 12, 2014 at 7:45 am #149067In reply to: Allow HTML tags in Post for All Users
Stephen Edgar
KeymasterYou shouldn’t really be letting users add styles, you should have your theme do that, that said., just add a new section for the
ptag andstylewithinplike so:// Paragraph 'p' => array( 'style' => true, ),July 12, 2014 at 6:45 am #149062In reply to: BBPress advise wanted
Stephen Edgar
KeymasterCool, most of things you mention can be done, some are ready to go, others need a few tweaks and custom PHP code to achieve the results.
1. create login in the wp home page for BBpress
Create a WordPress page, set that as your home page, add the bbPress login/register shortcodes
2. allow only offline registered members to be registered as BBpress users
Not quite sure what you mean here, you can set your forums to ‘private’ so only logged in registered members can see or use the forums.
3. enable/disable users, and hence their profiles
This is more of a WordPress question than bbPress, if the member has an active and valid WordPress account then they can login. If you want to remove the user and their associated profile then you’d delete the actual WordPress user which inherently flows down to bbPress.
4. allow users to create profiles with their filmography and perhaps a vimeo embed or two
With a few minor tweaks/customisations you could achieve this, you may also want to take a look at BuddyPress’ Extended profiles which will let you do this also.
5. can users have simple URLs for their profiles, like perhaps example.com/username?
Yep, this is built in, here’s yours here on bbpress.org https://bbpress.org/forums/profile/parambyte/
July 12, 2014 at 6:28 am #149059In reply to: Allow HTML tags in Post for All Users
Stephen Edgar
KeymasterClick the ‘download gist’ link, it will download a zip archive, unzip it and use FTP to upload the plugin to your WordPress plugins folder, typically
/wp-cntent/pluginsEdit: Or go to ‘Plugins’ -> ‘Add new’ -> ‘Upload’ and you can then upload it directly.
July 12, 2014 at 6:10 am #149053In reply to: Deep integration (old bbpress) and empty wp_head
Stephen Edgar
KeymasterI have hardly dug into bbPress 1.x and am not familiar with the code base at all.
How about grab the latest bbPress v1.2 and create a test/demo site on your local PC with a backup your database, things should theoretically work though you ‘d have to make sure the database upgrade routine was triggered of course.
That should then give you a working version with your database to then start comparing the base code of your test site vs your live site.
That said, what is stopping you from upgrading? I am presuming here that there is something stopping you from installing WordPress and upgrading bbPress 1.x to the v2.x plugin?
July 12, 2014 at 5:59 am #149051In reply to: Allow HTML tags in Post for All Users
Stephen Edgar
KeymasterGrab this custom plugin from here https://gist.github.com/ntwb/7797990
You will need to change one part of it though:
From:
// Span 'span' => array( 'class' => true, ),To:
// Span 'span' => array( 'class' => true, 'style' => true, ),That will then modify the allowed tag
spanto also includestyleinside the span.July 12, 2014 at 5:12 am #149043In reply to: Custom user administration page
Stephen Edgar
KeymasterCreate a page or two and use the bbPress shortcodes
https://codex.bbpress.org/shortcodes/
https://codex.bbpress.org/widgets/July 12, 2014 at 5:09 am #149042In reply to: Migration from bbpress?
Stephen Edgar
KeymasterThat is up to the the forum software you choose to use, all our source code is open source and any forum software package is free to create an import tool to import from bbPress, we do the same, we import from many forum packages but it is up to each application to add support if they want new customers to be able to import from bbPress, I know a few of the common ones do.
July 12, 2014 at 4:55 am #149040In reply to: Crayon Syntax Highlighter not working / tags issue
Stephen Edgar
KeymasterI just had a play with this and you are correct, it works for administrators/keymasters but not standard ‘participants’ or ‘anonymous’ users.
Grab this custom KSES plugin I have here https://gist.github.com/ntwb/7797990
I just added
classto to thepresection as that is where the issue is,preis allowed but<pre class="whatever">is not.Double check any of the other allowed tags and/or remove ones you don’t want/need.
Edit: I just double checked against the default bbPress allowed tags and all are there, you may or may not want the table sections, up to you. I also made a note to add
classas an allowed tag ofprefor bbPress core, I can’t think of a reason for us not to add this by default.July 12, 2014 at 4:02 am #149038In reply to: phpBB Import Error(s)
Stephen Edgar
KeymasterI added support for the anonymous/deleted phpBB user topics and replies, just finalizing all of this for the any other forums that also have this feature, SMF, Drupal, Vanilla.
For the redirects I need to find a workaround to have WordPress correctly verify that
viewtopic.php?f=3&t=9is a valid URL, if we can do that then redirects could be included for imported forums and that would be awesome.July 12, 2014 at 3:29 am #149037In reply to: Reduce size of embed Media
Stephen Edgar
Keymaster@leonyipa Don’t get you bb’s confused, what you wrote way up there and quoted here:
And I paste the code into: /public_html/wp-content/themes/bp-default/functions.php
That is the BuddyPress Theme ‘BP Default’, nothing to do with bbPress so make sure you are updating the correct files 😉
July 12, 2014 at 2:43 am #149031In reply to: How do I add a sidebar to all topics pages?
Robin W
Moderatorhave both of you been through
come back if you need further help.
July 12, 2014 at 2:41 am #149030In reply to: No sidebar in BBpress WP Tweaks
Robin W
Moderator@obinyc sorry missed this post
try
<?php get_sidebar(); ?>
lots of different boats, and yours is probably not the same.
Do you have a sidebar at all showing?
Have you followedCome back if you need further help
July 12, 2014 at 2:26 am #149020In reply to: Remove Breadcrumbs
Robin W
Moderatorok
the answer is :
How to do it :
July 12, 2014 at 2:26 am #149017In reply to: disabling breadcrumbs
Robin W
Moderatorok
the answer is :
How to do it :
July 11, 2014 at 11:48 am #148989SeeingBlueS2
ParticipantOk so I played around with lines 807 and made it match what line 1157 looked like.
This is line 1157:$author_link = bbp_get_reply_author_link( array( 'post_id' => $reply_id, 'type' => 'both', 'size' => 14 ) );
Then I moved line 1152$reply_id = bbp_get_reply_id( $widget_query->post->ID );between lines 802 & 803 thinking this might work and it doesn’t make any difference which was confusing to me.. What am I doing wrong?July 11, 2014 at 10:33 am #148988In reply to: Reduce size of embed Media
Robkk
Moderatorto test out the code make pictures really small and add important
#bbpress-forums div.bbp-topic-content img, #bbpress-forums div.bbp-reply-content img { max-width: 100px!important; max-height: 50px!important; }but you could also send me a link to a forum post with a picture too
July 11, 2014 at 10:21 am #148987Topic: Allow HTML tags in Post for All Users
in forum TroubleshootingLeonyipa
ParticipantHow to allow all users to use HTML codes, because at the moment, only keymaster can have access to all HTML tags.
I would like to allow user to use this code:
//<span style=”font-size: 36pt; font-family: impact, chicago;”>Pademelon</span><span style=”font-size: 36pt; font-family: impact, chicago;”>Pademelon</span>
-
AuthorSearch Results