We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Announcing: Hop Inject, for injecting text into your custom fields

Development and Programming

Hoosteeno's avatar
Hoosteeno
109 posts
16 years ago
Hoosteeno's avatar Hoosteeno

We developed Hop Inject to solve a very specific problem: We wanted to place advertisement blocks after the 3rd (or 8th, or 3rd AND 8th) paragraph on a page. But, since this is EE we’re talking about, of course the 3rd (etc.) paragraphs were in a custom field of an entry, and were being rendered dynamically at request time.

Hop Inject does the trick. It lets us specify where an injection should occur (such as, “on paragraph tags”); it lets us specify which of those separators should get the injection (for example, “the third and the eighth”); and it lets us specify what the injection should be. It also lets us choose whether the injection should occur before or after the separator.

Sound like a problem you’ve run into, too? Well, it’s not a problem anymore!

You can download Hop Inject here.

Let us know how you like it!

Justin

       
moogaloo's avatar
moogaloo
200 posts
16 years ago
moogaloo's avatar moogaloo

Awesome - I was literally just walking home thinking how am I gonna solve a particular problem in an upcoming job - this sounds perfect.

what I was trying to do was provide a single content field (with WYSIWYG editor no doubt) that will be used to display album reviews. The tricky part was they were to fit in a fixed height space on the page, so I was planning on using a jQuery carousel to essentially paginate these reviews up into several carousel slides.

So the tricky bit was being able to tell jQuery / DOM where to cut each page up at - if this does what I think it does, I would presumably be able to specify that on page break tags <’br> it inject the code needed to end one slide and open another. Then its just up to the reviewer to put those breaks in and you’ve got easy, self controlled pagination for a jQuery carousel.

Really hoping its gonna work!!

       
smartpill's avatar
smartpill
456 posts
16 years ago
smartpill's avatar smartpill

I’m looking to insert a formatted “more” link just inside the last paragraph at the end of the last paragraph in a custom field before the closing tag, like:

A first paragraph
Possibly a second paragraph
The last paragraph <span class="this_is_the_part_I_want_to_inject"><a href="#">more</a></span>

Is this doable?

       
Ramya108's avatar
Ramya108
123 posts
about 16 years ago
Ramya108's avatar Ramya108

Thank you, thank you, thank you for this plugin!

I was looking for a way to automatically insert Adsense into every article, and it worked great!

       
Todd D.'s avatar
Todd D.
460 posts
15 years ago
Todd D.'s avatar Todd D.
… Let us know how you like it! Justin

I do like it! Thanks very much. It solved a very specific problem for us too and worked exactly as documented. Nice plug-in!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.