Home › Forum › Problemi Vari con WP › è possibile inserire un articolo scritto da più autori?
-
AutorePost
-
-
7 Dicembre 2011 alle 8:12 #19967fabioc82Partecipante
Salve, volevo sapere se e come è possibile inserire un articolo realizzato da più autori.
Immagino che essi (quali AUTORI) nn possano editare un articolo ed associarlo a più utenti, ma io come ADMIN posso farlo dal backend?
Grazie.
-
7 Dicembre 2011 alle 9:44 #90425SteveAglAmministratore del forum
DI base no ma vi sono plugin per assegnare articoli a più autori tipo:
-
9 Dicembre 2011 alle 8:57 #90476fabioc82Partecipante
Grazie SteveAgl, sono riuscito ad inserire i co-autori con il suddetto plugin ma… sulla visualizzazione dell’autore posta al di sopra dell’articolo stesso mi compare SOLO il nome del primo autore…
sapresti aiutarmi?
grazie.
-
9 Dicembre 2011 alle 9:07 #90477wollyAmministratore del forum
punto 4 delle istruzioni.
Place the appropriate coauthors template tags in your template.
qui tutti i tag http://wordpress.org/extend/plugins/co-authors-plus/other_notes/
-
9 Dicembre 2011 alle 9:25 #90478fabioc82Partecipante
Ciao Wolly… scusa ma nel punto 4 “get coauthors” descrive la funzione che a quanto leggo restituisce una matrice di coautori e imposta l’ordine di visualizzazione… ma non trovo cosa devo modificare per rendere visibile TUTTI i nomi dei coautori..
esmpio… questo articolo di prova su un mio blog… Autori: adminteam e Valentino….. come potrai vedere però viene fuori soltanto UN AUTORE… che cosa mi consigli di fare?
-
9 Dicembre 2011 alle 9:27 #90479wollyAmministratore del forum
ma hai letto il mio link?
Hai letto le istruzioni allegate al plugin?
-
9 Dicembre 2011 alle 10:00 #90480fabioc82Partecipante
…ho letto… ma fondamentalmente nn ho capito esattamente cosa devo fare…
– istanziare la classe ‘CoAuthorsIterator’ ma in quale file?
scusami tanto, ma leggendo le istruzioni vedo alcune modifiche da apportare, ma nn capisco dove si trovino le istruzioni in questione..
grazie ancora.
-
9 Dicembre 2011 alle 10:08 #90481wollyAmministratore del forum
Basic Usage and Other Notes
Contributor-level and above can be added as co-authors. An option added as of 2.0 allows subscribers to be added as coauthors as well.
As per WordPress design, only Editor-level and above users can change Post Authors. Authors cannot change authors or add co-authors (yet).
As per WordPress design, when an editor creates a new Post or Page, they are by default added as an author. However, they can be replaced by clicking on their name and typing in the name of the new author.
The search-as-you-type box starts searching once two letters have been added, and executes a new search with every subsequent letter.
The search-as-you-type box searches through the following user fields: a) user login; b) user nicename; c) display name; d) user email; e) first name; f) last name; and g) nickname.
Template Tags
New template tags enable listing of co-authors:
coauthors()
coauthors_posts_links()
coauthors_firstnames()
coauthors_lastnames()
coauthors_nicknames()
coauthors_links()
coauthors_IDs()
These template tags correspond to their “the_author*” equivalents; take special note of the pluralization. Each of these template tags accept four optional arguments:
between: default “, “
betweenLast: default ” and “
before: default “”
after: default “”
To use them, simply modify the code surrounding all instances of the_author*() to something like the following example:
if(function_exists(‘coauthors_posts_links’))
coauthors_posts_links();
else
the_author_posts_link();
The result of this would be formatted like “John Smith, Jane Doe and Joe Public”.
Note that as of this writing, WordPress does provide a means of extending wp_list_authors(), so included in this plugin is the function coauthors_wp_list_authors() modified to take into account co-authored posts; the same arguments are accepted.
Sometimes you may need fine-grained control over the display of a posts’s authors, and in this case you may use the CoAuthorsIterator class. This class may be instantiated anywhere you may place the_author() or everywhere if the post ID is provided to the constructor. The instantiated class has the following methods:
iterate(): advances $authordata to the next co-author; returns false and restores the original $authordata if there are no more authors to iterate.
get_position(): returns the zero-based index of the current author; returns -1 if the iterator is invalid.
is_last(): returns true if the current author is the last.
is_first(): returns true if the current author is the first.
count(): returns the total number of authors.
get_all(): returns an array of all of the authors’ user data.
For example:
$i = new CoAuthorsIterator();
print $i->count() == 1 ? ‘Author: ‘ : ‘Authors: ‘;
$i->iterate();
the_author();
while($i->iterate()){
print $i->is_last() ? ‘ and ‘ : ‘, ‘;
the_author();
}
the coauthor meta
get_the_coauthor_meta( $field ) (2.8 only)
the_coauthor_meta( $field ) (2.8 only)
Note: The $field variable corresponds with the same values accepted by the the author meta function.
get coauthors
get_coauthors( [$post_id], [$args] )
This function returns an array of coauthors for the specified post, or if used inside the Loop, the current post active in the Loop. the $args parameter is an array that allows you to specify the order in which the authors should be returned.
is coauthor for post
is_coauthor_for_post( $user, $post_id )
This function allows you to check whether the specified user is coauthor for a post. The $user attribute can be the user ID or username.
Download Version 2.5.3
Requires WordPress Version: 3.0 or higher
Compatible up to: 3.2.1
Last Updated: 2011-8-14 Downloads: 17,314
Average Rating
(36 ratings)
My Rating
FYI
Other Versions »
Donate to this plugin »
Forums Posts
Development Log
Compatibility
WordPress
+ Plugin
=
Not enough data
0 people say it works.
0 people say it’s broken.
My vote for this combination
BrokenWorks
-
9 Dicembre 2011 alle 10:32 #90485fabioc82Partecipante
… si… avevo già letto tutto l’articolo… rileggerlo qui nel post nn mi cambia nulla…
leggo e intendo gli argomenti, i parametri ecc.. ma proprio nn capisco DOVE andare a impostare/modificare/scrivere tutto ciò…
Scusa se la mia perplessità può essere pedante…
grazie…
-
9 Dicembre 2011 alle 10:36 #90488wollyAmministratore del forum
devi modificare i template tags enl tema, dove? boh dipende dai temi e da come sono stati realizzati.
Se non sai modificar eun tema comincia a studiarti dissezione di un tema nel nostro wiki.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.