Jump to content

Adaugare iconita la fiecare maintitle?


CrYyStI

Recommended Posts

Pentru IPS4:

[data-categoryid="1"] h2:before {
    content: '\f085';
    font-family: 'FontAwesome';
    background: #1b1a20;
    width: 45px;
    height: 45px;
    text-align: center;
    color: #005c97;
    line-height: 45px;
    display: inline-block;
    margin-right: 15px;
    font-size: 26px;
    position: relative;
}

unde este:

 [data-categoryid="1"]

pui id-ul categoriei, mai departe credca stii cum sa schimbi iconitele....

 

Link to comment
Share on other sites

Just now, strongtaz said:

Ipb 4.x sau 3.x ?

3.x

Just now, HTML/CSS said:

Pentru IPS4:


[data-categoryid="1"] h2:before {
    content: '\f085';
    font-family: 'FontAwesome';
    background: #1b1a20;
    width: 45px;
    height: 45px;
    text-align: center;
    color: #005c97;
    line-height: 45px;
    display: inline-block;
    margin-right: 15px;
    font-size: 26px;
    position: relative;
}

unde este:


 [data-categoryid="1"]

pui id-ul categoriei, mai departe credca stii cum sa schimbi iconitele....

 

N-am 4.x.. am 3.x

Link to comment
Share on other sites

Uite acesta este codul:

#category_1 h3.maintitle:before {
    content: '\f085';
    font-family: 'FontAwesome';
    background: #27272e;
    width: 45px;
    height: 41px;
    text-align: center;
    color: #005c97;
    line-height: 40px;
    display: inline-block;
    margin-right: 15px;
    font-size: 24px;
    position: absolute;
    border-radius: 5px;
    margin-bottom: 1px;
}

acesta cod este numai pentru o categorie, unde este #category_1, o sa skimbi si pentru alte categorii, mai departe credca stii ce sa faci

Link to comment
Share on other sites

Daca vrei sa fie ca in imagine adaugi in style_css la sfarsit:

.icon-maintitle {
    color: #20afe3;
    width: 55px;
    height: 55px;
    right: 20px;
    border-radius: 5px 0px 0px 5px;
    line-height: 55px;
    text-align: center;
    display: inline-block;
    font-size: 25px;
    font-family: 'FontAwesome';
    background: #0f0f0f;
    top: -20px;
    position: relative;
}

dupa te duci in boardindextemplate cauti : header_start

 

si dupa el adaugi: 

<div class='category_block2'>
<h3 class='maintitle'>

							<a class='toggle right' href='#' title="{parse expression="sprintf( $this->lang->words['toggle_cat'], IPSText::striptags( IPSText::htmlspecialchars($_data['cat_data']['name'] ) ) )"}"><i class="ion-close" style="position: relative;
left: 15px;
color: rgb(48, 53, 61);
text-shadow: 0 0px 0px #000;
font-size: 16px;
top: -1px;" aria-hidden="true"></i>
</a>
<if test="$_data['cat_data']['id'] == 1">
<i class="ion-ios-cog-outline icon-maintitle" aria-hidden="true"></i>
</if>
<if test="$_data['cat_data']['id'] == 22">
<i class="ion-ios-game-controller-b icon-maintitle" aria-hidden="true"></i>
</if>

<if test="$_data['cat_data']['id'] == 77">
<i class="ion-ios-home icon-maintitle" aria-hidden="true"></i>
</if>


<if test="$_data['cat_data']['id'] == 107">
<i class="ion-ios-color-filter-outline icon-maintitle" aria-hidden="true"></i>
</if>


<if test="$_data['cat_data']['id'] == 108">
<i class="ion-ios-trash icon-maintitle" aria-hidden="true"></i>
</if>

daca nu te descurci ti-am dat pm.. sa imi dai admincp si te rezolv eu,o zi buna 

Edited by xartE
Link to comment
Share on other sites

5 minutes ago, xartE said:

Daca vrei sa fie ca in imagine adaugi in style_css la sfarist:


.icon-maintitle {
    color: #20afe3;
    width: 55px;
    height: 55px;
    right: 20px;
    border-radius: 5px 0px 0px 5px;
    line-height: 55px;
    text-align: center;
    display: inline-block;
    font-size: 25px;
    font-family: 'FontAwesome';
    background: #0f0f0f;
    top: -20px;
    position: relative;
}

dupa te duci in boardindextemplate cauti : header_start

 

si dupa el adaugi: 


<div class='category_block2'>
<h3 class='maintitle'>

							<a class='toggle right' href='#' title="{parse expression="sprintf( $this->lang->words['toggle_cat'], IPSText::striptags( IPSText::htmlspecialchars($_data['cat_data']['name'] ) ) )"}"><i class="ion-close" style="position: relative;
left: 15px;
color: rgb(48, 53, 61);
text-shadow: 0 0px 0px #000;
font-size: 16px;
top: -1px;" aria-hidden="true"></i>
</a>
<if test="$_data['cat_data']['id'] == 1">
<i class="ion-ios-cog-outline icon-maintitle" aria-hidden="true"></i>
</if>
<if test="$_data['cat_data']['id'] == 22">
<i class="ion-ios-game-controller-b icon-maintitle" aria-hidden="true"></i>
</if>

<if test="$_data['cat_data']['id'] == 77">
<i class="ion-ios-home icon-maintitle" aria-hidden="true"></i>
</if>


<if test="$_data['cat_data']['id'] == 107">
<i class="ion-ios-color-filter-outline icon-maintitle" aria-hidden="true"></i>
</if>


<if test="$_data['cat_data']['id'] == 108">
<i class="ion-ios-trash icon-maintitle" aria-hidden="true"></i>
</if>

daca nu te descurci ti-am dat pm.. sa imi dai admincp si te rezolv eu,o zi buna 

@xartE tot e bun, dar aceasta este o metoda mai grea, trebuie sa unble sa caute prin Template....

Aceasta este mai usoara:

Quote

#category_1 h3.maintitle:before {
    content: '\f085';
    font-family: 'FontAwesome';
    background: #27272e;
    width: 45px;
    height: 41px;
    text-align: center;
    color: #005c97;
    line-height: 40px;
    display: inline-block;
    margin-right: 15px;
    font-size: 24px;
    position: absolute;
    border-radius: 5px;
    margin-bottom: 1px;
}

Trebuie sa lucrezi doar in CSS si atit...

Link to comment
Share on other sites

1 minute ago, xartE said:

eu pe asta o folosesc.. si nu am intampinat un bug si nu e complicata.

De ce trebuie sa caute si sa faca skimbari prin Template daca se poate si mai altfel, pe parcurs daca o sa doreasca sa le elimeneze va trebui sa de delete doar la codurile css...

Link to comment
Share on other sites

  • Moderators

Sau

<php>
$C_ICONS = array(
	'1'	=>	'fa fa-user-circle-o',
	'2'	=>	'fa-address-card-o',
	'3'	=>	'fa-address-card-o'
);
</php>

(de forma 'id_forum' => 'cod_iconita') inainte de

<h3 class='maintitle'>

si adaugi

<i class="{$C_ICONS[$_data['cat_data']['id']]}" aria-hidden="true"></i>

unde vrei sa fie pozitionata iconita (daca vrei font awesome). Daca vrei pur imagini pui acolo adrese de imagini si apoi un

 <img src="{$C_ICONS[$_data['cat_data']['id']]}">

 

Edited by Courage
  • Like 1
Link to comment
Share on other sites

  • gaby changed the title to Adaugare iconita la fiecare maintitle?

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.

  • 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.