Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,726 through 10,750 (of 32,521 total)
  • Author
    Search Results
  • #151586
    Robkk
    Moderator

    hmmm i thought you could be able to disable it with 0 , but i really havent tried that yet.

    you could hide the link with css and also php i guess so the time wouldnt even matter since there isnt a link to edit at all.

    heres with css

    a.bbp-reply-edit-link {
    display:none;
    }

    for topics just change reply to topic

    #151575

    In reply to: Broken Breadcrumbs

    K-Path
    Participant

    First I used method 2 and the page only rendered part of the Welcome text. The shortcode didn’t work.
    [bbp-forum-index]

    I then switched to Twenty Ten theme and the short code to produce the page Forums worked perfectly.

    So this incredibly beautiful theme I’ve been grooming into the hub for my organizations activities doesn’t work with bbPress.:-(

    #151557
    Robin W
    Moderator

    ok, lets work this through

    You say you’re a superadmin – does this mean its a multi-site installation? they’re not my forte, but if this is just a single site then….

    First of all bbpress is a plugin, so you’ll still need wordpress (and it holds the users), and since the existing theme has all the styling that you users are used to, then it would be sensible to use that as well.

    So in effect what you need to do is just import a full copy of the installation, and then take out the pages and posts, and you have a forum without the rest of the site !

    Since you have a test site, then follow the guidance in

    https://codex.bbpress.org/creating-a-test-site/

    and then just go into posts and pages to delete those (apart from the forum page), and amend the custom menu if you have one.

    #151554

    In reply to: Broken Breadcrumbs

    Robin W
    Moderator

    Without further info from you, have you tried

    Step by step guide to setting up a bbPress forum – Part 1

    #151553
    Robin W
    Moderator

    ok, the template for the forum index isn’t used. Bbpress looks for your theme template fiels and uses them instead.

    see

    Step by step guide to setting up a bbPress forum – Part 1

    #151546
    K-Path
    Participant

    WordPress 3.9.2 running Montezuma theme.
    bbPress 2.5.4

    There is no “Forums” landing page and the breadcrumbs don’t work for either forums or topics. You can see the individual forums from inside the admin and clicking view and then post a topic but you can’t see the forum from the public face of the blog. Follow the link and you’ll see what I mean.
    http://ecopsi.org/forums/topic/the-codex-of-aman/

    Very frustrating. Is there something that I forget to do?

    #151537

    In reply to: Get User Role from ID

    robsward
    Participant

    Got a bit closer doing this:

    $reply_author_role = bbp_get_reply_author_role( array( 'post_id' => bbp_get_topic_last_active_id() ) );

    However, I want just the role to be returned without the enclosing div so I can use it in a conditional.

    #151536

    Topic: Get User Role from ID

    in forum Themes
    robsward
    Participant

    I’m trying to add a column to bbPress 2.x that lists the last person to reply to a topic and adds a specific class to the

    if that person is a moderator or keymaster. Unfortunately, I can’t find any documentation on the template tags in 2.x. So far, I’ve been able to get the user ID for the last reply, but I can’t seem to find the function that would get the role information for that user based on their ID.
    Here’s the code that gets the ID:

    $reply_author_id = bbp_get_reply_author_id( array( 'post_id' => bbp_get_topic_last_active_id() ) );

    Now how can I get their bbPress role?

    Stephen Edgar
    Keymaster

    Try bbp_get_forum_topic_count() instead, this ‘gets’ the value, without the ‘get’ using bbp_forum_topic_count() it tries to output the value.

    tystra
    Participant

    I’m having trouble outputting specific topic counts for individual forums into Google’s Geochart. I want to have the total topic count listed on the map for each region (each forum). I use the following code to try and print the value, but I know I’m missing something (limited PHP/Javascript experience). Please take a look below, what do I need to add in order to get the value to output?

    <?php function my_geochart_script() {
            
       echo '<script type="text/javascript">
       google.load("visualization", "1", {"packages": ["geochart"]});
       google.setOnLoadCallback(drawRegionsMap);
     
       function drawRegionsMap() {
            var data = google.visualization.arrayToDataTable([
                    ["Country", "Popularity"],
                    ["Canada", <?php bbp_forum_topic_count( '23196' ); ?>],
                    ["Japan", <?php bbp_forum_topic_count( '23190' ); ?>],
            ]);
     
            var options = {backgroundColor:{fill:"transparent"}};
     
            var chart = new google.visualization.GeoChart(document.getElementById("chart_div"));
            chart.draw(data, options);
       };
       </script>';
    }
    add_action( 'wp_head', 'my_geochart_script' );

    Any help would be much much appreciated! Thank you.

    #151505
    imFiles
    Participant

    Hi
    I am currently using this code to show the last topic on the main index.
    <a href="<?php bbp_forum_last_topic_permalink(); ?>" title="<?php bbp_forum_last_topic_title(); ?>"><em><?php bbp_forum_last_topic_title(); ?></em></a>
    I was wondering if there is a way to make the title of bbp_forum_last_topic_title a max amount of characters, so the title is smaller.
    Thanks

    #151504
    Stephen Edgar
    Keymaster

    Thanks, it is because you don’t have the table prefix xf_ set when doing the import.

    So use the same settings you used previously and add xf_ in the importer field “Table prefix”.

    #151498
    Robkk
    Moderator
    span.bbp-admin-links a {
    color: #222;
    font-weight: 400;
    font-size: 10px;
    text-transform: uppercase;
    text-decoration: none;
    }
    #151430
    Robkk
    Moderator

    in the original bbpress theme

    in loop-single-topic.php your freshness column should have this

    the bolded text is what shows the avatar,
    to make it bigger just make the number higher
    high existence uses 40 , they have border radius css to make it rounded

    
    <li class="bbp-topic-freshness">
    
    		<?php do_action( 'bbp_theme_before_topic_freshness_link' ); ?>
    
    		<?php bbp_topic_freshness_link(); ?>
    
    		<?php do_action( 'bbp_theme_after_topic_freshness_link' ); ?>
    
    		<p class="bbp-topic-meta">
    
    			<?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
    
    			<strong><span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span></strong>
    
    			<?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?>
    
    		</p>
    
    #151424
    Robkk
    Moderator

    I’ve been searching high and low with no promising leads.

    its been right in front of you the whole time!!!! (not yelling , being dramatic)

    ya know how the freshness column has a little avatar by the users name. high existence just moved it into an li and made it bigger.

    #151421
    EzYRiDaH
    Participant

    Hi Stephen / @netweb,
    Many thanks for your replies! I am trying to convert MyBB 1.6.11. It is a very old forum which (unfortunately) was customized improperly by the previous owner. It was lagging many many versions. I paid a student to do an upgrade about a year ago, but there is some funky **** still in the PHP. With my limited knowledge of MyBB I even tried to a fresh install of MyBB and imported the complete forum in it. Pulled all my hairs out when I found out MyBB stores code in the database…

    I’ve stressed my dear wife to start cleaning the old forum, which she’s (finally) diligently doing now.

    Don’t worry too much about making any updates on the code 🙂 I also have some kind of life and job next to trying to convert a MyBB forum 😉 After all the cleaning of the old forum, I will do another test run to see if I can find any other issues. It is very likely that some errors are just because it is an ancient forum (10 years old). Read up on the conversion of @Halo-DieHard. Will make sure I do a repair/optimization of the old forum. To be honest, I am not sure if I did that with the last conversion, sorry.

    I will report back on the forum on what I was able to squeeze out on performance with MAMP, with what settings and the results.

    Another (most likely dumb) question I forgot to ask. This could be the answer to the missing(?) topics/replies. At the end of the conversion, the program shows in short intervals ‘-‘ on the screen. This takes forever and lasted almost as long as the initial part of the conversion which grabbed the Rows. I thought the conversion was finished when the ‘-‘ stopped appearing on screen ‘————‘ etc. Was I supposed to wait for some kind of other message which indicates the conversion ended?

    In the meantime I am busy integrating the plugin USERPRO and GD bbPress Toolbox. Never coded in PHP and already hate the syntax 😉 I will get there and report back on the results!

    Thanks again for your time!

    #151420
    Robkk
    Moderator

    remove the #bbpress-forums code you added

    and also the code i gave you before

    use this

    .bbpress #primary {
    float:left;
    width:100%;
    }
    af3
    Participant

    Hate to answer my own post.. anyway, this works okay for me.

    1. add shortcode [bbp-topic-form] in the feedback-no-search.php
    2. use javascript to change the form default value i.e.

    <?php echo do_shortcode('[bbp-topic-form forum_id=4135]'); ?>
    
    <script>
    FormObject = document.forms['new-post'];
    FormObject.elements["bbp_topic_title"].value = '<?php echo bbp_get_search_terms(); ?>';
    </script>
    af3
    Participant

    In template feedback-no-search.php, I would like to add a suggestion to the user to create a new topic instead (since there is no result of the search). How can I make the searched keywords as the default title of the new topic ?

    I think I can put the shortcode [bbp-topic-form] in the feedback-no-search.php file but would like the new topic form to have a default Title == searched text.

    Thanks in advance!

    #151400
    divyesh25
    Participant

    hi Stephen,

    thanks for reply. yes i want this kind of pagination (“Page 1″, “Page 2″ etc). there is no other custom code for pagination or ajax based loading data. This kind of pagination required on my site because lots of data so i am separate out using categorywise. bbpress have great features so i used it on my site. but i am little disappointed just becusee of forum pagination.

    thanks.

    #151398
    mouna84
    Participant

    this code worked to center the forums, but not the bottom of the page:

    #bbpress-forums {
    width: 900px;
    margin-left: 100px
    }

    #151397
    kaminoda
    Participant

    Hi,

    I just activated bbpress and I’d like to add a “return to forum” tab to user profil.

    I understood that i must put a code like this:

    
    <li c lass="">
    <a title="Return forum">Return forums</a>
    </l i> 
    

    But i don’t know where to find the file where i should put this code ?

    Thank you for your help

    #151392

    In reply to: disable pingbacks

    Stephen Edgar
    Keymaster

    Thanks for that, I’ll go make a note to dig into why the tracbacks/pingbacks are enabled, they shouldn’t be.

    I had a quick look at the theme your using, MineWP, if you make a copy of the page.php file and rename it bbpress.php then remove the ‘comments’ section of the template:

    Remove this line of code and save it and you’ll no longer have the pingbacks or trackbacks shown, technically they will still be enabled but will not show until we get this fixed.

    
    <?php comments_template('',true); ?>
    
    
    #151391
    Stephen Edgar
    Keymaster

    Cool, glad it fixed it for you 🙂

    I’ve been using IPv6 heaps lately for testing but my 127.0.0.1 equivalent in IPv6 is ::1, thus it wasn’t an issue locally 😉

    #151384
    Stephen Edgar
    Keymaster

    Sorry for the delay, life has been getting in the way.

    Thanks for listing those tweaks you made, they make sense, we already bump the PHP timeout and up the memory limit to 256M but that is all we can really do safely before we cause grief in shared hosting environments.

    I linked this post from our Import Troubleshooting docs so when I get the time we can expand that section (or a dedicated section) on tweaking ‘all the things’.

    It doesn’t look I have asked this previously, what version of MyBB are you importing from?

    All my tests have been with MyBB v1.6.10

    Some topics are not combined correctly. All replies are separate topics. The ‘Recalculate the parent topic for each post’ does not fix this. I ran all repair queries btw. An option in the Topics interface to combine these, would be ace 😉 Is it possible to correct this with a query? My SQL skills are too limited unfortunately.

    I just ran an MyBB import of my ‘standard’ MyBB database and without running any repair tools replies are correctly associated with their parent topics.

    Cloudup rdzghv50mtu

    As to the possibility of correcting this with a MySQL query, it could be, it’s hard to say without knowing what data is mismatched.

    Run the following query in phpMyAdmin:
    83 is my topic ID
    97,99,100 and 102 are the reply ID’s I know should be part of the topic ID 83
    – A single topic and a couple of replies should be all I need to see what’s going on

    SELECT * FROM wp_posts WHERE ID IN (83,97,99,100,102)

    Once you’ve executed the query, click ‘Print View’ and the results should open in a new browser tab, select all the text and paste them into a GitHub Gist and select SQL from the language dropdown (You don’t need an account for this)

    https://gist.github.com/

    It should look similar to this (this is based on my above screenshot)
    https://gist.github.com/ntwb/04ed1cf9cf5f67528fcb

    The Repair Forums option ‘Recalculate the position of each reply’ does not work. It creates a white screen. Load problem?

    Yes, sadly, this is because of the size of the forums, kind of a know issue so that is good, sortof. Anyway the best thing is is that you do not need to run this tool. This is for only repairing ‘threaded replies’ which MyBB did not have so you can just skip running this tool. I’ll update the verbiage for this text in the next release and make some improvements when used with ‘large’ sites and some error handling.

    myBB accepts spaces in the login name. Unfortunately WordPress does not. The conversion leaves the spaces in the login name. Is it possible to correct this with an SQL? Is there another workaround? Correcting them one by one is not my preference

    I’ll work out a fix for that shortly, second time I’ve hit this issue today, @Halo-DieHard also did on BuddyPress.org.

    Two forums are created double. The copies do not contain any topics or replies, so it is easy to remove them. Just thought you should know

    That shouldn’t be the case, though as you point out easily fixed, most likely one of two things, either those forums were still there from a previous import OR there is something funky with the forum categories versus the forum forums though checking my import I just did, everything is fine for me 😉

    The original myBB forum contained 1mlj+ messages and 36k+ discussions. The converted forum contains 109k subjects. That can be explained because of the first issue. But it only contains 830k replies. It could be that myBB adds subjects and replies to messages, but the difference is a bit too big. Is it possible to do an SQL checksum to check the expected output?

    It does sound a little off, some forum software combine the total topics and replies to create a total post count.

    On my MyBB I have:

    
    Our members have made a total of 22 posts in 10 threads.
    We currently have 6 members registered.
    

    After importing using the [bbp-stats] shortcode I have
    Topics 10, Replies 12

    So that works out correct in my case, total of 22 posts = 10 topics + 12 replies 🙂

    It’s hard to match up yours because the issue above as you state, ball park 109k + 830k = 93k which is a few short of the 1m, this will be due to those issues above and we can take another look after they’re fixed.

Viewing 25 results - 10,726 through 10,750 (of 32,521 total)
Skip to toolbar