Forum Replies Created
-
In reply to: Oembed preview fails when linking forum topics
just a note about my first post in this topic and the example that is in there.
If you look at this on Chrome you will actually see the linked full page which is pulled in the iframe, just below the link box but then overflow:hidden and therefore it doesn’t overflow the reply-box. Though it does overlap and hide the second part of that comment…
if you look at it in Firefox the page preview will be hidden entirely, but the iframe is there and it does load the full page (which might cause many problems, starting with increased loading time, but also script conflicts etc..)
In reply to: Oembed preview fails when linking forum topicsok thanks, I’ve created a ticket to report the bug:
https://bbpress.trac.wordpress.org/ticket/3219In reply to: Oembed preview fails when linking forum topicsHello.
the bug is happening even here on this forum (see the link-preview in my first comment here), so I really doubt that the issue is caused by a conflict with another plugin.
In any case no, I haven’t received any answer to this problem, nor anybody provided a contact where I could report this bug to the developers.
And as you can see the bug haven’t been fixed yet, but that’s not surprising as apparently there is no way to report the bug to them…In reply to: Oembed preview fails when linking forum topicsHello!
I’m sorry if I am bumping this topic but is there a place where I can report a bug to the developers?
I mean that this is clearly a general bug and it’s happening in this very forum too. More than some help for myself, I rather need the developers to be aware of this issue and schedule some debugging/fix.
many thanks!
In reply to: Where is registered the forum sidebar?Hi guys! sorry but I forgot to pin the notifications for this post so I just realized about your replies..
it wasn’t very technical actually, but I think it depends a lot on the theme you have.
if just added a conditional into the class of my page template main content and of the sidebar wrap:
<?php if (is_bbpress() || is_page('forum')){ echo "forum_layout"; } ?>
it will have to be added something like this:
<div class="grid__item main float--left <?php if (is_bbpress() || is_page('forum')){ echo "forum_layout"; } ?>">
then is all about css, so it depends on yours. but you should be able to override the interested divs, appending your .forum_layout class in this way:
.grid__item.main.forum_layout { width:76%; } .grid__item.sidebar.forum_layout { width:24%; }
then at the same you can override the normal layout fonts, colours, etc.. if something is not considering your new style, try adding !important in this way:
width:24% !important;
hope that’ll help! 😉
In reply to: Integration with PHP for New Topic (bbp 2.1)I’ve just made a button on the topic listing page, which send the variable using a GET url:
<a href="<?php bloginfo( 'url' ); ?>/new-topic/?related_forum_id=<?php bbp_forum_id(); ?>" >New Topic</a>
then in the template to display the new topic form, you add this:
<?php // get the var from the new-topic button $related_forum_id = $_GET['related_forum_id']; // display a warning if there is no info about the id if ($related_forum_id=="") { echo "WARNING! Something is wrong here! there is no info about the Related Forum where to append this Topic.<br/>Do not submit the new topic. Please go back and try again."; } // create a string with the shortcode $form_shortcode = '[bbp-topic-form forum_id="'.$related_forum_id.'"]'; // execute the shortcode to display the form echo do_shortcode($form_shortcode); ?>
In reply to: External page submit form (get topic id)ok, I’ve figured it out.
the files which have to be edited are:
bbpress/templates/default/bbpress/content-single-forum.php
bbpress/templates/default/bbpress/content-single-topic.phpin the first one you’ll have to cut off this line in each place it comes:
<?php bbp_get_template_part( 'form', 'topic' ); ?>
and substitute with something like this, to make the new-topic link:
<a href="http://mywebsite.com/form-new-topic/?forum_id=<?php bbp_forum_id(); ?>
then you create a new template page (which you’ll assign to a page called “Form New Topic”) copying your theme default page, and adding at the top
/* Template Name: Form New Topic */
. then you can substitute the function which displays the content, or just add this below it:$forum_id = $_GET['forum_id']; echo do_shortcode("[bbp-topic-form forum_id=$forum_id]");
at the same you can edit the second file (the topics list) substituting this:
<?php bbp_get_template_part( 'form', 'reply' ); ?>
with something like this:
<a href="http://mywebsite.com/form-new-reply/?topic_id=<?php bbp_topic_id(); ?>
and then create a new template called “Form New Reply”, and add a code similar to the other one but using the shortcode to display the reply form. unfortunately the shortcode for the reply form seems to don’t have a topic id attribute, according to this list: https://codex.bbpress.org/shortcodes/
I’ll make some test to see how it react, the only other solution I see is to make a spoiler with the reply form, so it’s hidden till you click.
p.s. you can also store the ids into variables, using these functions:
$forum_id = bbp_get_forum_id(); $topic_id = bbp_get_topic_id();
In reply to: Where is registered the forum sidebar?ok, it works perfectly!
in this way I’ll be able to edit the page template and set a different class for content and sidebar in order to have a smaller sidebar and a larger space for the forums.
and I’ll be able to call different sidebars in editing the sidebar.php of my template.
thank you very much!
In reply to: Where is registered the forum sidebar?Ok, Thank you Stephen!
That’s going to be a very handy function! 🙂I’ll try it and let you know.
Thanx in advance for your help!
AndreaIn reply to: Where is registered the forum sidebar?Hi there!
Thanx for answering! I’ve read your answer to a similar issue in an old post and I’ve already checked that, but unfortunately it seems that in the new versions, or at least in this installation, the bbpress class is added to the body of the post content and not to the page wrapper, so the sidebar is outside and I can’t target it with that class..
it’s a bit weird though, cause it seems that the shortcode which calls the forum archive in the post content, is actually overriding the template chosen with the page attributes. it’s set as default template, but in the theme default page should be displayed the default sidebar, and in the forum page is displaying the forum sidebar instead, even if is set on default template and there is just a shortcode into the post content..