Topic Title: Tips: Custom G2 URL rewrite mod

Forum Index » phpBB3 / Gallery 2 Integration » Tips: Custom G2 URL rewrite mod
Topic URL: http://www.nukedgallery.net/postt5318.html

AuthorMessage
Post Title: Tips: Custom G2 URL rewrite mod
PoPoutdoor
Joined: Jan 20, 2006
Posts: 129

Posted: Mon Oct 12, 2009 1:02 am
Finially get the site upgraded to phpBB3!

After Gallery2-phpBB3 Integration, edit the following files:

1. memberlist.php
2. includes/ucp/ucp_profile.php

This mod for Download Item set as %itemId%/%fileName%

Edit file: memberlist.php

Find
Code: ›                   $ids = preg_grep('#^\d*-\d*$#i', explode('/', $links_data['ucp_images'][$i]));
                  if (is_array($ids) && sizeof($ids) > 1)
                  {
                     $ids = array_values($ids);
                     $itemId = (int) substr($ids[0], 0, strpos($ids[0], '-'));
                  }

Replaced with
Code: ›                   $ids = preg_grep('#^\d+$#i', explode('/', $links_data['ucp_images'][$i]));
                  if (is_array($ids) && sizeof($ids) > 1)
                  {
                     $ids = array_values($ids);
                     $itemId = (int) $ids[0];
                  }


Edit file: includes/ucp/ucp_profile.php

Find
Code: ›                            $itemIds = preg_grep('#^\d*-\d*$#i', explode('/', $ucpImages));
                           if (is_array($itemIds) && sizeof($itemIds) > 1)
                           {
                              $itemIds = array_values($itemIds);
                              $itemId = (int) substr($itemIds[0], 0, strpos($itemIds[0], '-'));
                           }

Replaced with
Code: ›                            $itemIds = preg_grep('#^\d+$#i', explode('/', $ucpImages));
                           if (is_array($itemIds) && sizeof($itemIds) > 1)
                           {
                              $itemIds = array_values($itemIds);
                              $itemId = (int) $ids[0];
                           }

AuthorMessage
Post Title: Re: Tips: Custom G2 URL rewrite mod
commander_keen
Joined: Feb 24, 2009
Posts: 7

Posted: Fri Dec 11, 2009 5:43 pm
Could you please explain what this is actually for, I'm sorry I don't get it Wink

AuthorMessage
Post Title: Re: Tips: Custom G2 URL rewrite mod
PoPoutdoor
Joined: Jan 20, 2006
Posts: 129

Posted: Sat Dec 12, 2009 10:09 pm
This is for the G2 URL-rewrite setting not using DEFAULT.

All times are GMT - 5 Hours
Powered by PHPNuke and phpBB2 © 2006 phpBB Group