Jump to content

Colorare i nomi degli utenti nei topic


najaru

Recommended Posts

È possibile colorare i nomi degli utenti in base al colore dei gruppi a cui appartengono (da un post di Mat (FDNZ))

 

Admin CP > Look and Feel > [Your Skin Here] > Edit Templates & CSS > Topic View > topicViewTemplate
 

e trovare

 

 

<span class="author vcard"><a class="url fn" href='{parse url="showuser={$post['author']['member_id']}" base="public" template="showuser" seotitle="{$post['author']['members_seo_name']}"}'>{$post['author']['members_display_name']}</a>{parse template="user_popup" group="global" params="$post['author']['member_id'], $post['author']['members_seo_name']"}</span>
 

E sostituire con:

 

 

<span class="author vcard"><a class="url fn" href='{parse url="showuser={$post['author']['member_id']}" base="public" template="showuser" seotitle="{$post['author']['members_seo_name']}"}'>{IPSLib::makeNameFormatted($post['author']['members_display_name'],$post['author']['member_group_id'])}</a>{parse template="user_popup" group="global" params="$post['author']['member_id'], $post['author']['members_seo_name']"}</span>
Edited by Skillman_92
Link to post
Share on other sites
  • 10 months later...

no no no, lascia perdere questo tutorial.

tu vuoi colorare i nomi dei gruppi utenti?

Oddio, mi spaventi °_° Sì, vorrei fare come nel mio forum: i gruppi sono colorati, e quando postano in un topic il loro nick è colorato. Non si può?

Link to post
Share on other sites
  • 1 year later...

da rivedere l'altro tutorial... riporto di seguito il contenuto

 

Per formattare i nomi utenti nei topic è possibile aprire il file admin/applications/forums/modules_public/forum/topics.php

e cambiare questo
$poster['_members_display_name'] = "<a href='{$this->settings['_base_url']}showuser={$poster['member_id']}'>{$poster['members_display_name_short']}</a>";


 

con questo
 
 
 

$poster['members_display_name'] = IPSLib::makeNameFormatted( $poster['members_display_name'], $poster['member_group_id'] );

Link to post
Share on other sites
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. to insert a cookie message.