Jump to content

(TB) Group Format


teraßyte

Recommended Posts

  • Replies 186
  • Created
  • Last Reply

Greatfull for this also been waiting a full year because could not used it with the file edits,now i'm loving IPS more and more :grin:




It's been really a pain to remove all file/skin edits but now I should be able to update/support it a lot more better than in the past thanks to it.
Link to comment
Share on other sites

I love that you did this, thank you so much! Slight problem thoe, it shows everywhere but the board index and main page of the subforum. Any ideas?


Your skin isn't updated to 3.2.3.



As Aisha said your skin is not updated for IPB 3.2.3, you can either get an updated skin from the skinner (if it's a custom one) or revert/compare any edit made to the template to add the new changes.

I've posted also a manual edit to change the 3.2.x to 3.2.3 template on my site if you want: http://community.invisionbyte.net/topic/6603-index-not-showing-on-some-skins/page__view__findpost__p__21358
Link to comment
Share on other sites

Well it be possible to also make IP content names formatted also :smile:



Yes it is possible but I won't make any addon for IP.Content for now, given the dynamic nature of the content inside it it is quite hard to get it working properly and I want to focus on (TB) Tickets System and the other addons first.


You can always format the names yourself in the template however, the code below is a quick example:


$row['members_display_name'] = IPSMember::makeNameFormatted( $row['members_display_name'], $row['member_group_id'] );

Link to comment
Share on other sites

Hey, I don't think it works on the mobile skin..


Just noticed this post >.<

The mobile skin is coded differently and almost never uses the "userHoverCard" template so it is quite difficult to support it unless I add another 20+ files in the hook and for now I prefer to avoid that and focus on making at least the normal skin work without issues (and the addons too).
Link to comment
Share on other sites


Yes it is possible but I won't make any addon for IP.Content for now, given the dynamic nature of the content inside it it is quite hard to get it working properly and I want to focus on (TB) Tickets System and the other addons first.




You can always format the names yourself in the template however, the code below is a quick example:



$row['members_display_name'] = IPSMember::makeNameFormatted( $row['members_display_name'], $row['member_group_id'] );




Don't understand how to make this happen.
Link to comment
Share on other sites





Frontpage template


<div class="type-1x2x2">

<php>

  // Category or global?

  if( isset( $data['category']['category_id'] ) ){

   $rss = array(

	'enabled' => ( substr( $data['category']['category_rss'], 0, 1 ) == 1 && $data['category']['category_show_records'] ) ? 1 : 0,

	'type' => 'category',

	'id' => $data['database']['database_id'].'c'.$data['category']['category_id'],

	'name' => $data['category']['category_name']

   );

   $title = $data['category']['category_name'];

   $this->settings['_active_cat'] = $data['category']['category_id'];

  } else {

   $rss = array(

	'enabled' => ( substr( $data['database']['database_rss'], 0, 1 ) == 1 ),

	'type' => 'global',

	'id' => $data['database']['database_id'],

	'name' => $data['database']['database_name']

   );

   $title = $this->lang->words['fpdt_latestnews'];

  }

</php>

<div class="utilities right">

  <if test="$data['category']['category_id']">

   <a href="{$data[" category']['category_link']}?view="archive'" title="{$this->lang->words[" fpdt_viewarchives']}'=""><img src="{$this->settings[" img_url']}="" archive.png'="" alt=""></a>

  </if>

  &nbsp;&nbsp;&nbsp;

  <if test="$rss['enabled']"><a href="{parse url=&quot;app=core&amp;module=global&amp;section=rss&amp;type=ccs&amp;id={$rss[" id']}"="" seotitle="{$rss['name']}" template="section=rss2" base="public" }'="" class="right"><img src="{$this->settings[" img_url']}="" feed.png'="" alt=""></a></if>


</div>

<h2 class="section_title">

  {$title}

  <if test="$data['database']['_can_add']">

   <a href="{$data[" database']['base_link']}do="add&amp;category={$this-">request['category']}' title='{$this->lang->words['add_record_button']}' accesskey='s' class='add_link'>{$this->lang->words['add_record_button']}</a>

  </if>

  <if test="$this->memberData['member_id'] AND $this->request['category']">

   <if test="$this->settings['cpu_watch_update'] AND ( is_array( $this->memberData['_cache'] ) AND is_array( $this->memberData['_cache']['watchedContentCats'] ) AND in_array( $this->request['category'], $this->memberData['_cache']['watchedContentCats'] ) )">

	<a href="{$data[" database']['base_link']}do="unwatch&amp;category={$this-">request['category']}' title='{$this->lang->words['watch_category_stop']}' class='add_link'>{$this->lang->words['watch_category_stop']}</a>

   <else>

	<a href="{$data[" database']['base_link']}do="watch&amp;category={$this-">request['category']}' title='{$this->lang->words['watch_category']}' class='add_link'>{$this->lang->words['watch_category']}</a>

   </else></if>

  </if>

</h2>


<if test="count( $data['records'] )">


  <!-- START ARTICLE POSITION 1 -->

  <if test="$data['records'][0]">

   <div class="article block block-1 <if test=&quot;!$data[" records'][0]['record_approved']"=""> moderated'>

	<if test="$data['records'][0]['article_image']">

	 <img src="{$data[" records'][0]['article_image']}'="" class="photo" {parse="" resize_image="$data['records'][0]['article_image']" maxwidth="225" }="" alt="">

	</if>

	<div class="overview">

	 <h2><a href="{$data[" records'][0]['record_link']}'="">{$data['records'][0]['article_title']}</a></h2>

	 <span class="desc posted_info">Published On  {$data['records'][0]['article_date']} | by <a href="{parse url=&quot;showuser={$data[" records'][0]['member_id']}"="" base="public" template="showuser" seotitle="{$data['records'][0]['members_seo_name']}" }'="">{$data['records'][0]['members_display_name']}</a> {$this->lang->words['fpdt_in']} <a href="{$data[" records'][0]['category_link']}'="">{$data['records'][0]['category_name']}</a></span>


	 <div class="excerpt">

	  {IPSText::truncate( strip_tags( IPSText::stripAttachTag( $data['records'][0]['article_body'] ), '

' ), 255 )}


	  <span class="links">

	   <a href="{$data[" records'][0]['record_link']}'="" class="read_more">{$this->lang->words['fpdt_readstory']}</a>

	   &nbsp;&nbsp;

	   <a href="{$data[" records'][0]['record_link']}#comments'="" class="comments">{$data['records'][0]['record_comments']} {$this->lang->words['fpdt_comments']}</a>

	   &nbsp;&nbsp;

	   <if test="$data['database']['database_rate']">

		<if test="$data['records'][0]['rating_real'] >= 1">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$data['records'][0]['rating_real'] >= 2">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$data['records'][0]['rating_real'] >= 3">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$data['records'][0]['rating_real'] >= 4">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$data['records'][0]['rating_real'] >= 5">{parse

replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if>

	   </if>

	  </span>

	 </div>

	</div>

   </div>

  </if>


  <!-- START ARTICLES POSITION 2 -->

  <php>

   $this->count_p2 = 0;

  </php>

  <if test="$data['records'][1]">

   <div class="article_row">

	<foreach loop="array( $data['records'][1], $data['records'][2],$data['records'][3], $data['records'][4],$data['records'][5],$data['records'][6],$data['records'][7],$data['records'][8],$data['records'][9],$data['records'][10]) as $record">


	<if test="$record['primary_id_field']">

	  <if test="$this->count_p2 % 2 == 0 && $this->count_p2 > 0">

	   </if></if></foreach></div>

	   <div class="article_row">


	  <div class="article block block-2<if test=&quot;!$record[" record_approved']"=""> moderated'>

	   <div class="overview">

		<h2><a href="{$record[" record_link']}'="">{$record['article_title']}</a></h2>

		 <span class="desc posted_info"> Published On {$record['article_date']} | by <a href="{parse url=&quot;showuser={$record[" member_id']}"="" base="public" template="showuser" seotitle="{$record['members_seo_name']}" }'="">{$record['members_display_name']}</a> {$this->lang->words['fpdt_in']} <a href="{$record[" category_link']}'="">{$record['category_name']}</a></span>

		<div class="excerpt">

		 <if test="$record['article_image']">

		  <img src="{$record[" article_image']}'="" class="photo" {parse="" resize_image="$record['article_image']" maxwidth="100" }="" alt="">

		 </if>

		 {IPSText::truncate( strip_tags( IPSText::stripAttachTag( $record['article_body'] ), '

' ), 255 )}

		</div>

		 <div class="links">

		  <a href="{$record[" record_link']}'="" class="read_more">{$this->lang->words['fpdt_readstory']}</a>

		  &nbsp;&nbsp;

		  <a href="{$record[" record_link']}#comments'="" class="comments">{$record['record_comments']} {$this->lang->words['fpdt_comments']}</a>

		  &nbsp;&nbsp;

		  <if test="$data['database']['database_rate']">

		   <if test="$record['rating_real'] >= 1">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$record['rating_real'] >= 2">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$record['rating_real'] >= 3">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$record['rating_real'] >= 4">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$record['rating_real'] >= 5">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if>

		  </if>

		 </div>

	   </div>

	  </div>

	  <if test="$this->count_p2++"></if>



   </div>

  </if>


  <!-- START ARTICLES POSITION 3 -->

  <php>

   $this->count_p3 = 0;

  </php>

  <if test="$data['records'][11]">


   <h2 class="section_title">Other Stories You May Like :</h2>

   <div class="article_row">

	<foreach loop="$data['records'] as $idx => $record">

	 <if test="$idx > 4">

	  <if test="$this->count_p3 % 2 == 0 && $this->count_p3 > 0">

	   </if></if></foreach></div>

	   <div class="article_row">



	  </div>


	  <div class="article block block-3<if test=&quot;!$record[" record_approved']"=""> moderated'>

	   <div class="overview">

		<h2>{$record['article_title']}</h2>

		<span class="desc posted_info">{$record['article_date']} | <a href="{parse url=&quot;showuser={$record[" member_id']}"="" base="public" template="showuser" seotitle="{$record['members_seo_name']}" }'="">{$record['members_display_name']}</a> {$this->lang->words['fpdt_in']} <a href="{$record[" category_link']}'="">{$record['category_name']}</a></span>


		<span class="links">

		 <a href="{$record[" record_link']}'="" class="read_more">{$this->lang->words['fpdt_readstory']}</a>

		 &nbsp;&nbsp;

		 <a href="{$record[" record_link']}#comments'="" class="comments">{$record['record_comments']} {$this->lang->words['fpdt_comments']}</a>

		 &nbsp;&nbsp;

		 <if test="$data['database']['database_rate']">

		  <if test="$record['rating_real'] >= 1">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$record['rating_real'] >= 2">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$record['rating_real'] >= 3">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$record['rating_real'] >= 4">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if><if test="$record['rating_real'] >= 5">{parse replacement="rate_on"}<else>{parse replacement="rate_off"}</else></if>

		 </if>

		</span>

	   </div>

	  </div>

	  <if test="$this->count_p3++"></if>

	 </if>


   </if></div>


<else>

  <div class="no_messages">

   {$this->lang->words['fpdt_noarticles']}

   <if test="$data['database']['_can_add']">

	<a href="{$data[" database']['base_link']}do="add&amp;category={$this-">request['category']}' title='{$this->lang->words['add_record_button']}'><strong>{$this->lang->words['fpdt_addone']}</strong></a>

   </if>

  </div>



<if test="$data['category']['category_id']">



  <p id="previous_bar" class="filter_bar">

   <a href="{$data[" category']['category_link']}?view="archive'" title="View archives">{$this->lang->words['fpdt_prevarts']}</a>

  </p>

</if>


<if test="$this->caches['ccs_frontpage']['paginate']">

<div class="pagelinks">

  <if test="$this->request['p'] AND $this->request['p'] > 1">

   <div class="left">

	<a href="<if test=&quot;$data[" category']['category_id']"="">{$data['category']['category_link']}?p=1<else>{$data['database']['base_link']}p=1'>{$this->lang->words['frontpage_previouspage']}</else></a>

   </div>

  </if>

  <php>

   $_ttlPgs = $data['database']['_fp_count'] ? ceil( $data['database']['_fp_count'] / $this->caches['ccs_frontpage']['limit'] ) : 0;

   $_curPg  = $this->request['p'] ? $this->request['p'] : 1;

   $_nextPg = $_curPg + 1;

  </php>

  <if test="$_ttlPgs AND $_curPg < $_ttlPgs">

   <div class="right">

	<a href="<if test=&quot;$data[" category']['category_id']"="">{$data['category']['category_link']}?p={$_nextPg}<else>{$data['database']['base_link']}p={$_nextPg}'>{$this->lang->words['frontpage_nextpage']}</else></a>

   </div>

  </if>

</div>

</if>



Link to comment
Share on other sites


Frontpage template



[...]




In the template replace:

{$data['records'][0]['members_display_name']}[/CODE]

with:

{IPSMember::makeNameFormatted( $data['records'][0]['members_display_name'], $data['records'][0]['member_group_id'] )}

then replace 2 times this code:

{$record['members_display_name']}

with this:

{IPSMember::makeNameFormatted( $record['members_display_name'], $record['member_group_id'] )}[/code]

Save the template and you're done.



Link to comment
Share on other sites

Article View template how i can do this


{parse js_module="rating"}

{parse template="include_lightbox" group="global" params=""}

<div class='view topic'>

<h2 class='article_title maintitle'>

  {$data['record']['article_title']}

  <if test="$data['database']['database_rate']">

   <span class='rating'>


	<if test="!$this->memberData['member_id']">

	 {$this->lang->words['m_rating']}

	  <if test="$data['record']['rating_real'] >= 1">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$data['record']['rating_real'] >= 2">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$data['record']['rating_real'] >= 3">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$data['record']['rating_real'] >= 4">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$data['record']['rating_real'] >= 5">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><span id='rating_text' class='desc'></span>

	<else />

	 {$this->lang->words['m_rating']}

	  <a href='#' id='user_rate_1' title='{$this->lang->words['m_rate_1']}'><if test="$data['record']['rating_real'] >= 1">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if></a><a href='#' id='user_rate_2' title='{$this->lang->words['m_rate_2']}'><if test="$data['record']['rating_real'] >= 2">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if></a><a href='#' id='user_rate_3' title='{$this->lang->words['m_rate_3']}'><if test="$data['record']['rating_real'] >= 3">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if></a><a href='#' id='user_rate_4' title='{$this->lang->words['m_rate_4']}'><if test="$data['record']['rating_real'] >= 4">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if></a><a href='#' id='user_rate_5' title='{$this->lang->words['m_rate_5']}'><if test="$data['record']['rating_real'] >= 5">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if></a> <span id='rating_text' class='desc'></span>

	 <script type='text/javascript'>

	  rating = new ipb.rating( 'user_rate_', {

		   url: '{parse url="app=ccs&module=ajax&section=rate&id={$data['database']['database_id']}&record={$data['record']['primary_id_field']}" base="public"}&md5check=' + ipb.vars['secure_hash'],

		   cur_rating: <if test="isset($data['record']['rating_real'])">{$data['record']['rating_real']}<else />0</if>,

		   rated: null,

		   allow_rate: <if test="$data['database']['_can_rate']">1<else />0</if>,

		   show_rate_text: false

			} );

	 </script>

	</if>

   </span>

  </if>

</h2>

<div class='post_block'>

  <div class='post_wrap'>

   <h3>

	<span class='posted_info'>

	 Published On {$data['record']['article_date']} | by <if test="$data['record']['member_id']"><a href='{parse url="showuser={$data['record']['member_id']}" template="showuser" base="public" seotitle="{$data['record']['members_seo_name']}"}'></if>{$data['record']['members_display_name']}<if test="$data['record']['member_id']"></a>{parse template="user_popup" group="global" params="$data['record']['member_id'], $data['record']['members_seo_name']"}</if> <if test="$data['record']['category_name']">{$this->lang->words['fpdt_in']} <a href='{$data['category']['category_link']}'>{$data['record']['category_name']}</a></if> | Number of Views: {$data['record']['record_views']}


	</span>

   </h3>

  </div>



   <if test="$data['record']['article_image']">

	<img src='{$data['record']['article_image']}' class='photo' {parse resize_image="$data['record']['article_image']" maxwidth="225"} alt='' />

   </if>

   {$data['record']['article_body']}

  </div>


  <if test="$this->memberData['member_id']">

   <ul class='post_controls'>

	<if test="$this->settings['cpu_watch_update'] AND ( is_array( $this->memberData['_cache'] ) AND is_array( $this->memberData['_cache']['watchedContentRecords'] ) AND in_array( $data['database']['database_id'] . ';' . $data['record']['primary_id_field'], $this->memberData['_cache']['watchedContentRecords'] ) )">

	 <li class='report'><a href='{$data['record']['record_link']}do=unwatch' title='{$this->lang->words['watch_record_stop']}'><img src='{$this->settings['img_url']}/transmit_blue.png' alt='{$this->lang->words['watch_record_stop']}' title='{$this->lang->words['watch_record_stop']}' /> {$this->lang->words['avdt_stopsubs']}</a></li>

	<else />

	 <li class='report'><a href='{$data['record']['record_link']}do=watch' title='{$this->lang->words['watch_record']}'><img src='{$this->settings['img_url']}/transmit_blue.png' alt='{$this->lang->words['watch_record_stop']}' title='{$this->lang->words['watch_record_stop']}' /> {$this->lang->words['avdt_subscribe']}</a></li>

	</if>


	<if test="$data['database']['_can_edit']">

	 <li><a href='{$data['record']['record_link']}do=edit' title='{$this->lang->words['edit_record_button']}' accesskey='s' class='right'><img src='{$this->settings['img_url']}/page_white_add.png' alt='{$this->lang->words['edit_record_button']}' /> {$this->lang->words['edit_record_button']}</a></li>

	</if>


	<if test="$data['record']['record_locked'] AND $data['database']['moderate_unlock']">

	 <li><a href='{$data['record']['record_link']}do=unlock' title='{$this->lang->words['unlock_record']}' accesskey='l' class='right'><img src='{$this->settings['img_url']}/lock_open.png' alt='{$this->lang->words['unlock_record']}' /> {$this->lang->words['unlock_record']}</a></li>

	<else />

	 <if test="!$data['record']['record_locked'] AND $data['database']['moderate_lock']">

	  <li><a href='{$data['record']['record_link']}do=lock' title='{$this->lang->words['lock_record']}' accesskey='l' class='right'><img src='{$this->settings['img_url']}/lock.png' alt='{$this->lang->words['lock_record']}' /> {$this->lang->words['lock_record']}</a></li>

	 </if>

	</if>


	<if test="$data['database']['moderate_pin']">

	 <if test="$data['record']['record_pinned']">

	  <li><a href='{$data['record']['record_link']}do=unpin' title='{$this->lang->words['unpin_record']}' class='right'><img src='{$this->settings['img_url']}/award_delete.png' alt='{$this->lang->words['unpin_record']}' /> {$this->lang->words['unpin_record']}</a></li>

	 <else />

	  <li><a href='{$data['record']['record_link']}do=pin' title='{$this->lang->words['pin_record']}' class='right'><img src='{$this->settings['img_url']}/award.png' alt='{$this->lang->words['pin_record']}' /> {$this->lang->words['pin_record']}</a></li>

	 </if>

	</if>


	<if test="$data['database']['moderate_approve']">

	 <if test="$data['record']['record_approved']">

	  <li><a href='{$data['record']['record_link']}do=unapprove' title='{$this->lang->words['unapprove_record']}' class='right'><img src='{$this->settings['img_url']}/cross.png' alt='{$this->lang->words['unapprove_record']}' /> {$this->lang->words['unapprove_record']}</a></li>

	 <else />

	  <li><a href='{$data['record']['record_link']}do=approve' title='{$this->lang->words['approve_record']}' class='right'><img src='{$this->settings['img_url']}/accept.png' alt='{$this->lang->words['approve_record']}' /> {$this->lang->words['approve_record']}</a></li>

	 </if>

	</if>


	<if test="$data['database']['moderate_delete']">

	 <li><a href='{$data['record']['record_link']}do=delete' title='{$this->lang->words['delete_record']}' class='right'><img src='{$this->settings['img_url']}/delete.png' alt='{$this->lang->words['delete_record']}' /> {$this->lang->words['delete_record']}</a></li>

	</if>

   </ul>

  </if>

</div>

<if test="$this->settings['sl_enable']">

  <div class='share_links'>

   {parse template="facebookLike" group="ccs_global" params="$data['record']['record_link']"}

   {IPSLib::shareLinks( $data['record']['article_title'], array( 'skip' => array( 'email' ) ) )}

<div style='float:left'><fb:like href="{$this->registry->getClass('output')->fetchRootDocUrl()}" layout="standard" show_faces="false" width="450" action="like" colorscheme="light" /></div>

<div id="fb-root"></div>

<script>

  window.fbAsyncInit = function() {

		FB.init({appId: '{$this->settings['fbc_appid']}', status: true, cookie: true,

				xfbml: true});

  };

  (function() {

		var e = document.createElement('script'); e.async = true;

		e.src = document.location.protocol +

		'//connect.facebook.net/en_US/all.js';

		document.getElementById('fb-root').appendChild(e);

  }());

</script>

  </div>

</if>


{$data['comments']}

</div>

<script type='text/javascript'>

ipb.vars['image_resize']  = {parse expression="intval($this->settings['resize_linked_img'])"};

ipb.global.post_width   = 500;

Event.observe( window, 'load', function(){

// Resize images

$$('.article_body').each( function(elem){

  ipb.global.findImgs( $( elem ) );

});

});

</script>

Link to comment
Share on other sites

Archives template


<php>

if( $this->request['do'] == 'search' ){

  $this->_search = "&amp;do=search&amp;search_value=" . $this->request['search_value'];

}


//RSS

if( isset( $data['parent']['category_id'] ) ){

  $rss = array(

   'enabled' => ( substr( $data['parent']['category_rss'], 0, 1 ) == 1 && $data['parent']['category_show_records'] ) ? 1 : 0,

   'type' => 'category',

   'id' => $data['database']['database_id'].'c'.$data['parent']['category_id'],

   'name' => $data['parent']['category_name']

  );

  $title = $data['parent']['category_name'];

  $this->settings['_active_cat'] = $data['parent']['category_id'];

}

</php>


<div class='archives'>

<if test="$rss['enabled']">

  <div class='utilities right'>

   <a href='{parse url="app=core&amp;module=global&amp;section=rss&amp;type=ccs&amp;id={$rss['id']}" seotitle="{$rss['name']}" template="section=rss2" base="public"}' class='right'><img src='{$this->settings['img_url']}/feed.png' alt='' /></a>

  </div>


</if>

<h2 class='section_title'>

  <if test="!$this->_search">

   {$data['parent']['category_name']} {$this->lang->words['archdt_archives']}

   <if test="$data['database']['_can_add']">

    <a href='{$data['database']['base_link']}do=add&amp;category={$this->request['category']}' title='{$this->lang->words['add_record_button']}' accesskey='s' class='add_link'>{$this->lang->words['add_record_button']}</a>

   </if>

  <else />

   {$this->lang->words['archdt_searchresults']}

  </if>

</h2>

<div class='sort_bar'>

  {$this->lang->words['archdt_sortby']}

  <ul>

   <li <if test="$this->request['sort_col']=='record_saved'">class='active'</if>>

    <a href='{$data['parent']['category_link']}{$this->_search}&amp;sort_col=record_saved&amp;sort_order=desc'>{$this->lang->words['archdt_mostrecent']}</a>

   </li>

   <if test="$data['database']['database_rate']">

   <li <if test="$this->request['sort_col']=='rating_real'">class='active'</if>>

    <a href='{$data['parent']['category_link']}{$this->_search}&amp;sort_col=rating_real&amp;sort_order=desc'>{$this->lang->words['archdt_highrated']}</a>

   </li>

   </if>

   <li <if test="$this->request['sort_col']==$data['special']['title']">class='active'</if>>

    <a href='{$data['parent']['category_link']}{$this->_search}&amp;sort_col={$data['special']['title']}&amp;sort_order=desc'>{$this->lang->words['archdt_title']}</a>

   </li>

   <li <if test="$this->request['sort_col']=='record_views'">class='active'</if>>

    <a href='{$data['parent']['category_link']}{$this->_search}&amp;sort_col=record_views&amp;sort_order=desc'>{$this->lang->words['archdt_mostviewed']}</a>

   </li>

  </ul>

</div>

<div class='topic_controls'>

  {$data['pages']}

</div>

<br style='clear: both;' />

<if test="count($data['records'])">

  <foreach loop="$data['records'] as $record">

   <div class='block<if test="!$record['record_approved']"> moderated</if>'>

    <if test="$record['article_image']">

	 <img src='{$record['article_image']}' class='photo' {parse resize_image="$record['article_image']" maxwidth="100"} alt='' />

    </if>

    <h3><a href='{$record['record_link']}'>{$record['article_title']}</a></h3>

    <span class='desc posted_info'> Published On {$record['article_date']} | <a href='{parse url="showuser={$record['member_id']}" base="public" template="showuser" seotitle="{$record['members_seo_name']}"}'>{$record['members_display_name']}</a></span>

    <div class='excerpt'>

	 {IPSText::truncate( $record['article_body'], 190 )}

	 <br />

	 <span class='links'>

	  <a href='{$record['record_link']}' class='read_more'>{$this->lang->words['fpdt_readstory']}</a>

	  &nbsp;&nbsp;

	  <a href='{$record['record_link']}#comments' class='comments'>{$record['record_comments']} {$this->lang->words['fpdt_comments']}</a>

	  &nbsp;&nbsp;

	  <if test="$data['database']['database_rate']">

	   <if test="$record['rating_real'] >= 1">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$record['rating_real'] >= 2">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$record['rating_real'] >= 3">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$record['rating_real'] >= 4">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if><if test="$record['rating_real'] >= 5">{parse replacement="rate_on"}<else />{parse replacement="rate_off"}</if>

	  </if>

	 </span>

    </div>

   </div>

  </foreach>

<else />

  <div class='no_messages'>

   <if test="!$this->_search">

    {$this->lang->words['fpdt_noarticles']}

    <if test="$data['database']['_can_add']">

	 <a href='{$data['database']['base_link']}do=add&amp;category={$this->request['category']}' title='{$this->lang->words['add_record_button']}'><strong>{$this->lang->words['fpdt_addone']}</strong></a>

    </if>

   <else />

    {$this->lang->words['archdt_nosearchresults']}

   </if>

  </div>

</if>

<div class='topic_controls'>

  {$data['pages']}

</div>

<br class='clear' />


<if test="count( $data['categories'] )">

  <hr />

  <div class='subcats'>

   <foreach loop="$data['categories'] as $category">

    <div class='subcat'>

	 <h2><a href='{$category['category_link']}' title='{$this->lang->words['archdt_viewcat']}'>{$category['category_name']}</a>

	  <span class='desc'>

	   <if test="substr( $category['category_rss'], 0, 1 ) == 1">

	    <a href="{parse url="app=core&amp;module=global&amp;section=rss&amp;type=ccs&amp;id={$category['category_database_id']}c{$category['category_id']}" base="public" template="section=rss2" seotitle="{$category['category_furl_name']}"}"><img src='{$this->settings['img_url']}/feed.png' alt='{$this->lang->words['rss_feed']}' /></a>

	   </if>

	   {$category['category_records']} {$this->lang->words['archdt_articles']}

	  </span>

	 </h2>

	 <div class='last_article'>

	  <if test="$category['category_last_record_id']">

	   <h3><a href='{$category['record_link']}'>{$category['article_title']}</a></h3>

	   <div class='excerpt'>

	    <span class='desc'>{parse date="$category['category_last_record_date']" format="manual{%b %d %Y}"}</span>&nbsp;&nbsp;{IPSText::truncate( $category[ $data['database']['database_field_content'] ], 190 )}

	   </div>

	  <else />

	   <p class='desc'>

	    {$this->lang->words['fpdt_noarticles']}

	   </p>

	  </if>

	 </div>

	 <if test="$data['database']['moderate_approve'] AND $category['category_records_queued']">

	  <em class='right moderated'><a href='{$category['category_link']}?view=archive&amp;sort=queued' title='{$this->lang->words['cat_viewmoderated']}'>{parse expression="sprintf( $this->lang->words['category_unapprovedlink'], $category['category_records_queued'] )"}</a></em>

	 </if>

    </div>

   </foreach>

  </div>

</if>


</div>

Link to comment
Share on other sites


Article View template how i can do this



[...]




Same way as before, first find the places where the members_display_name is used which is only 1 in this template:

{$data['record']['members_display_name']}[/CODE]

From there apply the IPSMember::makeNameFormatted() function to it and for the second parameter use the same variable but change "members_display_name" with "member_group_id"

{IPSMember::makeNameFormatted( $data['record']['members_display_name'], $data['record']['member_group_id'] )}

Apply the same process above for the Archive View template.




Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...