diff --git a/README.md b/README.md index 28e1a11..7a0d166 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,48 @@ WP AdZonia - WordPress Ad Management Plugin ##WP AdZonia## -WordPress Ad Management Plugin
-Version 1.1
+WordPress Advertisement Manager Plugin
+Version 1.2
Developer: Mayeenul Islam (@mayeenulislam) -A simplest and easiest Ad management Plugin for WordPress sites, and most astonishingly - it's in WordPress way. You can call the advertisements into your template using a simple function: , or you can call the ad in anywhere using the shortcode: [wp-adzonia id="#"], or you can use the AdZonia widget into any widget-enabled area of your site. +A simplest and easiest Advertisement Manager Plugin for WordPress sites, and most astonishingly - it's in WordPress way. You can call the advertisements into your template using a simple function: , or you can call the ad in anywhere using the shortcode: [wp-adzonia id="#"], or you can use the AdZonia widget into any widget-enabled area of your site. ###Screenshots### WP AdZonia - List of advertisements -

List of advertisements

+

List of advertisements

WP AdZonia - Adding new advertisement -

Adding new advertisement

+

Adding new advertisement

###Credits### -Thanks to my plugin guru Ms. Tahmina Aktar for the appreciation and support from the very begining. -Thanks also to Shimul Islam, Tareq Hasan, Sisir Kanti Adhikari. And thanks also to Franz Josef Kaiser, Stephen Harris, Tom J Nowell, Andrey Savchenko (Rarst), and Thomas Scholz (Toscho) for their remote support and assistance. I won't ever forget their love. Thanks a lot and jazakALLAH +Thanks to my plugin guru Ms. Tahmina Aktar for the appreciation and support from the very beginning. +Thanks also to Shimul Islam, Tareq Hasan, Sisir Kanti Adhikari. And thanks also to Franz Josef Kaiser, Stephen Harris, Tom J Nowell, Andrey Savchenko (Rarst), and Thomas Scholz (Toscho) for their remote support and assistance. I won't ever forget their love and teaching. Thanks a lot and jazakALLAH ###Change Log### -####0.1#### -* Custom Table -* Media Uploader -* Different ad types - -####1.0### -* Discarded the custom table -* Custom Post Type (CPT) -* Custom Meta Fields -* Two ad types only -* Table Columns are added +####1.2#### +* Completely Translation-ready +* Bengali (Bangla) translations +* CSS improvements +* Settings Page +* Basic Instructions Manual +* Fallback jQuery installer +* Detailed instructions in Wiki +* Minor visual fixes * Reorganization of files +* Optional Front-end CSS ####1.1### * Incorporated AdZonia Widget * Minor visual fixes -* Reorganization of files \ No newline at end of file +* Reorganized files + +####1.0### +* Discarded the custom table +* Initiated Custom Post Type (CPT) +* Initiated Custom Meta Fields +* Two ad types only +* Table Columns are added and organized +* Reorganized files + +####0.1#### +* Custom Table +* Media Uploader +* Different ad types \ No newline at end of file diff --git a/assets/adzonia-icon.png b/assets/adzonia-icon.png new file mode 100644 index 0000000..9506bdd Binary files /dev/null and b/assets/adzonia-icon.png differ diff --git a/assets/languages/bn-BD.po b/assets/languages/bn-BD.po deleted file mode 100644 index a5e6546..0000000 --- a/assets/languages/bn-BD.po +++ /dev/null @@ -1,123 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: WP AdZonia\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-08-25 13:52+0600\n" -"PO-Revision-Date: 2014-08-25 13:53+0600\n" -"Last-Translator: Mayeenul Islam \n" -"Language-Team: nanodesigns \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e;_n;_x\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-Language: Bengali\n" -"X-Poedit-Country: BANGLADESH\n" -"X-Poedit-SearchPath-0: ..\n" - -#: ../wp-adzonia.php:123 -#: ../wp-adzonia.php:124 -#: ../wp-adzonia.php:134 -msgid "AdZonia" -msgstr "AdZonia" - -#: ../wp-adzonia.php:125 -msgid "Add New" -msgstr "নতুন যোগ" - -#: ../wp-adzonia.php:126 -msgid "Add New AdZonia" -msgstr "নতুন AdZonia যোগ" - -#: ../wp-adzonia.php:127 -msgid "Edit AdZonia" -msgstr "AdZonia সম্পাদনা" - -#: ../wp-adzonia.php:128 -msgid "New AdZonia" -msgstr "নতুন AdZonia" - -#: ../wp-adzonia.php:129 -msgid "View AdZonia" -msgstr "AdZonia দেখাও" - -#: ../wp-adzonia.php:130 -msgid "Search AdZonia" -msgstr "AdZonia অনুসন্ধান" - -#: ../wp-adzonia.php:131 -msgid "No AdZonia is created yet. Try making one first" -msgstr "কোনো AdZonia তৈরি করা হয়নি। আগে একটা তৈরি করা যাক" - -#: ../wp-adzonia.php:132 -msgid "No AdZonia found in Trash" -msgstr "ময়লার ঝুড়িতে কোনো AdZonia পাওয়া যায়নি" - -#: ../wp-adzonia.php:133 -msgid "Parent AdZonia:" -msgstr "শীর্ষ AdZonia:" - -#: ../wp-adzonia.php:176 -msgid "AdZonia Specification" -msgstr "AdZonia বৃত্তান্ত" - -#: ../wp-adzonia.php:191 -msgid "Ad Image" -msgstr "ছবি বিজ্ঞাপন" - -#: ../wp-adzonia.php:192 -msgid "Add an image if you wish to show an image ad (banner ad)" -msgstr "একটি ছবি যোগ করুন যদি আপনি ছবি বিজ্ঞাপন (ব্যানার বিজ্ঞাপন) দেখাতে চান" - -#: ../wp-adzonia.php:197 -msgid "Ad Code" -msgstr "কোড বিজ্ঞাপন" - -#: ../wp-adzonia.php:198 -msgid "If your ad is a Code-ad, then write down the code here, or paste it" -msgstr "যদি আপনি কোড বিজ্ঞাপন দিতে চান, তাহলে কোড এখানে লিখুন, কিংবা পেস্ট করুন" - -#: ../wp-adzonia.php:203 -msgid "End Date" -msgstr "শেষ তারিখ" - -#: ../wp-adzonia.php:204 -msgid "Choose a date until when the ad will be visible" -msgstr "যে তারিখ পর্যন্ত বিজ্ঞাপনটি দেখাতে চান, সেই তারিখটি বাছাই করুন" - -#: ../wp-adzonia.php:209 -msgid "Target URL" -msgstr "লক্ষ্য ইউআরএল" - -#: ../wp-adzonia.php:210 -msgid "Enter the URL, to where the ad will direct the viewer after clicking" -msgstr "বিজ্ঞাপনে ক্লিক করলে দর্শক যেখানে যাবে, সেই লিংকটি এখানে লিখুন" - -#: ../wp-adzonia.php:225 -msgid "" -"Either create an Image ad (), or a Code ad (). Mixure won't be counted, sorry.
\n" -" Please note: \"Target URL\" is applicable for Image Ad only." -msgstr "" -"হয় একটা ছবি বিজ্ঞাপন () যোগ করুন, নয়তো একটা কোড বিজ্ঞাপন () যোগ করুন। দুটোর মিশেল আসলে কাজে আসবে না, দুঃখিত।
\n" -" লক্ষ করুন: \"লক্ষ্য ইউআরএল\" শুধুমাত্র ছবি বিজ্ঞাপন-এর ক্ষেত্রে প্রযোজ্য।" - -#: ../wp-adzonia.php:378 -msgid "ID" -msgstr "আইডি" - -#: ../wp-adzonia.php:379 -msgid "Preview" -msgstr "প্রাকদর্শন" - -#: ../wp-adzonia.php:381 -msgid "Until" -msgstr "পর্যন্ত" - -#: ../wp-adzonia.php:382 -msgid "Shortcode" -msgstr "শর্টকোড" - -#: ../wp-adzonia.php:469 -msgid "AdZonia ad " -msgstr "AdZonia বিজ্ঞাপন" - diff --git a/css/admin-style.css b/css/admin-style.css index b8c09a2..8bfc813 100644 --- a/css/admin-style.css +++ b/css/admin-style.css @@ -1,121 +1 @@ -/** LESS CSS MIXINS -* Collected by: Mayeenul Islam (@mayeenulislam) -* For: nanodesigns (http://nanodesignsbd.com) -* -* From: various sources -*/ -/* Variables for em / rem use */ -/* LESS MIXINS - FOR COMMON USE */ -/* Border Radius Simple */ -/* Border Radius Custom */ -/* Box Shadow */ -/* Transition */ -/* Transform */ -/* Linear Gradient */ -/* Quick Gradient */ -/* Webkit Reflection */ -/* Complementary Color Scheme */ -/* Mixin */ -/* Implementation -.one {color: @base;} -.two {color: @complement1;} -.three {color: @complement2;} -.four {color: @lighten1;} -.five {color: @lighten2;} */ -/* Subtle Color Scheme */ -/* Mixin */ -/* Implementation -.one {color: @base;} -.two {color: @lighter1;} -.three {color: @lighter2;} -.four {color: @darker1;} -.five {color: @darker2;} *//*--------------------- -* Common CSS -* ---------------------*/ -.text-center { - text-align: center; -} -.dead { - color: grey; -} -.required, -.ad-inactive { - color: #dd3d36; -} -.ad-active { - color: darkgreen; -} -.hide-me { - display: none; -} -.show-block { - display: block !important; -} -/*--------------------- -* Plugin CSS -* ---------------------*/ -.row:before, -.row:after { - content: ""; - display: table; -} -.row:after { - clear: both; -} -#adz-meta-table td { - vertical-align: top; -} -.adz-meta-div .p-icon { - font-size: 0.8125rem; - vertical-align: sub; -} -.adz-label-td, -.adz-info-td { - min-width: 150px; - font-size: 0.8125rem; -} -.adz-info-td input[type='text'], -.adz-info-td textarea { - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - -o-border-radius: 5px; - -khtml-border-radius: 5px; - border-radius: 5px; - width: 100%; -} -.adz-info-td input[type='text']#wpadz_ad_image { - width: 83%; - margin-right: 1%; -} -.adz-info-td textarea#wpadz_ad_code { - font-family: "Courier New", monospace; -} -.adz-tooltip-icon { - font-size: 1.125rem; - color: #999; - position: relative; - cursor: pointer; -} -.adz-tooltip-icon:hover { - color: #555; -} -.adz-tooltip-icon:hover:after { - content: attr(data-tooltip); - position: absolute; - background-color: rgba(0, 0, 0, 0.6); - color: #fff; - padding: 10px; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -o-border-radius: 10px; - -khtml-border-radius: 10px; - border-radius: 10px; - z-index: 9999; - white-space: normal; - width: 160px; - top: -5px; - left: 20px; - font-family: "Open Sans", sans-serif; - font-size: 0.8125rem; - line-height: 1.2; -} +.text-center{text-align:center}.dead{color:grey}.required,.ad-inactive{color:#dd3d36}.row:before,.row:after{content:"";display:table}.row:after{clear:both}#adz-meta-table td{vertical-align:top}.adz-meta-div .p-icon{font-size:.8125rem;vertical-align:sub}.adz-label-td,.adz-info-td{min-width:150px;font-size:.8125rem}.adz-info-td input[type='text'],.adz-info-td textarea{-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;-khtml-border-radius:5px;border-radius:5px;width:100%}.adz-info-td input[type='text']#wpadz_ad_image{width:83%;margin-right:1%}.adz-info-td textarea#wpadz_ad_code{font-family:Consolas,Monaco,monospace}#adzonia-info{background:#f3f3f3}body.post-type-adzonia.post-new-php #postexcerpt.postbox{background:#f3f3f3}.adz-tooltip-icon{font-size:1.125rem;color:#999;position:relative;cursor:pointer}.adz-tooltip-icon:hover{color:#555}.adz-tooltip-icon:hover:after{content:attr(data-tooltip);position:absolute;background-color:rgba(0,0,0,0.6);color:#fff;padding:10px;-webkit-border-radius:10px;-moz-border-radius:10px;-o-border-radius:10px;-khtml-border-radius:10px;border-radius:10px;z-index:9999;white-space:normal;width:160px;top:-5px;left:20px;font-family:"Open Sans",sans-serif;font-size:.8125rem;line-height:1.2} \ No newline at end of file diff --git a/css/admin-style.less b/css/admin-style.less index 5dc4454..fd6c2a7 100644 --- a/css/admin-style.less +++ b/css/admin-style.less @@ -1,4 +1,4 @@ -@import "dev/lessmixins.less"; +@import "../dev/lessmixins.less"; /*--------------------- * Common CSS @@ -17,18 +17,6 @@ color: #dd3d36; } -.ad-active{ - color: darkgreen; -} - -.hide-me{ - display: none; -} - -.show-block{ - display: block !important; -} - /*--------------------- * Plugin CSS * ---------------------*/ @@ -75,7 +63,17 @@ } textarea#wpadz_ad_code{ - font-family: "Courier New", monospace; + font-family: Consolas, Monaco, monospace; + } +} + +#adzonia-info{ + background: #f3f3f3; +} + +body.post-type-adzonia.post-new-php{ + #postexcerpt.postbox{ + background: #f3f3f3; } } diff --git a/dev/Direction-for-developers.txt b/dev/Direction-for-developers.txt index 7697943..f75ae7a 100644 --- a/dev/Direction-for-developers.txt +++ b/dev/Direction-for-developers.txt @@ -1,14 +1,14 @@ -Copy/Cut the following files to the theme's root folder, and start developing yourself: +NO NEED TO COPY the following files: -- style.less -- print-style.less +- lessmixins.less -NO NEED TO COPY the following file: -- lessmixins.less +- adzonia-scripts.js (after changes just minify it and replace the js/adzonia-scripts.min.js) nanodesigns + Dhaka + nanodesignsbd.com \ No newline at end of file diff --git a/dev/adzonia-scripts.js b/dev/adzonia-scripts.js index 2ea4b01..1b0102f 100644 --- a/dev/adzonia-scripts.js +++ b/dev/adzonia-scripts.js @@ -24,7 +24,7 @@ jQuery(function($){ //extend the wp.media object adzonia_uploader = wp.media.frames.file_frame = wp.media( { - title:"Choose Image", + title:"Choose Ad Image", button:{ text: "Choose Image" }, diff --git a/images/adzonia-icon.png b/images/adzonia-icon.png deleted file mode 100644 index 91227cc..0000000 Binary files a/images/adzonia-icon.png and /dev/null differ diff --git a/js/adzonia-scripts.min.js b/js/adzonia-scripts.min.js index 8c3f47e..db301ff 100644 --- a/js/adzonia-scripts.min.js +++ b/js/adzonia-scripts.min.js @@ -1 +1 @@ -jQuery(function(e){e("#wpadz_end_date").datetimepicker();var t;e("#nano-ad-image").click(function(n){n.preventDefault();if(t){t.open();return}t=wp.media.frames.file_frame=wp.media({title:"Choose Image",button:{text:"Choose Image"},multiple:false});t.on("select",function(){attachment=t.state().get("selection").first().toJSON();e("#wpadz_ad_image").val(attachment.url)});t.open()})}) \ No newline at end of file +jQuery(function(e){e("#wpadz_end_date").datetimepicker();var t;e("#nano-ad-image").click(function(n){n.preventDefault();if(t){t.open();return}t=wp.media.frames.file_frame=wp.media({title:"Choose Ad Image",button:{text:"Choose Image"},multiple:false});t.on("select",function(){attachment=t.state().get("selection").first().toJSON();e("#wpadz_ad_image").val(attachment.url)});t.open()})}) \ No newline at end of file diff --git a/languages/wp-adzonia-bn_BD.po b/languages/wp-adzonia-bn_BD.po new file mode 100644 index 0000000..7f34a3f --- /dev/null +++ b/languages/wp-adzonia-bn_BD.po @@ -0,0 +1,253 @@ +msgid "" +msgstr "" +"Project-Id-Version: WP AdZonia\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-09-20 14:21+0600\n" +"PO-Revision-Date: 2014-09-20 14:21+0600\n" +"Last-Translator: Mayeenul Islam \n" +"Language-Team: nanodesigns \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e;_n;_x\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-Language: Bengali\n" +"X-Poedit-Country: BANGLADESH\n" +"X-Poedit-SearchPath-0: ..\n" + +#: ../wp-adzonia.php:53 +#: ../wp-adzonia.php:66 +msgid "Settings & Instructions" +msgstr "সেটিং ও নির্দেশনা" + +#: ../wp-adzonia.php:54 +msgid "Settings-Instructions" +msgstr "সেটিং-নির্দেশনা" + +#: ../wp-adzonia.php:92 +msgid " Settings" +msgstr " সেটিং" + +#: ../wp-adzonia.php:98 +msgid "AdZonia CSS" +msgstr "AdZonia সিএসএস" + +#: ../wp-adzonia.php:106 +msgid " Troubleshoot" +msgstr " সমস্যা-সমাধান" + +#: ../wp-adzonia.php:112 +msgid "AdZonia jQuery" +msgstr "AdZonia জেকুয়েরি" + +#: ../wp-adzonia.php:123 +msgid "

Set these optional settings if you want. It's not mandatory, and even without the settings your advertisements will work just fine.

" +msgstr "

এই ঐচ্ছিক সেটিংগুলো আপনি চাইলে সেট করে নিতে পারেন। এগুলো বাধ্যতামূলক নয়, এমনকি এই সেটিংগুলো ছাড়াও আপনার বিজ্ঞাপন দারুণ কাজ করবে।

" + +#: ../wp-adzonia.php:128 +msgid "check the box to load AdZonia CSS into the site's front-end" +msgstr "ওয়েবসাইটের ফ্রন্ট-এন্ডে AdZonia সিএসএস লোড করতে টিকচিহ্ন দিন" + +#: ../wp-adzonia.php:133 +msgid "

Getting trouble using the plugin? If the date picker and/or image uploader is not working, try enabling the jQuery from the plugin resources.

" +msgstr "

প্লাগইনটি ব্যবহার করতে সমস্যা হচ্ছে? যদি তারিখ বাছাইকারী এবং/অথবা ছবি আপলোডার কাজ না করে, তাহলে প্লাগইন থেকে জেকুয়েরি লোড করে দেখতে পারেন।

" + +#: ../wp-adzonia.php:138 +msgid "Load jQuery from plugin" +msgstr "প্লাগইন থেকে জেকুয়েরি লোড করুন" + +#: ../wp-adzonia.php:239 +#: ../wp-adzonia.php:240 +#: ../wp-adzonia.php:250 +#: ../wp-adzonia.php:595 +msgid "AdZonia" +msgstr "AdZonia" + +#: ../wp-adzonia.php:241 +#: ../wp-adzonia.php:244 +msgid "New AdZonia" +msgstr "নতুন AdZonia" + +#: ../wp-adzonia.php:242 +msgid "Add New AdZonia" +msgstr "নতুন AdZonia যোগ" + +#: ../wp-adzonia.php:243 +msgid "Edit AdZonia" +msgstr "AdZonia সম্পাদনা" + +#: ../wp-adzonia.php:245 +msgid "View AdZonia" +msgstr "AdZonia দেখাও" + +#: ../wp-adzonia.php:246 +msgid "Search AdZonia" +msgstr "AdZonia অনুসন্ধান" + +#: ../wp-adzonia.php:247 +msgid "No AdZonia is created yet. Try making one first" +msgstr "কোনো AdZonia তৈরি করা হয়নি। আগে একটা তৈরি করা যাক" + +#: ../wp-adzonia.php:248 +msgid "No AdZonia found in Trash" +msgstr "ময়লার ঝুড়িতে কোনো AdZonia পাওয়া যায়নি" + +#: ../wp-adzonia.php:249 +msgid "Parent AdZonia:" +msgstr "শীর্ষ AdZonia:" + +#: ../wp-adzonia.php:291 +msgid "AdZonia Specification" +msgstr "AdZonia বৃত্তান্ত" + +#: ../wp-adzonia.php:306 +msgid "Ad Image" +msgstr "ছবি বিজ্ঞাপন" + +#: ../wp-adzonia.php:307 +msgid "Add an image if you wish to show an image ad" +msgstr "একটি ছবি যোগ করুন যদি আপনি ছবি বিজ্ঞাপন (ব্যানার বিজ্ঞাপন) দেখাতে চান" + +#: ../wp-adzonia.php:312 +msgid "Ad Code" +msgstr "কোড বিজ্ঞাপন" + +#: ../wp-adzonia.php:313 +msgid "If your ad is a Code-ad, then write down the code here" +msgstr "যদি আপনি কোড বিজ্ঞাপন দিতে চান, তাহলে কোড এখানে লিখুন, কিংবা পেস্ট করুন" + +#: ../wp-adzonia.php:318 +msgid "End Date" +msgstr "শেষ তারিখ" + +#: ../wp-adzonia.php:319 +msgid "Choose a date until when the ad will be visible" +msgstr "যে তারিখ পর্যন্ত বিজ্ঞাপনটি দেখাতে চান, সেই তারিখটি বাছাই করুন" + +#: ../wp-adzonia.php:324 +msgid "Target URL" +msgstr "লক্ষ্য ইউআরএল" + +#: ../wp-adzonia.php:325 +msgid "Enter the URL, to where the ad will direct the viewer after clicking" +msgstr "বিজ্ঞাপনে ক্লিক করলে দর্শক যেখানে যাবে, সেই লিংকটি এখানে লিখুন" + +#: ../wp-adzonia.php:340 +msgid "Either create an Image ad (), or a Code ad (). Mixure won't be counted, sorry." +msgstr "" +"হয় একটা ছবি বিজ্ঞাপন () যোগ করুন, নয়তো একটা কোড বিজ্ঞাপন () যোগ করুন। দুটোর মিশেল আসলে কাজে আসবে না, দুঃখিত।
\n" +" লক্ষ করুন: \"লক্ষ্য ইউআরএল\" শুধুমাত্র ছবি বিজ্ঞাপন-এর ক্ষেত্রে প্রযোজ্য।" + +#: ../wp-adzonia.php:464 +msgid "ID" +msgstr "আইডি" + +#: ../wp-adzonia.php:465 +msgid "Preview" +msgstr "প্রাকদর্শন" + +#: ../wp-adzonia.php:467 +msgid "Until" +msgstr "পর্যন্ত" + +#: ../wp-adzonia.php:468 +msgid "Shortcode" +msgstr "শর্টকোড" + +#: ../wp-adzonia.php:538 +msgid "AdZonia ad " +msgstr "AdZonia বিজ্ঞাপন" + +#: ../wp-adzonia.php:596 +msgid "AdZonia widget to call the advertisement easily." +msgstr "সহজে বিজ্ঞাপন দেখাতে AdZonia উইজেট ব্যবহার করুন।" + +#: ../wp-adzonia.php:626 +msgid "Title:" +msgstr "শিরোনাম:" + +#: ../wp-adzonia.php:630 +msgid "Advertisements:" +msgstr "বিজ্ঞাপনসমূহ:" + +#: ../wp-adzonia.php:632 +msgid "Choose one..." +msgstr "বেছে নিন..." + +#: ../manual/inner-manual.php:1 +msgid "Instructions" +msgstr "নির্দেশনা" + +#: ../manual/inner-manual.php:2 +msgid "Advertisements added using AdZonia, can be displayed in 3 alternative ways —" +msgstr "AdZonia ব্যবহার করে যোগ করা বিজ্ঞাপন ৩টি আলাদা পদ্ধতিতে দেখানো যেতে পারে —" + +#: ../manual/inner-manual.php:4 +msgid "Shortcode — The simplest is using a shortcode. The shortcode is that simple, just put [wp-adzonia id=\"#\"] into the body of any post or page or shortcode enabled widget. Just add the ID of the ad into the hash (#)." +msgstr "শর্টকোড — সহজতম পদ্ধতি হলো শর্টকোড ব্যবহার করা। শর্টকোড এতোটাই সহজ যে, শুধু [wp-adzonia id=\"#\"] লেখাটি যেকোনো পোস্ট কিংবা পাতা কিংবা শর্টকোড চালু আছে এমন উইজেটে বসিয়ে দিলেই হবে। শুধু বিজ্ঞাপনটির আইডি হ্যাশ-এর (#) স্থলে বসিয়ে নিন।" + +#: ../manual/inner-manual.php:5 +msgid "Widget — Using the AdZonia widget into any widget enabled area or sidebar. Just drag and drop the \"AdZonia\" widget into the sidebar, and choose the active (published) ad from the list." +msgstr "উইজেট — AdZonia উইজেটটি যেকোনো উইজেট-সক্রীয় অংশে কিংবা সাইডবারে ব্যবহার করতে পারেন। \"AdZonia\" উইজেটটি শুধু টেনে নিয়ে সাইডবারে ছেড়ে দিলেই হলো, তারপর তালিকা থেকে সক্রীয় (প্রকাশিত) বিজ্ঞাপনটি বাছাই করে নিলেই হবে।" + +#: ../manual/inner-manual.php:6 +msgid "PHP Code — If you are a developer and want to use the PHP code into your template (theme) directly, just use this: <?php if ( function_exists( "show_adzonia" ) ) show_adzonia( # ); ?>. Just add the ID of the ad into the hash (#)." +msgstr "পিএইচপি কোড — যদি আপনি ডেভলপার হোন আর আপনার টেমপ্লেটে (থীম) সরাসরি পিএইচপি কোড বসাতে চান, তাহলে এটি ব্যবহার করুন: <?php if ( function_exists( "show_adzonia" ) ) show_adzonia( # ); ?>। শুধু বিজ্ঞাপনটির আইডি হ্যাশ-এর (#) স্থলে বসিয়ে নিন।" + +#: ../manual/inner-manual.php:8 +msgid "For more detailed instructions see our AdZonia GitHub manual. To reduce the plugin size we shifted the manual there." +msgstr "আরো বিস্তারিত নির্দেশনার জন্য গিটহাবে আমাদের AdZonia নির্দেশনাপুস্তক দেখুন। প্লাগইনের আকার ছোট রাখতে আমরা নির্দেশনাবলী সেখানে সরিয়ে নিয়েছি।" + +#~ msgid "" +#~ "

Add new advertisement

Add new advertisement from \"Add new\" sub " +#~ "menu." +#~ msgstr "" +#~ "

নতুন বিজ্ঞাপন যোগ

\"নতুন AdZonia\" সাব মেনু থেকে নতুন বিজ্ঞাপন যোগ করুন।" + +#~ msgid "" +#~ "

All advertisements

See all the added advertisements in the " +#~ "\"AdZonia\" sub menu. To see the excerpt to be informed about the " +#~ "advertisement, use the list UI mode icon on the right to switch to the " +#~ "Excerpt mode." +#~ msgstr "" +#~ "

All advertisements

See all the added advertisements in the " +#~ "\"AdZonia\" sub menu. To see the excerpt to be informed about the " +#~ "advertisement, use the list UI mode icon on the right to switch to the " +#~ "Excerpt mode." + +#~ msgid "" +#~ "

Image ad

To add an image ad, upload the image using the image " +#~ "uploader. If the image uploader is not working, then upload the image " +#~ "using WordPress media upload, and copy & paste the image URL here. Put a " +#~ "Target URL if you want the ad to be linked to somewhere" +#~ msgstr "" +#~ "

ছবি বিজ্ঞাপন

ছবি বিজ্ঞাপন যোগ করতে ছবি আপলোডার ব্যবহার করে ছবি যোগ " +#~ "করুন। যদি ছবি আপলোডার কাজ না করে, তাহলে ওয়ার্ডপ্রেসের মিডিয়া আপলোড ব্যবহার " +#~ "করে ছবি আপলোড করুন, তারপর ছবির ইউআরএল কপি করে এখানে পেস্ট করুন। বিজ্ঞাপনটি " +#~ "কোথাও লিংক করতে চাইলে লক্ষ্য ইউআরএল যোগ করুন" + +#~ msgid "" +#~ "

All advertisements

See all the added advertisements in the " +#~ "\"AdZonia\" sub menu." +#~ msgstr "

সকল বিজ্ঞাপন

যোগ করা সকল বিজ্ঞাপন দেখুন \"AdZonia\" সাব মেনুতে।" + +#~ msgid "Add New" +#~ msgstr "নতুন যোগ করুন" + +#~ msgid "Settings" +#~ msgstr "সেটিংসমূহ" + +#~ msgid "AdZonia JavaScripts" +#~ msgstr "AdZonia জাভাস্ক্রিপ্ট" + +#~ msgid "Load in Header" +#~ msgstr "হেডারে লোড করুন" + +#~ msgid "Load in Footer" +#~ msgstr "ফুটারে লোড করুন" + +#~ msgid "Don't Load" +#~ msgstr "না, লোড করো না" + +#~ msgid "AdZonia Settingss" +#~ msgstr "AdZonia সেটিংসমূহু" diff --git a/manual/inner-manual.php b/manual/inner-manual.php new file mode 100644 index 0000000..3bb3479 --- /dev/null +++ b/manual/inner-manual.php @@ -0,0 +1,8 @@ +

+

+
    +
  • Shortcode — The simplest is using a shortcode. The shortcode is that simple, just put [wp-adzonia id="#"] into the body of any post or page or shortcode enabled widget. Just add the ID of the ad into the hash (#).', 'wp-adzonia' ); ?>
  • +
  • Widget — Using the AdZonia widget into any widget enabled area or sidebar. Just drag and drop the "AdZonia" widget into the sidebar, and choose the active (published) ad from the list.', 'wp-adzonia' ); ?>
  • +
  • PHP Code — If you are a developer and want to use the PHP code into your template (theme) directly, just use this: <?php if ( function_exists( "show_adzonia" ) ) show_adzonia( # ); ?>. Just add the ID of the ad into the hash (#).', 'wp-adzonia' ); ?>
  • +
+

AdZonia GitHub manual. To reduce the plugin size we shifted the manual there.', 'wp-adzonia' ); ?>

\ No newline at end of file diff --git a/uninstall.php b/uninstall.php index 36053c8..61c617a 100644 --- a/uninstall.php +++ b/uninstall.php @@ -12,7 +12,7 @@ // To delete options from options table -//delete_option('post_type_rules_flased_adzonia'); +delete_option('adzonia_options'); $adz_args = array( 'post_type' => 'adzonia', diff --git a/wp-adzonia.php b/wp-adzonia.php index ce4cf6e..88f1ccc 100644 --- a/wp-adzonia.php +++ b/wp-adzonia.php @@ -2,10 +2,10 @@ /** * Plugin Name: WP AdZonia * Plugin URI: http://nanodesignsbd.com - * Description: A simpler and easier Ad management Plugin for WordPress sites, and most astonishing - it's in WordPress way - * Version: 1.1 + * Description: A simpler and easier advertisement manager plugin for WordPress sites, and most astonishingly - it's in WordPress way. Read the instructions (AdZonia » Settings-Instructions). + * Version: 1.2 * Author: Mayeenul Islam (@mayeenulislam) - * Author URI: http://nishachor.com + * Author URI: http://nanodesignsbd.com/mayeenulislam * License: GNU General Public License v2.0 * License URI: http://www.gnu.org/licenses/gpl-2.0.html */ @@ -34,7 +34,132 @@ /** * MAKE PLUGIN TRANSLATION-READY * -----------------------------------------------------*/ -load_plugin_textdomain( 'wp-adzonia', FALSE, 'wp-adzonia/assets/languages' ); +function adzonia_load_textdomain() { + load_plugin_textdomain( 'wp-adzonia', FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); +} + +add_action( 'init', 'adzonia_load_textdomain', 1 ); + + + +/** +* Add Settings sub menu +* thankfully with the assistance of Mark Otto +* Source: http://ottopress.com/2009/wordpress-settings-api-tutorial/ +*/ +function adzonia_settings_page() { + add_submenu_page( + 'edit.php?post_type=adzonia', //$parent_slug + __('Settings & Instructions', 'wp-adzonia' ), //$page_title + __('Settings-Instructions', 'wp-adzonia' ), //$menu_title + 'manage_options', //$capability + 'adzonia-settings', //$menu_slug + 'adzonia_settings_page_callback' //callback function + ); +} + +add_action('admin_menu', 'adzonia_settings_page'); + +function adzonia_settings_page_callback() { + ?> +
+

+ +
+ + + +
+ + + +
+ Settings', 'wp-adzonia' ), // Name* + 'adzonia_gen_section_callback', // Callback* + 'adzonia_settings' // Page on which to add this section of options* + ); + add_settings_field( + 'adzonia_css', // ID* + __( 'AdZonia CSS', 'wp-adzonia' ), // Title* + 'adzonia_setting_css_field', // Callback Function* + 'adzonia_settings', // Page (Plugin)* + 'adzonia_general' // Section + ); + + add_settings_section( + 'adzonia_troubleshoot', // ID/Slug* + __( ' Troubleshoot', 'wp-adzonia' ), // Name* + 'adzonia_tr_section_callback', // Callback* + 'adzonia_settings' // Page on which to add this section of options* + ); + add_settings_field( + 'adzonia_jquery', // ID* + __( 'AdZonia jQuery', 'wp-adzonia' ), // Title* + 'adzonia_setting_jquery_field', // Callback Function* + 'adzonia_settings', // Page (Plugin)* + 'adzonia_troubleshoot' // Section + ); +} + +add_action( 'admin_init', 'adzonia_options_init' ); + +// General Section +function adzonia_gen_section_callback() { + _e('

Set these optional settings if you want. It\'s not mandatory, and even without the settings your advertisements will work just fine.

', 'wp-adzonia'); +} + +function adzonia_setting_css_field() { + $options = get_option('adzonia_options'); + echo " "; +} + +// Troubleshoot Section +function adzonia_tr_section_callback() { + _e('

Getting trouble using the plugin? If the date picker and/or image uploader is not working, try enabling the jQuery from the plugin resources.

', 'wp-adzonia'); +} + +function adzonia_setting_jquery_field() { + $options = get_option('adzonia_options'); + echo " "; +} + +// validate our options +function adzonia_options_validate( $input ) { + $options = get_option('adzonia_options'); + + //CSS Checkbox + $css_check_val = (int) $input['adzonia_css_check'] === 1 ? (int) $input['adzonia_css_check'] : ''; + $options['adzonia_css_check'] = is_int( $css_check_val ); + + //jQuery Checkbox + $jquery_check_val = (int) $input['adzonia_jquery_check'] === 1 ? (int) $input['adzonia_jquery_check'] : ''; + $options['adzonia_jquery_check'] = is_int( $jquery_check_val ); + + return $options; +} + + + +/** +* Get the back end options +* -----------------------------------------------------*/ +$get_options = get_option('adzonia_options'); + @@ -43,7 +168,6 @@ * - For Admin styling. * - For Front-end styling. * -----------------------------------------------------*/ - function adzonia_css() { wp_enqueue_style( 'adzonia-admin-style', plugins_url('css/admin-style.css', __FILE__) ); wp_enqueue_style( 'datepicker-style', plugins_url('css/jquery.datetimepicker.css', __FILE__) ); @@ -51,11 +175,13 @@ function adzonia_css() { add_action( 'admin_enqueue_scripts', 'adzonia_css' ); -function adzonia_output_css() { - wp_enqueue_style( 'adzonia-output-style', plugins_url('css/output.css', __FILE__) ); -} +if( $get_options['adzonia_css_check'] === true ) { + function adzonia_output_css() { + wp_enqueue_style( 'adzonia-output-style', plugins_url('css/output.css', __FILE__) ); + } -add_action( 'wp_enqueue_scripts', 'adzonia_output_css' ); + add_action( 'wp_enqueue_scripts', 'adzonia_output_css' ); +} @@ -64,19 +190,24 @@ function adzonia_output_css() { * ENQUEUE NECESSARY SCRIPTS * Custom post type to get the advertisement information in WordPress way. * -----------------------------------------------------*/ - function adzonia_admin_scripts() { $screen = get_current_screen(); if( $screen->post_type === 'adzonia' && $screen->base == 'post' ) { - //wp_enqueue_script( 'jquery-lib-scripts', plugins_url('/js/jquery-1.11.1.min.js', __FILE__) ); - wp_enqueue_script( 'jquery' ); + if( $get_options['adzonia_jquery_check'] === true ) { + //fallback, if the default jQuery isn't loading properly + wp_enqueue_script( 'jquery-lib-scripts', plugins_url('/js/jquery-1.11.1.min.js', __FILE__) ); + } else { + //default jQuery from WordPress + wp_enqueue_script( 'jquery' ); + } + wp_enqueue_script( 'datepicker-js', plugins_url('/js/jquery.datetimepicker.js', __FILE__), '', '', true ); wp_enqueue_script( 'adzonia', plugins_url( '/js/adzonia-scripts.min.js', __FILE__ ), '', '', true ); - if(function_exists('wp_enqueue_media')) { + if( function_exists('wp_enqueue_media') ) { wp_enqueue_media(); } else { @@ -92,16 +223,6 @@ function adzonia_admin_scripts() { add_action('admin_enqueue_scripts', 'adzonia_admin_scripts'); -function media_uploader() { - global $post_type; - if( 'adzonia' == $post_type) { - - } -} - -add_action('admin_enqueue_scripts', 'media_uploader'); - - /** @@ -110,16 +231,15 @@ function media_uploader() { * Custom post type to get the advertisement information * in WordPress way * -----------------------------------------------------*/ - function register_cpt_adzonia() { $labels = array( 'name' => _x( 'AdZonia', 'wp-adzonia' ), 'singular_name' => _x( 'AdZonia', 'wp-adzonia' ), - 'add_new' => _x( 'Add New', 'wp-adzonia' ), - 'add_new_item' => _x( 'Add New AdZonia', 'wp-adzonia' ), + 'add_new' => _x( 'New AdZonia', 'AdZonia', 'wp-adzonia' ), + 'add_new_item' => _x( 'Add New AdZonia', 'AdZonia', 'wp-adzonia' ), 'edit_item' => _x( 'Edit AdZonia', 'wp-adzonia' ), - 'new_item' => _x( 'New AdZonia', 'wp-adzonia' ), + 'new_item' => _x( 'New AdZonia', 'AdZonia', 'wp-adzonia' ), 'view_item' => _x( 'View AdZonia', 'wp-adzonia' ), 'search_items' => _x( 'Search AdZonia', 'wp-adzonia' ), 'not_found' => _x( 'No AdZonia is created yet. Try making one first', 'wp-adzonia' ), @@ -137,7 +257,7 @@ function register_cpt_adzonia() { 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 25, - 'menu_icon' => plugins_url('/images/adzonia-icon.png', __FILE__), + 'menu_icon' => plugins_url('/assets/adzonia-icon.png', __FILE__), 'show_in_nav_menus' => false, 'publicly_queryable' => true, 'exclude_from_search' => true, @@ -162,15 +282,14 @@ function register_cpt_adzonia() { * AdZonia Metabox * Product specification. * -----------------------------------------------------*/ - function adzonia_specifications_meta_box() { add_meta_box( - 'adzonia-info', // metabox ID - __('AdZonia Specification', 'wp-adzonia'), // metabox title - 'adzonia_specifications_specifics', // callback function - 'adzonia', // post type (+ CPT) - 'normal', // 'normal', 'advanced', or 'side' - 'high' // 'high', 'core', 'default' or 'low' + 'adzonia-info', // metabox ID + __('AdZonia Specification', 'wp-adzonia'), // metabox title + 'adzonia_specifications_specifics', // callback function + 'adzonia', // post type (+ CPT) + 'normal', // 'normal', 'advanced', or 'side' + 'high' // 'high', 'core', 'default' or 'low' ); } @@ -181,26 +300,26 @@ function adzonia_specifications_meta_box() { $prefix = 'wpadz_'; $adzonia_meta_fields = array( array( - 'label'=> 'Ad Image', - 'desc' => 'Add an image if you wish to show an image ad', + 'label'=> __('Ad Image', 'wp-adzonia'), + 'desc' => __('Add an image if you wish to show an image ad', 'wp-adzonia'), 'id' => $prefix.'ad_image', 'type' => 'ad_image' ), array( - 'label'=> 'Ad Code', - 'desc' => 'If your ad is a Code-ad, then write down the code here', + 'label'=> __('Ad Code', 'wp-adzonia'), + 'desc' => __('If your ad is a Code-ad, then write down the code here', 'wp-adzonia'), 'id' => $prefix.'ad_code', 'type' => 'ad_code' ), array( - 'label'=> 'End Date', - 'desc' => 'Choose a date until when the ad will be visible', + 'label'=> __('End Date', 'wp-adzonia'), + 'desc' => __('Choose a date until when the ad will be visible', 'wp-adzonia'), 'id' => $prefix.'end_date', 'type' => 'end_date' ), array( - 'label'=> 'Target URL', - 'desc' => 'Enter the URL, to where the ad will direct the viewer after clicking', + 'label'=> __('Target URL', 'wp-adzonia'), + 'desc' => __('Enter the URL, to where the ad will direct the viewer after clicking', 'wp-adzonia'), 'id' => $prefix.'target_url', 'type' => 'target_url' ) @@ -254,7 +373,7 @@ function adzonia_specifications_specifics() { echo '
'; echo ''; echo ''; - echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -331,7 +450,6 @@ function remove_yoast_metabox_adzonia(){ /** * ADD COLUMNS TO AdZonia LIST TABLE * -----------------------------------------------------*/ - function set_custom_adzonia_columns( $columns ) { //Insert columns after 'title' $index = array_search( "title", array_keys( $columns ) ); @@ -371,7 +489,7 @@ function custom_adzonia_column( $column, $post_id ) { case 'until' : $to_date = get_post_meta( $post_id , 'wpadz_end_date' , true ); - echo mysql2date( 'Y/m/j', $to_date) . '
' . mysql2date( 'g:i A', $to_date); + echo mysql2date( 'Y/m/d', $to_date) . '
' . mysql2date( 'g:i A', $to_date); break; case 'adz_shortcode' : @@ -390,7 +508,6 @@ function custom_adzonia_column( $column, $post_id ) { * SHOW AdZonia * @param (int) $ad_id. Would be the post ID. * -----------------------------------------------------*/ - function show_adzonia( $ad_id ) { $ad = get_post( $ad_id ); @@ -435,7 +552,6 @@ function show_adzonia( $ad_id ) { * Usage: * [wp-adzonia id="#"] * -----------------------------------------------------*/ - function adzonia_shortcode( $atts ) { $atts = shortcode_atts( array( @@ -464,7 +580,6 @@ function adzonia_shortcode( $atts ) { * AdZonia Widget * adding a widget to add ad to the widget areas easily * -----------------------------------------------------*/ - class adzonia_widget extends WP_Widget { function __construct() {