pics not shown - recent / random

pics not shown - recent / random

Postby pooldoktor » Fri Feb 24, 2012 9:53 am

Gallery Version: 1.1.4
phpBB Version: 3.0.9
Link zur Gallery http://www.pooldoktor.net/forum/gallery/index.php

Datenbank Version: MySQL 5


Fehlermeldung:
    Code: Select all
    pics not shown in random / recent pics

Fehlerbeschreibung und Nachricht
hi,

when I click on "New Pics" or "Recent Pics" in

http://www.pooldoktor.net/forum/gallery/index.php

... the pictures are not shown.

does anybody have an idea how this can happen?

correct link should be:
http://www.pooldoktor.net/forum/gallery ... ge_id=9904

this page creates the error link:
http://www.pooldoktor.net/gallery/image ... 504bb51685

... it seems the page root is set wrong... it should be www.pooldoktor.net/forum not www.pooldoktor.net
-> where can I change this root?

thanks.
Mario
pooldoktor
Posts 10 - 20
Posts 10 - 20
 
Posts: 14
Topics: 2
Joined: Mon Jan 23, 2012 11:29 pm

Re: pics not shown - recent / random

Postby nickvergessen » Fri Feb 24, 2012 3:27 pm

includes/gallery/url.php

But it might also be a missconfiguration in ACP > General > Server Settings
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5753
Topics: 218
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: pics not shown - recent / random

Postby pooldoktor » Fri Feb 24, 2012 3:32 pm

hallo,

the general settings are correct...

everything else works perfect in the forum.. only the gallery/search.php makes this errors.
everything else in the gallery works... only if the search is used:

http://www.pooldoktor.net/forum/gallery ... _id=recent
http://www.pooldoktor.net/forum/gallery ... _id=random

so where can I hardcode the link to www.pooldoktor.net/forum

what do to pleas help.

thanks.
pooldoktor
Posts 10 - 20
Posts 10 - 20
 
Posts: 14
Topics: 2
Joined: Mon Jan 23, 2012 11:29 pm

Re: pics not shown - recent / random

Postby pooldoktor » Sat Feb 25, 2012 7:59 pm

sorry.. ich komm mit der url.php nicht klar - was müsst ich bitte wo umschreiben, damit der link stimmt?

Code: Select all
if (!defined('IN_PHPBB'))
{
   exit;
}

class phpbb_gallery_url
{
   /**
   * Path from the gallery root, back to phpbb's root
   */
   static private $phpbb_root_path = '../';

   /**
   * Path from the phpbb root, into admin's root
   */
   static private $phpbb_admin_path = 'adm/';

   /**
   * Path from the phpbb root, into gallery's root
   */
   static private $phpbb_gallery_path = 'gallery/';

   /**
   * php-file extension
   */
   static private $phpEx = '.php';


   const IMAGE_PATH = 'images/';
   const UPLOAD_PATH = 'upload/';
   const THUMBNAIL_PATH = 'cache/';
   const MEDIUM_PATH = 'medium/';
   const IMPORT_PATH = 'import/';

   static private $phpbb_gallery_relative = '';
   static private $phpbb_gallery_full_path = '';

   static private $loaded = false;

   /**
   * Static Constructor.
   */
   static public function init($force_root_path = false)
   {
      global $phpbb_admin_path, $phpbb_root_path, $phpEx;

      if ($force_root_path)
      {
         self::$phpbb_root_path = $force_root_path;
      }
      else
      {
         self::$phpbb_root_path = $phpbb_root_path;
      }
      $phpbb_admin_path = self::$phpbb_root_path . self::$phpbb_admin_path;
      self::$phpbb_admin_path = $phpbb_admin_path;
      self::$phpEx = '.' . $phpEx;
      self::$phpbb_gallery_relative = self::beautiful_path(self::$phpbb_root_path . self::$phpbb_gallery_path);
      self::$phpbb_gallery_full_path = self::beautiful_path(generate_board_url() . '/' . self::$phpbb_gallery_path, true);

      self::$loaded = true;
   }

   static public function path($directory = 'gallery')
   {
      if (!self::$loaded)
      {
         self::init();
      }

      switch ($directory)
      {
         case 'gallery':
            return self::$phpbb_gallery_relative;
         case 'phpbb':
            return self::$phpbb_root_path;
         case 'admin':
            return self::$phpbb_admin_path;
         case 'relative':
            return self::$phpbb_gallery_path;
         case 'full':
            return self::$phpbb_gallery_full_path;
         case 'board':
            return generate_board_url() . '/';
         case 'images':
            return self::$phpbb_gallery_relative . self::IMAGE_PATH;
         case 'upload':
            return self::$phpbb_gallery_relative . self::IMAGE_PATH . self::UPLOAD_PATH;
         case 'upload_noroot':
            // stupid phpbb-upload class prepends the rootpath itself.
            return self::$phpbb_gallery_path . self::IMAGE_PATH . self::UPLOAD_PATH;
         case 'thumbnail':
            return self::$phpbb_gallery_relative . self::IMAGE_PATH . self::THUMBNAIL_PATH;
         case 'thumbnail_noroot':
            return self::$phpbb_gallery_path . self::IMAGE_PATH . self::THUMBNAIL_PATH;
         case 'medium':
            return self::$phpbb_gallery_relative . self::IMAGE_PATH . self::MEDIUM_PATH;
         case 'medium_noroot':
            return self::$phpbb_gallery_path . self::IMAGE_PATH . self::MEDIUM_PATH;
         case 'import':
            return self::$phpbb_gallery_relative . self::IMAGE_PATH . self::IMPORT_PATH;
         case 'import_noroot':
            return self::$phpbb_gallery_path . self::IMAGE_PATH . self::IMPORT_PATH;
      }

      return false;
   }

   static public function append_sid()
   {
      $args = func_get_args();
      if (is_array($args[0]))
      {
         // Little problem from the duplicated call to func_get_args();
         $args = $args[0];
      }

      if (in_array($args[0], array('phpbb', 'admin', 'relative', 'full', 'board')))
      {
         $mode = array_shift($args);
         $args[0] = self::path($mode) . self::phpEx_file($args[0]);
      }
      else
      {
         $args[0] = self::path() . self::phpEx_file($args[0]);
      }
      if (isset($args[1]))
      {
         $args[1] .= phpbb_gallery::$display_popup;
      }

      $params = $args + array(
         0   => '',
         1   => phpbb_gallery::$display_popup,
         2   => true,
         3   => false,
      );

      return append_sid($params[0], $params[1], $params[2], $params[3]);
   }

   static public function create_link($path, $file, $params = false, $is_amp = true)
   {
      // No ?sid=
      return self::append_sid($path, $file, $params, $is_amp, '');
   }

   static public function redirect()
   {
      redirect(self::append_sid(func_get_args()));
   }

   static public function phpEx_file($file)
   {
      if ((substr($file, -1) == '/') || (strlen($file) == 0))
      {
         // it's no file, so no .php here.
         return $file;
      }

      if (!self::$loaded)
      {
         self::init();
      }

      /*if ($file == 'image_page')
      {
         //@todo
         $file = 'viewimage';
      }*/

      return $file . self::$phpEx;
   }

   static public function _include($file, $path = 'gallery', $sub_directory = 'includes/')
   {
      if (!is_array($file))
      {
         // Trying to break less MODs by populating the needed variables for inclusions
         global $phpbb_admin_path, $phpbb_root_path, $phpEx;

         include(self::path($path) . $sub_directory . self::phpEx_file($file));
      }
      else
      {
         foreach ($file as $real_file)
         {
            self::_include($real_file, $path, $sub_directory);
         }
      }
   }

   static public function _file_exists($file, $path = 'gallery', $sub_directory = 'includes/')
   {
      return file_exists(self::path($path) . $sub_directory . self::phpEx_file($file));
   }

   static public function _is_writable($file, $path = 'gallery', $sub_directory = 'includes/')
   {
      return phpbb_is_writable(self::path($path) . $sub_directory . self::phpEx_file($file));
   }

   static public function _return_file($file, $path = 'gallery', $sub_directory = 'includes/')
   {
      return self::path($path) . $sub_directory . self::phpEx_file($file);
   }

   /**
   * Creates beautiful relative path from ugly relative path
   * Resolves .. (up directory)
   *
   * @author   bantu      based on phpbb_own_realpath() by Chris Smith
   * @license   http://opensource.org/licenses/gpl-license.php GNU Public License
   *
   * @param   string      ugly path e.g. "../community/../gallery/"
   * @param   bool      is it a full url, so we need to fix teh http:// at the beginning?
   * @return   string      beautiful path e.g. "../gallery/"
   */
   static public function beautiful_path($path, $is_full_url = false)
   {
      // Remove any repeated slashes
      $path = preg_replace('#/{2,}#', '/', $path);

      if ($is_full_url)
      {
         // Fix the double slash, which we just removed.
         if (strpos($path, 'https:/') === 0)
         {
            $path = 'https://' . substr($path, 7);
         }
         else if (strpos($path, 'http:/') === 0)
         {
            $path = 'http://' . substr($path, 6);
         }
      }

      // Break path into pieces
      $bits = explode('/', $path);

      // Lets get looping, run over and resolve any .. (up directory)
      for ($i = 0, $max = sizeof($bits); $i < $max; $i++)
      {
         if ($bits[$i] == '..' && isset($bits[$i - 1]) && $bits[$i - 1][0] != '.')
         {
            // We found a .. and we are able to traverse upwards ...
            unset($bits[$i]);
            unset($bits[$i - 1]);

            $i -= 2;
            $max -= 2;

            $bits = array_values($bits);
         }
      }

      return implode('/', $bits);
   }
}
pooldoktor
Posts 10 - 20
Posts 10 - 20
 
Posts: 14
Topics: 2
Joined: Mon Jan 23, 2012 11:29 pm

Re: pics not shown - recent / random

Postby nickvergessen » Sun Feb 26, 2012 5:53 pm

Also bei mir werden die Links in deinem Forum jetzt richtig angezeigt... woran lags?
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5753
Topics: 218
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: pics not shown - recent / random

Postby pooldoktor » Sun Feb 26, 2012 6:24 pm

nein nicht überall... geh mal auf
http://www.pooldoktor.net/forum/gallery/index.php

und dann klicke links auf "Neueste Bilder" oder "Zufällige Bilder" nur dort bzw. überall wo es mit der search.php zu tun hat wird die root falsch genommen... statt www.pooldoktor.net/forum nimmt er nur die domain.

bitte schreib mir wie ich das in der url.php hardcoden kann, dass er immer auch das sub-directory nimmt.

ps... komisch ist auch dass wenn du auf
http://www.pooldoktor.net/forum/gallery/search.php
bis dass er wenn du oben auf "Mitgliederliste" klickst auch dort vergisst er die sub-directory... da hats irgendwas noch kleines.

danke.

lg
mario
pooldoktor
Posts 10 - 20
Posts 10 - 20
 
Posts: 14
Topics: 2
Joined: Mon Jan 23, 2012 11:29 pm

Re: pics not shown - recent / random

Postby nickvergessen » Mon Feb 27, 2012 3:15 pm

ähm okay, das Problem is deine SEO MOD. Die Überschreibt die Links sobald search.php der Datei-Name ist, egal wo die Datei ist... (wie ich diese MODs hasse :P)
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5753
Topics: 218
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: pics not shown - recent / random

Postby pooldoktor » Mon Feb 27, 2012 4:47 pm

hallo,

schön langsam werd ich schlauer - danke...

ich habe ja den mod von http://www.phpbb-seo.com

ich müsste also eine erweiterung für die gallery installieren... diese

http://www.phpbb-seo.com/en/phpbb-seo-t ... t4997.html

jetzt wundert mich nur dass diese erweiterung für die "alte" 1.0.5 ist.

jetzt meine frage an dich - ist das kompatibel zur neuen gallery 1.1.4 hab ich... die file struktur ist ja etwas anders?

danke.
lg
mario
pooldoktor
Posts 10 - 20
Posts 10 - 20
 
Posts: 14
Topics: 2
Joined: Mon Jan 23, 2012 11:29 pm

Re: pics not shown - recent / random

Postby pooldoktor » Mon Feb 27, 2012 10:09 pm

ok ... das habe ich gelöst indem ich den neuen gallery SEO Mod installiert habe.. ist zwar erst eine premod aber funktioniert bereits.
siehe:
http://www.phpbb-seo.com/en/phpbb-seo-m ... 04-15.html
pooldoktor
Posts 10 - 20
Posts 10 - 20
 
Posts: 14
Topics: 2
Joined: Mon Jan 23, 2012 11:29 pm


Return to Installation & Update

Who is online

Users browsing this forum: No registered users and 2 guests

 

cron