Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Set default settings when creating new group?

10 years 1 month ago
  • Michael's Avatar
    Topic Author
  • Michael
  • Offline
  • Fresh Boarder
  • Posts: 36
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi,
I want the "Allow members to upload photos and create albums" and the "Allow members to upload videos" to be set as allowed as default when creating new groups and then hide these photo and video options on this page.
Can you please point me in the right direction?
Thanks.

10 years 1 month ago
Licenses:

Hi Michael,

for this you must override Jomsocial template. please follow this steps:
1. copy groups.forms.php from /components/com_community/templates/default/ to /templates/your-template/html/com_community. ( documentation.jomsocial.com/wiki/Customizing_Template )

2. edit that file

line 113: put this new code
<?php
$jinput = JFactory::getApplication()->input;
$task = $jinput->get('task', "", 'STR' );
?>

edit line 118 and 159:
from
type="text"
to
type="hidden"

edit line 130: 
from
( $params->get('photopermission') == GROUP_PHOTO_PERMISSION_ALL)
to 
( $params->get('photopermission') == GROUP_PHOTO_PERMISSION_ALL || $task == 'create')

dit line 170:
from
($params->get('videopermission') == GROUP_VIDEO_PERMISSION_ALL)
to 
($params->get('videopermission') == GROUP_VIDEO_PERMISSION_ALL || $task == 'create')

and.. Done :-)

Please let me know the result. If you don't know how to do it. please provide me FTP access detail by editing this topic

Regards,
Albert

10 years 1 month ago
  • Michael's Avatar
    Topic Author
  • Michael
  • Offline
  • Fresh Boarder
  • Posts: 36
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Albertus,
Thanks for your fast reply. Unfortunately it doesnt do exactly what I am hoping to achieve.

Attachment groups.png not found


I want all of these check boxes checked as default

Attachment groups2.jpg not found


And then I wanna hide both photo and video options for users completely so they cannot choose. But all the checkboxes is still set.

Is this possible?
Thanks

Attachments:
10 years 1 month ago
Licenses:

Hi Michael,

Could you please provide me your FTP access detail at your Site Info? I will do it for you. Because the code little bit complicated, I will explain the changes after done.

Regards,
Albert

10 years 1 month ago
  • Michael's Avatar
    Topic Author
  • Michael
  • Offline
  • Fresh Boarder
  • Posts: 36
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi Albert,
I have updated with FTP settings. And thank you for looking at this :)

/Michael

10 years 1 month ago
Licenses:

Hi Michael,

Already done. please check it. the changes at lines 105-119:

<?php if($config->get('enablephotos') && $config->get('groupphotos')): ?>
<!-- group photos -->
	<input type="hidden" name="grouprecentphotos" id="grouprecentphotos-admin" value="<?php echo $group->grouprecentphotos;?>" />
	<input type="hidden" name="photopermission-admin" id="photopermission-admin" value="1" />				
	<input type="hidden" name="photopermission-member" id="photopermission-member" value="1" />
<?php endif;?>



<?php if($config->get('enablevideos') && $config->get('groupvideos')): ?>
<!-- group videos -->
	<input type="hidden" name="grouprecentvideos" id="grouprecentvideos-admin" value="<?php echo $group->grouprecentvideos;?>" />
	<input type="hidden" name="videopermission-admin" id="videopermission-admin" value="1" />	
	<input type="hidden" name="videopermission-member" id="videopermission-member" value="1" />
<?php endif;?>

10 years 1 month ago
  • Michael's Avatar
    Topic Author
  • Michael
  • Offline
  • Fresh Boarder
  • Posts: 36
  • Thank you received: 0
Licenses:
JomSocial Expired

Yes, perfect :o)
All is good.

Thank you very much for this!

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW