vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Username in New Forum Posts (https://vborg.vbsupport.ru/showthread.php?t=281119)

Skivey 04-04-2012 06:49 PM

Username in New Forum Posts
 
New Forum Posts block shows the users avatar, but is there a way to make it show the usernames?

Thanks

Matt

kh99 04-04-2012 07:15 PM

You could try editing the template block_newposts and adding {vb:raw post.username} where you want it.

Skivey 04-04-2012 07:37 PM

ok im really trying, and not amazing at php or html.

<vb:if condition="$post['showavatar']">
<img width="30" title="" src="{vb:raw post.avatarurl}" alt=""/>
<vb:else />
<img width="30" title="" src="{vb:stylevar imgdir_misc}/unknown.gif" alt=""/>
</vb:if>
<vb:if condition="$post['userid']">
</a>
</vb:if>
{vb:raw post.username}
<br></br>

</div>
</vb:if>
</div>
<div class="smallavatartext widget_post_comment<vb:if condition="!$vboptions['avatarenabled']">_noavatar</vb:if>">

This is where I put it, and im moving it about but it seems to just overwrite everything..

--------------- Added [DATE]1333576260[/DATE] at [TIME]1333576260[/TIME] ---------------

dammit, ive broke the whole bloody thing now, and i didnt save a copy of it. Any way of reseting it back to what it should be?

kh99 04-04-2012 09:36 PM

I'm not really big on the layout stuff myself, but this seems to work (The line in red added):

Code:

                                <vb:if condition="$vboptions['avatarenabled']">
                                <div class="cms_widget_post_useravatar widget_post_useravatar">
                                        <vb:if condition="$post['userid']">
                                                <a class="smallavatar comments_member_avatar_link" href="{vb:link member, {vb:raw post}}">
                                        </vb:if>
                                                <vb:if condition="$post['showavatar']">
                                                <img width="30" title="" src="{vb:raw post.avatarurl}" alt=""/>
                                                <vb:else />
                                                <img width="30" title="" src="{vb:stylevar imgdir_misc}/unknown.gif" alt=""/>
                                                </vb:if>
<br />{vb:raw post.username}
                                        <vb:if condition="$post['userid']">
                                                </a>
                                        </vb:if>
                                </div>
                                </vb:if>


Which style were you editing? If if was not "MASTER STYLE" then you can fix your template by reverting it (Edit Templates, find it in the list and select it, then press "Revert"). If you did edit the MASTER STYLE, maybe chunk I posted above will fix it? Otherwise send me a PM.


Edit: One more thing - when you're working on it, you need to configure the block to have "Cache Time (in minutes)" of 0 or else you won't see your changes. When you have it like you want it then you can increase it if you want.

Skivey 04-05-2012 03:28 PM

cache time is already done, it is what i want - but preferably i want it above the text to the right of the avatar.

http://www.rsclassics360.co.uk/community/forum.php

Thanks for helping though I really appreciate it

--------------- Added [DATE]1333648115[/DATE] at [TIME]1333648115[/TIME] ---------------

woohoo, ok i moved that down a bit and added some colour and boldness and boosh! :)

--------------- Added [DATE]1333648148[/DATE] at [TIME]1333648148[/TIME] ---------------

thanks for your help!!!


All times are GMT. The time now is 11:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02548 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete