Resource icon

PhotoPost 8.0 URL Redirect Script 1

No permission to download
Compatible XF 2.x versions
  1. 2.2
Additional requirements
You must have selected "Retain imported content IDs" when originally importing
You need the pp_photos table from the Photopost database
Simple redirect script that catches any requests to sendphoto.php or directly to your old PhotoPost data folder and redirects to the new XFMG location.

showphoto.php redirects will go to the media overview page, direct data folder links it will go to the full image or thumbnail.

Installing

Put the attached photopost_redirect.php file in your XF root, then add the following entries to your .htaccess file above the "# Here is the Xenforo stuff" part (changing the data file path accordingly, mine was in the /gallery folder)

Code:
#    Rewrite PhotoPost URLs
RewriteCond %{QUERY_STRING} photo=(\d+)
RewriteRule ^gallery/show(photo|full).php photopost_redirect.php?s=detail&id=%1 [NC,L]
RewriteRule ^gallery/data/(\d+)/((medium|thumbs|mini)/)?([a-z0-9\-_\.]+) photopost_redirect.php?c=$1&s=$3&f=$4 [NC,L]

Copy the pp_photos table from your photopost/vbulletin database into the XenForo one (if you want to save space, you can remove all the the columns except for id, cat and bigimage).

This is needed so that direct data folder links will work, as there is no id in the PP filenames.

And that's it :)
Author
benFF
Downloads
16
Views
1,470
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from benFF

Top Bottom