Is it possible to make a form for writing excerpts? Do you think you could give me some ideas on how (or if) it could be done?
Perhaps I could make that by using the Form hacker? I am not very good at programming so guess I couldn’t handle anything to advanced but still I would be really happy for any kind of suggestions…
Hi Mark, thank you!
Its really nice that you’re prepared to spend a little time helping out with this and I also think that making an excerpt widget would be the best thing.
I’m looking forward to see what you might come up with,
will try to be patient though…
So why do I want that anyway?
I’m making sort of a very simple “advertisement board” for a LETS group. For that I need two textareas: one (that is the content-field) for optional material, pictures or whatever and then a smaller extra textarea for a short version of the advertisement that is used in category-pages and occationally is being printed out on paper, for something like a “members newspaper”. Also, all members of this group has to be given capabilities to use the main editing-space for some basic deleting and editing (but not posting) so that extra field must show up like a separate textarea there to and it has to be very easy to find and very “simple” looking. So, if using excerpts it already is by default and the only thing I really need to do is some minor changes in the stylesheets like moving things around and hiding things…
Hi again Mark, do you think that you could perhaps take a look and see if it’s possible to make this excerpt-plugin?
…or if you just don’t have the time, or at least not for a while then please tell me because then I really have to see if I can manage to figure out something by my self.
(I would love if you’ll help me but I also totally understand if you have to much to do and this isn’t one of your top-priorities)
Cmedia said:
I also am wanting an excerpt field box(preferablybasedon the advance except. Ideally it should be located between the post-tile and the content as opposed to a box below.
If you do an Excerpt widget, then with the ordering of the widgets plus Form Hacker, you can put the box anywhere you like.
Also how do I alter the width of the content text box?
Depends on what you’re comfortable with, are you strongest with HTML, PHP or CSS?
FYI: I’m implemented the excerpt widget and it seems to work fine. I’ll be in the next release, but if you need it sooner you can grab it from the dev branch.
Hello
Thank you very much for your help, it works perfectly
my members use tdo mini form to publish news on my website
i want theirs articles to be published in two categories
i know we can select one default category for one form, is it possible to select two default categories ?
which lines should i modify for this ?
thank you very much for your help
Silverstar
I’d recommend using an “Append to Post Content” widget to set more than one default category rather than hack TDOMF because you won’t be able to use the latest versions of TDOMF that will contain bug fixes and new features.
If you want to hack tdomf, go to include/tdomf-form.php line 291.
hello tdo master
actually what i would like is that all articles posted with every form (in the defined default categories) would also be posted in a general category
to be clearer, let’s say i have 3 forms
form1 > category 1 + general category
form2 > category 2 + general category
form3 > category 3 + general category
i hope i am clear, is it possible to do that ?
Thank you very much
Silverstar
Well set each form to use the specific category as default then use the general category in Append to Post Content.
So add an Append to Post Content widget to the end of your form and set the text to this:
<?php
# Grab existing categories
$postdata = wp_get_single_post($post_id, ARRAY_A);
$postcats = $post['post_category'];
# Change this to the id of the general category
$postcats[] = '3';
# Update post
$postdata = array(
"ID" => $post_id,
"post_category" => $postcats );
sanitize_post($postdata,"db");
wp_update_post($postdata);
?>
I haven't test this code, but it should work.
Silverstar said:
would it be a syntax error in the code? …
Yes it was. This code does work. Just remember to change ’13′ to the id of the additional category you want it to be appended to it and make sure it’s the last widget on the form.
<?php
# Grab existing categories
$postdata = wp_get_single_post($post_id, ARRAY_A);
$postcats = $postdata['post_category'];
# Change '13' to the id of the extra category
$postcats[] = '13';
# Update post
$postdata = array(
"ID" => $post_id,
"post_category" => $postcats );
sanitize_post($postdata,"db");
wp_update_post($postdata);
?>
admin
Administrator
July 4th, 2008 at 8:21 am
Hi emmi,
You could use the text and the-append-to-content widgets to do some funky processing on it, but the best solution would be to create a widget to allow users to add an excerpt. I’ll have a look at it because it shouldn’t be hard to do.
BTW Why do you want to do this?
Permalink | Quote