Newscoop 4.0 - Author object
  • How it is made?
    I need to get "about me" text and image url.
    $gimme->author->picture->imageurl
    and $gimme->author->biography->text does not seem to work








    Post edited by Micz Flor at 2012-01-25 03:55:47
  • 3 Comments sorted by
  • Vote Up1Vote Down Micz FlorMicz Flor
    Posts: 184Administrator
    here are some code snippets from tageswoche.ch. possibly these might help?

    if you find any good solutions, please add them to our templating wiki. with a subheader: Newscoop Version 4.0 and don't delete the old ones.
    https://wiki.sourcefabric.org/display/NsLingo/Author


    {{ list_article_authors }}
    {{ if $gimme->current_list->at_beginning }}by {{ /if }}
    {{ if $gimme->current_list->at_end }}{{ if $gimme->current_list->index > 1 }} and {{ /if }}
    {{ else }}
    {{ if $gimme->current_list->index > 1 }}, {{ /if }}
    {{ /if }}
    {{ $gimme->author->name }}
    {{ if $gimme->current_list->at_end }} {{ /if }}
    {{ /list_article_authors }}


    {{* ARTICLE AUTHORS *}}
    {{ list_article_authors }}
    {{ if $gimme->current_list->at_beginning }}
                        <article>
                            <header>
                                    <p>Autoren</p>
                            </header>
                            <ul class="people-list">
    {{ /if }}                                            
                              <li>
                                {{ if $gimme->author->user->defined }}
                                <h3><a href="{{ $view->url(['username' => $gimme->author->user->uname], 'user') }}">{{ $gimme->author->name }}</a> ({{ $gimme->author->type }})</h3>
                                {{ else }}
                                <h3><a href="#">{{ $gimme->author->name }}</a> ({{ $gimme->author->type }})</h3>
                                {{ /if }}
                                <figure>
                                        {{ if $gimme->author->picture->imageurl }}<img src="{{ $gimme->author->picture->imageurl }}" alt="Portrait {{ $gimme->author->name }}" width=60/>{{ /if }}
                                </figure>
                                <p>{{ $gimme->author->biography->text|strip_tags }} {{ if $gimme->author->user->defined }}<a href="{{ $view->url(['username' => $gimme->author->user->uname], 'user') }}">Alle&nbsp;Artikel&nbsp;und&nbsp;mehr&nbsp;zur&nbsp;Person</a>{{ /if }}</p>
                              </li>
    {{ if $gimme->current_list->at_end }}
                            </ul>
                        </article>
    {{ /if }}                    
    {{ /list_article_authors }}
    Post edited by Micz Flor at 2012-01-25 03:58:11
  • Vote Up0Vote Down Jakub GórnickiJakub Górnicki
    Posts: 134Member, Administrator, Sourcefabric Team
    Tomek did you try to attach some images or is the message badly formatted?
  • solved. 
    I did attached picture and about me text but only in "manage users" section. Now I did the same in Manage Authors and it works fine.