vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - When quoted, whole author name and a phrase are a link to original post (https://vborg.vbsupport.ru/showthread.php?t=314195)

Alan_SP 09-07-2014 10:00 PM

When quoted, whole author name and a phrase are a link to original post
 
1 Attachment(s)
It's a simple enhancements how quote BBcode shows itself.

In case that there's author's name and postid of quoted post, whole text (phrase plus authors name) becomes link, not just small image at the end of text. Many users don't know that this small image is actually link to original post, but with this, they maybe start use it more often.

Example is here:

Attachment 150331

On my site links in posts are red at the moment, so it's obvious what's a link, and what isn't. In code I left both image (first for quoting and second image that originally is a link to original post)

To achieve this, you first need to find template bbcode_quote

Then you need to find this code:

HTML Code:

                                        <img src="{vb:stylevar imgdir_misc}/quote_icon.png" alt="{vb:rawphrase quote}" /> {vb:rawphrase originally_posted_by_x, {vb:raw username}}
                                        <vb:if condition="$postid"><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}showthread.php?{vb:raw session.sessionurl}p={vb:raw postid}#post{vb:raw postid}" rel="nofollow"><img class="inlineimg" src="{vb:stylevar imgdir_button}/viewpost-{vb:stylevar right}.png" alt="{vb:rawphrase view_post}" /></a></vb:if>

and replace it with this code:

HTML Code:

                                        <vb:if condition="$postid"><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}showthread.php?{vb:raw session.sessionurl}p={vb:raw postid}#post{vb:raw postid}" rel="nofollow"><img src="{vb:stylevar imgdir_misc}/quote_icon.png" alt="{vb:rawphrase quote}" /> {vb:rawphrase originally_posted_by_x, {vb:raw username}} <img class="inlineimg" src="{vb:stylevar imgdir_button}/viewpost-{vb:stylevar right}.png" alt="{vb:rawphrase view_post}" /></a>
<vb:else />
<img src="{vb:stylevar imgdir_misc}/quote_icon.png" alt="{vb:rawphrase quote}" /> {vb:rawphrase originally_posted_by_x, {vb:raw username}}
</vb:if>

If you want, you could remove one or both images.

If you apply it, because posts are cached, only new posts will reflect this change immediately. So, you need to post new post with some quoted text with authors name and postid to see how it looks like on your site.

final kaoss 11-05-2018 10:34 PM

Seems interesting, does it work with 4.2.5?

Alan_SP 11-06-2018 06:31 PM

If they didn't changed html, of course. This is just change in links' scope, nothing else. Even with a bit different html, you can change links' scope easily.

scottkoz20 11-18-2018 01:20 AM

Quote:

Originally Posted by final kaoss (Post 2597232)
Seems interesting, does it work with 4.2.5?

it does - though I think it might be better to click the link to trigger to the member profile page or start a PM to the member... just a thought

I can see someone saying that the link "doesn't work" on my site :erm:

Alan_SP 11-18-2018 07:16 PM

Quote:

Originally Posted by scottkoz20 (Post 2597447)
it does - though I think it might be better to click the link to trigger to the member profile page or start a PM to the member... just a thought

Well, I think you missed what's discussed here. This is for quotes, so you want link to original post. There, after you follow link to original post you can access user's profile, send PM, or whatever you want.

scottkoz20 11-18-2018 07:33 PM

Quote:

Originally Posted by Alan_SP (Post 2597454)
Well, I think you missed what's discussed here. This is for quotes, so you want link to original post. There, after you follow link to original post you can access user's profile, send PM, or whatever you want.

I know exactly what was/is being discussed here. I was only giving something that I believe would be more useful for my site along with answering kaoss's question about working on 4.2.5

Alan_SP 11-18-2018 07:41 PM

This is simple template modification, to change links' scope. But, for adding other links, you'll need to have some modification (i.e. much more coding, accessing database to know who original author is, as in quote it is only textual info, without real link to user's ID).

scottkoz20 11-18-2018 09:36 PM

Quote:

Originally Posted by Alan_SP (Post 2597456)
This is simple template modification, to change links' scope. But, for adding other links, you'll need to have some modification (i.e. much more coding, accessing database to know who original author is, as in quote it is only textual info, without real link to user's ID).

yes - no disagreement

If/when I make any adjustments, I'll pass it by you first to ensure you are good with me posting any updates

Alan_SP 11-19-2018 07:10 PM

There's no need, I tagged it reusable, anyone can make changes as they like them. So, go ahead, do whatever you want.


All times are GMT. The time now is 10:35 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.01102 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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