Skocz do zawartości
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

Statystyki strony


Rekomendowane odpowiedzi

Opublikowano (edytowane)

obraz.thumb.png.3d10743dc112e00254e61a2e9cb9c0c6.png

Jak naprawić wyświetlanie ilości tematów i odpowiedzi?

Mój kod

<h3 class='ipsType_reset ipsWidget_title'>{lang="block_stats"}</h3>
<div class='ipsWidget_inner'>
	{{if $orientation == 'vertical'}}
		<div class='ipsPad_half'>
			<ul class="ipsDataList">
              				<li class='ipsDataItem'>
					<div class='ipsDataItem_main ipsPos_middle'>
						<strong>{lang="total_topics"}</strong>
					</div>
					<div class='ipsDataItem_stats ipsDataItem_statsLarge'>
						<span class='ipsDataItem_stats_number'>{number="$stats['total_topics']"}</span>
					</div>
				</li>
				<li class='ipsDataItem'>
					<div class='ipsDataItem_main ipsPos_middle'>
						<strong>{lang="total_posts"}</strong>
					</div>
					<div class='ipsDataItem_stats ipsDataItem_statsLarge'>
						<span class='ipsDataItem_stats_number'>{number="$stats['total_posts']"}</span>
					</div>
				</li>
				<li class="ipsDataItem">
					<div class="ipsDataItem_main ipsPos_middle">
						<strong>{lang="stats_total_members"}</strong>
					</div>
					<div class="ipsDataItem_stats ipsDataItem_statsLarge">
						<span class="ipsDataItem_stats_number">{number="$stats['member_count']"}</span>
					</div>
				</li>
				<li class="ipsDataItem">
					<div class="ipsDataItem_main ipsPos_middle">
						<strong>{lang="stats_most_online"}</strong>
					</div>
					<div class="ipsDataItem_stats ipsDataItem_statsLarge">
						<span class="ipsDataItem_stats_number">{number="$stats['most_online']['count']"}</span><br>
						<span class="ipsType_light ipsType_small"><time>{$stats['most_online']['time']}</time></span>
					</div>
				</li>
			</ul>
			<hr class='ipsHr'>
			{{if $stats['last_registered']}}
				<div class='ipsClearfix ipsPadding_bottom'>
					<div class='ipsPos_left ipsType_center cNewestMember'>
						{template="userPhoto" app="core" group="global" params="$stats['last_registered'], 'small'"}
					</div>
					<div class='ipsWidget_latestItem'>
						<strong class='ipsType_minorHeading'>{lang="stats_newest_member"}</strong><br>
						<span class='ipsType_normal'>{$stats['last_registered']->link()|raw}</span><br>
						<span class='ipsType_medium ipsType_light'>{lang="members_joined"} <time>{$stats['last_registered']->joined->getTimestamp()}</time></span>
					</div>
				</div>
			{{endif}}
		</div>
	{{else}}

		<div class='ipsFlex ipsFlex-ai:center ipsFlex-jc:between sm:ipsFlex-fd:column sm:ipsFlex-ai:stretch ipsPadding ipsWidget_stats'>
			<div class='ipsFlex-flex:11 ipsFlex ipsFlex-ai:center ipsFlex-jc:around'>
              			<div class='ipsGrid_span6 ipsType_center'>
				<span class='ipsType_large ipsWidget_statsCount'>{number="$stats['total_topics']"}</span><br>
				<span class='ipsType_light ipsType_medium'>{lang="total_topics"}</span>
			</div>
			<div class='ipsGrid_span6 ipsType_center'>
				<span class='ipsType_large ipsWidget_statsCount'>{number="$stats['total_posts']"}</span><br>
				<span class='ipsType_light ipsType_medium'>{lang="total_posts"}</span>
			</div>
				<div class='ipsType_center'>
					<span class='ipsType_large ipsWidget_statsCount'>{number="$stats['member_count']"}</span><br>
					<span class='ipsType_light ipsType_medium'>{lang="stats_total_members"}</span>
				</div>
				<div class='ipsType_center'>
					<span class='ipsType_large ipsWidget_statsCount' data-ipsTooltip title='<time data-norelative="true">{$stats['most_online']['time']}</time>'>{number="$stats['most_online']['count']"}</span><br>
					<span class='ipsType_light ipsType_medium'>{lang="stats_most_online"}</span>
				</div>
			</div>
			{{if $stats['last_registered'] instanceof \IPS\Member}}
			<div class='ipsFlex-flex:01 ipsBorder_left ipsPadding_left ipsMargin_right:double sm:ipsMargin_right:none sm:ipsMargin_top sm:ipsBorder:none sm:ipsBorder_top sm:ipsPadding_top sm:ipsPadding_left:none sm:ipsFlex sm:ipsFlex-jc:center'>
				<div class='ipsPhotoPanel ipsPhotoPanel_mini cNewestMember'>
					{template="userPhoto" app="core" group="global" params="$stats['last_registered'], 'mini'"}
					<div>
						<span class='ipsType_minorHeading'>{lang="stats_newest_member"}</span><br>
						<span class='ipsType_normal'>{$stats['last_registered']->link()|raw}</span><br>
						<span class='ipsType_small ipsType_light'>{lang="members_joined"} <time>{$stats['last_registered']->joined->getTimestamp()}</time></span>
					</div>
				</div>
			</div>
			{{endif}}
		</div>
	{{endif}}
</div>

 

Edytowane przez nOt
Opublikowano (edytowane)
8 minut temu, DawPi napisał:

Wyprintuj

Domyślam się, że to coś na zasadzie wyszukiwania? Gdzie są podane te wartości?

obraz.png.ab512c82ba17fb9ae6130014d0b6488f.png

Edytowane przez nOt
Opublikowano (edytowane)

@DawPinie mam pojęcia jak tego użyć, jakieś tam podstawy ogarniam, ale nie wszystkie. Musisz mi wytłumaczyć jak laikowi ?

Edytowane przez nOt
Opublikowano
Array ( [member_count] => 444 [most_online] => Array ( [count] => 14903 [time] => 1608578862 ) [last_registered] => IPS\Member Object ( [_followData] => [_previousPhotoType:protected] => [_group] => [restrictions:protected] => [modPermissions:protected] => [calculatedLanguageId:protected] => [markers] => Array ( ) [markersResetTimes] => Array ( ) [haveAllMarkers] => [defaultStreamId:protected] => [changedCustomFields] => Array ( ) [previousName:protected] => [_groups:protected] => [_socialGroups:protected] => [_clubs:protected] => Array ( ) [_features:protected] => [sessionData:protected] => [_lang:protected] => [_url:protected] => [rawProfileFieldsData] => [profileFields] => [_reputationData:protected] => [_reputationLastDayWon:protected] => [_reputationDaysWonCount:protected] => [notificationsConfiguration] => [_following:protected] => Array ( ) [reportCount:protected] => [ignorePreferences:protected] => [_ppdLimit:protected] => [_customCount] => [_profileCompletion] => [_referredBy:protected] => [caches:protected] => Array ( ) [_data:protected] => Array ( [member_id] => 568 [name] => ShynoX [member_group_id] => 3 [email] => [email protected] [joined] => 1608993410 [ip_address] => 141.101.105.162 [skin] => [warn_level] => [warn_lastwarn] => 0 [language] => 1 [restrict_post] => 0 [bday_day] => [bday_month] => [bday_year] => [msg_count_new] => 0 [msg_count_total] => 0 [msg_count_reset] => 0 [msg_show_notification] => 0 [last_visit] => 1608993425 [last_activity] => 1609000349 [mod_posts] => 0 [auto_track] => {"content":0,"comments":0,"method":"immediate"} [temp_ban] => 0 [mgroup_others] => [members_seo_name] => shynox [members_cache] => [failed_logins] => [] [failed_login_count] => 0 [members_profile_views] => 11 [members_pass_hash] => [members_pass_salt] => [members_bitoptions] => 65536 [members_day_posts] => 0,0 [notification_cnt] => 4 [pp_last_visitors] => {"161":1608999646} [pp_main_photo] => monthly_2020_12/imported-photo-568.jpeg.1a79315f51df2ed0d18835beeb2eef99.jpeg [pp_main_width] => [pp_main_height] => [pp_thumb_photo] => monthly_2020_12/imported-photo-568.thumb.jpeg.c3e97266e86f1726b9c037d1756db986.jpeg [pp_thumb_width] => [pp_thumb_height] => [pp_setting_count_comments] => 1 [pp_reputation_points] => 0 [pp_photo_type] => custom [signature] => [pconversation_filters] => [pp_customization] => [timezone] => Europe/London [pp_cover_photo] => [profilesync] => [] [profilesync_lastsync] => 1608998858 [allow_admin_mails] => 1 [members_bitoptions2] => 4112 [create_menu] => {"menu_key":1900054509,"menu":{"member_status":{"link":"https:\/\/niceskill.pl\/index.php?app=core&module=status&controller=ajaxcreate","title":"status_update","flashMessage":"saved","extraData":{"data-ipsdialog-remotesubmit":true,"data-ipsDialog":true,"data-role":"updateStatus"}},"topic":{"link":"https:\/\/niceskill.pl\/index.php?\/submit\/","extraData":{"data-ipsDialog":true,"data-ipsDialog-size":"narrow"},"title":"select_forum"},"donate":{"link":"https:\/\/niceskill.pl\/index.php?\/donate\/make-donation\/"},"file_download":{"link":"https:\/\/niceskill.pl\/index.php?\/files\/submit\/&_new=1","title":"select_category","extraData":{"data-ipsDialog":true,"data-ipsDialog-size":"narrow"}},"event":{"link":"https:\/\/niceskill.pl\/index.php?\/calendar\/submit\/&do=submit&id=1"},"gallery_image":{"link":"https:\/\/niceskill.pl\/index.php?\/gallery\/submit\/&_new=1","extraData":{"data-ipsDialog-size":"medium","data-ipsDialog":"true","data-ipsDialog-destructOnClose":"true","data-ipsDialog-close":"false","data-ipsDialog-extraClass":"cGalleryDialog_outer","data-ipsDialog-remoteSubmit":"true"}}}} [members_disable_pm] => 0 [marked_site_read] => 0 [pp_cover_offset] => 0 [acp_language] => [member_title] => [member_posts] => 2 [member_last_post] => 1608998392 [member_streams] => [photo_last_update] => [mfa_details] => [failed_mfa_attempts] => 0 [permission_array] => [completed] => 1 [conv_password] => [conv_password_extra] => [donate_donations] => 0 [donate_amount] => 0.00 [idm_block_submissions] => 0 [cm_credits] => [cm_no_sev] => 0 [cm_return_group] => 0 [steamid] => 76561197965448402 [MSI_FacebookLink] => [MSI_TwitterLink] => [MSI_GoogleLink] => [MSI_YoutubeLink] => [MSI_WebsiteLink] => [MSI_GitHubLink] => [MSI_SteamLink] => [MSI_InstagramLink] => [MSI_LinkedinLink] => [MSI_SkypeName] => [MSI_TwitchLink] => [MSI_OdnoklassnikiLink] => [MSI_vKontakteLink] => [MSI_DiscordLink] => [MSI_RedditLink] => [MSI_VineLink] => [MSI_VidmeLink] => [MSI_SnapchatLink] => [MSI_SmashcastLink] => [MSI_MixerLink] => [MSI_PlaystationLink] => [MSI_XboxLink] => [MSI_OriginLink] => [ProfileVideo] => [time_spent] => 676,1609000481 ) [_new:protected] => [changed] => Array ( ) [skipCloneDuplication] => ) ) 

 

  • Manager
Opublikowano
W dniu 26.12.2020 o 23:52, nOt napisał:

<span class='ipsDataItem_stats_number'>{number="$stats['total_topics']"}</span>

 

W dniu 26.12.2020 o 23:52, nOt napisał:

<span class='ipsDataItem_stats_number'>{number="$stats['total_posts']"}</span>

Używasz takich zmiennych których nie masz w $stats. Dlaczego?

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.