WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Portfolio
Column Layout and Making URL Not Mandatory (2 posts)

  1. praisehim
    Member
    Posted 1 year ago #

    Hello,

    I love this plugin. I have two questions:

    1. How do I make the layout 2 column as opposed to 1 column? I find that it is a waste of space.

    2. I'm using this for people who may not want to link their work. How do I make it so that the URL is not mandatory?

    Thanks and awaiting your reply,

    http://wordpress.org/extend/plugins/buddypress-portfolio/

  2. designerschokolade
    Member
    Posted 1 year ago #

    To answer your question No. 2: You will have to change two things in the ----> bp.portfolio-screens.php

    1. Within "check the nonce" delete one condition:
    -----------------------------
    OR empty($_POST['url-input'])
    -----------------------------

    so that the new text is like this:
    ------------------------------------
    if(empty($_POST['title-input']) OR empty($_POST['description'])) {
    bp_core_add_message(__('All fields but the URL must be filled in!', 'bp-portfolio'), 'error');
    } else {

    -----------------------------------
    2.
    -----------------------------------

    Search for
    -----------
    // Check the url
    if (!preg_match("/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/", $_POST['url-input'])) {

    ----------
    Replace with
    ----------
    // Check the url
    if ((!empty($_POST['url-input'])) AND (!preg_match("/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/", $_POST['url-input']))) {

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.