vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 5.x Products & Extensions (https://vborg.vbsupport.ru/forumdisplay.php?f=258)
-   -   Show Thread Enhancements - Yilmaz - Thread Starter vB5 (https://vborg.vbsupport.ru/showthread.php?t=328492)

milforum 01-10-2021 11:10 AM

I'm no big expert on this, but what I find by searching in templates is that conversation_userinfo hasn't been changed in any of the styles. So it's default, which is like this:

{vb:set schemaAuthor.itemprop, author}
{vb:set schemaAuthor.itemscope, 1}
{vb:set schemaAuthor.itemtype, http://schema.org/Person}

<div class="userinfo b-userinfo b-post__hide-when-deleted" {vb:schema {vb:raw schemaAuthor}}>
<vb:if condition="$user['showavatars']">
{vb:set avatarbase, ''}
<vb:if condition="empty($conversation['avatar']['isfullurl'])">
{vb:set avatarbase, {vb:raw baseurl_corecdn}}
{vb:strcat {vb:raw avatarbase}, "/"}
</vb:if>

<vb:if condition="!$conversation['userid'] AND $conversation['avatar']['avatarpath'] AND $conversation['avatar']['hascustom']">
<span class="b-avatar b-avatar--m b-avatar--thread h-margin-bottom-l"><img src="{vb:raw avatarbase}{vb:raw conversation.avatar.avatarpath}" alt="{vb:raw conversation.authorname}" title="{vb:raw conversation.authorname}" /></span>
<vb:elseif condition="!$conversation['userid']" />
<span class="b-avatar b-avatar--m b-avatar--thread h-margin-bottom-l"><img src="{vb:raw avatarbase}images/default/default_avatar_medium.png" width="64" height="64" alt="{vb:phrase guest_avatar}" title="{vb:phrase guest_avatar}" /></span>
<vb:elseif condition="!empty($conversation['senderAvatar']) AND !empty($conversation['senderAvatar']['avatarpath']) AND !empty($conversation['senderAvatar']['hascustom'])" />
<a href="{vb:url 'profile', {vb:raw conversation}}" class="b-avatar b-avatar--m b-avatar--thread h-margin-bottom-l"><img src="{vb:raw avatarbase}{vb:raw conversation.senderAvatar.avatarpath}" alt="{vb:raw conversation.authorname}" title="{vb:raw conversation.authorname}" /></a>
<vb:elseif condition="$conversation['avatar'] AND $conversation['avatar']['avatarpath'] AND $conversation['avatar']['hascustom']" />
<a href="{vb:url 'profile', {vb:raw conversation}}" class="b-avatar b-avatar--m b-avatar--thread h-margin-bottom-l"><img src="{vb:raw avatarbase}{vb:raw conversation.avatar.avatarpath}" alt="{vb:raw conversation.authorname}" title="{vb:raw conversation.authorname}" /></a>
<vb:else />
<a href="{vb:url 'profile', {vb:raw conversation}}" class="b-avatar b-avatar--m b-avatar--thread h-margin-bottom-l"><img src="{vb:raw avatarbase}images/default/default_avatar_medium.png" width="64" height="64" alt="{vb:raw conversation.authorname}" title="{vb:raw conversation.authorname}" /></a>
</vb:if>
</vb:if>
<!-- responsive alteration: Added userinfo-details wrapper in order to
support left floated avatar with all other information on the right. -->
{vb:set userInfo, {vb:raw conversation.userinfo}}
<div class="b-userinfo__details">
{vb:set schemaAuthor.itemprop, name}
<div class="author h-text-size--14">
<strong><vb:if condition="$conversation['userid'] > 0"><a href="{vb:url 'profile', {vb:raw conversation}}" {vb:schema schemaAuthor}></vb:if><vb:if condition="isset($conversation['musername'])">{vb:raw conversation.musername}<vb:elseif condition="isset($conversation['authorname'])" />{vb:raw conversation.authorname}<vb:else />{vb:phrase guest}</vb:if><vb:if condition="$conversation['userid'] > 0"></a></vb:if></strong>
{vb:template pmchat_userinfo_link, conversation={vb:raw conversation}}
</div>
{vb:hook 'conversation_above_usertitle'}
<vb:if condition="!empty($userInfo['usertitle'])">
<vb:comment>usertitle is already html escaped in the userInfo array, if it's required</vb:comment>
<div class="usertitle">{vb:raw userInfo.usertitle}</div>
</vb:if>
{vb:set reputationimglevel {vb:raw conversation.reputationimg.level}}

<div class="b-meter h-margin-top-m {vb:raw conversation.reputationimg.type}" title="{vb:rawphrase {vb:raw reputationimglevel}}">
{vb:set counter, {vb:php range, 1,5}}
<vb:each from="counter" value="nr">
<div class="b-meter__bar<vb:if condition="$conversation['reputationimg']['bars'] >= $nr"> b-meter__bar--selected</vb:if>"></div>
<div class="b-meter__bar<vb:if condition="$conversation['reputationimg']['bars'] >= $nr"> b-meter__bar--selected</vb:if>"></div>
</vb:each>
</div>

<div class="b-userinfo__rank h-margin-top-s{vb:if "empty($userInfo['rank'])", ' h-hide'}">{vb:raw userInfo.rank}</div>

<ul class="b-userinfo__additional-info-block h-margin-top-xl">
<vb:if condition="$conversation['userid'] > 0">
<li class="b-userinfo__additional-info"><label>{vb:phrase join_date}:</label> <span>{vb:date {vb:raw userInfo.joindate}, 'registered'}</span></li>
<li class="b-userinfo__additional-info"><label>{vb:phrase posts}:</label> <span>{vb:raw userInfo.posts}</span></li>
<vb:if condition="isset($conversation['postelements']) AND $conversation['postelements'] == 4">
<li class="b-userinfo__additional-info"><label>{vb:phrase infractions}:</phrase><span>{vb:raw conversation.warnings}/{vb:raw conversation.infractions} ({vb:raw conversation.ipoints})</span></li>
</vb:if>
</vb:if>
<vb:each from="userInfo.userfield" key="categoryname" value="category">
<vb:each from="category" key="fieldname" value="field">
<vb:if condition="$field['showonpost']">
<li class="b-userinfo__additional-info"><label>{vb:phrase {vb:raw fieldname}}:</label> <span>{vb:raw field.val}</span></li>
</vb:if>
</vb:each>
</vb:each>
{vb:hook 'conversation_userstats'}
</ul>
<ul class="b-userinfo__icons h-margin-none">
<vb:if condition="$conversation['online'] == 'online'">
{vb:set olstatus, ' online'}
<vb:else />
{vb:set olstatus, ' offline'}
</vb:if>
<li class="b-userinfo__icon h-left" title="<vb:if condition="$olstatus == ' online'">{vb:rawphrase x_is_online_now, {vb:raw conversation.authorname}}<vb:else />{vb:rawphrase x_is_offline, {vb:raw conversation.authorname}}</vb:if>"><span class="b-icon b-icon__status--<vb:if condition="$conversation['online']=='online'">green<vb:else />gray</vb:if>"></span></li>

{vb:template conversation_signature, type=collapsed, conversation={vb:raw conversation}, collapsedClass="b-userinfo__icon h-left"}
</ul>
</div>
</div>

milforum 01-10-2021 11:13 AM

Furthermore, when looking into Products & hooks in AdminCP, I find your module listed as active with hook location ---conversation_userstats and hook arguments: conversation=conversation .

I'm not sure if this helps.

yilmaz 01-10-2021 12:57 PM

Quote:

Originally Posted by milforum (Post 2605688)
Furthermore, when looking into Products & hooks in AdminCP, I find your module listed as active with hook location ---conversation_userstats and hook arguments: conversation=conversation .

I'm not sure if this helps.

you-site/admincp/options.php?do=options&dogroup=plugin

Enable Hook System "Yes"?
Are plugs from config.php disabled?

Argument "conversation" is required to define the users ID

You must have a template called "yilmazthreadauthor"

milforum 01-10-2021 04:39 PM

I feel bad about stealing time from you, @yilmaz, but I'm not very skilled in the inner workings of vBulletin.

However, I found that Hook System is enabled.

config.php (residing in /core/includes) was updated when I updated to 5.6.4 in November 2020. As far as I can see, the only changes I've made is to set username/password etc for the database. Specifically, there is a line in the default setup for disabling hooks, but that's commented out: // define("DISABLE_HOOKS", true);

And, lastly, I find the module template yilmazthreadauthor in all styles.

yilmaz 01-10-2021 05:30 PM

Quote:

Originally Posted by milforum (Post 2605696)
I feel bad about stealing time from you, @yilmaz, but I'm not very skilled in the inner workings of vBulletin.

However, I found that Hook System is enabled.

config.php (residing in /core/includes) was updated when I updated to 5.6.4 in November 2020. As far as I can see, the only changes I've made is to set username/password etc for the database. Specifically, there is a line in the default setup for disabling hooks, but that's commented out: // define("DISABLE_HOOKS", true);

And, lastly, I find the module template yilmazthreadauthor in all styles.


Then let's do it manual.
Conversation_userinfo template should be on line 5
Search for this in templates
Code:

<div class="userinfo b-userinfo b-post__hide-when-deleted" {vb:schema {vb:raw schemaAuthor}}>

and add this code right above
HTML Code:

<vb:if condition="$conversation['userid'] == $conversation['starteruserid']">
{vb:cssExtra yilmazthreadauthor.css}
<div class="baslatan">{vb:phrase yilmaz_thread_author}</div>
</vb:if>

Note: The new editors are very sensitive, you should be careful that they affect unwanted places when copying / pasting.

milforum 01-10-2021 06:52 PM

There! Works like a charm! Thanks a lot for your help. Donations will be coming your way. :)

DamasGate 01-31-2021 06:56 PM

1 Attachment(s)
Thank you brother Yilmaz,

It need fix to support RTL style.

I am not expert enough to modify css template

Any help please ?

Thank you again.

DamasGate 01-31-2021 08:46 PM

Working now.


In yilmazthreadauthor.css


Changed



Code:

left: -10px;

to


Code:

{vb:stylevar left}: -10px;

Thank you very much.

yilmaz 02-01-2021 07:09 AM

Quote:

Originally Posted by DamasGate (Post 2606047)
Working now.
In yilmazthreadauthor.css
Changed
Code:

left: -10px;
to
Code:

{vb:stylevar left}: -10px;
Thank you very much.

Great, I will always consider it from now on.
It will work very well.
Thanks @DamasGate :up:

yilmaz 02-18-2021 11:07 PM

Version 1.0.1 has been improved


All times are GMT. The time now is 12:54 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.01387 seconds
  • Memory Usage 1,764KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete