Skocz do zawartości
PL
Szukaj na Pecetowiczu
  • Utwórz konto

[uPster] Profil ala IPS do MyBB. Poradnik MyBB


Rekomendowane odpowiedzi

W tym poradniku opiszę jak zrobić profil ala IPS do MyBB. Kod zaczerpnięty został z poprzedniego poradnika autorstwa SimLay który możecie znaleźć tu: Profil ala IPB w MyBB

przed rozpoczęciem przeróbki należy zrobić kopię zapasową modyfikowanych szablonów. Proszę mieć na uwadze że kod nie będzie pasował pod każdy styl, niektóre style będą wymagały dodatkowych poprawek CSS.

Modyfikacja szablonów

Przejdź do ACP > Style i szablony > Szablony > Twój szablon > Podgląd profilu i podmień kod w wybranych szablonach na poniższy:

member_profile

Spoiler
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->profile}</title>
{$headerinclude}
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/report.js?ver=1804"></script>
</head>
<body>
{$header}
<section id="profile">
	<div class="header">
		<div class="upper">
			<div class="row">
				<h1>{$formattedname}</h1>
				<h2>{$displaygroup['title']}</h2>
			</div>
			{$sendpm}
		</div>
		<div class="lower">
			<div class="avatar">{$avatar}</div>
			<div class="info">
				<div class="row">
					<h3>Zawartość</h3>
					{$memprofile['postnum']}
				</div>
				<div class="row">
					<h3>Rejestracja</h3>
					{$memregdate}
				</div>
				<div class="row">
					<h3>Ostatatnia wizyta</h3>
					{$online_status} {$memlastvisitdate}
				</div>
				<div class="row">
					<h3>Czas online</h3>
					{$timeonline}
				</div>
			</div>
			{$findposts}
		</div>
	</div>
<!-- Header/Main -->
	<div class="main">
		<div class="row left">
			{$memprofile['reputationlevel']}
			<br>
			
			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="pborder">
				<tr>
					<td colspan="2" class="thead"><strong>{$lang->users_forum_info}</strong></td>
				</tr>
				<tr>
					<td class="prof_trow"><strong>Obecnie</strong</td>
						<td class="prof_trow">{$location}</td>
							</tr>
				<tr>
					<td class="prof_trow"><strong>Tytuł</strong></td>
					<td class="prof_trow">{$usertitle}</td>
				</tr>
							{$warning_level}
						</div>
			</table>		
			{$contact_details}
			{$profilefields}	
			{$modoptions}
			{$adminoptions}
		</div>
		<!-- Left/Right -->
		<div class="row right">
			{$lastpost}
		</div>
	</div>
</section>

{$footer}
</body>
</html>

 

member_profile_adminoptions

Spoiler
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" class="pborder">
<tr>
	<td colspan="2" class="thead"><strong>{$lang->admin_options}</strong></td>
</tr>
<tr>
<td class="prof_trow">
<a href="{$mybb->settings['bburl']}/{$admin_dir}/index.php?module=user-users&amp;action=edit&amp;uid={$uid}">{$lang->admin_edit_in_acp}</a><br />
<a href="{$mybb->settings['bburl']}/{$admin_dir}/index.php?module=user-banning&amp;uid={$uid}">{$lang->admin_ban_in_acp}</a>
</td>
</tr>
</table>
<br />

 

member_profile_avatar

Spoiler
<img src="{$useravatar['image']}" alt="" width="125px" height="125px" />

 

member_profile_contact_details

Spoiler
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="pborder">
	<tr>
		<td colspan="2" class="thead"><strong>{$lang->users_contact_details}	</strong></td>
	</tr>
	<colgroup>
	<col style="width: 30%;" />
	</colgroup>
	{$website}
	{$sendemail}
	{$contact_fields['icq']}
	{$contact_fields['aim']}
	{$contact_fields['yahoo']}
	{$contact_fields['skype']}
	{$contact_fields['google']}
</table>

 

member_profile_customfields

Spoiler
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="pborder">
<tr>
	<td colspan="2" class="thead"><strong>{$lang->users_additional_info}</strong></td>
</tr>
{$customfields}
</table>
<br />

 

member_profile_customfields_field

Spoiler
<tr>
<td class="prof_trow"><strong>{$customfield['name']}:</strong></td>
<td class="prof_trow scaleimages">{$customfieldval}</td>
</tr>

 

member_profile_email

Spoiler
<tr>
<td class="prof_trow"><strong>{$lang->email}</strong></td>
<td class="prof_trow"><a href="member.php?action=emailuser&amp;uid={$memprofile['uid']}">{$lang->send_user_email}</a></td>
</tr>

 

member_profile_findposts

Spoiler
<br /><span class="prof_findposts"><a href="search.php?action=finduser&amp;uid={$uid}" style="color: #d4d1d1;"><i class="far fa-newspaper"></i> Moja aktywność</a></span>

 

member_profile_modoptions

Spoiler
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" class="pborder">
<tr>
	<td colspan="2" class="thead"><strong>{$lang->mod_options}</strong></td>
</tr>
{$manageuser}
<tr>
<td class="prof_trow">
{$memprofile['usernotes']}<br />
{$editnotes}
</td>
</tr>
</table>

 

member_profile_modoptions_banuser

Spoiler
<a href="{$mybb->settings['bburl']}/modcp.php?action=banuser&amp;uid={$uid}">{$lang->ban_in_mcp}</a><br />

 

member_profile_modoptions_editprofile

Spoiler
<a href="{$mybb->settings['bburl']}/modcp.php?action=editprofile&amp;uid={$uid}">{$lang->edit_in_mcp}</a><br />

 

member_profile_modoptions_manageuser

Spoiler
<tr>
<td class="prof_trow">
{$editprofile}
{$banuser}
{$purgespammer}
</td>
</tr>

 

member_profile_modoptions_purgespammer

Spoiler
<li style="list-style: none"><a href="{$mybb->settings['bburl']}/moderation.php?action=purgespammer&amp;uid={$uid}">{$lang->purgespammer}</a></li>

 

member_profile_offline

Spoiler
<span class="offline" style="font-weight: bold;"><i class="fas fa-circle"></i></span>

 

member_profile_online

Spoiler
<a href="online.php"><span class="online" style="font-weight: bold;"><i class="fas fa-circle"></i></span></a>

 

member_profile_pm

Spoiler
<a href="private.php?action=send&amp;uid={$memprofile['uid']}" class="pm"><i class="fas fa-envelope"></i> Wyślij Wiadomość</a>

 

member_profile_warninglevel

Spoiler
<tr>
	<td class="prof_trow"><strong>Ostrzeżeń</strong></td>
	<td class="prof_trow"><strong><a href="{$warning_link}">{$warning_level}</a> punktów ostrzeżeń</strong></td>
</tr>

 

Dodanie kodu CSS

Po modyfikacji powyższych szablonów czas na dodanie kodu CSS. 

Przejdź do Style i Szablony > Style >Twój styl > global.css lub stwórz nowy arkusz > wklej całą zawartość tego kodu:

#profile {
    border: 1px solid #c2c2c2;
    border-radius: 6px;
}

#profile .header {
    width: 100%;
    height: 275px;
    background: url(../../../images/bg.jpg) no-repeat center;
    position: relative;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
#profile .header h1 {
    margin: 0;
    background: rgba(0, 0, 0, .5);
    padding: 8px 14px;
    font-size: 18px;
    display: block;
}
#profile .header h2 {
    font-size: 15px;
    padding: 5px 0;
    display: block;
    margin: 0;
    font-weight: 200;
    width: auto;
    text-shadow: 1px 1px 1px #636363;
}
#profile .header .upper {
    bottom: 100px;
    left: 162px;
    height: 55px;
    width: 16%;
    position: absolute;
}
#profile .header .upper .row {
    height: 55px;
    float: left;
}
#profile .header .lower {
    position: absolute;
    bottom: 0;
    background: #565656;
    width: 100%;
    height: 65px;
}
#profile .header .lower .avatar {
    width: fit-content;
    background: #fff;
    display: block;
    margin: -80px 0 0 20px;
    border-radius: 50%;
    overflow: hidden;
    float: left;
}
#profile .header .lower .info {
    float: left;
}
#profile .header .lower .posts,
#profile .header .upper .pm {
    float: right;
    display: block;
    font-size: 13px;
    padding: 11px;
    background: #565656;
    color: #fff;
    margin: 10px 0;
    transition: .4s;
    border-radius: 3px;
}
#profile .header .lower .posts:before {
    font-family: FontAwesome;
    margin-right: 9px;
}
#profile .header .lower .posts:before {
    content: "\f1ea";
}
#profile .header .lower .posts:hover {
    background: #0a0a0a;
    color: #bbb;
}
#profile .header .lower .info .row {
    float: left;
    padding: 14px 20px;
    color: #fff;
    font-size: 15px;
    border-right: 1px dashed #444;
}
#profile .header .lower .info .row h3 {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
}
#profile .main {
    background: gray;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}
#profile .main .row.left {
    float: left;
    padding: 15px;
    box-sizing: border-box;
    width: 20%;
    background: #d2d2d2;
    height: 100%;
    border-bottom-left-radius: 5px;
}
#profile .main .row.left .pborder {
    margin: 4%;
    width: 92%;
    background: #adadad;
    border: 1px solid #c2c2c2;
    border-radius: 5px;
}
#profile .main .row.left .pborder .thead {
    padding: 10px;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    position: relative;
    color: #828e99;
    background: #ebedf0;
    border-radius: 2px 2px 0px 0px;
    font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
#profile .main .row.right {
    float: right;
    width: 80%;
    text-align: left;
    padding: 30px;
    box-sizing: border-box;
    background: #e0dddd;
    height: 100%;
    border-bottom-right-radius: 5px;
}
#profile .main .row.right .posts {
    margin: 0;
    padding: 0;
    clear: both;
    border-bottom: 1px solid #bdb5b5;
}
#profile .main .row.right .posts h4 {
    margin: 0;
    padding: 10px;
    font-size: 20px;
    font-weight: lighter;
}
#profile .main .row.right .posts h3 {
    clear: both;
    overflow: hidden;
    margin: 0;
    margin-bottom: 0px;
    font-weight: 300;
    padding: 2px 10px;
    font-size: 12px;
    margin-bottom: 15px;
}
#profile .main .row.right .posts h3 .date:before {
}
#profile .main .row.right .posts h3 .replies:before {
}
#profile .main .row.right .posts .text {
    overflow: hidden;
    clear: both;
    padding: 0 10px 10px;
    max-height: 155px;
}

#profile .header .edtButton {
    float: right;
    margin-right: 10px;
    margin-top: 10px;
    background: #787878;
    color: #fff;
    z-index: 2;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    padding: 10px 20px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    opacity: 0.8;
}

.prof_findposts {
    float: right;
    font-size: 14px;
    padding: 10px 20px;
    background: #464646;
    margin-right: 20px;
    position: relative;
    z-index: 1000;
    border-radius: 5px;
    margin-top: -5px;
}

.prof_trow {
    background: #e0dddd;
    padding: 10px;
}

.warnlvl {
    background: lightgray; 
    background-color: lightgray; 
    display: inline-block; 
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px; 
    border-radius: 3px; 
    color: #fff; 
    -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset; 
    clear: both;
    text-align: center; 
    font-size: 20px; 
    padding: 15px 63px !important; 
    margin-left: 15px; 
    border: 1px solid; 
    text-shadow: 1px 1px 1px #b0b0b0;
}

Dodatkowe informacje

Żeby zmienić tło w profilu przejdź do katalogu images i podmień grafikę o nazwie bg.jpg (może być to również inne rozszerzenie)

Aby wyświetlała się taka reputacja jak na zdjęciu poniżej pobierz plik z załącznika

Pobierz plik addtemplatefunctions.php i wgraj go do /inc/plugins, aby wszystko dobrze funkcjonowało

Reputation levels.zip

addtemplatefunction.php

 

To już wszystko. No chyba, że o czymś zapomniałem...

Odnośnik do komentarza
Udostępnij na innych stronach

  • 1 rok później...

Parse error: syntax error, unexpected 'pid' (T_STRING), expecting ')' in /profiles/j/ja/jar/jarunek/jarunekforum.cba.pl/inc/plugins/addtemplatefunction.php on line 69

Odnośnik do komentarza
Udostępnij na innych stronach

Załącznik w pierwszym poście poprawiony. 

Odnośnik do komentarza
Udostępnij na innych stronach

Mam problem bo teraz nie ma opcji aby zmieniać to tło....

image.png

Odnośnik do komentarza
Udostępnij na innych stronach

@Jaroslaw Ochenkowski Chodzi o tło w profilu tak ?

Z tego co pamiętam to trzeba dodać opcje w ustawieniach użytkownika lecz jak to dokładnie zrobić, nie pamiętam.

A jeśli chcesz ustawić coś domyślnego to w linijce, 2214 global.css masz taką możliwość.

#profile .header {
    width: 100%;
    height: 275px;
    background: url(../../../images/bg.jpg) no-repeat center; /* <-- Tutaj podajesz ścieżkę do twojgo zdjęcia */
    position: relative;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

W stopce do hiperłącza dodałeś się także ale na przekierowanie pod profil osoby naprawiającej styl

Jeśli chcesz aby po kliknięciu w frazę "JARUNEK" przekierowało osobę E.g twój profil na forum to zamień ten kod:

<span class="left">Powered by © 2002-2021 <a href="https://mybb.com" target="_blank" rel="noopener">MyBB Group</a>.<br>Theme by <a href="http://bartoszp.pl/">CreWix</a>. Fixed by <a href="https://community.mybb.com/user-124306.html">Tomik modyfikowany przez JARUNEK</a>.</span>

Na

<span class="left">Powered by © 2002-2021 <a href="https://mybb.com" target="_blank" rel="noopener">MyBB Group</a>.<br>Theme by <a href="http://bartoszp.pl/">CreWix</a>. Fixed by <a href="https://community.mybb.com/user-124306.html">Tomik</a> modyfikowany przez <a href="http://jarunekforum.cba.pl/member.php?action=profile&uid=1">JARUNEK</a>.</span>

Lokalizacja Footer

Znalazłem jeden poradnik dotyczący twojego problemu: Dodanie własnego tła w profilu użytkownika MyBB

Odnośnik do komentarza
Udostępnij na innych stronach

@MINIBOSS posiadasz może discorda bo coś odwaliłem. Mam problem taki iż nie pokazuje mi sie tło. 

Odnośnik do komentarza
Udostępnij na innych stronach

@Jaroslaw Ochenkowski Podałem pv

Odnośnik do komentarza
Udostępnij na innych stronach

Jeżeli ktoś chce dodać możliwość zmiany tła w profilu to należy wykonać najpierw modyfikację z poradnika: Dodanie własnego tła w profilu użytkownika MyBB i dodać pole z możliwością podania url do zdj.

Później wystarczy podmienić tylko jeden szablon. 

ACP > Style i Szablony >  Szablony  > Twój szablon  > Podgląd profilu i podmień ten szablony:

member_profile

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->profile}</title>
{$headerinclude}
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/report.js?ver=1804"></script>
<style>
	.tlo_profil {
	background-image: url({$userfields['fidX']}),  /* Tutaj podmieniamy X na naszą cyfre   które znajdziemy wchodząć w lokalizacje utworzonego pola */ url(https://www.pecetowicz.pl/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png); /* Tutaj podajemy url do zdj */
}
</style>
</head>
<body>
{$header}
<section id="profile">
	<div width="100%" class="tlo_profil">
		<div class="header">
			<div class="upper">
				<div class="row">
					<h1>{$formattedname}</h1>
					<h2>{$displaygroup['title']}</h2>
				</div>
				{$sendpm}
			</div>
			<div class="lower">
				<div class="avatar">{$avatar}</div>
				<div class="info">
					<div class="row">
						<h3>Zawartość</h3>
						{$memprofile['postnum']}
					</div>
					<div class="row">
						<h3>Rejestracja</h3>
						{$memregdate}
					</div>
					<div class="row">
						<h3>Ostatatnia wizyta</h3>
						{$online_status} {$memlastvisitdate}
					</div>
					<div class="row">
						<h3>Czas online</h3>
						{$timeonline}
					</div>
				</div>
				{$findposts}
			</div>
		</div>
	</div>
<!-- Header/Main -->
	<div class="main">
		<div class="row left">
			{$memprofile['reputationlevel']}
			<br>
			
			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="pborder">
				<tr>
					<td colspan="2" class="thead"><strong>{$lang->users_forum_info}</strong></td>
				</tr>
				<tr>
					<td class="prof_trow"><strong>Obecnie</strong</td>
						<td class="prof_trow">{$location}</td>
							</tr>
				<tr>
					<td class="prof_trow"><strong>Tytuł</strong></td>
					<td class="prof_trow">{$usertitle}</td>
				</tr>
							{$warning_level}
						</div>
			</table>		
			{$contact_details}
			{$profilefields}	
			{$modoptions}
			{$adminoptions}
		</div>
		<!-- Left/Right -->
		<div class="row right">
			{$lastpost}
		</div>
	</div>
</section>

{$footer}
</body>
</html>

Tutaj można zobaczyć rezultaty: https://streamable.com/9s5yz

Odnośnik do komentarza
Udostępnij na innych stronach

Zrobione dziękuje ziomeczku.

Odnośnik do komentarza
Udostępnij na innych stronach

  • 10 miesięcy temu...

hej, wie ktoś jak naprawić? te ucięcie avataru, wrzuciłem wszystko tak jak trzeba

https://i.imgur.com/X95YMSA.png

@@edit
udało się naprawić

Odnośnik do komentarza
Udostępnij na innych stronach

siema elo, jak naprawiłeś problem? brakowało kodu CSS czy co?

Odnośnik do komentarza
Udostępnij na innych stronach

  • 6 miesięcy temu...

Hej, mam problem z wyglądem profilu 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 2 miesiące temu...

@PLAYSUUU No my też mamy problem, ale tego typu że nie wiemy na czym polega twój problem xD

 

Odnośnik do komentarza
Udostępnij na innych stronach

Szklana kula ma nadal wolne 😛

Odnośnik do komentarza
Udostępnij na innych stronach

Kod trzeba dostosować pod aktualnie używany styl.

Odnośnik do komentarza
Udostępnij na innych stronach

Chlopak zalozyl juz osobny temat i dostal pomoc. Zreszta takie troche odkopki sprzed 2 miesiecy?

Odnośnik do komentarza
Udostępnij na innych stronach

2 minuty temu, Letaryat napisał:

Zreszta takie troche odkopki sprzed 2 miesiecy?

No i? Są większe odkopy... 

Odnośnik do komentarza
Udostępnij na innych stronach

@chrumcio Ale wnoszą coś nowego i kontynuują dalszy wątek. Autor już dawno uzyskał pomoc.

Odnośnik do komentarza
Udostępnij na innych stronach

Poważnie? ja to wiem, swoją odpowiedzią odnosiłem się do postu usera wyżej... 

I skąd mogłem wiedzieć że autor uzyskał pomoc... przecież nie będę przekopywał forum by zobaczyć czy autor nie uzyskał pomocy w innym temacie...

Ale żeby nie było, już nie będę odkopywał starych tematów.

Odnośnik do komentarza
Udostępnij na innych stronach

Kontynuuj dyskusję

Dołącz do Pecetowicza, aby kontynuować dyskusję w tym wątku.

  • Dodaj nową pozycję...
  • Dodaj nową pozycję...