WordPress.org

Ready to get started?Download WordPress

Forums

CollabPress
shortcode id usage (7 posts)

  1. MakSider
    Member
    Posted 11 months ago #

    Hi. I can't find project ID to use it in [collabpress id=#]. Could anyone help me please? Is the ID hidden inside CP plugin code so that I can unhide it for admin purpose or even for everyone?

    http://wordpress.org/extend/plugins/collabpress/

  2. MakSider
    Member
    Posted 11 months ago #

    Also using [collabpress 31] or [collabpress id=31] (one per page) site hangs and I see not complete page. If use twice: ... [collabpress] ... [collabpress 31] - all projects are displayed twice in the post beginning.

  3. MakSider
    Member
    Posted 11 months ago #

    collabpress/includes/menus/dashboard.php on line 155
    required() some '.../content-.php' file. Added
    if ( $cp->view != '' )
    into beginning of
    line 144 collabpress/includes/menus/dashboard.php
    (right before 'cp_load_template( $template );').
    Page with '[collabpress 31]' or '[collabpress id=31]' is now generated, but without 31-st project or any other one.

  4. MakSider
    Member
    Posted 11 months ago #

    Can anyone use IDs at all? How?

  5. slashCreations
    Member
    Posted 11 months ago #

    I've read your post, but i serisously does not understand why you would use an id inside shortcode.
    This is a very bad way of thinking the developpement.
    This amazing plugin (not mine, i'm just an user like you), let you insert in a page, with a really simple shortcode, all the Collabpress system.
    So, why whould you have an id ? If you do this, you will need to create a new page for each new project .. There will be no more automatic process .. If you do this, you break the main functionnalities of this plugin.
    Maybe that you have a really good reason, that make you want to use id inside shortcode, but i'm pretty sure that there is a very better solution, in copying templates files to your theme folder, and then edit them. You can recreate or rewrite all the functions beeing called from there .. THIS IS how you have to modifiy the plugin.
    Else, you can also create a "sub-plugin", which will 'extends' the collabpress plugin (work only if the plugin is written with classes (don't remember this is the case here :p)
    If you're not familiar with plugin or shortcode creation, i strongly recommened to change the way.

    Maybe that you should consider explaining why you want to use IDs in shortcodes, instead of modifying templates files.

    Cheers.

  6. MakSider
    Member
    Posted 11 months ago #

    This was the reason for my question.

  7. slashCreations
    Member
    Posted 11 months ago #

    Well .... if you read the given function, you'll see that the data ID is extracted, but not used in the function.

    I can read this:

    if ( cp_check_permissions( 'shortcode_user_role' ) ) {
        	cp_admin_menu_page_load();
        } else {

    But it should be something like this :

    if ( cp_check_permissions( 'shortcode_user_role' ) ) {
        	cp_admin_menu_page_load($atts);
        } else {

    It means that they created the shortcode, but they didnt activated yet.
    If you look at the cp_admin_menu_page_load function, you'll see that nothing is written to check the current item ID, and then use it the template view.
    I think that this shortcode is in current developpement by the plugin team. You should wait before using it, or rewrite your own custom cp_admin_menu_page_load function ;)

Reply

You must log in to post.

About this Plugin

About this Topic