Announcement

Collapse
No announcement yet.

Emulate a Forum as a Link

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

  • Emulate a Forum as a Link

    Mod, please move to Hints and Tips if you feel it's appropriate

    Okay, let's say you want to make one of your forums escentially a link to another forum or somewhere else altogether. But you don't want to hack (there's a hack to do it at vB.org). And since nobody knows a release date for vB3 we can just assume that vB3, which has this feature, is really a big conspiracy. So here's how to do it.

    1. Create a new forum; set it to not act as a forum (i.e., act as a category). This is simply to hide the new post icon which will not work accurately if you're linking to another forum).
    2. Find out the newly created forum's id; to do this, go to your forum's home page and hover your mouse over the name of the forum and look at your browser's status bar. The very last number in the URL should be the forum id.
    3. Edit your phpinclude template; add this to whatever you have in there already:
    Code:
    if ($forumid == #)
    {
        header('Location: url');
        exit;
    }
    Replace the blue text with the forum id from step 2.

    If you are linking to a completely external page, replace the red text with the URL you want that forum to act as a link to.
    If you're linking to another forum, replace the entire "header(..." line with this:
    Code:
    header('Location: forumdisplay.php?s=' . $session[sessionhash] . '&forumid=#');
    Replace the green # with the id of the forum to which you want to link.
    4. Save the template and enjoy.

    Questions?

    You can see this in action at my forums. The very last category ("All Other Forums") links to a different set of forums. Notice how the linked forum's id is 90 but the forum you get when you click the link is 19.
    --filburt1, vBulletin.org/vBulletinTemplates.com moderator
    Web Design Forums.net: vB Board of the Month
    vBulletin Mail System (vBMS): webmail for your forum users

  • #2
    Here is a method that doesn't require changing any php files.

    http://www.vbulletin.com/forum/showt...threadid=53153
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      IMHO this is cleaner just because the forum truly does act as a link and isn't cheated Jake's cheap way

      But whatever.
      --filburt1, vBulletin.org/vBulletinTemplates.com moderator
      Web Design Forums.net: vB Board of the Month
      vBulletin Mail System (vBMS): webmail for your forum users

      Comment


      • #4
        I was about to suggest using the way wluke brought up, because it's far easier than setting up some PHP to do it.

        Comment


        • #5
          Right. But let's say you try visiting the forum via the dropdown or just guessing a forum id, even. This way will work regardless of the situation; Jake's way only works if you click a link to the forum (yes, that's most of the hits for entry, but mine's all inclusive).

          Edit: BTW Wayne this is only editing the phpinclude template, no actual file changes.
          --filburt1, vBulletin.org/vBulletinTemplates.com moderator
          Web Design Forums.net: vB Board of the Month
          vBulletin Mail System (vBMS): webmail for your forum users

          Comment


          • #6
            Yes.

            Originally posted by filburt1
            Edit: BTW Wayne this is only editing the phpinclude template, no actual file changes.
            I was just woundering how todo this very thing, i just added it into my phpinclude template and it works fine, thanks to who ever made this addition.

            Blazze

            Comment

            Related Topics

            Collapse

            Working...
            X