Extension:DPLforum/el

This page is a translated version of the page Extension:DPLforum and the translation is 20% complete.
Εγχειρίδιο επεκτάσεων MediaWiki
DPLforum
Κατάσταση κυκλοφόρησης: σταθερή
Υλοποίηση Ετικέτα , Λειτουργία parser
Περιγραφή DynamicPageList -based forum software
Συγγραφέας(είς) Ross McClure
Τελευταία έκδοση 3.7.2 (2022-09-13)
MediaWiki 1.25+
Αλλαγές βάσης δεδομένων Όχι
Άδια Χρήσης GNU General Public License 2.0 ή νεότερη
Κατέβασμα
Παράδειγμα www.shoutwiki.com Uses Extension:InputBox
Quarterly downloads 7 (Ranked 133rd)
Public wikis using 5,794 (Ranked 39th)
Μεταφράστε την επέκταση DPLforum αν είναι διαθέσιμη στο translatewiki.net
Θέματα Ανοικτά καθήκοντα · Αναφορά σφάλματος

The DPLforum extension is adapted from DynamicPageList and displays forum-style layouts.

Νέες δυνατότητες στην έκδοση 3.0 περιλαμβάνουν αναφορές συγγραφών, κομψή εμφάνιση και πλήρες υποστήριξη πολλαπλών σελίδων. Η έκδοση 3.1 προσθέτει ταίριασμα προθεμάτος, για καλύτερη διαλειτουργικότητα με το InputBox

DPLforum also introduces a new namespace, Forum (and its talkspace); by default, the numeric index for this namespace is 110.

Εγκατάσταση

  • Κάντε λήψη και τοποθετήστε τα αρχεία σε έναν κατάλογο που ονομάζεται DPLforum στον φάκελο extensions/ σας.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/DPLforum
  • Προσθέστε τον παρακάτω κώδικα στο κάτω μέρος του $LocalSettings σας:
    wfLoadExtension( 'DPLforum' );
    
  •   Done – Πλοηγηθείτε στο Special:Version στο wiki για να βεβαιωθείτε ότι η επέκταση έχει εγκατασταθεί με επιτυχία.

Παράμετροι

DPLforum expects parameters in the form of a linebreak-separated list of assignments, as shown here.

<table><forum>
 category=CategoryName
 parameter1=value
 parameter2=value
 </forum></table>

Παράμετροι περιεχομένου

category={page} Προσθέτει μια κατηγορία στο σετ των κατηγοριών. Μόνο σελίδες που ανοίκου σε μια από αυτές τις κατηγορίες θα εμφανιστούν.
notcategory={page} Βάζει μια κατηγορία στο σετ των εξαιρέσεων. Σελίδες που Δεν είναι σε αυτές τις κατηγορίες θα εμφανιστούν
namespace={text} Specifies the namespace in which to search. Only one namespace may be specified.
prefix={text} Specifies a prefix to match in the title. Only pages whose titles begin with the specified prefix will be displayed. (Νέο στην έκδοση 3.1)
start={number} Εξαιρεί τα πρώτα αριθμός αποτελέσματα από την αναφορά.
count={number} Αναφέρει όχι περισσότερο από αριθμός αποτελέσματα. Currently limited up to 50 results, but the results aren't limited to 50 if this parameter is not specified.
title={page} If specified, this object becomes a forum-style link to the given page. Άλλοι παράμετρι ακόμα εφαρμόζονται

Structural parameters

mode Specifies the mode of output.
  • mode=table - Προεπιλογή. Displays each entry in a ‎<tr> block. ‎<table> tags are not included, so that each table may be given custom properties.
  • mode=list - Displays each entry in a ‎<li> block. As above, tags such as ‎<ol> or ‎<ul> are omitted.
  • mode=none - Only separates entries with a ‎<br>...‎</br> tag.
  • mode=count - Returns only the number of entries that match the given parameters. (Νέο στην έκδοση 3.2)
compact Allows for individual ‎<td> tags to be combined together where appropriate.
  • compact=author - Συνδυάζει τα Title και Author κελιά.
  • compact=editor - Συνδυάζει τα Edit και Editor κελιά.
  • compact=all - Συνδυάζει και τα δύο.
addcreationdate=true Displays each entry's date of creation.
addauthor=true Displays the original author of each entry.
addlasteditor=true Displays the last editor of each entry.
addlastedit=false Hides each entry's last edit time; shown by default.

Output parameters

ordermethod Specifies the order in which entries are listed.
  • ordermethod=lastedit - Προεπιλογή. Sorts entries by the last time they were edited.
  • ordermethod=created - Sorts entries by the time of their creation.
  • ordermethod=pageid - Sorts entries by their ID numbers; usually equivalent to created.
historylink Provides a link to each entry's history.
  • historylink=embed - Transforms the Edit field into a history link.
  • historylink=append - Appends the history link onto the Edit field.
omit={text} Omits the given text from the beginning of each entry's title.
order=ascending Αναστρέφει την σειρά τακτοποίησης.
newdays={number} Marks all links to entries modified less than number days ago with class="forum_new"; defaults to 7.
timestamp=false Removes timestamp values from the page links. Timestamps ensure that newly-edited entries don't appear as "visited" links.
cache=true Saves the results of this object to the parser cache. This is false by default unless DPLForum::requireCache is set to true.

<span id="Multipage_support_with_#forumlink">

The #forumlink parser function creates links to the present page which offset the forum listings by a certain amount. This allows each forum to contain any number of additional "pages". The syntax is as follows:

{{#forumlink:count|page|text}}
count represents the number of topics per page.
page specifies the page number, either as an absolute value or a relative offset.
text sets the link text. If this is left blank, the page number is used instead.

Relative offsets and page conditions

When specifying the page, if the number is preceded by + or -, then it is assumed to be a relative offset from the present position. Relative links which would link to pages less than 1 are not displayed.

You may also optionally specify a condition after the page number, which the page must meet in order to be displayed.

For example, to specify a link to the next page when that page is less than 10, use:

{{#forumlink:30|+1<10|Next page}}

A link to the previous page (assuming count=50):

{{#forumlink:50|-1>0|Previous page}}

In conjunction with ParserFunctions, a link to the next page, that won't be displayed when you reach the last page, would be (assuming count=50, only one category specified in category and notcategory is not used):

{{#forumlink:50|+1<{{#expr: ceil ({{PAGESINCATEGORY:{{PAGENAME}}|R}}/50) +1 }}|Next page}}

Conditions may use the <, <=, >, and >= operators.

Note: For multipage functionality to work correctly, the cache property must be set to false

Μηνύματα MediaWiki

DPLforum specifies six messages in the MediaWiki: namespace.

MediaWiki:Dplforum-by The word "by", followed by $1 (which is the name of a user)
MediaWiki:Dplforum-desc Show on Special:Version as the extension's description
MediaWiki:Dplforum-never Η λέξη "Ποτέ".
MediaWiki:Dplforum-edited "Τελευταία επεξεργάστηκε". Separates the title and edit when not in table mode.
MediaWiki:Dplforum-toofew Error message displayed when no categories are given.
MediaWiki:Dplforum-toomany Error message displayed when too many categories are given. This threshold is controlled by DPLForum::maxCategories.

Customization

Templates can be used to give a traditional forum appearance with user posts.

Example of usage

Create templates

To wrap your head around how this extension works, consider the different page areas that a forum usually has (header navigation/bread crumbs, forum index, page body, notices, search input, new topic buttons etc.). To create a standard forum appearance you need to create some templates to match these different parts:

  • Template:Forumheader
  • Template:Forumpage
  • Template:Forumheader/preload
  • Template:Forumnotice (optional: text you wish to appear on all the index and subtopic pages to warn users about conduct/rules etc.)

Template:Forumheader

This template can provide breadcrumb navigation for wayfinding and to help users easily return the forum index. In the Forumheader template, place something like the following:

<div class="forum-header">
'''Forums:''' {{#ifeq:{{PAGENAME}}|Index||[[Forum:Index|Index]] '''&rarr;'''}}
{{#if:{{#if:{{{1|}}}||1}}{{#ifeq:{{{1}}}|$1|1}}|{{PAGENAME}}|[[Forum:{{{1}}}|{{{1}}}]]}}
</div>{{#ifeq:{{NAMESPACE}}|{{ns:110}}|{{#if:{{{1|}}}|[[Category:{{{1}}}]]}}}}<noinclude>
</noinclude>

Template:Forumnotice

This template can provide a notice at the top of the Index and forum pages to remind users of forum rules, reminders, how-to's etc. In the Forumnotice template, place something like the following:

Please note (your text here). 

* '''Do not''' post ... (your text here)
* Individual topic threads can be put on your watchlist. 
* Enable email notifications in [[Special:Preferences|your preferences]].
* ''View [{{fullurl:Special:Recentchanges|namespace=110&limit=500}} recent changes for all topics in all forums]. Choose [{{fullurl:Special:Recentchanges|namespace=110&limit=500&days=14}} 14], [{{fullurl:Special:Recentchanges|namespace=110&limit=500&days=30}} 30], or [{{fullurl:Special:Recentchanges|namespace=110&limit=500&days=60}} 60] days for older changes.''
* ''You may have to [{{fullurl:{{FULLPAGENAME}}|action=purge}} purge] this page to see changes below.''

Template:Forumsearch

This template can be used with the InputBox extension to create a search form on the Forumpage template (to display on all forum pages). In this template, place something like the following:

<div class="inputbox-sidebar">
<inputbox>
type=fulltext
width=40
namespaces=Forum**,Help
searchbuttonlabel=Search
</inputbox>
</div><noinclude>[[Category:Forum templates]][[Category:Search templates]]</noinclude>

Template:Forumpage

This template can apply the same layout to all forum subtopic pages, including Forumheader, Forumnotice and the input forms used to easily search and create new topics. In this template, place something like the following:

{{Forumsearch}}
<div class="inputbox-sidebar">
<inputbox>
buttonlabel=Add new topic
prefix=Forum:
preload=Template:Forumheader/preload
preloadparams[]={{PAGENAME}}
type=create
width=40
</inputbox></div>
{{{1|}}}
{{Forumnotice}}
{| class="forum-table" style="clear: right; width: 100%"
! Topic !! Last edit
<forum>
namespace=Forum
category={{PAGENAME}}
shownamespace=false
addauthor=true
addlasteditor=true
historylink=true
compact=all
timestamp=true
cache=false
</forum>
|}

Template:Forumheader/preload

This template can be used to create text that appears at the top of the edit mode page of a newly created topic to help new/novice MediaWiki users. In this template, place something like the following:

{{Forumheader|$1}}
<!-- Write your message below these instructions (leave the instructions here) -->
<!-- At the end, please sign your message by placing 4 tilde characters in a row: ~~~~ -->
<!-- Replies are added below the post by adding one colon (:) for each indent level at the front of the reply -->
<noinclude>
[[Category:Forum templates]]
[[Category:Preload templates]]
</noinclude>

Create pages

After the templates are created, you may now put them to use in pages in the Forum namespace. Create the following pages (Index should be named the same as below but following pages may be adapted).

  • Forum:Index
  • Forum:General Discussion
  • Any other forum sections you would like.

Forum:Index page

This page serves as the forum landing page and index. Create the page and place something like the following:

{{DISPLAYTITLE:Wiki Forum}}
{{Forumheader}}
{{Forumsearch}}
Welcome to the (your site) forums! 
{{Forumnotice}}
{| class="forum-table" style="width: 100%;"
! Forum !! Last Edit
|-
<forum><!-- General Discussion Section -->
namespace=Forum
category=General Discussion
title=Forum:General Discussion
shownamespace=false
addauthor=true
addlasteditor=true
compact=all
timestamp=true
cache=false
</forum><!-- End General Discussion Section -->
<forum><!-- Editing Help Section -->
namespace=Forum
category=Editing Help
title=Forum:Editing Help
shownamespace=false
addauthor=true
addlasteditor=true
compact=all
timestamp=true
cache=false
</forum><!-- Editing Help Section -->
|}
[[Category:Forums]]

Forum:General Discussion (sub-topic) page

This page serves as the landing page for the General discussion section and lists all threads under this section. Create the page and place something like the following:

{{Forumheader}}
{{Forumpage|This is the place to discuss (your text here)...}}
<!-- Add any other info here -->
[[Category:Forums]]

Note: Include this type of code on any page created in the forum namespace to style it as a subtopic page.

Adding styles

The forum features can then be styled by adding styles in MediaWiki:Common.css (and adjusting as needed to suit your theme). The corresponding classes specified above are targeted and styled the below example:

/*---- DPL Forum ----*/
/* Forumheader style */
.forum-header {
	border: 1px solid #aaa; 
	background-color: #cedff2; 
	margin: 0 0 1em; 
	padding: 0 0.5em;
}
/* Forum table outside border */
table.forum-table {
	border: 1px solid lightgrey;
}
/* Forum table cell padding and borders for all table body cells */
table.forum-table > tbody > tr > td {
	border-top: 1px solid lightgrey;
	padding: 8px;
}
/* Forum table background color (show on odd rows) */
table.forum-table > tbody > tr {
	background-color:#fff;
}
/* Forum table background color (shows on even rows) */
table.forum-table > tbody > tr:nth-child(even) {
	background-color:#f5faff;
}
/* Forum table header row background, style and padding */
table.forum-table > tbody > tr > th {
	background-color:#cedff2;
	font-weight:bold;
	padding: 8px;
}

/*-- InputBox --*/
.inputbox-sidebar {
	width: 300px; 
	border: 1px solid lightgrey; 
	clear: right; 
	float: right; 
	margin: 3px; 
	padding:10px;
	margin-left: 2em;
}

Wiki που χρησιμοποιούν την επέκταση

See Extension:DPLforum - WikiApiary. Αναφέρει τα wiki που χρησιμοποιούν αυτήν την επέκταση.

The alphabetical links go directly to the main forum index. See Special:Version for each site to see what version of MediaWiki and DPLforum is being used. Special:SpecialPages is usually linked from the sidebar of most wikis (in the toolbox). You can go to Special:SpecialPages to find the link to "Version" which is Special:Version. Some links to forum template categories are also listed below.