Hi, I've recently started converting one of my sites to e107 and I need to be able to insert some content (a small iframe) into the pages dynamically.
More specifically, I need to insert the iframe some number of words within content, say 50 words in or so. I can do the php necessary to find the right spot within the content and splice the iframe in, but I'm new to e107 and don't know how or where to access the variable that contains the page's text content.
Most of my pages are custom pages created with the Content Manager plugin or the FAQ plugin (I don't/won't have any News pages).
Obviously somewhere a mysql query is made to retrieve the actual page text(as opposed to the header, footer, or menu items), and this is what I'm looking for.
So, where can I intercept the actual page content (the text, basically)...in other words, what file or what variable would I look at to access this?
PHPnoobie wrote ... You should insert your iframe in there, or better still make a shortcode and then call the shortcode within the theme.php.
That's just it- I can insert the frame there, but only in a static position before or after the page content. I can't add it (for example) 50 or 100 words into the text of the article or page content. And that's what I need to do.
I need to access the variable that holds the page content so I can count in X number of words and insert it there, not just at the beginning or end of the content. Where would I find that?
PHPnoobie wrote ... Basic HTML / PHP knowledge would be benificial...
PHPnoobie wrote ... That said you say that your using Content Manager and FAQ for your pages, then the files you require to edit are in those respective plugins.
Can anyone here give me a line on which file(s) are likely to contain what I need?
EDIT: Actually, it looks like there are a couple of places to do what I want, but the $CONTENT_CONTENT_TABLE_TEXT (in content.php) var is a good place to start. The content_content_template.php in the /plugins/content/templates/default directory may also be a practical place to insert an iframe on the fly.
All product names mentioned herein are the trademarks of their respective owners. In addition, images, logos, pictures or other material may be trademarks or registered trademarks of their respective owners. Emote images by seb, released under the GPL license. With the kind support of Corllete Lab Studio. Forum Icons by Axialis Team.