PHP Classes

PHP Markdown Parser

Recommend this page to a friend!

      PHP Markdown Parser  >  All threads  >  PHP Markdown Parser  >  (Un) Subscribe thread alerts  
Subject:PHP Markdown Parser
Summary:Missing required script!
Messages:7
Author:Ray Beriau
Date:2014-07-12 07:21:02
Update:2014-07-13 09:44:49
 

  1. PHP Markdown Parser   Reply   Report abuse  
Picture of Ray Beriau Ray Beriau - 2014-07-12 07:21:02
If an additional script is required, such as is the case for the 'markdown_to_html.php' script where the second line of code indicates that 'require_once('markup_parser.php')' is needed/required - where oh where is that missing script!

Why has the script 'markup_parser.php' not been include into the package (zip/tar.gz) since it is 'required'!

Ray

  2. Re: PHP Markdown Parser   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-07-12 08:02:44 - In reply to message 1 from Ray Beriau
The markup parser class is listed as dependent class in the download page. You can find it here:

phpclasses.org/secure-html-filter

  3. Re: PHP Markdown Parser   Reply   Report abuse  
Picture of Ray Beriau Ray Beriau - 2014-07-12 08:58:34 - In reply to message 2 from Manuel Lemos
Manuel, since the required (and missing) 'markup_parser.php' script is also part of one of your packages, why not make it easier for the users by including the 'markup_parser.php' script into the PHP Markdown Parser package - or, at the very least, including the link to the 'Secure HTML parser and filter' package (where one can find the 'markup_parser.php' script) - just a suggestion... ;-)

  4. Re: PHP Markdown Parser   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-07-12 09:19:54 - In reply to message 3 from Ray Beriau
Yes, I agree that information needs to be made more evident because it seems it is not the case.

I will think of a way to let package authors include other packages in the distribution of a package.

The site allows specifying dependent packages but not which files of another package are needed and where they should be included.

If you use Composer to install a package, it installs dependencies but the examples do not expect that user use Composer.

Examples can have messages inside of them, but that depends on the authors to put those messages.

While I do not figure a good solution, I may try to make the dependent package messages more noticeable for the users.

Do you have any suggestions on how it can be made more noticeable that you would not miss it? Thanks for the feedback.

  5. Re: PHP Markdown Parser   Reply   Report abuse  
Picture of Ray Beriau Ray Beriau - 2014-07-13 00:54:34 - In reply to message 4 from Manuel Lemos
Manuel, the best way to do this would be with a message on the web page where the package is promoted.

But again, if a script producer (such as you with the 'PHP Markdown Parser' package) uses an additional script, a script that is part of another package, a script that was designed by someone else, not only should the package name and link (to that package web page) be mentioned on the package web page, but the required script should be included into the package as well as credits given to the original script producer.

A new tab, between the 'Download' and the 'Reputation' tabs, possibly called 'Dependency' could be added to the package web pages, where all the required scripts are mentioned (not a list of the files included into the package, as can be seen under the 'View files' tab), including the scripts that were borrowed from other designers/packages (a list of all the scripts, included or not, that are required for a full operation of all the scripts, scripts that are not/might not be designed by the present script producer) - all the required scripts should be clearly mentioned with a link to their respective download web pages.

Also very important, credits should be provided to the original (borrowed) script producer.

Ray.

  6. Re: PHP Markdown Parser   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-07-13 02:09:00 - In reply to message 5 from Ray Beriau
I see. Well in the download tab, dependent packages are listed below the download link. Maybe there could be a way to make that information more outstanding.

Also in the actual download package the dependent packages are listed. It is the same problem of not being enough outstanding.

Adding a new tab just for dependencies would probably take too much space to keep fit all tabs in the package navigation bar space.

I am thinking of putting a flashing animation effect in the download tab and download page that the users cannot avoid noticing it.

As for including files of dependent packages in the package itself, I have thought about it before but it is a bit tricky.

Often the package does not need all files of the other package. In this case only one file is needed from the markup parser package and it has 38 files in total.

Another detail is the path of the dependent files. Even if I know which files are needed, those files need to go in the right path that the author wants it to be to make the example scripts work.

It is a bit complicated situation but I will keep thinking about possible solutions. Just let me know if you think of something else.

  7. Re: PHP Markdown Parser   Reply   Report abuse  
Picture of Ray Beriau Ray Beriau - 2014-07-13 09:44:49 - In reply to message 6 from Manuel Lemos
Manuel, before creating and releasing the 'PHP Markdown Parser' package, did you try it with the 'markup_parser.php' script (the missing script I reported) - according to the code in both 'markdown_to_html.php' and 'test.php' scripts, the 'markup_parser.php' script is required. I presume that you did all the tests.

So, since the 'markup_parser.php' script was required for the proper operation of two other scripts (ie: 'markdown_to_html.php' and 'test.php') it is my belief that 'markup_parser.php' script should have been included into the package before release (ie: already extracted from the 'Secure HTML parser and filter' package).

I am not a professional programmer, nothing close to what you are. But, whenever I release a script, all dependencies (both PHP scripts and JavaScript that are required) are also included into the package - the user then just needs to extract the scripts from the package, adjust the settings and is ready to use the script - there is no need for additional request for assistance unless a bug is discovered.

As for putting a flashing animation effect in the download tab, that would not work for me (it would probably be completely useless to many users, including myself) - to proceed with the download from PHP Classes, I usually 'Ctrl-Click' on the '.zip' part of the 'Download' tab - this opens a new hidden tab where the download is taken over automatically by my download manager. The only time I will go on the newly opened hidden download tab is when the download does not start automatically, usually because a verification code has to be entered.

The information on the requirement of dependencies (such as other scripts from other packages) has to/should/must be placed on the main package page - the best location would be just below the description of the package with a note stating that such and such file/script from such and such package is required for the full operation of the package, with a link to that file/script/package.

And please, please stay away from any flashing and/or animation - there is already way too much stuff on the web pages (most of it I find completely useless, but then again, I am from another/older generation where plain and simple was the norm...

Ray.