Search Results for 'code'
-
AuthorSearch Results
-
July 17, 2014 at 6:17 pm #149256
In reply to: How to make similar bbpress forum to QuicSprout one?
Pavle123
ParticipantOkay I am here with “New Thread button”
1)Downloaded folder content-archive-topic.php from my bbPress plugin folder.
2)Uploaded whole folder to my child theme
here is how it looks now

On top of the code in that folder I added this code :
<?php do_action( 'bbp_template_before_topics_index' ); ?> <a class="bbp-new-topic-button" href="#new-post">New Thead</a>So now my folder looks like this
<?php do_action( 'bbp_template_before_topics_index' ); ?> <a class="bbp-new-topic-button" href="#new-post">New Thread</a> <?php /** * Archive Topic Content Part * * @package bbPress * @subpackage Theme */ ?> <div id="bbpress-forums"> <?php if ( bbp_allow_search() ) : ?> <div class="bbp-search-form"> <?php bbp_get_template_part( 'form', 'search' ); ?> </div> <?php endif; ?> <?php bbp_breadcrumb(); ?> <?php if ( bbp_is_topic_tag() ) bbp_topic_tag_description(); ?> <?php do_action( 'bbp_template_before_topics_index' ); ?> <?php if ( bbp_has_topics() ) : ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php bbp_get_template_part( 'loop', 'topics' ); ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php else : ?> <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?> <?php endif; ?> <?php do_action( 'bbp_template_after_topics_index' ); ?> </div>Unfortunatlelly I am unable to see new thread link anywhere, what am I doing wrong guys? @netweb @robkk ?
July 17, 2014 at 5:37 pm #149255In reply to: How to make similar bbpress forum to QuicSprout one?
Pavle123
ParticipantHaha I am not that confused ๐
Joking, I would be totally lost without you man, thanks for everything.
I just had to add !important; thingy to the css of my child theme.
.bbp-stats .bbp_stats li { margin: 0; display: inline-block <strong>!important;</strong> padding: 5px; }Now my stats look neat. Any idea how this forum I sent you a link to has them with these icons,etc?
Even now my stats look neat. Will try to move on to the “new thread button” now, and post what I did ๐
July 17, 2014 at 3:41 pm #149254In reply to: Description under title forum
Vladimir
ParticipantHello @robin-w,
Now i fixed it, only i was need to put this lines into loop-single-forum.php
<?php do_action( 'bbp_theme_before_forum_description' ); ?> <div class="bbp-forum-content"><?php bbp_forum_content(); ?></div> <?php do_action( 'bbp_theme_after_forum_description' ); ?>July 17, 2014 at 3:13 pm #149251In reply to: Sidebar reappear in topic and topic/
Robin W
Moderatorok, so in your PC create a file called bbpress.php
(you can use notepad for this)
then dump this code into it
<?php /** * bbPress - Forum Archive * * @package bbPress * @subpackage Theme */ get_header(); ?> <?php do_action( 'bbp_before_main_content' ); ?> <?php do_action( 'bbp_template_notices' ); ?> <div id="forum-front" class="bbp-forum-front"> <h1 class="entry-title"><?php bbp_forum_archive_title(); ?></h1> <div class="entry-content"> <?php bbp_get_template_part( 'content', 'archive-forum' ); ?> </div> </div><!-- #forum-front --> <?php do_action( 'bbp_after_main_content' ); ?> <?php get_sidebar(); ?> <?php get_footer(); ?>save it and using ftp copy it to get
wp-content/themes/%yourthemename%/
where %yourthemename% is the name of your theme
so you end up with
wp-content/themes/%yourthemename%/bbpress.php
bbpress will then use this template
Come back and let us know how you get on !
July 17, 2014 at 1:38 pm #149246Topic: Forum index not ordering topics by Freshness
in forum Troubleshootingallieslabs
ParticipantHey Guys,
We would like the topics on the Forum index page to display in order of Freshness. I understand this to be the default behavior, but for some reason our forum is not using that ordering.
http://cornerstonecollective.com/forum/
I have looked in settings and dug into the source code looking for a way to set the order to use the appropriate meta data, which I believe to be _bbp_last_active_time, but cannot seem to find the answer. Any suggestions would be most appreciated!
Thanks!
WordPress Version: 3.9.1
bbPress Version: 2.5.4
Website: http://cornerstonecollective.com/forum/July 17, 2014 at 1:23 pm #149244In reply to: How to make similar bbpress forum to QuicSprout one?
Robkk
Moderator@pavle123 damn your confused haha
read everything carefully
Look at the code i tell you to put in templates carefully , it is just a snippet of the template with each new code in it. So you have to copy the original template to your child theme. find where the new code on here is placed, compare it to the original and place the new code in your copy of the templates in your child theme.
nothing goes into your child theme functions.php
you copy bbpress templates into your child theme so its okay when bbpress updates, i explain exactly what template to copy and also i show you a snippet of where to put the code by the original code.
you put custom css into anything that can handle custom css
in bbpress.css in your child theme(you copy the original in your child theme)
in your child themes css stylesheet
the jetpack plugin module custom css
a standalone custom css pluginif your still confused read https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum-part-2/
July 17, 2014 at 12:10 pm #149243In reply to: bbPress don't work.
thecatholicwoman
ParticipantCan you explain what steps you took? It does sound like you did not add the shortcode that Paviel123 spoke of. However, if you followed the same steps and it worked on the test site I am assuming that something more may be going on. I am learning myself but when I had issues some very nice people helped me and I know what it is like to be where you are ๐
If you can provide some more details and links it would be very helpful
July 17, 2014 at 10:34 am #149242In reply to: bbPress don't work.
Pavle123
ParticipantIt would be useful if you could share the link or something.
Have you pasted the forum shortcode on a page?Forums
[bbp-forum-index] โ This will display your entire forum index.
July 17, 2014 at 8:54 am #149241In reply to: How to make similar bbpress forum to QuicSprout one?
Pavle123
ParticipantOh crap, do you mean I should copy the whole folder content-archive-topic.php inside my theme? Well that makes sense ๐
Here is what I did :
1) Uploaded content-archive-forum.php to my child theme folder.
2) Added this piece of code at the bottom<?php do_action( 'bbp_template_after_forums_index' ); ?> </div> <?php echo do_shortcode("[bbp-stats]"); ?>3) Added this CSS in my style.css of child theme (CSS is not working unfortunately, not sure why?)
.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; }So, now stats are shown at the bottom, but CSS is not targeting the stats.
Okay about “new thread button” I was unable to make it work. Here is what I did.
1) I added content-archive-topic.php folder from my bbPress plugin content-archive-topic.php into my child theme folder.2)Added this code
<?php do_action( 'bbp_template_before_topics_index' ); ?> <a class="bbp-new-topic-button" href="#new-post">New Thead</a>At ABOVE the content-archive-topic.php
<?php /** * Archive Forum Content Part * * @package bbPress * @subpackage Theme */ ?> <div id="bbpress-forums"> <?php if ( bbp_allow_search() ) : ?> <div class="bbp-search-form"> <?php bbp_get_template_part( 'form', 'search' ); ?> </div> <?php endif; ?> <?php bbp_breadcrumb(); ?> <?php bbp_forum_subscription_link(); ?> <?php do_action( 'bbp_template_before_forums_index' ); ?> <?php if ( bbp_has_forums() ) : ?> <?php bbp_get_template_part( 'loop', 'forums' ); ?> <?php else : ?> <?php bbp_get_template_part( 'feedback', 'no-forums' ); ?> <?php endif; ?> <?php do_action( 'bbp_template_after_forums_index' ); ?> </div> <?php do_action( 'bbp_template_after_forums_index' ); ?> </div> <?php echo do_shortcode("[bbp-stats]"); ?>But its not working for me.
Any ideas?
July 17, 2014 at 8:17 am #149238In reply to: How to make similar bbpress forum to QuicSprout one?
Pavle123
ParticipantHm, okay I did not know where elswehere to put it.
<?php /** * Archive Topic Content Part * * @package bbPress * @subpackage Theme */ ?> <div id="bbpress-forums"> <?php if ( bbp_allow_search() ) : ?> <div class="bbp-search-form"> <?php bbp_get_template_part( 'form', 'search' ); ?> </div> <?php endif; ?> <?php bbp_breadcrumb(); ?> <?php if ( bbp_is_topic_tag() ) bbp_topic_tag_description(); ?> <?php do_action( 'bbp_template_before_topics_index' ); ?> <?php if ( bbp_has_topics() ) : ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php bbp_get_template_part( 'loop', 'topics' ); ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php else : ?> <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?> <?php endif; ?> <?php do_action( 'bbp_template_after_topics_index' ); ?> </div>So this obviously does not go into css, so do you know where inside my child theme should I put the content-archive-topic.php code?
July 17, 2014 at 6:08 am #149236In reply to: How to make similar bbpress forum to QuicSprout one?
Pavle123
ParticipantHey Robkk,
Okay I started customizing ,and I started with new thread button.
I did this as you suggestedcopy content-archive-topic.php into your child theme right now then
And I copied it into my child theme functions.php, but it all looked messed up, is the functions.php the place to copy this code or not?
Thanks again, you are amazing.
July 17, 2014 at 2:07 am #149229In reply to: Different Sidebar for the Forums
Robin W
Moderatorbbpress will use the default page template for the main index rather than the specific page template set in the page – so your setting in the forum page won’t apply.
There are several ways around this, but as your plugin is a paid one, I can’t see the code to recommend the best solution.
So first off I’d post a query onto their support site
they probably have come across bbpress before and will know the answer. You could tell them that bbpress uses ‘is_bbpress()’ to see if it is a bbpress page, that might help them.
July 16, 2014 at 3:50 pm #149222Robin W
Moderator1. bbpress plugins add exactly as normal wordpress plugins
Dashboard>plugins
Bbpress will try and use your theme, you may want to visit the set up guides
2. depending on your theme, you should see the ability to add a topic at the end of each forum.
You can add a ‘topic’ add in your sidebar using the text widget and putting
<a href="/add-new-topic/">Create a new topic</a>in the text
July 16, 2014 at 2:45 pm #149220In reply to: bbpress SQL Injection
John James Jacoby
KeymasterEchoing what Stephen said above, these issues are not actual issues (with bbPress 1.x or 2.x) and in are in no way responsible for anything that could have happened to your site.
When something is not installed incorrectly, of course it isn’t going to work correctly. These issues are akin to installing your TV with the screen facing the wall, and complaining that you can’t see it from the couch. ๐
If it so happens any security issues are found in any version of bbPress, please do not publicly report them in these forums. Instead, responsibly disclose us:
https://codex.wordpress.org/FAQ_Security
We try to be really good about fixing any security issues ASAP.
July 16, 2014 at 11:34 am #149218In reply to: Sidebar reappear in topic and topic/
Robin W
ModeratorJuly 16, 2014 at 2:08 am #149201In reply to: Vbulletin to bbPress Import – Replies Missing
Stephen Edgar
KeymasterOk, maybe the pre v3.0.0 never included ‘topic tags’ so the best solution is to delete or comment out this section in
vBulletin3.phpBasically remove the code between lines #293 and #334 in
vBulletin3.phpbbPress 2.5.4https://bbpress.trac.wordpress.org/browser/tags/2.5.4/includes/admin/converters/vBulletin3.php#L293
https://bbpress.trac.wordpress.org/browser/tags/2.5.4/includes/admin/converters/vBulletin3.php#L334I hope to get the updates that I have been doing over the past week and a bit finished by the end of the week and it would be great if I could get a few people to test theme out ๐
July 16, 2014 at 1:41 am #149197In reply to: Vbulletin to bbPress Import – Replies Missing
themefurnace
ParticipantI believe I did get this error :
[Table 'vbulletincopy.tagthread' doesn't exist]The version is 3.0.0 RC8
Thanks
July 16, 2014 at 1:35 am #149195In reply to: Vbulletin to bbPress Import – Replies Missing
Stephen Edgar
KeymasterI’m still not having any issues with my vBulletin 3 databases ๐
First up, once the import is finished the progress window should look something like this:
Repair any missing information: Continue Conversion Complete No threaded replies to convert Converting replies (79500 - 79599) Converting replies (79000 - 79499) ... Converting replies (300 - 399) Converting replies (200 - 299) Converting replies (100 - 199) Converting replies (0 - 99) Converting topic tags (0 - 99) No super stickies to stick Calculating topic stickies (0 - 99) Converting topics (5000 - 5099) Converting topics (4900 - 4999) ... Converting topics (200 - 299) Converting topics (100 - 199) Converting topics (0 - 99) Calculating forum hierarchy (0 - 99) Converting forums (0 - 99) Delete users WordPress default passwords (0 - 99) Converting users (0 - 99) Starting ConversionIn particular, do you get to see the
Conversion Completewithout any errors shown?Do you ever (or even know if you can remember) if you see the importer is actually converting topic tags per
Converting topic tags (0 - 99)or do you see an error along the lines ofWordPress database error: [Table 'vbulletincopy.tagthread' doesn't exist]Also @themefurnace what version of vBulletin is it specifically? v3.1? v3.2? v3.81? etc
July 16, 2014 at 12:48 am #149192In reply to: customizing bbpress admin links
Robkk
Moderatori got the topic sticky link to show using
<?php echo bbp_get_topic_stick_link(); ?>i got it the code between the
libut it shows both the sticky and supersticky link
@robin-w is there any arguments that i could use to display 1 link at a timeall the code that talks about the sticky link is in the 2717 in template.php in includes/topics
i have a feeling that i could do something with this code on 2774 but idk
// Combine the HTML into 1 string $retval = $r['link_before'] . $stick_display . $super_display . $r['link_after']; return apply_filters( 'bbp_get_topic_stick_link', $retval, $r ); }July 15, 2014 at 7:57 pm #149175In reply to: How to remove "Change Topic"?
Stephen Edgar
KeymasterYou want to change line #109 in
form-topic.php
https://bbpress.trac.wordpress.org/browser/tags/2.5.4/templates/default/bbpress/form-topic.php#L109From:
<?php if ( !bbp_is_single_forum() ) : ?>To:
<?php if ( ! ( bbp_is_single_forum() || bbp_is_topic_edit() ) ) : ?>July 15, 2014 at 3:07 pm #149166In reply to: customizing bbpress admin links
Robkk
Moderatorbasically it adds if-topic and if reply choices
thank you for this!!! now it displays the right links on the right post type
When I click any โtopic toolsโ itโs just the first topic that displays
it works on only the first post type per page for some reason , so the first reply on the second page would also have the โtopic toolsโ
and like i said before i have to probably make a jquery version of this instead of css so it could work on all the posts
there is still some bugs right now like if i put
<?php echo bbp_get_topic_sticky_link(); ?>
it doesnt workalso i only named it topic tools cause it was the first thing i thought about , it could be named options or whatever , this dropdown menu is intended to work on all posts.
July 15, 2014 at 2:14 pm #149161In reply to: Favorites and subscription count
Robin W
Moderatorwhat are you planning to count, topics, forums or both?
and if you count a forum as subscribed, do you want to count all the topics within that forum as subscribed?
the list of forums/topics subscribed to is held in usermeta under WP__bbp_subscriptions and an example would look like
5682,13255,13098,13394,13456,13497,13550,13575,13636,13652,13669,13705,13750,13769,13620,14017,14222,14375,14469
so it would count a forum and a topic each as 1.
you could add a check to see which were topics and which forums and display separately.
You’d access it using a function like
$user_id = wp_get_current_user()->ID; $check=get_user_meta( $user_id, 'WP__bbp_subscriptions' ,false); some if statement here in case it's blank then set a counter to zero foreach ( $check as $count ) { increment the counter in here maybe one count if it's a topic and another if its a reply? } then carry on to a displayFavorites are held in ‘WP__bbp_favorites’
If you want some code to display the results, look at my topic count plugin
https://wordpress.org/plugins/bbp-topic-count/
Hope that’s sufficient to get you going to a solution, come back if you need more help
July 15, 2014 at 1:55 pm #149160In reply to: bbpress SQL Injection
Robin W
ModeratorYou need to start working your way through these resources:
https://codex.wordpress.org/FAQ_My_site_was_hacked
https://wordpress.org/support/topic/268083#post-1065779
http://ottopress.com/2009/hacked-wordpress-backdoors/Anything less will probably result in the hacker walking straight back into your site again.
Additional Resources:
Hardening WordPress
http://sitecheck.sucuri.net/scanner/
http://www.unmaskparasites.com/
http://blog.sucuri.net/2012/03/wordpress-understanding-its-true-vulnerability.htmlJuly 15, 2014 at 12:53 pm #149156In reply to: Deleting Log of edits
kimberlyywp
ParticipantYes, that is exactly where I put the code. I didn’t have caching software at all but just installed it and flushed the cache and we’re good now! Thank you for your help!
July 15, 2014 at 12:06 pm #149155Topic: Using SSL on login – redirect loop
in forum TroubleshootingChakelan
ParticipantHello!
I added
define('FORCE_SSL_ADMIN', true);in wp-config.php, so that the login is done with https://.This seemed to work fine, but then I tried to click on “Lost Password” and I got a message telling me that there was a redirect loop.
Does anyone know how to fix this?
Thank you very much in advance.
-
AuthorSearch Results
