Search Results for 'code'
-
Search Results
-
I have been troubleshooting an issue with embedded iframe table from datawrapper.de. The responsive iframe code was not changing height parameters on small screens so table was cut off. After disabling plugins I found that the problem went away after disabling bbpress.
datawrapper.de support told me this:
A part of the embed code contains the character string [b], it seems that your CMS automatically replaces this with an html strong tag, so the embed script no longer works.So I guess the replace [b] with an html strong tag is part of bbpress? Any way to turn that off in bbpress?
Hi, I want to display 3 latest topics with new replies for each forum category. In loop-single-forum.php file I created this:
$count = bbp_get_forum_topic_count(); $user = bbp_get_topic_author_id( bbp_get_forum_last_topic_id() ); if ( $count != 0 ) { echo '<a href="'. bbp_get_forum_last_topic_permalink().'"></a>'; // Link to the topic echo'<a href="'. bbp_get_user_profile_url( $user ) .'"><img class="avatar" src="'. bp_core_fetch_avatar ( array( 'item_id' => $user, 'type' => 'full', 'html' => false ) ).'" /></a>'; // Link to the topic author profile with author's avatar echo '<div class="title">'. bbp_get_forum_last_topic_title().'</div>'; // Title of the topic with last activity echo '<div class="activity">Last activity '. bbp_get_forum_last_active_time().'</div>'; // Time of the topic last activity } else { echo 'No topics'; // Information if there is no topics }How to display two more topics (if they exist)?
Various email notification functions work when a topic or reply is submitted or edited from the frontend but not from the backend. I have code which is hooked on to transition_post_status to take over notification functions when a topic or reply is published from the front or backend. It works great for topics, but I am having trouble with replies.
I have the following code fragment fired on publication of a reply:
$reply_id = bbp_get_topic_id( $post->ID ); $topic_id = bbp_get_reply_topic_id( $reply_id ); $forum_id = bbp_get_topic_forum_id( $topic_id ); $reply_author_id = bbp_get_reply_author_id($reply_id); error_log("Trace point reply to be published topic_id:". strval($topic_id) . " reply_id: " . strval($reply_id) . " forum_id: " . strval($forum_id). " author_id: " . strval($reply_author_id));In all cases, $reply_id and $reply_author_id are found correctly.
When invoked from the frontend, $forum_id is found correctly, but not from the backend.
$topic_id is shown as zero whether from front or backend.
So bbp_get_reply_topic_id($reply_id) is not functioning as I anticipate. I have tried bbp_get_reply_topic_id( $$post->ID ) with the same result.How do I get the topic_id from the reply_id? Can SKS please help here?
Hi, how to get count of the all topics with no replies? I want to create something like this:
$count = ???? if ( $count != 0 ) { echo '<a href=".../no-replies/">Topics with no replies<span class="count">'. $count .'</span></a>'; }Is there a easy way to do this? I will be grateful for help.
My request / idea for this topic comes from being involved in WordPress.com and WordPress.org forums. As people in these forum may know, there is a lot of confusion about where to input topics when people need help with WordPress. Because of this confusion, it leads to many Topics (basically support tickets) in the wrong forums.
An example of this is when people post to the WordPress.com forums for a question about a self-hosted WordPress site. This takes the staff and volunteers working on WordPress.com away from supporting that system and instead causes a need to support this other question and most of the support is educating the difference in .com and .org. Once those replies go the tickets, some people opening the topics are still not sure what to do – and telling them “go to the other forum” might be confusing, and at the least will cause duplicate work.
So, the idea: a feature in bbPress that allows a forum (in this example, the WordPress.org forum) staff to “pull” a topic from another forum (WordPress.com forum) and get the data setup as a topic in the forum where it makes sense.
Ideally, this would pull over the threaded history, somehow note the users in the discussion as users of the old forum or the new forum (maybe call user: username[wordpress.org] vs username), and tags as needed…and then allow the discussion to continue on the new forum while noting the move and closing the ticket on the old forum.
There is a problem that the user opening the topic needs to exist – and the user in WordPress.com may only exist in that system, so one option would be that part of pulling the topic over would do an automated user creation behind the scenes on the “new forum” if a simple search did not find the user to assign the topic to in the new forum.
I also think that in order to do some kind of migration of topic from the UI side (just past in a URL and basically “scrape” the data) would be nice but for the better administration the data would be pulled with API calls and this could be done by URL and some kind of nonce/code that only a staff members who has high access on both forums would know/generate. They log in to the old forum, go to the Topic they want to copy and click something to enable the copy – this would give them the nonce/code. They go to the new forum and note where they are pulling from URL, the nonce/code and the user they want to assign the topic to in the new forum.
This is a long winded explanation, but I think similar to other situations where a company or organization could have a legitimate need for multiple forums platforms (instead of just splitting by forum in one site) and a method to essentially “move a topic to the right forum” could have a nice benefit – not to mention the simplification of support for the WordPress community.
I would love feedback and if this is something useful, it would be great to know what the next steps are to follow through.
(this is a similar idea to what is in https://bbpress.org/forums/topic/copyduplicate-topic-into-another-forum/ but it seems different so I did not just put a reply there)
I use
bbp_topic_favorite_linkto display “add to favorite topic button”.But this button does not work within the loop below to display the topic list.
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <article> <h2><?php the_title();?></h2> <?php bbp_topic_favorite_link( array( 'topic_id' => ''.$post->ID.'', ) ); ?> </article> <?php endif; endwhile; ?>When I click on the button, “Add to favorites” can be done, but the page will be reloaded.
Why will it be reloaded in the loop, although it will not be reloaded on the topic page?
How do I stop reloading?
Topic: where is edit-form.php used?
I’m trying to add the imageshack toolbar to my edit form, and I added it under the “post_content” field in edit-form.php but it’s not showing up anywhere.
It worked when I just stuck it at the bottom of post-form.php, under the part about “Enter a few words (called tags)”
I see a second “post_content” field in post-form.php … is this redundant code?
It seems like this edit form should just be in edit-form.php and therefore changes only need to be made there and called when necessary (add presented as such depending on if it’s a reply/new post/edit/etc…
Also, when trying to add it to the Reply form (in topic.php) I see a call to post_form();.
Logic (in my mind) would have it that this function is in the file called post-form.php – which I’ve already added the toolbar too, as well as added it to edit-form.php.
So where is this post_form(); located? 🙂
(I”m really not trying to be a pain in the butt!)
BTW, this is the imageshack toolbar:
<iframe src=”http://www.imageshack.us/iframe.php?txtcolor=C0C0C0&type=blank&size=30″ scrolling=”no” frameborder=”0″ width=”300″ height=”90″ allowtransparency=”true”> You must have an iframe-compatable browser to view the ImageShack.us upload form.</iframe>
You can see it in action on https://okhithq.com/ when you create a new post, but no where else.