Announcement

Collapse
No announcement yet.

Open new window from lastposter links

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Open new window from lastposter links

    I've made it so that when someone goes to view a member's profile, it opens in a new window with a predefined size and configuration. I'm using this javascript to make it happen:

    Code:
    <a href="#" onclick="window.open('TARGET URL', '', 'width=760,height=480,menubar=no,toolbar=no,scrollbars=yes,resizable=no,location=no'); return true;">LINK TEXT</a>
    I have it working in the Quick Links menu, and it works in the postbit username menu.

    But I cannot get it working with the usernames in the Last Post column, nor the link for thread starter. The links are handled differently there, and I can't figure out how to make it work. A solution would be greatly appreciated!
    Last edited by cbiweb; Thu 19th May '05, 2:53pm.
    ~ Life isn't always fair, but you can be. ~

  • #2
    The link is stored in a phrase:

    Admin CP --> Languages & Phrases --> Search in Phrases

    Do a Phrase Variable Name Only search for by_x and you can edit the link data there.

    Changing this one phrase will change it both for the last post column and the thread starter.
    Bugdar: PHP bug tracking software that is beautiful, fast, and robust.

    Comment


    • #3
      Thanks, daemon, but that's just not working.

      How do I add this...

      Code:
      <a href="#" onclick="window.open('member.php?$session[sessionurl]find=lastposter&amp;f=$lastpostinfo[forumid]', '', 'width=760,height=480,menubar=no,toolbar=no,scrollbars=yes,resizable=no,location=no'); return true;">
      To this...

      Code:
      by <a href="{1}">{2}</a>
      And get it to work?
      ~ Life isn't always fair, but you can be. ~

      Comment


      • #4
        Change it to this:

        Code:
        by <a href="#" onclick="window.open('{1}', '', 'width=760,height=480,menubar=no,toolbar=no,scroll  bars=yes,resizable=no,location=no'); return true;">{2}</a>
        .... note the above code has word wrap enabled, so remove the odd spacing bit in the middle of the string.
        Bugdar: PHP bug tracking software that is beautiful, fast, and robust.

        Comment


        • #5
          Well whaddya know. Works like a charm. Thank you!

          It's official - I'm a dunce.
          ~ Life isn't always fair, but you can be. ~

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X