Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,126 through 12,150 (of 32,504 total)
  • Author
    Search Results
  • #144999
    Stephen Edgar
    Keymaster

    If when you decide to come back to this you’ll want to use the_excerpt

    https://codex.wordpress.org/Function_Reference/the_excerpt

    There are varios examples scattered throught this site also

    https://bbpress.org/forums/search/the_excerpt/

    #144996
    Stephen Edgar
    Keymaster

    There are a couple of weird things happen with bbPress and setting them to ‘private’ from the backend, we just haven’t tested it thoroughly enough.

    There is a ticket on Trac somewhere, can’t find it at the moment though ๐Ÿ™ https://bbpress.trac.wordpress.org

    There is also a plugin that gives each user their own forum that no other users can see, I am not sure if moderators have access to this forum or just the user and the keymaster.

    The name of that plugin? I have no idea, I can’t remember the name of it, what I do remember is that this feature has nothing to do with the name of the plugin nor is the feature even included in the description. It is an idea not fully implemented and approx 75% of the code is just sitting in the background doing nothing. So if I remember what it is I’ll come back and update this. ๐Ÿ˜‰

    #144992
    Stephen Edgar
    Keymaster

    Thanks for sharing your code and and yes some more docs on this would be great.

    Anyone can add docs to the bbPress codex https://codex.bbpress.org/

    You just need to login with the same username and password you use here on bbpress.org

    https://codex.bbpress.org/wp-login.php

    Have a look at the current pages and or create a new page

    https://codex.bbpress.org/wp-admin/edit.php?post_type=page

    #144982
    Robin W
    Moderator

    try

    bbPress Styling Crib

    for starters

    #144976
    Robin W
    Moderator

    you can’t – wordpress and bbpress use a language called php to create the html code, so this code does not appear anywhere, it is made up of lots of function and css calls.

    Sorry !

    #144975
    Robin W
    Moderator

    presume the words from the topic/reply heading?

    if so, then widgets will show you what code you need.

    I could look at it, but it will be a while, and I’m buried in plugins !

    #144973
    Adonismoet1608
    Participant

    theme: Analytical Lite
    the latest version of wordpress and bbpress

    my font,background, and reply background is white
    so all text is hidden.

    i have tried applying the codes from styling crib into my theme css but it still dosent work.

    does anyone have anycode to change the back ground

    #144972
    elaborate
    Participant

    Thank you for the reply.

    I just realized that the Steam Forums I linked to don’t actually do what I’m talking about. I’m gonna see what I can do with wdgets.php the plugin you linked to, but just to clarify:

    I’m looking for the first couple of words from the most recent post of each forum to be displayed under “Freshness” on the front page and on forum lists, etc.

    I’ll figure out the PHP I need to, so don’t worry about that ๐Ÿ™‚

    #144969
    vegas778
    Participant

    On which files I can find these HTML CODES :

    <span class="bbp-topic-started-by">Started by: <a href="https://bbpress.org/forums/profile/renai42/" title="View renai42's profile" class="bbp-author-avatar" rel="nofollow"><img alt='' src='https://secure.gravatar.com/avatar/9cc0474d583be1164e47317a42b158c3?s=14&d=retro&r=G' class='avatar avatar-14 photo' height='14' width='14' /></a>&nbsp;<a href="https://bbpress.org/forums/profile/renai42/" title="View renai42's profile" class="bbp-author-name" rel="nofollow">renai42</a></span>

    <span class="bbp-topic-freshness-author"><a href="https://bbpress.org/forums/profile/crzyhrse/" title="View crzyhrse's profile" class="bbp-author-avatar" rel="nofollow"><img alt='' src='https://secure.gravatar.com/avatar/c92f6fbad5b684dd17d1fde21aff8c24?s=14&d=retro&r=G' class='avatar avatar-14 photo' height='14' width='14' /></a>&nbsp;<a href="https://bbpress.org/forums/profile/crzyhrse/" title="View crzyhrse's profile" class="bbp-author-name" rel="nofollow">crzyhrse</a></span>

    Thank in advance.

    #144968
    crzyhrse
    Participant

    And thanks here as well… I’ve been wishing the Subscribe toggle was over further to the right, and the necessary code for that is included on the page you’ve linked to above…

    ๐Ÿ™‚

    #144967
    vegas778
    Participant

    Thank you but I meant on which files I can edit these HTML CODES above ? I dont find the file’s name.

    #144964
    nirgalo
    Participant

    I finally managed to get to something displaying the top level forums. Guys it took me hours to do something so simple. Really should be part of the documentation somewhere. Pasting the code here in case if helps someone:

    
    if (bbp_is_forum_archive()) {
    	$forums = bbp_get_forums_for_current_user();
    	echo '<ul>';
    	foreach ( $forums as $forum ) {
    		if ($forum->post_parent == 0) {
    		echo '<li><a href="' . bbp_get_forum_permalink($forum->ID) . '">';
    		echo $forum->post_title;
    		echo '</a></li>';
    		}
    	}
    	echo '</ul>';
    }
    
    #144959
    Robin W
    Moderator

    yes, but you’d need some php, so depends what you mean by ‘I donโ€™t really know PHP’

    the plugin bbp-last-post plays with code in this area, so take a look at that

    https://wordpress.org/plugins/bbp-last-post/

    and look at

    bbpress/includes/common/wdgets.php for how to put a title in

    #144956
    Cole
    Participant

    Thanks for the reply Robin,

    Though the the code stated in that article doesnt work with my theme/forum:
    #bbpress-forums .status-closed, #bbpress-forums .status-closed a {color: #000 !important;}

    I put it in my theme CSS and also tried a CSS plugin with no result.

    #144953
    Robin W
    Moderator
    #144947
    vegas778
    Participant

    Hi Guys,

    I cannot find on which file I can edit these codes ?

    The avatar on the left of the message :

    <img alt="" src="http://0.gravatar.com/avatar/a8792a6046cf82389373bb32241764c6?s=80&d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D80&r=G" height="80" width="80" />

    And the mini avatar below the date of the freshness

    <img width="14" height="14" src="http://0.gravatar.com/avatar/a8792a6046cf82389373bb32241764cโ€ฆcom%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D14&r=G" alt="" />

    Thanks in advance

    Regards,

    #144944
    palmdoc
    Participant

    I’d like to thank @peterwsterling for modifying the plugin to allow a custom shortcode setting and make it compatible with WP Polls.
    You’re a genius!

    #144941
    Cole
    Participant

    The code has definitely helped me with the trials of trying to understand bbpress.
    I was wondering if anyone knows how to edit the colour of threads that are locked?
    I guess for my theme, Customizr, the text is grey over a light pink background which makes it very hard to see…
    Any help pointing to the right direction would be most helpful

    #144940
    nirgalo
    Participant

    Is there a shortcode to display same thing as the widget used on the support forum, listing all the available forums with post count for each? I am using the forum index widget but this one is only listing the forum names.

    I guess I can write some code using bbp_list_forums, then looping over the results and usnig bbp_get_forum_post_count for each one. If there is some sample code out there to do this I’d rather use it too ๐Ÿ™‚ Thanks.

    #144939
    akkkarki
    Participant

    Meanwhile I’ve solved the problem myself; it was a just a silly exception, which caused the page not to load wholly. Here’s my solution:

    in the /themes/academica/functions/theme/functions.php change this part (lines 143-149):

        } elseif ( is_single() ) {
          if (!is_attachment()) {
          $cat = get_the_category(); $cat = $cat[0];
          echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
          echo $currentBefore;
          the_title();
          echo $currentAfter; }

    to this:

        } elseif ( is_single() ) {
          if (!is_attachment()) {
    	    $cat = get_the_category(); $cat = $cat[0];
    		//support bbPress
    		if (empty($cat)) {
    		  echo $currentBefore;
              the_title();
              echo $currentAfter;
    	    } else {
    		  echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
              echo $currentBefore;
              the_title();
              echo $currentAfter;
    		}
          }

    That’s it, bbPress now works like a charm! ๐Ÿ˜‰

    Cheers!

    Jerry
    Participant

    If this challenge I am having is beyond the scope of help in the bbpress forums, then I understand. The below code is a function that allows the user to submit a search request for a book title via the google books api. When the user clicks โ€œsearchโ€, the function works great and returns results in a Jquery window. The problem I am having; it triggers a submit of the bbpress topic, and I get the errors โ€œcannot submit a topic with the subject line blank.โ€

    If there is a simple fix I am not seeing, can someone please help me?

    function book_search_google () {    
      //set API version for Google Book Search API
      $v = isset($_POST['v']) ? $_POST['v'] : '1';
      //set user API key for Google Book Search API
      $key = isset($_POST['key']) ? $_POST['key'] : 'key goes here';
      //set user IP for Google Book Search API
      //$ip = isset($_POST['ip']) ? $_POST['ip'] : $_SERVER['REMOTE_ADDR'];
      //set default value for query to Google Book Search API 0307387941
      $query = isset($_POST['q']) ? $_POST['q'] : '0307387941';
      //set default value for search type to Google Book Search API
      $type = isset($_POST['type']) ? $_POST['type'] : 'all';
      //check and assign page of search results - are we on the first page?
      $start = isset($_POST['start']) ? $_POST['start'] : 1;
      //set default value for number of results
      $limit = isset($_POST['limit']) ? $_POST['limit'] : '10';
    
      switch ($type) {
    
        case 'all':
          $params = 'q='.urlencode($query).'&startIndex='.$start.'&maxResults='.$limit;
        break;
    
        case 'isbn':
                $params = 'q=isbn:'.urlencode($query).'';
        break;
    
        case 'lccn':
                $params ='q=lccn:'.urlencode($query).'';
        break;
    
        case 'oclc':
                $params = 'q=oclc:'.urlencode($query).'';
        break;
    
        default:
          echo '<p>You must specify a search type such as "all" or "book". Check the url to make sure "type=" has a value.</p>';
          exit;
          }
      //set URL for the Google Book Search API
      $url = 'https://www.googleapis.com/books/v'.$v.'/volumes?key='.$key.'&'.$params.''; 
    
      if(isset($_POST['q'])):
    
      //build request and send to Google Ajax Search API
      $request = file_get_contents($url);
      //decode json object(s) out of response from Google Ajax Search API
      $data = json_decode($request,true);
      $totalItems = $data['totalItems']; 
    
     pagination  mainHeading
        if ($totalItems > 0) {
      ?>
    
          <!doctype html>
          <html lang="en">
          <head>
          <meta charset="utf-8">
          <title>jQuery UI Dialog - Default functionality</title>
          <link rel="stylesheet" href="//whosgotbooks.com/jquery/jquery-ui-1.10.4.custom.css">
          <script src="//whosgotbooks.com/jquery/jquery-1.10.2.js"></script>
          <script src="//whosgotbooks.com/jquery/jquery-ui-1.10.4.custom.js"></script>
          </head>
          <body>
          <div id="dialog" title="Google Books Search Results" style="display:none;">
          <script>
          $(function() {
          $( "#dialog" ).dialog({
            height: 550, width: 450});
            $( "#returnvalues" ).click(function(){
            $( "#dialog" ).dialog( "close" ); 
            });
            });
          </script>     
                <strong><p style="font-size: 16px; text-align: center";>Top 10 Results for &quot;<?php echo @$_POST['q']; ?>&quot;</p></strong> 
            <strong><p style="font-size: 14px; text-align: center";>choose a book to select as your topic</p></strong>&nbsp;
            <table style="width:400px">
            <col width="325">
            <col width="75">
                <?php foreach ($data['items'] as $item) { ?>    
                      <tr>
                <td>
                           <strong><u><div style="font-size: 14px";><?php printf($item['volumeInfo']['title'])?></u></div></strong>
                             <strong>Author: </strong><?php printf( $item['volumeInfo']['authors'][0]); ?><br />
                             <strong>Published: </strong><?php printf( $item['volumeInfo']['publishedDate']); ?><br />                       
                   <strong>Page(s): </strong><?php printf( $item['volumeInfo']['pageCount']); ?><br />
                             <strong>Publisher: </strong><?php printf( $item['volumeInfo']['publisher']); ?><br />
                             <strong>Category: </strong><?php printf( strtolower($item['volumeInfo']['printType']).', '.strtolower($item['volumeInfo']['categories'][0])); ?>&nbsp;&nbsp;
                   <strong>ISBN: </strong><?php printf( $item['volumeInfo']['industryIdentifiers'][0]['identifier']); ?></td>
                <td><p><input type="submit" name="submit" value="Select" id="returnvalues"/></p>
                    <img src="<?php printf( rawurldecode($item['volumeInfo']['imageLinks']['smallThumbnail'])); ?>" />
                        </td>
                <tr><td style="width:420px"><p><strong>Description: </strong><?php printf( $item['volumeInfo']['description']); ?><br /></p></td>
                </tr>
                </tr>
    
                <?php } }
                else {
                    ?>
                       <p><strong>Sorry, there were no results</strong></p>
                    <?php  } 
                /* for testing purposes show actual request to API - REMOVE when finished
                $apiRequest = $url;
                echo '<p>API request: '.$apiRequest.'</p>'; */ ?>
            </table>
          </div>
          </body>
          </html>
    
              <?php
              else: //show form and allow the user to check for Google Book search results
              ?>
    
          <p><form id="searchForm" name="searchForm" method="post"> 
            <fieldset id="searchBox">
                <label>Search for a Book:</label>
                <input class="text" id="q" name="q" type="text" value="Powered by Google" onfocus="this.value=''; this.onfocus=null;" />
                <select id="type" name="type" size="1">
                    <option selected value="all">Book Title</option>
                    <option value="isbn">Books by ISBN</option>
                    <option value="lccn">Books by LCCN #</option>
                    <option value="oclc">Books by OCLC #</option>                
                </select>
                <input class="submit" id="submit" name="submit" type="submit" value="Search"  />
            </fieldset>
          </form></p>
          <?php
          //end submit isset if statement on line 73
          endif;
          }
    #144933
    keytastic
    Participant

    Hi,

    To start off, I followed the directions I found here, and I have a child theme set up.

    The text and background from my forum are both very white. I’d like to change the background to something darker. Ideally, it would match the look of my widgets, but at this point, I’d take a plain black background.

    Here’s my site: http://www.lagsquid.com/forums

    Here’s what I’ve been trying:

    #bbpress-forums li.bbp-header,
    #bbpress-forums li.bbp-footer {
    	background: #4b8e2c;
    }
    
    #bbpress-forums {
    	margin-bottom: 10px;
    	border: 1px solid #666;
    	padding: 12px;
    	background-color: #000000;
    	color: #ffffff;
    }
    
    #bbpress-forums div.bbp-forum-title h3,
    #bbpress-forums div.bbp-topic-title h3,
    #bbpress-forums div.bbp-reply-title h3,
    #bbpress-forums a.bbp-forum-title,
    #bbpress-forums a.bbp-topic-permalink {
    	font-size: 16px;
    	color: #0066FF;
    }
    
    #bbpress-forums a.bbp-author-name {
    	font-size: 12px;
    	color: #75A3FF;
    }

    Now, as I said, I’d really like to make the background of my forums look like the widgets. I’m not sure, but I think the code is this:

    .widget{
    	margin-bottom: 10px;
        border: 1px solid #666;
    	padding: 12px;
    	background: url('images/footer-bg.png') repeat left top;
    }
    

    Only, I can’t seem to get url('images/footer-bg.png') repeat left top; to work. Any help would be appreciated!

    My apologies if this doesn’t make any sense as it’s 2am and I’ve been working on this for quite a bit ๐Ÿ˜›

    #144931
    palmdoc
    Participant

    Pete I’d really like to use both.
    Is it difficult to edit the plugin code and change the short code name?

    #144929
    peterwsterling
    Participant

    Hi, thanks for trying out my plugin – I hope you enjoy using it. But sorry yes you are right; any two plugins that use the same shortcode are never going to work together. I trust you can figure out which of the two you want to continue using.

    Regards,
    Pete

    #144925

    In reply to: PM button in posts

    Stephen Edgar
    Keymaster

    @shpitzyl Thanks for sharing your code, now I need to come up with a way to keep and organize all these snippets of code…

Viewing 25 results - 12,126 through 12,150 (of 32,504 total)
Skip to toolbar