XF 2.0 Adding text before Sticky posts?

Martyn

Active member
Trying to do something like this...

192300

Struggling to find where to simply add this? less janky the better! hope someone knows :)

Cheers

Martyn
 
Well you need to create a prefix first. Then while you create it, you select in which nodes that prefix should be available. And then you visit each node and go the stickied threads and apply the prefix on these sticked thread 1 by 1.

Don't know of a method which goes faster than this.
 
Thought there might be some code that can be applied to show only for sticky’s :)
Add this to extra.less - it's a better solution than modifying the HTML :)

Less:
.structItemContainer-group--sticky .structItem-title::before{
    content: "Sticky";
    background: @xf-paletteColor1;
    border-radius: 3px;
    color: @xf-paletteColor5;
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    vertical-align: middle;
}
 
Add this to extra.less - it's a better solution than modifying the HTML :)

Less:
.structItemContainer-group--sticky .structItem-title::before{
    content: "Sticky";
    background: @xf-paletteColor1;
    border-radius: 3px;
    color: @xf-paletteColor5;
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    vertical-align: middle;
}
so simply, thank you so much
 
Code:
/*****/
.structItemContainer-group--sticky .structItem-title::before{
    content: "your name here";
background: #850000;
    background: -moz-linear-gradient(top, #950000 0%, #650000 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#950000), color-stop(100%,#650000));
    background: linear-gradient(top, #950000 0%,#650000 100%);
    border: 1px solid rgba(0,0,0,0.7);
    -moz-box-shadow: inset 1px 1px 0 0 #A50000, 0px 2px 3px rgba(0,0,0,0.3);
    -webkit-box-shadow: inset 1px 1px 0 0 #A50000, 0px 2px 3px rgba(0,0,0,0.3);
    box-shadow: inset 1px 1px 0 0 #A50000, 0px 2px 3px rgba(0,0,0,0.3);
    color: #fff;
    text-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
    -webkit-border-radius: 5px !important;
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
        margin: -1px;
    vertical-align: middle;
}
/*****/

special
 
Code:
/*****/
.structItemContainer-group--sticky .structItem-title::before{
    content: "your name here";
background: #850000;
    background: -moz-linear-gradient(top, #950000 0%, #650000 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#950000), color-stop(100%,#650000));
    background: linear-gradient(top, #950000 0%,#650000 100%);
    border: 1px solid rgba(0,0,0,0.7);
    -moz-box-shadow: inset 1px 1px 0 0 #A50000, 0px 2px 3px rgba(0,0,0,0.3);
    -webkit-box-shadow: inset 1px 1px 0 0 #A50000, 0px 2px 3px rgba(0,0,0,0.3);
    box-shadow: inset 1px 1px 0 0 #A50000, 0px 2px 3px rgba(0,0,0,0.3);
    color: #fff;
    text-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
    -webkit-border-radius: 5px !important;
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
        margin: -1px;
    vertical-align: middle;
}
/*****/

special

whats that look like?
 
Top Bottom