This is not exactly what you asked, but it’s the closest that I know of:
http://ww.wp.xz.cn/support/topic/39799?replies=2
Thanks for the reply. You’re right; not really what I was looking for, but a very interesting plugin!
What I’m envisioning is something what would not change the structure of the index or single post page templates, or even the loop, but would populate the POST itself.
Doesn’t look like anything currently exists; but any idea how difficult something like this would be to implement?
Oh, I got it. Well, if there was only ONE thing, you could alter the posting area and have it pre-populated with sertain text, post headings whatever.
For 1.5 I have done that, let me see if I can find my own post π
OK, I’ve found it. This is again not a perfect solution and not even sure whether it would work with wysiwyg (I don’t use it) – but it might give you an idea…
http://ww.wp.xz.cn/support/topic/26890?replies=18
Now THAT is exactly the kind of thing I want to do – only, I’m thinking of a plugin that would allow for different “chunks” of HTML to populate, e.g.:
<div><textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="5" id="content"><?php echo $content ?>
[STUFF]
</textarea></div>
where [STUFF] is taken from user-defined files, selectable from a dropdown list in the write post page.
(FYI, I also use the HTML editor, not the WYSIWYG editor. Not sure how this idea would work WYSIWYG – actually, I could see .TXT files for the HTML editor, and .RTF files for the WYSIWYG editor. Only problem is, I don’t know how to do any of this…) π
Actually, your QuickTags idea would work for me, as I only have one or two post “types” I want to template… thanks!
(Though, I still like the plugin idea… wonder if I’m explaining it well enough for anyone to be interested?)
I guess anybody reading this thread would get the idea… though don’t count on me: I am not able to write one single line of code π
Hmm, then you probably couldn’t answer my next question (javascript related): can I use the edButton function to insert a file, rather than state the code explicitly?
in other words:
edButtons[edButtons.length] = new edButton('ed_OYB_template'
,'OYB'
,'[STUFF]'
,''
,''
);
is what I’m working with currently; however, [stuff] starts out as formatted (tab-indented) HTML, which I think the quicktags.js is choking on. The simple solution would be to remove all the white space. The better solution would be to replace [STUFF] with a file reference, so that the function inserts the (presumably, tab-indented – i.e. “pretty”) contents of the file.
Possible?
Well, I have it working. It’s not “pretty” (line breaks, tab indents), but still saves me a load of typing. As a start, I’ll take it!
Still would be eternally grateful for ideas to maintain formatting. π
Oh, I remembered the other benefit of a “plugin”: in addition to populating the editor with HTML, it could also set the categories. π