Search Results for 'code'
-
AuthorSearch Results
-
October 9, 2020 at 5:11 am #215116
In reply to: Pagination – How to remove last page numbers?
Robin W
Moderatorate you still running the threaded replies plugin I did a few days ago? that’s designed to work with threaded replies turned on, no idea what it does if you turn threaded replies off and leave it active.
Both it and the code above hook to the same link.
October 9, 2020 at 4:53 am #215115In reply to: Pagination – How to remove last page numbers?
kriskl
ParticipantHi Robin,
Sorry to re-open this.
the latest topics pagination works great! thanks to the code above,
BUT when I turned off threaded replies. the normal pagination in topics is strange..
here is what I mean
https://opentuition.com/forums/
the page numbers it shows are : 1, 2, 4
instead of 1, 2, 3, 4, or 1,2, 4and when I go to some topic
and click on page 3
it shows like this:1, 1, 2, 3
here is the example
https://opentuition.com/topic/obu-period-40-results-post-your-comments-instant-poll/page/3/
is there anything that can be done? do you think?
thanks
KrisOctober 8, 2020 at 4:16 pm #215096In reply to: Get topics of subscribed to forums?
athep
ParticipantCorrection, I am getting the bbp_forum_title() that we passed but not
<?php bbp_get_template_part( 'loop', 'single-topic' ); ?>that I was initially trying to filter.. No worries tho, one step closerOctober 8, 2020 at 4:09 pm #215095In reply to: Get topics of subscribed to forums?
athep
Participant@robin-w thank you for all the help, after a bit of tinkering I changed
bbp_get_user_forum_subscriptionstobbp_get_user_topic_subscriptionsand it worked flawlessly, thank you so muchOctober 8, 2020 at 2:37 pm #215094In reply to: Get topics of subscribed to forums?
athep
ParticipantIt’s still returning null, no output whatsoever. I even
print_r($subs)inside the while loop and nothing shows up, I’m using the latest versions of bbpress and wordpress, the theme is a blank starter theme with only bbpress plugin activatedOctober 8, 2020 at 2:26 pm #215093In reply to: Get topics of subscribed to forums?
Robin W
ModeratorThe
$subs = explode(',' , $subs);turns the string in the database to an array.Can you confirm for the user selected that they have active subs?
October 8, 2020 at 2:19 pm #215092In reply to: Get topics of subscribed to forums?
athep
ParticipantI have included
$subs = explode(',' , $subs);and it’s returning nothing, it has no error or any output..The other error was
Warning: in_array() expects parameter 2 to be array, bool given in ..../content-main.php on line 21Line 21 is
<?php if (in_array($forum_id, $subs)) { ?>October 8, 2020 at 2:16 pm #215091In reply to: Get topics of subscribed to forums?
Robin W
Moderator<?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?> <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?> <?php $subs = bbp_get_user_forum_subscriptions( $uid ) ; ?> <?php $subs = explode(',', $subs); <?php while ( bbp_forums() ) : bbp_the_forum(); ?> <?php $forum_id = $bbp->forum_query->post->ID; ?> <?php if (in_array($forum_id, $subs)) { ?> <p><?php bbp_forum_title(); ?></p> <?php } ?> <?php endwhile; ?> <?php endif; ?>October 8, 2020 at 2:15 pm #215090In reply to: Get topics of subscribed to forums?
Robin W
Moderatorhold on you haven’t got the line
<?php $subs = explode(',', $subs);October 8, 2020 at 2:12 pm #215088In reply to: Get topics of subscribed to forums?
athep
ParticipantSame error indicating this line
<?php if (in_array($forum_id, $subs)) { ?>October 8, 2020 at 2:10 pm #215087In reply to: Get topics of subscribed to forums?
Robin W
Moderatortry
<?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?> <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?> <?php $subs = bbp_get_user_forum_subscriptions( $uid ) ; ?> <?php while ( bbp_forums() ) : bbp_the_forum(); ?> <?php $forum_id = $bbp->forum_query->post->ID; ?> <?php if (in_array($forum_id, $subs)) { ?> <p><?php bbp_forum_title(); ?></p> <?php } ?> <?php endwhile; ?> <?php endif; ?>October 8, 2020 at 2:04 pm #215086In reply to: Get topics of subscribed to forums?
athep
Participant<?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?> <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?> <?php $subs = bbp_get_user_forum_subscriptions( $uid ) ; ?> <?php while ( bbp_forums() ) : bbp_the_forum(); ?> <?php $forum_id = bbp_get_forum_id( $forum_id ); ?> <?php if (in_array($forum_id, $subs)) { ?> <p><?php bbp_forum_title(); ?></p> <?php } ?> <?php endwhile; ?> <?php endif; ?>October 8, 2020 at 2:02 pm #215085In reply to: Get topics of subscribed to forums?
Robin W
Moderatorcan you post your corrected code
October 8, 2020 at 1:58 pm #215084In reply to: Get topics of subscribed to forums?
athep
ParticipantThere were a few syntax errors I fixed with your code, and the error message ends with the files location stating that the error comes from the line ‘<?php if (in_array($forum_id, $subs)) { ?>’
Your second snippet returns null, nothing, maybe bbp_forum_title() won’t work in this context?
October 8, 2020 at 1:45 pm #215081In reply to: Get topics of subscribed to forums?
athep
ParticipantHello Robin, thank you for your reply. I got this error
Warning: in_array() expects parameter 2 to be array, bool given in...I’d appreciate helping me figure it out if possibleOctober 8, 2020 at 1:25 pm #215079In reply to: Get topics of subscribed to forums?
Robin W
Moderatoruntested but something like
<?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?> <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?> <?php $subs = bbp_get_user_forum_subscriptions( $uid ) ; ?> <?php while ( bbp_forums() ) : bbp_the_forum(); ?> <?php $forum_id = bbp_get_forum_id( $forum_id ); ?> <?php if (in_array($forum_id, $subs)) { ?> <p><?php bbp_forum_title(); ?></p> etc. <php } ?> <?php endwhile; ?> <?php endif; ?>October 8, 2020 at 10:19 am #215072Topic: Get topics of subscribed to forums?
in forum Themesathep
ParticipantHello everyone,
I have this loop in my custom theme that lists the forums a user is subscribed to
<?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?> <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?> <?php while ( bbp_forums() ) : bbp_the_forum(); ?> <p><?php bbp_forum_title(); ?></p> <?php endwhile; ?> <?php endif; ?>I’m not sure if it is the most efficient technique but it is working fine.
Now I’m trying to retrieve the topics under those forums, if I’m subscribed to forum a and not b, how can I retrieve all the topics of only forum a?
October 8, 2020 at 9:24 am #215071Topic: Show success message when new topic is submitted
in forum Troubleshootingxavierissac94
ParticipantHi is there is any way to show success message like. “New topic submission succesfully”, once topic is submited. I am using ‘[bbp-topic-form]‘ shortcode to display topic form. But i want to display message once topic is submitted suceesfully.
Is there is any way to acheive this
October 8, 2020 at 6:04 am #215059In reply to: how to remove(hide) bbPress login form
purityboy83
ParticipantHi
I have a lot of plugins installed on my site.
Let me know if you have anything to check more
Best Regards,
Hyunho================
301 Redirects
Activity Log
Advanced Access Manager
Advanced Editor Tools (previously TinyMCE Advanced)
Advanced TinyMCE Configuration
All In One SEO Pack
Automatic Copyright Year
Awesome Weather Widget
bbp style pack
bbp User Ranking
bbPress
bbPress – Private Replies
bbPress forum utility pack
bbPress Permalinks with ID
bbPress Profile Link Shortcode
bbpress Simple View Counts
bbPress Toolkit
Classic Editor
Favicon by RealFaviconGenerator
GD bbPress Attachments
GD bbPress Tools
Hide Admin Bar From Front End
Hide My WP Ghost Lite
Image Upload for BBPress
Link Widget Title
Log Out Shortcode
MangBoard WP
Members
Nav Menu Roles
Pages In Widgets
Post/Page specific custom CSS
Search & Replace
Shortcode in Menus
Shortcode Widget
SiteOrigin CSS
Smush
Stylist
Timeline Express
User Registration
Wordfence Security
WP 2FA – Two-factor authentication for WordPress
WP OPcache
WP RSS Aggregator
WP Statistics
WP-Optimize – Clean, Compress, Cache
WPForce Logout
broken link check
buddyPress
================
October 8, 2020 at 5:39 am #215058In reply to: How to insert short codes under topic pages?
Robin W
Moderatorand then same shortcode on every topic page, and above or below the reply form ?
October 7, 2020 at 4:31 pm #215047In reply to: Delete Admin Link produces Critical Error
sflwa
ParticipantI’m referring to what is referenced this – https://codex.bbpress.org/getting-started/forum-moderation/common-tasks/
In the frontend
Log into your site and go to your forums on your site
If you need to delete a topic, go into the topic and hit the Trash Admin Link to put the topic into the trash.
Now you will see that the trash link has turned to the Delete Admin Link , and from there you can click Delete to delete the topic permanently.So once you click trash it turns red and then the link changes to delete which is “empty trash” for that one item
October 7, 2020 at 10:47 am #215044In reply to: Trouble with shortcodes in topics
kriskl
ParticipantI use “bbPress Do Short Codes” plugin
maybe it will help
October 6, 2020 at 8:42 am #215023In reply to: Sort topics in a Forum
Robin W
ModeratorI’ve taken a look, and yes lots of code changes to get replies in reverse order, and currently too much of a challenge to try and do !
Sorry !
October 5, 2020 at 3:18 pm #215003In reply to: Hide topics from latest listings?
Daniel J. Lewis
ParticipantDon’t you hate it when people post questions and forget to share the answers they found?
It’s been a few years now, but I think I remember what I did. I copied the template into my theme so I could override it. There, I modified it so it would add the post tags (like
spoilersas CSS classes to those posts. Then, I modified my CSS and JS to black-out the title until clicked.I’m sorry I can’t provide the exact code, but maybe that helps point you in the right direction.
October 5, 2020 at 1:35 pm #215000In reply to: Log In page
Robin W
Moderatorok, so I’ve created a shortcode that should do this
I’ve added this to my bbp-style-pack plugin
once activated go to
dashboard>settings>bbp style pack>shortcodes
and you’ll see how to add the shortcode there
-
AuthorSearch Results