Another (minor) feature request

Bauer

Well-Known Member
Would it be much trouble to include some sort of tags in List and Form Introductions that would distinguish who sees the text? Oftentimes I want the Form or List introduction to say one thing for users and something else for "Special" users. E.g....

{admin}You can delete multiple rows by clicking the desired checkboxes and using the "Delete" action button in the header{/admin}

This is the Summer 2012 survey.

{user}Fields marked with asterisk must be filled in{/user}

------------------

Another pair of tags that would be nice are {details} and {edit} - so the form will show one intro if in details view and another if in edit (or show in both if no tag).
 
:D
something like this is existing (and working in fabrik3,too; I just tested):
in the form intro you can use
{new:here comes text for new forms}
{edit: text shown in existing records (edit+detail)}
http://fabrikar.com/forums/index.php?wiki/forms/
With this monster project - one thing I've learned is... "You learn something new every day.";)

BUT... That still doesn't solve the issue I mentioned - i.e. filtering to the type of user (admin or user - "Special" or "Registered"/"Public"). I suppose that with the new usergroup plugin, something like this would/could be done.

Access in most every other aspect of Fabrik is almost to the point of overkill, IMO - yet Access rules applied to the introduction text are nowhere to be found? ???
 
BUT... That still doesn't solve the issue I mentioned

Obviously. Troester was simply pointing out that we already do something very similar, so anyone wanting to take a look at extending that mechanism would know where to look. Which is in the getIntro() method in the front end form model.

Access in most every other aspect of Fabrik is almost to the point of overkill, IMO - yet Access rules applied to the introduction text are nowhere to be found?

Because you are the first person to ever request it. Believe it or not, we don't implement features based on "one day in the future we predict that one user with some very specific requirements might ask for this".

If anyone wants to have a hack at adding some more conditionals to the getIntro() code, it shouldn't be hard.

If you want access controlled intro text, rather than {user} and {admin}, I'd consider using something more formalized, like {access:X}...{/access} where X is the id of the J! access level, so you can just see if X is in the $user->getAuthorizedViewingLevels() array (or whatever that J! method is called, I always forget).

Also, as this might be useful elsewhere, might be worth creating a helper method which processes the text.

I kinda wish we'd gone with {new}text{/new} instead of {new: text}, and it might be worth implementing that, but leave the old code there for backward compat (not that I think anyone uses it in 3.x).

Of course, as with any kind of tag processing, we'd have to handle nested tags ... so the code might not be entirely trivial.

Anyway ... I'm not averse to looking at doing this, but certainly won't have time until we've gotten 3.0.6 out.

Oh, and Jaanus - yes, an outro would be nice, as well as in intro, for forms, lists and viz's.

-- hugh
 
Maybe I'll get around to it Hugh. The Joomla UAC thing was more of what I had in mind - but I was trying to make it simple.

There is already a few Joomla 3rd party plugins that let you create your own tags - I've used them before. But I just don't like using something like that "system wide".

In my usual stubbornness, I said I wouldn't, but ended up signing up at Github. I have yet to figure out how to use it - or even the "lingo" used. (My learning curve isn't what it used to be.) I already have a list a mile long of things I'd like to do, but until I get my current project to at least a beta stage where my client can start using it, I don't have much time now to participate.

But I did the "readonly joined forms" thing over the weekend - and today I did a tweak for using a custom image for edit and detail Custom URLs used in Lists - a request I made weeks ago. Until I take the time to learn to use Github tools, I passed that rather simply tweak on to Janon in a PM requesting he add a pull request for it. (I hope he doesn't mind)

I guess everyone has their priorities, but saying (or insinuating at least) that any of my suggestions are trivial because I'm "the first to ask" doesn't mean squat. Few of your customers look at software like a programmer does - and even you admitted to me that your target customers are not programmers or techies like me - or Janon, Januus, or a few other of the other more "creative" participants in these forums. Many things aren't asked because people are willing to take things as they are - and/or don't even think about the possibilities that someone like Janon, Jannus and myself literally think about in our sleep.

Like I have said, the worst part about writing your own tweaks to any software is tracking them and worrying about overwriting your changes with an update. So I won't update now until I'm sure those 2 things are included. (Besides, my project seems to be running pretty smoothly with the current version I'm using.)

I keep telling you, I'm getting too old for this. And I don't enjoy my cranky attitude when things go bad anymore than you do hearing it from me. I wish we could bury the hatchets so our conversations didn't have this "tone" to them.:(
 
As a workaround for your original post have you considered doing this with a Fabrik custom template? Being a custom template it will not get overwritten by changes and could, if you want, work outside of Fabrik.

You could either code the text directly in the template or use an article plugin; nonumbers has one and you said before you like his stuff.

A custom template with an article plugin would allow you to do something like. If group == x { {article plugin = 4 } } that sort of thing. Then to change the text you simply edit the article which would allow a non techie to maintain the text as well.

This could also work between form and detail view.

Just an idea.
 
About GitHub:
If you are on a windows system try GitGUI; you can manage your local repositories, create branches, merge new fabrik versions (and reset any branch to any point).
 
As a workaround for your original post have you considered doing this with a Fabrik custom template? Being a custom template it will not get overwritten by changes and could, if you want, work outside of Fabrik.

You could either code the text directly in the template or use an article plugin; nonumbers has one and you said before you like his stuff.

A custom template with an article plugin would allow you to do something like. If group == x { {article plugin = 4 } } that sort of thing. Then to change the text you simply edit the article which would allow a non techie to maintain the text as well.

This could also work between form and detail view.

Just an idea.
Yeah, and a good one at that.;)

I keep forgetting that there are custom templates for "admin". That's the ticket! A little more work than tags would be, but an acceptable alternative I guess.
 
::sigh::

Baur, where did I say I thought your request was "trivial"? You expressed puzzlement about a feature not existing, with a frowny, question marky face, and a question mark. I explained that it's because you are the first person to ask for it, with a slight dose of sarcasm because this is the Nth time I've answered essentially the same question ("why doesn't this feature exist? [puzzled / frowny / annoyed face]") with the same answer.

BTW, I'm not 100% sure this would work, but if you have plugin processing enabled for the form, you could probably use something like Direct PHP in the intro text, rather than using a custom template.

I have on my "list of things to do as soon as possible" adding a helper method to grab a J! article text, as it's something we do in several places (like the email form plugin), and I'd like to reduce code duplication. Once I've done that, if Direct PHP does work in our intro text (and I see no reason why it wouldn't), you could very easily customize your intro text any which way, with no need for a custom template, and with the source text all being in easily edited J! articles.

-- hugh
 
::sigh::

Baur, where did I say I thought your request was "trivial"? You expressed puzzlement about a feature not existing, with a frowny, question marky face, and a question mark. I explained that it's because you are the first person to ask for it, with a slight dose of sarcasm because this is the Nth time I've answered essentially the same question ("why doesn't this feature exist? [puzzled / frowny / annoyed face]") with the same answer.

BTW, I'm not 100% sure this would work, but if you have plugin processing enabled for the form, you could probably use something like Direct PHP in the intro text, rather than using a custom template.

I have on my "list of things to do as soon as possible" adding a helper method to grab a J! article text, as it's something we do in several places (like the email form plugin), and I'd like to reduce code duplication. Once I've done that, if Direct PHP does work in our intro text (and I see no reason why it wouldn't), you could very easily customize your intro text any which way, with no need for a custom template, and with the source text all being in easily edited J! articles.

-- hugh
I guess I better quit using emotions then. First I was "demanding" because I used the words "you need to" - then I was "angry" for choosing red to highlight some text - now I'm "annoyed" because I used the "huh?" emotion. All of these are things I've seen other users do/use without even being questioned. All of this seems to play into the "God" complex I wrote about early on - where the only acceptable suggestions seem to be ones that are presented on a bended knee with a smiling face and humble bow - or a $5 stuffed in your waistband. And yet you wonder where I get my attitude?

And yes - I am using php code to do what I need to do in this case - but tags would be sooo much easier. And as I mentioned in another thread, the only plugin I've tried that seems to work consistently in that regard is the NoNumber Sourcerer plugin.

The same is true with using templates. While there are other solutions, I am only requesting, or hoping for, an alternative that makes it even easier to do. And I'm not "demanding" anything here - just offering up a request for something to put on your long "to do" list - or hoping someone else might consider it a worthy tweak to work on and present as a pull request via Github.
 
In a related issue - can anyone tell me how I can disable the checks that Fabrik does when the Introduction HTML is saved so that javascript is not stripped from it?

I'm trying to include a simple
Code:
<a href="javascript:history.go(-1)" title="Return to previous page">Go Back</a>
And I know it's not an issue with my editor because I can enter the same code in a Joomla article with no problem.

Oh, and thanks MR. Cheesiegrits - I now get this when I try starting a new thread...

Bauer, you do not have permission to access this page. This could be due to one of several reasons:

  1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
That's how you handle constructive criticism? What is this, Middle School? :D
 
Have you tried creating a thread in Fab 3.x community? It's possible that this section has been blocked by all new posts now as there are now three new categories. Silver, Bronze and Community.

http://fabrikar.com/forums/forumdisplay.php?f=94


Not sure about the Javascript thing though, not sure if that's a J! thing or Fabrik. Can you not insert it with Sourcerer?
 
Yes, it's closed to every registered user as the text says
This forum is now closed to new threads. You can still reply to any of your own existing threads, but for new issues, please post in the support forum appropriate to your subscription level.
 
I suppose I should start by trying to pull my foot out of my mouth - and sincerely apologize to Hugh.:-[

I hope he - and everyone else - realizes why I jumped to that conclusion.

I solved the javascript issue (for "history.go(-1)" anyhow) by using a Joomla! "Backbutton" plugin that I already had installed. It uses the tag {backbutton} to insert a javascript:history.go(-1) link anywhere in content.
 
:D
something like this is existing (and working in fabrik3,too; I just tested):
in the form intro you can use
{new:here comes text for new forms}
{edit: text shown in existing records (edit+detail)}
http://fabrikar.com/forums/index.php?wiki/forms/
I just tried this - and it works for add...

BUT, apparently "details" is treated the same way as "edit".

That feature should be reworked to exclude anything with an {edit:... } tag when in "details" view - just as it does when adding a new record. If the tag is "edit" it should ONLY display the text inside the tag when in edit mode, no?

(I suppose I now have my first bug report/request for the new forum.;D)
 
My bad, I should have made the forum description text at the top of the page bright red, flashing, 40 point bold italic underlined. :)

As the text says, we can continue any existing threads (like this) in this forum, so I'd rather continue this one here than opening a new one. FYI, I'll probably also add a Feature Request forum, where we can discuss things like this without usergroup restrictions, so everyone can join in.

As for HTML filtering, we apply standard J! text filter settings, which you can set in the normal J! Global Configuration -> Text Filters. Should work, let me know if it doesn't. Note that I think you have to logout and back in for any changes to filtering for your access level to take effect.

Re form vs details view for the {edit: text}, sounds reasonable. Really, that whole mechanism needs re-working. It's one of those features we added in a hurry way back in the mists of time for some specific project, we don't publicize it much, and very few people currently use it. So I'd have no objections to re-working it, using actual open/close tags, and adding more syntax to distinguish between new/edit, form/display, adding access control, and whatever other tags you think might be useful.

I just don't have time to do it right now, although i'd be happy to help anyone else that wanted to have a crack at it.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top