Is there a way to hide the group anonymous so that it does not show up in the Admin Area, Groups, View Groups list of groups?
TD
Hiding the group anonymous
Re: Hiding the group anonymous
Hi,
not that I would know of. You would have to edit the admin file to not show the group,
Edit the pageViewGroups.php and look to the query
$res = sql("select groupID, name, description from membership_groups $where limit $start, ".$adminConfig['groupsPerPage'], $eo);
Note that this file is overwritten upon recreation of you app.
not that I would know of. You would have to edit the admin file to not show the group,
Edit the pageViewGroups.php and look to the query
$res = sql("select groupID, name, description from membership_groups $where limit $start, ".$adminConfig['groupsPerPage'], $eo);
Note that this file is overwritten upon recreation of you app.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Hiding the group anonymous
I was able to make some changes to the Admin area that hide the anonymous group. Send me a private message if you would like a pdf of the code changes I made.
TD
TD
Re: Hiding the group anonymous
Here is my code that I used to hide the anonymous group in the Admin area of my web app.
TD
THE LINES THAT WHERE EITHER ADDED OR MODIFIED INCLUDE A COMMENT IDENTIFYING THEM AS SUCH
The line numbers I refer to are presented in Notepad++
In the root folder of your web app, in file config.php make sure this line is setup this way to hide tweeter on the Admin page:
'hide_twitter_feed' => "1",
In file /admin/incHeader.php, around line number 184, comment out the following line:
Also in file /admin/incHeader.php, starting around line number 199, comment out these lines:
In file /admin/pageHome.php, starting around line number 57, comment out these lines:
Also in file /admin/pageHome.php, around line 194, make these changes:
In file /admin/pageViewGroups, around line number 74, add these lines of code:
In file /admin/pageViewMembers.php, around line number 116, make these changes:
In file /admin/pageViewMermbers.php, around line number 158, add this line of code:
In file /admin/pageViewRecords.php, around line number 62, make these changes:
In file /admin/pageViewRecords.php, around line number 120, add these lines:
In file /admin/pageEditOwnership.php, around line number 92, make these changes:
These files will be overwritten so I created a backup folder called /admin/modified/ and place a copy of the modified files in it
PAGES THAT NEED TO BE BACKED UP TO THE FOLDER /admin/modified:
/admin/incHeader.php
/admin/pageEditOwnership.php
/admin/pageHome.php
/admin/pageViewGroups
/admin/pageViewMembers.php
/admin/pageViewRecords.php
TD
THE LINES THAT WHERE EITHER ADDED OR MODIFIED INCLUDE A COMMENT IDENTIFYING THEM AS SUCH
The line numbers I refer to are presented in Notepad++
In the root folder of your web app, in file config.php make sure this line is setup this way to hide tweeter on the Admin page:
'hide_twitter_feed' => "1",
In file /admin/incHeader.php, around line number 184, comment out the following line:
Code: Select all
<!--
<li><a href="pageEditGroup.php?groupID=<?php echo sqlValue("select groupID from membership_groups where name='" . makeSafe($adminConfig['anonymousGroup']) .
"'"); ?>"><i class="glyphicon menu-item-icon text-info glyphicon-user"></i> <?php echo $Translation['edit anonymous permissions'] ; ?></a></li>
-->
Code: Select all
<!--
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="glyphicon glyphicon-cog"></i> <?php echo $Translation['utilities']; ?> <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="pageSettings.php"><i class="glyphicon menu-item-icon text-info glyphicon-cog"></i> <?php echo $Translation['admin settings']; ?></a></li>
li class="divider"></li>
<li><a href="pageTransferOwnership.php"><i class="glyphicon menu-item-icon text-info glyphicon-random"></i> <?php echo $Translation['batch transfer']; ?></a></li>
<li><a href="pageMail.php?sendToAll=1"><i class="glyphicon menu-item-icon text-info glyphicon-envelope"></i> <?php echo $Translation['mail all users']; ?></a></li>
<li class="divider"></li>
<li><a href="pageRebuildFields.php"><i class="glyphicon menu-item-icon text-info glyphicon-refresh"></i> <?php echo $Translation['view or rebuild fields']; ?></a></li>
<li><a href="pageBackupRestore.php"><i class="glyphicon menu-item-icon text-info glyphicon-tasks"></i> <?php echo $Translation['database backups']; ?></a></li>
<li><a href="pageUploadCSV.php"><i class="glyphicon menu-item-icon text-info glyphicon-upload"></i> <?php echo $Translation['import CSV']; ?></a></li>
<li><a href="pageQueryLogs.php"><i class="glyphicon menu-item-icon text-info glyphicon-book"></i> <?php echo $Translation['Query logs']; ?></a></li>
<li class="divider"></li>
<li><a href="https://forums.appgini.com" target="_blank"><i class="glyphicon menu-item-icon text-info glyphicon-new-window"></i> <?php echo $Translation['AppGini
forum']; ?></a></li>
</ul>
</li>
-->
Code: Select all
<!--
<div class="col-md-12 text-right vspacer-lg">
<label><?php echo $Translation['maintenance mode']; ?></label>
<div class="btn-group" id="toggle_maintenance_mode">
<button type="button" class="btn <?php echo $off_classes; ?>"><?php echo $Translation['OFF']; ?></button>
<button type="button" class="btn <?php echo $on_classes; ?>"><?php echo $Translation['ON']; ?></button>
</div>
</div>
-->
Code: Select all
<td class="remaining-width"><a href="pageViewGroups.php"title="<?php echo $Translation['view groups']; ?>"><i class="glyphicon glyphicon-search"></i> <?php
/* echo sqlValue("select count(1) from membership_groups"); *//* this line commented out by ADSISC */
$anonGrp = "'".$adminConfig['anonymousGroup']."'"; /* this line added by ADSISC */
echo sqlValue("select count(1) from membership_groups where membership_groups.name <> ".$anonGrp); /* this line added by ADSISC */
?></a></td>
Code: Select all
while( $row = db_fetch_row($res)) {
$anonGrp = $adminConfig['anonymousGroup']; /* this line added by ADSISC */
if ($row[1] == $anonGrp) continue; /* this line added by ADSISC */
$groupMembersCount = sqlValue("select count(1) from membership_users where groupID='$row[0]'");
?>
Code: Select all
<!-- <?php echo htmlSQLSelect("groupID", "select groupID, name from membership_groups order by name", $groupID); /* this line commented out by ADSISC */ ?> -->
<?php $anonGrp = "'".$adminConfig['anonymousGroup']."'"; /* this line added by ADSISC */ ?>
<?php echo htmlSQLSelect("groupID", "select groupID, name from membership_groups where membership_groups.name <> ".$anonGrp." order by name", $groupID); /* this
line added by ADSISC */ ?>
Code: Select all
while($row = db_fetch_row($res)) {
$tr_class = '';
if($adminConfig['adminUsername'] == $row[0]) $tr_class = 'warning text-bold';
if($adminConfig['anonymousMember'] == $row[0]) $tr_class = 'text-muted';
if($adminConfig['anonymousMember'] == $row[0]) continue; /* this line added by ADSISC */
?>
Code: Select all
<!-- <?php echo htmlSQLSelect("groupID", "select groupID, name from membership_groups order by name", $groupID); ?> /* this line commented out by ADSISC */ -->
<?php $anonGrp = "'".$adminConfig['anonymousGroup']."'"; /* this line added by ADSISC */ ?>
<?php echo htmlSQLSelect("groupID", "select groupID, name from membership_groups where membership_groups.name <> ".$anonGrp." order by name", $groupID);
/* this line added by ADSISC */ ?>
Code: Select all
while($row = db_fetch_row($res)) {
$anonGrp = $adminConfig['anonymousGroup']; /* this line added by ADSISC */
if ($row[2] == $anonGrp) continue; /* this line added by ADSISC */
?>
Code: Select all
/* echo bootstrapSQLSelect('groupID', "select g.groupID, g.name from membership_groups g order by name", $groupID); *//* this line commented out by ADSISC */
$anonGrp = "'".$adminConfig['anonymousGroup']."'"; /* this line added by ADSISC */
echo bootstrapSQLSelect('groupID', "select g.groupID, g.name from membership_groups g where g.name <> ".$anonGrp." order by name", $groupID); /* this line added by
ADSISC */
PAGES THAT NEED TO BE BACKED UP TO THE FOLDER /admin/modified:
/admin/incHeader.php
/admin/pageEditOwnership.php
/admin/pageHome.php
/admin/pageViewGroups
/admin/pageViewMembers.php
/admin/pageViewRecords.php
- Attachments
-
- appgini_modifications_03.jpg (70.2 KiB) Viewed 1308 times
-
- appgini_modifications_02.jpg (52.99 KiB) Viewed 1308 times
-
- appgini_modifications_01.jpg (81.07 KiB) Viewed 1308 times
Re: Hiding the group anonymous
Here is the link to the pdf of the code modifications I made to hide the group anonymous.
TD
https://drive.google.com/file/d/1-DVTZc ... sp=sharing
TD
https://drive.google.com/file/d/1-DVTZc ... sp=sharing