Jump to content
WebFlake
  • 0

Set Popular Contributors Widget Default to 'All Time'


Caleeco

Question

Hello, 

I am running IPS 4.4.10, and would like to modify the Popular Contributors Widget that appears in the FORUM. 

By default the 'Week' tab is selected. Is it possible to make it so that the 'All Time' tab is instead selected by default? (see attached)

Any help is appreciated

Thanks

Caleeco

Widget_PopCont.JPG

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hey @S!r.ReaDy

I appreciate you taking the time to help! Im a HTML Noob!

This is my topContributors Module

<h3 class='ipsType_reset ipsWidget_title'>{lang="block_topContributors"}</h3>
<div class='ipsTabs ipsTabs_small ipsTabs_stretch ipsClearfix' id='elTopContributors' data-ipsTabBar data-ipsTabBar-updateURL='false' data-ipsTabBar-contentArea='#elTopContributors_content'>
	<a href='#elTopContributors' data-action='expandTabs'><i class='fa fa-caret-down'></i></a>
	<ul role="tablist" class='ipsList_reset'>
		<li>
			<a href='#ipsTabs_elTopContributors_el_topContributorsWeek_panel' id='el_topContributorsWeek' class='ipsTabs_item ipsTabs_activeItem' role="tab" aria-selected='true'>{lang="week"}</a>
		</li>
		<li>
			<a href='{url="app=core&module=system&controller=ajax&do=topContributors&time=month&limit={$limit}&orientation={$orientation}"}' id='el_topContributorsMonth' class='ipsTabs_item' role="tab" aria-selected='false'>{lang="month"}</a>
		</li>		
		<li>
			<a href='{url="app=core&module=system&controller=ajax&do=topContributors&time=year&limit={$limit}&orientation={$orientation}"}' id='el_topContributorsYear' class='ipsTabs_item' role="tab" aria-selected='false'>{lang="year"}</a>
		</li>
		<li>
			<a href='{url="app=core&module=system&controller=ajax&do=topContributors&time=all&limit={$limit}&orientation={$orientation}"}' id='el_topContributorsAll' class='ipsTabs_item' role="tab" aria-selected='false'>{lang="alltime"}</a>
		</li>
	</ul>
</div>

<section id='elTopContributors_content' class='ipsWidget_inner ipsPad_half'>
	<div id="ipsTabs_elTopContributors_el_topContributorsWeek_panel" class='ipsTabs_panel'>
		{template="topContributorRows" group="widgets" app="core" params="$topContributorsThisWeek, 'week', $orientation"}
	</div>
</section>

 

As you suggested, i cut the activeITEM and pasted it in the ALL section. I also update the aria-selected TRUE/FALSE statements. However, after Saving, the widget remains unchanged. What have i done wrong ?

 

<h3 class='ipsType_reset ipsWidget_title'>{lang="block_topContributors"}</h3>
<div class='ipsTabs ipsTabs_small ipsTabs_stretch ipsClearfix' id='elTopContributors' data-ipsTabBar data-ipsTabBar-updateURL='false' data-ipsTabBar-contentArea='#elTopContributors_content'>
	<a href='#elTopContributors' data-action='expandTabs'><i class='fa fa-caret-down'></i></a>
	<ul role="tablist" class='ipsList_reset'>
		<li>
			<a href='#ipsTabs_elTopContributors_el_topContributorsWeek_panel' id='el_topContributorsWeek' class='ipsTabs_item ipsTabs_activeItem' role="tab" aria-selected='false'>{lang="week"}</a>
		</li>
		<li>
			<a href='{url="app=core&module=system&controller=ajax&do=topContributors&time=month&limit={$limit}&orientation={$orientation}"}' id='el_topContributorsMonth' class='ipsTabs_item' role="tab" aria-selected='false'>{lang="month"}</a>
		</li>		
		<li>
			<a href='{url="app=core&module=system&controller=ajax&do=topContributors&time=year&limit={$limit}&orientation={$orientation}"}' id='el_topContributorsYear' class='ipsTabs_item' role="tab" aria-selected='false'>{lang="year"}</a>
		</li>
		<li>
			<a href='{url="app=core&module=system&controller=ajax&do=topContributors&time=all&limit={$limit}&orientation={$orientation}"}' id='el_topContributorsAll' class='ipsTabs_item ipsTabs_activeItem' role="tab" aria-selected='true'>{lang="alltime"}</a>
		</li>
	</ul>
</div>

<section id='elTopContributors_content' class='ipsWidget_inner ipsPad_half'>
	<div id="ipsTabs_elTopContributors_el_topContributorsWeek_panel" class='ipsTabs_panel'>
		{template="topContributorRows" group="widgets" app="core" params="$topContributorsThisWeek, 'week', $orientation"}
	</div>
</section>

Many Thanks

Caleeco

Link to comment
Share on other sites

  • 0
10 hours ago, S!r.ReaDy said:

Delete 


ipsTabs_activeItem

from the week tab.

You have to refresh the widget to apply. Delete it and put it back, should work.

You Legend! Works like a charm :D 

Thanks for helping me solve this problem , its much appreciated!

Caleeco

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...