Announcement

Collapse
No announcement yet.

Homepage in new window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • attroll
    Senior Member
    • Jan 2003
    • 1093
    • 4.2.X

    Homepage in new window

    I am trying to change the postbit so that when a user has a web site and you click on it then it will open in a new window. But I can not get it to work. I have gotten it to work for viewing the users profile, but can not get it to work for there web site. Here are the two codes I have tried. What I added is in bold. What have I done wrong?

    <if condition="$show['homepage']">
    <tr><td class="vbmenu_option"><a href="$post[homepage]" target="_blank"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
    </if>

    <if condition="$show['homepage']">
    <tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]" target="_blank">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
    </if>
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    #2
    I just went into the postbit_legacy template and found this code:

    <if condition="$show['homepage']">
    <tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
    </if>

    and replaced it with this code:

    <if condition="$show['homepage']">
    <tr><td class="vbmenu_option"><a href="$post[homepage]" target="_blank"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
    </if>

    and saved the template.

    I made a new post and clicked on the popup nickname and when i clicked the homepage visit text, it opened in a new window.

    Maybe it doesn't work for you if you test it on a post that is still in post cache?
    Or maybe you edit the postbit template when you use postbit_template?

    Comment

    • attroll
      Senior Member
      • Jan 2003
      • 1093
      • 4.2.X

      #3
      Floris

      I have both my "postbit" and my "postbit_legacy" templates set to the following code:

      <tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]" target="_blank">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>

      So it should work. I don't know whay it does not because it does work for viewing there profile and that is set to:

      <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]userid=$post[userid]" target="_blank">$vbphrase[view_public_profile]</a></td></tr>

      Comment

      • Floris
        Senior Member
        • Dec 2001
        • 37767

        #4
        Originally posted by attroll
        Floris

        I have both my "postbit" and my "postbit_legacy" templates set to the following code:

        <tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]" target="_blank">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>

        So it should work. I don't know whay it does not because it does work for viewing there profile and that is set to:

        <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]userid=$post[userid]" target="_blank">$vbphrase[view_public_profile]</a></td></tr>
        Doesn't work because : ... (see red text)

        <tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]" target="_blank">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>


        This does work because : .... (see red text)

        <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]userid=$post[userid]" target="_blank">$vbphrase[view_public_profile]</a></td></tr>

        You can't use target="_blank" in a phrase, it has to be in the <a> tag.

        Comment

        • attroll
          Senior Member
          • Jan 2003
          • 1093
          • 4.2.X

          #5
          I found this issue. I created a mod that lets me use the old postbit style. It works with the default postbit that comes with VB3 but it does not work with this new mode that I installed from the vBulletin site. This is what I did to creat the new one. Maybe you can see that I have done wrong:

          (1) Create a new Custom Profile Field of the your choosing (yes/no / radio / select). I am going to use a single-selection menu for this demo. I put in two options "Top" and "Left". At the very bottom of the custom profile edit page, set the Display Page option to Options: Thread Viewing. Submit your new profile field.

          (2) Now you are redirected to your list of custom profile fields. Find the new field you selected and note its Name. Mine is called field7 for example.

          (3) Then I placed this in my phpinclude_start template: PHP Code:
          PHP Code:
          if ($bbuserinfo['field7'] == 'Left')
          {
          $vboptions['legacypostbit'] = 1;

          Now everyone will default to top style but can choose left style in their User CP. You can adjust the code to default everyone to left style by enabling the vboption for legacy postbit and then changing the above code to: PHP Code:
          PHP Code:
          if ($bbuserinfo['field7'] == 'Top')
          {
          $vboptions['legacypostbit'] = 0;


          Hopefully it was something I overlooked.

          Comment

          • attroll
            Senior Member
            • Jan 2003
            • 1093
            • 4.2.X

            #6
            Thank you Floris. I can not believe I over looked that. I feel like a dumb ass now.

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            😀
            🥰
            🤢
            😎
            😡
            👍
            👎