Results 1 to 6 of 6
  1. #1
    Constant Pligger chad90382's Avatar
    Joined
    May 2006
    Posts
    129
    Thanks
    Received:0
    Given: 0

    have group selection on edit story

    When you edit a story you have the category on the edit page that you can change... how can I put the group selection on the edit page as well?

  2. #2
    Constant Pligger chad90382's Avatar
    Joined
    May 2006
    Posts
    129
    Thanks
    Received:0
    Given: 0
    Quote Originally Posted by chad90382 View Post
    When you edit a story you have the category on the edit page that you can change... how can I put the group selection on the edit page as well?
    anybody?....

  3. #3
    Pligg Developer/Coder/Designer ChuckRoast's Avatar
    Joined
    Dec 2005
    Location
    Pliggville USA
    Posts
    9,118
    Thanks
    Received:395
    Given: 73
    Version
    SVN Build
    Site
    http://Pligg.com/chuckroast
    I haven't tried this but you can try adding the following to edit_link_center.tpl

    Code:
            {if $enable_group && $output neq ''}
                <label>{#PLIGG_Visual_Group_Submit_story#}: </label><br/>
                {$output}
                <br/><br/>
    Help Keep ChuckRoast Home
    Today's Pligg Blog Post


  4. #4
    Constant Pligger chad90382's Avatar
    Joined
    May 2006
    Posts
    129
    Thanks
    Received:0
    Given: 0
    Quote Originally Posted by chuckroast View Post
    I haven't tried this but you can try adding the following to edit_link_center.tpl

    Code:
            {if $enable_group && $output neq ''}
                <label>{#PLIGG_Visual_Group_Submit_story#}: </label><br/>
                {$output}
                <br/><br/>
    getting close. Those hooks work. I have put the above code in editlink_edit_center.tpl and also placed the below code in editlink.php....
    Code:
    //to display group drop down
    	if(enable_group == "true")
    	{
    		$output = '';
    		$group_membered = $db->get_results("SELECT group_id,group_name FROM " . table_groups . " 
    							LEFT JOIN ".table_group_member." ON member_group_id=group_id
    							WHERE member_user_id = $current_user->user_id AND group_status = 'Enable' AND member_status='active'
    							ORDER BY group_name ASC");
    		if ($group_membered)
    		{
    			$output .= "<select name='link_group_id'>";
    			$output .= "<option value = ''>".$main_smarty->get_config_vars('PLIGG_Visual_Group_Select_Group')."</option>";
    			foreach($group_membered as $results)
    			{
    				$output .= "<option value = ".$results->group_id. ($linkres->link_group_id ? ' selected' : '') . ">".$results->group_name."</option>";
    			}
    			$output .= "</select>";
    		}
    		$main_smarty->assign('output', $output);
    	}
    With this the "submit to group" drop down works and I can select exsisting groups but for some reason it doesn't save it.

    Also they do have the "group share" button on the link summary page which I just noticed. But this as well lists the current groups and lets me select one but doesn't save the story to the group. It just brings me to the group page.

  5. #5
    New Pligger darjana's Avatar
    Joined
    May 2010
    Posts
    22
    Thanks
    Received:0
    Given: 0
    try add

    $linkres->link_group_id = sanitize($_POST['link_group_id'], 3);

    below

    $linkres->content = str_replace("\n", "<br />", $linkres->content);

    not tested but should work

  6. #6
    Constant Pligger chad90382's Avatar
    Joined
    May 2006
    Posts
    129
    Thanks
    Received:0
    Given: 0
    Quote Originally Posted by darjana View Post
    try add

    $linkres->link_group_id = sanitize($_POST['link_group_id'], 3);

    below

    $linkres->content = str_replace("\n", "<br />", $linkres->content);

    not tested but should work
    Thats it... works great now! Thanks Chuck and Darjana for your help on this. :applaud:

Similar Threads

  1. Have group selection in registration and Show group on post
    By symbol313 in forum Questions & Comments
    Replies: 0
    Last Post: 12-22-2011, 05:04 PM
  2. Group story in Published and Upcoming
    By alexxa in forum Questions & Comments
    Replies: 2
    Last Post: 06-15-2010, 10:47 AM
  3. Not able to edit the group
    By test_test123 in forum Questions & Comments
    Replies: 0
    Last Post: 05-01-2009, 03:18 AM
  4. Replies: 0
    Last Post: 02-25-2009, 10:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Web Hosting Services by Midphase Dreamhost Web Hosting Donate to Pligg