View Full Version : Help request! A new look for lattest topic
Hi everyone,
I have read and use the guide for lattest topic on this link
http://www.vbadvanced.com/forum/showthread.php?t=831
However, I want to dispaly JUST the title of the lattestpost (without poster, date..). How can I edit the code ? I am newbie to php. So can you tell me in details ?
Thanks in advance and sorry for my poor English!
Code removed
memobug
10-17-2004, 03:51 AM
1. You want to edit a template, not the code
Specifically adv_portal_latesttopics
which you'll find in the AdminCP StyleManager when you Edit Templates and expand vbAdvanced CMPS Templates
2. It's mostly HTML so you can play with it. Take out the parts you don't need and click preview to see if it is displaying the ones you want before you save it.
Regards,
Matt
Thanks for you guide ! I will try it and let you know It is ok or not !
Thanks a gain!
1. You want to edit a template, not the code
Specifically adv_portal_latesttopics
which you'll find in the AdminCP StyleManager when you Edit Templates and expand vbAdvanced CMPS Templates
2. It's mostly HTML so you can play with it. Take out the parts you don't need and click preview to see if it is displaying the ones you want before you save it.
Regards,
Matt
I have tried to edit the template but nothing change . Can you help to take a look at it ?
<!-- Latest Threads -->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder"width="100%">
<tr>
<td <if condition="$mods['modcol'] == 1">colspan="6"</if> class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] Tin t?c</strong></span></td>
</tr>
<if condition="$mods['modcol'] == 1">
<tr>
<if condition="$vba_options['portal_threads_showicon']">
<td class="thead" width="5"> </td>
</if>
<td class="thead" width="100%"><span class="smallfont">$vbphrase[title_username_date]</span></td>
<if condition="$show['lastpost']">
<td align="center" class="thead" nowrap="nowrap" width="25%"><span class="smallfont">$vbphrase[last_post]</span></td>
</if>
<td class="thead" width="15"><span class="smallfont">$vbphrase[replies]</span></td>
<td class="thead" width="15"><span class="smallfont">$vbphrase[views]</span></td>
<if condition="$vba_options['portal_threads_showforum']">
<td align="center" class="thead" width="10%"><span class="smallfont">$vbphrase[forum]</span></td>
</if>
</tr>
</if>
$threadbits
</table>
<br />
<!-- End Latest Threads -->
Thank in advance!
Scott_H
10-17-2004, 02:28 PM
Well for one he had you go to the wrong template, bad memobug. Now ttnb you first want to make sure all the options are off in the Latest Threads Options. For some reason you can turn everything off exept for thread views an replies so you do have to edit your templates. To make your changes open up the "adv_portal_latesttopicbits" and scroll to the end of that template to find:
<div class="smallfont">$thread[replycount] $vbphrase[replies], $thread[views] $vbphrase[views]</div>
this is what you either want to comment out or just delete. If you delete it you'll have to find it in the vbacmps_install.php when you want it back. So for now just comment it out:
<!-- <div class="smallfont">$thread[replycount] $vbphrase[replies], $thread[views] $vbphrase[views]</div> -->
Now there is a conditional for a different layout of some sort in the same template, I think it's if you have the latest threads block on your center column. I don't imagine you have your there if you want to strip it down.
Well for one he had you go to the wrong template, bad memobug. Now ttnb you first want to make sure all the options are off in the Latest Threads Options. For some reason you can turn everything off exept for thread views an replies so you do have to edit your templates. To make your changes open up the "adv_portal_latesttopicbits" and scroll to the end of that template to find:
<div class="smallfont">$thread[replycount] $vbphrase[replies], $thread[views] $vbphrase[views]</div>
this is what you either want to comment out or just delete. If you delete it you'll have to find it in the vbacmps_install.php when you want it back. So for now just comment it out:
<!-- <div class="smallfont">$thread[replycount] $vbphrase[replies], $thread[views] $vbphrase[views]</div> -->
Now there is a conditional for a different layout of some sort in the same template, I think it's if you have the latest threads block on your center column. I don't imagine you have your there if you want to strip it down.
Thanks for your help !
As you say I have to edit the adv_portal_latesttopicbits . However, in my forum I am using two lattest topic blocks . One is for lattest topics for discussion . The other one is for news . I want only the lattest topic for news be customed (do not show date, posters..). And the one for discussion is left as its default . If I edit the adv_portal_latesttopicbits as you say , it might effect both two blocks . Should i make a new template called adv_portal_lattestnewspit for news block ? If you know how to solve this problem please help me !
Thanks !
Might be I figure out how to do it. I have to edit the following
eval('$threadbits .= "' . fetch_template('adv_portal_latesttopicbits') . '";');
}
eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_latesttopics') . '";');
$DB_site->free_result($threads);
unset($thread, $foruminfo['allowratings']);
}
I still do not test it but i thinks it ok.
Brian
10-17-2004, 09:07 PM
Please do not post entire files like that.
If you're trying to change the look of the news posts you need to edit your 'adv_portal_newsbits' template.
1. Please do not post entire files like that.
2 If you're trying to change the look of the news posts you need to edit your 'adv_portal_newsbits' template.
1. Sorry for that Brian.
2.Can you tell me a little bit more details please ?
Finally I figure out how to edit ! Thanks for all your help !
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.