protected fields

No idea why that password wasn't working but it is now. I updated and tested it. I will make any site changes requested.
 
Still can't login to the backend.

"You do not have access to the administrator section of this site."

As I clearly said in my previous post:

The account you give us will also need to be an admin (super admin, if we use exTplorer for file access)

And as Rob and I have both said, you haven't given us ftp details. I don't know how I can be any clearer, but I'll try. In order to debug and make any necessary changes, we need:

A backend admin login (preferably a super admin).
Ftp access.

-- hugh
 
You seem unwilling to give us access to your site. If it's for security reasons, consider that you are already trusting us enough to run a couple of hundred thousand lines of our code on your site, any one of which could lay your site wide open to be hacked, or give us any kind of access we wanted, if that's what we wanted. Or could damage your site if we didn't know what we were doing. So you may as well let us HELP you, by giving us the access we need to debug this handful of lines of custom JS.

-- hugh
 
You still haven't told me WHY you need SA/FTP access, but I guess I have no choice since all you want to do is argue with me instead of trying to help.
 
You still haven't told me WHY you need SA/FTP access, but I guess I have no choice since all you want to do is argue with me instead of trying to help.
We are only getting frustrated here. I personally have checked the login several times over the last couple of days. Hugh has done the same thing. If you want us to help write and fix custom js code then we need to be able to log in to your admin to see what options you have set up and we need to be able to upload the js file to test it.
Yes in this thread we havent even got to the point in the support process where we can help you but that is because we havent had access to the information we requested.
 
Right now I can't load either the front or the back end of your site, I just get "waiting for ...". I can ping it, but not load any web pages from it.

We're not arguing with you, we're simply telling you what access we need to your system in order to help you. Without being able to see your settings or access the custom JS file, there's nothing we can do to help. We're not requesting anything that anyone trying to help you write and debug custom Javascript on your system wouldn't be asking for.

-- hugh
 
OK, the site is now loading. And the guide.html page you referred to is a list, not a form/detail view. Up till now, you have only talked about form/detail views.

Are you trying to redact that information in your list view, or in the detail view reached from clicking on an entry in that list, or in both?

-- hugh
 
Ideally, both but if it only works on the details page that would have to work. As you see I added a notice that some content will be viewable once the user has created an account, I'd rather show the redacted message like we have above for each element but maybe I am asking too much and making the site too heavy with the additional js. Thoughts?
 
From your initial question I presumed this was for a form, not a details view, so my code will not work, as it relied on the fact that any element in the form for which the user didn't have access rights to would be in read only mode. In the details view all the elements are going to be in this mode.

Given the fact you need to do this in a details view then the only way I can see to achieve it is to make a custom details template to do that.
So if you are using the 'bootstrap' details template copy the folder components/com_fabrik/views/details/tmpl/bootstrap and rename it to 'bootstrap2' (or what ever makes sense to you)
Edit your form and set the details template to bootstrap2.
then in the bootstrap2 folder edit default_group_labels_side.php and replace the content with:

PHP:
<?php
/**
 * Bootstrap Details Template
 *
 * @package     Joomla
 * @subpackage  Fabrik
 * @copyright   Copyright (C) 2005-2013 fabrikar.com - All rights reserved.
 * @license     GNU/GPL http://www.gnu.org/copyleft/gpl.html
 * @since       3.1
 */
 
// No direct access
defined('_JEXEC') or die('Restricted access');
 
$element = $this->element;
$guest = JFactory::getUser()->get('guest');
$fields = array('countries___id_ro');
?>
<div class="<?php echo $element->containerClass .' '. $element->span;?>">
<div class="span4 fabrikLabel">
<?php echo $element->label_raw;?>
</div>
<div class="span8">
<?php if ($this->tipLocation == 'above') : ?>
<p class=""><?php echo $element->tipAbove ?></p>
<?php endif ?>
 
<div class="fabrikElement">
<?php if (in_array($element->id, $fields) && $guest) :
echo '<a href="">Login</a> or <a href="">Register</a> to View';
else :
echo $element->element;
endif;?>
<?php ?>
</div>
 
<?php if ($this->tipLocation == 'side') : ?>
<p class=""><?php echo $element->tipSide ?></p>
<?php endif ?>
 
 
<?php if ($this->tipLocation == 'below') :?>
<p class=""><?php echo $element->tipBelow ?></p>
<?php endif ?>
</div>
</div><!--  end span -->
all you should need to then alter is the list of elements in :
PHP:
$fields = array('countries___id_ro');
so say you want to do the logic for the phone and email element's you would replace that line with
PHP:
$fields = array('guide___Phone_ro', 'guide___Contact_Email_ro');
 
Re-reading what I wrote I think I wasn't clear about the template locations.
If you want to do this for a form then the templates are in :
components/com_fabrik/views/form/tmpl

and details are in :
components/com_fabrik/views/details/tmpl

The code I posted was for the details template. It would almost be identical for the form tmpl except that the array of element names would not have the '_ro' suffix:


PHP:
$fields = array('guide___Phone', 'guide___Contact_Email');
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top