Project page:

My solution is an answer to a long standing issue in Drupal core as explained on the project page:
https://drupal.org/sandbox/Mywebmaster/2118939

Git clone command:

git clone --branch 7.x-1.x Mywebmaster@git.drupal.org:sandbox/Mywebmaster/2118939.git field_html_trim

Functionality:

This module provides a neat solution for cutting off the text without taking any HTML tags into consideration. It uses a regular expression containing all the words of a trimmed textual representation of the field value to extract the wanted block of HTML.

This is a simple solution for anyone that just wants their teasers to have the same textual length regardless of any links, images or other tags that are in the field value. This module does not provide a way to cut off at the end of a sentence. It goes up to word level.

Similar projects:

There are multiple other solutions that try to provide a better trim method for D7. But they both always count the HTML unless tags are removed as well. Thats why my project deserves it's own place:

Simplytest.me:

If you would like to use simplytestme:

  1. http://simplytest.me/project/2118939
  2. Enable Field HTML Trim at /node#overlay=admin/structure/types/manage/article/display for the body field.
  3. Create some content with lot's of html and some content without html in the body field. Trim will be just the same.

Manual reviews of other projects

https://drupal.org/comment/8296039#comment-8296039
https://drupal.org/comment/8296105#comment-8296105
https://drupal.org/comment/7195422#comment-7195422

Comments

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

softescu’s picture

Status: Needs review » Needs work

Fixed issues from pareview.sh

Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
FILE: /var/www/drupal-7-pareview/pareview_temp/README.txt
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 3 WARNING(S) AFFECTING 3 LINE(S)
--------------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 85 characters
96 | WARNING | Line exceeds 80 characters; contains 97 characters
121 | WARNING | Line exceeds 80 characters; contains 98 characters
--------------------------------------------------------------------------------

alexverb’s picture

Status: Needs work » Needs review

I cannot find any issues through the pareview.sh website or my local coder setup.
http://pareview.sh/pareview/httpgitdrupalorgsandboxmywebmaster2118939git

The only problem found is "File: @file block missing (Drupal Docs) [comment_docblock_file]". But this is rather a bug in the Coder module that only parses php files for @file blocks. https://drupal.org/node/1834598

So unless you can confirm this issue really comes from my README.txt I'm setting the status back to needs review.

alinouman’s picture

Status: Needs review » Needs work
StatusFileSize
new78.16 KB

1-Hi alex nice module, i find a bug with your module using views. when i give trim length 5 in manage display. On the views side it still shows 600 and views output is 5 they should be interdependent.

2- And u should be using #ajax states api rather checking using raw javascript in settings form.

alexverb’s picture

Status: Needs work » Postponed

1- Thx. I haven't looked at the views integration yet. I will digg in to that first. I'm setting the status to Postponed until I've figured this one out.

2- I tried using the #states api first. But it presented some buggy behaviour within the formatter settings. Do you have knowledge of any other modules that are using #states within the formatter settings form through the field_formatter_settings module? Would be great to have a working example to go off. If not I'm going to leave this as is, because I don't want to spend ages on figuring out what might be a core bug.

alexverb’s picture

Issue summary: View changes

Added simplytestme link

alexverb’s picture

Issue summary: View changes
Status: Postponed » Needs review

@alinouman:

1-The view field settings weren't actually being used in the field formatter settings. This has been fixed.

Aside from that I've also removed a bug that caused the regular expression to end at newlines.

anemirovsky’s picture

Status: Needs review » Reviewed & tested by the community

http://pareview.sh/ came up clean.

Took a look a the code and it seems to be using the API well. No security vulnerabilities from what I can see.

Tried the module out on simplytest.me and it works well. Nice work!

alexverb’s picture

Priority: Normal » Critical

This module has been in the application queue with status "Reviewed & tested by the community" for almost a month now. Is there anyone willing to give me full project access or at least promote this module to a full project?

I would like to contribute some other interesting sandbox modules to the community:

As long as these projects remain in sandbox I don't get the benefits of people submitting bug reports or feature requests. And these projects will not be able to grow.

I don't want to come accross impatient but I feel like I cannot do much more to give my contributions back to the community. So I'm changing the priority to critical in the hope somebody will help me out before I give up.

PA robot’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (duplicate)
Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://drupal.org/node/2147579

Project 2: https://drupal.org/node/2118995

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

alexverb’s picture

Issue summary: View changes
Status: Closed (duplicate) » Reviewed & tested by the community
alexverb’s picture

Issue summary: View changes
alexverb’s picture

Issue summary: View changes
alexverb’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
klausi’s picture

Issue summary: View changes
Issue tags: -PAreview: review bonus

Removing review bonus tag, you did not provide any feedback on the source code of the projects, you just repeated what the automated bot already told them or pointed them to. And please review applications in the "needs review" state, applications in "needs work" are blocked already and need a response from the applicant anyway.

alexverb’s picture

Allright, nevermind. I'll bury my efforts in the sandbox.

alexverb’s picture

kscheirer’s picture

Status: Reviewed & tested by the community » Fixed

Looks nice, this is definitely a problem for any site wanting significant text manipulation!

Thanks for your contribution, alexverb!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

----
Top Shelf Modules - Crafted, Curated, Contributed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.