PDA

View Full Version : Change column order in search results (Solved)


Nerror
03-08-2013, 01:43 PM
I want to move the Forum part right after the Thread titel, instead of it being in the last column. Pic below shows in first row what I want, and i second row what it is per default:
https://vborg.vbsupport.ru/external/2013/03/46.png

Template change? If so, which and how? :)

Edit: Solved! see below.

Amaury
03-08-2013, 01:53 PM
By Lynne:

To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)

Nerror
03-08-2013, 02:17 PM
Ah very nifty, thanks, so it looks like it's the search_threadbit template.

--------------- Added 1362759838 at 1362759838 ---------------

Hrm can't get the formatting right. If I just move this part up above the threadstats part:

<div class="threadpostedin td alt">
<p>
{vb:rawphrase forum}:<br /><a href="{vb:link forum, {vb:raw thread}, null, 'forumid', 'forumtitle'}" title="{vb:raw thread.forumtitleclean}">{vb:raw thread.forumtitle}</a>
</p>

</div>

I end up with 2 rows with the Inline Mod check-box still attached to the end of the threadpostedin part and the other two in a row below. Is it the CSS I need to change as well then?

Edit: The search.css has the following in the threadbit section, but I am just not knowledgeable enough to see what and how to change it. :(
.threadbit {
position: relative;
}

.threadbit .threadinfo, .threadbit .threadpostedin, .threadbit .threadstats, .threadbit .threadlastpost {
}

.threadbit .threadinfo {
width: 45%;
overflow:hidden;
}

.threadbit .threadinfo.forum {
width: 100%;
}

.threadbit .deleted .threadinfo {
width: 60%;
overflow: hidden;
}

.threadbit .threadtitle {
height: {vb:math {vb:stylevar big_fontSize}*{vb:stylevar line_height}};
overflow: hidden;
}

.threadbit .searchdescription {
height: {vb:math {vb:stylevar mid_fontSize}*{vb:stylevar line_height}};
overflow: hidden;
}

.threadbit .threadpostedin {
max-width: 19.9%;
width: 8888px; /* fix for 32497 , weird but working */
font-size: {vb:stylevar mid_fontSize};
padding: {vb:math {vb:math {vb:stylevar threadbit_iconsize.height}{vb:stylevar threadbit_iconsize.units} + {vb:stylevar padding} - {vb:math {vb:stylevar mid_fontSize}*{vb:stylevar line_height}*2}}/2} 0;
height: {vb:math {vb:stylevar mid_fontSize}*{vb:stylevar line_height}*2};
}

.threadbit .threadpostedin p {
display:block;
float: {vb:stylevar left};
margin-{vb:stylevar left}: 1em;
clear: both;
font-size: {vb:stylevar mid_fontSize};
height: {vb:math {vb:stylevar mid_fontSize}*{vb:stylevar line_height}*2};
overflow: hidden;
}

.threadbit .threadstats {
width:15%;
padding-top: {vb:math {vb:math {vb:stylevar threadbit_iconsize.height}{vb:stylevar threadbit_iconsize.units} + {vb:stylevar padding} - {vb:math {vb:stylevar mid_fontSize}*{vb:stylevar line_height}*2}}/2};
word-wrap: break-word;
}
.threadbit .threadreplies {
padding: {vb:math {vb:math {vb:stylevar threadbit_iconsize.height}{vb:stylevar threadbit_iconsize.units} + {vb:stylevar padding} - {vb:math {vb:stylevar mid_fontSize}*{vb:stylevar line_height}}}/2} 0;
}

.threadbit .threadptstats, .threadbit .threadsgstats {
padding: {vb:math {vb:math {vb:stylevar threadbit_iconsize.height}{vb:stylevar threadbit_iconsize.units} + {vb:stylevar padding} - {vb:math {vb:stylevar mid_fontSize}*{vb:stylevar line_height}*3}}/2} 0;
}

.threadbit .threadstats li {
margin-{vb:stylevar right}:20%;
}

.threadbit .threadlastpost, .threadbit .threaddeleted {
width:20%;
padding-{vb:stylevar left}:0;
font-size:{vb:stylevar mid_fontSize};
}

.threadbit .threadlastpost dd {
margin:0 20px 0 20px;
height: {vb:math {vb:stylevar mid_fontSize}*{vb:stylevar line_height}};
overflow: hidden;
white-space:nowrap;
}

.threadbit .threaddeleted {
padding-top: {vb:math {vb:math {vb:stylevar threadbit_iconsize.height}{vb:stylevar threadbit_iconsize.units} + {vb:stylevar padding} - {vb:math {vb:stylevar mid_fontSize}*{vb:stylevar line_height}*2}}/2};
}

.threadbit .threaddeleted .deletedby, .threadbit .threaddeleted dl.stats.deletereason {
margin-{vb:stylevar left}: 20px;
}

.threadbit .threadimod input {
position: absolute;
{vb:stylevar right}: 1em;
top: 0;
}

--------------- Added 1362765265 at 1362765265 ---------------

--------------- Added 1362765359 at 1362765359 ---------------

Solved! It's good to have friends who know more about this stuff. :p

I moved the threadpostedin section as described above, and then all I had to do was to add the following to additional.css:
.threadbit .threadpostedin {
float: left;
}
.threadbit.sgbit .threadpostedin {
float: left;
}