Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #21  
Old 11-28-2005, 04:03 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
Yeap, quite common but it doesnt mean its everytime.
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #22  
Old 12-02-2005, 09:29 AM
dvolve Offline
pp regular
 
Join Date: Dec 2005
Location: San Francisco, CA
Posts: 31
Quote:
Originally Posted by jaywilliams
Just want to let you know that I've modified my pixelpost enough using mod_rewrite that you will never see the .php extension or the ?x= in the address box.

Here is my .htaccess file:
Code:
Options -Indexes
RewriteEngine on
RewriteRule ^(browse|about)$ index.php?x=$1&pagenum=1
RewriteRule ^browse/([0-9]+)$ index.php?x=browse&category=&pagenum=$1
RewriteRule ^browse/category/([0-9]+)/([0-9]+)$ index.php?x=browse&category=$1&pagenum=$2
RewriteRule ^browse/category/([0-9]+)$ index.php?x=browse&category=$1&pagenum=1
RewriteRule ^comment/([0-9]+)$ index.php?popup=comment&showimage=$1
RewriteRule ^comment/submit$ index.php?x=save_comment
RewriteRule ^photo/([0-9]+)$ index.php?showimage=$1
RewriteRule ^photo/([0-9]+)/rating/([1-5])$ index.php?showimage=$1&rating=$2
RewriteRule ^photo/file/(.+)$ /images/$1
RewriteRule ^thumbnails/latest$ index.php?showthumb=latest&thumbtag=image
RewriteRule ^feeds/(rss|atom).xml$ index.php?x=$1
RewriteRule ^browse/archive/(.*)/([0-9]+)$ index.php?x=browse&archivedate=$1&pagenum=$2
RewriteRule ^browse/archive/(.*)$ index.php?x=browse&archivedate=$1&pagenum=1
As you can see this will do just about anything.

For example... if I want to see image number 31 I go to:
http://photoblog.differentview.us/photo/31

If I want to post a comment on photo 31 I go to:
http://photoblog.differentview.us/comment/31

The real trick is modifying the browse page to accept options like that.
Browse View Cat 7:
http://photoblog.differentview.us/browse/category/7
Browse View Cat 7 Page 1:
http://photoblog.differentview.us/browse/category/7/1
Browse View Photos during the month of October, 2005:
http://photoblog.differentview.us/br...rchive/2005-10

By using that .htaccess file and by tweaking the links that pixel post uses, you can do the same.

Give me a call or drop me an e-mail if you want some of my modified php files or more info on how you can do it.

Phone: 352-397-2506
Skype: d3designs
E-mail: d3designs AT gmail.com
AIM: gwdjay

Hey mate awesome job on the template... could you have one posted for ppl (novices) like me to use and edit aorund... and of course credit will be given in the footers to you.. cheers!
Reply With Quote
  #23  
Old 12-02-2005, 09:48 AM
Sergio de la Torre Offline
pp veteran
 
Join Date: Oct 2005
Posts: 58
Yes, i have mod_rewrite. I have deleted "Options -Indexes" And all works fine

"Options -Indexes" is important?
__________________
Reply With Quote
  #24  
Old 12-02-2005, 09:50 AM
Sergio de la Torre Offline
pp veteran
 
Join Date: Oct 2005
Posts: 58
Another question, ¿How can I redirect old URL to the new system?

Sergio
__________________
Reply With Quote
  #25  
Old 12-02-2005, 07:46 PM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
Quote:
Originally Posted by dvolve
Hey mate awesome job on the template... could you have one posted for ppl (novices) like me to use and edit aorund... and of course credit will be given in the footers to you.. cheers!
what's wrong with the one you quoted?
Reply With Quote
  #26  
Old 12-16-2005, 06:53 AM
Finner Offline
pp veteran
 
Join Date: Jun 2005
Posts: 85
I too would like a more simple and complete guide on how to implement this for PP novices..
I know a lot has been covered in this thread, but it's over a few posts and gets a little confusing.

I have saved the code and uploaded it to my PP root as a .htaccess file, but am unclear on exactly what to modify and to what...
i.e. how does $image_permalink = "<a href='$showprefix$image_id'>$lang_permalink</a>"; change to /photos/photo.jpg ?
Reply With Quote
  #27  
Old 12-16-2005, 11:05 AM
unmake Offline
forum loafer
 
Join Date: Nov 2005
Posts: 10
Quote:
Originally Posted by Finner
i.e. how does $image_permalink = "<a href='$showprefix$image_id'>$lang_permalink</a>"; change to /photos/photo.jpg ?
Code:
$image_permalink = "<a href="photos/'$image_id'>$lang_permalink</a>";
the cleanest method is to locate the $showprefix definition, and change that to 'photo/' or whatever.

BTW, the new URL's, according to that htaccess anyway, will be "../photo/01" instead of "../index.php?showimage=1" - not "../photo/firstimage_24734763.jpg"

depending on how you've coded your templates, they may need to be modified as well; adding a BASE HREF tag can help resolve relative locatioms..
Reply With Quote
  #28  
Old 12-16-2005, 12:47 PM
jaywilliams's Avatar
jaywilliams+ Offline
Team Pixelpost
 
Join Date: Sep 2005
Posts: 1,003
Send a message via AIM to jaywilliams Send a message via MSN to jaywilliams Send a message via Yahoo to jaywilliams Send a message via Skype™ to jaywilliams
"Options -Indexes" is not required to use mod_rewrite.
That simply tells apache not to do directory listings.
Which helps provide a little more security.

As for the template I am currently using...
I built it for my site, so all the modifications I made to it and index.php and the various mods work great on my site.... but if they were used on any other site they won't work. :-(

If I ever make a template again, I will build it so I won't be tethered to my site only.

Quote:
Originally Posted by unmake
Code:
$image_permalink = "<a href="photos/'$image_id'>$lang_permalink</a>";
the cleanest method is to locate the $showprefix definition, and change that to 'photo/' or whatever.

...
depending on how you've coded your templates, they may need to be modified as well; adding a BASE HREF tag can help resolve relative locations..
unmake is right on.
It's simply a matter of searching your index.php and the various mod php files that you use and setting the path accordingly.
__________________
Jay Williams | A Different View
Reply With Quote
  #29  
Old 12-16-2005, 01:19 PM
tinyblob's Avatar
tinyblob Offline
team pixelpost
 
Join Date: Nov 2005
Location: scotland
Posts: 523
there's no need to modify files, the $showprefix variable is modified if $mod_rewrite is set to 1.

i urge you to avoid modifying pixelpost files since the beta of 1.5 is out soon and you'll just have to make those changes again!
__________________
touchnothing.net
Reply With Quote
  #30  
Old 12-17-2005, 12:02 AM
Finner Offline
pp veteran
 
Join Date: Jun 2005
Posts: 85
Thanks for the replies, they were of great help! It all seems to be working well now - http://digerati.farfromreal.com/folio/index.php

Ended up just modifying $showprefix and some of the base href's in my template as it didn't seem to want to work w.out the modifications..
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 01:28 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs