[Phpmyadmin-devel] RFD: New feature, Interface implementation (not a feature request! :-)

Marc Delisle delislma at CollegeSherbrooke.qc.ca
Tue Jan 28 10:24:02 CET 2003


Hi Garvin,

I think that this new feature would be welcome in phpMyAdmin and I would like
to contribute also to it.

First a general opinion: suggestion 2 pleases me, it goes in the general direction
of the pma db containing special settings. As for the novice user, well I think
those new features are not targeted at novice users. But it's only a matter
of cut&paste a table definition (or maybe someday we will have an automatic installer for those
tables) and define a controluser, then populate the table with some interface.

I wonder if we need more than one transformation type for each field?

For example, I have a field with binary data, I want to specify that
it is jpeg, but I might want to see the thumbnail or the full pic.

And some will prefer to see the pic in a popup, others to see it in the
same row to be able to read the other fields too.

Other things: look at our big T, to show Full texts or
reduced texts. It operates on the whole page and transforms the output.
But often I would like to see the full text of only one cell. I agree with
you to avoid a lot of pull-downs for each column header (or each cell).

For HTML, do we really need more than one transformation type?  Now we see
the raw HTML, new mode would be to render HTML, need another mode?

Also, should we display the new modes in table view (many records), or only when we go
in Edit mode (where we clearly have only one record to deal with, and we can display
more freely pull-downs for all rendering options)?

Sorry for the lots of questions :)

Marc

Garvin Hicking wrote:

>  Salutations!
> 
> 
> I am planning to add a feature for my own sake to phpMyAdmin. The reason  
> is, I have created an application for one of my customers and gave him  
> phpMyAdmin-access on his database. For me this is a good solution because  
> I down have to fiddle with a reduced backend, and he scores because I  
> won't charge him for that. ;)
> 
> Well, but then one major problem occured to us: He is administrating data  
> containing html-code (here: an image). He wants to see those images inside  
> of phpMyAdmin or at least having a link in a row where he can click on.
> 
> Currently libarires/display_tbl.lib.php3 encodes all data with  
> htmlspecialchars(). I want to let certain html-entities pass as such and  
> be rendered by the browser. First I just wanted to hack the code away,  
> bypassing the htmlspecialchars()-Function if a certain config-variable is  
> set.
> 
> But I think this can be done with more grace, and may come to be  
> integrated in upcoming phpMyAdmin-releases; if there is a need for, I  
> would be gratefully willing to code the required snippets.
> 
> Until now I am not fully advanced regarding how I could put the feature  
> inside the user interface. First on, I want the solution to be as flexible  
> as possible. Best way would be, that a user could choose among a set of  
> functions treating a table. So it would not only be possible to render  
> HTML-Code, but maybe to transform certain characters to other ones. Maybe  
> a function turning all ":-)" into smilie-GIFs.
> 
> I thought of extending the SQL-parser to support SQL-Comments which then  
> turn on my celldata-reparsing. I then dropped this idea, because I think  
> it is too hard to use for the novice user.
> 
> Currently I am thinking about the following implementations. I would  
> really appreciate your feedback on this, and what you think of it:
> 
> 1. Add another row below the header-row of the data. It should contain a  
> checkbox and a pulldown for each header. So I can check each checkbox, if  
> I want that field to be HTML-enabled, and choose a value in the pulldown- 
> field, which function I want the field to be used with. I think of a set  
> of predefined PHP-Functions, and the ability to insert 'plugins' in the  
> config.inc.php3 file. Like, I add a "smilie_to_html" function, a  
> "html_img" function, a "html_table" function and so on. This new row could  
> either be shown all the time, or only made accessible by clicking on a  
> link like "Enhance Display" or "Convert fields" or such.
> 
> Advantages: Full, flexible control over the desired fields. Customizable,  
> which field I want to have converted. Maybe I only want one single row  
> HTML-enabled, not all of them.
> 
> Dis-advantages: Many, many Variables to be propagated throughout the page.  
> Maybe too much to fit in GET-Vars. Many checkboxes/pulldowns to render for  
> the browser (slowdown)
> 
> 
> 2. Add a persistent table-property field. There I can define, much like  
> the 'edit table properties' which fields I later want to be treated with  
> certain functions.
> 
> Advantages: Clean integration without much variable-propagation hassle.
> 
> Dis-Advantages: We have to store this data somewhere, which is harder to  
> user for the novice user because he has to create tables like the  
> bookmark-table. Parsing would be a lot harder to do, because one has to  
> take ALIAS-Rows into consideration. You can't do 'on-the-fly'-alteration  
> of a single cell to be HTML-enabled.
> 
> 
> 3. Add a full-page alternative Display much like the current 'print view'.  
> Call it 'html view' and parse every single data as HTML.
> 
> Advantages: Most easy to code
> 
> Dis-Advanteges: Ugly implementation, no customization.
> 
> 
> 4. Expand the SQL-language with phpMyAdmin-parseable comments. Like:
>         SELECT
>                 field_img,
>                 field_href,
>                 field_plain
>         FROM table
>         /*
>                 pma_parse:field_img:html_img,
>                 pma_parse:field_href:html_href,
>                 pma_parse:field_plain:htmlspecialchars
>         */
> 
> And then add a nice Interface to that like the "insert field-name"  
> dropdown above the SQL Query-Textarea.
> 
> Advantages: Perfect way for a 'pro'-user. Easy to code, very flexible, no  
> variable-propagation hassle.
> 
> Dis-Advantages: Hard to get for novice users to be usable, unless a good  
> point-an-click editing system is etablished.
> 
> 
> Maybe the last suggestions, if done properly, could be enhanced for all  
> kind of native phpMyAdmin-functions. Even though I can't think of any  
> other right now.
> 
> 
> So...oppinions please? :-)
> 
> -- 
> Bye,                                            ...[ icq  #21392242 |
>  Garvin                                       ...[ www.supergarv.de |
> 
> ... *Wenn Du im Zweifel bist, hoere auf den Mann mit der blutigeren Waffe.*
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
> 
> 






More information about the Developers mailing list