The Block Inject Module Provides an Input Filter that you can add to any of your Input Formats. Once enabled, the filter allows you to inject (insert) any Custom Block into the content at the end of a predefined number of paragraph.
More Details and Installation and configuration instructions at @ http://drupal.org/sandbox/saitanay/1859810
Repo: git.drupal.org:sandbox/saitanay/1859810.git
Auto Review: http://ventral.org/pareview/httpgitdrupalorgsandboxsaitanay1859810git
I understand that this project may not qualify for GIT access (may be bcoz its small with just 140 lines of code), however if the project is deemed useful, please promote it to a "full project" status without granting me GIT access
Comments
Comment #1
rameshbabu.g commentedHi Tanay,
It's a very nice thought ..I am very exiting to get the custom block anywhere in the body field
But here we can achieve this by
1. Enabling PHP filter and writing some code like
OR
2. Using the below module
http://drupal.org/project/insert_block
It will give one filter for us and then you have to enter code like
[block:name of module=delta of block]
So just I wanted to know, how it is useful rather than the above methods..
Thanks,
Ramesh Babu G.
Comment #2
saitanay commentedHi Ramesh,
Reg (1)
Enabling PHP filters is always a bad idea as it has many security implications involved. When you have a content team, you can not delegate the access of using PHP filter to your content team, which will pose a big security threat
Reg (2)
Firsty, the mentioned module could be used when you want to show your block in a page or two. But on a content-heavy site, you can not edit every node to insert the block. "Block Inject Filter", if configured once, will insert the block in every content that uses the mentioned Input format!
Best
Tanay
Comment #3
dasRicardo commentedHello,
first, sorry for my bad english. I'm not a native speaker.
I has tested the module and i get an error:
The problem is that you do this here:
It's never a good idea to declare a variable inside a block that maybe not execute if you want to use it outside the block. In your case if the system have no custom blocks you never create the options variable.
You can handle this error in this way:
Another thing is, you have a master branch but for drupal.org u need only branches like this: 7.x-1.x. So should be remove the master branch. You can read it here
Comment #4
dasRicardo commentedPlease check watchdog,
It seams the same probem if no block in the system no body variable is defined.
Comment #5
mschudders commented1. Basic application checks
1.1 Ensure your application contains a repository and project page link.
Ok
1.2 Ensure your project is not a duplication.
Seems ok.
1.3 Ensure you don't have multiple applications.
You also have " Comment Limit by Role " please close one of these because only one project needs to be review.
2. Basic repository checks
2.1 Ensure the repository actually contains code.
ok but remove the master branch and put 1.x as the default branch please
2.2 Ensure you are working in a version specific branch.
ok but master branch is still there remove it please.
2.3 Ensure your project contains a minimum of handwritten code.
OK
3. Security Review
3.1 Ensure the project does not contain any security issues.
- Php filters are not that nice.
- This gets executed on every node where you have the same input format this is not that handy =:(
- If the users enabled this but has not selected any options I guess you will receive errors
- For the rest it looks ok
4. Licensing checks
4.1 Ensure the repository does not contain a ‘LICENSE.txt’ file.
ok
4.2 Ensure the repository does not contain any 3rd party (non-GPL) code.
ok
5. Documentation checks
5.1 Ensure the project page contains detailed information.
Ok. (Maybe use real headings h2 h3 ?)
5.2 Ensure the repository contains a detailed README.txt.
ok
6. Coding standards and style
6.1 Run an automated review and ensure there are no major issues.
See above = NOT ok.(master branch)
7. API and best practices Review
ok
Comment #6
saitanay commentedThanks for the reviews.
as suggested in #3, initialized $options outside the condition
Reg #4
=>Application "Comment Limit By Role" as the attempt to contact the maintainer of "Comment Limit" Module failed
=>Set default branch as specified,. removed master branch
Comment #7
tanzeel commentedOverall module looks good and there is no show blocker.
Moreover, "execution on each page having this filter" can be minimized by using check at top of _block_inject_filter_filter_process function something like:
Query execution at line 35 can be moved under the condition at line 66 to avoid it being executed all the time.
I have one suggestion in my mind which can extend this module to better use.
- User "exclude pages" option so that admin/user can have better control to display.
Comment #8
saitanay commentedhi Tanzeel,
Reg //"execution on each page having this filter" can be minimized by using check at top of _block_inject_filter_filter_process function
you seem to haven't got an understanding of filters yet,.
Filters are not specific to just blocks,.
Filters are applicable to node content, custom blocks, comments, anything on the site which uses Output format.
Can you justify what advantage you see in adding the piece of code mentioned in comment #7,.
Reg //Query execution at line 35 can be moved under the condition at line 66 to avoid it being executed all the time.
Makes sense, thanks for the suggestion, implemented it,.
Comment #9
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and 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.
Comment #10
tanzeel commentedHi,
Code mentioned in comment #7 doesn't create any difference, i got your point. That was my bad.
Module seems ok to me. Let's wait for final review by authenticated persons.
Comment #11
rameshbabu.g commentedHi,
looks to be working fine
Comment #12
kscheirerWell, initially I wanted to argue this is a duplication too, but after reading the comments this does seem like a unique solution.
I would like to see this point removed:
Is there a way to avoid this? You could check the input format of the block content you were injecting. Or maybe use a static variable so you can count the number of executions and avoid an infinite loop.
----
Top Shelf Modules - Enterprise modules from the community for the community.
Comment #13
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #13.0
PA robot commentedMore Details and Installation and configuration instructions at