
內容簡介
ent Pro for developers who want to customize the plugin.
注意 - 版本 2.0 對於 Ninja Announcements 來說是一個重大的飛躍。如果您還沒有更新到此版本,請務必更新。
如果您從較早的版本升級,我們建議您在安裝本版前停用並刪除舊版本。
從版本 2.0 開始,Ninja Announcements 完全支援本地化。如果您有興趣將 Ninja Announcements 翻譯成非英語語言,請訪問 wpninjas.net,讓我們知道,以便在未來版本中加入。
Ninja Announcements 外掛顯示頁面和文章中小段落的文字和/或圖像/視頻。通常用於讓您的訪客知道一些特別的事情。它們可以設定,僅在指定日期/時間之間和/或一週中的某些天顯示。例如,如果您想祝大家聖誕快樂,但您不想在 12 月 20 日之前顯示消息,您可以安排在 12 月 20 日開始,並在 12 月 26 日結束的公告。訪問您網站的訪客將在這些日期之間看到公告,但否則您的網站將保持不變。
與所有 WP Ninjas 外掛一樣,我們已盡力保持代碼的簡潔和不侵入性。為此,所有的公告都是通過 WordPress 內置的 Rich Text Editor 進行編輯的。這意味著 Ninja Announcements 不必包含其自己的 TinyMCE 版本。此外,您還可以從 WordPress 媒體庫或 YouTube 中包含圖像和視頻,因此您不必為您的公告創建或維護獨立的媒體庫。
您的每個公告都有自己的位置和排程設置,允許您將公告放在任何時間和任何地方,甚至顯示為小工具,而不需要觸碰代碼,甚至沒有短碼!
Ninja Announcements 的管理部分使添加和編輯公告非常容易。舊公告不會自動刪除,而僅會停用,以便以後進行編輯。當然,如果您希望刪除它們,也可以這樣做。
Ninja Announcements Lite 的功能:
* 使用多個公告,每個公告都有其自己的設置。
* 通過一致的類和 ID 標籤,使用 CSS 样式化公告非常簡單。
* 選擇三種不同的公告放置方式:頁首、小工具或手動(功能)[不需要短碼]。
* 按日期、日期和/或小時安排通告,以便它們僅在特定時間段內顯示。
* 使用與 WordPress 帖子相同的 Rich Text Editor 編輯公告。
* 從 WordPress 媒體庫中插入圖像或視頻,就像您將帖子插入一樣。
* 由於它使用內置的 WordPress rich text editor 和媒體庫,因此它佔用很小的空間。
* 選擇是否允許用戶關閉公告。
升級到 Ninja Announcements Pro 將解鎖以下功能:
* 在文章或頁面上顯示您的公告,甚至將它們附加到特定的頁面、帖子或類別。
* 通過設置所需的包裹元素來控制 Ninja Announcements 的 HTML 輸出。
* 限制使用者角色顯示公告,例如僅向已登錄或未登錄的人顯示公告。僅向編輯、訂閱者、管理員等人顯示您的公告。
* 使用新的“公告組”功能顯示隨機公告。
* 設置當用户點擊“關閉”後公告保持關閉的時間。
* 包含針對開發人員的鉤子和過濾器的文件,以自定義插件。
外掛標籤
開發者團隊
原文外掛簡介
Notice – Version 2.0 represents a huge leap forward for Ninja Announcements. If you have not already, please update to this version.
If you are upgrading from an earlier version of Ninja Announcements, we recommend that you deactivate the previous version and delete
it before installing this version.
As of Version 2.0, Ninja Announcements fully supports localization. If you are interesting in translating Ninja Announcements
into a non-English language, please visit wpninjas.net and let us know so that we can include it in future versions.
The Ninja Announcements plugin displays small portions of text and/or images/video on pages and posts. Generally, these
are used to let your visitors know about something special. They can be scheduled so that they are only displayed
between specified dates/times and/or on certain days of the week. For Example, if you wanted to wish everyone a Merry Christmas, but you didn’t want
to display the message until the 20th of December, you could schedule an announcement to begin on December 20 and
end on December 26. A visitor coming to your site would see the announcement between those dates, but otherwise your
site would look just the same.
As with all WP Ninjas plugins, we have tried to keep our code as simple and unobtrusive as possible. To this end, all
annoucements are edited via the built-in WordPress Rich Text Editor. This means that Ninja Announcements doesn’t have
to include its own version of TinyMCE. Moreover, you can also include images and videos from your WordPress media
library or YouTube, so you don’t have to create or maintain a separate media library for your announcements.
Each of your announcements has its own location and scheduling settings, allowing you to place the announcement
exactly when and where you want it, even display it as a widget. All this without touching code, even shortcodes!
The administration section of Ninja Announcements makes it very easy to add and edit announcements. Older announcements
are not automatically deleted, but simply deactivated so that they can be edited later. Of course, these can just be deleted if you want.
Features of Ninja Announcements Lite:
* Use multiple announcements, each with its own settings.
* Consistent class and id tags make styling your announcements through CSS simple.
* Choose from three different announcement placements: Header, Widget or Manual (Function) [No shortcodes required].
* Schedule announcements by date, day and/or hour so that they only show for a certain time period.
* Edit announcements using the same rich text editor as a WordPress post.
* Insert images or videos into announcements from your WordPress Media Library, just like you would a post.
* Since it uses the built-in WordPress rich text editor and media gallery, it has a small footprint.
* Choose wether or not users are able to close the announcement.
Upgrading to Ninja Announcements Pro unlocks the following features:
* Show your announcements on posts or pages, even attach them to specific pages, posts or categories.
* Control the HTML output of Ninja Announcements by setting which wrapper elements it should use.
* Restrict announcement display by user role. i.e. Show announcements only to people who are logged in or those who are not logged in. Display your announcement only to editors, subscribers, administrators etc.
* Show random announcements by using the new "Announcement Group" functionality.
* Set the length of time announcements stay closed after a user has clicked "closed".
* Documentation regarding hooks and filters included in Ninja Announcements Pro.
Use
The default position for all announcements is at the top of your blog, before any of your images or text. If you don’t assign a location to
an announcement, this is where it will show up. If you don’t want to put the announcement there, you have two other options: sidebar or manual.
If you select “Sidebar (Widget)” from the location list, the announcement will appear as a widget underneath your “Appearance->Widgets”
admin section. You can then place the widget anywhere in your sidebar that you would like.
The third location option, “Manual (Function)”, is for more advanced WordPress users. This option gives you a php function
to call within your template file. The function will show the desired announcement wherever you place the code within your template.
As each announcement has its own, slightly different, function, you’ll have to set the location to “Manual (Function)” and
save your changes before you are given the php code.
(To see examples and screenshots of each of these uses, please visit http://wpninjas.net)
Advanced Styling
As you can see from the screenshots in the section above, the default and manual locations come with a default style applied to them.
These styles are located in the ninja_annc/css/ninja_annc_display.css file. If you would like to overwrite these default styles, you can do
so by styling the id of the container div. This div will always have an id of: ninja_annc_3 where 3 is the id of the announcement you want to style.
This id number can be found at the top of each announcement’s edit page. We highly recommend that you change this in your own stylesheet,
as future versions of this plugin will likely overwrite the display css file.
For a more detailed explaination of styling your announcements and the close button, please visit: http://wpninjas.net
Help / Bugs
Notice – This plugin has not been tested with any version of WordPress prior to 3.0. If you have trouble installing it on a
previous version, please keep this in mind. If you do have a working install of Ninja Announcements on an older version
of WordPress, we’d love to hear about it. Drop by the forums at http://plugins.wpninjas.net and let us know.
If you need help installing or getting things working with Ninja Announcements, visit our forums at http://plugins.wpninjas.net. The
forums are also where we take bug reports and feature requests.
Requested Features
We are contemplating adding many features to future versions of the Ninja Announcements plugin. This is a non-exhaustive list:
* Announcement previews
* Multiple widget announcements
* Multi-site network activation
If you have any requests, please drop by the forums at http://wpninjas.net and tell us about them.
