WordPress Plugin: Default Post Content

heute kam mir der gedanke, dass es sehr praktisch wäre, wenn man bei der erstellung eines neuen posts einen default text vorgeben könnte; in diesem blog kann ich das zwar nicht benötigen, aber in einer firmeninternen wordpress installation sehr wohl.

zum glück geht das sehr einfach, daher hab ich gleich ein plugin erstellt: wp default post content

25 thoughts on “WordPress Plugin: Default Post Content

  1. great plug-in exactly what I was looking for but my problem is that I usually paste HTML code and it doesn’t get translated correctly. by this I mean:
    ——–START ——–

    height=”70%” width=”70%” alt=”” />

    ——- END ——–

    gets translated to:

    height=\”70%\” width=\”70%\” alt=\”\” />

    is there any way to fix this? thanks

  2. ah, i see. well, that will not work since the wysiwyg editor will make use of the html code in the default post content. in fact, i think this is the way i should work

  3. ok, please open the file, search for “stripslashes” (should be twice, line 59 and 97) and replace it with “htmlspecialchars”.

    be sure to enable “Strip Slashes?” on the options page. it should work now (tested with 2.0.1). please provide feedback so that i can add this option. thanks

  4. Hey,

    I am not even able to get that far.

    Going to you know via the options and default content tab, that is:

    /wp-admin/options-general.php?page=hipslu_wp-default-post-content.php

    Results in simply a blank white page. 🙁

    Thanks,

    Will

    Also leaving a comment here is really screwed up, cant believe the last one made it trhough:

    Warning: main(): Unable to access ../../../wp-config.php in /home/hipfinger/www.konfabulieren.com/wp-content/plugins/sk2_second_chance.php on line 3
    Warning: main(../../../wp-config.php): failed to open stream: No such file or directory in /home/hipfinger/www.konfabulieren.com/wp-content/plugins/sk2_second_chance.php on line 3
    Fatal error: main(): Failed opening required ‘../../../wp-config.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /home/hipfinger/www.konfabulieren.com/wp-content/plugins/sk2_second_chance.php on line 3

  5. how did you upload the plugin to your webspace? hopefully ascii; please check this.

    then, please open the url /wp-admin/options.php and find “active_plugins”. there should be “hipslu_wp-default-post-content.php” only once. if not, change it.

    ps: i think your browser has javascript disabled; enable it, and you should be able to post a comment without a problem 😉

  6. i finally found some time to have a look at the annoying “redeclare” bug some of you are running into. well, in fact i do not understand why this happens, but i promise: it is fixed now. please download the new version asap (http://www.konfabulieren.com/wordpress-plugins/) and give me some feedback. thanks.

    and: added the option requested by fanatyk some time ago – no source code search / replace needed anymore

  7. Hey, that is the thing i was looking for, but it does not work with the newest WordPress 2.0.2

    When i want to open the Default Post Content configuration Tab i get the following:

    ———

    Fatal error: Cannot redeclare hipslu_dpc_options_page() in /home/httpd/vhosts/blitz-art.com/httpdocs/blog/wp-content/plugins/hipslu_wp-default-post-content.php on line 25

    ———

    Please help.

  8. The same as comment by Byru, doesn’t work with WP 2.0.4. Love to use this plugin (also the javascript Plugin) so could you please fix the bug or help me?
    Thanx in advance.

  9. Can the liberties of a nation be thought secure,
    when we have removed their only firm basis,
    a conviction in the minds of the people that they
    are a gift of God? Indeed, I tremble for my countrymen,
    when I reflect that God is just, that His justice
    cannot sleep forever.

  10. I’m using WP 2.05 and I’m also getting the “redeclare”-error like Byru and Natti.

    Fatal error: Cannot redeclare hipslu_dpc_options_page() (previously declared in …/wp-content/plugins/hipslu_wp-default-post-content.php:25) in …/wp-content/plugins/hipslu_wp-default-post-content.php on line 23

    Any help on this would be appreciated.

  11. If you add a “default content per category” option, I will be able to eat it. It’s still delicious this way but the option I mentioned would be awesome.

  12. i do not think that this is possible (with my php skills :mrgreen: ) – the default content is set while the page is loading, but the category is defined for sure much later, so the page would have to reload or the content has to be set via javascript. what should happen to content the user has already entered? what should happen if there is more than one category checked? so i think this would not be that easy to implement.

    but i’ve added a option to define the default excerpt and the default title of a post; well, that would not help you, but it should be said i think 😀

  13. I’m using WordPress 2.3.2, and v1.3 of the plugin. The strip slashes function of the plugin works great on the post section, but slashes still show up in the title section. Is this something I’m doing wrong?

Comments are closed.