Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,301 through 11,325 (of 32,504 total)
  • Author
    Search Results
  • #149195
    Stephen Edgar
    Keymaster

    I’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 Conversion
    

    In particular, do you get to see the Conversion Complete without 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 of WordPress database error: [Table 'vbulletincopy.tagthread' doesn't exist]

    Also @themefurnace what version of vBulletin is it specifically? v3.1? v3.2? v3.81? etc

    #149192
    Robkk
    Moderator

    i got the topic sticky link to show using <?php echo bbp_get_topic_stick_link(); ?>

    i got it the code between the li but it shows both the sticky and supersticky link


    @robin-w
    is there any arguments that i could use to display 1 link at a time

    all 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 );
    	}
    #149175
    Stephen Edgar
    Keymaster

    You 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#L109

    From:

    
    <?php if ( !bbp_is_single_forum() ) : ?>
    

    To:

    
    <?php if ( ! ( bbp_is_single_forum() || bbp_is_topic_edit() ) ) : ?>
    
    #149166
    Robkk
    Moderator

    basically 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 work

    also 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.

    #149161
    Robin W
    Moderator

    what 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 display
    

    Favorites 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

    #149160

    In reply to: bbpress SQL Injection

    Robin W
    Moderator
    #149156

    In reply to: Deleting Log of edits

    kimberlyywp
    Participant

    Yes, 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!

    #149155
    Chakelan
    Participant

    Hello!

    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.

    #149154
    Robin W
    Moderator

    can you come back and post your code for 2

    that’s why I need your to post your code, so that I can work out where it’s wrong πŸ™‚

    #149149
    pixelnated
    Participant

    If it helps anyone this will help you see all your bbpress duplicate topics at a glance with the duplicate ID
    ** Note these are just selects so they will not delete any data **

    
    select 
    		post_type
          , post_date
          , post_title
          , post_content
          , max(id) as dup_id, 
          count(*) as dupe_count
    from 
    		wp_posts 
    where 
    		post_type in ('forum', 'topic', 'reply')
    group by 
    		post_type
          , post_date
          , post_title
          , post_content
    having count(*) > 1
    order by post_type, post_date, dup_id
    

    We can then take a variation of that and have it give us the start and end duplicate ranges for each post_type with counts of rows we expect to be impacted.

    
    select post_type, min(dup_id) as start_dup, max(dup_id) as last_dup, count(*) as total_recs
    from 
    (
    select 
    		post_type
          , post_date
          , post_title
          , post_content
          , max(id) as dup_id, 
          count(*) as dupe_count
    from 
    		wp_posts 
    where 
    		post_type in ('forum', 'topic', 'reply')
    group by 
    		post_type
          , post_date
          , post_title
          , post_content
    having count(*) > 1
    ) i
    group by post_type
    

    of course you need to verify but this should help get you on your way

    #149146
    Leonyipa
    Participant

    I tried to remove the code, but I cannot figure out which piece of code I should remove :S

    #149145
    Robkk
    Moderator

    Amazing work man, thanks so much.

    your welcome πŸ˜€

    I need to figure out where to post each code in my theme,etc.

    Should I also put codes in bbPress plugin, or not? Since it might get deleted once updated, right?

    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 plugin

    #149144
    slayne76
    Participant

    Hi Stephen,
    thanks for the reply. I looked at the trac but it’s not strictly related, since it refers to the spam/trash/admin links on the front end.
    What I noticed instead, (and you can test yourself and let me know) is simply as this: in the backend (wordpress admin area) when a topic is in the trashcan, and you click untrash (the same thing you would do with posts, pages, custom post types when you put the in the trashcan) you get the default nonce wordpress error. You simply “CAN’T” untrash something directly inside wordpress.
    I was hoping that anyone else could try the same and give me confirmation that the issue exists (in the code i posted I was able to indentify the problem as well)

    If you, or anyone else, can confirm there is this issue, I (or you, or whoever wants to) can open a ticket in the trac so it gets fixed asap πŸ™‚

    #149143
    elaborate
    Participant

    I’m trying to find a way to display a given user’s raw subscription or favorites count in a fashion similar to how bbp_get_user_reply_count_raw() and bbp_get_user_topic_count_raw() work.

    I’ve tried to use an existing function like bbp_get_user_subscriptions() with a counter but I figure I need to query the database. I’m still learning PHP though so if anyone sees a way to do it like that then please let me know.

    Thank you.

    #149133
    acornale
    Participant

    At the moment, I have a standard WordPress search box on the top of my page. It seems to return posts and pages but not bbpress forums or topics.

    I can use the bbpress shortcodes to display a forum search but I don’t want two search boxes.

    Is there a way to extend the native wordpress search so it returns posts, pages, topics and forums?

    At the moment, it seems I can search bbpress OR search wordpress posts / pages. I want to search both?

    #149132
    Pavle123
    Participant

    Wow @Robkk

    Amazing work man, thanks so much. I will need few days to set everything up.

    I need to figure out where to post each code in my theme,etc.

    Should I also put codes in bbPress plugin, or not? Since it might get deleted once updated, right?

    #149128
    Robin W
    Moderator

    I’ve loaded all that, my display is slightly different, but that will be styling.

    When I click any ‘topic tools’ it’s just the first topic that displays, and this does so in a stacked fashion, so I can only see the first tool.

    However, I played a bit with the loop single reply, and would the following help?

    <div class="dropdown" id="dropdown">
    				<input type="checkbox" id="drop1" />
            <label for="drop1" class="dropdown_button">Topic Tools</label>
    		<?php if (bbp_is_topic(bbp_get_reply_id()) ) { ?>
    		<ul class="dropdown_content">
                <li class="active"></li>
                  <li> <?php echo bbp_get_reply_edit_link(); ?></li>
                  <li><?php echo bbp_get_reply_spam_link(); ?></li>
                  <li><?php echo bbp_get_reply_move_link(); ?></li>
            </ul>
    		<?php } ?>
    		<?php if (bbp_is_reply(bbp_get_reply_id()) ) { ?>
    		<ul class="dropdown_content">
             <li class="active"></li>
    			<li><?php echo bbp_get_reply_spam_link(); ?></li>
                 <li><?php echo bbp_get_reply_move_link(); ?></li>
             </ul>
    		<?php } ?>
            
        </div>

    basically it adds if-topic and if reply choices

    #149126

    In reply to: Deleting Log of edits

    Robin W
    Moderator

    Ok, the code works (just retested it on my site), but the link you supplied is not using it.

    are you sure you put

    /* =Revisions
    ————————————————————– */
    
    #bbpress-forums .bbp-topic-content ul.bbp-topic-revision-log,
     #bbpress-forums .bbp-reply-content ul.bbp-topic-revision-log,
     #bbpress-forums .bbp-reply-content ul.bbp-reply-revision-log {
     Display : none !important ;
     }
    

    in

    wp-content/themes/divi/style.css

    Do you have caching software running?

    #149123
    Robkk
    Moderator

    @netweb no problem

    ok i understand , idk why i posted the link to their images haha

    and i got it figured out , just wasnt showing up for some reason on my local site after i just changed the word new topic to new thread …was kind of weird.

    the last thing is just paste this code above
    <?php do_action( 'bbp_template_before_topics_index' ); ?>

    <a class="bbp-new-topic-button" href="#new-post">New Thead</a>

    it should show the droplink

    #149122
    Stephen Edgar
    Keymaster

    Nice work @robkk, looks really good and thanks for helping out, much appreciated πŸ™‚

    One thing, I did remove the link to the direct link to quicksprout envelope/mail images, more than happy to take inspiration of sites design and write awesome code as you have above. We should not be grabbing the sites image assets (or any assets actually) as they may not be open source and/or royalty free. There are plenty of resources on the net for open source/royalty free icons/images πŸ˜‰

    I’ll tell you the rest when im done , because right now im having some trouble

    What are you having trouble with? Anything I can help out here to get you sorted?

    #149118

    In reply to: Deleting Log of edits

    kimberlyywp
    Participant

    I just changed the code and put that in the style.css and I’m still seeing the edits: http://livessoonforgotten.com/members-3/user-groups/in-memorandum/forum/topic/test-memorial/

    #149116
    Robkk
    Moderator

    ok i havent gone too much far into this as you may think though

    but you can try it as it is now to test it out

    these are both in my functions.php in my child theme
    im just showing the reply link on both topics and replies, i have gd bbpress tools so there is also a quote link

    //change admin links displayed
    function change_admin_links ($r) {
    $r['links'] = apply_filters( 'rw_reply_admin_links', array(
    				'reply'  => bbp_get_reply_to_link ( $r )
    				
    			), $r['id'] );
    return $r['links'] ;
    }
    add_filter ('bbp_reply_admin_links', 'change_admin_links' ) ;
    
    //change admin links displayed
    function change_topic_admin_links ($r) {
    $r['links'] = apply_filters( 'rw_topic_admin_links', array(
    				'reply'  => bbp_get_topic_reply_link ( $r )
    				
    			), $r['id'] );
    return $r['links'] ;
    }
    add_filter ('bbp_topic_admin_links', 'change_topic_admin_links' ) ;

    I have this in my loop-single-reply.php at the bottom ,

    i havent added all the admin links, plus this doesnt work on replies it only works on the topic , i need to use a jquery on click function instead of all css dropdown menu

    <div class="dropdown" id="dropdown">
    				<input type="checkbox" id="drop1" />
            <label for="drop1" class="dropdown_button">Topic Tools</label>
            <ul class="dropdown_content">
                <li class="active"></li>
                  <li> <?php echo bbp_get_reply_edit_link(); ?></li>
                  <li><?php echo bbp_get_reply_spam_link(); ?></li>
                  <li><?php echo bbp_get_reply_move_link(); ?></li>
            </ul>
            
        </div>

    here is all my custom css , i have this in my themes custom css plugin

    .dropdown {
        display: inline-block;
        margin: 0px 10px;
        position: relative;
      float:right;
    }
    
    .dropdown .dropdown_button {
        cursor: pointer;
        width: auto;
        display: inline-block;
        padding: 2px 10px;
        border: 1px solid #AAA;
        border-radius: 0px;
        font-weight: bold;
        color: #222;
        line-height: 16px;
        text-decoration: none !important;
        background: none repeat scroll 0% 0% #FFF;
    }
    
    .dropdown input[type="checkbox"]:checked + .dropdown_button {
        border-width: 1px;
        border-style: solid;
        color: #222;
        background: #FFF;
    }
    
    .dropdown input[type="checkbox"] + .dropdown_button .arrow {
        display: inline-block;
        width: 0px;
        height: 0px;
        border-top: 5px solid #6B7FA7;
        border-right: 5px solid transparent;
        border-left: 5px solid transparent;
    }
    
    .dropdown input[type="checkbox"]:checked + .dropdown_button .arrow { border-color: white transparent transparent transparent }
    
    .dropdown .dropdown_content {
        position: absolute;
        border: 1px solid #777;
        padding: 0px;
        background: white;
        margin: 0;
        display: none;
    }
    
    .dropdown .dropdown_content li {
        list-style: none outside none;
        margin-left: 0px;
        line-height: 16px;
        border-top: 1px solid #FFF;
        border-bottom: 1px solid #FFF;
        margin-top: 2px;
        margin-bottom: 2px;
        width: 86px;
    }
    
    .dropdown .dropdown_content li:hover {
        background: #999;
      color:#222;
    }
    
    .dropdown .dropdown_content li a {
        display: block;
        padding: 2px 15px;
        color: #222;
        text-decoration: none !important;
        white-space: nowrap;
        background: #ffffff;
        border-bottom: 1px solid #999;
    }
    
    .dropdown .dropdown_content li:hover a {
        color: #222;
        text-decoration: none !important;
      background:#999;
    }
    
    .dropdown input[type="checkbox"]:checked ~ .dropdown_content { display: block }
    
    .dropdown input[type="checkbox"] { display: none }
    #149115

    In reply to: Deleting Log of edits

    kimberlyywp
    Participant

    I did drop that code in the style.css but it didn’t change anything. Is it possible that something is overwriting it?

    #149114

    In reply to: Deleting Log of edits

    Robin W
    Moderator

    yes, you have a choice

    1. You could put it in your style.css – that is a file called style.css that you will find in your theme

    wp-content/themes/%yourthemename%/stle.css

    where %yourthemename% is the name of your theme

    Just drop it at the end.

    This will then override the code in bbpress.css, and is the easiest way

    2. Otherwise you can create a directory called css in your theme

    /wp-content/themes/%yourthemename%/css

    and copy the existing bbpress.css across to get

    /wp-content/themes/%yourthemename%/css/bbpress.css

    but here’s the thing, you then need to find and edit the existing display lines, just adding code will give two sets, and your maybe won’t take preference

    the lines you are looking start at line 904 and say

    /* =Revisions
    -------------------------------------------------------------- */
    
    #bbpress-forums .bbp-topic-content ul.bbp-topic-revision-log,
    #bbpress-forums .bbp-reply-content ul.bbp-topic-revision-log,
    #bbpress-forums .bbp-reply-content ul.bbp-reply-revision-log {
    	border-top: 1px dotted #ddd;
    	width: 100%;
    	margin: 0;
    	padding: 8px 0 0 0;
    	font-size: 11px;
    	color: #aaa;
    }
    
    #bbpress-forums .bbp-topic-content ul.bbp-topic-revision-log li,
    #bbpress-forums .bbp-reply-content ul.bbp-topic-revision-log li,
    #bbpress-forums .bbp-reply-content ul.bbp-reply-revision-log li {
    	list-style-type: none;
    }
    
    

    you just need to edit that to

    `/* =Revisions
    ————————————————————– */

    #bbpress-forums .bbp-topic-content ul.bbp-topic-revision-log,
    #bbpress-forums .bbp-reply-content ul.bbp-topic-revision-log,
    #bbpress-forums .bbp-reply-content ul.bbp-reply-revision-log {
    Display : none ;
    }

    come back if we can help further

    #149113
    kimberlyywp
    Participant

    I found this from an old post
    “And for those that just want to hide the code edit your theme css and use this:

    .bbp-reply-revision-log {

    display: none !important;

    }”

    But I can’t figure out where to put that code, I have tried bbpress.css file but it didn’t work, can anyone point me in the right direction? Thanks in advance!

Viewing 25 results - 11,301 through 11,325 (of 32,504 total)
Skip to toolbar