Jimako-e107-plugins / e107-old-plugins

Just backup
4 stars 4 forks source link

User Journals plugin #6

Open Jimmi08 opened 4 years ago

Jimmi08 commented 4 years ago

Contents
1 Details 2 User Pages 2.1 Bloggers Page 2.2 Blog List Page 2.3 Blog Page 2.4 Categories 3 User Menus 3.1 Blogs 3.2 Blog Categories 3.3 My Blogs 4 Admin Pages 4.1 Preferences 4.2 Categories 4.3 Convert Comments 4.4 Read Me 5 Templating

Details A multi-user Online Journal (A.K.A. blog).

Current version 0.8 Available from e107 Coders Author bugrain (updated from v0.4 by Del Rudolph) Requirements e107 0.7.x, The e107 Helper Project v0.7b or later Bug reports Please post bug reports and request new features at bugrain's bugtracker Notes may work on e107 0.617x but is untested Features:

Users can write their own online blogs Blogs can be assigned to one or more defined categories Blogs can be viewed by user, category or all Individual bloggers can be listed Bloggerscan include their own 'synopsis' RSS feeds for blogs Bug reports and feature request can be posted at bugrain's bugtracker.

User Pages There are several pages that User Journals provides. They all have the same URL /userjournals.php, the different views are determined by URL parameters. All of the views are accessed from links either on the main page or on one of the menus.

Note: due to the fact that Online User Journals are commonly known as Blogs, the word Blog is used in preference to anything else in the standard installation of this plugin.

Note: the descriptions of the various pages are based on the default template. Other templates may yield different layouts for pages.

Bloggers Page This is the default page and lists each blogger, their last posting date and a link to a list of their blogs. Bloggers are listed with the most recent blogger at the top.

Blog List Page Lists each blog for a specific blogger or category (depending on the link clicked to get here), most recent blog at the top.

If the blogger has entered a synopsis, this is shown at the top of the page.

Blog Page Displays a specific blog.

If enabled (by the site admin) comments can be posted and the blog can be rated.

Categories A list of all available categories.

Note: this is a new feature and enhancements are planned to show date of last blog and number of blogs on this page.

User Menus There are three menus that can be enable for user Journals - Blogs, Blog Categories and My Blogs.

Blogs This menu provides links to the All Blogs and the All Bloggers pages.

In addition, there is a link to each bloggers page with the date of their last blog. This list is ordered with the most recent blogger first.

Blog Categories This menu shows alink to the Categories page and the blog list page for each available category.

Note: there is an admin option to show this information in the Blog menu instead.

My Blogs This menu will only be displayed to users that are allowed to write blogs.

It provides links to view their Blogs List page, write a new blog and add/update their synopsis.

It also shows their last few published and last few unpublished blogs. The exact number is determined by preference settings.

Admin Pages

Preferences Activate: determines if User journals is active or not. When not, no pages/menus will be displayed, no matter what the other settings are set to. Page Title: The page title (or prefix when the page title is extened with more inofrmation) to be used on all User Journals pages (AKA captaion). Menu Title: Title to be used for the Blogs menu. The My Blogs menu uses too. Category Menu Title: Title to be used for the Blog Categories menu. Writers: User class of users who are allowed to write blogs. Readers: User class of users who are allowed to read blogs. Allow Comments: User class of usrs who are allowed to post comments against a blog. Allow Ratings: User class of usrs who are allowed to rate blogs. Menu Subject Length: The length that blog subject lines will be truncated too when displayed in blog menus. Preview Text Length: The length blogs will be truncated to when displayed on a blog list page. Numnber Of Recent Entries: The number of published and unpublished blogs to display on the Blog Writers menu. Number of bloggers listed in Bloggers menu: Limits the number of bloggers (with a link to their most recent blog) that are listed in the Bloggers menu, setting this value to 0 (zero) means that there is no limit so every blogger that has at least one blog will be listed. Show RSS Feeds: When seleced, RSS feed links will be displayed on the Readers menu. Show Now Playing: Show the Now Playing field. Show Categories: Determines if categories are displayed in menus and, if they are, which menu. Template: The template to be used for displaying blogs. Show Mood: Show the mood drop down list when writing a blog.

Categories This page allows the admin to add, update and delete categories that blogs can be associated with.

Note: at this time, it is possible to delete a category that has blogs assinged to it. There is no dabase interity check at this time, However, no adverse affects have been reported when this happens.

Convert Comments This option will convert comments made with a pre v0.4 version of User Journals.

It only needs to be run once and it will remove the comments from the User Journals database table and move them to the standard e107 comments table.

If there are no comments to convert, a message will indicate this. Otherwsie a button will be displayed that can be clicked to start the conversion.

Read Me General information about User journals.

Templating User Journals v0.7 (and above) provides the option for the installer to customize page layouts using templates. The templating system used follows the standard e107 templating approach which relies on shortcodes. You should have some basic knowledge of templates and shortcodes (see other articles on this wiki) to understand how to write a template for User Journals.

The advantage of using custom templates is that these templates will not be overwritten when plugin upgrades take place.

If you have a template you would like including with the next User journals release, please contact the plugin author.

The template to be used is selected from the User journals preferences page. The list of available templates is populated from (a) the plugins templates folder and (b) a folder named userjournals_menu within the current site's theme folder. Note if you allow users to select their own theme then you will need to provide a template in every available theme's folder if you choose a template from the current theme.

To create a new template, simply copy an existing template file or start a new one, saving it to the appropriate folder (plugin or theme) as described above.

Jimmi08 commented 4 years ago

User Journals - Shortcodes

Contents 1 Overview 2 Shortcode Parameters 3 Blog Related Shortcodes 3.1 UJ_BLOG_BLOGGER_LINK 3.2 UJ_BLOG_CATEGORIES 3.3 UJ_BLOG_COMMENTS 3.4 UJ_BLOG_DATE 3.5 UJ_BLOG_DELETE_LINK 3.6 UJ_BLOG_EDIT_LINK 3.7 UJ_BLOG_ENTRY 3.8 UJ_BLOG_ENTRY_SHORT 3.9 UJ_BLOG_LINK 3.10 UJ_BLOG_MOOD 3.11 UJ_BLOG_NOW_PLAYING 3.12 UJ_BLOG_RATINGS 3.13 UJ_BLOG_SUBJECT 4 Blogger Related Shortcodes 4.1 UJ_BLOGGER_LINK 4.2 UJ_BLOGGER_NAME 4.3 UJ_BLOGGER_PICTURE 4.4 UJ_BLOGGER_SYNOPSIS 4.5 UJ_BLOGGER_TIMESTAMP 5 Blog Category Related Shortcodes 5.1 UJ_CATEGORY_ICON 5.2 UJ_CATEGORY_LINK 5.3 UJ_CATEGORY_LIST 5.4 UJ_CATEGORY_LIST_HEADING 5.5 UJ_CATEGORY_START/UJ_CATEGORY_END 6 Menu Specific Shortcodes 6.1 UJ_BLOGGER_MENU_LINK 6.2 UJ_CATEGORY_MENU_LINK 6.3 UJ_MENU_READER_BLOGGERS 6.4 UJ_MENU_READER_CATEGORIES 6.5 UJ_MENU_WRITER_OPTIONS 6.6 UJ_MENU_WRITER_RECENT 6.7 UJ_MENU_WRITER_UNPUBLISHED 7 Miscellaneous Shortcodes 7.1 UJ_MESSAGE 7.2 UJ_MESSAGE_EXTRA 7.3 UJ_RSS 7.4 UJ_RSS_1 7.5 UJ_RSS_2 7.6 UJ_RSS_3

Overview This page details the shortcodes used by the User Journals plugin.

Shortcode Parameters Shortcode parameters are passed to the shortcode using name/value pairs.

Each pair is seperated by & and name/values are seperated by =. If a parameter does not require a value, e.g. it switches something on or off, then just omit the value part.

Code: Shortcode parameter syntax // Single parameter, no value {UJ_BLOG_DATE=param1}

// Single parameter with value {UJ_BLOG_DATE=param1=value1}

// Multiple parameters, param1 has no value {UJ_BLOG_DATE=param1&param2=value2}

Blog Related Shortcodes

UJ_BLOG_BLOGGER_LINK A link to the list of blogs for the writer of the current blog

UJ_BLOG_CATEGORIES A list of categories (each one is a link to a categories page) for the current blog

Parameters:

label - show a label when the date is displayed

UJ_BLOG_COMMENTS Comments for the current blog - uses e107 comments system (also depends on User Journals preferences)

UJ_BLOG_DATE The current blog date

Parameters:

label - show a label when the date is displayed

UJ_BLOG_DELETE_LINK A link to delete the current blog (wil lonly be shown if the blog belongs to the current user or the current user is a site admin)

UJ_BLOG_EDIT_LINK A link to allow editing of the current blog (will only be shown if the blog belongs to the current user)

UJ_BLOG_ENTRY The blog text

UJ_BLOG_ENTRY_SHORT The blog text, truncated to the length specified in User journals preferences

UJ_BLOG_LINK A link to a blog

UJ_BLOG_MOOD The image for the mood of the current blog

UJ_BLOG_NOW_PLAYING The current blog Now Playing text

Parameters:

label - show a label when the date is displayed

UJ_BLOG_RATINGS Ratings for the current blog - uses e107 ratings so if not rated by current user will also display an option to allow the blog to be rated (also depends on User Journals preferences)

UJ_BLOG_SUBJECT The current blog subject

Blogger Related Shortcodes

UJ_BLOGGER_LINK A link to the the blogs list for a blogger

UJ_BLOGGER_NAME The name of the blogger for the current blog

UJ_BLOGGER_PICTURE The bloggers picture (actually USER_PICTURE shortcode) if allowed by site preferences and available.

UJ_BLOGGER_SYNOPSIS The text of the current bloggers synopsis

UJ_BLOGGER_TIMESTAMP The date/time of the current bloggers last blog

Blog Category Related Shortcodes

UJ_CATEGORY_ICON The defined icon for a category

UJ_CATEGORY_LINK A link to a specific category list page

UJ_CATEGORY_LIST A list of categories

UJ_CATEGORY_LIST_HEADING Text for heading the categories list

UJ_CATEGORY_START/UJ_CATEGORY_END Wrappers for a category

Menu Specific Shortcodes

UJ_BLOGGER_MENU_LINK A link to the the blogs list for a blogger when displayed in a menu

UJ_CATEGORY_MENU_LINK A link to a specific category list page when displayed on a menu

UJ_MENU_READER_BLOGGERS Wrapper for a list of bloggers on the menu displayed for users that are allowed to read blogs

UJ_MENU_READER_CATEGORIES Wrapper for a list of categories on the menu displayed for users that are allowed to read blogs

UJ_MENU_WRITER_OPTIONS Wrapper for Options section of the menu displayed for blog writers

UJ_MENU_WRITER_RECENT Wrapper for the Recent Entries section of the menu displayed for blog writers

UJ_MENU_WRITER_UNPUBLISHED Wrapper for Unpublished section of the menu displayed for blog writers

Miscellaneous Shortcodes

UJ_MESSAGE Messages displayed to user, for example, after database insert, update or failure.

UJ_MESSAGE_EXTRA Additional text, usually only displayed on database failure

UJ_RSS Wrapper for RSS links

UJ_RSS_1 RSS 1 link

UJ_RSS_2 RSS 2 link

UJ_RSS_3 RSS RDF link