• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 3.x Series
    • Bug
    • Legacy Images Broken in vB4

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Legacy Images Broken in vB4

    • Issue Tools
      • View Changes
    1. issueid=1320 March 24, 2010 2:49 AM
      Miras Miras is offline
      New Member
      Legacy Images Broken in vB4

      hi

      after upgrade the images are not working anymore and same for the autolink
      rebuild namespaces but without any effect

      please help

      thx & br,
      miras
    Issue Details
    Issue Number 1320
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Install / Upgrade
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 3.0.0 Beta 6
    Fixed Version 3.0.0 RC 1
    Milestone VaultWiki 3.0.0
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)


    Page 2 of 2 FirstFirst Previous 12


    1. March 31, 2010 3:18 PM
      Miras Miras is offline
      New Member
      seems to happen to all images
      other example is: http://www.dieneuewelt.de/forum/show...tle=Bogenkampf

      Quote Originally Posted by Mokonzi
      Have you moved your images from the database to the file system recently?
      nope, since ever its running via database
      Reply Reply  
    2. March 31, 2010 3:23 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Just looked at the source of the page, noticed the link to the image is:

      attachment.php?attachmentid=&d=&stc=1

      Between the attachmentid= and the &amp should be the id number of the attachment (Example: attachment.php?attachmentid=1875&d=1257193874&stc=1&thumb=1) . Seems it's missing. Not sure why, but would explain why you're not getting the image.

      Edit: hmmm missing the bit in Blue as well.
      Reply Reply  
    3. March 31, 2010 3:32 PM
      pegasus pegasus is offline
      VaultWiki Team
      The name of the image page is "Sekret.gif". But is the filename of the image "Sekret.gif" or "sekret.gif"? You can check this by editing the page and looking in the Manage Attachments section. This is a very important distinction and could be causing the problem.
      Reply Reply  
    4. March 31, 2010 3:47 PM
      Miras Miras is offline
      New Member
      attachment:


      image:


      article:
      Reply Reply  
    5. March 31, 2010 4:03 PM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed for the next build. In vault/special_plugins_bbcode.php, find:
      Code:
      	if (empty($parsedtext))
      	{
      		$vault->parser['links'][$vault->parser['forumid'] . '-' . $post['postid']] = array();
      	}
      Add after:
      Code:
      	$imagepattern = '\[' . preg_quote($vault->namespacecache[IMAGE_SPACE]['bbcodetag'], '#') . '\](.*)(?:\||\[)';
      
      	if ($vbulletin->options['vault_legacy_enabled'] == 1)
      	{
      		$imagepattern = '(?:' . $imagepattern . '|\[\[' . preg_quote($GLOBALS['vbphrase']['mediawiki_image_name'], '#') . ':(.*)(?:\||\]))';
      	}
      Find:
      Code:
      		preg_match_all('#\[' . preg_quote($vault->namespacecache[IMAGE_SPACE]['bbcodetag'], '#') . '\](.*)(?:\||\[)#siU', $text, $matches)
      Replace with:
      Code:
      		preg_match_all('#' . $imagepattern . '#siU', $text, $matches)
      At this point, though, I'm not sure if that regex is still going to be faster than running the query all the time.
      Reply Reply  
    6. March 31, 2010 4:10 PM
      Miras Miras is offline
      New Member
      changed the code in the php-file
      rebuild namespace, update namespace functions
      still:
      Reply Reply  
    7. March 31, 2010 4:40 PM
      pegasus pegasus is offline
      VaultWiki Team
      Same file, vault/special_plugins_bbcode.php, find:
      Code:
      			foreach ($matches[1] AS $filename)
      			{
      				$filedat = $vault->fetch_article($filename, IMAGE_SPACE, $langid, '*', 'title');
      				$filenames[] = $vbulletin->db->escape_string($vault->strtolower($vault->urlencode($filename, IMAGE_SPACE, $filedat['languageid'])));
      			}
      Replace with:
      Code:
      			for ($i = 1; $i < 3; $i++)
      			{
      				if (is_array($matches["$i"]))
      				{
      					foreach ($matches["$i"] AS $filename)
      					{
      						$filedat = $vault->fetch_article($filename, IMAGE_SPACE, $langid, '*', 'title');
      						$filenames[] = $vbulletin->db->escape_string($vault->strtolower($vault->urlencode($filename, IMAGE_SPACE, $filedat['languageid'])));
      					}
      				}
      			}
      Reply Reply  
    8. March 31, 2010 5:03 PM
      Miras Miras is offline
      New Member
      now it is working:


      thank you, that saves us a lot of work (fixing a couple hundreds of articles)!
      Reply Reply  
    Page 2 of 2 FirstFirst Previous 12
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 3:55 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.