vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Optionally open thread in new window (https://vborg.vbsupport.ru/showthread.php?t=103225)

ericgtr 12-17-2005 10:00 PM

Optionally open thread in new window
 
This is something my users really enjoy. Appended to the end of each thread title in the forumdisplay is an image that they can click on to open it in a new window.

In your threadbit template find:
Code:

<strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a></strong>
Add this underneath:
Code:

<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" target="_blank"><img src="$stylevar[imgdir_misc]/new_window.gif" alt="New Window" width="16" height="16" border="0"></a>
Now upload this image to your forums/images/misc directory http://www.guitars101.com/vb/images/...new_window.gif

That's it! :)

rb290 12-18-2005 07:00 PM

good stuff!
i shall click install.

GoNz00 12-18-2005 07:09 PM

thanks :)

works on 3.5.2

ericgtr 12-18-2005 07:37 PM

Quote:

Originally Posted by GoNz00
thanks :)

works on 3.5.2

Good to know, thanks. Glad it's getting some use :)

Mark.B 12-18-2005 08:40 PM

Nice idea, I've adapted this to work in 3.0 and used it there.

Allan 12-18-2005 10:45 PM

Nice idea :)

click install

The Realist 12-19-2005 07:51 PM

Dont show up on my forums.

ericgtr 12-19-2005 08:25 PM

Quote:

Originally Posted by The Realist
Dont show up on my forums.

Did you upload the image to your board/images/misc directory? If you have a special theme you may have to upload it there.

The Realist 12-20-2005 08:38 AM

yep and still no show.

ericgtr 12-20-2005 02:54 PM

Quote:

Originally Posted by The Realist
yep and still no show.

Hmm.. Are you using 3.5.0? (it says that under your avatar) I am not sure what (if any) differences there are between the two versions. I would doulbe check your threadbit template and look for similarities.

Breathex 12-30-2005 04:42 AM

nice hack thanks, installed

Mastar 12-30-2005 03:06 PM

Not showing on mine either. Vb3.52 I uploaded the images and point the link directly to the image and still nothing.

bashy 12-30-2005 03:35 PM

Wheres the image as i would likr o try this?

Bashy

Mastar 12-30-2005 04:04 PM

K! Found my problem and hope it solves anyone else's.

Look for this:
Code:


<if condition="$show['gotonewpost']">
                                <strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a></strong>

                        <else />

Then you place the Mod Coding after:

Code:

<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" target="_blank"><img src="$stylevar[imgdir_misc]/new_window.gif" alt="New Window" width="16" height="16" border="0"></a>
The images doesn't show on the end like the above image but rather to the left of the title.

or you can place it after:

Code:

<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>
To make it show on the right of the thread title.

cbr929rrerion 01-02-2006 05:32 AM

where can we put this in 3.5 to work on forumdisplay and showthread

cbr929rrerion 01-02-2006 05:35 AM

clicks install also

GamerJunk.net 01-02-2006 06:41 AM

It's only showing up on one of my threads wtf? lol

cbr929rrerion 01-02-2006 06:42 PM

Yeah I noticed its not showing on all of mine either.. like 1/2 of them..

macgyver24 04-17-2006 01:34 PM

I could not make it work with the instructions so here is what worked for me on the latest version of vb. Find the line bellow in the same place the original instructions say to in the threadbit template but instead look for the line bellow and add the code above or bellow it. If you add above it the icon will be to the left if you add bellow it the icon will be to the right. I have attached my threadbit for admin or anyone else to see.

<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>

Here is mine to the right:

<else />
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" target="_blank"><img src="$stylevar[imgdir_misc]/new_window.gif" alt="New Window" width="16" height="16" border="0"></a>
</if>


Admin/Mod ... Please edit my post accordingly I know you want it your way so please make changes as you see fit. I hope this helps anyone else with problems.

virtualno 04-23-2006 09:57 PM

U can also add like this:

<a href="showthread.php?goto=lastpost&$session[sessionurl]t=$thread[threadid]$thread[highlight]" target="_blank"><img src="$stylevar[imgdir_misc]/new_window.gif" alt="New Window" width="16" height="16" border="0"></a>

to go to last post.

I think that is better.

Titania 04-30-2006 06:25 AM

That's cool :D

I combined macgyver24 and virtualno's tweaks and added a new image (attached) to my forum/images/misc directory to have the option of both :)

I've attached a screen grab from my board as an example too.


<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" target="_blank"><img src="$stylevar[imgdir_misc]/new_window.gif" alt="New Window" width="16" height="16" border="0"></a>
<a href="showthread.php?goto=lastpost&$session[sessionurl]t=$thread[threadid]$thread[highlight]" target="_blank"><img src="$stylevar[imgdir_misc]/new_window_last.gif" alt="New Window" width="16" height="16" border="0"></a>

filmking 04-30-2006 07:17 PM

Thanks Titania and Virtualno... finally got it working. And thanks to original author too

fib 05-01-2006 05:06 PM

Just an addition -it needs done for both a new post (strong) thread and a read thread.

This may be a longer way around (I am no expert but this worked for me)
Thank you to the original poster and the others.

Mine turned out like this
Code:

                        <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
                        $thread[movedprefix]
                        $thread[typeprefix]
                        $thread[moderatedprefix]
                        <if condition="$show['gotonewpost']">
                                <strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a></strong>

<!-- 1st entry for post in new window -->
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" target="_blank"><img src="$stylevar[imgdir_misc]/new_window.gif" alt="open this thread in a new window" width="16" height="16" border="0"></a>
<!-- end 1st -->
                        <else />
                                <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>

<!-- 2nd entry for post in new window -->
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" target="_blank"><img src="$stylevar[imgdir_misc]/new_window.gif" alt="open this thread in a new window" width="16" height="16" border="0"></a>
<!-- end 2nd -->

                        </if>

I have added the start of the if so you can see how it falls in.
I realise that I am no expert so be gentle.

ar2 05-10-2006 08:00 PM

I've got a little problem, "open in new window" icon appears only next to unread threads, when the subject have been read already there is no icon.

any suggestions ?

forum.hdtv.com.pl

mcyates 05-23-2006 08:40 AM

Quote:

Originally Posted by macgyver24
I could not make it work with the instructions so here is what worked for me on the latest version of vb. Find the line bellow in the same place the original instructions say to in the threadbit template but instead look for the line bellow and add the code above or bellow it. If you add above it the icon will be to the left if you add bellow it the icon will be to the right. I have attached my threadbit for admin or anyone else to see.

<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>

Here is mine to the right:

<else />
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" target="_blank"><img src="$stylevar[imgdir_misc]/new_window.gif" alt="New Window" width="16" height="16" border="0"></a>
</if>


Admin/Mod ... Please edit my post accordingly I know you want it your way so please make changes as you see fit. I hope this helps anyone else with problems.

Thank You very much ,this works for my forum which is version 3.5.4

Thanks again :)

Darat 05-29-2006 12:12 PM

Quote:

Originally Posted by fib
Just an addition -it needs done for both a new post (strong) thread and a read thread.

This may be a longer way around (I am no expert but this worked for me)
Thank you to the original poster and the others.

Mine turned out like this

...snip...

I have added the start of the if so you can see how it falls in.
I realise that I am no expert so be gentle.

Since you want it to appear which ever condition is met by the IF statement just put the code either above or below the IF ELSE section code depending whether you want it to display to the right or left of the thread title.

________________

I found the original icon a bit too vibrant on my board so I toned it down, I also cut the original icon down to make it very small (but it's not now as clear as the original icon as to what it does.) If anyone wants to use these versions feel free to do so.


All times are GMT. The time now is 07:02 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.01249 seconds
  • Memory Usage 1,796KB
  • 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
  • (6)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (26)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