Pixelpost Forum

Pixelpost Forum (http://www.pixelpost.org/forum/index.php)
-   Addons (http://www.pixelpost.org/forum/forumdisplay.php?f=13)
-   -   Beta Addon: Post Slug (http://www.pixelpost.org/forum/showthread.php?t=4915)

jaywilliams 08-21-2006 04:16 AM

Beta Addon: Post Slug
 
What does this addon do? It's Simple.

Instead of referencing photos using an ID number like this:
Code:

index.php?showimage=24
You can reference images using a "post slug":
Code:

index.php?photoslug=post-slug-title
You can either let the script automatically generate a post slug based off your image title. Or you enter your own post slug.

I attempted to make the install as easy as possible, so as long as you have PHP 5+ and are running Pixelpost 1.5+ you should have no issues whatsoever.

Here are some screen shots displaying how it looks in the admin interface:
http://img237.imageshack.us/img237/1...magenp9.th.gifhttp://img82.imageshack.us/img82/211...mageqs1.th.gifhttp://img82.imageshack.us/img82/726...pagexa4.th.gif

As this only a beta, I haven't uploaded it to the actual pixelpost addons site yet. You can download it however from one of my servers, http://members.atlantic.net/~john195...lug_1_beta.zip

This is my first ever publicly released addon, so any input would be greatly appreciated. And with a little mod_rewrite, you can do even more with this addon. Hum maybe something like "/photo/photo-slug" maybe? ;-)

Oh and if you didn't notice above, this is a beta, and it does modify your database, so as always, proceed with caution if you have a database full of photos.

UPDATE:
If you want to use PostSlug with mod_rewrite, you can now download a special mod_rewire version that is ready to go right out of the box.

PostSlug_1.0.1_beta_modrewrite.zip

NOTE: Currently, this addon/hack only works with Pixelpost v1.5
I will however port it to v1.6 in the near future.

se.nsuo.us 08-21-2006 04:35 AM

nice addon - may be you can add a line in the description of the addon with the mod_rewrite rule and how to make it useful

jaywilliams 08-21-2006 04:47 AM

Quote:

Originally Posted by se.nsuo.us
nice addon - may be you can add a line in the description of the addon with the mod_rewrite rule and how to make it useful

Well, you can easily create a .htaccess file with the following text to do that.
Code:

RewriteEngine On

RewriteRule ^photo/(.*)$ index.php?photoslug=$1

But you will need to modify the script and your template so all the links reference the photos that way. So it would take a little effort on the users end. And as you noticed, this is a beta, so better integration with mod_rewrite will probably be something that will be added in the future.

And thanks for your comment!

GeoS 08-21-2006 06:13 AM

Very nice idea.

I was thinking about some new stuff for linking system for about a year. Maybe at september Ill do something bigger.

Your addon is first big step forward in good direction.

jaywilliams 08-21-2006 01:45 PM

Quote:

Originally Posted by GeoS
Very nice idea.
I was thinking about some new stuff for linking system for about a year. Maybe at september Ill do something bigger.
Your addon is first big step forward in good direction.

Yes, I too have thought about doing something like this for a while.

And since the final release of Pixelpost 1.5, I've been working on a new version of my photoblog. And one of my goals for my photoblog was to have a post slug, similar to WordPress. (My other goals include having a tagging system for the photos and as well as page caching)

So this addon is a direct result of my work on the next version of my photoblog. Which as of now, it still very much under development. And hopefully, soon I will be able to release the tags addon that I am currently working on.

SnowScan 08-21-2006 05:45 PM

Nice idea, but the link is broken...

jaywilliams 08-21-2006 05:53 PM

Quote:

Originally Posted by SnowScan
Nice idea, but the link is broken...

Sorry about that, the link is now fixed.

jaywilliams 09-07-2006 03:39 PM

Well, I've just finished redesigning my site, A Different View, using the Post Slug addon.

The ugly image ID in the URL is gone for good, and in it's place is a nice simple "post slug". :-D

And with a little help from mod_rewrite and php, I was able to keep all the old links to my site completely functional as well.

If anyone wants any of my mod_rewrite/php scrips, feel free to contact me.

SnowScan 09-07-2006 04:19 PM

Hi Jay,

I really like your design, very neat :)
Only probs are that not all images will do well with a reflection under them IMO and it is not logival to click the image to read the description and comment.

Apart from that it is awesome

Peter

jaywilliams 09-07-2006 05:17 PM

Quote:

Originally Posted by SnowScan
Only probs are that not all images will do well with a reflection under them IMO and it is not logival to click the image to read the description and comment.

Apart from that it is awesome


Thanks for the comment!
And yes, I have to admit, that clicking on the photos to view the description/comments may not be the best solution, but it was the only way I could come up with to get the minimalistic look that I was striving to achieve.

And the reflections, yes I have to agree, some photos don't look that great with them, but I feel a majority of the shots do look good with the reflections, so I decided to add them. And instead of using the standard "Reflection.js" script to accomplish this, I made a little addon for PixelPost that uses PHP to create a "reflection image" that can be included in the template. (reflect_IMGNAME.jpg) That way the site loads faster, and has it works on any browser, even if JavaScript is turned off.


All times are GMT. The time now is 03:56 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.