dbungard (@dbungard)

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

  • dbungard
    Participant

    @dbungard

    Trying to add

     && !current_user_can("access_s2member_level4") ;
    

    to what you have… but gave error saying that the array was not longer an array. Do you know how to do this?

    also is page = post id? if not, how did you find the page id?

    thank you


    dbungard
    Participant

    @dbungard

    Or maybe it’s down here

    
    /**
     * Output the view url
     *
     * @since bbPress (r2789)
     *
     * @param string $view Optional. View id
     * @uses bbp_get_view_url() To get the view url
     */
    function bbp_view_url( $view = false ) {
    	echo bbp_get_view_url( $view );
    }
    	/**
    	 * Return the view url
    	 *
    	 * @since bbPress (r2789)
    	 *
    	 * @param string $view Optional. View id
    	 * @uses sanitize_title() To sanitize the view id
    	 * @uses home_url() To get blog home url
    	 * @uses add_query_arg() To add custom args to the url
    	 * @uses apply_filters() Calls 'bbp_get_view_url' with the view url,
    	 *                        used view id
    	 * @return string View url (or home url if the view was not found)
    	 */
    	function bbp_get_view_url( $view = false ) {
    		global $wp_rewrite;
    
    		$view = bbp_get_view_id( $view );
    		if ( empty( $view ) )
    			return home_url();
    
    		// Pretty permalinks
    		if ( $wp_rewrite->using_permalinks() ) {
    			$url = $wp_rewrite->root . bbp_get_view_slug() . '/' . $view;
    			$url = home_url( user_trailingslashit( $url ) );
    
    		// Unpretty permalinks
    		} else {
    			$url = add_query_arg( array( 'bbp_view' => $view ), home_url( '/' ) );
    		}
    
    		return apply_filters( 'bbp_get_view_link', $url, $view );
    	}
    

    Please someone help – I am a designer not a programer – honestly I hadn’t realized that bbpress WOULDN”T have the forum name associated with the topic…


    dbungard
    Participant

    @dbungard

    Did you ever find a solution?

    In reply to: Forum ID in Topics URL

    dbungard
    Participant

    @dbungard

    Or maybe it’s down here

    
    /**
     * Output the view url
     *
     * @since bbPress (r2789)
     *
     * @param string $view Optional. View id
     * @uses bbp_get_view_url() To get the view url
     */
    function bbp_view_url( $view = false ) {
    	echo bbp_get_view_url( $view );
    }
    	/**
    	 * Return the view url
    	 *
    	 * @since bbPress (r2789)
    	 *
    	 * @param string $view Optional. View id
    	 * @uses sanitize_title() To sanitize the view id
    	 * @uses home_url() To get blog home url
    	 * @uses add_query_arg() To add custom args to the url
    	 * @uses apply_filters() Calls 'bbp_get_view_url' with the view url,
    	 *                        used view id
    	 * @return string View url (or home url if the view was not found)
    	 */
    	function bbp_get_view_url( $view = false ) {
    		global $wp_rewrite;
    
    		$view = bbp_get_view_id( $view );
    		if ( empty( $view ) )
    			return home_url();
    
    		// Pretty permalinks
    		if ( $wp_rewrite->using_permalinks() ) {
    			$url = $wp_rewrite->root . bbp_get_view_slug() . '/' . $view;
    			$url = home_url( user_trailingslashit( $url ) );
    
    		// Unpretty permalinks
    		} else {
    			$url = add_query_arg( array( 'bbp_view' => $view ), home_url( '/' ) );
    		}
    
    		return apply_filters( 'bbp_get_view_link', $url, $view );
    	}
    

    Please someone help – I am a designer not a programer – honestly I hadn’t realized that bbpress WOULDN”T have the forum name associated with the topic…


    dbungard
    Participant

    @dbungard

    There must be a way to do this. I am in includes/common/template-tags.php

    I see:

    /** URLs **********************************************************************/
    
    /**
     * Ouput the forum URL
     *
     * @since bbPress (r3979)
     *
     * @uses bbp_get_forums_url() To get the forums URL
     * @param string $path Additional path with leading slash
     */
    function bbp_forums_url( $path = '/' ) {
    	echo bbp_get_forums_url( $path );
    }
    	/**
    	 * Return the forum URL
    	 *
    	 * @since bbPress (r3979)
    	 *
    	 * @uses home_url() To get the home URL
    	 * @uses bbp_get_root_slug() To get the forum root location
    	 * @param string $path Additional path with leading slash
    	 */
    	function bbp_get_forums_url( $path = '/' ) {
    		return home_url( bbp_get_root_slug() . $path );
    	}
    
    /**
     * Ouput the forum URL
     *
     * @since bbPress (r3979)
     *
     * @uses bbp_get_topics_url() To get the topics URL
     * @param string $path Additional path with leading slash
     */
    function bbp_topics_url( $path = '/' ) {
    	echo bbp_get_topics_url( $path );
    }
    	/**
    	 * Return the forum URL
    	 *
    	 * @since bbPress (r3979)
    	 *
    	 * @uses home_url() To get the home URL
    	 * @uses bbp_get_topic_archive_slug() To get the topics archive location
    	 * @param string $path Additional path with leading slash
    	 * @return The URL to the topics archive
    	 */
    	function bbp_get_topics_url( $path = '/' ) {
    		return home_url( bbp_get_topic_archive_slug() . $path );
    	}

    I figure there MUST be a way to add the forum to the topics URL. I’m doing this because I have a action based upon the URL string and need to have all things on that forum associated with that at a URL level. I’m more of the design end than the development end of things and though I see it there I cannot seem to bridge the gap.

    I was also reading: https://bbpress.trac.wordpress.org/ticket/2258 – has there been any progress here?

    Customizing this has taken much longer than expected & I’d like to resolve this. Any thoughts would be appreciated.
    TY

Viewing 5 replies - 1 through 5 (of 5 total)