Results 1 to 3 of 3

Thread: Multiple News Module Issues

  1. #1
    Join Date
    Aug 2004
    Posts
    353

    Default Multiple News Module Issues

    Can't really show whats going on, but I will try to explain...

    Have 3 parent news modules on page.
    Have 3 archived news modules on page, attached to the 3 parent news modules.
    Have a 4th news module, no archive.

    If you place the 4th somewhere without an archive attached to it, it disappears, not in source code anywhere. So it shouldn't be a HTML rendering issue.

    If you remove the 3 archive news modules from the page, the 4th parent module will show up anywhere, works fine.

    If you add another archive module with the 4th as a parent, and place that on the page along with the other 3 archives, the 4th parent will then show up.

    Custom template modules show up fine anywhere.
    Buddy List and Stats module show up fine anywhere.

    Basically, from what I was able to deduct from testing, if you have multiple parent news modules with archives, then they all must have archives, or else the parent ones without archives will not show up, regardless of where modules are placed on the page order wise.


    And one more variable to toss in...

    If the 4th parent news module is one that "pulls from thread", and it does not have an archive module attached to it, and you place it BEFORE ALL other modules, then it will show up. If you place it after any of the other 6 news/archive modules, it disappears.

    Typing this gave me a headache, so I hope it makes sense.

    Later.

  2. #2
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Multiple News Module Issues

    This sounds similar to a bug that I fixed in the dev files a couple of weeks ago. Try opening up your modules/news.php file, look for this code at the very top:
    PHP Code:
    if (!$newsprocessed[$mods['modid']])
    {
        foreach (
    $modules AS $omodid)
        {
            
    $omods =& $vbulletin->adv_modules[$omodid];
            
    // Archive comes first
            
    if (($mods['parent'] AND $mods['parent'] == $omods['identifier']) OR (!$mods['parent'] AND $mods['modid'] == $omods['modid']))
            {
                
    $newsmod $vbulletin->adv_modules[$omods['modid']];
            }
            else if ((
    $mods['parent'] AND $mods['modid'] == $omods['modid']) OR (!$mods['parent'] AND $omods['parent'] == $mods['identifier']))
            {
                
    $archivemod $vbulletin->adv_modules[$omods['modid']];
            }
        }
    }

    $currentmodule = ($mods['modid'] == $newsmod['modid']) ? 'news' 'archive';

    if (!
    $newsprocessed[$newsmod['modid']] AND (!$newsprocessed[$archivemod['modid']] OR !$archivemod['modid'])) 
    Replace with this:
    PHP Code:
    $hasarchive false;
    if (!
    $newsprocessed[$mods['modid']])
    {
        foreach (
    $modules AS $omodid)
        {
            
    $omods =& $vbulletin->adv_modules[$omodid];
            
    // Archive comes first
            
    if (($mods['parent'] AND $mods['parent'] == $omods['identifier']) OR (!$mods['parent'] AND $mods['modid'] == $omods['modid']))
            {
                
    $newsmod $vbulletin->adv_modules[$omods['modid']];
            }
            else if ((
    $mods['parent'] AND $mods['modid'] == $omods['modid']) OR (!$mods['parent'] AND $omods['parent'] == $mods['identifier']))
            {
                
    $hasarchive true;
                
    $archivemod $vbulletin->adv_modules[$omods['modid']];
            }
        }
    }

    $currentmodule = ($mods['modid'] == $newsmod['modid']) ? 'news' 'archive';

    if (!
    $newsprocessed[$newsmod['modid']] AND (!$newsprocessed[$archivemod['modid']] OR !$hasarchive)) 
    And see if that works any better.

  3. #3
    Join Date
    Aug 2004
    Posts
    353

    Default Re: Multiple News Module Issues

    That seems to have worked, thanks Brian. Ill post here if there are any other issues, but it looks fixed upon first run.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. News modules on multiple forums
    By chauy in forum Troubleshooting & Problems
    Replies: 3
    Last Post: 12-04-2005, 05:09 PM
  2. Multiple Quotes Post in 'News' module causes probs
    By bi11i in forum Troubleshooting & Problems
    Replies: 2
    Last Post: 07-19-2005, 04:57 PM
  3. Multiple news pages?
    By paradoxic in forum Troubleshooting / "How do I..." Questions
    Replies: 2
    Last Post: 12-30-2004, 02:35 PM
  4. Multiple Issues
    By C_P in forum Troubleshooting / "How do I..." Questions
    Replies: 5
    Last Post: 09-13-2004, 02:20 PM
  5. Multiple Attachments on News
    By Shon in forum Add-On Modules & Modifications
    Replies: 4
    Last Post: 06-17-2004, 02:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •