From 91d8156075e84eaca466dc86ae4f7d9b27a23186 Mon Sep 17 00:00:00 2001 From: Geoffrey Crofte Date: Sun, 25 May 2014 19:26:42 +0200 Subject: [PATCH 1/2] New version 1.2.0 * HTML is more efficient * New hooks to customize HTML and classes * Readme.txt added * French translatation updated --- bp-simple-front-end-post.php | 2 +- form.php | 199 +++++++++++++++++++---------------- languages/en_US.mo | Bin 512 -> 1417 bytes languages/en_US.po | 84 +++++++++++++++ languages/fr_FR.mo | Bin 0 -> 1588 bytes languages/fr_FR.po | 85 +++++++++++++++ languages/languages.pot | 84 +++++++++++++++ languages/readme.txt | 2 +- readme.txt | 51 +++++++++ 9 files changed, 416 insertions(+), 91 deletions(-) create mode 100644 languages/en_US.po create mode 100644 languages/fr_FR.mo create mode 100644 languages/fr_FR.po create mode 100644 languages/languages.pot create mode 100644 readme.txt diff --git a/bp-simple-front-end-post.php b/bp-simple-front-end-post.php index a353da5..9f7de5f 100644 --- a/bp-simple-front-end-post.php +++ b/bp-simple-front-end-post.php @@ -1,11 +1,11 @@ current_user_can_post ): - - ?> +current_user_can_post ) { +?> +
+
+ + + id ); ?> + + + + + + - - - - - - id ); ?> - - - - - - - - - - - - upload_count):?> - - - -
- upload_count;$i++):?> - - - -
- - - has_post_thumbnail):?> - - - -
- - -
- - - has_tax()):?> -
- render_taxonomies();?> -
-
- - - - has_custom_fields()):?> - ";?> -

Extra Info

- render_custom_fields();?> - ";?> - - - show_comment_option):?> -
-

Allow Comments

- comment_status; - if($post_id){ - $post= get_post($post_id); - $current_status=$post->comment_status; - } - ?> - - - -
- - - - + $title_name = 'bp_simple_post_title'; + $posttext_name = 'bp_simple_post_text'; + $featured_name = 'bp_simple_post_upload_thumbnail'; + $comment_name = 'bp_simple_post_comment_status'; - + $h3 = apply_filters('bp_simple_post_title_tag', 'h3'); + $h3_class = apply_filters('bp_simple_post_title_classes', ''); + $h3_class = $h3_class != '' ? ' '.$h3_class : ''; + $div = apply_filters('bp_simple_post_line_tag', 'div'); + $bpsp_block_class = apply_filters('bp_simple_post_line_classes', ''); + $bpsp_block_class = $bpsp_block_class != '' ? ' '.$bpsp_block_class : ''; + ?> + < class="bp_simple_post_block"> + < class="bp_simpe_post_title">> + + > - -
-
- \ No newline at end of file + < class="bp_simple_post_block"> + < class="bp_simpe_post_title">> + + > + + upload_count ) { + ?> +
+ < class="bp_simpe_post_title">> + upload_count; $i++ ) { + ?> + + +
+ has_post_thumbnail ) { + ?> +
+ < class="bp_simpe_post_title">> + +
+ has_tax()) { + ?> +
+ < class="bp_simpe_post_title">> + render_taxonomies();?> +
+ has_custom_fields()) { + ?> +
+ < class="bp_simpe_post_title">> + render_custom_fields(); ?> +
+ show_comment_option ) { + ?> +
+ < class="bp_simpe_post_title">> + comment_status; + + if ( $post_id ) { + $post= get_post($post_id); + $current_status=$post->comment_status; + } + ?> + +
+ + show_comment_option + ?> + + + + +@@5Z>}1&Q zzyoU&4E_>40=@t%;M*zRP5mFh^YDKHcZ1)-1K`go_wE$p6#gFr=fD|o4>$n#fg^Ai zSb*oi68wnV*I>}^qiE273I_dWQ@)(~-+)2?J&2$9f=AH*I^{Po=>GtN{t1W&{Wcy! z{~j3hAA&)@4?YtSQ@DT zi+0A!F^$w3qnc&%hEknngna5!~Upu-cat z4>?|=ROyV9GvO7gZlGU9V{7^ukI1QYoe!uqg+-kzO`GtxBsEYvrwpyzs_1H;u~;2v zMnU}n26!9-YxYo9xoA$#aCdV==RGjvCRequSryW9NHeeB;qao{6hobag_ z7pH78X8G+6%vEEeaTaDWDM3bz|FbJ)Ot1*j#!4m^1i23KQN<0pGgfcN`SK@T>ROs= zxN`MHUP`OCQY%;}SqqYv2fq(Nx|jZ2$Fid<+Q>lLwxvr?`EWwls-dlim9t6NM18f@ X#zt%*n%Y+i9s*XN>>9j_Derv){1{0& diff --git a/languages/en_US.po b/languages/en_US.po new file mode 100644 index 0000000..f9e68d9 --- /dev/null +++ b/languages/en_US.po @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: BP Front End Post Editor\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-05-22 23:23+0100\n" +"PO-Revision-Date: 2014-05-22 23:24+0100\n" +"Last-Translator: Geoffrey \n" +"Language-Team: \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Generator: Poedit 1.6.4\n" +"X-Poedit-SearchPath-0: ..\n" +"X-Poedit-SearchPath-1: .\n" + +#: ../bp-simple-front-end-post.php:397 +msgid "The Security check failed!" +msgstr "The Security check failed!" + +#: ../bp-simple-front-end-post.php:417 +msgid "You are not authorized for the action!" +msgstr "You are not authorized for the action!" + +#: ../bp-simple-front-end-post.php:422 +msgid "Please make sure to fill the required fields" +msgstr "Please make sure to fill the required fields" + +#: ../bp-simple-front-end-post.php:545 +#, php-format +msgid "%s Saved as %s successfully." +msgstr "%s Saved as %s successfully." + +#: ../bp-simple-front-end-post.php:549 +#, php-format +msgid "There was a problem saving your %s. Please try again later." +msgstr "There was a problem saving your %s. Please try again later." + +#: ../bp-simple-front-end-post.php:795 +#, php-format +msgid "Select %s" +msgstr "Select %s" + +#: ../form.php:32 +msgid "Title" +msgstr "Title" + +#: ../form.php:37 +msgid "Post" +msgstr "Post" + +#: ../form.php:46 +msgid "Uploads" +msgstr "Uploads" + +#: ../form.php:62 +msgid "Featured Image" +msgstr "Featured Image" + +#: ../form.php:73 +msgid "Categories" +msgstr "Categories" + +#: ../form.php:83 +msgid "Extra info" +msgstr "Extra info" + +#: ../form.php:93 +msgid "Allow Comments" +msgstr "Allow Comments" + +#: ../form.php:102 +msgid "Yes" +msgstr "Yes" + +#: ../form.php:109 +msgid "Send post" +msgstr "Send post" + +#, fuzzy +#~ msgid "Post:" +#~ msgstr "Share the post" diff --git a/languages/fr_FR.mo b/languages/fr_FR.mo new file mode 100644 index 0000000000000000000000000000000000000000..0be6b73dd9d7d42f31e40fd1c4d904225cc9e78c GIT binary patch literal 1588 zcmZvbJ&YSg6vu}U0yum`5eNxUyer5RVK=supvV^>+~JE3?iB0JIg#o#*?qPrH@maU zhwq%4270I{(jdiD6i5`5+fh>^S|ln8Xb|E*Yb#E{$m`$i?3?#B^Z)hY*{=k~1w3!z z`3BD$asCYcFiyd^J_BC?zXn_2w@ZG%T>lAt2kSqBXTiV07r}p)Ja}qoDOH6(4GCPH4*%1()85E$Mk|tYRnn zr`}3Z<;aL_mOfZ`*eT?g#Xz%kOocpVc(Y92&`4=be!^t=v!J5wNU_eH7#Qcp0c*}Y zqGML(RK>L+j1M>qR{0ra6V8rlB$eiTEq;R66XYwYvgW?#f}EVHa!fN5Ec~RjOv2k4 z$+1)=X{2sbF;rf&xLau>5&a$txn}}N_$!Sk8T(Smb9-Y-7a;n_PU+R?M}N5!(^YQDn|K#yY9knS2~{ztt=hNGqy*!*^EY(XLQr5 z;~Bzp{+Lh%v;Fyvj%c4h%bf!!n2lbF{x=_W;Z)HuEQ+|NeG&99& zUynxiXnVi4x3kw@b)u8DTU+P^Zb>qnRVd8!slQTbw0;A}C#_@u-reDLa${u|^B%EH z`ekNvoL-M^+*iK!X)-X3J|>^=?8MmI?JDPcbab?F#H){+xMP*{lOCm5yv-%sMGF?2 zsgu5&UR#+Tu(a7^fDK6-TjHK&l&8LQqO&Ln95ybYiswXJS{@?UkrwdY(4+v_?Ccpc>*pp8eq1osk4UdS=?2FlqJydNP*2p{p_OW} zTF;$9o$$4)1?_WABCSS*mcDyn H$yEFYPzu7H literal 0 HcmV?d00001 diff --git a/languages/fr_FR.po b/languages/fr_FR.po new file mode 100644 index 0000000..daf142d --- /dev/null +++ b/languages/fr_FR.po @@ -0,0 +1,85 @@ +msgid "" +msgstr "" +"Project-Id-Version: BP Front End Post Editor\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-05-22 23:21+0100\n" +"PO-Revision-Date: 2014-05-22 23:22+0100\n" +"Last-Translator: Geoffrey \n" +"Language-Team: Creative Juiz \n" +"Language: fr_FR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Generator: Poedit 1.6.4\n" +"X-Poedit-SearchPath-0: ..\n" +"X-Poedit-SearchPath-1: .\n" + +#: ../bp-simple-front-end-post.php:397 +msgid "The Security check failed!" +msgstr "Oups… Échec du contrôle de sécurité." + +#: ../bp-simple-front-end-post.php:417 +msgid "You are not authorized for the action!" +msgstr "Vous n'êtes pas autorisé à faire cette action." + +#: ../bp-simple-front-end-post.php:422 +msgid "Please make sure to fill the required fields" +msgstr "Merci de remplir tous les champs requis" + +#: ../bp-simple-front-end-post.php:545 +#, php-format +msgid "%s Saved as %s successfully." +msgstr "%s Proposition enregistrée %s avec succès." + +#: ../bp-simple-front-end-post.php:549 +#, php-format +msgid "There was a problem saving your %s. Please try again later." +msgstr "" +"Oups ! Il y a eu un problème à l'enregistrement de votre %s. Vraiment " +"désolé ! Merci de réessayer." + +#: ../bp-simple-front-end-post.php:795 +#, php-format +msgid "Select %s" +msgstr "Sélectionner %s" + +#: ../form.php:32 +msgid "Title" +msgstr "Titre" + +#: ../form.php:37 +msgid "Post" +msgstr "Contenu" + +#: ../form.php:46 +msgid "Uploads" +msgstr "Chargements" + +#: ../form.php:62 +msgid "Featured Image" +msgstr "Image d'illustration" + +#: ../form.php:73 +msgid "Categories" +msgstr "Catégories" + +#: ../form.php:83 +msgid "Extra info" +msgstr "Info supplémentaires" + +#: ../form.php:93 +msgid "Allow Comments" +msgstr "Autoriser les commentaires ?" + +#: ../form.php:102 +msgid "Yes" +msgstr "Oui" + +#: ../form.php:109 +msgid "Send post" +msgstr "Envoyer" + +#~ msgid "Post:" +#~ msgstr "Contenu :" diff --git a/languages/languages.pot b/languages/languages.pot new file mode 100644 index 0000000..f9e68d9 --- /dev/null +++ b/languages/languages.pot @@ -0,0 +1,84 @@ +msgid "" +msgstr "" +"Project-Id-Version: BP Front End Post Editor\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-05-22 23:23+0100\n" +"PO-Revision-Date: 2014-05-22 23:24+0100\n" +"Last-Translator: Geoffrey \n" +"Language-Team: \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Generator: Poedit 1.6.4\n" +"X-Poedit-SearchPath-0: ..\n" +"X-Poedit-SearchPath-1: .\n" + +#: ../bp-simple-front-end-post.php:397 +msgid "The Security check failed!" +msgstr "The Security check failed!" + +#: ../bp-simple-front-end-post.php:417 +msgid "You are not authorized for the action!" +msgstr "You are not authorized for the action!" + +#: ../bp-simple-front-end-post.php:422 +msgid "Please make sure to fill the required fields" +msgstr "Please make sure to fill the required fields" + +#: ../bp-simple-front-end-post.php:545 +#, php-format +msgid "%s Saved as %s successfully." +msgstr "%s Saved as %s successfully." + +#: ../bp-simple-front-end-post.php:549 +#, php-format +msgid "There was a problem saving your %s. Please try again later." +msgstr "There was a problem saving your %s. Please try again later." + +#: ../bp-simple-front-end-post.php:795 +#, php-format +msgid "Select %s" +msgstr "Select %s" + +#: ../form.php:32 +msgid "Title" +msgstr "Title" + +#: ../form.php:37 +msgid "Post" +msgstr "Post" + +#: ../form.php:46 +msgid "Uploads" +msgstr "Uploads" + +#: ../form.php:62 +msgid "Featured Image" +msgstr "Featured Image" + +#: ../form.php:73 +msgid "Categories" +msgstr "Categories" + +#: ../form.php:83 +msgid "Extra info" +msgstr "Extra info" + +#: ../form.php:93 +msgid "Allow Comments" +msgstr "Allow Comments" + +#: ../form.php:102 +msgid "Yes" +msgstr "Yes" + +#: ../form.php:109 +msgid "Send post" +msgstr "Send post" + +#, fuzzy +#~ msgid "Post:" +#~ msgstr "Share the post" diff --git a/languages/readme.txt b/languages/readme.txt index 1fa2ac4..a45a59b 100644 --- a/languages/readme.txt +++ b/languages/readme.txt @@ -1,2 +1,2 @@ -Please use a language translator to translate the included languages.po file. I recommend poedit for the translations. +Please use a language translator to translate the included languages.pot file. I recommend poedit for the translations. Save the generated mo file as your_Local.mo, e.g (en_US.mo or fr_FR.mo) diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..3b07a88 --- /dev/null +++ b/readme.txt @@ -0,0 +1,51 @@ +=== BP Simple Front-end Post === +Contributors: Brajesh Singh, CreativeJuiz +Tags: buddypress, fron-end, post, guest, blogging +Requires at least: 3.3.1 +Tested up to: 3.9.1 +Stable tag: 1.2.0 +License: GPLv2 or Later +License URI: http://www.gnu.org/licenses/gpl-2.0.html + +Provides the ability to create unlimited post forms and allow users to save the post from front end.It is much powerful than it looks. + +== Description == +Provides the ability to create unlimited post forms and allow users to save the post from front end.It is much powerful than it looks. + +Available translation + +* English +* French (by [Geoffrey Crofte](http://creativejuiz.fr/)) + +**How to Use this plugin** + +If you want to create a form and show it on Front end, You will need to create and Register a form as follows. + +**Register a from on/before bp_init action using** +`$form= bp_new_simple_blog_post_form(\'form_name\',$settings); +// Please see @ bp_new_simple_blog_post_form for the settings options` + +Now, you can retrieve this form anywhere and render it as below + +`$form=bp_get_simple_blog_post_form(\'form_name\'); +if($form) +$form->show(); // shows this post form` + +== Installation == +1. Upload \"bp-simple-front-end-post\" zip content to the \"/wp-content/plugins/\" directory. +1. Activate the plugin through the \"Plugins\" menu in WordPress. +1. Follow the instruction in the readme.txt file + +== Frequently Asked Questions == += No FAQ for the moment = + +== Changelog == += 1.2.0 = +* HTML redesign for the front-end. More efficient and usefull classes. +* Some hooks allow you to edit HTML and classes generated +* New Translation files + += 1.1.3 = + +== Upgrade Notice == +*Nothing here* \ No newline at end of file From b5ff048a1e4cef28103203927eac8d927ced1b05 Mon Sep 17 00:00:00 2001 From: Geoffrey Date: Sun, 25 May 2014 19:28:42 +0200 Subject: [PATCH 2/2] Create README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c741293 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +bp-simple-front-end-post +======================== + +A simple front end posting plugin for BuddyPress/WordPress + +**How to Use this plugin** + +If you want to create a form and show it on Front end, You will need to create and Register a form as follows. + +**Register a from on/before bp_init action using** +`$form= bp_new_simple_blog_post_form(\'form_name\',$settings); +// Please see @ bp_new_simple_blog_post_form for the settings options` + +Now, you can retrieve this form anywhere and render it as below + +`$form=bp_get_simple_blog_post_form(\'form_name\'); +if($form) +$form->show(); // shows this post form`